@flowscripter/flowscripter-io-cli 1.3.1 → 2.0.1
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 +59 -59
- package/package.json +11 -11
- package/src/byteScale.ts +16 -1
- package/src/commands/copy.ts +6 -5
- package/src/commands/hash.ts +6 -5
- package/src/commands/move.ts +6 -5
- package/tests/byteScale_test.ts +21 -0
package/bun.lock
CHANGED
|
@@ -5,19 +5,19 @@
|
|
|
5
5
|
"": {
|
|
6
6
|
"name": "@flowscripter/flowscripter-io-cli",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@flowscripter/dynamic-cli-framework": "^
|
|
9
|
-
"@flowscripter/dynamic-cli-framework-api": "^
|
|
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": "^6.0.1",
|
|
9
|
+
"@flowscripter/dynamic-cli-framework-api": "^3.0.1",
|
|
10
|
+
"@flowscripter/dynamic-plugin-framework": "^2.2.9",
|
|
11
|
+
"@flowscripter/flowscripter-io-cli-hash-native": "^1.0.7",
|
|
12
|
+
"@flowscripter/pluggable-io-framework": "^1.2.2",
|
|
13
|
+
"@flowscripter/pluggable-io-framework-api": "^1.1.2",
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@flowscripter/io-plugin-filesystem": "^1.1.
|
|
16
|
+
"@flowscripter/io-plugin-filesystem": "^1.1.1",
|
|
17
17
|
"@types/bun": "^1.4.2",
|
|
18
|
-
"@types/node": "^26.
|
|
19
|
-
"oxfmt": "0.
|
|
20
|
-
"oxlint": "1.
|
|
18
|
+
"@types/node": "^26.6.1",
|
|
19
|
+
"oxfmt": "0.68.0",
|
|
20
|
+
"oxlint": "1.83.0",
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"typescript": "^7.0.2",
|
|
@@ -25,101 +25,101 @@
|
|
|
25
25
|
},
|
|
26
26
|
},
|
|
27
27
|
"packages": {
|
|
28
|
-
"@flowscripter/dynamic-cli-framework": ["@flowscripter/dynamic-cli-framework@
|
|
28
|
+
"@flowscripter/dynamic-cli-framework": ["@flowscripter/dynamic-cli-framework@6.0.1", "", { "dependencies": { "@flowscripter/dynamic-cli-framework-api": "^3.0.1", "@flowscripter/dynamic-plugin-framework": "^2.2.9", "emphasize": "^7.0.0", "fastest-levenshtein": "^1.0.16", "figlet": "^1.11.4", "highlight.js": "^11.12.0", "prettier": "^3.9.7", "semver": "^7.8.5", "supports-color": "^11.0.0", "supports-terminal-graphics": "^0.1.0" }, "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-CBHe4BpNNuCt7U5w01GKjYf1xQluHGz/6quxka5jIBW36ik83kFy+7NlKXw+YrU8wnmPU1ALvT4YCPbO0kOUbA=="],
|
|
29
29
|
|
|
30
|
-
"@flowscripter/dynamic-cli-framework-api": ["@flowscripter/dynamic-cli-framework-api@
|
|
30
|
+
"@flowscripter/dynamic-cli-framework-api": ["@flowscripter/dynamic-cli-framework-api@3.0.1", "", { "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-xshFgLLiRcAkFwsYgfm2iVTaMo88R5efPTU+AjoY2j1+cbpHH8a+iguxeHNfxHgg3LPwfbOEFOqaWUtbIOgJ1A=="],
|
|
31
31
|
|
|
32
|
-
"@flowscripter/dynamic-plugin-framework": ["@flowscripter/dynamic-plugin-framework@2.2.
|
|
32
|
+
"@flowscripter/dynamic-plugin-framework": ["@flowscripter/dynamic-plugin-framework@2.2.9", "", { "dependencies": { "semver": "^7.8.5" }, "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-CxmVatloVWLSv87ZTk9Ly8QGI4al4ONNgrR4C4AbdHSpQSB3NljGKKF9J9EKQK87wGcNEU9XbyxeYKLNkHLHvQ=="],
|
|
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.7", "", { "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-BEYXBcZKWmN2CoBPP8TKaykqqE1/AWnXj+LyjRBdgwt+vQUDtR430PKrCshaBbm0HEKC9cfRh3Brh844xeELcw=="],
|
|
35
35
|
|
|
36
|
-
"@flowscripter/io-plugin-filesystem": ["@flowscripter/io-plugin-filesystem@1.1.
|
|
36
|
+
"@flowscripter/io-plugin-filesystem": ["@flowscripter/io-plugin-filesystem@1.1.1", "", { "dependencies": { "@flowscripter/pluggable-io-framework-api": "^1.1.1", "zod": "^4.6.5" }, "peerDependencies": { "@flowscripter/dynamic-plugin-framework": "*", "typescript": "^7.0.2" } }, "sha512-G95TkV33uN35mqsczdbF3jsNLAxhqVxy22jfX7gXL5jTqyt3NxLtMdop+0KbdXOiDBDC2csydz0gUtzIalsmnw=="],
|
|
37
37
|
|
|
38
|
-
"@flowscripter/pluggable-io-framework": ["@flowscripter/pluggable-io-framework@1.2.
|
|
38
|
+
"@flowscripter/pluggable-io-framework": ["@flowscripter/pluggable-io-framework@1.2.2", "", { "dependencies": { "@flowscripter/dynamic-plugin-framework": "^2.2.9", "@flowscripter/pluggable-io-framework-api": "^1.1.2" }, "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-E365i8pdVgbPFVz/DSkdcTFd/BC3dvG2vbY/hb3zy1fMVguff4+qjwFGquWTVdvG9A9O9wiMzAqwTP9e3Du1Nw=="],
|
|
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.2", "", { "dependencies": { "zod": "^4.6.5", "zod-to-json-schema": "^3.25.2" }, "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-UF6/4bf29Dq7iG6n0KAzgC9h5ZmdGO+eMnLE53EnhU+XZqFpfDYzXNW22Z8Yg70D3VODM8/l7yF1g+3dhhid7w=="],
|
|
41
41
|
|
|
42
|
-
"@oxfmt/binding-android-arm-eabi": ["@oxfmt/binding-android-arm-eabi@0.
|
|
42
|
+
"@oxfmt/binding-android-arm-eabi": ["@oxfmt/binding-android-arm-eabi@0.68.0", "", { "os": "android", "cpu": "arm" }, "sha512-dhfYPbzv/h9JgHjNkl2R6sOjUfxDyLGOZVb3g8/ScaTNwwJcYgmHh8kcYFDUhinuy1QAoANCWUvw1jlk+z6gAg=="],
|
|
43
43
|
|
|
44
|
-
"@oxfmt/binding-android-arm64": ["@oxfmt/binding-android-arm64@0.
|
|
44
|
+
"@oxfmt/binding-android-arm64": ["@oxfmt/binding-android-arm64@0.68.0", "", { "os": "android", "cpu": "arm64" }, "sha512-v3Njdi6qY0O/5eGfg01ww2w6gTn2mUvZ72Bnx1/UN53A9wruh3Nk6otc3WkgJLkXD4Qgz1SOcVQieH1oD03V9Q=="],
|
|
45
45
|
|
|
46
|
-
"@oxfmt/binding-darwin-arm64": ["@oxfmt/binding-darwin-arm64@0.
|
|
46
|
+
"@oxfmt/binding-darwin-arm64": ["@oxfmt/binding-darwin-arm64@0.68.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-ei4MCMzHFREmZwPJ7KuWUB4kBuHdsgDrnXGJVcEAopU7fj7S42I8BChdFILWdHvhFqR08FLJtOfbZIr2CDw0cA=="],
|
|
47
47
|
|
|
48
|
-
"@oxfmt/binding-darwin-x64": ["@oxfmt/binding-darwin-x64@0.
|
|
48
|
+
"@oxfmt/binding-darwin-x64": ["@oxfmt/binding-darwin-x64@0.68.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-UrKgzZxYhwB9DSvTX+vdgl9M32wLUNKJcAKIoiyx/Kzn/zveqi7W6kYVcRroFMhS3Kwz0KhTk3WBeSuQn4YCTg=="],
|
|
49
49
|
|
|
50
|
-
"@oxfmt/binding-freebsd-x64": ["@oxfmt/binding-freebsd-x64@0.
|
|
50
|
+
"@oxfmt/binding-freebsd-x64": ["@oxfmt/binding-freebsd-x64@0.68.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-6jrEKgpJbilM1QaRv7hEtKXr4p4AK4jvvyOtajwyhu0kOz3e0O7OLnSTk6tBotRqCcUC4ehZRJ1Zx+Y99wieLw=="],
|
|
51
51
|
|
|
52
|
-
"@oxfmt/binding-linux-arm-gnueabihf": ["@oxfmt/binding-linux-arm-gnueabihf@0.
|
|
52
|
+
"@oxfmt/binding-linux-arm-gnueabihf": ["@oxfmt/binding-linux-arm-gnueabihf@0.68.0", "", { "os": "linux", "cpu": "arm" }, "sha512-YOIVnKOBaLeGullskS179N12hjSAdFYnzLjOaKiLhAKNWgnShq9w4xRdtmUm6BlnP65l2/EA9Aw/KlftNxDM7Q=="],
|
|
53
53
|
|
|
54
|
-
"@oxfmt/binding-linux-arm-musleabihf": ["@oxfmt/binding-linux-arm-musleabihf@0.
|
|
54
|
+
"@oxfmt/binding-linux-arm-musleabihf": ["@oxfmt/binding-linux-arm-musleabihf@0.68.0", "", { "os": "linux", "cpu": "arm" }, "sha512-xW5XoEHVNqydPBv2KXvk9lmEzyAlOQHVEazKoXUuAacqekjya+OdiaFjjEBl0oJD02raG8g3TRl9OVCh9PDIHA=="],
|
|
55
55
|
|
|
56
|
-
"@oxfmt/binding-linux-arm64-gnu": ["@oxfmt/binding-linux-arm64-gnu@0.
|
|
56
|
+
"@oxfmt/binding-linux-arm64-gnu": ["@oxfmt/binding-linux-arm64-gnu@0.68.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-QCvYwVVQieu6oyJglAgV9vH/YMDxZyR4cwVSYtoq9oOXd5N+D3TDUBjNwxFrLn5AdcJZOcvn/7IB17vJGp+2Og=="],
|
|
57
57
|
|
|
58
|
-
"@oxfmt/binding-linux-arm64-musl": ["@oxfmt/binding-linux-arm64-musl@0.
|
|
58
|
+
"@oxfmt/binding-linux-arm64-musl": ["@oxfmt/binding-linux-arm64-musl@0.68.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-4TVz5iFQ8ndrHnhX50UXiz9BIWAtUSOHJ6Nus4qWFfJBXq/Ed/krXbF/ehJu42BXM5tIvBs99jNIM22s9agY5A=="],
|
|
59
59
|
|
|
60
|
-
"@oxfmt/binding-linux-ppc64-gnu": ["@oxfmt/binding-linux-ppc64-gnu@0.
|
|
60
|
+
"@oxfmt/binding-linux-ppc64-gnu": ["@oxfmt/binding-linux-ppc64-gnu@0.68.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-qLe3ao0RP84bnPxBvRI+GnlK/jybo538NWu0Xrm+zYeTmJtpzqLhnnd5BH21NafqKnplbGZjtN1cnrOlWF73lw=="],
|
|
61
61
|
|
|
62
|
-
"@oxfmt/binding-linux-riscv64-gnu": ["@oxfmt/binding-linux-riscv64-gnu@0.
|
|
62
|
+
"@oxfmt/binding-linux-riscv64-gnu": ["@oxfmt/binding-linux-riscv64-gnu@0.68.0", "", { "os": "linux", "cpu": "none" }, "sha512-Yvyl7a6gbb0vM6r925KW2dO+/CmXySO5TVbcX7o/uZJ+d108HFOG0TxIyHApmn5USuj5mhDPxzhiVwOlGP7uSA=="],
|
|
63
63
|
|
|
64
|
-
"@oxfmt/binding-linux-riscv64-musl": ["@oxfmt/binding-linux-riscv64-musl@0.
|
|
64
|
+
"@oxfmt/binding-linux-riscv64-musl": ["@oxfmt/binding-linux-riscv64-musl@0.68.0", "", { "os": "linux", "cpu": "none" }, "sha512-mJlFuFVCxzrYM5sFStN433D/s/mb6Wq4aCQAM02vs/OudHywnaSAd2rb1vlYUJtqdYIciJtiasuxvfbYkv5fLg=="],
|
|
65
65
|
|
|
66
|
-
"@oxfmt/binding-linux-s390x-gnu": ["@oxfmt/binding-linux-s390x-gnu@0.
|
|
66
|
+
"@oxfmt/binding-linux-s390x-gnu": ["@oxfmt/binding-linux-s390x-gnu@0.68.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-RlfSg++qs1hbKltRR6lYvV9EoI3MdlfSQD9w1hdHVYjHqjIn1tkH4FWOpMSmjKGN20zr+nI+W9o4ARogCDudGQ=="],
|
|
67
67
|
|
|
68
|
-
"@oxfmt/binding-linux-x64-gnu": ["@oxfmt/binding-linux-x64-gnu@0.
|
|
68
|
+
"@oxfmt/binding-linux-x64-gnu": ["@oxfmt/binding-linux-x64-gnu@0.68.0", "", { "os": "linux", "cpu": "x64" }, "sha512-nyzRB9U+dlYUKu3pMo3afHzZBUv/oTHZMG36ZfJViNVfOIzp70Q4GS8FFRGgYJ/p0zcyDCgpBvYISOdJOMh+jQ=="],
|
|
69
69
|
|
|
70
|
-
"@oxfmt/binding-linux-x64-musl": ["@oxfmt/binding-linux-x64-musl@0.
|
|
70
|
+
"@oxfmt/binding-linux-x64-musl": ["@oxfmt/binding-linux-x64-musl@0.68.0", "", { "os": "linux", "cpu": "x64" }, "sha512-iCx3sbZRIvGrL1RafphEiUKBaW1lc0/tAjKOIB/Wjw2+STRBEdu5+fH1Gc1faEWEmc2k5Ks4iUUV54Zd5C9a1A=="],
|
|
71
71
|
|
|
72
|
-
"@oxfmt/binding-openharmony-arm64": ["@oxfmt/binding-openharmony-arm64@0.
|
|
72
|
+
"@oxfmt/binding-openharmony-arm64": ["@oxfmt/binding-openharmony-arm64@0.68.0", "", { "os": "none", "cpu": "arm64" }, "sha512-x2X5AZez7OgyLLFpwIgItoXBUqudDM7yiaTsxv8R8vKQ6e81l0jVw0NFeUCXzcl1sAJq8h+tC8N4mY8EiMeL4w=="],
|
|
73
73
|
|
|
74
|
-
"@oxfmt/binding-win32-arm64-msvc": ["@oxfmt/binding-win32-arm64-msvc@0.
|
|
74
|
+
"@oxfmt/binding-win32-arm64-msvc": ["@oxfmt/binding-win32-arm64-msvc@0.68.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-AHVPjXkenLPQUh6kB8zSC8pX2ct9r4T1Edk9r/RNJyov6wPsS5uAfYtipwG4chn6+3bPFG5rI/3DxEeH8vib1w=="],
|
|
75
75
|
|
|
76
|
-
"@oxfmt/binding-win32-ia32-msvc": ["@oxfmt/binding-win32-ia32-msvc@0.
|
|
76
|
+
"@oxfmt/binding-win32-ia32-msvc": ["@oxfmt/binding-win32-ia32-msvc@0.68.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-n09SjEk5VH7z8Hl4WVP7hho+cCwGViENkQFiM45vbW85dJd7kEhWaHRUobaPzEmrWyu6uumd4EuNfNyDKLtzDA=="],
|
|
77
77
|
|
|
78
|
-
"@oxfmt/binding-win32-x64-msvc": ["@oxfmt/binding-win32-x64-msvc@0.
|
|
78
|
+
"@oxfmt/binding-win32-x64-msvc": ["@oxfmt/binding-win32-x64-msvc@0.68.0", "", { "os": "win32", "cpu": "x64" }, "sha512-gPe+dJLXaPuWPWqlpklDAJp0k+K9KhQPYiQLHfb+i2rmFuUGfJ/5Qlj6tr1mO6of5g0DiLjG/XCFHIaPhotqqA=="],
|
|
79
79
|
|
|
80
|
-
"@oxlint/binding-android-arm-eabi": ["@oxlint/binding-android-arm-eabi@1.
|
|
80
|
+
"@oxlint/binding-android-arm-eabi": ["@oxlint/binding-android-arm-eabi@1.83.0", "", { "os": "android", "cpu": "arm" }, "sha512-0yGY24EwsLk5YDe6F+VkmZyRHSwJDALa3nIrPpq7FXmp2lV2d0TzvBCGeZk+wgiULRGr5blhyr4QMp5KCXJUqA=="],
|
|
81
81
|
|
|
82
|
-
"@oxlint/binding-android-arm64": ["@oxlint/binding-android-arm64@1.
|
|
82
|
+
"@oxlint/binding-android-arm64": ["@oxlint/binding-android-arm64@1.83.0", "", { "os": "android", "cpu": "arm64" }, "sha512-hHfJ0vc17A4iUjH5p9BsTUPYbYRNxGpvD2lbu1aBRk54bzNIx9o5TtYF39QPZcV95DagZd+4DEAw2RH3G2ZsMg=="],
|
|
83
83
|
|
|
84
|
-
"@oxlint/binding-darwin-arm64": ["@oxlint/binding-darwin-arm64@1.
|
|
84
|
+
"@oxlint/binding-darwin-arm64": ["@oxlint/binding-darwin-arm64@1.83.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-hsOjYjszLb/3zym/TkzUMPAoQlTJcuzSyEPOAyA+skXJIX9M0o+4JfOtqopX/Vf4hSLrJ98j0nvFo23gzk8auQ=="],
|
|
85
85
|
|
|
86
|
-
"@oxlint/binding-darwin-x64": ["@oxlint/binding-darwin-x64@1.
|
|
86
|
+
"@oxlint/binding-darwin-x64": ["@oxlint/binding-darwin-x64@1.83.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-mjh5oH2EA+wl5yRJYT9K9G61O2zFlpuv+yf2JwZOi0+dq2FnTUtm1h8i+5Ik0fXPWIu/k84I1psZR9aQsLAnyA=="],
|
|
87
87
|
|
|
88
|
-
"@oxlint/binding-freebsd-x64": ["@oxlint/binding-freebsd-x64@1.
|
|
88
|
+
"@oxlint/binding-freebsd-x64": ["@oxlint/binding-freebsd-x64@1.83.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-fNHr64/YaO8YssuoDVC8+F4Uk5enR86q5uxfHkQrjAPs1dbAILOrD2uaud+J7MO8Fx774g44ERLD0IGIvZE48w=="],
|
|
89
89
|
|
|
90
|
-
"@oxlint/binding-linux-arm-gnueabihf": ["@oxlint/binding-linux-arm-gnueabihf@1.
|
|
90
|
+
"@oxlint/binding-linux-arm-gnueabihf": ["@oxlint/binding-linux-arm-gnueabihf@1.83.0", "", { "os": "linux", "cpu": "arm" }, "sha512-Qpwy3zzAwMj+8/lyYItHmkSMwbkprFNWTK7jPYDOxSyxEhaSLOWYUTCMkjF334J8/WD0nznCCsoBbIH6hpsuIw=="],
|
|
91
91
|
|
|
92
|
-
"@oxlint/binding-linux-arm-musleabihf": ["@oxlint/binding-linux-arm-musleabihf@1.
|
|
92
|
+
"@oxlint/binding-linux-arm-musleabihf": ["@oxlint/binding-linux-arm-musleabihf@1.83.0", "", { "os": "linux", "cpu": "arm" }, "sha512-s+BirYLFq7JL2k9sP0XI3ZXJ9dYvJ8sX3jLCLoag7tt+zrSHpZxP0jqznfL+Gdgwu7ay0dYgGYJXrQvq3iWloA=="],
|
|
93
93
|
|
|
94
|
-
"@oxlint/binding-linux-arm64-gnu": ["@oxlint/binding-linux-arm64-gnu@1.
|
|
94
|
+
"@oxlint/binding-linux-arm64-gnu": ["@oxlint/binding-linux-arm64-gnu@1.83.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-7lihXt3vKr+GIyapNbHrnFHm/biiW30le6Zv/DExbAFPF6YwCQXVFlONPFehxs0CpGO4CBfYPM9rdDT+XMoIlg=="],
|
|
95
95
|
|
|
96
|
-
"@oxlint/binding-linux-arm64-musl": ["@oxlint/binding-linux-arm64-musl@1.
|
|
96
|
+
"@oxlint/binding-linux-arm64-musl": ["@oxlint/binding-linux-arm64-musl@1.83.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-q63JalLYVkZiZvls1z3PPUnpmQluOMXp0khqQMznCeAPLGydfNY8JhvuA4WlK57JfrvikU8wB5lPVveqpIXvew=="],
|
|
97
97
|
|
|
98
|
-
"@oxlint/binding-linux-ppc64-gnu": ["@oxlint/binding-linux-ppc64-gnu@1.
|
|
98
|
+
"@oxlint/binding-linux-ppc64-gnu": ["@oxlint/binding-linux-ppc64-gnu@1.83.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-krQmDF+dRbxvdqVPV88ZuOoPPu8X5BuqDA8Hd+qcS4YMRQCb+nexA57DazgGsc/rGdKBe3QmV0mnv0bdpW/p5g=="],
|
|
99
99
|
|
|
100
|
-
"@oxlint/binding-linux-riscv64-gnu": ["@oxlint/binding-linux-riscv64-gnu@1.
|
|
100
|
+
"@oxlint/binding-linux-riscv64-gnu": ["@oxlint/binding-linux-riscv64-gnu@1.83.0", "", { "os": "linux", "cpu": "none" }, "sha512-MmOl8Y6txEAXZU1RG8Rr264jQ6D7VPmqFsU/45x/FeWsGe32hklTqGrLE6UxHzp5Rjt0wP+20tY8YXKgSFB3mw=="],
|
|
101
101
|
|
|
102
|
-
"@oxlint/binding-linux-riscv64-musl": ["@oxlint/binding-linux-riscv64-musl@1.
|
|
102
|
+
"@oxlint/binding-linux-riscv64-musl": ["@oxlint/binding-linux-riscv64-musl@1.83.0", "", { "os": "linux", "cpu": "none" }, "sha512-u1rMymh0W3JZkq370kzQsYPULGWqhE09pZRqnZvUSoYaI9pVO5yVX+iYIslmWuEgwuzH9YAaOsScJiobWCHoOw=="],
|
|
103
103
|
|
|
104
|
-
"@oxlint/binding-linux-s390x-gnu": ["@oxlint/binding-linux-s390x-gnu@1.
|
|
104
|
+
"@oxlint/binding-linux-s390x-gnu": ["@oxlint/binding-linux-s390x-gnu@1.83.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-y0zK3HNwGysu7rqtE+BQG/d0bx5gh/KwlOtghN8oWeK1KcWzeaLqtZrbm8owqdma1lFyrce/hTO5ismuNu+INQ=="],
|
|
105
105
|
|
|
106
|
-
"@oxlint/binding-linux-x64-gnu": ["@oxlint/binding-linux-x64-gnu@1.
|
|
106
|
+
"@oxlint/binding-linux-x64-gnu": ["@oxlint/binding-linux-x64-gnu@1.83.0", "", { "os": "linux", "cpu": "x64" }, "sha512-rS5gM0NgD7ngmuJmbIehsidtrOwKkLFwCQbKEeb9KuyQrrWNq5Zkn0uV6AYdXOMJ0grrWEiLwBuvMxt8w5vsNw=="],
|
|
107
107
|
|
|
108
|
-
"@oxlint/binding-linux-x64-musl": ["@oxlint/binding-linux-x64-musl@1.
|
|
108
|
+
"@oxlint/binding-linux-x64-musl": ["@oxlint/binding-linux-x64-musl@1.83.0", "", { "os": "linux", "cpu": "x64" }, "sha512-W2IH4EtpcPaWcvNGCA95YoDg4vxqE/ZiPCi3arrxEEpsK7+JQN9WYwrlYFx9pcdP6KPXqRqkv3zdQPHcx7b6YQ=="],
|
|
109
109
|
|
|
110
|
-
"@oxlint/binding-openharmony-arm64": ["@oxlint/binding-openharmony-arm64@1.
|
|
110
|
+
"@oxlint/binding-openharmony-arm64": ["@oxlint/binding-openharmony-arm64@1.83.0", "", { "os": "none", "cpu": "arm64" }, "sha512-6LyKkUyoajssTPLlZmDbZIbu4IZ5B4bGuRUnBgCGpEvHP3FQMaYITncHA/unPUo7q+Z+pIu2HhdkQ+8d1SG7iA=="],
|
|
111
111
|
|
|
112
|
-
"@oxlint/binding-win32-arm64-msvc": ["@oxlint/binding-win32-arm64-msvc@1.
|
|
112
|
+
"@oxlint/binding-win32-arm64-msvc": ["@oxlint/binding-win32-arm64-msvc@1.83.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-Uz/fObEtF0jmNJQJ8CGRBKfefYstS0/wjD3s6IGzP8nUwsJykHQJBiN3npHwKiGRGn/vvBEgNr4B3cCzmmatvg=="],
|
|
113
113
|
|
|
114
|
-
"@oxlint/binding-win32-ia32-msvc": ["@oxlint/binding-win32-ia32-msvc@1.
|
|
114
|
+
"@oxlint/binding-win32-ia32-msvc": ["@oxlint/binding-win32-ia32-msvc@1.83.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-u7XcvPW6Bk58tY5iWs2ESb0vJjoE/kuSpHxopbwp/p3ZtWVQXZ6wor5w3ssVTHOqd/v8b+QdhSFWQ4grEUNWpA=="],
|
|
115
115
|
|
|
116
|
-
"@oxlint/binding-win32-x64-msvc": ["@oxlint/binding-win32-x64-msvc@1.
|
|
116
|
+
"@oxlint/binding-win32-x64-msvc": ["@oxlint/binding-win32-x64-msvc@1.83.0", "", { "os": "win32", "cpu": "x64" }, "sha512-LZRubd7ph13QmAg4fFecTYVZkiYbROR2Htaxh/ufWRkDhPOm2wrwaEYR89e0YpPFD3dqBrPoxS7myBw5hmYA7Q=="],
|
|
117
117
|
|
|
118
118
|
"@types/bun": ["@types/bun@1.4.2", "", { "dependencies": { "bun-types": "1.4.2" } }, "sha512-GimotNn7+ZV0uVArItBbriZsR1oNf0+WTzPkdcFrzShI7k2norL0uzEaJT8T33dWr7O/c9ZDuAFQrctKCi72oQ=="],
|
|
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.
|
|
122
|
+
"@types/node": ["@types/node@26.6.1", "", { "dependencies": { "undici-types": "~8.9.0" } }, "sha512-VqGJBMCtdhqkBUCcBLvywI0NJ+KLuVzgNnlBUNFOQjqVxzo2lxLUNg1DSey8+u2u6ktswSAxg+s68QLzWHNOuA=="],
|
|
123
123
|
|
|
124
124
|
"@types/unist": ["@types/unist@3.0.3", "", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="],
|
|
125
125
|
|
|
@@ -183,11 +183,11 @@
|
|
|
183
183
|
|
|
184
184
|
"lowlight": ["lowlight@3.1.0", "", { "dependencies": { "@types/hast": "^3.0.0", "devlop": "^1.0.0", "highlight.js": "~11.9.0" } }, "sha512-CEbNVoSikAxwDMDPjXlqlFYiZLkDJHwyGu/MfOsJnF3d7f3tds5J3z8s/l9TMXhzfsJCCJEAsD78842mwmg0PQ=="],
|
|
185
185
|
|
|
186
|
-
"oxfmt": ["oxfmt@0.
|
|
186
|
+
"oxfmt": ["oxfmt@0.68.0", "", { "dependencies": { "tinypool": "2.1.2" }, "optionalDependencies": { "@oxfmt/binding-android-arm-eabi": "0.68.0", "@oxfmt/binding-android-arm64": "0.68.0", "@oxfmt/binding-darwin-arm64": "0.68.0", "@oxfmt/binding-darwin-x64": "0.68.0", "@oxfmt/binding-freebsd-x64": "0.68.0", "@oxfmt/binding-linux-arm-gnueabihf": "0.68.0", "@oxfmt/binding-linux-arm-musleabihf": "0.68.0", "@oxfmt/binding-linux-arm64-gnu": "0.68.0", "@oxfmt/binding-linux-arm64-musl": "0.68.0", "@oxfmt/binding-linux-ppc64-gnu": "0.68.0", "@oxfmt/binding-linux-riscv64-gnu": "0.68.0", "@oxfmt/binding-linux-riscv64-musl": "0.68.0", "@oxfmt/binding-linux-s390x-gnu": "0.68.0", "@oxfmt/binding-linux-x64-gnu": "0.68.0", "@oxfmt/binding-linux-x64-musl": "0.68.0", "@oxfmt/binding-openharmony-arm64": "0.68.0", "@oxfmt/binding-win32-arm64-msvc": "0.68.0", "@oxfmt/binding-win32-ia32-msvc": "0.68.0", "@oxfmt/binding-win32-x64-msvc": "0.68.0" }, "peerDependencies": { "svelte": "^5.0.0", "vite-plus": "*" }, "optionalPeers": ["svelte", "vite-plus"], "bin": { "oxfmt": "bin/oxfmt" } }, "sha512-Z0XMofcXCGUXbcpBHnWyUiX93BGiw1B+lcHNbQDWEtOhX06ewoFfu4zXkyiLhRrNnMq0twqXRHUcJetf+GsiQQ=="],
|
|
187
187
|
|
|
188
|
-
"oxlint": ["oxlint@1.
|
|
188
|
+
"oxlint": ["oxlint@1.83.0", "", { "optionalDependencies": { "@oxlint/binding-android-arm-eabi": "1.83.0", "@oxlint/binding-android-arm64": "1.83.0", "@oxlint/binding-darwin-arm64": "1.83.0", "@oxlint/binding-darwin-x64": "1.83.0", "@oxlint/binding-freebsd-x64": "1.83.0", "@oxlint/binding-linux-arm-gnueabihf": "1.83.0", "@oxlint/binding-linux-arm-musleabihf": "1.83.0", "@oxlint/binding-linux-arm64-gnu": "1.83.0", "@oxlint/binding-linux-arm64-musl": "1.83.0", "@oxlint/binding-linux-ppc64-gnu": "1.83.0", "@oxlint/binding-linux-riscv64-gnu": "1.83.0", "@oxlint/binding-linux-riscv64-musl": "1.83.0", "@oxlint/binding-linux-s390x-gnu": "1.83.0", "@oxlint/binding-linux-x64-gnu": "1.83.0", "@oxlint/binding-linux-x64-musl": "1.83.0", "@oxlint/binding-openharmony-arm64": "1.83.0", "@oxlint/binding-win32-arm64-msvc": "1.83.0", "@oxlint/binding-win32-ia32-msvc": "1.83.0", "@oxlint/binding-win32-x64-msvc": "1.83.0" }, "peerDependencies": { "oxlint-tsgolint": ">=7.0.2001", "vite-plus": "*" }, "optionalPeers": ["oxlint-tsgolint", "vite-plus"], "bin": { "oxlint": "bin/oxlint" } }, "sha512-cyDzSzaw3uzP0TeCeq3lLRPPoaUxkbB4ZOXj+kn+5r+BX9V+4bNVGk9lxer+WrgcpebH4JxLlJ3KQjveVztOLQ=="],
|
|
189
189
|
|
|
190
|
-
"prettier": ["prettier@3.9.
|
|
190
|
+
"prettier": ["prettier@3.9.7", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-T3mF5P7HFzZVLDQuCUNtJj6WK1pcpLMweMNUVwGb01bLNkH9AkKxtZvmInw8K6bnn2O3d6/5RHl6zSHiBAD0Og=="],
|
|
191
191
|
|
|
192
192
|
"semver": ["semver@7.8.5", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA=="],
|
|
193
193
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowscripter/flowscripter-io-cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Example CLI using https://github.com/flowscripter/pluggable-io-framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bun",
|
|
@@ -21,19 +21,19 @@
|
|
|
21
21
|
"access": "public"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@flowscripter/dynamic-cli-framework": "^
|
|
25
|
-
"@flowscripter/dynamic-cli-framework-api": "^
|
|
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": "^6.0.1",
|
|
25
|
+
"@flowscripter/dynamic-cli-framework-api": "^3.0.1",
|
|
26
|
+
"@flowscripter/dynamic-plugin-framework": "^2.2.9",
|
|
27
|
+
"@flowscripter/flowscripter-io-cli-hash-native": "^1.0.7",
|
|
28
|
+
"@flowscripter/pluggable-io-framework": "^1.2.2",
|
|
29
|
+
"@flowscripter/pluggable-io-framework-api": "^1.1.2"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@flowscripter/io-plugin-filesystem": "^1.1.
|
|
32
|
+
"@flowscripter/io-plugin-filesystem": "^1.1.1",
|
|
33
33
|
"@types/bun": "^1.4.2",
|
|
34
|
-
"@types/node": "^26.
|
|
35
|
-
"oxfmt": "0.
|
|
36
|
-
"oxlint": "1.
|
|
34
|
+
"@types/node": "^26.6.1",
|
|
35
|
+
"oxfmt": "0.68.0",
|
|
36
|
+
"oxlint": "1.83.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"typescript": "^7.0.2"
|
package/src/byteScale.ts
CHANGED
|
@@ -16,11 +16,26 @@ export interface ByteScale {
|
|
|
16
16
|
readonly unit: string;
|
|
17
17
|
readonly total: number;
|
|
18
18
|
scale(bytes: number): number;
|
|
19
|
+
/** Formats an already-scaled current/total value, e.g. `5.00GB`. */
|
|
20
|
+
format(value: number): string;
|
|
21
|
+
/**
|
|
22
|
+
* Formats a rate (in this scale's unit per second) independently of {@link format} - converts
|
|
23
|
+
* back to raw bytes/s and re-picks the best-fitting unit, so a rate too small to show
|
|
24
|
+
* meaningfully in the total's unit (e.g. a stalled GB-scale transfer) renders in a smaller one
|
|
25
|
+
* instead of rounding to zero.
|
|
26
|
+
*/
|
|
27
|
+
formatRate(rate: number): string;
|
|
19
28
|
}
|
|
20
29
|
|
|
21
30
|
/** Scales byte counts against a fixed total into the largest sensible unit (bytes/KB/MB/GB). */
|
|
22
31
|
export function createByteScale(totalBytes: number): ByteScale {
|
|
23
32
|
const { unit, divisor } = pickByteUnit(totalBytes);
|
|
24
33
|
const scale = (bytes: number): number => Math.round((bytes / divisor) * 100) / 100;
|
|
25
|
-
|
|
34
|
+
const format = (value: number): string => `${value.toFixed(2)}${unit}`;
|
|
35
|
+
const formatRate = (rate: number): string => {
|
|
36
|
+
const bytesPerSecond = rate * divisor;
|
|
37
|
+
const rateUnit = pickByteUnit(bytesPerSecond);
|
|
38
|
+
return `${(bytesPerSecond / rateUnit.divisor).toFixed(2)}${rateUnit.unit}/s`;
|
|
39
|
+
};
|
|
40
|
+
return { unit, total: scale(totalBytes), scale, format, formatRate };
|
|
26
41
|
}
|
package/src/commands/copy.ts
CHANGED
|
@@ -36,11 +36,12 @@ const copy: SubCommand = {
|
|
|
36
36
|
try {
|
|
37
37
|
const { size } = await provider.getProperties(source);
|
|
38
38
|
const byteScale = createByteScale(size ?? 100);
|
|
39
|
-
const handle = await printerService.showProgressBar(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
byteScale.
|
|
43
|
-
|
|
39
|
+
const handle = await printerService.showProgressBar({
|
|
40
|
+
message: `Copying ${source}`,
|
|
41
|
+
total: byteScale.total,
|
|
42
|
+
format: byteScale.format,
|
|
43
|
+
formatRate: byteScale.formatRate,
|
|
44
|
+
});
|
|
44
45
|
try {
|
|
45
46
|
await copyProvider(provider, source, provider, destination, {
|
|
46
47
|
telemetry: {
|
package/src/commands/hash.ts
CHANGED
|
@@ -41,11 +41,12 @@ const hash: SubCommand = {
|
|
|
41
41
|
try {
|
|
42
42
|
const { size } = await provider.getProperties(path);
|
|
43
43
|
const byteScale = createByteScale(size ?? 100);
|
|
44
|
-
const progressHandle = await printerService.showProgressBar(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
byteScale.
|
|
48
|
-
|
|
44
|
+
const progressHandle = await printerService.showProgressBar({
|
|
45
|
+
message: `Hashing ${path}`,
|
|
46
|
+
total: byteScale.total,
|
|
47
|
+
format: byteScale.format,
|
|
48
|
+
formatRate: byteScale.formatRate,
|
|
49
|
+
});
|
|
49
50
|
let bytesProcessed = 0;
|
|
50
51
|
const onChunk = (chunkLength: number): void => {
|
|
51
52
|
bytesProcessed += chunkLength;
|
package/src/commands/move.ts
CHANGED
|
@@ -36,11 +36,12 @@ const move: SubCommand = {
|
|
|
36
36
|
try {
|
|
37
37
|
const { size } = await provider.getProperties(source);
|
|
38
38
|
const byteScale = createByteScale(size ?? 100);
|
|
39
|
-
const handle = await printerService.showProgressBar(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
byteScale.
|
|
43
|
-
|
|
39
|
+
const handle = await printerService.showProgressBar({
|
|
40
|
+
message: `Moving ${source}`,
|
|
41
|
+
total: byteScale.total,
|
|
42
|
+
format: byteScale.format,
|
|
43
|
+
formatRate: byteScale.formatRate,
|
|
44
|
+
});
|
|
44
45
|
try {
|
|
45
46
|
await moveProvider(provider, source, provider, destination, {
|
|
46
47
|
telemetry: {
|
package/tests/byteScale_test.ts
CHANGED
|
@@ -26,4 +26,25 @@ describe("createByteScale", () => {
|
|
|
26
26
|
expect(byteScale.total).toBe(500);
|
|
27
27
|
expect(byteScale.scale(250)).toBe(250);
|
|
28
28
|
});
|
|
29
|
+
|
|
30
|
+
test("format() appends the total's unit to an already-scaled value", () => {
|
|
31
|
+
const byteScale = createByteScale(20_641_497_116);
|
|
32
|
+
|
|
33
|
+
expect(byteScale.format(byteScale.total)).toBe("19.22GB");
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
test("formatRate() re-scales to a smaller unit when the rate is too small for the total's unit", () => {
|
|
37
|
+
const byteScale = createByteScale(20_641_497_116);
|
|
38
|
+
|
|
39
|
+
// 512KB/s expressed in GB/s (524288 / 1024^3) is real throughput, but would round to
|
|
40
|
+
// "0.00GB/s" if formatted in the total's unit - formatRate() converts back to raw bytes/s
|
|
41
|
+
// and re-picks a unit for that value.
|
|
42
|
+
expect(byteScale.formatRate(524_288 / 1024 ** 3)).toBe("512.00KB/s");
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
test("formatRate() stays in the total's unit when the rate is large enough for it", () => {
|
|
46
|
+
const byteScale = createByteScale(20_641_497_116);
|
|
47
|
+
|
|
48
|
+
expect(byteScale.formatRate(1.5)).toBe("1.50GB/s");
|
|
49
|
+
});
|
|
29
50
|
});
|