@flowscripter/example-cli-plugin 1.2.0 → 2.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.
- package/README.md +7 -0
- package/dist/src/command/HelloCommand.d.ts +1 -1
- package/dist/src/command/HelloCommand.d.ts.map +1 -1
- package/dist/src/command/HelloCommand.js +1 -1
- package/dist/src/command/HelloRustCommand.d.ts +1 -1
- package/dist/src/command/HelloRustCommand.d.ts.map +1 -1
- package/dist/src/command/HelloRustCommand.js +1 -1
- package/dist/src/factory/DemoCommandFactory.d.ts +2 -2
- package/dist/src/factory/DemoCommandFactory.d.ts.map +1 -1
- package/dist/src/factory/DemoServiceProviderFactory.d.ts +1 -1
- package/dist/src/factory/DemoServiceProviderFactory.d.ts.map +1 -1
- package/dist/src/plugin.d.ts +1 -1
- package/dist/src/plugin.js +1 -1
- package/dist/src/service/DemoServiceProvider.d.ts +1 -1
- package/dist/src/service/DemoServiceProvider.d.ts.map +1 -1
- package/package.json +4 -3
- package/src/command/HelloCommand.ts +2 -5
- package/src/command/HelloRustCommand.ts +2 -6
- package/src/factory/DemoCommandFactory.ts +1 -1
- package/src/factory/DemoServiceProviderFactory.ts +1 -1
- package/src/plugin.ts +1 -1
- package/src/service/DemoServiceProvider.ts +1 -1
package/README.md
CHANGED
|
@@ -9,6 +9,13 @@
|
|
|
9
9
|
> Example CLI plugin for the
|
|
10
10
|
> [dynamic-cli-framework](https://github.com/flowscripter/dynamic-cli-framework)
|
|
11
11
|
|
|
12
|
+
This plugin is authored against
|
|
13
|
+
[`@flowscripter/dynamic-cli-framework-api`](https://github.com/flowscripter/dynamic-cli-framework-api),
|
|
14
|
+
the lightweight plugin-facing API package, rather than the full
|
|
15
|
+
`dynamic-cli-framework` - keeping the framework's concrete service
|
|
16
|
+
implementations and their dependencies out of the plugin's own
|
|
17
|
+
dependency tree.
|
|
18
|
+
|
|
12
19
|
## Development
|
|
13
20
|
|
|
14
21
|
Build (produces `dist/` for Node.js and TypeScript consumers; Bun uses raw source directly):
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SubCommand } from "@flowscripter/dynamic-cli-framework
|
|
1
|
+
import type { SubCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
2
|
declare const helloCommand: SubCommand;
|
|
3
3
|
export default helloCommand;
|
|
4
4
|
//# sourceMappingURL=HelloCommand.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HelloCommand.d.ts","sourceRoot":"","sources":["../../../src/command/HelloCommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EAIX,MAAM,
|
|
1
|
+
{"version":3,"file":"HelloCommand.d.ts","sourceRoot":"","sources":["../../../src/command/HelloCommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EAIX,MAAM,yCAAyC,CAAC;AAKjD,QAAA,MAAM,YAAY,EAAE,UAqBnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ArgumentValueTypeName, PRINTER_SERVICE_ID
|
|
1
|
+
import { ArgumentValueTypeName, 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",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SubCommand } from "@flowscripter/dynamic-cli-framework
|
|
1
|
+
import type { SubCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
2
|
declare const helloRustCommand: SubCommand;
|
|
3
3
|
export default helloRustCommand;
|
|
4
4
|
//# sourceMappingURL=HelloRustCommand.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HelloRustCommand.d.ts","sourceRoot":"","sources":["../../../src/command/HelloRustCommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"HelloRustCommand.d.ts","sourceRoot":"","sources":["../../../src/command/HelloRustCommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAA2B,MAAM,yCAAyC,CAAC;AAInG,QAAA,MAAM,gBAAgB,EAAE,UAYvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PRINTER_SERVICE_ID } from "@flowscripter/dynamic-cli-framework
|
|
1
|
+
import { PRINTER_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
2
|
import { world } from "@flowscripter/template-bun-rust-library";
|
|
3
3
|
const helloRustCommand = {
|
|
4
4
|
name: "hello_rust",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CommandFactory } from "@flowscripter/dynamic-cli-framework
|
|
1
|
+
import type { CommandFactory } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
2
|
export default class DemoCommandFactory implements CommandFactory {
|
|
3
|
-
getCommands(): import("@flowscripter/dynamic-cli-framework
|
|
3
|
+
getCommands(): import("@flowscripter/dynamic-cli-framework-api").SubCommand[];
|
|
4
4
|
}
|
|
5
5
|
//# sourceMappingURL=DemoCommandFactory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DemoCommandFactory.d.ts","sourceRoot":"","sources":["../../../src/factory/DemoCommandFactory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"DemoCommandFactory.d.ts","sourceRoot":"","sources":["../../../src/factory/DemoCommandFactory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAI9E,MAAM,CAAC,OAAO,OAAO,kBAAmB,YAAW,cAAc;IAC/D,WAAW;CAGZ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ServiceProviderFactory } from "@flowscripter/dynamic-cli-framework
|
|
1
|
+
import type { ServiceProviderFactory } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
2
|
import DemoServiceProvider from "../service/DemoServiceProvider.ts";
|
|
3
3
|
export default class DemoServiceProviderFactory implements ServiceProviderFactory {
|
|
4
4
|
getServiceProviders(): DemoServiceProvider[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DemoServiceProviderFactory.d.ts","sourceRoot":"","sources":["../../../src/factory/DemoServiceProviderFactory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"DemoServiceProviderFactory.d.ts","sourceRoot":"","sources":["../../../src/factory/DemoServiceProviderFactory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,mBAAmB,MAAM,mCAAmC,CAAC;AAEpE,MAAM,CAAC,OAAO,OAAO,0BAA2B,YAAW,sBAAsB;IAC/E,mBAAmB;CAGpB"}
|
package/dist/src/plugin.d.ts
CHANGED
package/dist/src/plugin.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createCLIPlugin } from "@flowscripter/dynamic-cli-framework
|
|
1
|
+
import { createCLIPlugin } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
2
|
import DemoCommandFactory from "./factory/DemoCommandFactory.js";
|
|
3
3
|
import DemoServiceProviderFactory from "./factory/DemoServiceProviderFactory.js";
|
|
4
4
|
export default createCLIPlugin({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ServiceProvider, ServiceInfo, CLIConfig, Context } from "@flowscripter/dynamic-cli-framework
|
|
1
|
+
import type { ServiceProvider, ServiceInfo, CLIConfig, Context } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
2
|
export default class DemoServiceProvider implements ServiceProvider {
|
|
3
3
|
readonly serviceId = "DEMO_SERVICE";
|
|
4
4
|
readonly servicePriority = 10;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DemoServiceProvider.d.ts","sourceRoot":"","sources":["../../../src/service/DemoServiceProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACX,SAAS,EACT,OAAO,EACR,MAAM,
|
|
1
|
+
{"version":3,"file":"DemoServiceProvider.d.ts","sourceRoot":"","sources":["../../../src/service/DemoServiceProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACX,SAAS,EACT,OAAO,EACR,MAAM,yCAAyC,CAAC;AAIjD,MAAM,CAAC,OAAO,OAAO,mBAAoB,YAAW,eAAe;IACjE,QAAQ,CAAC,SAAS,kBAAmB;IACrC,QAAQ,CAAC,eAAe,MAAM;IAExB,cAAc,CAAC,UAAU,EAAE,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC;IAI3D,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;CACpD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowscripter/example-cli-plugin",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Example CLI plugin for the https://github.com/flowscripter/dynamic-cli-framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bun",
|
|
@@ -46,13 +46,14 @@
|
|
|
46
46
|
"cowsay": "^1.6.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@flowscripter/dynamic-cli-framework": "
|
|
49
|
+
"@flowscripter/dynamic-cli-framework": "^2.0.0",
|
|
50
|
+
"@flowscripter/dynamic-cli-framework-api": "^1.0.1",
|
|
50
51
|
"@types/bun": "^1.3.14",
|
|
51
52
|
"oxfmt": "0.56.0",
|
|
52
53
|
"oxlint": "1.71.0"
|
|
53
54
|
},
|
|
54
55
|
"peerDependencies": {
|
|
55
|
-
"@flowscripter/dynamic-cli-framework": "*",
|
|
56
|
+
"@flowscripter/dynamic-cli-framework-api": "*",
|
|
56
57
|
"typescript": "^6.0.3"
|
|
57
58
|
},
|
|
58
59
|
"dynamic-cli-framework": {
|
|
@@ -3,11 +3,8 @@ import type {
|
|
|
3
3
|
Context,
|
|
4
4
|
ArgumentValues,
|
|
5
5
|
PrinterService,
|
|
6
|
-
} from "@flowscripter/dynamic-cli-framework
|
|
7
|
-
import {
|
|
8
|
-
ArgumentValueTypeName,
|
|
9
|
-
PRINTER_SERVICE_ID,
|
|
10
|
-
} from "@flowscripter/dynamic-cli-framework/cli-plugin";
|
|
6
|
+
} from "@flowscripter/dynamic-cli-framework-api";
|
|
7
|
+
import { ArgumentValueTypeName, PRINTER_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
11
8
|
import { DEMO_SERVICE_ID } from "../service/DemoService.ts";
|
|
12
9
|
import type DemoService from "../service/DemoService.ts";
|
|
13
10
|
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
Context,
|
|
4
|
-
PrinterService,
|
|
5
|
-
} from "@flowscripter/dynamic-cli-framework/cli-plugin";
|
|
6
|
-
import { PRINTER_SERVICE_ID } from "@flowscripter/dynamic-cli-framework/cli-plugin";
|
|
1
|
+
import type { SubCommand, Context, PrinterService } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
|
+
import { PRINTER_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
7
3
|
import { world } from "@flowscripter/template-bun-rust-library";
|
|
8
4
|
|
|
9
5
|
const helloRustCommand: SubCommand = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CommandFactory } from "@flowscripter/dynamic-cli-framework
|
|
1
|
+
import type { CommandFactory } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
2
|
import helloCommand from "../command/HelloCommand.ts";
|
|
3
3
|
import helloRustCommand from "../command/HelloRustCommand.ts";
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ServiceProviderFactory } from "@flowscripter/dynamic-cli-framework
|
|
1
|
+
import type { ServiceProviderFactory } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
2
|
import DemoServiceProvider from "../service/DemoServiceProvider.ts";
|
|
3
3
|
|
|
4
4
|
export default class DemoServiceProviderFactory implements ServiceProviderFactory {
|
package/src/plugin.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createCLIPlugin } from "@flowscripter/dynamic-cli-framework
|
|
1
|
+
import { createCLIPlugin } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
2
|
import DemoCommandFactory from "./factory/DemoCommandFactory.ts";
|
|
3
3
|
import DemoServiceProviderFactory from "./factory/DemoServiceProviderFactory.ts";
|
|
4
4
|
|
|
@@ -3,7 +3,7 @@ import type {
|
|
|
3
3
|
ServiceInfo,
|
|
4
4
|
CLIConfig,
|
|
5
5
|
Context,
|
|
6
|
-
} from "@flowscripter/dynamic-cli-framework
|
|
6
|
+
} from "@flowscripter/dynamic-cli-framework-api";
|
|
7
7
|
import { DEMO_SERVICE_ID } from "./DemoService.ts";
|
|
8
8
|
import DefaultDemoService from "./DefaultDemoService.ts";
|
|
9
9
|
|