@flowscripter/example-cli-plugin 2.0.0 → 3.0.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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ValueTypeName, PRINTER_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
2
|
import { DEMO_SERVICE_ID } from "../service/DemoService.js";
|
|
3
3
|
const helloCommand = {
|
|
4
4
|
name: "hello",
|
|
@@ -10,7 +10,7 @@ const helloCommand = {
|
|
|
10
10
|
{
|
|
11
11
|
name: "name",
|
|
12
12
|
description: "Name to greet",
|
|
13
|
-
type:
|
|
13
|
+
type: ValueTypeName.STRING,
|
|
14
14
|
isVarargOptional: true,
|
|
15
15
|
},
|
|
16
16
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowscripter/example-cli-plugin",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Example CLI plugin for the https://github.com/flowscripter/dynamic-cli-framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bun",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"cowsay": "^1.6.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@flowscripter/dynamic-cli-framework": "^
|
|
50
|
-
"@flowscripter/dynamic-cli-framework-api": "^1.
|
|
49
|
+
"@flowscripter/dynamic-cli-framework": "^3.0.0",
|
|
50
|
+
"@flowscripter/dynamic-cli-framework-api": "^1.4.1",
|
|
51
51
|
"@types/bun": "^1.3.14",
|
|
52
52
|
"oxfmt": "0.56.0",
|
|
53
53
|
"oxlint": "1.71.0"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
SubCommand,
|
|
3
3
|
Context,
|
|
4
|
-
|
|
4
|
+
Values,
|
|
5
5
|
PrinterService,
|
|
6
6
|
} from "@flowscripter/dynamic-cli-framework-api";
|
|
7
|
-
import {
|
|
7
|
+
import { ValueTypeName, PRINTER_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
8
8
|
import { DEMO_SERVICE_ID } from "../service/DemoService.ts";
|
|
9
9
|
import type DemoService from "../service/DemoService.ts";
|
|
10
10
|
|
|
@@ -18,11 +18,11 @@ const helloCommand: SubCommand = {
|
|
|
18
18
|
{
|
|
19
19
|
name: "name",
|
|
20
20
|
description: "Name to greet",
|
|
21
|
-
type:
|
|
21
|
+
type: ValueTypeName.STRING,
|
|
22
22
|
isVarargOptional: true,
|
|
23
23
|
},
|
|
24
24
|
],
|
|
25
|
-
execute: async (context: Context, argumentValues:
|
|
25
|
+
execute: async (context: Context, argumentValues: Values) => {
|
|
26
26
|
const demoService = context.getServiceById(DEMO_SERVICE_ID) as DemoService;
|
|
27
27
|
const printerService = context.getServiceById(PRINTER_SERVICE_ID) as PrinterService;
|
|
28
28
|
const name = (argumentValues["name"] as string | undefined) ?? "World";
|