@vlandoss/run-run 0.0.17 → 0.0.18-git-7b53fc7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vlandoss/run-run",
3
- "version": "0.0.17",
3
+ "version": "0.0.18-git-7b53fc7.0",
4
4
  "description": "The CLI toolbox to fullstack common scripts in Variable Land",
5
5
  "homepage": "https://github.com/variableland/dx/tree/main/packages/run-run#readme",
6
6
  "bugs": {
@@ -14,7 +14,8 @@
14
14
  "author": "rcrd <rcrd@variable.land>",
15
15
  "type": "module",
16
16
  "exports": {
17
- "./config": "./src/lib/config.ts"
17
+ "./config": "./src/lib/config.ts",
18
+ "./tools/*": "./src/tools/*.ts"
18
19
  },
19
20
  "bin": {
20
21
  "rr": "./bin.ts",
@@ -42,8 +43,8 @@
42
43
  "rimraf": "6.1.3",
43
44
  "tsdown": "0.21.0-beta.2",
44
45
  "typescript": "5.9.3",
45
- "@vlandoss/clibuddy": "0.0.8",
46
- "@vlandoss/loggy": "0.0.6"
46
+ "@vlandoss/clibuddy": "0.0.9-git-7b53fc7.0",
47
+ "@vlandoss/loggy": "0.0.7-git-7b53fc7.0"
47
48
  },
48
49
  "publishConfig": {
49
50
  "access": "public"
@@ -183,6 +183,7 @@ Commands:
183
183
  biome
184
184
  oxfmt
185
185
  oxlint
186
+ tsdown
186
187
  help [command] display help for command
187
188
  "
188
189
  `;
@@ -5,6 +5,7 @@ import type { Context } from "#/services/ctx";
5
5
  import { OxfmtService } from "#/services/oxfmt";
6
6
  import { OxlintService } from "#/services/oxlint";
7
7
  import type { ToolService } from "#/services/tool";
8
+ import { TsdownService } from "#/services/tsdown";
8
9
 
9
10
  type ActionParams = {
10
11
  args: string[];
@@ -18,6 +19,8 @@ function getToolService(bin: string, shell: ShellService): ToolService {
18
19
  return new OxfmtService(shell);
19
20
  case "oxlint":
20
21
  return new OxlintService(shell);
22
+ case "tsdown":
23
+ return new TsdownService(shell);
21
24
  default:
22
25
  throw new Error(`Unknown tool: ${bin}`);
23
26
  }
@@ -41,5 +44,6 @@ export function createToolsCommand(ctx: Context) {
41
44
  .description("expose the internal tools 🛠️")
42
45
  .addCommand(createToolCommand("biome", ctx.shell))
43
46
  .addCommand(createToolCommand("oxfmt", ctx.shell))
44
- .addCommand(createToolCommand("oxlint", ctx.shell));
47
+ .addCommand(createToolCommand("oxlint", ctx.shell))
48
+ .addCommand(createToolCommand("tsdown", ctx.shell));
45
49
  }
@@ -9,7 +9,7 @@ export class BiomeService extends ToolService implements Formatter, Linter, Stat
9
9
  super({ bin: "biome", ui: TOOL_LABELS.BIOME, shellService });
10
10
  }
11
11
 
12
- getBinDir() {
12
+ override getBinDir() {
13
13
  return require.resolve("@biomejs/biome/bin/biome");
14
14
  }
15
15
 
@@ -8,7 +8,7 @@ export class OxfmtService extends ToolService implements Formatter {
8
8
  super({ bin: "oxfmt", ui: TOOL_LABELS.OXFMT, shellService });
9
9
  }
10
10
 
11
- getBinDir() {
11
+ override getBinDir() {
12
12
  return require.resolve("oxfmt/bin/oxfmt");
13
13
  }
14
14
 
@@ -8,7 +8,7 @@ export class OxlintService extends ToolService implements Linter {
8
8
  super({ bin: "oxlint", ui: TOOL_LABELS.OXLINT, shellService });
9
9
  }
10
10
 
11
- getBinDir() {
11
+ override getBinDir() {
12
12
  return require.resolve("oxlint/bin/oxlint");
13
13
  }
14
14
 
@@ -19,7 +19,7 @@ export abstract class ToolService {
19
19
  this.#shellService = shellService;
20
20
  }
21
21
 
22
- abstract getBinDir(): string;
22
+ getBinDir?(): string;
23
23
 
24
24
  exec(args: string | string[]) {
25
25
  const $ = this.#shell();
@@ -27,9 +27,11 @@ export abstract class ToolService {
27
27
  }
28
28
 
29
29
  #shell = memoize((cwd?: string) => {
30
+ const { getBinDir } = this;
31
+
30
32
  return this.#shellService.child({
31
33
  cwd,
32
- preferLocal: gracefullBinDir(() => this.getBinDir()),
34
+ ...(getBinDir && { preferLocal: gracefullBinDir(() => getBinDir()) }),
33
35
  }).$;
34
36
  });
35
37
 
@@ -0,0 +1,9 @@
1
+ import type { ShellService } from "@vlandoss/clibuddy";
2
+ import { TOOL_LABELS } from "#/program/ui";
3
+ import { ToolService } from "./tool";
4
+
5
+ export class TsdownService extends ToolService {
6
+ constructor(shellService: ShellService) {
7
+ super({ bin: "tsdown", ui: TOOL_LABELS.TSDOWN, shellService });
8
+ }
9
+ }
@@ -0,0 +1 @@
1
+ export * from "tsdown";
package/tools/tsdown ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env bash
2
+ bunx rr tools tsdown "$@"