@flowscripter/example-cli 1.0.5 → 1.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/README.md CHANGED
@@ -30,9 +30,9 @@ In a terminal:
30
30
 
31
31
  #### Windows
32
32
 
33
- In PowerShell: **(NOTE: This does not currently work...)**
33
+ Via [Winget](https://github.com/microsoft/winget-cli):
34
34
 
35
- `curl -fsSL https://raw.githubusercontent.com/flowscripter/example-cli/main/script/install.ps1 | powershell`
35
+ `winget install Flowscripter.example-cli`
36
36
 
37
37
  #### Manual Install
38
38
 
package/bun.lock CHANGED
@@ -4,20 +4,20 @@
4
4
  "": {
5
5
  "name": "@flowscripter/example-cli",
6
6
  "dependencies": {
7
- "@flowscripter/dynamic-cli-framework": "^1.0.10",
7
+ "@flowscripter/dynamic-cli-framework": "^1.1.2",
8
8
  },
9
9
  "devDependencies": {
10
- "@types/bun": "^1.2.5",
10
+ "@types/bun": "^1.2.8",
11
11
  },
12
12
  "peerDependencies": {
13
- "typescript": "^5.8.2",
13
+ "typescript": "^5.8.3",
14
14
  },
15
15
  },
16
16
  },
17
17
  "packages": {
18
- "@flowscripter/dynamic-cli-framework": ["@flowscripter/dynamic-cli-framework@1.0.10", "", { "dependencies": { "emphasize": "^7.0.0", "fastest-levenshtein": "^1.0.16", "figlet": "^1.8.0", "highlight.js": "^11.11.1", "supports-color": "^10.0.0", "ts-log": "^2.2.7" }, "peerDependencies": { "typescript": "^5.8.2" } }, "sha512-uNGT0I6HPCnfLeRyuVDbK7ha1khJs5GpNj0Yw+lAVQ7hKxPuB/i/1lSCctKHeGllcRrxj2dc+FoJ/SFKayQzCw=="],
18
+ "@flowscripter/dynamic-cli-framework": ["@flowscripter/dynamic-cli-framework@1.1.2", "", { "dependencies": { "emphasize": "^7.0.0", "fastest-levenshtein": "^1.0.16", "figlet": "^1.8.0", "highlight.js": "^11.11.1", "prettier": "^3.5.3", "supports-color": "^10.0.0", "ts-log": "^2.2.7" }, "peerDependencies": { "typescript": "^5.8.2" } }, "sha512-Xc0Zn8vF2xG3U6ICa8r5NyCsAiQWC4MJKbm1ddl2jgH0A1VbL50EBjnkY3t4yiGPCXVgYM6ednbSJvP2z7eR2w=="],
19
19
 
20
- "@types/bun": ["@types/bun@1.2.5", "", { "dependencies": { "bun-types": "1.2.5" } }, "sha512-w2OZTzrZTVtbnJew1pdFmgV99H0/L+Pvw+z1P67HaR18MHOzYnTYOi6qzErhK8HyT+DB782ADVPPE92Xu2/Opg=="],
20
+ "@types/bun": ["@types/bun@1.2.8", "", { "dependencies": { "bun-types": "1.2.7" } }, "sha512-t8L1RvJVUghW5V+M/fL3Thbxcs0HwNsXsnTEBEfEVqGteiJToOlZ/fyOEaR1kZsNqnu+3XA4RI/qmnX4w6+S+w=="],
21
21
 
22
22
  "@types/hast": ["@types/hast@3.0.4", "", { "dependencies": { "@types/unist": "*" } }, "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ=="],
23
23
 
@@ -27,7 +27,7 @@
27
27
 
28
28
  "@types/ws": ["@types/ws@8.5.14", "", { "dependencies": { "@types/node": "*" } }, "sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw=="],
29
29
 
30
- "bun-types": ["bun-types@1.2.5", "", { "dependencies": { "@types/node": "*", "@types/ws": "~8.5.10" } }, "sha512-3oO6LVGGRRKI4kHINx5PIdIgnLRb7l/SprhzqXapmoYkFl5m4j6EvALvbDVuuBFaamB46Ap6HCUxIXNLCGy+tg=="],
30
+ "bun-types": ["bun-types@1.2.7", "", { "dependencies": { "@types/node": "*", "@types/ws": "*" } }, "sha512-P4hHhk7kjF99acXqKvltyuMQ2kf/rzIw3ylEDpCxDS9Xa0X0Yp/gJu/vDCucmWpiur5qJ0lwB2bWzOXa2GlHqA=="],
31
31
 
32
32
  "chalk": ["chalk@5.4.1", "", {}, "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w=="],
33
33
 
@@ -45,11 +45,13 @@
45
45
 
46
46
  "lowlight": ["lowlight@3.1.0", "", { "dependencies": { "@types/hast": "^3.0.0", "devlop": "^1.0.0", "highlight.js": "~11.9.0" } }, "sha512-CEbNVoSikAxwDMDPjXlqlFYiZLkDJHwyGu/MfOsJnF3d7f3tds5J3z8s/l9TMXhzfsJCCJEAsD78842mwmg0PQ=="],
47
47
 
48
+ "prettier": ["prettier@3.5.3", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw=="],
49
+
48
50
  "supports-color": ["supports-color@10.0.0", "", {}, "sha512-HRVVSbCCMbj7/kdWF9Q+bbckjBHLtHMEoJWlkmYzzdwhYMkjkOwubLM6t7NbWKjgKamGDrWL1++KrjUO1t9oAQ=="],
49
51
 
50
52
  "ts-log": ["ts-log@2.2.7", "", {}, "sha512-320x5Ggei84AxzlXp91QkIGSw5wgaLT6GeAH0KsqDmRZdVWW2OiSeVvElVoatk3f7nicwXlElXsoFkARiGE2yg=="],
51
53
 
52
- "typescript": ["typescript@5.8.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ=="],
54
+ "typescript": ["typescript@5.8.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ=="],
53
55
 
54
56
  "undici-types": ["undici-types@6.20.0", "", {}, "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg=="],
55
57
 
package/package.json CHANGED
@@ -19,17 +19,17 @@
19
19
  ],
20
20
  "module": "index.ts",
21
21
  "type": "module",
22
- "version": "1.0.5",
22
+ "version": "1.0.7",
23
23
  "publishConfig": {
24
24
  "access": "public"
25
25
  },
26
26
  "devDependencies": {
27
- "@types/bun": "^1.2.5"
27
+ "@types/bun": "^1.2.8"
28
28
  },
29
29
  "peerDependencies": {
30
- "typescript": "^5.8.2"
30
+ "typescript": "^5.8.3"
31
31
  },
32
32
  "dependencies": {
33
- "@flowscripter/dynamic-cli-framework": "^1.0.10"
33
+ "@flowscripter/dynamic-cli-framework": "^1.1.2"
34
34
  }
35
35
  }
