convoker 0.5.0 → 0.5.1
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/README.md +34 -0
- package/dist/index.cjs +8 -0
- package/dist/index.d.cts +2 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +10 -5
- package/src/index.ts +1 -0
- package/.turbo/turbo-prepare.log +0 -20
- package/tsconfig.json +0 -6
- package/tsdown.config.ts +0 -10
package/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Convoker
|
|
2
|
+
|
|
3
|
+
A simple, type safe CLI library for TypeScript.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { i, Command } from "convoker";
|
|
7
|
+
|
|
8
|
+
const program = new Command("calc").description("A basic calculator.");
|
|
9
|
+
|
|
10
|
+
program
|
|
11
|
+
.subCommand("add", (c) =>
|
|
12
|
+
c
|
|
13
|
+
.description("Adds two numbers.")
|
|
14
|
+
.input({
|
|
15
|
+
x: i.option("number", "-x", "--x"),
|
|
16
|
+
y: i.option("number", "-y", "--y"),
|
|
17
|
+
})
|
|
18
|
+
.action(({ x, y }) => {
|
|
19
|
+
console.log(`${x} + ${y} = ${x + y}`);
|
|
20
|
+
}),
|
|
21
|
+
)
|
|
22
|
+
.subCommand("sub", (c) =>
|
|
23
|
+
c
|
|
24
|
+
.description("Subtracts any amount of numbers.")
|
|
25
|
+
.input({
|
|
26
|
+
numbers: i.option("number", "--numbers", "-n").list(),
|
|
27
|
+
})
|
|
28
|
+
.action(({ numbers }) => {
|
|
29
|
+
const sub = numbers.reduce((a, b) => a - b, 0);
|
|
30
|
+
console.log(`${numbers.join(" + ")} = ${sub}`);
|
|
31
|
+
}),
|
|
32
|
+
)
|
|
33
|
+
.run();
|
|
34
|
+
```
|
package/dist/index.cjs
CHANGED
|
@@ -26,6 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
}) : target, mod));
|
|
27
27
|
|
|
28
28
|
//#endregion
|
|
29
|
+
let _convoker_input = require("@convoker/input");
|
|
30
|
+
_convoker_input = __toESM(_convoker_input);
|
|
29
31
|
let _convoker_theme = require("@convoker/theme");
|
|
30
32
|
_convoker_theme = __toESM(_convoker_theme);
|
|
31
33
|
let _convoker_log = require("@convoker/log");
|
|
@@ -33,6 +35,12 @@ _convoker_log = __toESM(_convoker_log);
|
|
|
33
35
|
let _convoker_prompt = require("@convoker/prompt");
|
|
34
36
|
_convoker_prompt = __toESM(_convoker_prompt);
|
|
35
37
|
|
|
38
|
+
Object.defineProperty(exports, 'i', {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function () {
|
|
41
|
+
return _convoker_input;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
36
44
|
Object.defineProperty(exports, 'log', {
|
|
37
45
|
enumerable: true,
|
|
38
46
|
get: function () {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import * as i from "@convoker/input";
|
|
1
2
|
import * as theme from "@convoker/theme";
|
|
2
3
|
import * as log from "@convoker/log";
|
|
3
4
|
import * as prompt from "@convoker/prompt";
|
|
4
5
|
export * from "@convoker/core";
|
|
5
|
-
export { log, prompt, theme };
|
|
6
|
+
export { i, log, prompt, theme };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import * as i from "@convoker/input";
|
|
1
2
|
import * as theme from "@convoker/theme";
|
|
2
3
|
import * as log from "@convoker/log";
|
|
3
4
|
import * as prompt from "@convoker/prompt";
|
|
4
5
|
export * from "@convoker/core";
|
|
5
|
-
export { log, prompt, theme };
|
|
6
|
+
export { i, log, prompt, theme };
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import * as i from "@convoker/input";
|
|
1
2
|
import * as theme from "@convoker/theme";
|
|
2
3
|
import * as log from "@convoker/log";
|
|
3
4
|
import * as prompt from "@convoker/prompt";
|
|
4
5
|
|
|
5
6
|
export * from "@convoker/core"
|
|
6
7
|
|
|
7
|
-
export { log, prompt, theme };
|
|
8
|
+
export { i, log, prompt, theme };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "convoker",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "A simple, type-safe CLI framework.",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -19,11 +19,16 @@
|
|
|
19
19
|
"log",
|
|
20
20
|
"theme"
|
|
21
21
|
],
|
|
22
|
+
"files": [
|
|
23
|
+
"src",
|
|
24
|
+
"dist"
|
|
25
|
+
],
|
|
22
26
|
"dependencies": {
|
|
23
|
-
"@convoker/core": "0.
|
|
24
|
-
"@convoker/log": "0.1.
|
|
25
|
-
"@convoker/prompt": "0.
|
|
26
|
-
"@convoker/
|
|
27
|
+
"@convoker/core": "0.1.1",
|
|
28
|
+
"@convoker/log": "0.1.1",
|
|
29
|
+
"@convoker/prompt": "0.2.0",
|
|
30
|
+
"@convoker/input": "0.1.1",
|
|
31
|
+
"@convoker/theme": "0.1.1"
|
|
27
32
|
},
|
|
28
33
|
"publishConfig": {
|
|
29
34
|
"access": "public"
|
package/src/index.ts
CHANGED
package/.turbo/turbo-prepare.log
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
> convoker@0.5.0 prepare /code/sprucepad/convoker/js/packages/convoker
|
|
4
|
-
> tsdown
|
|
5
|
-
|
|
6
|
-
[34mℹ[39m tsdown [2mv0.20.3[22m powered by rolldown [2mv1.0.0-rc.3[22m
|
|
7
|
-
[34mℹ[39m config file: [4m/code/sprucepad/convoker/js/packages/convoker/tsdown.config.ts[24m (unrun)
|
|
8
|
-
[34mℹ[39m entry: [34msrc/index.ts[39m
|
|
9
|
-
[34mℹ[39m tsconfig: [34mtsconfig.json[39m
|
|
10
|
-
[34mℹ[39m Build start
|
|
11
|
-
[34mℹ[39m Cleaning 4 files
|
|
12
|
-
[34mℹ[39m [33m[CJS][39m [2mdist/[22m[1mindex.cjs[22m [2m2.01 kB[22m [2m│ gzip: 0.75 kB[22m
|
|
13
|
-
[34mℹ[39m [33m[CJS][39m 1 files, total: 2.01 kB
|
|
14
|
-
[34mℹ[39m [33m[CJS][39m [2mdist/[22m[32m[1mindex.d.cts[22m[39m [2m0.19 kB[22m [2m│ gzip: 0.11 kB[22m
|
|
15
|
-
[34mℹ[39m [33m[CJS][39m 1 files, total: 0.19 kB
|
|
16
|
-
[34mℹ[39m [34m[ESM][39m [2mdist/[22m[1mindex.mjs[22m [2m0.19 kB[22m [2m│ gzip: 0.11 kB[22m
|
|
17
|
-
[34mℹ[39m [34m[ESM][39m [2mdist/[22m[32m[1mindex.d.mts[22m[39m [2m0.19 kB[22m [2m│ gzip: 0.11 kB[22m
|
|
18
|
-
[34mℹ[39m [34m[ESM][39m 2 files, total: 0.37 kB
|
|
19
|
-
[32m✔[39m Build complete in [32m1088ms[39m
|
|
20
|
-
[32m✔[39m Build complete in [32m1089ms[39m
|
package/tsconfig.json
DELETED