Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into daphne/core-v6-v7
Browse files Browse the repository at this point in the history
  • Loading branch information
daphne-sfdc committed Apr 26, 2024
2 parents 45c561a + 653c694 commit a6515e0
Show file tree
Hide file tree
Showing 79 changed files with 412 additions and 437 deletions.
16 changes: 9 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions packages/salesforcedx-utils-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"main": "out/src",
"dependencies": {
"@salesforce/core": "7.3.1",
"@salesforce/source-deploy-retrieve": "11.1.2",
"@salesforce/source-tracking": "6.0.4",
"@salesforce/source-deploy-retrieve": "/Users/daphne.yang/Development/source-deploy-retrieve",
"@salesforce/source-tracking": "/Users/daphne.yang/Development/source-tracking/salesforce-source-tracking-v6.0.4.tgz",
"applicationinsights": "1.0.7",
"cross-spawn": "7.0.3",
"rxjs": "^5.4.1",
Expand Down Expand Up @@ -53,4 +53,4 @@
"test:unit": "jest --coverage",
"coverage": "jest --coverage"
}
}
}
2 changes: 1 addition & 1 deletion packages/salesforcedx-vscode-apex-debugger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"dependencies": {
"applicationinsights": "1.0.7",
"@salesforce/core": "7.3.1",
"@salesforce/source-tracking": "6.0.4"
"@salesforce/source-tracking": "/Users/daphne.yang/Development/source-tracking/salesforce-source-tracking-v6.0.4.tgz"
},
"devDependencies": {}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
"packageUpdates": {
"dependencies": {
"@salesforce/core": "7.3.1",
"@salesforce/source-tracking": "6.0.4",
"@salesforce/source-tracking": "/Users/daphne.yang/Development/source-tracking/salesforce-source-tracking-v6.0.4.tgz",
"applicationinsights": "1.0.7"
},
"devDependencies": {},
Expand Down
Binary file modified packages/salesforcedx-vscode-apex/out/apex-jorje-lsp.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/salesforcedx-vscode-apex/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@
"dependencies": {
"@salesforce/apex-tmlanguage": "1.4.0",
"@salesforce/core": "7.3.1",
"@salesforce/source-tracking": "6.0.4",
"@salesforce/source-tracking": "/Users/daphne.yang/Development/source-tracking/salesforce-source-tracking-v6.0.4.tgz",
"@salesforce/templates": "^60.1.2",
"applicationinsights": "1.0.7",
"shelljs": "0.8.5"
Expand Down
1 change: 1 addition & 0 deletions packages/salesforcedx-vscode-core/fix-these-rules.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"rules": {
"prefer-arrow/prefer-arrow-functions": ["error", {}],
"@typescript-eslint/await-thenable": "warn",
"@typescript-eslint/no-floating-promises": "warn",
"@typescript-eslint/no-misused-promises": "warn",
Expand Down
6 changes: 3 additions & 3 deletions packages/salesforcedx-vscode-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@salesforce/salesforcedx-sobjects-faux-generator": "60.10.0",
"@salesforce/salesforcedx-utils-vscode": "60.10.0",
"@salesforce/schemas": "^1.6.1",
"@salesforce/source-deploy-retrieve": "11.1.2",
"@salesforce/source-deploy-retrieve": "/Users/daphne.yang/Development/source-deploy-retrieve/salesforce-source-deploy-retrieve-v11.1.2.tgz",
"@salesforce/templates": "^60.1.2",
"@salesforce/ts-types": "2.0.9",
"@salesforce/vscode-service-provider": "1.0.4",
Expand Down Expand Up @@ -98,9 +98,9 @@
"dependencies": {
"applicationinsights": "1.0.7",
"@salesforce/core": "7.3.1",
"@salesforce/source-tracking": "6.0.4",
"@salesforce/source-tracking": "/Users/daphne.yang/Development/source-tracking/salesforce-source-tracking-v6.0.4.tgz",
"@salesforce/templates": "^60.1.2",
"@salesforce/source-deploy-retrieve": "11.1.2",
"@salesforce/source-deploy-retrieve": "/Users/daphne.yang/Development/source-deploy-retrieve/salesforce-source-deploy-retrieve-v11.1.2.tgz",
"shelljs": "0.8.5"
},
"devDependencies": {}
Expand Down
4 changes: 2 additions & 2 deletions packages/salesforcedx-vscode-core/src/commands/aliasList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ const commandlet = new SfCommandlet(
executor
);

export async function aliasList() {
export const aliasList = async (): Promise<void> => {
await commandlet.run();
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export type AccessTokenParams = {
accessToken: string;
};

async function inputInstanceUrl() {
const inputInstanceUrl = async (): Promise<string | undefined> => {
const instanceUrlInputOptions = {
prompt: nls.localize('parameter_gatherer_enter_instance_url'),
placeHolder: INSTANCE_URL_PLACEHOLDER,
Expand All @@ -40,19 +40,19 @@ async function inputInstanceUrl() {
};
const instanceUrl = await vscode.window.showInputBox(instanceUrlInputOptions);
return instanceUrl;
}
};

async function inputAlias() {
const inputAlias = async (): Promise<string | undefined> => {
const aliasInputOptions = {
prompt: nls.localize('parameter_gatherer_enter_alias_name'),
placeHolder: DEFAULT_ALIAS,
ignoreFocusOut: true
} as vscode.InputBoxOptions;
const alias = await vscode.window.showInputBox(aliasInputOptions);
return alias;
}
};

async function inputAccessToken() {
const inputAccessToken = async (): Promise<string | undefined> => {
const accessToken = await vscode.window.showInputBox({
value: '',
prompt: nls.localize('parameter_gatherer_enter_session_id'),
Expand All @@ -70,7 +70,7 @@ async function inputAccessToken() {
}
});
return accessToken;
}
};

export class OrgTypeItem implements vscode.QuickPickItem {
public label: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ export class OrgLoginAccessTokenExecutor extends LibraryCommandletExecutor<Acces
const workspaceChecker = new SfWorkspaceChecker();
const parameterGatherer = new AccessTokenParamsGatherer();

export async function orgLoginAccessToken() {
export const orgLoginAccessToken = async () => {
const commandlet = new SfCommandlet(
workspaceChecker,
parameterGatherer,
new OrgLoginAccessTokenExecutor()
);
await commandlet.run();
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export abstract class AuthDemoModeExecutor<T> extends SfCommandletExecutor<T> {
);

channelService.streamCommandOutput(execution);
ProgressNotification.show(execution, cancellationTokenSource);
void ProgressNotification.show(execution, cancellationTokenSource);
taskViewService.addCommandExecution(execution, cancellationTokenSource);

try {
Expand Down Expand Up @@ -219,18 +219,18 @@ export class OrgLoginWebDemoModeExecutor extends AuthDemoModeExecutor<AuthParams
}
}

export async function promptLogOutForProdOrg() {
export const promptLogOutForProdOrg = async () => {
await new SfCommandlet(
new SfWorkspaceChecker(),
new DemoModePromptGatherer(),
OrgLogoutAll.withoutShowingChannel()
).run();
}
};

const workspaceChecker = new SfWorkspaceChecker();
const parameterGatherer = new AuthParamsGatherer();

export function createOrgLoginWebExecutor(): SfCommandletExecutor<{}> {
export const createOrgLoginWebExecutor = (): SfCommandletExecutor<{}> => {
switch (true) {
case isSFContainerMode():
return new OrgLoginWebContainerExecutor();
Expand All @@ -239,13 +239,13 @@ export function createOrgLoginWebExecutor(): SfCommandletExecutor<{}> {
default:
return new OrgLoginWebExecutor();
}
}
};

export async function orgLoginWeb() {
export const orgLoginWeb = async (): Promise<void> => {
const commandlet = new SfCommandlet(
workspaceChecker,
parameterGatherer,
createOrgLoginWebExecutor()
);
await commandlet.run();
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export type AuthDevHubParams = {
const workspaceChecker = new SfWorkspaceChecker();
const parameterGatherer = new AuthDevHubParamsGatherer();

export function createAuthDevHubExecutor(): SfCommandletExecutor<{}> {
export const createAuthDevHubExecutor = (): SfCommandletExecutor<{}> => {
switch (true) {
case isSFContainerMode():
return new OrgLoginWebDevHubContainerExecutor();
Expand All @@ -118,13 +118,13 @@ export function createAuthDevHubExecutor(): SfCommandletExecutor<{}> {
default:
return new OrgLoginWebDevHubExecutor();
}
}
};

export async function orgLoginWebDevHub() {
export const orgLoginWebDevHub = async () => {
const commandlet = new SfCommandlet(
workspaceChecker,
parameterGatherer,
createAuthDevHubExecutor()
);
await commandlet.run();
}
};
22 changes: 11 additions & 11 deletions packages/salesforcedx-vscode-core/src/commands/auth/orgLogout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ const commandlet = new SfCommandlet(
executor
);

export async function orgLogoutAll() {
export const orgLogoutAll = async () => {
await commandlet.run();
}
};

export class OrgLogoutDefault extends LibraryCommandletExecutor<string> {
constructor() {
Expand Down Expand Up @@ -89,11 +89,11 @@ export class OrgLogoutDefault extends LibraryCommandletExecutor<string> {
}
}

export async function orgLogoutDefault() {
export const orgLogoutDefault = async () => {
const { username, isScratch, alias, error } = await resolveTargetOrg();
if (error) {
telemetryService.sendException(error.name, error.message);
notificationService.showErrorMessage('Logout failed to run');
void notificationService.showErrorMessage('Logout failed to run');
} else if (username) {
// confirm logout for scratch orgs due to special considerations:
// https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_logout.htm
Expand All @@ -106,24 +106,24 @@ export async function orgLogoutDefault() {
);
await logoutCommandlet.run();
} else {
notificationService.showInformationMessage(
void notificationService.showInformationMessage(
nls.localize('org_logout_no_default_org')
);
}
}
};

async function removeUsername(username: string) {
const removeUsername = async (username: string) => {
await ConfigUtil.unsetTargetOrg();
const authRemover = await AuthRemover.create();
await authRemover.removeAuth(username);
}
};

async function resolveTargetOrg(): Promise<{
const resolveTargetOrg = async (): Promise<{
username?: string;
isScratch: boolean;
alias?: string;
error?: Error;
}> {
}> => {
const usernameOrAlias = await OrgAuthInfo.getTargetOrgOrAlias(false);
if (usernameOrAlias) {
const username = await OrgAuthInfo.getUsername(usernameOrAlias);
Expand All @@ -138,4 +138,4 @@ async function resolveTargetOrg(): Promise<{
return { username, isScratch, alias };
}
return { isScratch: false };
}
};
4 changes: 2 additions & 2 deletions packages/salesforcedx-vscode-core/src/commands/configList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ const commandlet = new SfCommandlet(
executor
);

export async function configList() {
export const configList = async (): Promise<void> => {
await commandlet.run();
}
};
4 changes: 2 additions & 2 deletions packages/salesforcedx-vscode-core/src/commands/configSet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ export class ConfigSetExecutor extends LibraryCommandletExecutor<{}> {
const workspaceChecker = new SfWorkspaceChecker();
const parameterGatherer = new EmptyParametersGatherer();

export async function configSet(usernameOrAlias: string) {
export const configSet = async (usernameOrAlias: string): Promise<void> => {
const commandlet = new SfCommandlet(
workspaceChecker,
parameterGatherer,
new ConfigSetExecutor(usernameOrAlias)
);
await commandlet.run();
}
};
6 changes: 3 additions & 3 deletions packages/salesforcedx-vscode-core/src/commands/dataQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ export enum ApiType {
const workspaceChecker = new SfWorkspaceChecker();

// eslint-disable-next-line @typescript-eslint/no-unused-vars
export async function dataQuery(explorerDir?: any) {
export const dataQuery = (explorerDir?: any): void => {
const parameterGatherer = new GetQueryAndApiInputs();
const commandlet = new SfCommandlet(
workspaceChecker,
parameterGatherer,
new DataQueryExecutor()
);
await commandlet.run();
}
void commandlet.run();
};

0 comments on commit a6515e0

Please sign in to comment.