Skip to content

Commit

Permalink
chore: cleanups and lint fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Gammon <[email protected]>
  • Loading branch information
sgammon committed Dec 1, 2023
1 parent c24d156 commit bc98655
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ node_modules/
coverage/
__tests__/
.dev/
src/gen/

2 changes: 1 addition & 1 deletion .github/linters/.eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ rules:
'@typescript-eslint/func-call-spacing': ['error', 'never'],
'@typescript-eslint/no-array-constructor': 'error',
'@typescript-eslint/no-empty-interface': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-extraneous-class': 'error',
'@typescript-eslint/no-for-in-array': 'error',
'@typescript-eslint/no-inferrable-types': 'error',
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@
"build": "pnpm run bundle",
"bundle": "pnpm run format:write && pnpm run package",
"ci-test": "jest",
"gen": "buf generate --include-imports",
"coverage": "make-coverage-badge --output-path ./badges/coverage.svg",
"format:write": "prettier --write **/*.ts",
"format:check": "prettier --check **/*.ts",
"lint": "npx eslint . -c ./.github/linters/.eslintrc.yml",
"package": "pnpm run package:main && pnpm run package:cleanup",
"package": "pnpm run gen && pnpm run package:main && pnpm run package:cleanup",
"package:main": "ncc build src/index.ts --license licenses.txt",
"package:cleanup": "ncc build src/cleanup.ts -o dist/cleanup",
"package:watch": "pnpm run package -- --watch",
Expand Down
3 changes: 1 addition & 2 deletions src/agent.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import * as core from '@actions/core'
import path from 'path'
import fs from 'fs'
import { OS } from './config'
import { agentStart, agentStop, agentStatus, agentInstall } from './command'
Expand Down Expand Up @@ -60,6 +58,7 @@ async function resolveAgentConfig(os: OS): Promise<AgentConfig | null> {
*/
export async function agentConfig(os: OS): Promise<AgentConfig | null> {
if (activeAgent === null && !queriedForAgent) {
queriedForAgent = true
activeAgent = await resolveAgentConfig(os)
}
return activeAgent
Expand Down
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ export async function install(options?: Partial<Options>): Promise<void> {
* @returns {Promise<void>} Resolves when the action is complete.
*/
export async function postExecute(options?: Partial<Options>): Promise<void> {
core.info('Cleaning up Buildless Agent and resources...')
const opts = JSON.stringify(options || {})
core.info(`Cleaning up Buildless Agent and resources... (options: ${opts})`)
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/releases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Octokit } from 'octokit'
import * as toolCache from '@actions/tool-cache'
import * as github from '@actions/github'
import type { BuildlessSetupActionOptions as Options } from './options'
import { GITHUB_DEFAULT_HEADERS, OS, Arch } from './config'
import { GITHUB_DEFAULT_HEADERS, OS } from './config'
import { obtainVersion } from './command'

const downloadBase = 'https://dl.less.build'
Expand Down
12 changes: 7 additions & 5 deletions src/transport.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { Transport, createPromiseClient } from '@connectrpc/connect'
import { createConnectTransport } from '@connectrpc/connect-node'
import { createGrpcTransport } from '@connectrpc/connect-node'
import { Transport } from '@connectrpc/connect'
import {
createConnectTransport,
createGrpcTransport
} from '@connectrpc/connect-node'
import { Empty } from '@bufbuild/protobuf'

import { ClientConfig } from '@api/buildless/service/v1/buildless-v1_connect'
import { AuthorizeRequest } from '@api/buildless/service/v1/buildless-v1_pb'
import { ClientConfig } from './gen/buildless/service/v1/buildless-v1_connect'

Check failure on line 8 in src/transport.ts

View workflow job for this annotation

GitHub Actions / Test: Unit Tests

Unable to resolve path to module './gen/buildless/service/v1/buildless-v1_connect'
import { AuthorizeRequest } from './gen/buildless/service/v1/buildless-v1_pb'

Check failure on line 9 in src/transport.ts

View workflow job for this annotation

GitHub Actions / Test: Unit Tests

Unable to resolve path to module './gen/buildless/service/v1/buildless-v1_pb'

import {
RpcTransport,
Expand Down

0 comments on commit bc98655

Please sign in to comment.