@flowscripter/flowscripter-io-cli 3.0.5 → 3.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 CHANGED
@@ -5,10 +5,10 @@
5
5
  "": {
6
6
  "name": "@flowscripter/flowscripter-io-cli",
7
7
  "dependencies": {
8
- "@flowscripter/dynamic-cli-framework": "^9.1.3",
8
+ "@flowscripter/dynamic-cli-framework": "^11.0.0",
9
9
  "@flowscripter/dynamic-cli-framework-api": "^5.0.2",
10
10
  "@flowscripter/dynamic-plugin-framework": "^2.2.25",
11
- "@flowscripter/flowscripter-io-cli-hash-native": "^1.0.18",
11
+ "@flowscripter/flowscripter-io-cli-hash-native": "^2.0.0",
12
12
  "@flowscripter/pluggable-io-framework": "^2.1.2",
13
13
  "@flowscripter/pluggable-io-framework-api": "^3.1.3",
14
14
  "zod": "^4.6.7",
@@ -26,13 +26,13 @@
26
26
  },
27
27
  },
28
28
  "packages": {
29
- "@flowscripter/dynamic-cli-framework": ["@flowscripter/dynamic-cli-framework@9.1.3", "", { "dependencies": { "@flowscripter/dynamic-cli-framework-api": "^5.0.2", "@flowscripter/dynamic-plugin-framework": "^2.2.22", "emphasize": "^7.0.0", "fastest-levenshtein": "^1.0.16", "figlet": "^1.12.0", "highlight.js": "^11.12.0", "prettier": "^3.9.10", "semver": "^7.8.5", "supports-color": "^11.0.0", "supports-terminal-graphics": "^0.1.0" }, "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-Mz5JIAkNWw+SHajpqVhsep+ECTdVJj6+bUmojacllbnPbihZj2WIf2bSdGKqFlvrF+lA/weyjufxuHvjvQC1VQ=="],
29
+ "@flowscripter/dynamic-cli-framework": ["@flowscripter/dynamic-cli-framework@11.0.0", "", { "dependencies": { "@flowscripter/dynamic-cli-framework-api": "^5.0.2", "@flowscripter/dynamic-plugin-framework": "^2.2.22", "emphasize": "^7.0.0", "fastest-levenshtein": "^1.0.16", "figlet": "^1.12.0", "highlight.js": "^11.12.0", "prettier": "^3.9.10", "semver": "^7.8.5", "supports-color": "^11.0.0", "supports-terminal-graphics": "^0.1.0" }, "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-gNNR5xmHM18CmnNGPIqScypxZkMXRoPqRDhJSPOxYdkrT+fXepXs4Hj+XOCY8Fxyx11kywEtd7+eFdGz/MYQ1Q=="],
30
30
 
31
31
  "@flowscripter/dynamic-cli-framework-api": ["@flowscripter/dynamic-cli-framework-api@5.0.2", "", { "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-e5eUP/6S9KTY6Va0mhe/UmIrt0W9k5KDnugvhiQxlGbqcGnzuwjhHvmXdeYSjHTaUSxcj8YTWvDIsj7m2P1c1w=="],
32
32
 
33
33
  "@flowscripter/dynamic-plugin-framework": ["@flowscripter/dynamic-plugin-framework@2.2.25", "", { "dependencies": { "semver": "^7.8.5" }, "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-12bvEep1XsbTS2kFwhd5veLUFU6pQxgKqOT4x8K8j/aS/uBzGMoeLgiHh+9kp8BpfJmwnPLQrFPj7/ffdPxZPw=="],
34
34
 
35
- "@flowscripter/flowscripter-io-cli-hash-native": ["@flowscripter/flowscripter-io-cli-hash-native@1.0.18", "", { "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-r726UVFwuyawFoRvCEl+zcdnZKhxydw0eUVk4yYSZXjTtc/evVj3LvP0PSQits3aHbcj4k/UD0sH1MliMoWyyw=="],
35
+ "@flowscripter/flowscripter-io-cli-hash-native": ["@flowscripter/flowscripter-io-cli-hash-native@2.0.0", "", { "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-4Ntzvqr+iK5N2k/zhPlCBO+/hVZQCaolSKir+ey3Fl23cLXFt3QbVyMuwLLNtdXWG54Crfso4ogn/D7yMvTusA=="],
36
36
 
37
37
  "@flowscripter/io-plugin-filesystem": ["@flowscripter/io-plugin-filesystem@2.0.3", "", { "dependencies": { "@flowscripter/pluggable-io-framework-api": "^3.1.2", "zod": "^4.6.6" }, "peerDependencies": { "@flowscripter/dynamic-plugin-framework": "*", "typescript": "^7.0.2" } }, "sha512-RYYXfy3t7Nt0w3b+BmxIn1CdsyMh6z/3BoCTFLqkhMSe+3tcQs+jLnZp1f456FQKR3hq5dS4MxAalaepfdy4fg=="],
38
38
 
@@ -3,5 +3,5 @@ boto3
3
3
  moto[s3]
4
4
  flask
5
5
  flask-cors
6
- # last release with a Windows ARM wheel; later ones need a Rust toolchain to build there
7
- cryptography==46.0.3
6
+ # cryptography (pulled in by moto): releases after 46.0.3 have no Windows ARM wheel and need a Rust toolchain to build there
7
+ cryptography<=46.0.3; sys_platform == "win32" and platform_machine == "ARM64"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowscripter/flowscripter-io-cli",
3
- "version": "3.0.5",
3
+ "version": "3.0.7",
4
4
  "description": "CLI for https://github.com/flowscripter/pluggable-io-framework",
5
5
  "keywords": [
6
6
  "bun",
@@ -21,10 +21,10 @@
21
21
  "access": "public"
22
22
  },
23
23
  "dependencies": {
24
- "@flowscripter/dynamic-cli-framework": "^9.1.3",
24
+ "@flowscripter/dynamic-cli-framework": "^11.0.0",
25
25
  "@flowscripter/dynamic-cli-framework-api": "^5.0.2",
26
26
  "@flowscripter/dynamic-plugin-framework": "^2.2.25",
27
- "@flowscripter/flowscripter-io-cli-hash-native": "^1.0.18",
27
+ "@flowscripter/flowscripter-io-cli-hash-native": "^2.0.0",
28
28
  "@flowscripter/pluggable-io-framework": "^2.1.2",
29
29
  "@flowscripter/pluggable-io-framework-api": "^3.1.3",
30
30
  "zod": "^4.6.7"
@@ -11,7 +11,7 @@ import {
11
11
  } from "@flowscripter/dynamic-cli-framework";
12
12
  import type { ProviderRegistry } from "@flowscripter/pluggable-io-framework";
13
13
  import { type Item, PayloadKind } from "@flowscripter/pluggable-io-framework-api";
14
- import { Sha256Hasher } from "@flowscripter/flowscripter-io-cli-hash-native";
14
+ import { initNativeLib, Sha256Hasher } from "@flowscripter/flowscripter-io-cli-hash-native";
15
15
  import { createByteScale } from "../util/byteScale.ts";
16
16
  import { createLocationOption } from "../util/location/createLocationOption.ts";
17
17
  import { toStructuredLocation } from "../util/location/toStructuredLocation.ts";
@@ -112,6 +112,7 @@ async function hashWithNativeSha256(
112
112
  reader: ReadableStreamDefaultReader<Item>,
113
113
  onChunk: (chunkLength: number) => void,
114
114
  ): Promise<string> {
115
+ await initNativeLib();
115
116
  const hasher = new Sha256Hasher();
116
117
  for (;;) {
117
118
  const { done, value } = await reader.read();
@@ -0,0 +1,23 @@
1
+ import { expect, test } from "bun:test";
2
+ import { existsSync, mkdtempSync, rmSync } from "node:fs";
3
+ import { tmpdir } from "node:os";
4
+ import { join } from "node:path";
5
+
6
+ test("importing the hash command does not resolve or download the native library", async () => {
7
+ const home = mkdtempSync(join(tmpdir(), "hash-lazy-load-"));
8
+ try {
9
+ const hashModule = join(import.meta.dir, "../../src/commands/hash.ts");
10
+ const proc = Bun.spawn(
11
+ [process.execPath, "--eval", "await import(process.argv[1])", hashModule],
12
+ {
13
+ env: { ...process.env, HOME: home, USERPROFILE: home },
14
+ stdout: "pipe",
15
+ stderr: "pipe",
16
+ },
17
+ );
18
+ expect(await proc.exited).toBe(0);
19
+ expect(existsSync(join(home, ".flowscripter"))).toBe(false);
20
+ } finally {
21
+ rmSync(home, { recursive: true, force: true });
22
+ }
23
+ });