@vlandoss/run-run 0.5.3 → 0.6.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/dist/cli.usage.kdl
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @generated by @usage-spec/commander from Commander.js metadata
|
|
2
2
|
name rr
|
|
3
3
|
bin rr
|
|
4
|
-
version "0.
|
|
4
|
+
version "0.6.0"
|
|
5
5
|
usage "[options] <command...>"
|
|
6
6
|
flag --usage help="print KDL spec for this CLI (https://kdl.dev)"
|
|
7
7
|
cmd completion help="print shell completion script 🐚 (usage)" {
|
|
@@ -15,7 +15,7 @@ cmd build:lib help="build a ts library 🏗️ (tsdown)" {
|
|
|
15
15
|
cmd doctor help="check if the underlying tool is working correctly"
|
|
16
16
|
}
|
|
17
17
|
cmd jsc help="check format and lint 🔍 (biome)" {
|
|
18
|
-
alias jscheck
|
|
18
|
+
alias jscheck
|
|
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"
|
|
@@ -37,8 +37,8 @@ cmd format help="check & fix format errors 🎨 (biome)" {
|
|
|
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
|
|
41
|
-
long_help "Runs static
|
|
40
|
+
cmd check help="run static checks 🔬 (run-run)" {
|
|
41
|
+
long_help "Runs static checks, including linting, formatting checks, and TypeScript type checking, to ensure code quality and correctness without executing the code."
|
|
42
42
|
}
|
|
43
43
|
cmd clean help="delete dirty files 🗑️ (rimraf)" {
|
|
44
44
|
long_help "Deletes generated files and folders such as 'dist', 'node_modules', and lock files to ensure a clean state."
|
package/dist/run.mjs
CHANGED
|
@@ -194,6 +194,17 @@ function createBuildLibCommand(ctx) {
|
|
|
194
194
|
}).addHelpText("afterAll", `\nUnder the hood, this command uses the ${tsdownService.ui} CLI to build the project.`);
|
|
195
195
|
}
|
|
196
196
|
//#endregion
|
|
197
|
+
//#region src/program/commands/check.ts
|
|
198
|
+
function createCheckCommand(ctx) {
|
|
199
|
+
return createCommand("check").summary(`run static checks 🔬 (${TOOL_LABELS.RUN_RUN})`).description("Runs static checks, including linting, formatting checks, and TypeScript type checking, to ensure code quality and correctness without executing the code.").action(async function checkAction() {
|
|
200
|
+
await ctx.shell.run("rr", [
|
|
201
|
+
"x",
|
|
202
|
+
"jscheck",
|
|
203
|
+
"tscheck"
|
|
204
|
+
]);
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
//#endregion
|
|
197
208
|
//#region src/program/commands/clean.ts
|
|
198
209
|
function createCleanCommand() {
|
|
199
210
|
return createCommand("clean").summary(`delete dirty files 🗑️ (${TOOL_LABELS.RIMRAF})`).description("Deletes generated files and folders such as 'dist', 'node_modules', and lock files to ensure a clean state.").option("--only-dist", "delete 'dist' folders only").option("--dry-run", "outputs the paths that would be deleted").action(async function cleanCommandAction(options) {
|
|
@@ -319,7 +330,7 @@ function createFormatCommand(ctx) {
|
|
|
319
330
|
//#region src/program/commands/jscheck.ts
|
|
320
331
|
function createJsCheckCommand(ctx) {
|
|
321
332
|
const checkerService = new BiomeService(ctx.shell);
|
|
322
|
-
return createCommand("jsc").alias("jscheck").
|
|
333
|
+
return createCommand("jsc").alias("jscheck").summary(`check format and lint 🔍 (${checkerService.ui})`).description("Checks the code for formatting and linting issues, ensuring it adheres to the defined style and quality standards.").option("--fix", "try to fix issues automatically").option("--fix-staged", "try to fix staged files only").addCommand(createDoctorSubcommand(checkerService)).action(async function checkAction(options) {
|
|
323
334
|
await checkerService.check(options);
|
|
324
335
|
}).addHelpText("afterAll", `\nUnder the hood, this command uses the ${checkerService.ui} CLI to check the code.`);
|
|
325
336
|
}
|
|
@@ -386,17 +397,6 @@ function createPkgsCommand(ctx) {
|
|
|
386
397
|
});
|
|
387
398
|
}
|
|
388
399
|
//#endregion
|
|
389
|
-
//#region src/program/commands/test-static.ts
|
|
390
|
-
function createTestStaticCommand(ctx) {
|
|
391
|
-
return createCommand("test:static").summary(`run static tests 🔬 (${TOOL_LABELS.RUN_RUN})`).description("Runs static tests, including linting, formatting checks, and TypeScript type checking, to ensure code quality and correctness without executing the code.").action(async function testStaticAction() {
|
|
392
|
-
await ctx.shell.run("rr", [
|
|
393
|
-
"x",
|
|
394
|
-
"jscheck",
|
|
395
|
-
"tscheck"
|
|
396
|
-
]);
|
|
397
|
-
});
|
|
398
|
-
}
|
|
399
|
-
//#endregion
|
|
400
400
|
//#region src/program/commands/tools.ts
|
|
401
401
|
function getToolService(bin, shell) {
|
|
402
402
|
switch (bin) {
|
|
@@ -520,7 +520,7 @@ async function createProgram(options) {
|
|
|
520
520
|
const ctx = await createContext(options.binDir);
|
|
521
521
|
const version = ctx.binPkg.version;
|
|
522
522
|
return {
|
|
523
|
-
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(
|
|
523
|
+
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(createCheckCommand(ctx)).addCommand(createCleanCommand()).addCommand(createPkgsCommand(ctx)).addCommand(createXCommand(ctx)).addCommand(createConfigCommand(ctx)).addCommand(createToolsCommand(ctx), { hidden: true })),
|
|
524
524
|
ctx
|
|
525
525
|
};
|
|
526
526
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createCommand } from "commander";
|
|
2
|
+
import { TOOL_LABELS } from "#src/program/ui.ts";
|
|
3
|
+
import type { Context } from "#src/services/ctx.ts";
|
|
4
|
+
|
|
5
|
+
export function createCheckCommand(ctx: Context) {
|
|
6
|
+
return createCommand("check")
|
|
7
|
+
.summary(`run static checks 🔬 (${TOOL_LABELS.RUN_RUN})`)
|
|
8
|
+
.description(
|
|
9
|
+
"Runs static checks, including linting, formatting checks, and TypeScript type checking, to ensure code quality and correctness without executing the code.",
|
|
10
|
+
)
|
|
11
|
+
.action(async function checkAction() {
|
|
12
|
+
await ctx.shell.run("rr", ["x", "jscheck", "tscheck"]);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
@@ -13,7 +13,6 @@ export function createJsCheckCommand(ctx: Context) {
|
|
|
13
13
|
|
|
14
14
|
return createCommand("jsc")
|
|
15
15
|
.alias("jscheck")
|
|
16
|
-
.alias("check")
|
|
17
16
|
.summary(`check format and lint 🔍 (${checkerService.ui})`)
|
|
18
17
|
.description(
|
|
19
18
|
"Checks the code for formatting and linting issues, ensuring it adheres to the defined style and quality standards.",
|
package/src/program/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createCommand } from "commander";
|
|
2
2
|
import { createContext } from "#src/services/ctx.ts";
|
|
3
3
|
import { createBuildLibCommand } from "./commands/build-lib.ts";
|
|
4
|
+
import { createCheckCommand } from "./commands/check.ts";
|
|
4
5
|
import { createCleanCommand } from "./commands/clean.ts";
|
|
5
6
|
import { createCompletionCommand } from "./commands/completion.ts";
|
|
6
7
|
import { createConfigCommand } from "./commands/config.ts";
|
|
@@ -8,7 +9,6 @@ import { createFormatCommand } from "./commands/format.ts";
|
|
|
8
9
|
import { createJsCheckCommand } from "./commands/jscheck.ts";
|
|
9
10
|
import { createLintCommand } from "./commands/lint.ts";
|
|
10
11
|
import { createPkgsCommand } from "./commands/pkgs.ts";
|
|
11
|
-
import { createTestStaticCommand } from "./commands/test-static.ts";
|
|
12
12
|
import { createToolsCommand } from "./commands/tools.ts";
|
|
13
13
|
import { createTsCheckCommand } from "./commands/tscheck.ts";
|
|
14
14
|
import { addUsage } from "./commands/usage.ts";
|
|
@@ -38,8 +38,7 @@ export async function createProgram(options: Options) {
|
|
|
38
38
|
.addCommand(createTsCheckCommand(ctx))
|
|
39
39
|
.addCommand(createLintCommand(ctx))
|
|
40
40
|
.addCommand(createFormatCommand(ctx))
|
|
41
|
-
|
|
42
|
-
.addCommand(createTestStaticCommand(ctx))
|
|
41
|
+
.addCommand(createCheckCommand(ctx))
|
|
43
42
|
// misc
|
|
44
43
|
.addCommand(createCleanCommand())
|
|
45
44
|
.addCommand(createPkgsCommand(ctx))
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createCommand } from "commander";
|
|
2
|
-
import { TOOL_LABELS } from "#src/program/ui.ts";
|
|
3
|
-
import type { Context } from "#src/services/ctx.ts";
|
|
4
|
-
|
|
5
|
-
export function createTestStaticCommand(ctx: Context) {
|
|
6
|
-
return createCommand("test:static")
|
|
7
|
-
.summary(`run static tests 🔬 (${TOOL_LABELS.RUN_RUN})`)
|
|
8
|
-
.description(
|
|
9
|
-
"Runs static tests, including linting, formatting checks, and TypeScript type checking, to ensure code quality and correctness without executing the code.",
|
|
10
|
-
)
|
|
11
|
-
.action(async function testStaticAction() {
|
|
12
|
-
await ctx.shell.run("rr", ["x", "jscheck", "tscheck"]);
|
|
13
|
-
});
|
|
14
|
-
}
|