diff --git a/README.md b/README.md index 304a15ee..bbcb586b 100644 --- a/README.md +++ b/README.md @@ -216,7 +216,7 @@ FLAG DESCRIPTIONS sandbox. ``` -_See code: [lib/commands/org/create/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/3.2.1/lib/commands/org/create/sandbox.ts)_ +_See code: [src/commands/org/create/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/3.2.1/src/commands/org/create/sandbox.ts)_ ## `sf org create scratch` @@ -369,7 +369,7 @@ FLAG DESCRIPTIONS Omit this flag to have Salesforce generate a unique username for your org. ``` -_See code: [lib/commands/org/create/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/3.2.1/lib/commands/org/create/scratch.ts)_ +_See code: [src/commands/org/create/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/3.2.1/src/commands/org/create/scratch.ts)_ ## `sf org delete sandbox` @@ -413,7 +413,7 @@ EXAMPLES $ sf org delete sandbox --target-org my-sandbox --no-prompt ``` -_See code: [lib/commands/org/delete/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/3.2.1/lib/commands/org/delete/sandbox.ts)_ +_See code: [src/commands/org/delete/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/3.2.1/src/commands/org/delete/sandbox.ts)_ ## `sf org delete scratch` @@ -455,7 +455,7 @@ EXAMPLES $ sf org delete scratch --target-org my-scratch-org --no-prompt ``` -_See code: [lib/commands/org/delete/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/3.2.1/lib/commands/org/delete/scratch.ts)_ +_See code: [src/commands/org/delete/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/3.2.1/src/commands/org/delete/scratch.ts)_ ## `sf org disable tracking` @@ -493,7 +493,7 @@ EXAMPLES $ sf org disable tracking ``` -_See code: [lib/commands/org/disable/tracking.ts](https://github.com/salesforcecli/plugin-org/blob/3.2.1/lib/commands/org/disable/tracking.ts)_ +_See code: [src/commands/org/disable/tracking.ts](https://github.com/salesforcecli/plugin-org/blob/3.2.1/src/commands/org/disable/tracking.ts)_ ## `sf org display` @@ -537,7 +537,7 @@ EXAMPLES $ sf org display --target-org TestOrg1 --verbose ``` -_See code: [lib/commands/org/display.ts](https://github.com/salesforcecli/plugin-org/blob/3.2.1/lib/commands/org/display.ts)_ +_See code: [src/commands/org/display.ts](https://github.com/salesforcecli/plugin-org/blob/3.2.1/src/commands/org/display.ts)_ ## `sf org enable tracking` @@ -578,7 +578,7 @@ EXAMPLES $ sf org enable tracking ``` -_See code: [lib/commands/org/enable/tracking.ts](https://github.com/salesforcecli/plugin-org/blob/3.2.1/lib/commands/org/enable/tracking.ts)_ +_See code: [src/commands/org/enable/tracking.ts](https://github.com/salesforcecli/plugin-org/blob/3.2.1/src/commands/org/enable/tracking.ts)_ ## `sf org list` @@ -616,7 +616,7 @@ EXAMPLES $ sf org list --clean ``` -_See code: [lib/commands/org/list.ts](https://github.com/salesforcecli/plugin-org/blob/3.2.1/lib/commands/org/list.ts)_ +_See code: [src/commands/org/list.ts](https://github.com/salesforcecli/plugin-org/blob/3.2.1/src/commands/org/list.ts)_ ## `sf org list metadata` @@ -681,7 +681,7 @@ FLAG DESCRIPTIONS Examples of metadata types that use folders are Dashboard, Document, EmailTemplate, and Report. ``` -_See code: [lib/commands/org/list/metadata.ts](https://github.com/salesforcecli/plugin-org/blob/3.2.1/lib/commands/org/list/metadata.ts)_ +_See code: [src/commands/org/list/metadata.ts](https://github.com/salesforcecli/plugin-org/blob/3.2.1/src/commands/org/list/metadata.ts)_ ## `sf org list metadata-types` @@ -735,7 +735,7 @@ FLAG DESCRIPTIONS Override the api version used for api requests made by this command ``` -_See code: [lib/commands/org/list/metadata-types.ts](https://github.com/salesforcecli/plugin-org/blob/3.2.1/lib/commands/org/list/metadata-types.ts)_ +_See code: [src/commands/org/list/metadata-types.ts](https://github.com/salesforcecli/plugin-org/blob/3.2.1/src/commands/org/list/metadata-types.ts)_ ## `sf org open` @@ -801,7 +801,7 @@ EXAMPLES $ sf org open --source-file force-app/main/default/flows/Hello.flow-meta.xml ``` -_See code: [lib/commands/org/open.ts](https://github.com/salesforcecli/plugin-org/blob/3.2.1/lib/commands/org/open.ts)_ +_See code: [src/commands/org/open.ts](https://github.com/salesforcecli/plugin-org/blob/3.2.1/src/commands/org/open.ts)_ ## `sf org resume sandbox` @@ -863,7 +863,7 @@ FLAG DESCRIPTIONS returns the job ID. To resume checking the sandbox creation, rerun this command. ``` -_See code: [lib/commands/org/resume/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/3.2.1/lib/commands/org/resume/sandbox.ts)_ +_See code: [src/commands/org/resume/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/3.2.1/src/commands/org/resume/sandbox.ts)_ ## `sf org resume scratch` @@ -909,6 +909,6 @@ FLAG DESCRIPTIONS The job ID is valid for 24 hours after you start the scratch org creation. ``` -_See code: [lib/commands/org/resume/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/3.2.1/lib/commands/org/resume/scratch.ts)_ +_See code: [src/commands/org/resume/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/3.2.1/src/commands/org/resume/scratch.ts)_ diff --git a/messages/open.md b/messages/open.md index 7ac847b2..c45872ab 100644 --- a/messages/open.md +++ b/messages/open.md @@ -12,12 +12,18 @@ To generate a URL but not launch it in your browser, specify --url-only. To open in a specific browser, use the --browser flag. Supported browsers are "chrome", "edge", and "firefox". If you don't specify --browser, the org opens in your default browser. +To open in an incognito window using your default browser, use `--browser browserPrivate`. + # examples - Open your default org in your default browser: $ <%= config.bin %> <%= command.id %> +- Open your default org in your default browser using an incognito window: + + $ <%= config.bin %> <%= command.id %> --browser browserPrivate + - Open the org with alias MyTestOrg1 in the Firefox browser: $ <%= config.bin %> <%= command.id %> --target-org MyTestOrg1 --browser firefox diff --git a/package.json b/package.json index cf8f5d9d..eb833752 100644 --- a/package.json +++ b/package.json @@ -5,14 +5,14 @@ "author": "Salesforce", "bugs": "https://github.com/forcedotcom/cli/issues", "dependencies": { - "@oclif/core": "^3.15.1", + "@oclif/core": "^3.16.0", "@salesforce/core": "^6.4.4", "@salesforce/kit": "^3.0.15", - "@salesforce/sf-plugins-core": "^5.0.3", + "@salesforce/sf-plugins-core": "^7.0.0", "@salesforce/source-deploy-retrieve": "^10.2.5", - "chalk": "^4", + "chalk": "^5.3.0", "change-case": "^5.3.0", - "open": "^9.1.0" + "open": "^10.0.3" }, "devDependencies": { "@oclif/plugin-command-snapshot": "^5.0.5", diff --git a/src/commands/force/org/create.ts b/src/commands/force/org/create.ts index 009cc186..07fccbbc 100644 --- a/src/commands/force/org/create.ts +++ b/src/commands/force/org/create.ts @@ -263,15 +263,6 @@ export class Create extends SfCommand { this.logger.debug('validation complete'); - // If the user supplied a specific client ID, we have no way of knowing if it's - // a certificate-based Connected App or not. Therefore, we have to assume that - // we'll need the client secret, so prompt the user for it. - const { clientSecret } = this.flags.clientid - ? await this.prompt<{ clientSecret: string }>([ - { name: 'clientSecret', type: 'mask', message: messages.getMessage('secretPrompt') }, - ]) - : { clientSecret: undefined }; - const createCommandOptions: ScratchOrgRequest = { connectedAppConsumerKey: this.flags.clientid, durationDays: this.flags.durationdays, @@ -282,7 +273,12 @@ export class Create extends SfCommand { apiversion: this.flags['api-version'], definitionfile: this.flags.definitionfile, orgConfig: this.varArgs, - clientSecret, + // If the user supplied a specific client ID, we have no way of knowing if it's + // a certificate-based Connected App or not. Therefore, we have to assume that + // we'll need the client secret, so prompt the user for it. + clientSecret: this.flags.clientid + ? await this.secretPrompt({ message: messages.getMessage('secretPrompt') }) + : undefined, setDefault: this.flags.setdefaultusername === true, alias: this.flags.setalias, tracksSource: true, diff --git a/src/commands/force/org/delete.ts b/src/commands/force/org/delete.ts index 2dd42143..e53ff24d 100644 --- a/src/commands/force/org/delete.ts +++ b/src/commands/force/org/delete.ts @@ -61,7 +61,9 @@ export class Delete extends SfCommand { // we either need permission to proceed without a prompt OR get the user to confirm if ( flags['no-prompt'] || - (await this.confirm(messages.getMessage('confirmDelete', [isSandbox ? 'sandbox' : 'scratch', resolvedUsername]))) + (await this.confirm({ + message: messages.getMessage('confirmDelete', [isSandbox ? 'sandbox' : 'scratch', resolvedUsername]), + })) ) { let alreadyDeleted = false; let successMessageKey = 'commandSandboxSuccess'; diff --git a/src/commands/org/create/sandbox.ts b/src/commands/org/create/sandbox.ts index d5db29ae..41fcb34b 100644 --- a/src/commands/org/create/sandbox.ts +++ b/src/commands/org/create/sandbox.ts @@ -5,8 +5,6 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ - - import { Duration } from '@salesforce/kit'; import { Flags } from '@salesforce/sf-plugins-core'; import { Lifecycle, Messages, SandboxEvents, SandboxProcessObject, SandboxRequest, SfError } from '@salesforce/core'; @@ -16,7 +14,7 @@ import requestFunctions from '../../../shared/sandboxRequest.js'; import { SandboxCommandBase } from '../../../shared/sandboxCommandBase.js'; import { SandboxLicenseType } from '../../../shared/orgTypes.js'; -Messages.importMessagesDirectoryFromMetaUrl(import.meta.url) +Messages.importMessagesDirectoryFromMetaUrl(import.meta.url); const messages = Messages.loadMessages('@salesforce/plugin-org', 'create.sandbox'); const getLicenseTypes = (): string[] => Object.values(SandboxLicenseType); @@ -225,17 +223,11 @@ export default class CreateSandbox extends SandboxCommandBase( - [ - { - name: 'continue', - type: 'confirm', - message: messages.getMessage('isConfigurationOk'), - }, - ], - 10_000 - ); - if (!configurationCorrect.continue) { + if ( + !(await this.confirm({ + message: messages.getMessage('isConfigurationOk'), + })) + ) { throw messages.createError('error.UserNotSatisfiedWithSandboxConfig'); } } diff --git a/src/commands/org/create/scratch.ts b/src/commands/org/create/scratch.ts index 6dc68752..e2f3091c 100644 --- a/src/commands/org/create/scratch.ts +++ b/src/commands/org/create/scratch.ts @@ -166,7 +166,7 @@ export default class EnvCreateScratch extends SfCommand { const createCommandOptions = await buildScratchOrgRequest( flags, - flags['client-id'] ? await this.clientSecretPrompt() : undefined + flags['client-id'] ? await this.secretPrompt({ message: messages.getMessage('prompt.secret') }) : undefined ); let lastStatus: string | undefined; @@ -210,18 +210,4 @@ export default class EnvCreateScratch extends SfCommand { } } } - - private async clientSecretPrompt(): Promise { - const { secret } = await this.timedPrompt<{ secret: string }>( - [ - { - name: 'secret', - message: messages.getMessage('prompt.secret'), - type: 'password', - }, - ], - secretTimeout - ); - return secret; - } } diff --git a/src/commands/org/delete/sandbox.ts b/src/commands/org/delete/sandbox.ts index bea01f8f..20a653b0 100644 --- a/src/commands/org/delete/sandbox.ts +++ b/src/commands/org/delete/sandbox.ts @@ -5,12 +5,11 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ - import { AuthInfo, AuthRemover, Messages, Org, SfError, StateAggregator } from '@salesforce/core'; import { Flags, SfCommand } from '@salesforce/sf-plugins-core'; import { orgThatMightBeDeleted } from '../../../shared/flags.js'; -Messages.importMessagesDirectoryFromMetaUrl(import.meta.url) +Messages.importMessagesDirectoryFromMetaUrl(import.meta.url); const messages = Messages.loadMessages('@salesforce/plugin-org', 'delete_sandbox'); export interface SandboxDeleteResponse { @@ -62,7 +61,7 @@ export default class DeleteSandbox extends SfCommand { throw messages.createError('error.unknownSandbox', [username]); } - if (flags['no-prompt'] || (await this.confirm(messages.getMessage('prompt.confirm', [username])))) { + if (flags['no-prompt'] || (await this.confirm({ message: messages.getMessage('prompt.confirm', [username]) }))) { try { const org = await Org.create({ aliasOrUsername: username }); await org.delete(); diff --git a/src/commands/org/delete/scratch.ts b/src/commands/org/delete/scratch.ts index 6ed61bd7..323dbb3b 100644 --- a/src/commands/org/delete/scratch.ts +++ b/src/commands/org/delete/scratch.ts @@ -5,13 +5,11 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ - - import { AuthInfo, AuthRemover, Messages, Org } from '@salesforce/core'; import { Flags, SfCommand } from '@salesforce/sf-plugins-core'; import { orgThatMightBeDeleted } from '../../../shared/flags.js'; -Messages.importMessagesDirectoryFromMetaUrl(import.meta.url) +Messages.importMessagesDirectoryFromMetaUrl(import.meta.url); const messages = Messages.loadMessages('@salesforce/plugin-org', 'delete_scratch'); export interface ScratchDeleteResponse { @@ -41,7 +39,10 @@ export default class DeleteScratch extends SfCommand { const resolvedUsername = flags['target-org']; const orgId = (await AuthInfo.create({ username: resolvedUsername })).getFields().orgId as string; - if (flags['no-prompt'] || (await this.confirm(messages.getMessage('prompt.confirm', [resolvedUsername])))) { + if ( + flags['no-prompt'] || + (await this.confirm({ message: messages.getMessage('prompt.confirm', [resolvedUsername]) })) + ) { try { const org = await Org.create({ aliasOrUsername: resolvedUsername }); diff --git a/src/commands/org/list.ts b/src/commands/org/list.ts index cab4bb96..85e6c003 100644 --- a/src/commands/org/list.ts +++ b/src/commands/org/list.ts @@ -5,17 +5,15 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ - - import { Flags, loglevel, SfCommand } from '@salesforce/sf-plugins-core'; import { AuthInfo, ConfigAggregator, ConfigInfo, Connection, Org, SfError, Messages, Logger } from '@salesforce/core'; import { Interfaces } from '@oclif/core'; -import chalk from 'chalk'; +import chalk, { ChalkInstance } from 'chalk'; import { OrgListUtil, identifyActiveOrgByStatus } from '../../shared/orgListUtil.js'; import { getStyledObject } from '../../shared/orgHighlighter.js'; import { ExtendedAuthFields, FullyPopulatedScratchOrgFields } from '../../shared/orgTypes.js'; -Messages.importMessagesDirectoryFromMetaUrl(import.meta.url) +Messages.importMessagesDirectoryFromMetaUrl(import.meta.url); const messages = Messages.loadMessages('@salesforce/plugin-org', 'list'); export const defaultOrgEmoji = '🍁'; @@ -117,7 +115,7 @@ Legend: ${defaultHubEmoji}=Default DevHub, ${defaultOrgEmoji}=Default Org ${ } protected async cleanScratchOrgs(scratchOrgs: ExtendedAuthFields[], prompt?: boolean): Promise { - if (prompt && (await this.confirm(messages.getMessage('prompt', [scratchOrgs.length]))) === false) { + if (prompt && (await this.confirm({ message: messages.getMessage('prompt', [scratchOrgs.length]) })) === false) { return; } @@ -259,7 +257,7 @@ const addType = (val: ExtendedAuthFields): ExtendedAuthFieldsWithType => ({ ...val, type }); const colorEveryFieldButConnectedStatus = - (colorFn: chalk.Chalk) => + (colorFn: ChalkInstance) => (row: ExtendedAuthFieldsWithType): ExtendedAuthFieldsWithType => Object.fromEntries( Object.entries(row).map(([key, val]) => [ diff --git a/src/commands/org/open.ts b/src/commands/org/open.ts index cd2f1aa5..fcc9ce69 100644 --- a/src/commands/org/open.ts +++ b/src/commands/org/open.ts @@ -6,8 +6,6 @@ */ import path from 'node:path'; - - import { Flags, loglevel, @@ -21,7 +19,7 @@ import { MetadataResolver } from '@salesforce/source-deploy-retrieve'; import { apps } from 'open'; import utils from '../../shared/utils.js'; -Messages.importMessagesDirectoryFromMetaUrl(import.meta.url) +Messages.importMessagesDirectoryFromMetaUrl(import.meta.url); const messages = Messages.loadMessages('@salesforce/plugin-org', 'open'); const sharedMessages = Messages.loadMessages('@salesforce/plugin-org', 'messages'); @@ -35,12 +33,12 @@ export class OrgOpenCommand extends SfCommand { public static readonly flags = { 'target-org': requiredOrgFlagWithDeprecations, 'api-version': orgApiVersionFlagWithDeprecations, - browser: Flags.string({ + browser: Flags.option({ char: 'b', summary: messages.getMessage('flags.browser.summary'), - options: ['chrome', 'edge', 'firefox'], // These are ones supported by "open" package + options: ['chrome', 'edge', 'firefox', 'browserPrivate'] as const, // These are ones supported by "open" package exclusive: ['url-only'], - }), + })(), path: Flags.string({ char: 'p', summary: messages.getMessage('flags.path.summary'), @@ -130,12 +128,11 @@ export class OrgOpenCommand extends SfCommand { throw err; } - const openOptions = flags.browser - ? // assertion can be removed once oclif option flag typings are fixed - { app: { name: apps[flags.browser as 'chrome' | 'edge' | 'firefox'] } } - : {}; - - await utils.openUrl(url, openOptions); + await utils.openUrl(url, { + ...(flags.browser ? { app: { name: apps[flags.browser] } } : {}), + // only applies on macOS. open library ignores this property as it is the default behavior on other OS + newInstance: true, + }); return output; } diff --git a/src/shared/orgHighlighter.ts b/src/shared/orgHighlighter.ts index d0c64ed0..bc67153a 100644 --- a/src/shared/orgHighlighter.ts +++ b/src/shared/orgHighlighter.ts @@ -4,10 +4,10 @@ * Licensed under the BSD 3-Clause license. * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -import chalk from 'chalk'; +import chalk, { ChalkInstance } from 'chalk'; import { ExtendedAuthFields, FullyPopulatedScratchOrgFields } from './orgTypes.js'; -const styledProperties = new Map>([ +const styledProperties = new Map>([ [ 'status', new Map([ @@ -31,7 +31,7 @@ export const getStyledValue = (key: string, value: string): string => { if (!prop) return value; // I'm not sure how to type the inner Map so that it knows else is definitely there - const chalkMethod = prop.get(value) ?? (prop.get('else') as chalk.Chalk); + const chalkMethod = prop.get(value) ?? (prop.get('else') as ChalkInstance); return chalkMethod(value); }; diff --git a/src/shared/sandboxProgress.ts b/src/shared/sandboxProgress.ts index 295c3aff..4d71401c 100644 --- a/src/shared/sandboxProgress.ts +++ b/src/shared/sandboxProgress.ts @@ -6,7 +6,7 @@ */ import os from 'node:os'; import { StatusEvent, ResultEvent, SandboxProcessObject } from '@salesforce/core'; -import { Ux } from '@salesforce/sf-plugins-core/lib/ux'; +import { Ux } from '@salesforce/sf-plugins-core'; import { ux } from '@oclif/core'; import { getClockForSeconds } from '../shared/timeUtils.js'; import { StagedProgress } from './stagedProgress.js'; diff --git a/src/shared/stagedProgress.ts b/src/shared/stagedProgress.ts index 33f6828b..7625b4fa 100644 --- a/src/shared/stagedProgress.ts +++ b/src/shared/stagedProgress.ts @@ -5,7 +5,7 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ import os from 'node:os'; -import chalk from 'chalk'; +import chalk, { ChalkInstance } from 'chalk'; import { StandardColors } from '@salesforce/sf-plugins-core'; import { SfError } from '@salesforce/core'; @@ -19,7 +19,7 @@ export type State = 'inProgress' | 'completed' | 'failed' | 'unknown'; export type StageAttributes = { state: State; char: string; - color: chalk.Chalk; + color: ChalkInstance; index: number; visited: boolean; }; diff --git a/test/nut/legacy/create.nut.ts b/test/nut/legacy/create.nut.ts index a33ce7fd..d2e6ce1c 100644 --- a/test/nut/legacy/create.nut.ts +++ b/test/nut/legacy/create.nut.ts @@ -76,7 +76,7 @@ describe('org:create command', () => { describe('validation failures', () => { it('fails with no config/varargs', () => { execCmd('force:org:create --json --noprompt', { - ensureExitCode: 1, + ensureExitCode: 'nonZero', }); }); }); diff --git a/test/nut/scratchCreate.nut.ts b/test/nut/scratchCreate.nut.ts index 262a3bf4..a41c4ff0 100644 --- a/test/nut/scratchCreate.nut.ts +++ b/test/nut/scratchCreate.nut.ts @@ -10,10 +10,9 @@ import path from 'node:path'; import { execCmd, genUniqueString, TestSession } from '@salesforce/cli-plugins-testkit'; import { assert, expect } from 'chai'; import { AuthFields, Messages, Global, StateAggregator } from '@salesforce/core'; -import { secretTimeout } from '../../src/commands/org/create/scratch.js'; import { ScratchCreateResponse } from '../../src/shared/orgTypes.js'; -Messages.importMessagesDirectoryFromMetaUrl(import.meta.url) +Messages.importMessagesDirectoryFromMetaUrl(import.meta.url); const messages = Messages.loadMessages('@salesforce/plugin-org', 'create_scratch'); describe('env create scratch NUTs', () => { let session: TestSession; @@ -57,7 +56,7 @@ describe('env create scratch NUTs', () => { ensureExitCode: 'nonZero', }).shellOutput; expect(error.stdout).to.include(messages.getMessage('prompt.secret')); - expect(error.stderr).to.include(`Timed out after ${secretTimeout} ms.`); + expect(error.stderr).to.include('Prompt timed out.'); }); }); diff --git a/test/unit/force/org/delete.test.ts b/test/unit/force/org/delete.test.ts index c3f3baf4..d5e04c59 100644 --- a/test/unit/force/org/delete.test.ts +++ b/test/unit/force/org/delete.test.ts @@ -5,7 +5,6 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ - import { Messages, Org, SfError } from '@salesforce/core'; import { MockTestOrgData, TestContext } from '@salesforce/core/lib/testSetup.js'; @@ -15,7 +14,7 @@ import { SandboxAccessor } from '@salesforce/core/lib/stateAggregator/accessors/ import { Delete as LegacyDelete } from '../../../../src/commands/force/org/delete.js'; config.truncateThreshold = 0; -Messages.importMessagesDirectoryFromMetaUrl(import.meta.url) +Messages.importMessagesDirectoryFromMetaUrl(import.meta.url); const messages = Messages.loadMessages('@salesforce/plugin-org', 'delete'); describe('[DEPRECATED] force:org:delete', () => { @@ -48,10 +47,10 @@ describe('[DEPRECATED] force:org:delete', () => { it('will prompt before attempting to delete', async () => { await $$.stubConfig({ 'target-org': testOrg.username }); const res = await LegacyDelete.run([]); - expect(prompterStubs.confirm.calledOnce).to.equal(true); - expect(prompterStubs.confirm.firstCall.args[0]).to.equal( - messages.getMessage('confirmDelete', ['scratch', testOrg.username]) - ); + expect(prompterStubs.confirm.callCount).to.equal(1); + expect(prompterStubs.confirm.firstCall.args[0]).to.deep.equal({ + message: messages.getMessage('confirmDelete', ['scratch', testOrg.username]), + }); expect(res).to.deep.equal({ orgId: testOrg.orgId, username: testOrg.username }); }); @@ -59,20 +58,20 @@ describe('[DEPRECATED] force:org:delete', () => { await $$.stubConfig({ 'target-org': 'myAlias' }); $$.stubAliases({ myAlias: testOrg.username }); const res = await LegacyDelete.run([]); - expect(prompterStubs.confirm.calledOnce).to.equal(true); - expect(prompterStubs.confirm.firstCall.args[0]).to.equal( - messages.getMessage('confirmDelete', ['scratch', testOrg.username]) - ); + expect(prompterStubs.confirm.callCount).to.equal(1); + expect(prompterStubs.confirm.firstCall.args[0]).to.deep.equal({ + message: messages.getMessage('confirmDelete', ['scratch', testOrg.username]), + }); expect(res).to.deep.equal({ orgId: testOrg.orgId, username: testOrg.username }); }); it('will determine sandbox vs scratch org and delete sandbox', async () => { $$.SANDBOX.stub(SandboxAccessor.prototype, 'hasFile').resolves(true); const res = await LegacyDelete.run(['--target-org', testOrg.username]); - expect(prompterStubs.confirm.calledOnce).to.equal(true); - expect(prompterStubs.confirm.firstCall.args[0]).to.equal( - messages.getMessage('confirmDelete', ['sandbox', testOrg.username]) - ); + expect(prompterStubs.confirm.callCount).to.equal(1); + expect(prompterStubs.confirm.firstCall.args[0]).to.deep.equal({ + message: messages.getMessage('confirmDelete', ['sandbox', testOrg.username]), + }); expect(res).to.deep.equal({ orgId: testOrg.orgId, username: testOrg.username }); }); diff --git a/test/unit/force/org/scratchOrgCreate.test.ts b/test/unit/force/org/scratchOrgCreate.test.ts index 16316d71..dcd57f8a 100644 --- a/test/unit/force/org/scratchOrgCreate.test.ts +++ b/test/unit/force/org/scratchOrgCreate.test.ts @@ -6,16 +6,15 @@ */ import fs from 'node:fs'; - import { MockTestOrgData, shouldThrow, TestContext } from '@salesforce/core/lib/testSetup.js'; import { SfError, Messages, Org } from '@salesforce/core'; import { stubMethod } from '@salesforce/ts-sinon'; import sinon from 'sinon'; import { expect } from 'chai'; -import { Prompter, stubSfCommandUx } from '@salesforce/sf-plugins-core'; +import { stubPrompter, stubSfCommandUx } from '@salesforce/sf-plugins-core'; import { Create } from '../../../../src/commands/force/org/create.js'; -Messages.importMessagesDirectoryFromMetaUrl(import.meta.url) +Messages.importMessagesDirectoryFromMetaUrl(import.meta.url); const messages = Messages.loadMessages('@salesforce/plugin-org', 'create'); const CREATE_RESULT = { @@ -40,19 +39,19 @@ describe('[DEPRECATED] force:org:create', () => { const $$ = new TestContext(); const testHub = new MockTestOrgData(); testHub.isDevHub = true; + let promptStubs: ReturnType; beforeEach(async () => { await $$.stubAuths(testHub); $$.stubAliases({}); await $$.stubConfig({ defaultdevhubusername: testHub.username }); + promptStubs = stubPrompter($$.SANDBOX); }); const clientSecret = '123456'; // stubs let scratchOrgCreateStub: sinon.SinonStub; - let promptStub: sinon.SinonStub; let sfCommandUxStubs: ReturnType; - const runCreateCommand = (params: string[]) => { // so the `exists` flag on definition file passes $$.SANDBOX.stub(fs, 'existsSync') @@ -127,7 +126,7 @@ describe('[DEPRECATED] force:org:create', () => { const connectedAppConsumerKey = 'abcdef'; const definitionfile = 'myScratchDef.json'; const prodOrg = stubMethod($$.SANDBOX, Org.prototype, 'scratchOrgCreate').resolves(CREATE_RESULT); - promptStub = stubMethod($$.SANDBOX, Prompter.prototype, 'prompt').resolves({ clientSecret }); + promptStubs.secret.resolves(clientSecret); await runCreateCommand([ '--type', @@ -140,7 +139,7 @@ describe('[DEPRECATED] force:org:create', () => { testHub.username, ]); - expect(promptStub.callCount).to.equal(1); + expect(promptStubs.secret.callCount).to.equal(1); expect(prodOrg.firstCall.args[0]).to.deep.equal({ alias: undefined, apiversion: undefined, @@ -159,8 +158,6 @@ describe('[DEPRECATED] force:org:create', () => { tracksSource: true, orgConfig: {}, }); - expect(promptStub.callCount).to.equal(1); - expect(promptStub.callCount).to.equal(1); expect(sfCommandUxStubs.log.firstCall.firstArg).to.equal( 'Successfully created scratch org: 12345, username: sfdx-cli@salesforce.com.' ); diff --git a/test/unit/org/delete.test.ts b/test/unit/org/delete.test.ts index 3bc800ae..c6feeffd 100644 --- a/test/unit/org/delete.test.ts +++ b/test/unit/org/delete.test.ts @@ -5,7 +5,6 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ - import { AuthInfo, Messages, Org, SfError } from '@salesforce/core'; import { MockTestOrgData, TestContext } from '@salesforce/core/lib/testSetup.js'; import { SinonStub } from 'sinon'; @@ -17,7 +16,7 @@ import DeleteScratch from '../../../src/commands/org/delete/scratch.js'; config.truncateThreshold = 0; -Messages.importMessagesDirectoryFromMetaUrl(import.meta.url) +Messages.importMessagesDirectoryFromMetaUrl(import.meta.url); const sbxOrgMessages = Messages.loadMessages('@salesforce/plugin-org', 'delete_sandbox'); const scratchOrgMessages = Messages.loadMessages('@salesforce/plugin-org', 'delete_scratch'); const deleteMessages = Messages.loadMessages('@salesforce/plugin-org', 'delete'); @@ -88,10 +87,10 @@ describe('org delete', () => { $$.SANDBOX.stub(SandboxAccessor.prototype, 'hasFile').resolves(true); await $$.stubConfig({ 'target-org': testOrg.username }); const res = await DeleteSandbox.run([]); - expect(prompterStubs.confirm.calledOnce).to.equal(true); - expect(prompterStubs.confirm.firstCall.args[0]).to.equal( - sbxOrgMessages.getMessage('prompt.confirm', [testOrg.username]) - ); + expect(prompterStubs.confirm.callCount).to.equal(1); + expect(prompterStubs.confirm.firstCall.args[0]).to.deep.equal({ + message: sbxOrgMessages.getMessage('prompt.confirm', [testOrg.username]), + }); expect(res).to.deep.equal({ orgId: testOrg.orgId, username: testOrg.username }); }); @@ -100,17 +99,17 @@ describe('org delete', () => { await $$.stubConfig({ 'target-org': 'myAlias' }); $$.stubAliases({ myAlias: testOrg.username }); const res = await DeleteSandbox.run([]); - expect(prompterStubs.confirm.calledOnce).to.equal(true); - expect(prompterStubs.confirm.firstCall.args[0]).to.equal( - sbxOrgMessages.getMessage('prompt.confirm', [testOrg.username]) - ); + expect(prompterStubs.confirm.callCount).to.equal(1); + expect(prompterStubs.confirm.firstCall.args[0]).to.deep.equal({ + message: sbxOrgMessages.getMessage('prompt.confirm', [testOrg.username]), + }); expect(res).to.deep.equal({ orgId: testOrg.orgId, username: testOrg.username }); }); it('will NOT prompt before deleting sandbox when flag is provided', async () => { $$.SANDBOX.stub(SandboxAccessor.prototype, 'hasFile').resolves(true); const res = await DeleteSandbox.run(['--no-prompt', '--target-org', testOrg.username]); - expect(prompterStubs.confirm.calledOnce).to.equal(false); + expect(prompterStubs.confirm.callCount).to.equal(0); expect(sfCommandUxStubs.logSuccess.callCount).to.equal(1); expect(sfCommandUxStubs.logSuccess.getCalls().flatMap((call) => call.args)).to.deep.include( sbxOrgMessages.getMessage('success', [testOrg.username]) @@ -148,10 +147,10 @@ describe('org delete', () => { it('will prompt before attempting to delete by username', async () => { await $$.stubConfig({ 'target-org': testOrg.username }); const res = await DeleteScratch.run([]); - expect(prompterStubs.confirm.calledOnce).to.equal(true); - expect(prompterStubs.confirm.firstCall.args[0]).to.equal( - scratchOrgMessages.getMessage('prompt.confirm', [testOrg.username]) - ); + expect(prompterStubs.confirm.callCount).to.equal(1); + expect(prompterStubs.confirm.firstCall.args[0]).to.deep.equal({ + message: scratchOrgMessages.getMessage('prompt.confirm', [testOrg.username]), + }); expect(res).to.deep.equal({ orgId: testOrg.orgId, username: testOrg.username }); }); @@ -159,10 +158,10 @@ describe('org delete', () => { await $$.stubConfig({ 'target-org': 'myAlias' }); $$.stubAliases({ myAlias: testOrg.username }); const res = await DeleteScratch.run(['--target-org', 'myAlias']); - expect(prompterStubs.confirm.calledOnce).to.equal(true); - expect(prompterStubs.confirm.firstCall.args[0]).to.equal( - scratchOrgMessages.getMessage('prompt.confirm', [testOrg.username]) - ); + expect(prompterStubs.confirm.callCount).to.equal(1); + expect(prompterStubs.confirm.firstCall.args[0]).to.deep.equal({ + message: scratchOrgMessages.getMessage('prompt.confirm', [testOrg.username]), + }); expect(res).to.deep.equal({ orgId: testOrg.orgId, username: testOrg.username }); }); diff --git a/test/unit/org/open.test.ts b/test/unit/org/open.test.ts index 0f0a71e8..a0d101c3 100644 --- a/test/unit/org/open.test.ts +++ b/test/unit/org/open.test.ts @@ -8,7 +8,6 @@ import fs from 'node:fs'; import { join } from 'node:path'; - import { assert, expect } from 'chai'; import { MyDomainResolver, Messages, Connection, SfError } from '@salesforce/core'; import { Config } from '@oclif/core'; @@ -18,7 +17,7 @@ import { stubSfCommandUx, stubSpinner, stubUx } from '@salesforce/sf-plugins-cor import { OrgOpenCommand, OrgOpenOutput } from '../../../src/commands/org/open.js'; import utils from '../../../src/shared/utils.js'; -Messages.importMessagesDirectoryFromMetaUrl(import.meta.url) +Messages.importMessagesDirectoryFromMetaUrl(import.meta.url); const messages = Messages.loadMessages('@salesforce/plugin-org', 'open'); const sharedMessages = Messages.loadMessages('@salesforce/plugin-org', 'messages'); @@ -267,7 +266,7 @@ describe('org:open', () => { expect(spies.get('resolver').callCount).to.equal(1); expect(spies.get('open').callCount).to.equal(1); - expect(spies.get('open').args[0][1]).to.eql({}); + expect(spies.get('open').args[0][1]).to.deep.equal({ newInstance: true }); }); it('calls open with a browser argument', async () => { diff --git a/yarn.lock b/yarn.lock index 6f17fa5e..d4b1ace5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -445,6 +445,59 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz#e5211452df060fa8522b55c7b3c0c4d1981cb044" integrity sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw== +"@inquirer/confirm@^2.0.15": + version "2.0.15" + resolved "https://registry.yarnpkg.com/@inquirer/confirm/-/confirm-2.0.15.tgz#b5512ed190efd8c5b96e0969115756b48546ab36" + integrity sha512-hj8Q/z7sQXsF0DSpLQZVDhWYGN6KLM/gNjjqGkpKwBzljbQofGjn0ueHADy4HUY+OqDHmXuwk/bY+tZyIuuB0w== + dependencies: + "@inquirer/core" "^5.1.1" + "@inquirer/type" "^1.1.5" + chalk "^4.1.2" + +"@inquirer/core@^5.1.1": + version "5.1.1" + resolved "https://registry.yarnpkg.com/@inquirer/core/-/core-5.1.1.tgz#849d4846aea68371c133df6ec9059f5e5bd30d30" + integrity sha512-IuJyZQUg75+L5AmopgnzxYrgcU6PJKL0hoIs332G1Gv55CnmZrhG6BzNOeZ5sOsTi1YCGOopw4rYICv74ejMFg== + dependencies: + "@inquirer/type" "^1.1.5" + "@types/mute-stream" "^0.0.4" + "@types/node" "^20.9.0" + "@types/wrap-ansi" "^3.0.0" + ansi-escapes "^4.3.2" + chalk "^4.1.2" + cli-spinners "^2.9.1" + cli-width "^4.1.0" + figures "^3.2.0" + mute-stream "^1.0.0" + run-async "^3.0.0" + signal-exit "^4.1.0" + strip-ansi "^6.0.1" + wrap-ansi "^6.2.0" + +"@inquirer/input@^1.2.14": + version "1.2.14" + resolved "https://registry.yarnpkg.com/@inquirer/input/-/input-1.2.14.tgz#8951867618bb5cd16dd096e02404eec225a92207" + integrity sha512-tISLGpUKXixIQue7jypNEShrdzJoLvEvZOJ4QRsw5XTfrIYfoWFqAjMQLerGs9CzR86yAI89JR6snHmKwnNddw== + dependencies: + "@inquirer/core" "^5.1.1" + "@inquirer/type" "^1.1.5" + chalk "^4.1.2" + +"@inquirer/password@^1.1.14": + version "1.1.14" + resolved "https://registry.yarnpkg.com/@inquirer/password/-/password-1.1.14.tgz#c1fc139efe84a38986870a1bcf80718050f82bbf" + integrity sha512-vL2BFxfMo8EvuGuZYlryiyAB3XsgtbxOcFs4H9WI9szAS/VZCAwdVqs8rqEeaAf/GV/eZOghIOYxvD91IsRWSg== + dependencies: + "@inquirer/input" "^1.2.14" + "@inquirer/type" "^1.1.5" + ansi-escapes "^4.3.2" + chalk "^4.1.2" + +"@inquirer/type@^1.1.5": + version "1.1.5" + resolved "https://registry.yarnpkg.com/@inquirer/type/-/type-1.1.5.tgz#b8c171f755859c8159b10e41e1e3a88f0ca99d7f" + integrity sha512-wmwHvHozpPo4IZkkNtbYenem/0wnfI6hvOcGKmPEa0DwuaH5XUQzFqy6OpEpjEegZMhYIk8HDYITI16BPLtrRA== + "@isaacs/cliui@^8.0.2": version "8.0.2" resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" @@ -1036,7 +1089,7 @@ resolved "https://registry.yarnpkg.com/@salesforce/schemas/-/schemas-1.6.1.tgz#7d1c071e1e509ca9d2d8a6e48ac7447dd67a534d" integrity sha512-eVy947ZMxCJReKJdgfddUIsBIbPTa/i8RwQGwxq4/ss38H5sLOAeSTaun9V7HpJ1hkpDznWKfgzYvjsst9K6ig== -"@salesforce/sf-plugins-core@^5.0.3", "@salesforce/sf-plugins-core@^5.0.5": +"@salesforce/sf-plugins-core@^5.0.5": version "5.0.5" resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-5.0.5.tgz#9ab91099fb3e5f8be86c5572d755adcc5913dd25" integrity sha512-IlxDYH8ihznGwPclKyo/teKo4eutuIIzA3hq2d9AuFlGH4N6e7rN3IgTfhp7yV/K7RA70Ub/+dl7etIAO7FmMQ== @@ -1049,6 +1102,19 @@ chalk "^4" inquirer "^8.2.5" +"@salesforce/sf-plugins-core@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-7.0.0.tgz#56cb4eaafcd04a183938d86c5e93323e037b15ab" + integrity sha512-vl53Ee0/eg9wgvtWro6kX82/943s28Hph/o3lTQk6URorfqMC+zH0RGKJj1X0VKeLhDSOCRYXqIu54jE8AZ/3g== + dependencies: + "@inquirer/confirm" "^2.0.15" + "@inquirer/password" "^1.1.14" + "@oclif/core" "^3.16.0" + "@salesforce/core" "^6.4.2" + "@salesforce/kit" "^3.0.15" + "@salesforce/ts-types" "^2.0.9" + chalk "^5.3.0" + "@salesforce/source-deploy-retrieve@^10.2.5": version "10.2.5" resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-10.2.5.tgz#bd2037e28d17ff9bead321acedc63bafb05bd952" @@ -1300,7 +1366,21 @@ resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.6.tgz#818551d39113081048bdddbef96701b4e8bb9d1b" integrity sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg== -"@types/node@*", "@types/node@20.5.1": +"@types/mute-stream@^0.0.4": + version "0.0.4" + resolved "https://registry.yarnpkg.com/@types/mute-stream/-/mute-stream-0.0.4.tgz#77208e56a08767af6c5e1237be8888e2f255c478" + integrity sha512-CPM9nzrCPPJHQNA9keH9CVkVI+WR5kMa+7XEs5jcGQ0VoAGnLv242w8lIVgwAEfmE4oufJRaTc9PNLQl0ioAow== + dependencies: + "@types/node" "*" + +"@types/node@*", "@types/node@^20.9.0": + version "20.10.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.10.6.tgz#a3ec84c22965802bf763da55b2394424f22bfbb5" + integrity sha512-Vac8H+NlRNNlAmDfGUP7b5h/KA+AtWIzuXy0E6OyP8f1tCLYAtPvKRRDJjAPqhpCb0t6U2j7/xqAuLEebW2kiw== + dependencies: + undici-types "~5.26.4" + +"@types/node@20.5.1": version "20.5.1" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.5.1.tgz#178d58ee7e4834152b0e8b4d30cbfab578b9bb30" integrity sha512-4tT2UrL5LBqDwoed9wZ6N3umC4Yhz3W3FloMmiiG4JwmUJWpie0c7lcnUNd4gtMKuDEO4wRVS8B6Xa0uMRsMKg== @@ -1379,6 +1459,11 @@ "@types/expect" "^1.20.4" "@types/node" "*" +"@types/wrap-ansi@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/wrap-ansi/-/wrap-ansi-3.0.0.tgz#18b97a972f94f60a679fd5c796d96421b9abb9fd" + integrity sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g== + "@typescript-eslint/eslint-plugin@^6.10.0": version "6.11.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.11.0.tgz#52aae65174ff526576351f9ccd41cea01001463f" @@ -1900,11 +1985,6 @@ before-after-hook@^2.2.0: resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.3.tgz#c51e809c81a4e354084422b9b26bad88249c517c" integrity sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ== -big-integer@^1.6.44: - version "1.6.51" - resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686" - integrity sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg== - bin-links@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/bin-links/-/bin-links-3.0.3.tgz#3842711ef3db2cd9f16a5f404a996a12db355a6e" @@ -1936,13 +2016,6 @@ bl@^4.1.0: inherits "^2.0.4" readable-stream "^3.4.0" -bplist-parser@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/bplist-parser/-/bplist-parser-0.2.0.tgz#43a9d183e5bf9d545200ceac3e712f79ebbe8d0e" - integrity sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw== - dependencies: - big-integer "^1.6.44" - brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -2032,12 +2105,12 @@ builtins@^5.0.0: dependencies: semver "^7.0.0" -bundle-name@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-3.0.0.tgz#ba59bcc9ac785fb67ccdbf104a2bf60c099f0e1a" - integrity sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw== +bundle-name@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-4.1.0.tgz#f3b96b34160d6431a19d7688135af7cfb8797889" + integrity sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q== dependencies: - run-applescript "^5.0.0" + run-applescript "^7.0.0" cacache@^15.0.3, cacache@^15.0.5, cacache@^15.2.0: version "15.3.0" @@ -2332,10 +2405,10 @@ cli-progress@^3.12.0: dependencies: string-width "^4.2.3" -cli-spinners@^2.5.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.0.tgz#5881d0ad96381e117bbe07ad91f2008fe6ffd8db" - integrity sha512-4/aL9X3Wh0yiMQlE+eeRhWP6vclO3QRtw1JHKIT0FFUs5FjpFmESqtMvYZ0+lbzBw900b95mS0hohy+qn2VK/g== +cli-spinners@^2.5.0, cli-spinners@^2.9.1: + version "2.9.2" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.2.tgz#1773a8f4b9c4d6ac31563df53b3fc1d79462fe41" + integrity sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg== cli-table@^0.3.1: version "0.3.11" @@ -2349,6 +2422,11 @@ cli-width@^3.0.0: resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== +cli-width@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-4.1.0.tgz#42daac41d3c254ef38ad8ac037672130173691c5" + integrity sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ== + cliui@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" @@ -2720,23 +2798,18 @@ deep-is@^0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== -default-browser-id@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/default-browser-id/-/default-browser-id-3.0.0.tgz#bee7bbbef1f4e75d31f98f4d3f1556a14cea790c" - integrity sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA== - dependencies: - bplist-parser "^0.2.0" - untildify "^4.0.0" +default-browser-id@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/default-browser-id/-/default-browser-id-5.0.0.tgz#a1d98bf960c15082d8a3fa69e83150ccccc3af26" + integrity sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA== -default-browser@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/default-browser/-/default-browser-4.0.0.tgz#53c9894f8810bf86696de117a6ce9085a3cbc7da" - integrity sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA== +default-browser@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/default-browser/-/default-browser-5.2.1.tgz#7b7ba61204ff3e425b556869ae6d3e9d9f1712cf" + integrity sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg== dependencies: - bundle-name "^3.0.0" - default-browser-id "^3.0.0" - execa "^7.1.1" - titleize "^3.0.0" + bundle-name "^4.1.0" + default-browser-id "^5.0.0" default-require-extensions@^3.0.0: version "3.0.1" @@ -3355,21 +3428,6 @@ execa@^5.0.0, execa@^5.1.1: signal-exit "^3.0.3" strip-final-newline "^2.0.0" -execa@^7.1.1: - version "7.2.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-7.2.0.tgz#657e75ba984f42a70f38928cedc87d6f2d4fe4e9" - integrity sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.1" - human-signals "^4.3.0" - is-stream "^3.0.0" - merge-stream "^2.0.0" - npm-run-path "^5.1.0" - onetime "^6.0.0" - signal-exit "^3.0.7" - strip-final-newline "^3.0.0" - exponential-backoff@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.1.tgz#64ac7526fe341ab18a39016cd22c787d01e00bf6" @@ -3475,7 +3533,7 @@ faye@^1.4.0: tough-cookie "*" tunnel-agent "*" -figures@^3.0.0: +figures@^3.0.0, figures@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== @@ -3743,7 +3801,7 @@ get-stream@^5.0.0, get-stream@^5.1.0: dependencies: pump "^3.0.0" -get-stream@^6.0.0, get-stream@^6.0.1: +get-stream@^6.0.0: version "6.0.1" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== @@ -4143,11 +4201,6 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== -human-signals@^4.3.0: - version "4.3.1" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-4.3.1.tgz#ab7f811e851fca97ffbd2c1fe9a958964de321b2" - integrity sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ== - humanize-ms@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" @@ -4518,11 +4571,6 @@ is-stream@^2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== -is-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" - integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== - is-string@^1.0.5, is-string@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" @@ -4585,6 +4633,13 @@ is-wsl@^2.1.1, is-wsl@^2.2.0: dependencies: is-docker "^2.0.0" +is-wsl@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-3.1.0.tgz#e1c657e39c10090afcbedec61720f6b924c3cbd2" + integrity sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw== + dependencies: + is-inside-container "^1.0.0" + isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" @@ -5375,11 +5430,6 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== -mimic-fn@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" - integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== - mimic-response@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" @@ -5634,6 +5684,11 @@ mute-stream@0.0.8: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== +mute-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-1.0.0.tgz#e31bd9fe62f0aed23520aa4324ea6671531e013e" + integrity sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA== + nanoid@3.3.3: version "3.3.3" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" @@ -5936,13 +5991,6 @@ npm-run-path@^4.0.0, npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" -npm-run-path@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.1.0.tgz#bc62f7f3f6952d9894bd08944ba011a6ee7b7e00" - integrity sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q== - dependencies: - path-key "^4.0.0" - npmlog@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-5.0.1.tgz#f06678e80e29419ad67ab964e0fa69959c1eb8b0" @@ -6097,12 +6145,15 @@ onetime@^5.1.0, onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -onetime@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-6.0.0.tgz#7c24c18ed1fd2e9bca4bd26806a33613c77d34b4" - integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== +open@^10.0.3: + version "10.0.3" + resolved "https://registry.yarnpkg.com/open/-/open-10.0.3.tgz#f60d8db49fa126c50aec751957fb5d7de3308d4f" + integrity sha512-dtbI5oW7987hwC9qjJTyABldTaa19SuyJse1QboWv3b0qCcrrLNVDqBx1XgELAjh9QTVQaP/C5b1nhQebd1H2A== dependencies: - mimic-fn "^4.0.0" + default-browser "^5.2.1" + define-lazy-prop "^3.0.0" + is-inside-container "^1.0.0" + is-wsl "^3.1.0" open@^7.0.0: version "7.4.2" @@ -6112,16 +6163,6 @@ open@^7.0.0: is-docker "^2.0.0" is-wsl "^2.1.1" -open@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/open/-/open-9.1.0.tgz#684934359c90ad25742f5a26151970ff8c6c80b6" - integrity sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg== - dependencies: - default-browser "^4.0.0" - define-lazy-prop "^3.0.0" - is-inside-container "^1.0.0" - is-wsl "^2.2.0" - optionator@^0.9.3: version "0.9.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" @@ -6402,11 +6443,6 @@ path-key@^3.0.0, path-key@^3.1.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -path-key@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18" - integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== - path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" @@ -6957,18 +6993,21 @@ rimraf@^3.0.0, rimraf@^3.0.2: dependencies: glob "^7.1.3" -run-applescript@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/run-applescript/-/run-applescript-5.0.0.tgz#e11e1c932e055d5c6b40d98374e0268d9b11899c" - integrity sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg== - dependencies: - execa "^5.0.0" +run-applescript@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/run-applescript/-/run-applescript-7.0.0.tgz#e5a553c2bffd620e169d276c1cd8f1b64778fbeb" + integrity sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A== run-async@^2.0.0, run-async@^2.4.0: version "2.4.1" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== +run-async@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-3.0.0.tgz#42a432f6d76c689522058984384df28be379daad" + integrity sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q== + run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -7179,10 +7218,10 @@ signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== -signal-exit@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.0.2.tgz#ff55bb1d9ff2114c13b400688fa544ac63c36967" - integrity sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q== +signal-exit@^4.0.1, signal-exit@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" + integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== sigstore@^1.3.0: version "1.6.0" @@ -7506,11 +7545,6 @@ strip-final-newline@^2.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== -strip-final-newline@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd" - integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== - strip-indent@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" @@ -7617,11 +7651,6 @@ through2@^4.0.0: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== -titleize@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/titleize/-/titleize-3.0.0.tgz#71c12eb7fdd2558aa8a44b0be83b8a76694acd53" - integrity sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ== - tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"