package/tests/cli_test.ts CHANGED
@@ -3,12 +3,12 @@ import { describe, expect, spyOn, test } from "bun:test";
3
3
  import { cli } from "../src/cli.ts";
4
4
 
5
5
  describe("ExampleCli Tests", () => {
6
- test("CLI Test", async () => {
6
+ test("CLI Test", () => {
7
7
  const mockExit = spyOn(process, "exit").mockImplementation(() => {
8
8
  throw new Error("Mock exit");
9
9
  });
10
10
 
11
- await expect(cli()).rejects.toThrow("Mock exit");
11
+ expect(cli()).rejects.toThrow("Mock exit");
12
12
 
13
13
  expect(mockExit).toHaveBeenCalledWith(2);
14
14
  mockExit.mockRestore();
@@ -1,31 +0,0 @@
1
- # Set exit on error
2
- $ErrorActionPreference = "Stop"
3
-
4
- # URL of the ZIP file containing the executable
5
- $zipUrl = "https://github.com/flowscripter/example-cli/releases/latest/download/example-cli_Windows_x86_64.zip"
6
- $installDir = "$env:ProgramFiles\example-cli"
7
-
8
- # Create a temporary directory to download the ZIP
9
- $tempDir = [System.IO.Path]::Combine($env:TEMP, "flowscripter_install")
10
- New-Item -ItemType Directory -Force -Path $tempDir
11
-
12
- # Download the ZIP file
13
- Write-Host "Downloading example-cli..."
14
- Invoke-WebRequest -Uri $zipUrl -OutFile "$tempDir\executable.zip"
15
-
16
- # Extract the ZIP file
17
- Write-Host "Extracting the ZIP file..."
18
- Expand-Archive -Path "$tempDir\executable.zip" -DestinationPath $tempDir -Force
19
-
20
- # Install the executable
21
- Write-Host "Installing the executable..."
22
- Move-Item -Path "$tempDir\example-cli.exe" -Destination $installDir -Force
23
-
24
- # Add the executable to the system PATH (for all users)
25
- $env:Path += ";$installDir"
26
- [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)
27
-
28
- # Clean up temporary files
29
- Remove-Item -Recurse -Force $tempDir
30
-
31
- Write-Host "✅ Installation complete! You can now run 'example-cli' from any command prompt."