@poe-platform/safe-bash 0.1.750 → 0.1.751
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/safe-bash/chunks/{chunk-4GK4FAT6.js → chunk-637A2MLA.js} +8 -6
- package/dist/safe-bash/chunks/{chunk-MUWJPSGN.js → chunk-B7IBQSD4.js} +7 -5
- package/dist/safe-bash/chunks/{chunk-U7DRVFRD.js → chunk-ILHNFAZE.js} +28 -5
- package/dist/safe-bash/chunks/{src-YKSQQDD3.js → src-XXKXVO7T.js} +2 -2
- package/dist/safe-bash/commands/pr/index.browser.js +1 -1
- package/dist/safe-bash/commands/time-env/shared.d.ts +1 -0
- package/dist/safe-bash/commands/time-env/shared.js +6 -5
- package/dist/safe-bash/commands/time-env/sleep.js +6 -3
- package/dist/safe-bash/core.browser.js +101 -97
- package/dist/safe-bash/shell/pattern.js +6 -1
- package/dist/safe-bash/shell/runtime.d.ts +1 -0
- package/dist/safe-bash/shell/runtime.js +134 -116
- package/dist/safe-bash-command-ssconvert/index.js +27 -4
- package/package.json +2 -2
|
@@ -1425,6 +1425,11 @@ init_platform();
|
|
|
1425
1425
|
|
|
1426
1426
|
// packages/safe-bash/src/commands/time-env/shared.ts
|
|
1427
1427
|
init_platform();
|
|
1428
|
+
var defaultSleepScheduler = {
|
|
1429
|
+
now: () => performance.now(),
|
|
1430
|
+
setTimeout: (callback, milliseconds) => setTimeout(callback, milliseconds),
|
|
1431
|
+
clearTimeout: (handle) => clearTimeout(handle)
|
|
1432
|
+
};
|
|
1428
1433
|
function settings2(options) {
|
|
1429
1434
|
const limits = {
|
|
1430
1435
|
maxArguments: Infinity,
|
|
@@ -1441,11 +1446,7 @@ function settings2(options) {
|
|
|
1441
1446
|
if (maxTimerMilliseconds !== Infinity && (!Number.isInteger(maxTimerMilliseconds) || maxTimerMilliseconds < 1 || maxTimerMilliseconds > 2147483647)) {
|
|
1442
1447
|
throw new RangeError("maxTimerMilliseconds must be between 1 and 2147483647 or Infinity");
|
|
1443
1448
|
}
|
|
1444
|
-
const scheduler = options.scheduler ??
|
|
1445
|
-
now: () => performance.now(),
|
|
1446
|
-
setTimeout: (callback, milliseconds) => setTimeout(callback, milliseconds),
|
|
1447
|
-
clearTimeout: (handle) => clearTimeout(handle)
|
|
1448
|
-
};
|
|
1449
|
+
const scheduler = options.scheduler ?? defaultSleepScheduler;
|
|
1449
1450
|
if (typeof scheduler.now !== "function" || typeof scheduler.setTimeout !== "function" || typeof scheduler.clearTimeout !== "function") {
|
|
1450
1451
|
throw new TypeError("Invalid sleep scheduler");
|
|
1451
1452
|
}
|
|
@@ -2065,6 +2066,7 @@ function prCommands(options = {}) {
|
|
|
2065
2066
|
}
|
|
2066
2067
|
|
|
2067
2068
|
export {
|
|
2069
|
+
defaultSleepScheduler,
|
|
2068
2070
|
settings2 as settings,
|
|
2069
2071
|
CommandFailure,
|
|
2070
2072
|
checkSize,
|
|
@@ -2079,4 +2081,4 @@ export {
|
|
|
2079
2081
|
createPrCommands,
|
|
2080
2082
|
prCommands
|
|
2081
2083
|
};
|
|
2082
|
-
//# sourceMappingURL=chunk-
|
|
2084
|
+
//# sourceMappingURL=chunk-637A2MLA.js.map
|
|
@@ -1425,6 +1425,11 @@ init_platform();
|
|
|
1425
1425
|
|
|
1426
1426
|
// packages/safe-bash/src/commands/time-env/shared.ts
|
|
1427
1427
|
init_platform();
|
|
1428
|
+
var defaultSleepScheduler = {
|
|
1429
|
+
now: () => performance.now(),
|
|
1430
|
+
setTimeout: (callback, milliseconds) => setTimeout(callback, milliseconds),
|
|
1431
|
+
clearTimeout: (handle) => clearTimeout(handle)
|
|
1432
|
+
};
|
|
1428
1433
|
function settings2(options) {
|
|
1429
1434
|
const limits = {
|
|
1430
1435
|
maxArguments: Infinity,
|
|
@@ -1441,11 +1446,7 @@ function settings2(options) {
|
|
|
1441
1446
|
if (maxTimerMilliseconds !== Infinity && (!Number.isInteger(maxTimerMilliseconds) || maxTimerMilliseconds < 1 || maxTimerMilliseconds > 2147483647)) {
|
|
1442
1447
|
throw new RangeError("maxTimerMilliseconds must be between 1 and 2147483647 or Infinity");
|
|
1443
1448
|
}
|
|
1444
|
-
const scheduler = options.scheduler ??
|
|
1445
|
-
now: () => performance.now(),
|
|
1446
|
-
setTimeout: (callback, milliseconds) => setTimeout(callback, milliseconds),
|
|
1447
|
-
clearTimeout: (handle) => clearTimeout(handle)
|
|
1448
|
-
};
|
|
1449
|
+
const scheduler = options.scheduler ?? defaultSleepScheduler;
|
|
1449
1450
|
if (typeof scheduler.now !== "function" || typeof scheduler.setTimeout !== "function" || typeof scheduler.clearTimeout !== "function") {
|
|
1450
1451
|
throw new TypeError("Invalid sleep scheduler");
|
|
1451
1452
|
}
|
|
@@ -2065,6 +2066,7 @@ function prCommands(options = {}) {
|
|
|
2065
2066
|
}
|
|
2066
2067
|
|
|
2067
2068
|
export {
|
|
2069
|
+
defaultSleepScheduler,
|
|
2068
2070
|
settings2 as settings,
|
|
2069
2071
|
CommandFailure,
|
|
2070
2072
|
checkSize,
|
|
@@ -52122,6 +52122,18 @@ function metadataNode(value3, charge) {
|
|
|
52122
52122
|
}
|
|
52123
52123
|
return visit(value3);
|
|
52124
52124
|
}
|
|
52125
|
+
var richUnderlines = {
|
|
52126
|
+
none: "none",
|
|
52127
|
+
single: "single",
|
|
52128
|
+
double: "double",
|
|
52129
|
+
low: "singleAccounting",
|
|
52130
|
+
error: "single",
|
|
52131
|
+
"single-line": "single",
|
|
52132
|
+
"double-line": "double",
|
|
52133
|
+
"error-line": "single",
|
|
52134
|
+
singleAccounting: "singleAccounting",
|
|
52135
|
+
doubleAccounting: "doubleAccounting"
|
|
52136
|
+
};
|
|
52125
52137
|
function writeRichString(value3, runs, xml2, charge, target = "cell") {
|
|
52126
52138
|
charge?.(value3.length);
|
|
52127
52139
|
const t2 = (text2) => xml2("t", text2.trim() !== text2 ? { "xml:space": "preserve" } : {}, escapeXlsx(encodeXlsxString(text2)));
|
|
@@ -52144,7 +52156,9 @@ function writeRichString(value3, runs, xml2, charge, target = "cell") {
|
|
|
52144
52156
|
if (attrs.size !== void 0) properties += xml2("sz", { val: Number(attrs.size) / 1024 });
|
|
52145
52157
|
if (typeof attrs.family === "string") properties += xml2("rFont", { val: encodeXlsxString(attrs.family) });
|
|
52146
52158
|
if (typeof attrs.color === "string") properties += xml2("color", { rgb: "FF" + attrs.color.split("x").join("").toUpperCase() });
|
|
52147
|
-
if (typeof attrs.underline === "string") properties += xml2("u", {
|
|
52159
|
+
if (typeof attrs.underline === "string") properties += xml2("u", {
|
|
52160
|
+
val: Object.hasOwn(richUnderlines, attrs.underline) ? richUnderlines[attrs.underline] : "none"
|
|
52161
|
+
});
|
|
52148
52162
|
if (attrs.subscript || attrs.superscript) properties += xml2("vertAlign", { val: attrs.subscript ? "subscript" : "superscript" });
|
|
52149
52163
|
result2 += xml2("r", {}, (properties || target === "comment" ? xml2("rPr", {}, properties) : "") + t2(decoder.decode(bytes.subarray(start, end2))));
|
|
52150
52164
|
}
|
|
@@ -91285,7 +91299,11 @@ function odfCellStyle(node3, parent, charge) {
|
|
|
91285
91299
|
const italic = attr4(p2, "font-style", "fo");
|
|
91286
91300
|
if (italic !== void 0) font2.Italic = italic === "italic" || italic === "oblique" ? 1 : 0;
|
|
91287
91301
|
const underline = attr4(p2, "text-underline-style", "style");
|
|
91288
|
-
if (underline !== void 0)
|
|
91302
|
+
if (underline !== void 0) {
|
|
91303
|
+
const type = attr4(p2, "text-underline-type", "style");
|
|
91304
|
+
const double = type === "double" || attr4(p2, "text-underline-width", "style") === "bold";
|
|
91305
|
+
font2.Underline = underline === "none" || type === "none" ? 0 : (double ? 2 : 1) + (attr4(p2, "text-underline-placement", "gnm") === "low" ? 2 : 0);
|
|
91306
|
+
}
|
|
91289
91307
|
const strike = attr4(p2, "text-line-through-style", "style");
|
|
91290
91308
|
if (strike !== void 0) font2.StrikeThrough = strike === "none" ? 0 : 1;
|
|
91291
91309
|
family = attr4(p2, "font-family", "fo") ?? attr4(p2, "font-name", "style") ?? family;
|
|
@@ -91798,8 +91816,13 @@ function createOdfStyles(xml2, extended, book, context2) {
|
|
|
91798
91816
|
if (f2.Bold !== void 0) text2["fo:font-weight"] = Number(f2.Bold) ? "bold" : "normal";
|
|
91799
91817
|
if (f2.Italic !== void 0) text2["fo:font-style"] = Number(f2.Italic) ? "italic" : "normal";
|
|
91800
91818
|
if (f2.Underline !== void 0) {
|
|
91801
|
-
|
|
91802
|
-
text2["style:text-underline-
|
|
91819
|
+
const underline = Number(f2.Underline), low = underline === 3 || underline === 4;
|
|
91820
|
+
text2["style:text-underline-style"] = underline ? "solid" : "none";
|
|
91821
|
+
text2["style:text-underline-type"] = underline === 2 || underline === 4 ? "double" : underline ? "single" : "none";
|
|
91822
|
+
text2["style:text-underline-width"] = "auto";
|
|
91823
|
+
text2["style:text-underline-color"] = "font-color";
|
|
91824
|
+
text2["style:text-underline-mode"] = "continuous";
|
|
91825
|
+
if (extended && low) text2["gnm:text-underline-placement"] = "low";
|
|
91803
91826
|
}
|
|
91804
91827
|
if (f2.StrikeThrough !== void 0) text2["style:text-line-through-style"] = Number(f2.StrikeThrough) ? "solid" : "none";
|
|
91805
91828
|
}
|
|
@@ -164608,4 +164631,4 @@ tslib/tslib.js:
|
|
|
164608
164631
|
@noble/ciphers/utils.js:
|
|
164609
164632
|
(*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) *)
|
|
164610
164633
|
*/
|
|
164611
|
-
//# sourceMappingURL=chunk-
|
|
164634
|
+
//# sourceMappingURL=chunk-ILHNFAZE.js.map
|
|
@@ -81,7 +81,7 @@ import {
|
|
|
81
81
|
updateWorkbook,
|
|
82
82
|
validSheetSize,
|
|
83
83
|
visitFormula
|
|
84
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-ILHNFAZE.js";
|
|
85
85
|
import "./chunk-CVAVQZSF.js";
|
|
86
86
|
import "./chunk-RCM5PZBN.js";
|
|
87
87
|
import "./chunk-LSRHLNCR.js";
|
|
@@ -171,4 +171,4 @@ export {
|
|
|
171
171
|
validSheetSize,
|
|
172
172
|
visitFormula
|
|
173
173
|
};
|
|
174
|
-
//# sourceMappingURL=src-
|
|
174
|
+
//# sourceMappingURL=src-XXKXVO7T.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
createPrCommand,
|
|
3
3
|
createPrCommands,
|
|
4
4
|
prCommands
|
|
5
|
-
} from "../../chunks/chunk-
|
|
5
|
+
} from "../../chunks/chunk-B7IBQSD4.js";
|
|
6
6
|
import "../../chunks/chunk-BI6JV62X.js";
|
|
7
7
|
import "../../chunks/chunk-2G2T5MEM.js";
|
|
8
8
|
import "../../chunks/chunk-JYGWVGEJ.js";
|
|
@@ -4,6 +4,7 @@ export interface SleepScheduler {
|
|
|
4
4
|
setTimeout(callback: () => void, milliseconds: number): unknown;
|
|
5
5
|
clearTimeout(handle: unknown): void;
|
|
6
6
|
}
|
|
7
|
+
export declare const defaultSleepScheduler: SleepScheduler;
|
|
7
8
|
export interface TimeEnvLimits {
|
|
8
9
|
readonly maxArguments: number;
|
|
9
10
|
readonly maxArgumentBytes: number;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { writeDiagnostic } from "../../escaping.js";
|
|
2
2
|
import { FsError, writeBytes } from "../../contracts/index.js";
|
|
3
|
+
export const defaultSleepScheduler = {
|
|
4
|
+
now: () => performance.now(),
|
|
5
|
+
setTimeout: (callback, milliseconds) => setTimeout(callback, milliseconds),
|
|
6
|
+
clearTimeout: handle => clearTimeout(handle),
|
|
7
|
+
};
|
|
3
8
|
export function settings(options) {
|
|
4
9
|
const limits = { maxArguments: Infinity, maxArgumentBytes: Infinity, maxOutputBytes: Infinity,
|
|
5
10
|
maxEnvironmentEntries: Infinity, maxFormatWidth: Infinity, ...options.limits };
|
|
@@ -11,11 +16,7 @@ export function settings(options) {
|
|
|
11
16
|
if (maxTimerMilliseconds !== Infinity && (!Number.isInteger(maxTimerMilliseconds) || maxTimerMilliseconds < 1 || maxTimerMilliseconds > 2147483647)) {
|
|
12
17
|
throw new RangeError("maxTimerMilliseconds must be between 1 and 2147483647 or Infinity");
|
|
13
18
|
}
|
|
14
|
-
const scheduler = options.scheduler ??
|
|
15
|
-
now: () => performance.now(),
|
|
16
|
-
setTimeout: (callback, milliseconds) => setTimeout(callback, milliseconds),
|
|
17
|
-
clearTimeout: handle => clearTimeout(handle),
|
|
18
|
-
};
|
|
19
|
+
const scheduler = options.scheduler ?? defaultSleepScheduler;
|
|
19
20
|
if (typeof scheduler.now !== "function" || typeof scheduler.setTimeout !== "function" || typeof scheduler.clearTimeout !== "function") {
|
|
20
21
|
throw new TypeError("Invalid sleep scheduler");
|
|
21
22
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { command, CommandFailure, emit } from "./shared.js";
|
|
1
|
+
import { command, CommandFailure, defaultSleepScheduler, emit } from "./shared.js";
|
|
2
2
|
function duration(arguments_) {
|
|
3
3
|
if (!arguments_.length)
|
|
4
4
|
throw new CommandFailure("missing operand");
|
|
@@ -129,8 +129,11 @@ function delay(milliseconds, signal, configuration) {
|
|
|
129
129
|
if (!Number.isFinite(now) || Math.abs(now) > Number.MAX_SAFE_INTEGER || (previous !== undefined && now < previous)) {
|
|
130
130
|
throw new RangeError("sleep scheduler must supply finite monotonic milliseconds");
|
|
131
131
|
}
|
|
132
|
-
if (previous !== undefined)
|
|
133
|
-
|
|
132
|
+
if (previous !== undefined) {
|
|
133
|
+
// Host timers may wake early. Injected clocks can instead be coarse
|
|
134
|
+
// or frozen, so retain their scheduled-interval progress contract.
|
|
135
|
+
remaining -= scheduler === defaultSleepScheduler ? now - previous : Math.max(step, now - previous);
|
|
136
|
+
}
|
|
134
137
|
previous = now;
|
|
135
138
|
if (remaining <= 0) {
|
|
136
139
|
finish(false);
|