Skip to content

Commit 90dbf20

Browse files
authored
Add push to jsr github action (#50)
1 parent 64d02f0 commit 90dbf20

File tree

11 files changed

+72
-25
lines changed

11 files changed

+72
-25
lines changed

.github/workflows/publish.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
12+
permissions:
13+
contents: read
14+
id-token: write
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Publish package
19+
run: npx jsr publish

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ This is the cli to work with projects in the [Val Town](https://val.town)
44
platform.
55

66
```
7-
$ vt
87
Usage: vt
9-
Version: 0.0.1
8+
Version: 0.0.3
109
1110
Options:
1211
@@ -20,23 +19,24 @@ Commands:
2019
push - Push local changes to a val town project
2120
status - Show the working tree status
2221
branch - List all project branches
22+
browse - Open a project in a web browser
2323
watch - Watch for changes and automatically sync with Val Town
2424
checkout [existingBranchName] - Check out a different branch
2525
create <projectName> [targetDir] - Create a new Val Town project
2626
```
2727

2828
## Installation
2929

30-
Install with:
30+
To install or update to the latest version, run:
3131

3232
```bash
33-
deno install -A -g -n=vt https://raw.githubusercontent.com/val-town/vt/refs/heads/main/install.ts
33+
deno install -gAfr jsr:@valtown/vt
3434
```
3535

3636
Or if you would prefer a more descriptive command with minimal permissions:
3737

3838
```bash
39-
deno install --allow-read --allow-write --allow-run --allow-env --global --name=vt https://raw.githubusercontent.com/val-town/vt/refs/heads/main/install.ts
39+
deno install --global --force --reload --allow-read --allow-write --allow-env --allow-net jsr:@valtown/vt
4040
```
4141

4242
Set the `VAL_TOWN_API_KEY` environment variable to authenticate. Either as an
@@ -53,7 +53,7 @@ Run `vt` to confirm everything is working:
5353

5454
```bash
5555
$ vt --version
56-
vt 0.0.1
56+
vt 0.0.3
5757
```
5858

5959
## Getting Started

deno.json

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
2-
"version": "0.0.1",
2+
"name": "@valtown/vt",
3+
"description": "The Val Town CLI",
4+
"version": "0.0.5",
35
"exports": "./vt.ts",
6+
"license": "MIT",
47
"tasks": {
58
"run": "./vt.ts",
69
"test": "deno test -A",
@@ -10,23 +13,23 @@
1013
"imports": {
1114
"gitignore-parser": "jsr:@cfa/gitignore-parser@^0.1.4",
1215
"@cliffy/ansi": "jsr:@cliffy/ansi@^1.0.0-rc.7",
16+
"@cliffy/command": "jsr:@cliffy/command@^1.0.0-rc.7",
1317
"@cliffy/prompt": "jsr:@cliffy/prompt@^1.0.0-rc.7",
1418
"@cliffy/table": "jsr:@cliffy/[email protected]",
1519
"@deno-library/logger": "jsr:@deno-library/logger@^1.1.9",
16-
"@std/async": "jsr:@std/async@^1.0.11",
17-
"@std/fs": "jsr:@std/fs@^1.0.13",
18-
"@std/path": "jsr:@std/path@^1.0.8",
19-
"zod": "npm:zod@^3.24.2",
20-
"~/": "./src/",
21-
"@cliffy/command": "jsr:@cliffy/command@^1.0.0-rc.7",
2220
"@std/assert": "jsr:@std/assert@1",
21+
"@std/async": "jsr:@std/async@^1.0.11",
2322
"@std/dotenv": "jsr:@std/dotenv@^0.225.3",
2423
"@std/encoding": "jsr:@std/encoding@^1.0.7",
24+
"@std/fs": "jsr:@std/fs@^1.0.13",
25+
"@std/path": "jsr:@std/path@^1.0.8",
2526
"@valtown/sdk": "jsr:@valtown/sdk@^0.36.0",
27+
"~/": "./src/",
2628
"emphasize": "npm:emphasize@^7.0.0",
27-
"open": "npm:open@^10.1.0",
2829
"highlight.js": "npm:highlight.js@^11.11.1",
29-
"kia": "https://deno.land/x/[email protected]/mod.ts"
30+
"kia": "jsr:@jonasschiano/[email protected]",
31+
"open": "npm:open@^10.1.0",
32+
"zod": "npm:zod@^3.24.2"
3033
},
3134
"compilerOptions": {
3235
"noUnusedLocals": true,

deno.lock

Lines changed: 27 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/vt/git/checkout.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { cleanDirectory, doAtomically } from "~/vt/git/utils.ts";
22
import { clone } from "~/vt/git/clone.ts";
33
import sdk from "~/sdk.ts";
44
import { copy } from "@std/fs";
5-
import ValTown from "@valtown/sdk";
5+
import type ValTown from "@valtown/sdk";
66

77
export interface CheckoutResult {
88
fromBranch: ValTown.Projects.BranchCreateResponse;

src/vt/git/paths.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { DEFAULT_VAL_TYPE, ProjectItem } from "~/consts.ts";
1+
import { DEFAULT_VAL_TYPE, type ProjectItem } from "~/consts.ts";
22
import { filePathToFile } from "~/sdk.ts";
33
import { compile as compileGitignore } from "gitignore-parser";
44

src/vt/git/tests/cases.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ExpectedProjectInode } from "~/vt/git/tests/utils.ts";
1+
import type { ExpectedProjectInode } from "~/vt/git/tests/utils.ts";
22

33
export interface TestCaseBranchData {
44
version: number;

src/vt/git/tests/status_test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { FileStatus, status, StatusResult } from "~/vt/git/status.ts";
1+
import { type FileStatus, status, type StatusResult } from "~/vt/git/status.ts";
22
import * as path from "@std/path";
33
import { doWithTempDir } from "~/vt/git/utils.ts";
44
import { clone } from "~/vt/git/clone.ts";
55
import { assert } from "@std/assert";
6-
import { TestCaseBranchData, testCases } from "~/vt/git/tests/cases.ts";
6+
import { type TestCaseBranchData, testCases } from "~/vt/git/tests/cases.ts";
77

88
for (const testCase of testCases) {
99
for (const branchId in testCase.branches) {

src/vt/git/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { StatusResult } from "~/vt/git/status.ts";
1+
import type { StatusResult } from "~/vt/git/status.ts";
22
import * as path from "@std/path";
33
import { shouldIgnore } from "~/vt/git/paths.ts";
44
import ValTown from "@valtown/sdk";

src/vt/vt/VTClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { clone } from "~/vt/git/clone.ts";
22
import VTMeta from "~/vt/vt/VTMeta.ts";
33
import { pull } from "~/vt/git/pull.ts";
44
import { push } from "~/vt/git/push.ts";
5-
import { status, StatusResult } from "~/vt/git/status.ts";
5+
import { status, type StatusResult } from "~/vt/git/status.ts";
66
import { denoJson, vtIgnore } from "~/vt/vt/editor/mod.ts";
77
import { join } from "@std/path";
88
import { checkout, CheckoutResult } from "~/vt/git/checkout.ts";

0 commit comments

Comments
 (0)