Skip to content

Commit 9b0adb7

Browse files
committed
wip
1 parent d830e86 commit 9b0adb7

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

src/checkVersion.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import boxen from "boxen";
22
import chalk from "chalk";
3-
import { version } from "../package.json";
3+
import pkg from "../package.json" with { type: "json" };
44
import semver from "semver";
55

66
async function checkProductionCLIVersion() {
@@ -21,6 +21,7 @@ async function checkProductionCLIVersion() {
2121
}
2222

2323
export async function checkVersion() {
24+
const version = pkg.version;
2425
const latestVersion = await checkProductionCLIVersion();
2526
if (latestVersion && version !== latestVersion) {
2627
const isOutdated = semver.lt(version, latestVersion);

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bun
22

33
import { Command } from "commander";
4-
import { version } from "../package.json" with { type: "json" };
4+
import pkg from "../package.json" with { type: "json" };
55
import { registerBalance } from "./lib/balance.ts";
66
import { registerBuy } from "./lib/buy/index.tsx";
77
import { registerContracts } from "./lib/contracts/index.tsx";
@@ -23,7 +23,7 @@ await checkVersion();
2323
program
2424
.name("sf")
2525
.description("The San Francisco Compute command line tool.")
26-
.version(version);
26+
.version(pkg.version);
2727

2828
// commands
2929
registerLogin(program);
@@ -42,4 +42,4 @@ registerDown(program);
4242
// (development commands)
4343
registerDev(program);
4444

45-
program.parse(Bun.argv);
45+
program.parse(process.argv);

src/lib/buy/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import TextInput from "ink-text-input";
1818
import { useCallback, useEffect, useState } from "react";
1919
import { Text } from "ink";
2020
import ConfirmInput from "../ConfirmInput.tsx";
21+
import React from 'react'
2122

2223
dayjs.extend(relativeTime);
2324
dayjs.extend(duration);

src/lib/dev.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { confirm } from "@inquirer/prompts";
22
import chalk from "chalk";
33
import type { Command } from "commander";
44
import dayjs from "npm:[email protected]";
5-
import utc from "npm:[email protected]/plugin/utc";
5+
import utc from "npm:[email protected]/plugin/utc.js";
66
import {
77
deleteConfig,
88
getConfigPath,
@@ -120,9 +120,9 @@ function registerEpoch(program: Command) {
120120
timestamps.forEach((epochTimestamp, i) => {
121121
const date = epochToDate(Number.parseInt(epochTimestamp));
122122
console.log(
123-
`${colorDiffedEpochs[i]} | ${
124-
chalk.yellow(dayjs(date).format("hh:mm A MM-DD-YYYY"))
125-
} Local`,
123+
`${colorDiffedEpochs[i]} | ${chalk.yellow(
124+
dayjs(date).format("hh:mm A MM-DD-YYYY"),
125+
)} Local`,
126126
);
127127
});
128128
}

0 commit comments

Comments
 (0)