@flowscripter/flowscripter-io-cli 2.0.6 → 2.0.8
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/bun.lock +6 -6
- package/package.json +4 -4
- package/src/cli.ts +21 -13
- package/tests/cli_test.ts +10 -0
package/bun.lock
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
"": {
|
|
6
6
|
"name": "@flowscripter/flowscripter-io-cli",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@flowscripter/dynamic-cli-framework": "^7.0.
|
|
8
|
+
"@flowscripter/dynamic-cli-framework": "^7.0.7",
|
|
9
9
|
"@flowscripter/dynamic-cli-framework-api": "^4.0.4",
|
|
10
|
-
"@flowscripter/dynamic-plugin-framework": "^2.2.
|
|
10
|
+
"@flowscripter/dynamic-plugin-framework": "^2.2.14",
|
|
11
11
|
"@flowscripter/flowscripter-io-cli-hash-native": "^1.0.11",
|
|
12
|
-
"@flowscripter/pluggable-io-framework": "^1.2.
|
|
12
|
+
"@flowscripter/pluggable-io-framework": "^1.2.6",
|
|
13
13
|
"@flowscripter/pluggable-io-framework-api": "^1.1.5",
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
@@ -25,17 +25,17 @@
|
|
|
25
25
|
},
|
|
26
26
|
},
|
|
27
27
|
"packages": {
|
|
28
|
-
"@flowscripter/dynamic-cli-framework": ["@flowscripter/dynamic-cli-framework@7.0.
|
|
28
|
+
"@flowscripter/dynamic-cli-framework": ["@flowscripter/dynamic-cli-framework@7.0.7", "", { "dependencies": { "@flowscripter/dynamic-cli-framework-api": "^4.0.4", "@flowscripter/dynamic-plugin-framework": "^2.2.14", "emphasize": "^7.0.0", "fastest-levenshtein": "^1.0.16", "figlet": "^1.12.0", "highlight.js": "^11.12.0", "prettier": "^3.9.9", "semver": "^7.8.5", "supports-color": "^11.0.0", "supports-terminal-graphics": "^0.1.0" }, "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-7n99Cw6FP1rL8UbK5++TTf/+1dybRDCxm67VPV0tcVLLXIkxzVU/SKUB+kGzs3hkVVYyHBbWWRdQ8GHLTeE3pw=="],
|
|
29
29
|
|
|
30
30
|
"@flowscripter/dynamic-cli-framework-api": ["@flowscripter/dynamic-cli-framework-api@4.0.4", "", { "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-Vb+dUEuQ48maXEUYJ906hrvcRxRtTkCXIJs6CEPDzgVZ7WVYgf1YXU/PNaxEhZ+On4RmMwvpej4Du6rci4Y48Q=="],
|
|
31
31
|
|
|
32
|
-
"@flowscripter/dynamic-plugin-framework": ["@flowscripter/dynamic-plugin-framework@2.2.
|
|
32
|
+
"@flowscripter/dynamic-plugin-framework": ["@flowscripter/dynamic-plugin-framework@2.2.14", "", { "dependencies": { "semver": "^7.8.5" }, "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-I91cuIMSzhZ/ZZzqtmYyX9sw6TVFGDxRa1PMFPJBJYcydov+kxIbrRUUU9RHSjVO38eBZ6eugklDu0lJnNDaAQ=="],
|
|
33
33
|
|
|
34
34
|
"@flowscripter/flowscripter-io-cli-hash-native": ["@flowscripter/flowscripter-io-cli-hash-native@1.0.11", "", { "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-P+hMdGcLQBsnJLtay1F4s/ICSb/vSEudp9jUVGiep039WGyqmR65RBw2UE97jpDh+W25fqf7rMX0hAccmxEFfQ=="],
|
|
35
35
|
|
|
36
36
|
"@flowscripter/io-plugin-filesystem": ["@flowscripter/io-plugin-filesystem@1.1.4", "", { "dependencies": { "@flowscripter/pluggable-io-framework-api": "^1.1.4", "zod": "^4.6.5" }, "peerDependencies": { "@flowscripter/dynamic-plugin-framework": "*", "typescript": "^7.0.2" } }, "sha512-okOjoNoe1MP6KVjq1jrfI7YfBMIeEfN9LP+lWllWDdUVADwe3FDEQ3AR1voJ/PShCKqz1wJ29V6o9zpgpYeg2w=="],
|
|
37
37
|
|
|
38
|
-
"@flowscripter/pluggable-io-framework": ["@flowscripter/pluggable-io-framework@1.2.
|
|
38
|
+
"@flowscripter/pluggable-io-framework": ["@flowscripter/pluggable-io-framework@1.2.6", "", { "dependencies": { "@flowscripter/dynamic-plugin-framework": "^2.2.12", "@flowscripter/pluggable-io-framework-api": "^1.1.5" }, "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-uNUggNta66PAjg8akcf47UlGiM2WzBFW/0jAGfhtwm2+2nac1yBSaSzckhwrDNXV0DrQUyzX8JPtg97j5YHt7w=="],
|
|
39
39
|
|
|
40
40
|
"@flowscripter/pluggable-io-framework-api": ["@flowscripter/pluggable-io-framework-api@1.1.5", "", { "dependencies": { "zod": "^4.6.5", "zod-to-json-schema": "^3.25.2" }, "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-yURur0ApqyiAgqL1hTkAPlgMRzD+c/pBepLhAa9wvuYYQKihhvTfbyCeik8N9SHrlB+I+HG56DW9D9TEr6sFwg=="],
|
|
41
41
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowscripter/flowscripter-io-cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.8",
|
|
4
4
|
"description": "CLI for https://github.com/flowscripter/pluggable-io-framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bun",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"access": "public"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@flowscripter/dynamic-cli-framework": "^7.0.
|
|
24
|
+
"@flowscripter/dynamic-cli-framework": "^7.0.7",
|
|
25
25
|
"@flowscripter/dynamic-cli-framework-api": "^4.0.4",
|
|
26
|
-
"@flowscripter/dynamic-plugin-framework": "^2.2.
|
|
26
|
+
"@flowscripter/dynamic-plugin-framework": "^2.2.14",
|
|
27
27
|
"@flowscripter/flowscripter-io-cli-hash-native": "^1.0.11",
|
|
28
|
-
"@flowscripter/pluggable-io-framework": "^1.2.
|
|
28
|
+
"@flowscripter/pluggable-io-framework": "^1.2.6",
|
|
29
29
|
"@flowscripter/pluggable-io-framework-api": "^1.1.5"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
package/src/cli.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
type BaseCLIFeatureOptions,
|
|
2
3
|
PrettyPrinterServiceProvider,
|
|
3
4
|
SyntaxHighlighterServiceProvider,
|
|
4
5
|
launchMultiCommandCLI,
|
|
@@ -16,6 +17,25 @@ import {
|
|
|
16
17
|
} from "./pluginsDir.ts";
|
|
17
18
|
import packageJson from "../package.json";
|
|
18
19
|
|
|
20
|
+
export function getCLIFeatureOptions(): BaseCLIFeatureOptions {
|
|
21
|
+
return {
|
|
22
|
+
argumentPrompterServiceEnabled: true,
|
|
23
|
+
// The spawn service lets plugin:add/plugin:remove quote the package manager output and
|
|
24
|
+
// clear it on success.
|
|
25
|
+
spawnServiceEnabled: true,
|
|
26
|
+
pluginServiceEnabled: true,
|
|
27
|
+
pluginServiceRemoteConfig: {
|
|
28
|
+
name: "npmjs",
|
|
29
|
+
registryUrl: "https://registry.npmjs.org",
|
|
30
|
+
packageJsonNamespace: PLUGGABLE_IO_FRAMEWORK_PACKAGE_JSON_NAMESPACE,
|
|
31
|
+
},
|
|
32
|
+
pluginServiceLocalConfig: {
|
|
33
|
+
nodeModulesPath: getPluginsNodeModulesPath(),
|
|
34
|
+
packageJsonNamespace: PLUGGABLE_IO_FRAMEWORK_PACKAGE_JSON_NAMESPACE,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
19
39
|
export async function cli(): Promise<void> {
|
|
20
40
|
await launchMultiCommandCLI(
|
|
21
41
|
[list, getProperties, setProperties, deleteCommand, copy, move, hash],
|
|
@@ -23,18 +43,6 @@ export async function cli(): Promise<void> {
|
|
|
23
43
|
"flowscripter-io-cli",
|
|
24
44
|
packageJson.version,
|
|
25
45
|
[new PrettyPrinterServiceProvider(40), new SyntaxHighlighterServiceProvider(35)],
|
|
26
|
-
|
|
27
|
-
argumentPrompterServiceEnabled: true,
|
|
28
|
-
pluginServiceEnabled: true,
|
|
29
|
-
pluginServiceRemoteConfig: {
|
|
30
|
-
name: "npmjs",
|
|
31
|
-
registryUrl: "https://registry.npmjs.org",
|
|
32
|
-
packageJsonNamespace: PLUGGABLE_IO_FRAMEWORK_PACKAGE_JSON_NAMESPACE,
|
|
33
|
-
},
|
|
34
|
-
pluginServiceLocalConfig: {
|
|
35
|
-
nodeModulesPath: getPluginsNodeModulesPath(),
|
|
36
|
-
packageJsonNamespace: PLUGGABLE_IO_FRAMEWORK_PACKAGE_JSON_NAMESPACE,
|
|
37
|
-
},
|
|
38
|
-
},
|
|
46
|
+
getCLIFeatureOptions(),
|
|
39
47
|
);
|
|
40
48
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { describe, expect, test } from "bun:test";
|
|
2
|
+
import { getCLIFeatureOptions } from "../src/cli.ts";
|
|
3
|
+
|
|
4
|
+
describe("getCLIFeatureOptions", () => {
|
|
5
|
+
test("enables the spawn service alongside the plugin service", () => {
|
|
6
|
+
const options = getCLIFeatureOptions();
|
|
7
|
+
expect(options.pluginServiceEnabled).toBeTrue();
|
|
8
|
+
expect(options.spawnServiceEnabled).toBeTrue();
|
|
9
|
+
});
|
|
10
|
+
});
|