Skip to content

Commit 9951ea8

Browse files
committed
chore: unrelated biome work
1 parent 41eb330 commit 9951ea8

File tree

9 files changed

+48
-17
lines changed

9 files changed

+48
-17
lines changed

biome.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
{
22
"formatter": {
3-
"ignore": [
4-
"website/**",
5-
"dist/**",
6-
"test/__setup__/input-schemas/*.json",
7-
"package.json"
3+
"includes": [
4+
"**",
5+
"!**/website/**",
6+
"!**/dist/**",
7+
"!**/test/__setup__/input-schemas/**/*.json",
8+
"!**/test/tmp/**",
9+
"!**/package.json"
810
],
911
"formatWithErrors": true
1012
},

features/test-implementations/0.world.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,12 @@ export async function executeCommand({
6868
stdin,
6969
cwd = TestTmpRoot,
7070
env,
71-
}: { rawCommand: string; stdin?: string; cwd?: string | URL; env?: Record<string, string> }) {
71+
}: {
72+
rawCommand: string;
73+
stdin?: string;
74+
cwd?: string | URL;
75+
env?: Record<string, string>;
76+
}) {
7277
// Step 0: ensure the command is executable -> strip out $, trim spaces
7378
const commandToRun = rawCommand.split('\n').map((str) => str.replace(/^\$/, '').trim());
7479

src/commands/run.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,10 +407,7 @@ export class RunCommand extends ApifyCommand<typeof RunCommand> {
407407
* Ensures the input that the actor will be ran with locally matches the input schema (and prefills default values if missing)
408408
* @param inputOverride Optional input received through command flags
409409
*/
410-
private async validateAndStoreInput(inputOverride?: {
411-
input: Record<string, unknown>;
412-
source: string;
413-
}) {
410+
private async validateAndStoreInput(inputOverride?: { input: Record<string, unknown>; source: string }) {
414411
const { inputSchema } = await readInputSchema({ cwd: process.cwd() });
415412

416413
if (!inputSchema) {

src/lib/command-framework/help/_BaseCommandRenderer.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ export abstract class BaseCommandRenderer {
5656
state,
5757
itemToAdd,
5858
indentSize,
59-
}: { state: string[]; itemToAdd: string; indentSize: number }) {
59+
}: {
60+
state: string[];
61+
itemToAdd: string;
62+
indentSize: number;
63+
}) {
6064
// Check the _last line_ of the state, not the whole string, as otherwise we get false positives
6165
const currentLength = width(state.join(' ').split('\n').at(-1) || '') + indentSize;
6266

src/lib/commands/pretty-print-bytes.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ export function prettyPrintBytes({
55
shortBytes = false,
66
colorFunc = noColor,
77
precision = 2,
8-
}: { bytes: number; shortBytes?: boolean; colorFunc?: (val: string) => string; precision?: number }): string {
8+
}: {
9+
bytes: number;
10+
shortBytes?: boolean;
11+
colorFunc?: (val: string) => string;
12+
precision?: number;
13+
}): string {
914
const sizes = [shortBytes ? 'B' : 'Bytes', 'KB', 'MB', 'GB', 'TB'];
1015

1116
if (bytes === 0) {

src/lib/commands/resolve-actor-context.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ import { getLocalConfig, getLocalUserInfo } from '../utils.js';
1313
export async function resolveActorContext({
1414
providedActorNameOrId,
1515
client,
16-
}: { providedActorNameOrId: string | undefined; client: ApifyClient }) {
16+
}: {
17+
providedActorNameOrId: string | undefined;
18+
client: ApifyClient;
19+
}) {
1720
const userInfo = await getLocalUserInfo();
1821
const usernameOrId = userInfo.username || (userInfo.id as string);
1922
const localConfig = getLocalConfig(process.cwd()) || {};

src/lib/hooks/useCwdProject.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ export const cwdCache = new Map<string, CwdProject>();
4848

4949
export async function useCwdProject({
5050
cwd = process.cwd(),
51-
}: { cwd?: string } = {}): Promise<Result<CwdProject, CwdProjectError>> {
51+
}: {
52+
cwd?: string;
53+
} = {}): Promise<Result<CwdProject, CwdProjectError>> {
5254
const cached = cwdCache.get(cwd);
5355

5456
if (cached) {

src/lib/telemetry.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ export const isTelemetryEnabled =
6363
export const maybeTrackTelemetry = async ({
6464
eventName,
6565
eventData,
66-
}: { eventName: string; eventData: Record<string, unknown> }) => {
66+
}: {
67+
eventName: string;
68+
eventData: Record<string, unknown>;
69+
}) => {
6770
if (!isTelemetryEnabled) return;
6871

6972
try {

src/lib/utils/confirm.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ const inputValidation = ({
1313
expectedValue,
1414
failureMessage = 'That is not the correct input!',
1515
message = `Are you sure you want to delete this ${type}? If so, please type in "${expectedValue}":`,
16-
}: { type: string; expectedValue: string; failureMessage?: string; message?: string }) =>
16+
}: {
17+
type: string;
18+
expectedValue: string;
19+
failureMessage?: string;
20+
message?: string;
21+
}) =>
1722
({
1823
name: 'confirmed',
1924
type: 'input',
@@ -32,7 +37,12 @@ export async function confirmAction({
3237
type,
3338
failureMessage,
3439
message,
35-
}: { type: string; expectedValue?: string; failureMessage?: string; message?: string }): Promise<boolean> {
40+
}: {
41+
type: string;
42+
expectedValue?: string;
43+
failureMessage?: string;
44+
message?: string;
45+
}): Promise<boolean> {
3646
const result = await inquirer.prompt<{ confirmed: boolean | string }>(
3747
expectedValue
3848
? inputValidation({ type, expectedValue, failureMessage, message })

0 commit comments

Comments
 (0)