-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b5d1d5f
commit 9db7c57
Showing
9 changed files
with
48 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,4 @@ jobs: | |
run: deno fmt --check | ||
|
||
- name: Run deno lint | ||
run: deno lint --unstable | ||
run: deno lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Publish | ||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Deno | ||
uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: v1.x | ||
|
||
- name: Publish package | ||
run: deno publish |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "@denosaurs/tty", | ||
"version": "0.2.0", | ||
"exports": { | ||
".": "./mod.ts" | ||
}, | ||
"tasks": { | ||
"update": "deno run --allow-net --allow-write update.ts" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
export async function isInteractiveAsync( | ||
stream: { rid: number }, | ||
stream: { isTerminal(): boolean }, | ||
): Promise<boolean> { | ||
if (await Deno.permissions.query({ name: "env" })) { | ||
return ( | ||
Deno.isatty(stream.rid) && | ||
stream.isTerminal() && | ||
Deno.env.get("TERM") !== "dumb" && | ||
!Deno.env.get("CI") | ||
); | ||
} | ||
return Deno.isatty(stream.rid); | ||
return stream.isTerminal(); | ||
} | ||
|
||
export function isInteractive(stream: { rid: number }): boolean { | ||
return Deno.isatty(stream.rid); | ||
export function isInteractive(stream: { isTerminal(): boolean }): boolean { | ||
return stream.isTerminal(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { encode } from "./util.ts"; | ||
|
||
import { | ||
AsyncStream, | ||
type AsyncStream, | ||
CLEAR_DOWN, | ||
CLEAR_LEFT, | ||
CLEAR_LINE, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ import { | |
SCROLL_DOWN, | ||
SCROLL_UP, | ||
SHOW, | ||
SyncStream, | ||
type SyncStream, | ||
UP, | ||
} from "./mod.ts"; | ||
|
||
|