@vlandoss/run-run 0.2.1-git-84ea08f.0 → 0.2.1-git-b33212e.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/bin.mjs +1 -7
- package/dist/{main.mjs → run.mjs} +9 -10
- package/package.json +3 -3
- package/src/run.ts +12 -0
- package/src/main.ts +0 -11
package/bin.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
-
import
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { colorIsSupported, colorize, createPkgService, createShellService, cwd, dirnameOf, getVersion, palette, run } from "@vlandoss/clibuddy";
|
|
3
4
|
import { Option, createCommand } from "commander";
|
|
4
5
|
import fs from "node:fs";
|
|
5
6
|
import os from "node:os";
|
|
6
7
|
import { lilconfig } from "lilconfig";
|
|
7
8
|
import { createLoggy } from "@vlandoss/loggy";
|
|
8
|
-
import path from "node:path";
|
|
9
9
|
import memoize from "memoize";
|
|
10
10
|
import { glob } from "glob";
|
|
11
11
|
import { rimraf } from "rimraf";
|
|
@@ -627,12 +627,11 @@ function parseArgs(argv = process.argv) {
|
|
|
627
627
|
return args;
|
|
628
628
|
}
|
|
629
629
|
//#endregion
|
|
630
|
-
//#region src/
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
}
|
|
630
|
+
//#region src/run.ts
|
|
631
|
+
const BIN_DIR = path.dirname(dirnameOf(import.meta));
|
|
632
|
+
await run(async () => {
|
|
633
|
+
const { program } = await createProgram({ binDir: BIN_DIR });
|
|
634
|
+
await program.parseAsync(parseArgs(), { from: "user" });
|
|
635
|
+
}, logger);
|
|
637
636
|
//#endregion
|
|
638
|
-
export {
|
|
637
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vlandoss/run-run",
|
|
3
|
-
"version": "0.2.1-git-
|
|
3
|
+
"version": "0.2.1-git-b33212e.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": {
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"rimraf": "6.1.3",
|
|
59
59
|
"tsdown": "0.21.10",
|
|
60
60
|
"typescript": "6.0.3",
|
|
61
|
-
"@vlandoss/clibuddy": "0.2.0",
|
|
62
|
-
"@vlandoss/loggy": "0.1.
|
|
61
|
+
"@vlandoss/clibuddy": "0.2.1-git-b33212e.0",
|
|
62
|
+
"@vlandoss/loggy": "0.1.2-git-b33212e.0"
|
|
63
63
|
},
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
package/src/run.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { dirnameOf, run } from "@vlandoss/clibuddy";
|
|
3
|
+
import { createProgram } from "./program/index.ts";
|
|
4
|
+
import { parseArgs } from "./program/parse-args.ts";
|
|
5
|
+
import { logger } from "./services/logger.ts";
|
|
6
|
+
|
|
7
|
+
const BIN_DIR = path.dirname(dirnameOf(import.meta));
|
|
8
|
+
|
|
9
|
+
await run(async () => {
|
|
10
|
+
const { program } = await createProgram({ binDir: BIN_DIR });
|
|
11
|
+
await program.parseAsync(parseArgs(), { from: "user" });
|
|
12
|
+
}, logger);
|
package/src/main.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { run } from "@vlandoss/clibuddy";
|
|
2
|
-
import { createProgram, type Options } from "./program/index.ts";
|
|
3
|
-
import { parseArgs } from "./program/parse-args.ts";
|
|
4
|
-
import { logger } from "./services/logger.ts";
|
|
5
|
-
|
|
6
|
-
export async function main(options: Options) {
|
|
7
|
-
await run(async () => {
|
|
8
|
-
const { program } = await createProgram(options);
|
|
9
|
-
await program.parseAsync(parseArgs(), { from: "user" });
|
|
10
|
-
}, logger);
|
|
11
|
-
}
|