@flowscripter/flowscripter-io-cli 2.0.5 → 2.0.7
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 +17 -17
- package/package.json +9 -9
- package/src/cli.ts +21 -13
- package/tests/cli_test.ts +10 -0
package/bun.lock
CHANGED
|
@@ -5,17 +5,17 @@
|
|
|
5
5
|
"": {
|
|
6
6
|
"name": "@flowscripter/flowscripter-io-cli",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@flowscripter/dynamic-cli-framework": "^7.0.
|
|
9
|
-
"@flowscripter/dynamic-cli-framework-api": "^4.0.
|
|
10
|
-
"@flowscripter/dynamic-plugin-framework": "^2.2.
|
|
11
|
-
"@flowscripter/flowscripter-io-cli-hash-native": "^1.0.
|
|
12
|
-
"@flowscripter/pluggable-io-framework": "^1.2.
|
|
13
|
-
"@flowscripter/pluggable-io-framework-api": "^1.1.
|
|
8
|
+
"@flowscripter/dynamic-cli-framework": "^7.0.4",
|
|
9
|
+
"@flowscripter/dynamic-cli-framework-api": "^4.0.4",
|
|
10
|
+
"@flowscripter/dynamic-plugin-framework": "^2.2.12",
|
|
11
|
+
"@flowscripter/flowscripter-io-cli-hash-native": "^1.0.11",
|
|
12
|
+
"@flowscripter/pluggable-io-framework": "^1.2.5",
|
|
13
|
+
"@flowscripter/pluggable-io-framework-api": "^1.1.5",
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@flowscripter/io-plugin-filesystem": "^1.1.
|
|
16
|
+
"@flowscripter/io-plugin-filesystem": "^1.1.4",
|
|
17
17
|
"@types/bun": "^1.4.2",
|
|
18
|
-
"@types/node": "^26.6.
|
|
18
|
+
"@types/node": "^26.6.3",
|
|
19
19
|
"oxfmt": "0.70.0",
|
|
20
20
|
"oxlint": "1.85.0",
|
|
21
21
|
},
|
|
@@ -25,19 +25,19 @@
|
|
|
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.4", "", { "dependencies": { "@flowscripter/dynamic-cli-framework-api": "^4.0.4", "@flowscripter/dynamic-plugin-framework": "^2.2.12", "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-L7OzO3EioOMpyBea2bOuWv2QlQrOnWDrTEQFe05thtZ2aVM8LfY3YcHY7bNhsZESxFfwehAkCD36CwUIVDhudA=="],
|
|
29
29
|
|
|
30
|
-
"@flowscripter/dynamic-cli-framework-api": ["@flowscripter/dynamic-cli-framework-api@4.0.
|
|
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.12", "", { "dependencies": { "semver": "^7.8.5" }, "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-eRVQfiYzFQKVTLR6m/f3IkgAYY9BaiyU5/JM47WdPPUxblCjVNrNy+YjxviNsOa+ljDaA+u4d9aTP1Bv7xwlEQ=="],
|
|
33
33
|
|
|
34
|
-
"@flowscripter/flowscripter-io-cli-hash-native": ["@flowscripter/flowscripter-io-cli-hash-native@1.0.
|
|
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
|
-
"@flowscripter/io-plugin-filesystem": ["@flowscripter/io-plugin-filesystem@1.1.
|
|
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.5", "", { "dependencies": { "@flowscripter/dynamic-plugin-framework": "^2.2.12", "@flowscripter/pluggable-io-framework-api": "^1.1.5" }, "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-rAjsPkn5VyVtYV66f9eLCHj3Z6YVv+RT03bzlKqExhhByQXRPRuIwnCaC6IXx9c3G9DVdbtdBfaqE5U21L04DQ=="],
|
|
39
39
|
|
|
40
|
-
"@flowscripter/pluggable-io-framework-api": ["@flowscripter/pluggable-io-framework-api@1.1.
|
|
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
|
|
|
42
42
|
"@oxfmt/binding-android-arm-eabi": ["@oxfmt/binding-android-arm-eabi@0.70.0", "", { "os": "android", "cpu": "arm" }, "sha512-Xd7YO4/T2axEj6FTLcj4Why3mTBqFMg+x24xtorT4Lb2+1g82090GH0a/4U1m0pABGYiix2bq1pqkYrmV3f0Sw=="],
|
|
43
43
|
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
|
|
120
120
|
"@types/hast": ["@types/hast@3.0.5", "", { "dependencies": { "@types/unist": "*" } }, "sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g=="],
|
|
121
121
|
|
|
122
|
-
"@types/node": ["@types/node@26.6.
|
|
122
|
+
"@types/node": ["@types/node@26.6.3", "", { "dependencies": { "undici-types": "~8.9.0" } }, "sha512-dsqMQQoeTLqu9wynDD00q573mNzso3IdQOAfHRJqLCcmCFPoGo9A1bDpUcv/9tnKpErQWv9uKeGfl37EIS02Yg=="],
|
|
123
123
|
|
|
124
124
|
"@types/unist": ["@types/unist@3.0.3", "", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="],
|
|
125
125
|
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
|
|
178
178
|
"fastest-levenshtein": ["fastest-levenshtein@1.0.16", "", {}, "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg=="],
|
|
179
179
|
|
|
180
|
-
"figlet": ["figlet@1.
|
|
180
|
+
"figlet": ["figlet@1.12.0", "", { "dependencies": { "commander": "^14.0.0" }, "bin": { "figlet": "bin/index.js" } }, "sha512-Ith3WsUi0N/EqGt+0/F6XnWhT04sohhH2tT0Dq7GdUmWbMTIoCbg2Jq9qKggmTO62ST5kRCfB311EmIMbizGyA=="],
|
|
181
181
|
|
|
182
182
|
"highlight.js": ["highlight.js@11.12.0", "", {}, "sha512-nbfWpyRMcMrPMmDwJB+dhX/eiaPKtc2RB+0QZskqJ3WjRA/FDS0e9hZrx8EC/lbEv8gXy98FcDbNa/dspAaJMg=="],
|
|
183
183
|
|
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.7",
|
|
4
4
|
"description": "CLI for https://github.com/flowscripter/pluggable-io-framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bun",
|
|
@@ -21,17 +21,17 @@
|
|
|
21
21
|
"access": "public"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@flowscripter/dynamic-cli-framework": "^7.0.
|
|
25
|
-
"@flowscripter/dynamic-cli-framework-api": "^4.0.
|
|
26
|
-
"@flowscripter/dynamic-plugin-framework": "^2.2.
|
|
27
|
-
"@flowscripter/flowscripter-io-cli-hash-native": "^1.0.
|
|
28
|
-
"@flowscripter/pluggable-io-framework": "^1.2.
|
|
29
|
-
"@flowscripter/pluggable-io-framework-api": "^1.1.
|
|
24
|
+
"@flowscripter/dynamic-cli-framework": "^7.0.4",
|
|
25
|
+
"@flowscripter/dynamic-cli-framework-api": "^4.0.4",
|
|
26
|
+
"@flowscripter/dynamic-plugin-framework": "^2.2.12",
|
|
27
|
+
"@flowscripter/flowscripter-io-cli-hash-native": "^1.0.11",
|
|
28
|
+
"@flowscripter/pluggable-io-framework": "^1.2.5",
|
|
29
|
+
"@flowscripter/pluggable-io-framework-api": "^1.1.5"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@flowscripter/io-plugin-filesystem": "^1.1.
|
|
32
|
+
"@flowscripter/io-plugin-filesystem": "^1.1.4",
|
|
33
33
|
"@types/bun": "^1.4.2",
|
|
34
|
-
"@types/node": "^26.6.
|
|
34
|
+
"@types/node": "^26.6.3",
|
|
35
35
|
"oxfmt": "0.70.0",
|
|
36
36
|
"oxlint": "1.85.0"
|
|
37
37
|
},
|
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
|
+
});
|