@milaboratories/uikit 2.0.4 → 2.0.5
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/CHANGELOG.md +6 -0
- package/dist/pl-uikit.js +26 -24
- package/dist/pl-uikit.umd.cjs +5 -5
- package/dist/src/components/PlLogView/PlLogView.vue.d.ts +8 -0
- package/dist/src/components/PlLogView/useLogHandle.d.ts +1 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/components/PlLogView/PlLogView.vue +4 -0
- package/src/components/PlLogView/useLogHandle.ts +18 -4
package/CHANGELOG.md
CHANGED
package/dist/pl-uikit.js
CHANGED
|
@@ -4085,42 +4085,43 @@ function mu(t) {
|
|
|
4085
4085
|
return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
4086
4086
|
}
|
|
4087
4087
|
function hu(t) {
|
|
4088
|
-
const e = j()
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
if (
|
|
4088
|
+
const e = j(), n = pe({
|
|
4089
|
+
errorCount: 0
|
|
4090
|
+
});
|
|
4091
|
+
async function o() {
|
|
4092
|
+
var a;
|
|
4093
|
+
let l = e.value;
|
|
4094
|
+
if (l === void 0) return;
|
|
4095
|
+
const i = t.mockPlatforma ?? window.platforma;
|
|
4096
|
+
if (!i) {
|
|
4095
4097
|
console.warn("Platforma API is not available");
|
|
4096
4098
|
return;
|
|
4097
4099
|
}
|
|
4098
4100
|
for (; ; ) {
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
}), a.newOffset >= a.size) break;
|
|
4101
|
+
const u = await i.logDriver.readText(l.logHandle, 100, l.lastOffset);
|
|
4102
|
+
if (l.error = void 0, n.errorCount = 0, u.shouldUpdateHandle || l.logHandle !== ((a = e.value) == null ? void 0 : a.logHandle)) return;
|
|
4103
|
+
const c = t.progressPrefix ?? fu, f = new TextDecoder().decode(u.data).replace(new RegExp(`${mu(c)}`, "g"), "");
|
|
4104
|
+
if (l = Object.assign(l, {
|
|
4105
|
+
lines: l.lines + f,
|
|
4106
|
+
lastOffset: u.newOffset,
|
|
4107
|
+
finished: !u.live
|
|
4108
|
+
}), u.newOffset >= u.size) break;
|
|
4108
4109
|
}
|
|
4109
4110
|
}
|
|
4110
|
-
const
|
|
4111
|
-
e.value && (e.value.error =
|
|
4111
|
+
const r = pu(() => o().catch((l) => {
|
|
4112
|
+
e.value && (n.errorCount++, n.errorCount > (t.maxRetries ?? 3) ? e.value.error = l : console.warn("skip error:", l, "retry..."));
|
|
4112
4113
|
}), 1500, { immediate: !1 });
|
|
4113
4114
|
return cu(
|
|
4114
4115
|
() => {
|
|
4115
|
-
var
|
|
4116
|
-
return (
|
|
4116
|
+
var l;
|
|
4117
|
+
return (l = e == null ? void 0 : e.value) == null ? void 0 : l.finished;
|
|
4117
4118
|
},
|
|
4118
|
-
() =>
|
|
4119
|
+
() => r.pause()
|
|
4119
4120
|
), ae(
|
|
4120
4121
|
() => t.logHandle,
|
|
4121
|
-
(
|
|
4122
|
-
var
|
|
4123
|
-
|
|
4122
|
+
(l) => {
|
|
4123
|
+
var i;
|
|
4124
|
+
l === void 0 ? (e.value = void 0, r.pause()) : l !== ((i = e.value) == null ? void 0 : i.logHandle) && (e.value = { logHandle: l, lastOffset: 0, lines: "", finished: !1, error: void 0 }, n.errorCount = 0, r.resume());
|
|
4124
4125
|
},
|
|
4125
4126
|
{ immediate: !0 }
|
|
4126
4127
|
), e;
|
|
@@ -4138,6 +4139,7 @@ const vu = {
|
|
|
4138
4139
|
progressPrefix: {},
|
|
4139
4140
|
error: {},
|
|
4140
4141
|
output: {},
|
|
4142
|
+
maxRetries: {},
|
|
4141
4143
|
mockPlatforma: {}
|
|
4142
4144
|
},
|
|
4143
4145
|
setup(t) {
|