Skip to content

Commit f86a105

Browse files
committed
chore: update open imports
1 parent a4196b2 commit f86a105

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/commands/org/open.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
import { Connection, Logger, Messages, Org, SfdcUrl, SfError } from '@salesforce/core';
1919
import { Duration, Env } from '@salesforce/kit';
2020
import { MetadataResolver } from '@salesforce/source-deploy-retrieve';
21-
import open from 'open';
21+
import { apps } from 'open';
2222
import utils from '../../shared/utils.js';
2323

2424
Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
@@ -132,7 +132,7 @@ export class OrgOpenCommand extends SfCommand<OrgOpenOutput> {
132132

133133
const openOptions = flags.browser
134134
? // assertion can be removed once oclif option flag typings are fixed
135-
{ app: { name: open.apps[flags.browser as 'chrome' | 'edge' | 'firefox'] } }
135+
{ app: { name: apps[flags.browser as 'chrome' | 'edge' | 'firefox'] } }
136136
: {};
137137

138138
await utils.openUrl(url, openOptions);

src/shared/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import { ChildProcess } from 'node:child_process';
88
import { upperFirst } from '@salesforce/kit';
99
import { StateAggregator } from '@salesforce/core';
10-
import open from 'open';
10+
import open, { Options } from 'open';
1111

1212
export const getAliasByUsername = async (username: string): Promise<string | undefined> => {
1313
const stateAggregator = await StateAggregator.getInstance();
@@ -16,7 +16,7 @@ export const getAliasByUsername = async (username: string): Promise<string | und
1616
return keys?.length ? keys[keys.length - 1] : undefined;
1717
};
1818

19-
export const openUrl = async (url: string, options: open.Options): Promise<ChildProcess> => open(url, options);
19+
export const openUrl = async (url: string, options: Options): Promise<ChildProcess> => open(url, options);
2020

2121
export const lowerToUpper = (object: Record<string, unknown>): Record<string, unknown> =>
2222
// the API has keys defined in capital camel case, while the definition schema has them as lower camel case

0 commit comments

Comments
 (0)