Skip to content

Commit 6c3b3d8

Browse files
committed
fix: lint fixes
1 parent 9d9d560 commit 6c3b3d8

File tree

19 files changed

+142
-136
lines changed

19 files changed

+142
-136
lines changed

src/adapters/file-upload.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -277,12 +277,12 @@ export default class FileUpload extends BaseClass {
277277
const state = statSync(entryPath);
278278

279279
switch (true) {
280-
case state.isDirectory(): // NOTE folder
281-
zip.addLocalFolder(entryPath, entry);
282-
break;
283-
case state.isFile(): // NOTE check is file
284-
zip.addLocalFile(entryPath);
285-
break;
280+
case state.isDirectory(): // NOTE folder
281+
zip.addLocalFolder(entryPath, entry);
282+
break;
283+
case state.isFile(): // NOTE check is file
284+
zip.addLocalFile(entryPath);
285+
break;
286286
}
287287
}
288288

@@ -350,7 +350,7 @@ export default class FileUpload extends BaseClass {
350350
cliux.loader('Starting file upload...');
351351
try {
352352
await new Promise<void>((resolve, reject) => {
353-
formData.submit(uploadUrl, (error, res) => {
353+
formData.submit(uploadUrl, (error) => {
354354
if (error) {
355355
reject(error);
356356
} else {
@@ -373,7 +373,7 @@ export default class FileUpload extends BaseClass {
373373
private async uploadWithHttpClient(
374374
filePath: PathLike,
375375
uploadUrl: string,
376-
headers: Array<{ key: string; value: string }>,
376+
headers: { key: string; value: string }[],
377377
): Promise<void> {
378378
cliux.loader('Starting file upload...');
379379
const httpClient = new HttpClient();

src/adapters/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import GitHub from './github';
22
import PreCheck from './pre-check';
33
import FileUpload from './file-upload';
4-
import BaseClass from "./base-class";
4+
import BaseClass from './base-class';
55

66
export { GitHub, PreCheck, FileUpload, BaseClass };

src/commands/launch/environments.ts

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ export default class Environments extends BaseCommand<typeof Environments> {
112112
}
113113

114114
/**
115-
* @method validateAndSelectEnvironment - check whether environment is validate or not. If not then option to select environment
115+
* @method validateAndSelectEnvironment
116+
* check whether environment is validate or not.
117+
* If not then option to select environment
116118
*
117119
* @return {*} {Promise<void>}
118120
* @memberof Logs
@@ -126,23 +128,23 @@ export default class Environments extends BaseCommand<typeof Environments> {
126128
process.exit(1);
127129
});
128130

129-
const environmentsData = map(environments, ({ uid, name, frameworkPreset }) => {
130-
return {
131-
uid: chalk.green(uid),
132-
name: chalk.green(name),
133-
frameworkPreset: chalk.green(
134-
find(this.sharedConfig.listOfFrameWorks, {
135-
value: frameworkPreset,
136-
})?.name || '',
137-
),
138-
};
139-
});
140-
const headers = [
141-
{ value: 'uid', },
142-
{ value: 'name',},
143-
{ value: 'frameworkPreset',},
144-
];
145-
ux.table(headers, environmentsData);
131+
const environmentsData = map(environments, ({ uid, name, frameworkPreset }) => {
132+
return {
133+
uid: chalk.green(uid),
134+
name: chalk.green(name),
135+
frameworkPreset: chalk.green(
136+
find(this.sharedConfig.listOfFrameWorks, {
137+
value: frameworkPreset,
138+
})?.name || '',
139+
),
140+
};
141+
});
142+
const headers = [
143+
{ value: 'uid', },
144+
{ value: 'name',},
145+
{ value: 'frameworkPreset',},
146+
];
147+
ux.table(headers, environmentsData);
146148

147149
}
148150
}

src/commands/launch/logs.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ export default class Logs extends BaseCommand<typeof Logs> {
3939
default: 's',
4040
multiple: false,
4141
options: ['d', 's'],
42-
description: 'Type of flags to show logs. By default, these are server logs. Options [d - deployment logs, s - server logs]',
42+
description:
43+
'Type of flags to show logs. By default, these are server logs. Options [d - deployment logs, s - server logs]',
4344
}),
4445
org: Flags.string({
4546
description: '[Optional] Provide the organization UID',
@@ -67,7 +68,7 @@ export default class Logs extends BaseCommand<typeof Logs> {
6768

6869
await this.checkAndSetProjectDetails();
6970

70-
let logPolling = new LogPolling({
71+
const logPolling = new LogPolling({
7172
apolloLogsClient: this.apolloLogsClient,
7273
apolloManageClient: this.apolloClient,
7374
config: this.sharedConfig,
@@ -87,7 +88,8 @@ export default class Logs extends BaseCommand<typeof Logs> {
8788
}
8889

8990
/**
90-
* @method checkAndSetProjectDetails - validate and set project details like organizationUid, uid, environment, deployment
91+
* @method checkAndSetProjectDetails
92+
* validate and set project details like organizationUid, uid, environment, deployment
9193
*
9294
* @return {*} {Promise<void>}
9395
* @memberof Logs
@@ -146,7 +148,9 @@ export default class Logs extends BaseCommand<typeof Logs> {
146148
}
147149

148150
/**
149-
* @method validateAndSelectEnvironment - check whether environment is validate or not. If not then option to select environment
151+
* @method validateAndSelectEnvironment
152+
* check whether environment is validate or not.
153+
* If not then option to select environment
150154
*
151155
* @return {*} {Promise<void>}
152156
* @memberof Logs
@@ -206,7 +210,7 @@ export default class Logs extends BaseCommand<typeof Logs> {
206210
const { message, msgType } = event;
207211
if (msgType === 'info') {
208212
forEach(message, (log: DeploymentLogResp | ServerLogResp) => {
209-
let formattedLogTimestamp = new Date(log.timestamp).toISOString()?.slice(0, 23)?.replace('T', ' ');
213+
const formattedLogTimestamp = new Date(log.timestamp).toISOString()?.slice(0, 23)?.replace('T', ' ');
210214
this.log(`${formattedLogTimestamp}: ${log.message}`, msgType);
211215
});
212216
} else if (msgType === 'error') {
@@ -231,7 +235,7 @@ export default class Logs extends BaseCommand<typeof Logs> {
231235
this.log('Deployment not found!', 'error');
232236
process.exit(1);
233237
} else {
234-
let lastDeploymentDetails = this.sharedConfig.currentConfig.deployments[0];
238+
const lastDeploymentDetails = this.sharedConfig.currentConfig.deployments[0];
235239
if (lastDeploymentDetails?.node?.uid) {
236240
this.sharedConfig.deployment = lastDeploymentDetails.node.uid;
237241
} else {

src/graphql/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export * from "./queries";
2-
export * from "./mutation";
1+
export * from './queries';
2+
export * from './mutation';

src/graphql/mutation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { gql, DocumentNode } from "@apollo/client/core";
1+
import { gql, DocumentNode } from '@apollo/client/core';
22

33
const createDeploymentMutation: DocumentNode = gql`
44
mutation CreateDeployment(

src/graphql/queries.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { gql, DocumentNode } from "@apollo/client/core";
1+
import { gql, DocumentNode } from '@apollo/client/core';
22

33
const userConnectionsQuery: DocumentNode = gql`
44
query UserConnections(

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export {run} from '@oclif/core'
1+
export {run} from '@oclif/core';
22
export { GraphqlApiClient } from './util/index';
33
export { default as Launch } from './commands/launch/index';
44
export { default as config } from './config/index';

src/types/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export * from './utils'
2-
export * from './launch'
1+
export * from './utils';
2+
export * from './launch';

src/types/utils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { Color } from "chalk";
2-
import EventEmitter from "events";
3-
import { ApolloClient } from "@apollo/client/core";
1+
import { Color } from 'chalk';
2+
import EventEmitter from 'events';
3+
import { ApolloClient } from '@apollo/client/core';
44

55
import { ConfigType, ExitFn } from './launch';
66

7-
export type LoggerType = "info" | "warn" | "error" | "debug";
7+
export type LoggerType = 'info' | 'warn' | 'error' | 'debug';
88
export type PrintType = {
99
message: string;
1010
bold?: boolean;

0 commit comments

Comments
 (0)