@poe-platform/safe-bash 0.1.97 → 0.1.98
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/browser.js +15 -5
- package/dist/safe-bash/browser.js.map +2 -2
- package/dist/safe-bash/commands/network/authorizer.d.ts.map +1 -1
- package/dist/safe-bash/commands/network/authorizer.js +4 -1
- package/dist/safe-bash/commands/network/authorizer.js.map +1 -1
- package/dist/safe-bash/contracts/filesystem-output.d.ts.map +1 -1
- package/dist/safe-bash/contracts/filesystem-output.js +12 -4
- package/dist/safe-bash/contracts/filesystem-output.js.map +1 -1
- package/package.json +2 -2
|
@@ -4131,6 +4131,11 @@ async function openFileOutput(context, path, flag, incremental) {
|
|
|
4131
4131
|
const consumer = new AbortController();
|
|
4132
4132
|
let writes = Promise.resolve();
|
|
4133
4133
|
let acknowledge;
|
|
4134
|
+
const acknowledgeWrite = () => {
|
|
4135
|
+
const accepted = acknowledge;
|
|
4136
|
+
acknowledge = void 0;
|
|
4137
|
+
accepted?.();
|
|
4138
|
+
};
|
|
4134
4139
|
let ready;
|
|
4135
4140
|
const opened = new Promise((resolve) => {
|
|
4136
4141
|
ready = resolve;
|
|
@@ -4145,7 +4150,9 @@ async function openFileOutput(context, path, flag, incremental) {
|
|
|
4145
4150
|
acknowledge = resolve;
|
|
4146
4151
|
});
|
|
4147
4152
|
await pipe.writable.write(chunk.subarray(offset, offset + 64 * 1024));
|
|
4148
|
-
await
|
|
4153
|
+
await accepted;
|
|
4154
|
+
if (failure) throw failure.reason;
|
|
4155
|
+
operation.signal.throwIfAborted();
|
|
4149
4156
|
}
|
|
4150
4157
|
});
|
|
4151
4158
|
writes = writing.catch(() => {
|
|
@@ -4175,8 +4182,7 @@ async function openFileOutput(context, path, flag, incremental) {
|
|
|
4175
4182
|
ready();
|
|
4176
4183
|
for await (const chunk of pipe.readable) {
|
|
4177
4184
|
yield chunk;
|
|
4178
|
-
|
|
4179
|
-
acknowledge = void 0;
|
|
4185
|
+
acknowledgeWrite();
|
|
4180
4186
|
}
|
|
4181
4187
|
operation.signal.throwIfAborted();
|
|
4182
4188
|
ended = true;
|
|
@@ -4219,8 +4225,9 @@ async function openFileOutput(context, path, flag, incremental) {
|
|
|
4219
4225
|
await sink.write(chunk);
|
|
4220
4226
|
}
|
|
4221
4227
|
})();
|
|
4222
|
-
void task.
|
|
4228
|
+
void task.then(acknowledgeWrite, (error) => {
|
|
4223
4229
|
failure = { reason: error };
|
|
4230
|
+
acknowledgeWrite();
|
|
4224
4231
|
if (!operation.signal.aborted) consumer.abort(error);
|
|
4225
4232
|
void operation.abort(error).catch(() => {
|
|
4226
4233
|
});
|
|
@@ -16495,7 +16502,10 @@ function privateHostname(input3) {
|
|
|
16495
16502
|
for (let index = 0; index < leading.length; index++) hextets[index] = Number.parseInt(leading[index], 16);
|
|
16496
16503
|
for (let index = 0; index < trailing.length; index++) hextets[8 - trailing.length + index] = Number.parseInt(trailing[index], 16);
|
|
16497
16504
|
if (hextets.every((value2) => value2 === 0)) return true;
|
|
16498
|
-
|
|
16505
|
+
const mappedIPv4 = hextets.slice(0, 5).every((value2) => value2 === 0) && hextets[5] === 65535;
|
|
16506
|
+
const translatedIPv4 = hextets.slice(0, 4).every((value2) => value2 === 0) && hextets[4] === 65535 && hextets[5] === 0;
|
|
16507
|
+
const nat64IPv4 = hextets[0] === 100 && hextets[1] === 65435 && hextets.slice(2, 6).every((value2) => value2 === 0);
|
|
16508
|
+
if (mappedIPv4 || translatedIPv4 || nat64IPv4) {
|
|
16499
16509
|
return privateIPv4(hextets[6] >>> 8, hextets[6] & 255);
|
|
16500
16510
|
}
|
|
16501
16511
|
return (hextets[0] & 65024) === 64512 || (hextets[0] & 65472) === 65152;
|