@vlandoss/run-run 0.4.2-git-1558746.0 → 0.5.1-git-53b6b02.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.
@@ -1,46 +1,46 @@
1
1
  // @generated by @usage-spec/commander from Commander.js metadata
2
2
  name rr
3
3
  bin rr
4
- version "0.4.2-git-1558746.0"
4
+ version "0.5.1-git-53b6b02.0"
5
5
  usage "[options] <command...>"
6
6
  flag --usage help="print KDL spec for this CLI (https://kdl.dev)"
7
- cmd completion help="print shell completion script 🐚 (usage)" {
7
+ cmd completion help="print shell completion script 🐚 (\u{1b}[38;2;36;197;94musage\u{1b}[39m)" {
8
8
  long_help "Prints a shell completion script for rr. Add to your shell rc file:\n\n bash: eval \"$(rr completion bash)\"\n zsh: eval \"$(rr completion zsh)\"\n fish: rr completion fish | source"
9
9
  arg <shell> help="target shell" {
10
10
  choices bash zsh fish
11
11
  }
12
12
  }
13
- cmd build:lib help="build a ts library 🏗️ (tsdown)" {
13
+ cmd build:lib help="build a ts library 🏗️ (\u{1b}[38;2;255;126;24mtsdown\u{1b}[39m)" {
14
14
  long_help "Compiles TypeScript code into JavaScript and generates type declaration files, making it ready for distribution."
15
15
  cmd doctor help="check if the underlying tool is working correctly"
16
16
  }
17
- cmd jsc help="check format and lint 🔍 (biome)" {
17
+ cmd jsc help="check format and lint 🔍 (\u{1b}[38;2;97;165;250mbiome\u{1b}[39m)" {
18
18
  alias jscheck check
19
19
  long_help "Checks the code for formatting and linting issues, ensuring it adheres to the defined style and quality standards."
20
20
  flag --fix help="try to fix issues automatically"
21
21
  flag --fix-staged help="try to fix staged files only"
22
22
  cmd doctor help="check if the underlying tool is working correctly"
23
23
  }
24
- cmd tsc help="check typescript errors 🧩 (tsc)" {
24
+ cmd tsc help="check typescript errors 🧩 (\u{1b}[38;2;49;120;198mtsc\u{1b}[39m)" {
25
25
  alias tscheck
26
26
  long_help "Checks the TypeScript code for type errors, ensuring that the code adheres to the defined type constraints and helps catch potential issues before runtime."
27
27
  cmd doctor help="check if the underlying tool is working correctly"
28
28
  }
29
- cmd lint help="check & fix lint errors 🔍 (biome)" {
29
+ cmd lint help="check & fix lint errors 🔍 (\u{1b}[38;2;97;165;250mbiome\u{1b}[39m)" {
30
30
  long_help "Checks the code for linting issues and optionally fixes them, ensuring it adheres to the defined quality standards."
31
31
  flag "-c --check" help="check if the code is valid" default=#true
32
32
  flag --fix help="try to fix all the code"
33
33
  cmd doctor help="check if the underlying tool is working correctly"
34
34
  }
35
- cmd format help="check & fix format errors 🎨 (biome)" {
35
+ cmd format help="check & fix format errors 🎨 (\u{1b}[38;2;97;165;250mbiome\u{1b}[39m)" {
36
36
  long_help "Checks the code for formatting issues and optionally fixes them, ensuring it adheres to the defined style standards."
37
37
  flag --fix help="format all the code"
38
38
  cmd doctor help="check if the underlying tool is working correctly"
39
39
  }
40
- cmd test:static help="run static tests 🔬 (run-run)" {
40
+ cmd test:static help="run static tests 🔬 (\u{1b}[38;2;232;114;42mrun-run\u{1b}[39m)" {
41
41
  long_help "Runs static tests, including linting, formatting checks, and TypeScript type checking, to ensure code quality and correctness without executing the code."
42
42
  }
43
- cmd clean help="delete dirty files 🗑️ (rimraf)" {
43
+ cmd clean help="delete dirty files 🗑️ (\u{1b}[38;2;124;114;112mrimraf\u{1b}[39m)" {
44
44
  long_help "Deletes generated files and folders such as 'dist', 'node_modules', and lock files to ensure a clean state."
45
45
  flag --only-dist help="delete 'dist' folders only"
46
46
  flag --dry-run help="outputs the paths that would be deleted"
package/dist/run.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { createRequire } from "node:module";
2
2
  import path from "node:path";
3
- import { colorize, createPkgService, createShellService, cwd, dirnameOf, getVersion, palette, run, text } from "@vlandoss/clibuddy";
3
+ import { colorize, createPkg, createShellService, cwd, dirnameOf, isCI, palette, run, text } from "@vlandoss/clibuddy";
4
4
  import { Argument, Option, createCommand } from "commander";
5
5
  import fs from "node:fs";
6
6
  import os from "node:os";
@@ -9,7 +9,6 @@ import { createLoggy } from "@vlandoss/loggy";
9
9
  import memoize from "memoize";
10
10
  import { glob } from "glob";
11
11
  import { rimraf } from "rimraf";
12
- import isCI from "is-ci";
13
12
  import { generateToStdout } from "@usage-spec/commander";
14
13
  //#region \0rolldown/runtime.js
15
14
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
@@ -64,7 +63,7 @@ async function createContext(binDir) {
64
63
  const binPath = fs.realpathSync(binDir);
65
64
  debug("bin path:", binPath);
66
65
  debug("process cwd:", process.cwd());
67
- const [appPkg, binPkg] = await Promise.all([createPkgService(cwd), createPkgService(binPath)]);
66
+ const [appPkg, binPkg] = await Promise.all([createPkg(cwd), createPkg(binPath)]);
68
67
  if (!binPkg) throw new Error("Could not find bin package.json");
69
68
  if (!appPkg) throw new Error("Could not find app package.json");
70
69
  debug("app pkg info: %O", appPkg.info());
@@ -524,7 +523,7 @@ function createXCommand(ctx) {
524
523
  //#region src/program/index.ts
525
524
  async function createProgram(options) {
526
525
  const ctx = await createContext(options.binDir);
527
- const version = getVersion(ctx.binPkg);
526
+ const version = ctx.binPkg.version;
528
527
  return {
529
528
  program: addUsage(createCommand("rr").usage("[options] <command...>").version(version, "-v, --version").addHelpText("before", getBannerText(version)).addHelpText("after", CREDITS_TEXT).addCommand(createCompletionCommand()).addCommand(createBuildLibCommand(ctx)).addCommand(createJsCheckCommand(ctx)).addCommand(createTsCheckCommand(ctx)).addCommand(createLintCommand(ctx)).addCommand(createFormatCommand(ctx)).addCommand(createTestStaticCommand(ctx)).addCommand(createCleanCommand()).addCommand(createPkgsCommand(ctx)).addCommand(createXCommand(ctx)).addCommand(createConfigCommand(ctx)).addCommand(createToolsCommand(ctx), { hidden: true })),
530
529
  ctx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vlandoss/run-run",
3
- "version": "0.4.2-git-1558746.0",
3
+ "version": "0.5.1-git-53b6b02.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": {
@@ -55,7 +55,6 @@
55
55
  "@usage-spec/commander": "1.1.0",
56
56
  "commander": "14.0.3",
57
57
  "glob": "13.0.6",
58
- "is-ci": "4.1.0",
59
58
  "lilconfig": "3.1.3",
60
59
  "memoize": "10.2.0",
61
60
  "oxfmt": "0.35.0",
@@ -64,7 +63,7 @@
64
63
  "rimraf": "6.1.3",
65
64
  "tsdown": "0.21.10",
66
65
  "typescript": "6.0.3",
67
- "@vlandoss/clibuddy": "0.3.1-git-1558746.0",
66
+ "@vlandoss/clibuddy": "0.4.1-git-53b6b02.0",
68
67
  "@vlandoss/loggy": "0.2.0"
69
68
  },
70
69
  "devDependencies": {
@@ -1,4 +1,3 @@
1
- import { getVersion } from "@vlandoss/clibuddy";
2
1
  import { createCommand } from "commander";
3
2
  import { createContext } from "#src/services/ctx.ts";
4
3
  import { createBuildLibCommand } from "./commands/build-lib.ts";
@@ -22,7 +21,7 @@ export type Options = {
22
21
 
23
22
  export async function createProgram(options: Options) {
24
23
  const ctx = await createContext(options.binDir);
25
- const version = getVersion(ctx.binPkg);
24
+ const version = ctx.binPkg.version;
26
25
 
27
26
  const program = addUsage(
28
27
  createCommand("rr")
@@ -1,6 +1,5 @@
1
1
  import { createRequire } from "node:module";
2
- import type { ShellService } from "@vlandoss/clibuddy";
3
- import isCI from "is-ci";
2
+ import { isCI, type ShellService } from "@vlandoss/clibuddy";
4
3
  import { TOOL_LABELS } from "#src/program/ui.ts";
5
4
  import type { FormatOptions, Formatter, Linter, LintOptions, StaticChecker, StaticCheckerOptions } from "#src/types/tool.ts";
6
5
  import { ToolService } from "./tool.ts";
@@ -1,12 +1,12 @@
1
1
  import fs from "node:fs";
2
- import { createPkgService, createShellService, cwd, type PkgService, type ShellService } from "@vlandoss/clibuddy";
2
+ import { createPkg, createShellService, cwd, type Pkg, type ShellService } from "@vlandoss/clibuddy";
3
3
  import type { ExportedConfig } from "#src/types/config.ts";
4
4
  import { ConfigService } from "./config.ts";
5
5
  import { logger } from "./logger.ts";
6
6
 
7
7
  export type Context = {
8
- binPkg: PkgService;
9
- appPkg: PkgService;
8
+ binPkg: Pkg;
9
+ appPkg: Pkg;
10
10
  shell: ShellService;
11
11
  config: ExportedConfig;
12
12
  };
@@ -19,7 +19,7 @@ export async function createContext(binDir: string): Promise<Context> {
19
19
  debug("bin path:", binPath);
20
20
  debug("process cwd:", process.cwd());
21
21
 
22
- const [appPkg, binPkg] = await Promise.all([createPkgService(cwd), createPkgService(binPath)]);
22
+ const [appPkg, binPkg] = await Promise.all([createPkg(cwd), createPkg(binPath)]);
23
23
 
24
24
  if (!binPkg) {
25
25
  throw new Error("Could not find bin package.json");