Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
jodyheavener committed Oct 1, 2020
1 parent d1d9255 commit 374f00a
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 40 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"scripts": {
"compile": "webpack --mode development",
"lint": "eslint",
"format": "prettier **/*.ts -c .prettierrc",
"vscode:prepublish": "webpack --mode production",
"watch": "webpack --mode development --watch",
"localize": "node --require ts-node/register scripts/localize.ts"
Expand Down
16 changes: 8 additions & 8 deletions scripts/localize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
// const localesDir = join('..', 'src', 'i18n');

async function run(): Promise<void> {
// await del(['package.nls.*.json']);
// nls.prepareJsonFiles();
// console.log(nls.createXlfFiles('CircleCI', 'circleci'));
// nls.debug();
// nls.createKeyValuePairFile().queue('');
// nls.rewriteLocalizeCalls();
// nls.createAdditionalLanguageFiles(
// await del(['package.nls.*.json']);
// nls.prepareJsonFiles();
// console.log(nls.createXlfFiles('CircleCI', 'circleci'));
// nls.debug();
// nls.createKeyValuePairFile().queue('');
// nls.rewriteLocalizeCalls();
// nls.createAdditionalLanguageFiles(
// [{ folderName: 'en', id: 'en' }],
// 'i18n',
// 'out'
// );
}

run().then(() => {
process.exit(0);
process.exit(0);
});
5 changes: 1 addition & 4 deletions src/views/job-artifacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ export default class JobArtifacts extends ResourcesItem {
(artifact) => new JobArtifact(artifact, this.job, this.tree)
)
);
this.label = this.label = l(
'viewArtifacts',
'View Artifacts'
);
this.label = this.label = l('viewArtifacts', 'View Artifacts');
this.didUpdate();
});
}
Expand Down
5 changes: 1 addition & 4 deletions src/views/job-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ export default class JobTests extends TreeItem {
private fetched = false;

constructor(readonly job: Job, readonly tree: CircleCITree) {
super(
l('lookUpTests', 'Look up Tests →'),
TreeItemCollapsibleState.None
);
super(l('lookUpTests', 'Look up Tests →'), TreeItemCollapsibleState.None);

this.iconPath = getAsset('clipboard');

Expand Down
15 changes: 3 additions & 12 deletions src/views/job.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import { Job as JobData } from 'circle-client';
import { env, TreeItem, TreeItemCollapsibleState, window } from 'vscode';
import CircleCITree from '../lib/circleci-tree';
import {
getAsset,
l,
openInBrowser,
statusDescriptions,
} from '../lib/utils';
import { getAsset, l, openInBrowser, statusDescriptions } from '../lib/utils';
import Workflow from './workflow';
import JobDuration from './job-duration';
import JobArtifacts from './job-artifacts';
Expand Down Expand Up @@ -47,9 +42,7 @@ export default class Job extends TreeItem {
}

private statusDescription(status?: string): string {
return statusDescriptions[
status || l('loadingLabel', 'Loading...')
];
return statusDescriptions[status || l('loadingLabel', 'Loading...')];
}

private statusIcon(status?: string): string {
Expand Down Expand Up @@ -129,9 +122,7 @@ export default class Job extends TreeItem {

cancel(): void {
this.tree.client.cancelJob(this.job.job_number!);
window.showInformationMessage(
l('jobCanceled', 'Job canceled.')
);
window.showInformationMessage(l('jobCanceled', 'Job canceled.'));
// TODO: is 1 second appropriate?
setTimeout(this.reload.bind(this), 1000);
}
Expand Down
6 changes: 1 addition & 5 deletions src/views/resources-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,7 @@ export default class ResourcesItem extends TreeItem {
return Promise.resolve(items);
} catch (error) {
window.showErrorMessage(
l(
'loadItemsFail',
`There was an issue loading`,
this.resourceName
)
l('loadItemsFail', `There was an issue loading`, this.resourceName)
);
console.error(error);
return Promise.resolve([]);
Expand Down
9 changes: 2 additions & 7 deletions src/views/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ export default class Workflow extends ResourcesItem {

cancel(): void {
this.tree.client.cancelWorkflow(this.workflow.id);
window.showInformationMessage(
l('workflowCanceled', 'Workflow canceled.')
);
window.showInformationMessage(l('workflowCanceled', 'Workflow canceled.'));
// TODO: is 1 second appropriate?
setTimeout(this.reload.bind(this), 1000);
}
Expand All @@ -71,10 +69,7 @@ export default class Workflow extends ResourcesItem {
window.showInformationMessage(
fromFailed
? l('retryingJobs', 'Retrying Workflow Jobs')
: l(
'retryingFailedJobs',
'Retrying failed Workflow Jobs'
)
: l('retryingFailedJobs', 'Retrying failed Workflow Jobs')
);
// Retry adds *new* jobs, so reload the whole pipeline
// TODO: is 1 second appropriate?
Expand Down

0 comments on commit 374f00a

Please sign in to comment.