Skip to content

Commit

Permalink
chore: Fixed lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rajdip-b committed Nov 5, 2024
1 parent ac25d3f commit 835397a
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 22 deletions.
4 changes: 3 additions & 1 deletion apps/cli/src/commands/environment/update.environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ export class UpdateEnvironment extends BaseCommand {
`Environment Slug: ${environment.slug}, Name: ${environment.name}, Description: ${environment.description}`
)
} else {
Logger.error(`Error updating Environment: ${error}`)
Logger.error(
`Error updating Environment: ${error.message} (${error.statusCode})`
)
}
}
}
4 changes: 2 additions & 2 deletions apps/cli/src/commands/run.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export default class RunCommand extends BaseCommand {
)

if (!secretsResponse.success) {
throw new Error(secretsResponse.error.message as string)
throw new Error(secretsResponse.error.message)

Check failure on line 202 in apps/cli/src/commands/run.command.ts

View workflow job for this annotation

GitHub Actions / release

Unsafe argument of type `any` assigned to a parameter of type `string`

Check failure on line 202 in apps/cli/src/commands/run.command.ts

View workflow job for this annotation

GitHub Actions / release

Unsafe argument of type `any` assigned to a parameter of type `string`
}

const variablesResponse =
Expand All @@ -214,7 +214,7 @@ export default class RunCommand extends BaseCommand {
)

if (!variablesResponse.success) {
throw new Error(variablesResponse.error.message as string)
throw new Error(variablesResponse.error.message)

Check failure on line 217 in apps/cli/src/commands/run.command.ts

View workflow job for this annotation

GitHub Actions / release

Unsafe argument of type `any` assigned to a parameter of type `string`

Check failure on line 217 in apps/cli/src/commands/run.command.ts

View workflow job for this annotation

GitHub Actions / release

Unsafe argument of type `any` assigned to a parameter of type `string`
}

// Merge secrets and variables
Expand Down
8 changes: 6 additions & 2 deletions apps/cli/src/commands/variable/create.variable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ export default class CreateVariable extends BaseCommand {
getName(): string {
return 'create'
}

getDescription(): string {
return 'Create a variable'
}

getArguments(): CommandArgument[] {
return [
{
Expand Down Expand Up @@ -99,9 +101,11 @@ export default class CreateVariable extends BaseCommand {
}

const parsedEntries = entries.map((entry) => {
const [environmentSlug, value] = entry.split('=').map(s => s.trim())
const [environmentSlug, value] = entry.split('=').map((s) => s.trim())
if (!environmentSlug || !value) {
throw new Error(`Invalid entry format: ${entry}. Expected format: "environmentSlug=value"`)
throw new Error(
`Invalid entry format: ${entry}. Expected format: "environmentSlug=value"`
)
}
return { environmentSlug, value }
})
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/hero/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import Image from 'next/image'
import { useState } from 'react'
import { Toaster, toast } from 'sonner'
import { ColorBGSVG, HeroImage } from '@public/hero'
import { z } from 'zod'
import { ColorBGSVG, HeroImage } from '@public/hero'
import EncryptButton from '../ui/encrypt-btn'
import { InputBorderSpotlight } from '../ui/input-spotlight'

Expand Down
1 change: 0 additions & 1 deletion packages/api-client/src/types/user.types.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { PageRequest, PageResponse } from '@api-client/index'
import { Workspace } from '@api-client/types/workspace.types'

export interface GetSelfResponse {
Expand Down
2 changes: 1 addition & 1 deletion packages/api-client/tests/secret.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ describe('Secret Controller Tests', () => {

it('should be able to fetch revisions of a secret', async () => {
const revisions = await secretController.getRevisionsOfSecret(
{ secretSlug, environmentSlug},
{ secretSlug, environmentSlug },
{ 'x-e2e-user-email': email }
)
expect(revisions.data.items.length).toBe(1)
Expand Down
23 changes: 9 additions & 14 deletions packages/api-client/tests/user.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ describe('User Controller Tests', () => {
const email = '[email protected]'
let projectSlug: string | null
let workspaceSlug: string | null
let environmentSlug: string | null

beforeAll(async () => {
//Create the user's workspace
Expand Down Expand Up @@ -44,19 +43,15 @@ describe('User Controller Tests', () => {

projectSlug = projectResponse.slug

const createEnvironmentResponse = (await (
await client.post(
`/api/environment/${projectSlug}`,
{
name: 'Dev'
},
{
'x-e2e-user-email': email
}
)
).json()) as any

environmentSlug = createEnvironmentResponse.slug
await client.post(
`/api/environment/${projectSlug}`,
{
name: 'Dev'
},
{
'x-e2e-user-email': email
}
)
})

afterAll(async () => {
Expand Down

0 comments on commit 835397a

Please sign in to comment.