@openpkg-ts/extract 0.14.4 → 0.15.0
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/bin/tspec.js +10 -9
- package/dist/shared/{chunk-axmbd6k1.js → chunk-0bt6mcnx.js} +703 -623
- package/dist/src/index.d.ts +38 -31
- package/dist/src/index.js +1 -1
- package/package.json +1 -1
package/dist/bin/tspec.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
extract
|
|
4
|
-
} from "../shared/chunk-
|
|
4
|
+
} from "../shared/chunk-0bt6mcnx.js";
|
|
5
5
|
|
|
6
6
|
// src/cli/spec.ts
|
|
7
7
|
import * as fs from "node:fs";
|
|
@@ -497,6 +497,7 @@ var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
|
497
497
|
var source_default = chalk;
|
|
498
498
|
|
|
499
499
|
// ../cli-utils/dist/index.js
|
|
500
|
+
import { Worker } from "node:worker_threads";
|
|
500
501
|
var colors = {
|
|
501
502
|
success: source_default.green,
|
|
502
503
|
error: source_default.red,
|
|
@@ -655,8 +656,8 @@ class MultiProgress {
|
|
|
655
656
|
hideCursor();
|
|
656
657
|
this.setupSignalHandler();
|
|
657
658
|
this.timer = setInterval(() => {
|
|
658
|
-
this.spinnerIndex = (this.spinnerIndex + 1) % this.spinnerFrames.length;
|
|
659
659
|
if (this.bars.size > 0 && [...this.bars.values()].some((b) => b.status === "active")) {
|
|
660
|
+
this.spinnerIndex = (this.spinnerIndex + 1) % this.spinnerFrames.length;
|
|
660
661
|
this.render();
|
|
661
662
|
}
|
|
662
663
|
}, this.options.spinnerInterval);
|
|
@@ -1029,11 +1030,13 @@ class Spinner {
|
|
|
1029
1030
|
symbols = getSymbols(supportsUnicode());
|
|
1030
1031
|
lastRenderedLines = 0;
|
|
1031
1032
|
sigintHandler = null;
|
|
1033
|
+
animate;
|
|
1032
1034
|
constructor(options = {}) {
|
|
1033
1035
|
this.label = options.label ?? "";
|
|
1034
1036
|
this.detail = options.detail;
|
|
1035
1037
|
this.interval = options.interval ?? 80;
|
|
1036
1038
|
this.colorFn = spinnerColors[options.color ?? "cyan"];
|
|
1039
|
+
this.animate = options.animate ?? true;
|
|
1037
1040
|
const style = options.style ?? "circle";
|
|
1038
1041
|
this.frames = supportsUnicode() ? FRAME_SETS[style] : ASCII_FRAME_SET;
|
|
1039
1042
|
}
|
|
@@ -1045,7 +1048,7 @@ class Spinner {
|
|
|
1045
1048
|
this.state = "spinning";
|
|
1046
1049
|
this.frameIndex = 0;
|
|
1047
1050
|
this.lastRenderedLines = 0;
|
|
1048
|
-
if (!isInteractive()) {
|
|
1051
|
+
if (!isInteractive() || !this.animate) {
|
|
1049
1052
|
console.log(`${this.symbols.bullet} ${this.label}`);
|
|
1050
1053
|
return this;
|
|
1051
1054
|
}
|
|
@@ -1103,14 +1106,12 @@ class Spinner {
|
|
|
1103
1106
|
this.timer = null;
|
|
1104
1107
|
}
|
|
1105
1108
|
this.state = state;
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
+
const symbol = state === "success" ? this.symbols.success : this.symbols.error;
|
|
1110
|
+
const colorFn = state === "success" ? colors.success : colors.error;
|
|
1111
|
+
if (!isInteractive() || !this.animate) {
|
|
1109
1112
|
console.log(`${colorFn(symbol)} ${this.label}`);
|
|
1110
1113
|
} else {
|
|
1111
1114
|
this.clearOutput();
|
|
1112
|
-
const symbol = state === "success" ? this.symbols.success : this.symbols.error;
|
|
1113
|
-
const colorFn = state === "success" ? colors.success : colors.error;
|
|
1114
1115
|
process.stdout.write(`${colorFn(symbol)} ${this.label}
|
|
1115
1116
|
`);
|
|
1116
1117
|
}
|
|
@@ -1186,8 +1187,8 @@ class StepProgress {
|
|
|
1186
1187
|
this.setupSignalHandler();
|
|
1187
1188
|
this.render();
|
|
1188
1189
|
this.timer = setInterval(() => {
|
|
1189
|
-
this.spinnerIndex = (this.spinnerIndex + 1) % this.spinnerFrames.length;
|
|
1190
1190
|
if (this.steps.some((s) => s.status === "active")) {
|
|
1191
|
+
this.spinnerIndex = (this.spinnerIndex + 1) % this.spinnerFrames.length;
|
|
1191
1192
|
this.render();
|
|
1192
1193
|
}
|
|
1193
1194
|
}, this.spinnerInterval);
|