arcadible 1.0.25 → 1.0.26
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/dist/action/build/tool.js +1 -1
- package/dist/util/progress.js +13 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
|
@@ -33,7 +33,7 @@ function build(command, { cwdPath, outputPath }) {
|
|
|
33
33
|
return command
|
|
34
34
|
? execBuild(command, { cwdPath })
|
|
35
35
|
.then(() => pathExists(outputPath))
|
|
36
|
-
.then((exists) =>
|
|
36
|
+
.then((exists) => exists ? { path: outputPath } : { missing: outputPath })
|
|
37
37
|
: Promise.resolve(null);
|
|
38
38
|
}
|
|
39
39
|
// [function]
|
package/dist/util/progress.js
CHANGED
|
@@ -16,8 +16,20 @@ function formatValue(value, _opts, type) {
|
|
|
16
16
|
return formatBytes(value);
|
|
17
17
|
}
|
|
18
18
|
// [function]
|
|
19
|
+
// the bar's width: what the terminal leaves beside the text at its widest
|
|
20
|
+
// (100%, and sizes such as 999.9 MB), from 10 to 40, so the numbers always
|
|
21
|
+
// show in a narrow terminal rather than being cut off at its edge.
|
|
22
|
+
export function barSize(format, columns = process.stderr.columns || 80) {
|
|
23
|
+
const text = format
|
|
24
|
+
.replace("{bar}", "")
|
|
25
|
+
.replace("{percentage}", "100")
|
|
26
|
+
.replace("{value}", "999.9 MB")
|
|
27
|
+
.replace("{total}", "999.9 MB");
|
|
28
|
+
return Math.max(10, Math.min(40, columns - text.length - 1));
|
|
29
|
+
}
|
|
30
|
+
// [function]
|
|
19
31
|
function singleBar(format) {
|
|
20
|
-
return new SingleBar({ format, formatValue, stream: process.stderr }, Presets.shades_classic);
|
|
32
|
+
return new SingleBar({ barsize: barSize(format), format, formatValue, stream: process.stderr }, Presets.shades_classic);
|
|
21
33
|
}
|
|
22
34
|
// [class]
|
|
23
35
|
export class ProgressBar {
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"license": "Apache-2.0",
|
|
45
45
|
"name": "arcadible",
|
|
46
|
-
"version": "1.0.
|
|
46
|
+
"version": "1.0.26"
|
|
47
47
|
},
|
|
48
48
|
"node_modules/@asamuzakjp/css-color": {
|
|
49
49
|
"dependencies": {
|
|
@@ -3252,5 +3252,5 @@
|
|
|
3252
3252
|
}
|
|
3253
3253
|
},
|
|
3254
3254
|
"requires": true,
|
|
3255
|
-
"version": "1.0.
|
|
3255
|
+
"version": "1.0.26"
|
|
3256
3256
|
}
|
package/package.json
CHANGED