Skip to content

Commit 94a2dc9

Browse files
authored
fix: short options, disable analytics logs (#48)
1 parent 632cb36 commit 94a2dc9

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

src/commands/create-project.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const templates = [
2525
},
2626
];
2727

28-
const templateOption = new Option("-t, --template <name>", "Project template to use").choices(
28+
const templateOption = new Option("--t, --template <name>", "Project template to use").choices(
2929
templates.map((template) => template.value)
3030
);
3131

src/commands/withdraw-finalize.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Option } from "commander";
22
import { prompt } from "inquirer";
33

4-
import { l1RpcUrlOption, l2RpcUrlOption, privateKeyOption, zeekOption } from "../common/options";
4+
import { chainOption, l1RpcUrlOption, l2RpcUrlOption, privateKeyOption, zeekOption } from "../common/options";
55
import { l2Chains } from "../data/chains";
66
import { program } from "../setup";
77
import { track } from "../utils/analytics";
@@ -19,9 +19,6 @@ import zeek from "../utils/zeek";
1919

2020
import type { DefaultTransactionOptions } from "../common/options";
2121

22-
const chainOption = new Option("-c, --chain <chain>", "Chain to use").choices(
23-
l2Chains.filter((e) => e.l1Chain).map((chain) => chain.network)
24-
);
2522
const transactionHashOption = new Option("--hash <transaction_hash>", "L2 withdrawal transaction hash to finalize");
2623

2724
type WithdrawFinalizeOptions = DefaultTransactionOptions & {

src/common/options.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ import { Option } from "commander";
22

33
import { l2Chains } from "../data/chains";
44

5-
export const chainOption = new Option("-c, --chain <chain>", "Chain to use").choices(
5+
export const chainOption = new Option("--c, --chain <chain>", "Chain to use").choices(
66
l2Chains.filter((e) => e.l1Chain).map((chain) => chain.network)
77
);
88
export const l1RpcUrlOption = new Option("--l1-rpc, --l1-rpc-url <URL>", "Override L1 RPC URL");
99
export const l2RpcUrlOption = new Option("--l2-rpc, --l2-rpc-url <URL>", "Override L2 RPC URL");
10-
export const privateKeyOption = new Option("-pk, --private-key <URL>", "Private key of the sender");
10+
export const privateKeyOption = new Option("--pk, --private-key <URL>", "Private key of the sender");
1111
export const amountOptionCreate = (action: string) =>
12-
new Option("--amount <amount>", `Amount of ETH to ${action} (eg. 0.1)`);
12+
new Option("--a, --amount <amount>", `Amount of ETH to ${action} (eg. 0.1)`);
1313
export const recipientOptionCreate = (recipientLocation: string) =>
14-
new Option("--recipient <address>", `Recipient address on ${recipientLocation} (0x address)`);
14+
new Option("--to, --recipient <address>", `Recipient address on ${recipientLocation} (0x address)`);
1515
export const zeekOption = new Option(
1616
"--zeek",
1717
"zeek, the dev cat, will search for an inspirational quote and provide to you at the end of any command"

src/utils/analytics.ts

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ let client: RudderAnalytics | undefined;
1212
try {
1313
client = new RudderAnalytics(process.env.RUDDER_STACK_KEY!, {
1414
dataPlaneUrl: process.env.RUDDER_STACK_DATAPLANE_URL!,
15+
logLevel: "error",
1516
});
1617
} catch {
1718
// ignore

0 commit comments

Comments
 (0)