@flowscripter/example-cli 1.8.4 → 1.8.6

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 CHANGED
@@ -5,9 +5,9 @@
5
5
  "": {
6
6
  "name": "@flowscripter/example-cli",
7
7
  "dependencies": {
8
- "@flowscripter/dynamic-cli-framework": "5.1.1",
8
+ "@flowscripter/dynamic-cli-framework": "5.1.8",
9
9
  "@flowscripter/dynamic-cli-framework-api": "^1.5.0",
10
- "@flowscripter/dynamic-plugin-framework": "2.1.1",
10
+ "@flowscripter/dynamic-plugin-framework": "2.2.2",
11
11
  },
12
12
  "devDependencies": {
13
13
  "@types/bun": "^1.3.14",
@@ -21,11 +21,11 @@
21
21
  },
22
22
  },
23
23
  "packages": {
24
- "@flowscripter/dynamic-cli-framework": ["@flowscripter/dynamic-cli-framework@5.1.1", "", { "dependencies": { "@flowscripter/dynamic-cli-framework-api": "^2.0.0", "@flowscripter/dynamic-plugin-framework": "2.1.1", "emphasize": "^7.0.0", "fastest-levenshtein": "^1.0.16", "figlet": "^1.11.0", "highlight.js": "^11.11.1", "prettier": "^3.9.4", "semver": "^7.7.3", "supports-color": "^10.2.2", "supports-terminal-graphics": "^0.1.0" }, "peerDependencies": { "typescript": "^6.0.3" } }, "sha512-g/GVKxyWmGMzf/exd8th0xTBXmj2vyRNStUAjP1cBkxtz8SOpwXDinSE/rgbElaPQGo43HlLFyoHqriWQHKdbQ=="],
24
+ "@flowscripter/dynamic-cli-framework": ["@flowscripter/dynamic-cli-framework@5.1.8", "", { "dependencies": { "@flowscripter/dynamic-cli-framework-api": "^2.3.0", "@flowscripter/dynamic-plugin-framework": "^2.2.2", "emphasize": "^7.0.0", "fastest-levenshtein": "^1.0.16", "figlet": "^1.11.0", "highlight.js": "^11.11.1", "prettier": "^3.9.4", "semver": "^7.7.3", "supports-color": "^10.2.2", "supports-terminal-graphics": "^0.1.0" }, "peerDependencies": { "typescript": "^6.0.3" } }, "sha512-hdfY6maJK66PuCiXkvQcp6mbAKXWVSEQE8S4T061l1xVllc8iAMD0nSFvi05M5lg3lxvcewRIF/MTRgHrAHsPw=="],
25
25
 
26
26
  "@flowscripter/dynamic-cli-framework-api": ["@flowscripter/dynamic-cli-framework-api@1.5.0", "", { "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-Tjs5rtaL7kEVZAdO2bM1vdbzCp5R5qGJxRFif6T1uilV5qQaVF92t1R90ndjSSb9G9KnyTDdhHe+NbpDOllvtA=="],
27
27
 
28
- "@flowscripter/dynamic-plugin-framework": ["@flowscripter/dynamic-plugin-framework@2.1.1", "", { "dependencies": { "semver": "^7.8.5" }, "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-0fHxgPAsb1xrnv3J8YdNtK0eOhTuKzM6J/fU4IYJEj5y8qlj7v1SZIO3+jvN3y8aEgYRxd6B2GAfXKk9WGR2Pg=="],
28
+ "@flowscripter/dynamic-plugin-framework": ["@flowscripter/dynamic-plugin-framework@2.2.2", "", { "dependencies": { "semver": "^7.8.5" }, "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-S/YbHmfu3anV23jrAm+LefvnjLscyXvIpDwwyPjKJOpk8mcofedVMAYkF6JbZkeYNC7+i0Zvu3Zn/k0Wk5wNjQ=="],
29
29
 
30
30
  "@oxfmt/binding-android-arm-eabi": ["@oxfmt/binding-android-arm-eabi@0.56.0", "", { "os": "android", "cpu": "arm" }, "sha512-CSCxi7ovYojgfdPOdUb9T508HKeAdDIKeRGg7x8IZwVJrWz9gVgX7MbUnFqtQAE4QvoNo07mj2JlwnOzJw4qqA=="],
31
31
 
@@ -149,7 +149,7 @@
149
149
 
150
150
  "undici-types": ["undici-types@8.3.0", "", {}, "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ=="],
151
151
 
152
- "@flowscripter/dynamic-cli-framework/@flowscripter/dynamic-cli-framework-api": ["@flowscripter/dynamic-cli-framework-api@2.0.0", "", { "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-jeSfXanm+RED9zKSxStOJYmDRi3t7bAaDNSQxI+KhraUMb0iTt+TiWPmDZyBN/Bc76hDX9W/lqN7041OALl2pA=="],
152
+ "@flowscripter/dynamic-cli-framework/@flowscripter/dynamic-cli-framework-api": ["@flowscripter/dynamic-cli-framework-api@2.3.0", "", { "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-L9seTKhhg08RcxSSCZOtDZKWYpHPyMQ2B3PqViqY9iFWitctsZqHjmFi636CEknM1CsXnzdNgSGsusg+pmDRJQ=="],
153
153
 
154
154
  "emphasize/highlight.js": ["highlight.js@11.9.0", "", {}, "sha512-fJ7cW7fQGCYAkgv4CPfwFHrfd/cLS4Hau96JuJ+ZTOWhjnhoeN1ub1tFmALm/+lW5z4WCAuAV9bm05AP0mS6Gw=="],
155
155
 
@@ -2,7 +2,7 @@ Feature: Plugin management
2
2
 
3
3
  Note: These scenarios require @flowscripter/example-cli-plugin to be
4
4
  published on npmjs.com and the test machine to have network access.
5
- The plugin install folder is ~/.example-cli/plugins.
5
+ The plugin install folder is ~/.examplecli/plugins.
6
6
 
7
7
  Scenario: Search for example-cli-plugin on npmjs
8
8
  When the executable is launched with "plugin:search example-cli-plugin"
@@ -13,12 +13,22 @@ Feature: Plugin management
13
13
  When the executable is launched with "plugin:list"
14
14
  Then the executable should complete with exit code 0
15
15
 
16
+ Scenario: Attempt to add a plugin that does not exist in the registry
17
+ When the executable stdout is captured for "--no-prompt plugin:add @flowscripter/example-cli-plugin-does-not-exist-xyz" with timeout 60s
18
+ Then the captured process should complete with exit code 3
19
+ And the stderr should contain "Plugin @flowscripter/example-cli-plugin-does-not-exist-xyz was not found in the configured plugin registry"
20
+
21
+ Scenario: Attempt to add a non-existent version of an existing plugin
22
+ When the executable stdout is captured for "--no-prompt plugin:add @flowscripter/example-cli-plugin:0.0.0-does-not-exist" with timeout 60s
23
+ Then the captured process should complete with exit code 3
24
+ And the stderr should contain "Version 0.0.0-does-not-exist of plugin @flowscripter/example-cli-plugin was not found in the configured plugin registry"
25
+
16
26
  Scenario: Install example-cli-plugin
17
27
  When the executable stdout is captured for "--no-prompt plugin:add @flowscripter/example-cli-plugin" with timeout 60s
18
28
  Then the captured process should complete with exit code 0
19
29
  And the stdout should contain "installed"
20
30
  And the stderr should contain "Searching for plugin: @flowscripter/example-cli-plugin\n"
21
- And the stderr should contain "Installing @flowscripter/example-cli-plugin...\n"
31
+ And the stderr should contain "Installing @flowscripter/example-cli-plugin"
22
32
 
23
33
  Scenario: Installing example-cli-plugin does not pull in the full dynamic-cli-framework
24
34
  Then the installed plugin dependencies should not include "figlet, emphasize, highlight.js, prettier, supports-color, supports-terminal-graphics"
@@ -105,7 +105,7 @@ def step_impl(context):
105
105
 
106
106
  @then('the installed plugin dependencies should not include "{packages}"')
107
107
  def step_impl(context, packages):
108
- plugins_node_modules = os.path.expanduser('~/.example-cli/plugins/node_modules')
108
+ plugins_node_modules = os.path.expanduser('~/.examplecli/plugins/node_modules')
109
109
  found = []
110
110
  for package in packages.split(','):
111
111
  package = package.strip()
@@ -3,7 +3,7 @@ import os
3
3
  from behave import then
4
4
 
5
5
  PLUGINS_NODE_MODULES = os.path.expanduser(
6
- os.path.join('~', '.example-cli', 'plugins', 'node_modules')
6
+ os.path.join('~', '.examplecli', 'plugins', 'node_modules')
7
7
  )
8
8
 
9
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowscripter/example-cli",
3
- "version": "1.8.4",
3
+ "version": "1.8.6",
4
4
  "description": "Simple example CLI using https://github.com/flowscripter/dynamic-cli-framework",
5
5
  "keywords": [
6
6
  "bun",
@@ -24,9 +24,9 @@
24
24
  "access": "public"
25
25
  },
26
26
  "dependencies": {
27
- "@flowscripter/dynamic-cli-framework": "5.1.1",
27
+ "@flowscripter/dynamic-cli-framework": "5.1.8",
28
28
  "@flowscripter/dynamic-cli-framework-api": "^1.5.0",
29
- "@flowscripter/dynamic-plugin-framework": "2.1.1"
29
+ "@flowscripter/dynamic-plugin-framework": "2.2.2"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/bun": "^1.3.14",
package/src/cli.ts CHANGED
@@ -13,7 +13,7 @@ import path from "node:path";
13
13
  import os from "node:os";
14
14
 
15
15
  export async function cli(): Promise<void> {
16
- const pluginsDir = path.join(os.homedir(), ".example-cli", "plugins", "node_modules");
16
+ const pluginsDir = path.join(os.homedir(), ".examplecli", "plugins", "node_modules");
17
17
 
18
18
  await launchMultiCommandCLI(
19
19
  [demo],