@threadbase-sh/streamer 1.18.5 → 1.19.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/cli.cjs +1200 -1129
- package/dist/cli.cjs.map +1 -1
- package/dist/index.cjs +34 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +34 -10
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/cli.cjs
CHANGED
|
@@ -6,8 +6,8 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __esm = (
|
|
10
|
-
return
|
|
9
|
+
var __esm = (fn, res) => function __init() {
|
|
10
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
11
11
|
};
|
|
12
12
|
var __commonJS = (cb, mod) => function __require() {
|
|
13
13
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
@@ -8966,8 +8966,8 @@ function $constructor(name, initializer3, params) {
|
|
|
8966
8966
|
const inst = params?.Parent ? new Definition() : this;
|
|
8967
8967
|
init(inst, def);
|
|
8968
8968
|
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
8969
|
-
for (const
|
|
8970
|
-
|
|
8969
|
+
for (const fn of inst._zod.deferred) {
|
|
8970
|
+
fn();
|
|
8971
8971
|
}
|
|
8972
8972
|
return inst;
|
|
8973
8973
|
}
|
|
@@ -10693,9 +10693,9 @@ var init_doc = __esm({
|
|
|
10693
10693
|
if (this)
|
|
10694
10694
|
this.args = args;
|
|
10695
10695
|
}
|
|
10696
|
-
indented(
|
|
10696
|
+
indented(fn) {
|
|
10697
10697
|
this.indent += 1;
|
|
10698
|
-
|
|
10698
|
+
fn(this);
|
|
10699
10699
|
this.indent -= 1;
|
|
10700
10700
|
}
|
|
10701
10701
|
write(arg) {
|
|
@@ -11163,8 +11163,8 @@ var init_schemas = __esm({
|
|
|
11163
11163
|
checks.unshift(inst);
|
|
11164
11164
|
}
|
|
11165
11165
|
for (const ch of checks) {
|
|
11166
|
-
for (const
|
|
11167
|
-
|
|
11166
|
+
for (const fn of ch._zod.onattach) {
|
|
11167
|
+
fn(inst);
|
|
11168
11168
|
}
|
|
11169
11169
|
}
|
|
11170
11170
|
if (checks.length === 0) {
|
|
@@ -11919,8 +11919,8 @@ var init_schemas = __esm({
|
|
|
11919
11919
|
}
|
|
11920
11920
|
doc.write(`payload.value = newResult;`);
|
|
11921
11921
|
doc.write(`return payload;`);
|
|
11922
|
-
const
|
|
11923
|
-
return (payload, ctx) =>
|
|
11922
|
+
const fn = doc.compile();
|
|
11923
|
+
return (payload, ctx) => fn(shape, payload, ctx);
|
|
11924
11924
|
};
|
|
11925
11925
|
let fastpass;
|
|
11926
11926
|
const isObject2 = isObject;
|
|
@@ -20067,10 +20067,10 @@ function _file(Class2, params) {
|
|
|
20067
20067
|
});
|
|
20068
20068
|
}
|
|
20069
20069
|
// @__NO_SIDE_EFFECTS__
|
|
20070
|
-
function _transform(Class2,
|
|
20070
|
+
function _transform(Class2, fn) {
|
|
20071
20071
|
return new Class2({
|
|
20072
20072
|
type: "transform",
|
|
20073
|
-
transform:
|
|
20073
|
+
transform: fn
|
|
20074
20074
|
});
|
|
20075
20075
|
}
|
|
20076
20076
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -20158,29 +20158,29 @@ function _promise(Class2, innerType) {
|
|
|
20158
20158
|
});
|
|
20159
20159
|
}
|
|
20160
20160
|
// @__NO_SIDE_EFFECTS__
|
|
20161
|
-
function _custom(Class2,
|
|
20161
|
+
function _custom(Class2, fn, _params) {
|
|
20162
20162
|
const norm = normalizeParams(_params);
|
|
20163
20163
|
norm.abort ?? (norm.abort = true);
|
|
20164
20164
|
const schema = new Class2({
|
|
20165
20165
|
type: "custom",
|
|
20166
20166
|
check: "custom",
|
|
20167
|
-
fn
|
|
20167
|
+
fn,
|
|
20168
20168
|
...norm
|
|
20169
20169
|
});
|
|
20170
20170
|
return schema;
|
|
20171
20171
|
}
|
|
20172
20172
|
// @__NO_SIDE_EFFECTS__
|
|
20173
|
-
function _refine(Class2,
|
|
20173
|
+
function _refine(Class2, fn, _params) {
|
|
20174
20174
|
const schema = new Class2({
|
|
20175
20175
|
type: "custom",
|
|
20176
20176
|
check: "custom",
|
|
20177
|
-
fn
|
|
20177
|
+
fn,
|
|
20178
20178
|
...normalizeParams(_params)
|
|
20179
20179
|
});
|
|
20180
20180
|
return schema;
|
|
20181
20181
|
}
|
|
20182
20182
|
// @__NO_SIDE_EFFECTS__
|
|
20183
|
-
function _superRefine(
|
|
20183
|
+
function _superRefine(fn, params) {
|
|
20184
20184
|
const ch = /* @__PURE__ */ _check((payload) => {
|
|
20185
20185
|
payload.addIssue = (issue2) => {
|
|
20186
20186
|
if (typeof issue2 === "string") {
|
|
@@ -20196,17 +20196,17 @@ function _superRefine(fn2, params) {
|
|
|
20196
20196
|
payload.issues.push(issue(_issue));
|
|
20197
20197
|
}
|
|
20198
20198
|
};
|
|
20199
|
-
return
|
|
20199
|
+
return fn(payload.value, payload);
|
|
20200
20200
|
}, params);
|
|
20201
20201
|
return ch;
|
|
20202
20202
|
}
|
|
20203
20203
|
// @__NO_SIDE_EFFECTS__
|
|
20204
|
-
function _check(
|
|
20204
|
+
function _check(fn, params) {
|
|
20205
20205
|
const ch = new $ZodCheck({
|
|
20206
20206
|
check: "custom",
|
|
20207
20207
|
...normalizeParams(params)
|
|
20208
20208
|
});
|
|
20209
|
-
ch._zod.check =
|
|
20209
|
+
ch._zod.check = fn;
|
|
20210
20210
|
return ch;
|
|
20211
20211
|
}
|
|
20212
20212
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -21971,12 +21971,12 @@ function _installLazyMethods(inst, group, methods) {
|
|
|
21971
21971
|
return;
|
|
21972
21972
|
installed.add(group);
|
|
21973
21973
|
for (const key in methods) {
|
|
21974
|
-
const
|
|
21974
|
+
const fn = methods[key];
|
|
21975
21975
|
Object.defineProperty(proto, key, {
|
|
21976
21976
|
configurable: true,
|
|
21977
21977
|
enumerable: false,
|
|
21978
21978
|
get() {
|
|
21979
|
-
const bound =
|
|
21979
|
+
const bound = fn.bind(this);
|
|
21980
21980
|
Object.defineProperty(this, key, {
|
|
21981
21981
|
configurable: true,
|
|
21982
21982
|
writable: true,
|
|
@@ -22293,10 +22293,10 @@ function literal(value, params) {
|
|
|
22293
22293
|
function file(params) {
|
|
22294
22294
|
return _file(ZodFile, params);
|
|
22295
22295
|
}
|
|
22296
|
-
function transform(
|
|
22296
|
+
function transform(fn) {
|
|
22297
22297
|
return new ZodTransform({
|
|
22298
22298
|
type: "transform",
|
|
22299
|
-
transform:
|
|
22299
|
+
transform: fn
|
|
22300
22300
|
});
|
|
22301
22301
|
}
|
|
22302
22302
|
function optional(innerType) {
|
|
@@ -22420,22 +22420,22 @@ function _function(params) {
|
|
|
22420
22420
|
output: params?.output ?? unknown()
|
|
22421
22421
|
});
|
|
22422
22422
|
}
|
|
22423
|
-
function check(
|
|
22423
|
+
function check(fn) {
|
|
22424
22424
|
const ch = new $ZodCheck({
|
|
22425
22425
|
check: "custom"
|
|
22426
22426
|
// ...util.normalizeParams(params),
|
|
22427
22427
|
});
|
|
22428
|
-
ch._zod.check =
|
|
22428
|
+
ch._zod.check = fn;
|
|
22429
22429
|
return ch;
|
|
22430
22430
|
}
|
|
22431
|
-
function custom(
|
|
22432
|
-
return _custom(ZodCustom,
|
|
22431
|
+
function custom(fn, _params) {
|
|
22432
|
+
return _custom(ZodCustom, fn ?? (() => true), _params);
|
|
22433
22433
|
}
|
|
22434
|
-
function refine(
|
|
22435
|
-
return _refine(ZodCustom,
|
|
22434
|
+
function refine(fn, _params = {}) {
|
|
22435
|
+
return _refine(ZodCustom, fn, _params);
|
|
22436
22436
|
}
|
|
22437
|
-
function superRefine(
|
|
22438
|
-
return _superRefine(
|
|
22437
|
+
function superRefine(fn, params) {
|
|
22438
|
+
return _superRefine(fn, params);
|
|
22439
22439
|
}
|
|
22440
22440
|
function _instanceof(cls, params = {}) {
|
|
22441
22441
|
const inst = new ZodCustom({
|
|
@@ -22465,10 +22465,10 @@ function json(params) {
|
|
|
22465
22465
|
});
|
|
22466
22466
|
return jsonSchema;
|
|
22467
22467
|
}
|
|
22468
|
-
function preprocess(
|
|
22468
|
+
function preprocess(fn, schema) {
|
|
22469
22469
|
return new ZodPreprocess({
|
|
22470
22470
|
type: "pipe",
|
|
22471
|
-
in: transform(
|
|
22471
|
+
in: transform(fn),
|
|
22472
22472
|
out: schema
|
|
22473
22473
|
});
|
|
22474
22474
|
}
|
|
@@ -22538,8 +22538,8 @@ var init_schemas2 = __esm({
|
|
|
22538
22538
|
superRefine(refinement, params) {
|
|
22539
22539
|
return this.check(superRefine(refinement, params));
|
|
22540
22540
|
},
|
|
22541
|
-
overwrite(
|
|
22542
|
-
return this.check(_overwrite(
|
|
22541
|
+
overwrite(fn) {
|
|
22542
|
+
return this.check(_overwrite(fn));
|
|
22543
22543
|
},
|
|
22544
22544
|
optional() {
|
|
22545
22545
|
return optional(this);
|
|
@@ -22601,8 +22601,8 @@ var init_schemas2 = __esm({
|
|
|
22601
22601
|
isNullable() {
|
|
22602
22602
|
return this.safeParse(null).success;
|
|
22603
22603
|
},
|
|
22604
|
-
apply(
|
|
22605
|
-
return
|
|
22604
|
+
apply(fn) {
|
|
22605
|
+
return fn(this);
|
|
22606
22606
|
}
|
|
22607
22607
|
});
|
|
22608
22608
|
Object.defineProperty(inst, "description", {
|
|
@@ -25889,9 +25889,9 @@ var require_on_exit_leak_free = __commonJS({
|
|
|
25889
25889
|
function callRefs(event) {
|
|
25890
25890
|
for (const ref of refs[event]) {
|
|
25891
25891
|
const obj = ref.deref();
|
|
25892
|
-
const
|
|
25892
|
+
const fn = ref.fn;
|
|
25893
25893
|
if (obj !== void 0) {
|
|
25894
|
-
|
|
25894
|
+
fn(obj, event);
|
|
25895
25895
|
}
|
|
25896
25896
|
}
|
|
25897
25897
|
refs[event] = [];
|
|
@@ -25903,22 +25903,22 @@ var require_on_exit_leak_free = __commonJS({
|
|
|
25903
25903
|
uninstall(event);
|
|
25904
25904
|
}
|
|
25905
25905
|
}
|
|
25906
|
-
function _register(event, obj,
|
|
25906
|
+
function _register(event, obj, fn) {
|
|
25907
25907
|
if (obj === void 0) {
|
|
25908
25908
|
throw new Error("the object can't be undefined");
|
|
25909
25909
|
}
|
|
25910
25910
|
install(event);
|
|
25911
25911
|
const ref = new WeakRef(obj);
|
|
25912
|
-
ref.fn =
|
|
25912
|
+
ref.fn = fn;
|
|
25913
25913
|
ensureRegistry();
|
|
25914
25914
|
registry2.register(obj, ref);
|
|
25915
25915
|
refs[event].push(ref);
|
|
25916
25916
|
}
|
|
25917
|
-
function register(obj,
|
|
25918
|
-
_register("exit", obj,
|
|
25917
|
+
function register(obj, fn) {
|
|
25918
|
+
_register("exit", obj, fn);
|
|
25919
25919
|
}
|
|
25920
|
-
function registerBeforeExit(obj,
|
|
25921
|
-
_register("beforeExit", obj,
|
|
25920
|
+
function registerBeforeExit(obj, fn) {
|
|
25921
|
+
_register("beforeExit", obj, fn);
|
|
25922
25922
|
}
|
|
25923
25923
|
function unregister(obj) {
|
|
25924
25924
|
if (registry2 === void 0) {
|
|
@@ -26092,9 +26092,9 @@ var require_thread_stream = __commonJS({
|
|
|
26092
26092
|
var MAX_STRING = buffer.constants.MAX_STRING_LENGTH;
|
|
26093
26093
|
function noop() {
|
|
26094
26094
|
}
|
|
26095
|
-
function updateState(stream,
|
|
26095
|
+
function updateState(stream, fn) {
|
|
26096
26096
|
Atomics.add(stream[kImpl].state, SEQ_INDEX, 1);
|
|
26097
|
-
|
|
26097
|
+
fn();
|
|
26098
26098
|
Atomics.add(stream[kImpl].state, SEQ_INDEX, 1);
|
|
26099
26099
|
Atomics.notify(stream[kImpl].state, SEQ_INDEX);
|
|
26100
26100
|
}
|
|
@@ -33254,8 +33254,8 @@ var require_object_utils = __commonJS({
|
|
|
33254
33254
|
"use strict";
|
|
33255
33255
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
33256
33256
|
exports2.mapKeyValues = mapKeyValues;
|
|
33257
|
-
function mapKeyValues(obj,
|
|
33258
|
-
return Object.fromEntries(Object.entries(obj).map(([key, value]) => [key,
|
|
33257
|
+
function mapKeyValues(obj, fn) {
|
|
33258
|
+
return Object.fromEntries(Object.entries(obj).map(([key, value]) => [key, fn(key, value)]));
|
|
33259
33259
|
}
|
|
33260
33260
|
}
|
|
33261
33261
|
});
|
|
@@ -41145,9 +41145,9 @@ var require_make_client = __commonJS({
|
|
|
41145
41145
|
ServiceClientImpl.serviceName = serviceName;
|
|
41146
41146
|
return ServiceClientImpl;
|
|
41147
41147
|
}
|
|
41148
|
-
function partial2(
|
|
41148
|
+
function partial2(fn, path2, serialize, deserialize) {
|
|
41149
41149
|
return function(...args) {
|
|
41150
|
-
return
|
|
41150
|
+
return fn.call(this, path2, serialize, deserialize, ...args);
|
|
41151
41151
|
};
|
|
41152
41152
|
}
|
|
41153
41153
|
function isProtobufTypeDefinition(obj) {
|
|
@@ -41563,7 +41563,7 @@ var require_aspromise = __commonJS({
|
|
|
41563
41563
|
"node_modules/@protobufjs/aspromise/index.js"(exports2, module2) {
|
|
41564
41564
|
"use strict";
|
|
41565
41565
|
module2.exports = asPromise;
|
|
41566
|
-
function asPromise(
|
|
41566
|
+
function asPromise(fn, ctx) {
|
|
41567
41567
|
var params = new Array(arguments.length - 1), offset = 0, index = 2, pending = true;
|
|
41568
41568
|
while (index < arguments.length)
|
|
41569
41569
|
params[offset++] = arguments[index++];
|
|
@@ -41582,7 +41582,7 @@ var require_aspromise = __commonJS({
|
|
|
41582
41582
|
}
|
|
41583
41583
|
};
|
|
41584
41584
|
try {
|
|
41585
|
-
|
|
41585
|
+
fn.apply(ctx || null, params);
|
|
41586
41586
|
} catch (err) {
|
|
41587
41587
|
if (pending) {
|
|
41588
41588
|
pending = false;
|
|
@@ -41702,25 +41702,25 @@ var require_eventemitter = __commonJS({
|
|
|
41702
41702
|
function EventEmitter6() {
|
|
41703
41703
|
this._listeners = /* @__PURE__ */ Object.create(null);
|
|
41704
41704
|
}
|
|
41705
|
-
EventEmitter6.prototype.on = function
|
|
41705
|
+
EventEmitter6.prototype.on = function on(evt, fn, ctx) {
|
|
41706
41706
|
(this._listeners[evt] || (this._listeners[evt] = [])).push({
|
|
41707
|
-
fn
|
|
41707
|
+
fn,
|
|
41708
41708
|
ctx: ctx || this
|
|
41709
41709
|
});
|
|
41710
41710
|
return this;
|
|
41711
41711
|
};
|
|
41712
|
-
EventEmitter6.prototype.off = function off(evt,
|
|
41712
|
+
EventEmitter6.prototype.off = function off(evt, fn) {
|
|
41713
41713
|
if (evt === void 0)
|
|
41714
41714
|
this._listeners = /* @__PURE__ */ Object.create(null);
|
|
41715
41715
|
else {
|
|
41716
|
-
if (
|
|
41716
|
+
if (fn === void 0)
|
|
41717
41717
|
this._listeners[evt] = [];
|
|
41718
41718
|
else {
|
|
41719
41719
|
var listeners = this._listeners[evt];
|
|
41720
41720
|
if (!listeners)
|
|
41721
41721
|
return this;
|
|
41722
41722
|
for (var i = 0; i < listeners.length; )
|
|
41723
|
-
if (listeners[i].fn ===
|
|
41723
|
+
if (listeners[i].fn === fn)
|
|
41724
41724
|
listeners.splice(i, 1);
|
|
41725
41725
|
else
|
|
41726
41726
|
++i;
|
|
@@ -42352,8 +42352,8 @@ var require_writer = __commonJS({
|
|
|
42352
42352
|
var LongBits = util.LongBits;
|
|
42353
42353
|
var base643 = util.base64;
|
|
42354
42354
|
var utf8 = util.utf8;
|
|
42355
|
-
function Op(
|
|
42356
|
-
this.fn =
|
|
42355
|
+
function Op(fn, len, val) {
|
|
42356
|
+
this.fn = fn;
|
|
42357
42357
|
this.len = len;
|
|
42358
42358
|
this.next = void 0;
|
|
42359
42359
|
this.val = val;
|
|
@@ -42387,8 +42387,8 @@ var require_writer = __commonJS({
|
|
|
42387
42387
|
};
|
|
42388
42388
|
if (util.Array !== Array)
|
|
42389
42389
|
Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);
|
|
42390
|
-
Writer.prototype._push = function push(
|
|
42391
|
-
this.tail = this.tail.next = new Op(
|
|
42390
|
+
Writer.prototype._push = function push(fn, len, val) {
|
|
42391
|
+
this.tail = this.tail.next = new Op(fn, len, val);
|
|
42392
42392
|
this.len += len;
|
|
42393
42393
|
return this;
|
|
42394
42394
|
};
|
|
@@ -42787,25 +42787,25 @@ var require_reader = __commonJS({
|
|
|
42787
42787
|
BufferReader = BufferReader_;
|
|
42788
42788
|
Reader.create = create();
|
|
42789
42789
|
BufferReader._configure();
|
|
42790
|
-
var
|
|
42790
|
+
var fn = util.Long ? "toLong" : (
|
|
42791
42791
|
/* istanbul ignore next */
|
|
42792
42792
|
"toNumber"
|
|
42793
42793
|
);
|
|
42794
42794
|
util.merge(Reader.prototype, {
|
|
42795
42795
|
int64: function read_int64() {
|
|
42796
|
-
return readLongVarint.call(this)[
|
|
42796
|
+
return readLongVarint.call(this)[fn](false);
|
|
42797
42797
|
},
|
|
42798
42798
|
uint64: function read_uint64() {
|
|
42799
|
-
return readLongVarint.call(this)[
|
|
42799
|
+
return readLongVarint.call(this)[fn](true);
|
|
42800
42800
|
},
|
|
42801
42801
|
sint64: function read_sint64() {
|
|
42802
|
-
return readLongVarint.call(this).zzDecode()[
|
|
42802
|
+
return readLongVarint.call(this).zzDecode()[fn](false);
|
|
42803
42803
|
},
|
|
42804
42804
|
fixed64: function read_fixed64() {
|
|
42805
|
-
return readFixed64.call(this)[
|
|
42805
|
+
return readFixed64.call(this)[fn](true);
|
|
42806
42806
|
},
|
|
42807
42807
|
sfixed64: function read_sfixed64() {
|
|
42808
|
-
return readFixed64.call(this)[
|
|
42808
|
+
return readFixed64.call(this)[fn](false);
|
|
42809
42809
|
}
|
|
42810
42810
|
});
|
|
42811
42811
|
};
|
|
@@ -61134,8 +61134,8 @@ var require_writer2 = __commonJS({
|
|
|
61134
61134
|
var LongBits = util.LongBits;
|
|
61135
61135
|
var base643 = util.base64;
|
|
61136
61136
|
var utf8 = util.utf8;
|
|
61137
|
-
function Op(
|
|
61138
|
-
this.fn =
|
|
61137
|
+
function Op(fn, len, val) {
|
|
61138
|
+
this.fn = fn;
|
|
61139
61139
|
this.len = len;
|
|
61140
61140
|
this.next = void 0;
|
|
61141
61141
|
this.val = val;
|
|
@@ -61169,8 +61169,8 @@ var require_writer2 = __commonJS({
|
|
|
61169
61169
|
};
|
|
61170
61170
|
if (util.Array !== Array)
|
|
61171
61171
|
Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);
|
|
61172
|
-
Writer.prototype._push = function push(
|
|
61173
|
-
this.tail = this.tail.next = new Op(
|
|
61172
|
+
Writer.prototype._push = function push(fn, len, val) {
|
|
61173
|
+
this.tail = this.tail.next = new Op(fn, len, val);
|
|
61174
61174
|
this.len += len;
|
|
61175
61175
|
return this;
|
|
61176
61176
|
};
|
|
@@ -61568,25 +61568,25 @@ var require_reader2 = __commonJS({
|
|
|
61568
61568
|
BufferReader = BufferReader_;
|
|
61569
61569
|
Reader.create = create();
|
|
61570
61570
|
BufferReader._configure();
|
|
61571
|
-
var
|
|
61571
|
+
var fn = util.Long ? "toLong" : (
|
|
61572
61572
|
/* istanbul ignore next */
|
|
61573
61573
|
"toNumber"
|
|
61574
61574
|
);
|
|
61575
61575
|
util.merge(Reader.prototype, {
|
|
61576
61576
|
int64: function read_int64() {
|
|
61577
|
-
return readLongVarint.call(this)[
|
|
61577
|
+
return readLongVarint.call(this)[fn](false);
|
|
61578
61578
|
},
|
|
61579
61579
|
uint64: function read_uint64() {
|
|
61580
|
-
return readLongVarint.call(this)[
|
|
61580
|
+
return readLongVarint.call(this)[fn](true);
|
|
61581
61581
|
},
|
|
61582
61582
|
sint64: function read_sint64() {
|
|
61583
|
-
return readLongVarint.call(this).zzDecode()[
|
|
61583
|
+
return readLongVarint.call(this).zzDecode()[fn](false);
|
|
61584
61584
|
},
|
|
61585
61585
|
fixed64: function read_fixed64() {
|
|
61586
|
-
return readFixed64.call(this)[
|
|
61586
|
+
return readFixed64.call(this)[fn](true);
|
|
61587
61587
|
},
|
|
61588
61588
|
sfixed64: function read_sfixed64() {
|
|
61589
|
-
return readFixed64.call(this)[
|
|
61589
|
+
return readFixed64.call(this)[fn](false);
|
|
61590
61590
|
}
|
|
61591
61591
|
});
|
|
61592
61592
|
};
|
|
@@ -92749,9 +92749,9 @@ var require_connection = __commonJS({
|
|
|
92749
92749
|
*
|
|
92750
92750
|
* @see https://grpc.io/docs/guides/deadlines/
|
|
92751
92751
|
*/
|
|
92752
|
-
async withDeadline(deadline,
|
|
92752
|
+
async withDeadline(deadline, fn) {
|
|
92753
92753
|
const cc = this.callContextStorage.getStore();
|
|
92754
|
-
return await this.callContextStorage.run({ ...cc, deadline },
|
|
92754
|
+
return await this.callContextStorage.run({ ...cc, deadline }, fn);
|
|
92755
92755
|
}
|
|
92756
92756
|
/**
|
|
92757
92757
|
* Set an {@link AbortSignal} that, when aborted, cancels any ongoing service requests executed in
|
|
@@ -92775,9 +92775,9 @@ var require_connection = __commonJS({
|
|
|
92775
92775
|
*/
|
|
92776
92776
|
// FIXME: `abortSignal` should be cumulative, i.e. if a signal is already set, it should be added
|
|
92777
92777
|
// to the list of signals, and both the new and existing signal should abort the request.
|
|
92778
|
-
async withAbortSignal(abortSignal,
|
|
92778
|
+
async withAbortSignal(abortSignal, fn) {
|
|
92779
92779
|
const cc = this.callContextStorage.getStore();
|
|
92780
|
-
return await this.callContextStorage.run({ ...cc, abortSignal },
|
|
92780
|
+
return await this.callContextStorage.run({ ...cc, abortSignal }, fn);
|
|
92781
92781
|
}
|
|
92782
92782
|
/**
|
|
92783
92783
|
* Set metadata for any service requests executed in `fn`'s scope.
|
|
@@ -92795,12 +92795,12 @@ var require_connection = __commonJS({
|
|
|
92795
92795
|
* );
|
|
92796
92796
|
* ```
|
|
92797
92797
|
*/
|
|
92798
|
-
async withMetadata(metadata,
|
|
92798
|
+
async withMetadata(metadata, fn) {
|
|
92799
92799
|
const cc = this.callContextStorage.getStore();
|
|
92800
92800
|
return await this.callContextStorage.run({
|
|
92801
92801
|
...cc,
|
|
92802
92802
|
metadata: { ...cc?.metadata, ...metadata }
|
|
92803
|
-
},
|
|
92803
|
+
}, fn);
|
|
92804
92804
|
}
|
|
92805
92805
|
/**
|
|
92806
92806
|
* Set the apiKey for any service requests executed in `fn`'s scope (thus changing the `Authorization` header).
|
|
@@ -92815,12 +92815,12 @@ var require_connection = __commonJS({
|
|
|
92815
92815
|
* );
|
|
92816
92816
|
* ```
|
|
92817
92817
|
*/
|
|
92818
|
-
async withApiKey(apiKey,
|
|
92818
|
+
async withApiKey(apiKey, fn) {
|
|
92819
92819
|
const cc = this.callContextStorage.getStore();
|
|
92820
92820
|
return await this.callContextStorage.run({
|
|
92821
92821
|
...cc,
|
|
92822
92822
|
metadata: { ...cc?.metadata, Authorization: `Bearer ${apiKey}` }
|
|
92823
|
-
},
|
|
92823
|
+
}, fn);
|
|
92824
92824
|
}
|
|
92825
92825
|
/**
|
|
92826
92826
|
* Set the {@link ConnectionOptions.apiKey} for all subsequent requests. A static string or a
|
|
@@ -92935,8 +92935,8 @@ var require_base_client = __commonJS({
|
|
|
92935
92935
|
*
|
|
92936
92936
|
* @see https://grpc.io/docs/guides/deadlines/
|
|
92937
92937
|
*/
|
|
92938
|
-
async withDeadline(deadline,
|
|
92939
|
-
return await this.connection.withDeadline(deadline,
|
|
92938
|
+
async withDeadline(deadline, fn) {
|
|
92939
|
+
return await this.connection.withDeadline(deadline, fn);
|
|
92940
92940
|
}
|
|
92941
92941
|
/**
|
|
92942
92942
|
* Set an {@link AbortSignal} that, when aborted, cancels any ongoing service requests executed in
|
|
@@ -92949,8 +92949,8 @@ var require_base_client = __commonJS({
|
|
|
92949
92949
|
*
|
|
92950
92950
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
|
|
92951
92951
|
*/
|
|
92952
|
-
async withAbortSignal(abortSignal,
|
|
92953
|
-
return await this.connection.withAbortSignal(abortSignal,
|
|
92952
|
+
async withAbortSignal(abortSignal, fn) {
|
|
92953
|
+
return await this.connection.withAbortSignal(abortSignal, fn);
|
|
92954
92954
|
}
|
|
92955
92955
|
/**
|
|
92956
92956
|
* Set metadata for any service requests executed in `fn`'s scope.
|
|
@@ -92959,8 +92959,8 @@ var require_base_client = __commonJS({
|
|
|
92959
92959
|
*
|
|
92960
92960
|
* @returns returned value of `fn`
|
|
92961
92961
|
*/
|
|
92962
|
-
async withMetadata(metadata,
|
|
92963
|
-
return await this.connection.withMetadata(metadata,
|
|
92962
|
+
async withMetadata(metadata, fn) {
|
|
92963
|
+
return await this.connection.withMetadata(metadata, fn);
|
|
92964
92964
|
}
|
|
92965
92965
|
get dataConverter() {
|
|
92966
92966
|
return this.loadedDataConverter;
|
|
@@ -96258,8 +96258,8 @@ var require_workflow_client = __commonJS({
|
|
|
96258
96258
|
const onStartError = (err) => {
|
|
96259
96259
|
startWorkflowOperation[withStartWorkflowOperationReject](err);
|
|
96260
96260
|
};
|
|
96261
|
-
const
|
|
96262
|
-
const updateOutput = await
|
|
96261
|
+
const fn = (0, interceptors_1.composeInterceptors)(interceptors, "startUpdateWithStart", this._updateWithStartHandler.bind(this, waitForStage, onStart, onStartError));
|
|
96262
|
+
const updateOutput = await fn(startUpdateWithStartInput);
|
|
96263
96263
|
let outcome = updateOutput.updateOutcome;
|
|
96264
96264
|
if (!outcome && waitForStage === workflow_update_stage_1.WorkflowUpdateStage.COMPLETED) {
|
|
96265
96265
|
outcome = await this._pollForUpdateOutcome(updateOutput.updateId, {
|
|
@@ -96799,7 +96799,7 @@ var require_workflow_client = __commonJS({
|
|
|
96799
96799
|
_createWorkflowHandle({ workflowId, runId, firstExecutionRunId, interceptors, runIdForResult, ...resultOptions }) {
|
|
96800
96800
|
const _startUpdate = async (def, waitForStage, options) => {
|
|
96801
96801
|
const next = this._startUpdateHandler.bind(this, waitForStage);
|
|
96802
|
-
const
|
|
96802
|
+
const fn = (0, interceptors_1.composeInterceptors)(interceptors, "startUpdate", next);
|
|
96803
96803
|
const { args, ...opts } = options ?? {};
|
|
96804
96804
|
const input = {
|
|
96805
96805
|
workflowExecution: { workflowId, runId },
|
|
@@ -96810,7 +96810,7 @@ var require_workflow_client = __commonJS({
|
|
|
96810
96810
|
headers: {},
|
|
96811
96811
|
options: opts
|
|
96812
96812
|
};
|
|
96813
|
-
const output = await
|
|
96813
|
+
const output = await fn(input);
|
|
96814
96814
|
const handle = this.createWorkflowUpdateHandle(output.updateId, input.workflowExecution.workflowId, output.workflowRunId, output.outcome);
|
|
96815
96815
|
if (!output.outcome && waitForStage === workflow_update_stage_1.WorkflowUpdateStage.COMPLETED) {
|
|
96816
96816
|
await this._pollForUpdateOutcome(handle.updateId, input.workflowExecution);
|
|
@@ -96825,8 +96825,8 @@ var require_workflow_client = __commonJS({
|
|
|
96825
96825
|
},
|
|
96826
96826
|
async terminate(reason) {
|
|
96827
96827
|
const next = this.client._terminateWorkflowHandler.bind(this.client);
|
|
96828
|
-
const
|
|
96829
|
-
return await
|
|
96828
|
+
const fn = (0, interceptors_1.composeInterceptors)(interceptors, "terminate", next);
|
|
96829
|
+
return await fn({
|
|
96830
96830
|
workflowExecution: { workflowId, runId },
|
|
96831
96831
|
reason,
|
|
96832
96832
|
firstExecutionRunId
|
|
@@ -96834,16 +96834,16 @@ var require_workflow_client = __commonJS({
|
|
|
96834
96834
|
},
|
|
96835
96835
|
async cancel() {
|
|
96836
96836
|
const next = this.client._cancelWorkflowHandler.bind(this.client);
|
|
96837
|
-
const
|
|
96838
|
-
return await
|
|
96837
|
+
const fn = (0, interceptors_1.composeInterceptors)(interceptors, "cancel", next);
|
|
96838
|
+
return await fn({
|
|
96839
96839
|
workflowExecution: { workflowId, runId },
|
|
96840
96840
|
firstExecutionRunId
|
|
96841
96841
|
});
|
|
96842
96842
|
},
|
|
96843
96843
|
async describe() {
|
|
96844
96844
|
const next = this.client._describeWorkflowHandler.bind(this.client);
|
|
96845
|
-
const
|
|
96846
|
-
const raw2 = await
|
|
96845
|
+
const fn = (0, interceptors_1.composeInterceptors)(interceptors, "describe", next);
|
|
96846
|
+
const raw2 = await fn({
|
|
96847
96847
|
workflowExecution: { workflowId, runId }
|
|
96848
96848
|
});
|
|
96849
96849
|
const info = await (0, helpers_1.executionInfoFromRaw)(raw2.workflowExecutionInfo ?? {}, this.client.dataConverter, raw2, this.client.options.namespace);
|
|
@@ -96884,8 +96884,8 @@ var require_workflow_client = __commonJS({
|
|
|
96884
96884
|
},
|
|
96885
96885
|
async signal(def, ...args) {
|
|
96886
96886
|
const next = this.client._signalWorkflowHandler.bind(this.client);
|
|
96887
|
-
const
|
|
96888
|
-
await
|
|
96887
|
+
const fn = (0, interceptors_1.composeInterceptors)(interceptors, "signal", next);
|
|
96888
|
+
await fn({
|
|
96889
96889
|
workflowExecution: { workflowId, runId },
|
|
96890
96890
|
signalName: typeof def === "string" ? def : def.name,
|
|
96891
96891
|
args,
|
|
@@ -96894,8 +96894,8 @@ var require_workflow_client = __commonJS({
|
|
|
96894
96894
|
},
|
|
96895
96895
|
async query(def, ...args) {
|
|
96896
96896
|
const next = this.client._queryWorkflowHandler.bind(this.client);
|
|
96897
|
-
const
|
|
96898
|
-
return
|
|
96897
|
+
const fn = (0, interceptors_1.composeInterceptors)(interceptors, "query", next);
|
|
96898
|
+
return fn({
|
|
96899
96899
|
workflowExecution: { workflowId, runId },
|
|
96900
96900
|
queryRejectCondition: (0, types_1.encodeQueryRejectCondition)(this.client.options.queryRejectCondition),
|
|
96901
96901
|
queryType: typeof def === "string" ? def : def.name,
|
|
@@ -103578,10 +103578,10 @@ var require_textParsers = __commonJS({
|
|
|
103578
103578
|
var parseDate2 = require_postgres_date();
|
|
103579
103579
|
var parseInterval = require_postgres_interval();
|
|
103580
103580
|
var parseByteA = require_postgres_bytea();
|
|
103581
|
-
function allowNull(
|
|
103581
|
+
function allowNull(fn) {
|
|
103582
103582
|
return function nullAllowed(value) {
|
|
103583
103583
|
if (value === null) return value;
|
|
103584
|
-
return
|
|
103584
|
+
return fn(value);
|
|
103585
103585
|
};
|
|
103586
103586
|
}
|
|
103587
103587
|
function parseBool(value) {
|
|
@@ -113485,7 +113485,7 @@ var require_nacl_fast = __commonJS({
|
|
|
113485
113485
|
var _0 = new Uint8Array(16);
|
|
113486
113486
|
var _9 = new Uint8Array(32);
|
|
113487
113487
|
_9[0] = 9;
|
|
113488
|
-
var gf0 = gf(), gf1 = gf([1]), _121665 = gf([56129, 1]),
|
|
113488
|
+
var gf0 = gf(), gf1 = gf([1]), _121665 = gf([56129, 1]), D2 = gf([30883, 4953, 19914, 30187, 55467, 16705, 2637, 112, 59544, 30585, 16505, 36039, 65139, 11119, 27886, 20995]), D22 = gf([61785, 9906, 39828, 60374, 45398, 33411, 5274, 224, 53552, 61171, 33010, 6542, 64743, 22239, 55772, 9222]), X3 = gf([54554, 36645, 11616, 51542, 42930, 38181, 51040, 26924, 56412, 64982, 57905, 49316, 21502, 52590, 14035, 8553]), Y3 = gf([26200, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214]), I3 = gf([41136, 18958, 6951, 50414, 58488, 44335, 6150, 12099, 55207, 15867, 153, 11085, 57099, 20417, 9344, 11139]);
|
|
113489
113489
|
function ts64(x2, i, h, l) {
|
|
113490
113490
|
x2[i] = h >> 24 & 255;
|
|
113491
113491
|
x2[i + 1] = h >> 16 & 255;
|
|
@@ -113816,16 +113816,16 @@ var require_nacl_fast = __commonJS({
|
|
|
113816
113816
|
function crypto_stream(c, cpos, d, n, k2) {
|
|
113817
113817
|
var s3 = new Uint8Array(32);
|
|
113818
113818
|
crypto_core_hsalsa20(s3, n, k2, sigma);
|
|
113819
|
-
var
|
|
113820
|
-
for (var i = 0; i < 8; i++)
|
|
113821
|
-
return crypto_stream_salsa20(c, cpos, d,
|
|
113819
|
+
var sn2 = new Uint8Array(8);
|
|
113820
|
+
for (var i = 0; i < 8; i++) sn2[i] = n[i + 16];
|
|
113821
|
+
return crypto_stream_salsa20(c, cpos, d, sn2, s3);
|
|
113822
113822
|
}
|
|
113823
113823
|
function crypto_stream_xor(c, cpos, m2, mpos, d, n, k2) {
|
|
113824
113824
|
var s3 = new Uint8Array(32);
|
|
113825
113825
|
crypto_core_hsalsa20(s3, n, k2, sigma);
|
|
113826
|
-
var
|
|
113827
|
-
for (var i = 0; i < 8; i++)
|
|
113828
|
-
return crypto_stream_salsa20_xor(c, cpos, m2, mpos, d,
|
|
113826
|
+
var sn2 = new Uint8Array(8);
|
|
113827
|
+
for (var i = 0; i < 8; i++) sn2[i] = n[i + 16];
|
|
113828
|
+
return crypto_stream_salsa20_xor(c, cpos, m2, mpos, d, sn2, s3);
|
|
113829
113829
|
}
|
|
113830
113830
|
var poly1305 = function(key) {
|
|
113831
113831
|
this.buffer = new Uint8Array(16);
|
|
@@ -115385,7 +115385,7 @@ var require_nacl_fast = __commonJS({
|
|
|
115385
115385
|
set25519(r[2], gf1);
|
|
115386
115386
|
unpack25519(r[1], p2);
|
|
115387
115387
|
S2(num, r[1]);
|
|
115388
|
-
M3(den, num,
|
|
115388
|
+
M3(den, num, D2);
|
|
115389
115389
|
Z3(num, num, r[2]);
|
|
115390
115390
|
A2(den, r[2], den);
|
|
115391
115391
|
S2(den2, den);
|
|
@@ -115472,7 +115472,7 @@ var require_nacl_fast = __commonJS({
|
|
|
115472
115472
|
crypto_sign_SEEDBYTES,
|
|
115473
115473
|
crypto_hash_BYTES,
|
|
115474
115474
|
gf,
|
|
115475
|
-
D:
|
|
115475
|
+
D: D2,
|
|
115476
115476
|
L: L3,
|
|
115477
115477
|
pack25519,
|
|
115478
115478
|
unpack25519,
|
|
@@ -115663,8 +115663,8 @@ var require_nacl_fast = __commonJS({
|
|
|
115663
115663
|
if (x2.length !== y2.length) return false;
|
|
115664
115664
|
return vn2(x2, 0, y2, 0, x2.length) === 0 ? true : false;
|
|
115665
115665
|
};
|
|
115666
|
-
nacl2.setPRNG = function(
|
|
115667
|
-
randombytes =
|
|
115666
|
+
nacl2.setPRNG = function(fn) {
|
|
115667
|
+
randombytes = fn;
|
|
115668
115668
|
};
|
|
115669
115669
|
(function() {
|
|
115670
115670
|
var crypto4 = typeof self !== "undefined" ? self.crypto || self.msCrypto : null;
|
|
@@ -115765,24 +115765,24 @@ var require_libheif_bundle = __commonJS({
|
|
|
115765
115765
|
"node_modules/libheif-js/libheif-wasm/libheif-bundle.js"(exports2, module2) {
|
|
115766
115766
|
"use strict";
|
|
115767
115767
|
var libheif = (() => {
|
|
115768
|
-
var
|
|
115768
|
+
var xe2 = Object.create;
|
|
115769
115769
|
var wA = Object.defineProperty;
|
|
115770
|
-
var
|
|
115770
|
+
var Le = Object.getOwnPropertyDescriptor;
|
|
115771
115771
|
var ye2 = Object.getOwnPropertyNames;
|
|
115772
115772
|
var Oe2 = Object.getPrototypeOf, Je2 = Object.prototype.hasOwnProperty;
|
|
115773
|
-
var be2 = ((f2) => typeof require != "undefined" ? require : typeof Proxy != "undefined" ? new Proxy(f2, { get: (
|
|
115773
|
+
var be2 = ((f2) => typeof require != "undefined" ? require : typeof Proxy != "undefined" ? new Proxy(f2, { get: (N3, y2) => (typeof require != "undefined" ? require : N3)[y2] }) : f2)(function(f2) {
|
|
115774
115774
|
if (typeof require != "undefined") return require.apply(this, arguments);
|
|
115775
115775
|
throw Error('Dynamic require of "' + f2 + '" is not supported');
|
|
115776
115776
|
});
|
|
115777
|
-
var Ej = (f2,
|
|
115778
|
-
for (var y2 in
|
|
115779
|
-
}, Zj = (f2,
|
|
115780
|
-
if (
|
|
115777
|
+
var Ej = (f2, N3) => () => (N3 || f2((N3 = { exports: {} }).exports, N3), N3.exports), De2 = (f2, N3) => {
|
|
115778
|
+
for (var y2 in N3) wA(f2, y2, { get: N3[y2], enumerable: true });
|
|
115779
|
+
}, Zj = (f2, N3, y2, K3) => {
|
|
115780
|
+
if (N3 && typeof N3 == "object" || typeof N3 == "function") for (let r of ye2(N3)) !Je2.call(f2, r) && r !== y2 && wA(f2, r, { get: () => N3[r], enumerable: !(K3 = Le(N3, r)) || K3.enumerable });
|
|
115781
115781
|
return f2;
|
|
115782
115782
|
};
|
|
115783
|
-
var we2 = (f2,
|
|
115783
|
+
var we2 = (f2, N3, y2) => (y2 = f2 != null ? xe2(Oe2(f2)) : {}, Zj(N3 || !f2 || !f2.__esModule ? wA(y2, "default", { value: f2, enumerable: true }) : y2, f2)), Ce2 = (f2) => Zj(wA({}, "__esModule", { value: true }), f2);
|
|
115784
115784
|
var Qj = (() => {
|
|
115785
|
-
for (var f2 = new Uint8Array(128),
|
|
115785
|
+
for (var f2 = new Uint8Array(128), N3 = 0; N3 < 64; N3++) f2[N3 < 26 ? N3 + 65 : N3 < 52 ? N3 + 71 : N3 < 62 ? N3 - 4 : N3 * 4 - 205] = N3;
|
|
115786
115786
|
return (y2) => {
|
|
115787
115787
|
for (var K3 = y2.length, r = new Uint8Array((K3 - (y2[K3 - 1] == "=") - (y2[K3 - 2] == "=")) * 3 / 4 | 0), z3 = 0, AA = 0; z3 < K3; ) {
|
|
115788
115788
|
var sj = f2[y2.charCodeAt(z3++)], qA = f2[y2.charCodeAt(z3++)], jA = f2[y2.charCodeAt(z3++)], _A = f2[y2.charCodeAt(z3++)];
|
|
@@ -115799,8 +115799,8 @@ var require_libheif_bundle = __commonJS({
|
|
|
115799
115799
|
});
|
|
115800
115800
|
var l6 = Ej((k6, nj) => {
|
|
115801
115801
|
var r6 = (() => {
|
|
115802
|
-
var f2,
|
|
115803
|
-
return typeof __filename != "undefined" && (
|
|
115802
|
+
var f2, N3 = typeof document != "undefined" ? (f2 = document.currentScript) == null ? void 0 : f2.src : void 0;
|
|
115803
|
+
return typeof __filename != "undefined" && (N3 || (N3 = __filename)), function(y2 = {}) {
|
|
115804
115804
|
var K3, r = y2, z3, AA, sj = new Promise((A2, j2) => {
|
|
115805
115805
|
z3 = A2, AA = j2;
|
|
115806
115806
|
}), qA = typeof window == "object", jA = typeof importScripts == "function", _A = typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string", Gj = Object.assign({}, r), dj = [], CA = "./this.program", $j = (A2, j2) => {
|
|
@@ -115822,7 +115822,7 @@ var require_libheif_bundle = __commonJS({
|
|
|
115822
115822
|
}, !r.thisProgram && process.argv.length > 1 && (CA = process.argv[1].replace(/\\/g, "/")), dj = process.argv.slice(2), $j = (A2, j2) => {
|
|
115823
115823
|
throw process.exitCode = A2, j2;
|
|
115824
115824
|
};
|
|
115825
|
-
} else (qA || jA) && (jA ? M3 = self.location.href : typeof document != "undefined" && document.currentScript && (M3 = document.currentScript.src),
|
|
115825
|
+
} else (qA || jA) && (jA ? M3 = self.location.href : typeof document != "undefined" && document.currentScript && (M3 = document.currentScript.src), N3 && (M3 = N3), M3.startsWith("blob:") ? M3 = "" : M3 = M3.substr(0, M3.replace(/[?#].*/, "").lastIndexOf("/") + 1), aA = (A2) => {
|
|
115826
115826
|
var j2 = new XMLHttpRequest();
|
|
115827
115827
|
return j2.open("GET", A2, false), j2.send(null), j2.responseText;
|
|
115828
115828
|
}, jA && (hA = (A2) => {
|
|
@@ -115846,10 +115846,10 @@ var require_libheif_bundle = __commonJS({
|
|
|
115846
115846
|
Object.assign(r, Gj), Gj = null, r.arguments && (dj = r.arguments), r.thisProgram && (CA = r.thisProgram), r.quit && ($j = r.quit);
|
|
115847
115847
|
var KA;
|
|
115848
115848
|
r.wasmBinary && (KA = r.wasmBinary);
|
|
115849
|
-
var mA, pj = false, o6, J3,
|
|
115849
|
+
var mA, pj = false, o6, J3, D2, R2, iA, H2, m2, Hj, cj;
|
|
115850
115850
|
function qj() {
|
|
115851
115851
|
var A2 = mA.buffer;
|
|
115852
|
-
r.HEAP8 = J3 = new Int8Array(A2), r.HEAP16 = R2 = new Int16Array(A2), r.HEAPU8 =
|
|
115852
|
+
r.HEAP8 = J3 = new Int8Array(A2), r.HEAP16 = R2 = new Int16Array(A2), r.HEAPU8 = D2 = new Uint8Array(A2), r.HEAPU16 = iA = new Uint16Array(A2), r.HEAP32 = H2 = new Int32Array(A2), r.HEAPU32 = m2 = new Uint32Array(A2), r.HEAPF32 = Hj = new Float32Array(A2), r.HEAPF64 = cj = new Float64Array(A2);
|
|
115853
115853
|
}
|
|
115854
115854
|
var hj = [], mj = [], Nj = [], i6 = false;
|
|
115855
115855
|
function E6() {
|
|
@@ -115951,7 +115951,7 @@ var require_libheif_bundle = __commonJS({
|
|
|
115951
115951
|
}
|
|
115952
115952
|
}
|
|
115953
115953
|
return _2;
|
|
115954
|
-
}, eA = (A2, j2) => A2 ? kA(
|
|
115954
|
+
}, eA = (A2, j2) => A2 ? kA(D2, A2, j2) : "", N6 = (A2, j2, t2, e) => {
|
|
115955
115955
|
nA(`Assertion failed: ${eA(A2)}, at: ` + [j2 ? eA(j2) : "unknown filename", t2, e ? eA(e) : "unknown function"]);
|
|
115956
115956
|
};
|
|
115957
115957
|
class f6 {
|
|
@@ -116955,7 +116955,7 @@ var require_libheif_bundle = __commonJS({
|
|
|
116955
116955
|
}, doMsync(A2, j2, t2, e, l) {
|
|
116956
116956
|
if (!k2.isFile(j2.node.mode)) throw new k2.ErrnoError(43);
|
|
116957
116957
|
if (e & 2) return 0;
|
|
116958
|
-
var _2 =
|
|
116958
|
+
var _2 = D2.slice(A2, A2 + t2);
|
|
116959
116959
|
k2.msync(j2, _2, l, t2, e);
|
|
116960
116960
|
}, getStreamFromFD(A2) {
|
|
116961
116961
|
var j2 = k2.getStreamChecked(A2);
|
|
@@ -117136,7 +117136,7 @@ var require_libheif_bundle = __commonJS({
|
|
|
117136
117136
|
for (var A2 = new Array(256), j2 = 0; j2 < 256; ++j2) A2[j2] = String.fromCharCode(j2);
|
|
117137
117137
|
xj = A2;
|
|
117138
117138
|
}, xj, C3 = (A2) => {
|
|
117139
|
-
for (var j2 = "", t2 = A2;
|
|
117139
|
+
for (var j2 = "", t2 = A2; D2[t2]; ) j2 += xj[D2[t2++]];
|
|
117140
117140
|
return j2;
|
|
117141
117141
|
}, GA, v3 = (A2) => {
|
|
117142
117142
|
throw new GA(A2);
|
|
@@ -117162,7 +117162,7 @@ var require_libheif_bundle = __commonJS({
|
|
|
117162
117162
|
}, toWireType: function(l, _2) {
|
|
117163
117163
|
return _2 ? t2 : e;
|
|
117164
117164
|
}, argPackAdvance: X3, readValueFromPointer: function(l) {
|
|
117165
|
-
return this.fromWireType(
|
|
117165
|
+
return this.fromWireType(D2[l]);
|
|
117166
117166
|
}, destructorFunction: null });
|
|
117167
117167
|
}, V6 = (A2) => ({ count: A2.count, deleteScheduled: A2.deleteScheduled, preservePointerOnDelete: A2.preservePointerOnDelete, ptr: A2.ptr, ptrType: A2.ptrType, smartPtr: A2.smartPtr, smartPtrType: A2.smartPtrType }), Aj = (A2) => {
|
|
117168
117168
|
function j2(t2) {
|
|
@@ -117417,7 +117417,7 @@ var require_libheif_bundle = __commonJS({
|
|
|
117417
117417
|
return t2 ? function(e) {
|
|
117418
117418
|
return this.fromWireType(J3[e]);
|
|
117419
117419
|
} : function(e) {
|
|
117420
|
-
return this.fromWireType(
|
|
117420
|
+
return this.fromWireType(D2[e]);
|
|
117421
117421
|
};
|
|
117422
117422
|
case 2:
|
|
117423
117423
|
return t2 ? function(e) {
|
|
@@ -117513,7 +117513,7 @@ var require_libheif_bundle = __commonJS({
|
|
|
117513
117513
|
}, xt2 = (A2, j2, t2) => {
|
|
117514
117514
|
switch (j2) {
|
|
117515
117515
|
case 1:
|
|
117516
|
-
return t2 ? (e) => J3[e] : (e) =>
|
|
117516
|
+
return t2 ? (e) => J3[e] : (e) => D2[e];
|
|
117517
117517
|
case 2:
|
|
117518
117518
|
return t2 ? (e) => R2[e >> 1] : (e) => iA[e >> 1];
|
|
117519
117519
|
case 4:
|
|
@@ -117542,20 +117542,20 @@ var require_libheif_bundle = __commonJS({
|
|
|
117542
117542
|
return new l(J3.buffer, i, o);
|
|
117543
117543
|
}
|
|
117544
117544
|
t2 = C3(t2), T2(A2, { name: t2, fromWireType: _2, argPackAdvance: X3, readValueFromPointer: _2 }, { ignoreDuplicateRegistrations: true });
|
|
117545
|
-
}, Ot2 = (A2, j2, t2) => zA(A2,
|
|
117545
|
+
}, Ot2 = (A2, j2, t2) => zA(A2, D2, j2, t2), Jt2 = (A2, j2) => {
|
|
117546
117546
|
j2 = C3(j2);
|
|
117547
117547
|
var t2 = j2 === "std::string";
|
|
117548
117548
|
T2(A2, { name: j2, fromWireType(e) {
|
|
117549
117549
|
var l = m2[e >> 2], _2 = e + 4, a;
|
|
117550
117550
|
if (t2) for (var o = _2, i = 0; i <= l; ++i) {
|
|
117551
117551
|
var n = _2 + i;
|
|
117552
|
-
if (i == l ||
|
|
117552
|
+
if (i == l || D2[n] == 0) {
|
|
117553
117553
|
var s3 = n - o, u3 = eA(o, s3);
|
|
117554
117554
|
a === void 0 ? a = u3 : (a += "\0", a += u3), o = n + 1;
|
|
117555
117555
|
}
|
|
117556
117556
|
}
|
|
117557
117557
|
else {
|
|
117558
|
-
for (var d = new Array(l), i = 0; i < l; ++i) d[i] = String.fromCharCode(
|
|
117558
|
+
for (var d = new Array(l), i = 0; i < l; ++i) d[i] = String.fromCharCode(D2[_2 + i]);
|
|
117559
117559
|
a = d.join("");
|
|
117560
117560
|
}
|
|
117561
117561
|
return Z3(e), a;
|
|
@@ -117567,16 +117567,16 @@ var require_libheif_bundle = __commonJS({
|
|
|
117567
117567
|
if (m2[o >> 2] = _2, t2 && a) Ot2(l, i, _2 + 1);
|
|
117568
117568
|
else if (a) for (var n = 0; n < _2; ++n) {
|
|
117569
117569
|
var s3 = l.charCodeAt(n);
|
|
117570
|
-
s3 > 255 && (Z3(i), v3("String has UTF-16 code units that do not fit in 8 bits")),
|
|
117570
|
+
s3 > 255 && (Z3(i), v3("String has UTF-16 code units that do not fit in 8 bits")), D2[i + n] = s3;
|
|
117571
117571
|
}
|
|
117572
|
-
else for (var n = 0; n < _2; ++n)
|
|
117572
|
+
else for (var n = 0; n < _2; ++n) D2[i + n] = l[n];
|
|
117573
117573
|
return e !== null && e.push(Z3, o), o;
|
|
117574
117574
|
}, argPackAdvance: X3, readValueFromPointer: sA, destructorFunction(e) {
|
|
117575
117575
|
Z3(e);
|
|
117576
117576
|
} });
|
|
117577
117577
|
}, Mj = typeof TextDecoder != "undefined" ? new TextDecoder("utf-16le") : void 0, bt2 = (A2, j2) => {
|
|
117578
117578
|
for (var t2 = A2, e = t2 >> 1, l = e + j2 / 2; !(e >= l) && iA[e]; ) ++e;
|
|
117579
|
-
if (t2 = e << 1, t2 - A2 > 32 && Mj) return Mj.decode(
|
|
117579
|
+
if (t2 = e << 1, t2 - A2 > 32 && Mj) return Mj.decode(D2.subarray(A2, t2));
|
|
117580
117580
|
for (var _2 = "", a = 0; !(a >= j2 / 2); ++a) {
|
|
117581
117581
|
var o = R2[A2 + a * 2 >> 1];
|
|
117582
117582
|
if (o == 0) break;
|
|
@@ -117645,7 +117645,7 @@ var require_libheif_bundle = __commonJS({
|
|
|
117645
117645
|
j2 = C3(j2), T2(A2, { isVoid: true, name: j2, argPackAdvance: 0, fromWireType: () => {
|
|
117646
117646
|
}, toWireType: (t2, e) => {
|
|
117647
117647
|
} });
|
|
117648
|
-
}, Rt2 = (A2, j2, t2) =>
|
|
117648
|
+
}, Rt2 = (A2, j2, t2) => D2.copyWithin(A2, j2, j2 + t2), Vt2 = {}, Kj = (A2) => {
|
|
117649
117649
|
var j2 = Vt2[A2];
|
|
117650
117650
|
return j2 === void 0 ? C3(A2) : j2;
|
|
117651
117651
|
}, aj = [], Ut2 = (A2, j2, t2, e, l) => (A2 = aj[A2], j2 = P3.toValue(j2), t2 = Kj(t2), A2(j2, j2[t2], e, l)), Yt2 = (A2) => {
|
|
@@ -117684,7 +117684,7 @@ var require_libheif_bundle = __commonJS({
|
|
|
117684
117684
|
} catch {
|
|
117685
117685
|
}
|
|
117686
117686
|
}, ae2 = (A2) => {
|
|
117687
|
-
var j2 =
|
|
117687
|
+
var j2 = D2.length;
|
|
117688
117688
|
A2 >>>= 0;
|
|
117689
117689
|
var t2 = Be2();
|
|
117690
117690
|
if (A2 > t2) return false;
|
|
@@ -123522,15 +123522,16 @@ var require_range = __commonJS({
|
|
|
123522
123522
|
};
|
|
123523
123523
|
var replaceTilde = (comp, options) => {
|
|
123524
123524
|
const r = options.loose ? re2[t2.TILDELOOSE] : re2[t2.TILDE];
|
|
123525
|
+
const z3 = options.includePrerelease ? "-0" : "";
|
|
123525
123526
|
return comp.replace(r, (_2, M3, m2, p2, pr2) => {
|
|
123526
123527
|
debug("tilde", comp, _2, M3, m2, p2, pr2);
|
|
123527
123528
|
let ret;
|
|
123528
123529
|
if (isX(M3)) {
|
|
123529
123530
|
ret = "";
|
|
123530
123531
|
} else if (isX(m2)) {
|
|
123531
|
-
ret = `>=${M3}.0.0 <${+M3 + 1}.0.0-0`;
|
|
123532
|
+
ret = `>=${M3}.0.0${z3} <${+M3 + 1}.0.0-0`;
|
|
123532
123533
|
} else if (isX(p2)) {
|
|
123533
|
-
ret = `>=${M3}.${m2}.0 <${M3}.${+m2 + 1}.0-0`;
|
|
123534
|
+
ret = `>=${M3}.${m2}.0${z3} <${M3}.${+m2 + 1}.0-0`;
|
|
123534
123535
|
} else if (pr2) {
|
|
123535
123536
|
debug("replaceTilde pr", pr2);
|
|
123536
123537
|
ret = `>=${M3}.${m2}.${p2}-${pr2} <${M3}.${+m2 + 1}.0-0`;
|
|
@@ -125076,8 +125077,8 @@ var Argument = class {
|
|
|
125076
125077
|
* @param {Function} [fn]
|
|
125077
125078
|
* @return {Argument}
|
|
125078
125079
|
*/
|
|
125079
|
-
argParser(
|
|
125080
|
-
this.parseArg =
|
|
125080
|
+
argParser(fn) {
|
|
125081
|
+
this.parseArg = fn;
|
|
125081
125082
|
return this;
|
|
125082
125083
|
}
|
|
125083
125084
|
/**
|
|
@@ -125840,8 +125841,8 @@ var Option = class {
|
|
|
125840
125841
|
* @param {Function} [fn]
|
|
125841
125842
|
* @return {Option}
|
|
125842
125843
|
*/
|
|
125843
|
-
argParser(
|
|
125844
|
-
this.parseArg =
|
|
125844
|
+
argParser(fn) {
|
|
125845
|
+
this.parseArg = fn;
|
|
125845
125846
|
return this;
|
|
125846
125847
|
}
|
|
125847
125848
|
/**
|
|
@@ -126522,9 +126523,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
126522
126523
|
* @param {Function} [fn] optional callback which will be passed a CommanderError, defaults to throwing
|
|
126523
126524
|
* @return {Command} `this` command for chaining
|
|
126524
126525
|
*/
|
|
126525
|
-
exitOverride(
|
|
126526
|
-
if (
|
|
126527
|
-
this._exitCallback =
|
|
126526
|
+
exitOverride(fn) {
|
|
126527
|
+
if (fn) {
|
|
126528
|
+
this._exitCallback = fn;
|
|
126528
126529
|
} else {
|
|
126529
126530
|
this._exitCallback = (err) => {
|
|
126530
126531
|
if (err.code !== "commander.executeSubCommandAsync") {
|
|
@@ -126564,7 +126565,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
126564
126565
|
* @param {Function} fn
|
|
126565
126566
|
* @return {Command} `this` command for chaining
|
|
126566
126567
|
*/
|
|
126567
|
-
action(
|
|
126568
|
+
action(fn) {
|
|
126568
126569
|
const listener = (args) => {
|
|
126569
126570
|
const expectedArgsCount = this.registeredArguments.length;
|
|
126570
126571
|
const actionArgs = args.slice(0, expectedArgsCount);
|
|
@@ -126574,7 +126575,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
126574
126575
|
actionArgs[expectedArgsCount] = this.opts();
|
|
126575
126576
|
}
|
|
126576
126577
|
actionArgs.push(this);
|
|
126577
|
-
return
|
|
126578
|
+
return fn.apply(this, actionArgs);
|
|
126578
126579
|
};
|
|
126579
126580
|
this._actionHandler = listener;
|
|
126580
126581
|
return this;
|
|
@@ -126705,7 +126706,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
126705
126706
|
* @return {Command} `this` command for chaining
|
|
126706
126707
|
* @private
|
|
126707
126708
|
*/
|
|
126708
|
-
_optionEx(config2, flags, description,
|
|
126709
|
+
_optionEx(config2, flags, description, fn, defaultValue) {
|
|
126709
126710
|
if (typeof flags === "object" && flags instanceof Option) {
|
|
126710
126711
|
throw new Error(
|
|
126711
126712
|
"To add an Option object use addOption() instead of option() or requiredOption()"
|
|
@@ -126713,17 +126714,17 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
126713
126714
|
}
|
|
126714
126715
|
const option = this.createOption(flags, description);
|
|
126715
126716
|
option.makeOptionMandatory(!!config2.mandatory);
|
|
126716
|
-
if (typeof
|
|
126717
|
-
option.default(defaultValue).argParser(
|
|
126718
|
-
} else if (
|
|
126719
|
-
const regex =
|
|
126720
|
-
|
|
126717
|
+
if (typeof fn === "function") {
|
|
126718
|
+
option.default(defaultValue).argParser(fn);
|
|
126719
|
+
} else if (fn instanceof RegExp) {
|
|
126720
|
+
const regex = fn;
|
|
126721
|
+
fn = (val, def) => {
|
|
126721
126722
|
const m2 = regex.exec(val);
|
|
126722
126723
|
return m2 ? m2[0] : def;
|
|
126723
126724
|
};
|
|
126724
|
-
option.default(defaultValue).argParser(
|
|
126725
|
+
option.default(defaultValue).argParser(fn);
|
|
126725
126726
|
} else {
|
|
126726
|
-
option.default(
|
|
126727
|
+
option.default(fn);
|
|
126727
126728
|
}
|
|
126728
126729
|
return this.addOption(option);
|
|
126729
126730
|
}
|
|
@@ -127336,11 +127337,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
127336
127337
|
* @return {(Promise|undefined)}
|
|
127337
127338
|
* @private
|
|
127338
127339
|
*/
|
|
127339
|
-
_chainOrCall(promise2,
|
|
127340
|
+
_chainOrCall(promise2, fn) {
|
|
127340
127341
|
if (promise2?.then && typeof promise2.then === "function") {
|
|
127341
|
-
return promise2.then(() =>
|
|
127342
|
+
return promise2.then(() => fn());
|
|
127342
127343
|
}
|
|
127343
|
-
return
|
|
127344
|
+
return fn();
|
|
127344
127345
|
}
|
|
127345
127346
|
/**
|
|
127346
127347
|
*
|
|
@@ -129941,11 +129942,11 @@ var binaryExtensions = /* @__PURE__ */ new Set([
|
|
|
129941
129942
|
"zipx"
|
|
129942
129943
|
]);
|
|
129943
129944
|
var isBinaryPath = (filePath) => binaryExtensions.has(sysPath.extname(filePath).slice(1).toLowerCase());
|
|
129944
|
-
var foreach = (val,
|
|
129945
|
+
var foreach = (val, fn) => {
|
|
129945
129946
|
if (val instanceof Set) {
|
|
129946
|
-
val.forEach(
|
|
129947
|
+
val.forEach(fn);
|
|
129947
129948
|
} else {
|
|
129948
|
-
|
|
129949
|
+
fn(val);
|
|
129949
129950
|
}
|
|
129950
129951
|
};
|
|
129951
129952
|
var addAndConvert = (main, prop, item) => {
|
|
@@ -134079,14 +134080,19 @@ var POOL_SIZE_MULTIPLIER = 128;
|
|
|
134079
134080
|
var pool;
|
|
134080
134081
|
var poolOffset;
|
|
134081
134082
|
var fillPool = (bytes) => {
|
|
134082
|
-
if (bytes < 0
|
|
134083
|
-
|
|
134084
|
-
pool
|
|
134085
|
-
|
|
134086
|
-
|
|
134087
|
-
|
|
134088
|
-
|
|
134089
|
-
|
|
134083
|
+
if (bytes < 0) throw new RangeError("Wrong ID size");
|
|
134084
|
+
try {
|
|
134085
|
+
if (!pool || pool.length < bytes) {
|
|
134086
|
+
pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
|
|
134087
|
+
import_crypto3.default.randomFillSync(pool);
|
|
134088
|
+
poolOffset = 0;
|
|
134089
|
+
} else if (poolOffset + bytes > pool.length) {
|
|
134090
|
+
import_crypto3.default.randomFillSync(pool);
|
|
134091
|
+
poolOffset = 0;
|
|
134092
|
+
}
|
|
134093
|
+
} catch (e) {
|
|
134094
|
+
pool = void 0;
|
|
134095
|
+
throw e;
|
|
134090
134096
|
}
|
|
134091
134097
|
poolOffset += bytes;
|
|
134092
134098
|
};
|
|
@@ -136920,6 +136926,7 @@ var createHonoApp = (deps, upgradeWebSocket) => {
|
|
|
136920
136926
|
const start = Date.now();
|
|
136921
136927
|
const ua2 = c.req.header("user-agent") ?? "";
|
|
136922
136928
|
await next();
|
|
136929
|
+
if (!deps.logMenubarRequests && c.req.header("x-client") === "menubar") return;
|
|
136923
136930
|
const ms2 = Date.now() - start;
|
|
136924
136931
|
httpLog.info(`[req] ${c.req.method} ${c.req.path} \u2192 ${c.res.status} ${ms2}ms`, {
|
|
136925
136932
|
method: c.req.method,
|
|
@@ -140160,11 +140167,11 @@ var binaryExtensions2 = /* @__PURE__ */ new Set([
|
|
|
140160
140167
|
"zipx"
|
|
140161
140168
|
]);
|
|
140162
140169
|
var isBinaryPath2 = (filePath) => binaryExtensions2.has(sp.extname(filePath).slice(1).toLowerCase());
|
|
140163
|
-
var foreach2 = (val,
|
|
140170
|
+
var foreach2 = (val, fn) => {
|
|
140164
140171
|
if (val instanceof Set) {
|
|
140165
|
-
val.forEach(
|
|
140172
|
+
val.forEach(fn);
|
|
140166
140173
|
} else {
|
|
140167
|
-
|
|
140174
|
+
fn(val);
|
|
140168
140175
|
}
|
|
140169
140176
|
};
|
|
140170
140177
|
var addAndConvert2 = (main, prop, item) => {
|
|
@@ -141904,7 +141911,7 @@ function computeConversationEtag({
|
|
|
141904
141911
|
}
|
|
141905
141912
|
|
|
141906
141913
|
// src/utils/debounce.ts
|
|
141907
|
-
function debounce(
|
|
141914
|
+
function debounce(fn, waitMs) {
|
|
141908
141915
|
let timer = null;
|
|
141909
141916
|
let lastArgs = null;
|
|
141910
141917
|
const run2 = () => {
|
|
@@ -141912,7 +141919,7 @@ function debounce(fn2, waitMs) {
|
|
|
141912
141919
|
if (lastArgs) {
|
|
141913
141920
|
const args = lastArgs;
|
|
141914
141921
|
lastArgs = null;
|
|
141915
|
-
|
|
141922
|
+
fn(...args);
|
|
141916
141923
|
}
|
|
141917
141924
|
};
|
|
141918
141925
|
const debounced = (...args) => {
|
|
@@ -142095,6 +142102,9 @@ var StreamerServer = class {
|
|
|
142095
142102
|
// /input { keys }. Cleared when the gate closes.
|
|
142096
142103
|
pendingPermission = /* @__PURE__ */ new Map();
|
|
142097
142104
|
scanner = null;
|
|
142105
|
+
// Tracks every ConversationScanner ever created so close() can shut them all
|
|
142106
|
+
// down and release SQLite handles (open handles block temp-dir deletion on Windows).
|
|
142107
|
+
allScanners = /* @__PURE__ */ new Set();
|
|
142098
142108
|
scannerReady = null;
|
|
142099
142109
|
// Set by onConversationChanged while a scan is in-flight; getScanner() does
|
|
142100
142110
|
// a single rescan after the current one completes instead of restarting it.
|
|
@@ -142106,6 +142116,7 @@ var StreamerServer = class {
|
|
|
142106
142116
|
cacheReady = false;
|
|
142107
142117
|
apiKey;
|
|
142108
142118
|
localNoAuth;
|
|
142119
|
+
logMenubarRequests;
|
|
142109
142120
|
verbose;
|
|
142110
142121
|
scanProfiles;
|
|
142111
142122
|
dbPool = null;
|
|
@@ -142150,6 +142161,7 @@ var StreamerServer = class {
|
|
|
142150
142161
|
this.sessionStatusBus.setMaxListeners(0);
|
|
142151
142162
|
this.apiKey = config2.apiKey;
|
|
142152
142163
|
this.localNoAuth = config2.localNoAuth ?? false;
|
|
142164
|
+
this.logMenubarRequests = config2.logMenubarRequests ?? false;
|
|
142153
142165
|
this.verbose = config2.verbose ?? false;
|
|
142154
142166
|
this.disableDb = config2.disableDb ?? false;
|
|
142155
142167
|
this.scanProfiles = config2.scanProfiles;
|
|
@@ -142329,6 +142341,7 @@ var StreamerServer = class {
|
|
|
142329
142341
|
const apiDeps = {
|
|
142330
142342
|
apiKey: this.apiKey,
|
|
142331
142343
|
localNoAuth: this.localNoAuth,
|
|
142344
|
+
logMenubarRequests: this.logMenubarRequests,
|
|
142332
142345
|
publicUrl: this.publicUrl,
|
|
142333
142346
|
browseRoot: this.browseRoot,
|
|
142334
142347
|
ptyManager: this.ptyManager,
|
|
@@ -142559,8 +142572,15 @@ var StreamerServer = class {
|
|
|
142559
142572
|
this.conversationsRepo = new ConversationsRepository(this.cache);
|
|
142560
142573
|
this.sessionsRepo = new SessionsRepository(this.sessionStore);
|
|
142561
142574
|
this.cacheMetadataRepo = new CacheMetadataRepository(db);
|
|
142562
|
-
|
|
142563
|
-
|
|
142575
|
+
if (this.scanProfiles && this.scanProfiles.length > 0) {
|
|
142576
|
+
for (const profile of this.scanProfiles) {
|
|
142577
|
+
if (profile.enabled) {
|
|
142578
|
+
this.fileWatcher.watchDirectory((0, import_path19.join)(profile.configDir, "projects"));
|
|
142579
|
+
}
|
|
142580
|
+
}
|
|
142581
|
+
} else {
|
|
142582
|
+
this.fileWatcher.watchDirectory((0, import_path19.join)((0, import_os10.homedir)(), ".claude", "projects"));
|
|
142583
|
+
}
|
|
142564
142584
|
} catch (err) {
|
|
142565
142585
|
const message = err instanceof Error ? err.message : String(err);
|
|
142566
142586
|
this.log.warn(`ConversationCache failed to open (running without cache): ${message}`, {
|
|
@@ -142569,6 +142589,7 @@ var StreamerServer = class {
|
|
|
142569
142589
|
});
|
|
142570
142590
|
}
|
|
142571
142591
|
const warmupScanner = new ConversationScanner();
|
|
142592
|
+
this.allScanners.add(warmupScanner);
|
|
142572
142593
|
const warmupStatCache = this.buildStatCache(null);
|
|
142573
142594
|
const shouldEmitProgress = createScanProgressThrottle();
|
|
142574
142595
|
const scanOpts = {
|
|
@@ -142693,6 +142714,9 @@ var StreamerServer = class {
|
|
|
142693
142714
|
for (const timer of this.ptyGraceTimers.values()) clearTimeout(timer);
|
|
142694
142715
|
this.ptyGraceTimers.clear();
|
|
142695
142716
|
this.markScannerStaleDebounced.cancel();
|
|
142717
|
+
for (const s3 of this.allScanners) s3.close();
|
|
142718
|
+
this.allScanners.clear();
|
|
142719
|
+
this.scanner = null;
|
|
142696
142720
|
this.cache?.close();
|
|
142697
142721
|
this.ptyManager.dispose();
|
|
142698
142722
|
this.fileWatcher.dispose();
|
|
@@ -143021,6 +143045,7 @@ var StreamerServer = class {
|
|
|
143021
143045
|
this.scannerStale = false;
|
|
143022
143046
|
const statCache = this.buildStatCache(this.scanner);
|
|
143023
143047
|
this.scanner = new ConversationScanner();
|
|
143048
|
+
this.allScanners.add(this.scanner);
|
|
143024
143049
|
this.scannerReady = this.scanner.scan({
|
|
143025
143050
|
...this.scanProfiles ? { profiles: this.scanProfiles } : {},
|
|
143026
143051
|
...this.codexScanOpts(),
|
|
@@ -144573,7 +144598,7 @@ var import_path20 = require("path");
|
|
|
144573
144598
|
var import_events5 = require("events");
|
|
144574
144599
|
var import_assert = __toESM(require("assert"), 1);
|
|
144575
144600
|
var import_buffer = require("buffer");
|
|
144576
|
-
var
|
|
144601
|
+
var Ps = __toESM(require("zlib"), 1);
|
|
144577
144602
|
var import_zlib = __toESM(require("zlib"), 1);
|
|
144578
144603
|
var import_node_path13 = require("path");
|
|
144579
144604
|
var import_node_path14 = require("path");
|
|
@@ -144596,50 +144621,50 @@ var import_node_path18 = __toESM(require("path"), 1);
|
|
|
144596
144621
|
var import_node_path19 = require("path");
|
|
144597
144622
|
var import_node_fs15 = __toESM(require("fs"), 1);
|
|
144598
144623
|
var import_node_path20 = __toESM(require("path"), 1);
|
|
144599
|
-
var
|
|
144600
|
-
var
|
|
144601
|
-
for (var e in t2)
|
|
144624
|
+
var zr = Object.defineProperty;
|
|
144625
|
+
var Ur = (s3, t2) => {
|
|
144626
|
+
for (var e in t2) zr(s3, e, { get: t2[e], enumerable: true });
|
|
144602
144627
|
};
|
|
144603
|
-
var
|
|
144604
|
-
var
|
|
144605
|
-
var
|
|
144606
|
-
var
|
|
144607
|
-
var
|
|
144608
|
-
var
|
|
144609
|
-
var
|
|
144610
|
-
var
|
|
144628
|
+
var Ds = typeof process == "object" && process ? process : { stdout: null, stderr: null };
|
|
144629
|
+
var Wr = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof A || s3 instanceof import_node_stream3.default || Gr(s3) || Zr(s3));
|
|
144630
|
+
var Gr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events3.EventEmitter && typeof s3.pipe == "function" && s3.pipe !== import_node_stream3.default.Writable.prototype.pipe;
|
|
144631
|
+
var Zr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events3.EventEmitter && typeof s3.write == "function" && typeof s3.end == "function";
|
|
144632
|
+
var Q2 = /* @__PURE__ */ Symbol("EOF");
|
|
144633
|
+
var J2 = /* @__PURE__ */ Symbol("maybeEmitEnd");
|
|
144634
|
+
var nt = /* @__PURE__ */ Symbol("emittedEnd");
|
|
144635
|
+
var De = /* @__PURE__ */ Symbol("emittingEnd");
|
|
144611
144636
|
var qt = /* @__PURE__ */ Symbol("emittedError");
|
|
144612
144637
|
var Ne = /* @__PURE__ */ Symbol("closed");
|
|
144613
|
-
var
|
|
144614
|
-
var
|
|
144615
|
-
var
|
|
144638
|
+
var Ns = /* @__PURE__ */ Symbol("read");
|
|
144639
|
+
var Ae = /* @__PURE__ */ Symbol("flush");
|
|
144640
|
+
var As = /* @__PURE__ */ Symbol("flushChunk");
|
|
144616
144641
|
var z2 = /* @__PURE__ */ Symbol("encoding");
|
|
144617
144642
|
var Mt = /* @__PURE__ */ Symbol("decoder");
|
|
144618
144643
|
var g = /* @__PURE__ */ Symbol("flowing");
|
|
144619
144644
|
var Qt = /* @__PURE__ */ Symbol("paused");
|
|
144620
144645
|
var Bt = /* @__PURE__ */ Symbol("resume");
|
|
144621
144646
|
var b = /* @__PURE__ */ Symbol("buffer");
|
|
144622
|
-
var
|
|
144647
|
+
var N2 = /* @__PURE__ */ Symbol("pipes");
|
|
144623
144648
|
var _ = /* @__PURE__ */ Symbol("bufferLength");
|
|
144624
|
-
var
|
|
144625
|
-
var
|
|
144649
|
+
var bi = /* @__PURE__ */ Symbol("bufferPush");
|
|
144650
|
+
var Ie = /* @__PURE__ */ Symbol("bufferShift");
|
|
144626
144651
|
var L2 = /* @__PURE__ */ Symbol("objectMode");
|
|
144627
144652
|
var w = /* @__PURE__ */ Symbol("destroyed");
|
|
144628
|
-
var
|
|
144629
|
-
var
|
|
144630
|
-
var
|
|
144631
|
-
var
|
|
144653
|
+
var _i = /* @__PURE__ */ Symbol("error");
|
|
144654
|
+
var Oi = /* @__PURE__ */ Symbol("emitData");
|
|
144655
|
+
var Is = /* @__PURE__ */ Symbol("emitEnd");
|
|
144656
|
+
var Ti = /* @__PURE__ */ Symbol("emitEnd2");
|
|
144632
144657
|
var Z2 = /* @__PURE__ */ Symbol("async");
|
|
144633
|
-
var
|
|
144634
|
-
var
|
|
144658
|
+
var xi = /* @__PURE__ */ Symbol("abort");
|
|
144659
|
+
var Ce = /* @__PURE__ */ Symbol("aborted");
|
|
144635
144660
|
var Jt = /* @__PURE__ */ Symbol("signal");
|
|
144636
144661
|
var Rt = /* @__PURE__ */ Symbol("dataListeners");
|
|
144637
|
-
var
|
|
144662
|
+
var C2 = /* @__PURE__ */ Symbol("discarded");
|
|
144638
144663
|
var jt = (s3) => Promise.resolve().then(s3);
|
|
144639
|
-
var
|
|
144640
|
-
var
|
|
144641
|
-
var
|
|
144642
|
-
var
|
|
144664
|
+
var Yr = (s3) => s3();
|
|
144665
|
+
var Kr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
|
|
144666
|
+
var Vr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
|
|
144667
|
+
var $r = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
|
|
144643
144668
|
var Fe = class {
|
|
144644
144669
|
src;
|
|
144645
144670
|
dest;
|
|
@@ -144657,7 +144682,7 @@ var Fe = class {
|
|
|
144657
144682
|
this.unpipe(), this.opts.end && this.dest.end();
|
|
144658
144683
|
}
|
|
144659
144684
|
};
|
|
144660
|
-
var
|
|
144685
|
+
var Li = class extends Fe {
|
|
144661
144686
|
unpipe() {
|
|
144662
144687
|
this.src.removeListener("error", this.proxyErrors), super.unpipe();
|
|
144663
144688
|
}
|
|
@@ -144665,36 +144690,36 @@ var xi = class extends Fe {
|
|
|
144665
144690
|
super(t2, e, i), this.proxyErrors = (r) => this.dest.emit("error", r), t2.on("error", this.proxyErrors);
|
|
144666
144691
|
}
|
|
144667
144692
|
};
|
|
144668
|
-
var
|
|
144669
|
-
var
|
|
144693
|
+
var Xr = (s3) => !!s3.objectMode;
|
|
144694
|
+
var qr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
|
|
144670
144695
|
var A = class extends import_node_events3.EventEmitter {
|
|
144671
144696
|
[g] = false;
|
|
144672
144697
|
[Qt] = false;
|
|
144673
|
-
[
|
|
144698
|
+
[N2] = [];
|
|
144674
144699
|
[b] = [];
|
|
144675
144700
|
[L2];
|
|
144676
144701
|
[z2];
|
|
144677
144702
|
[Z2];
|
|
144678
144703
|
[Mt];
|
|
144679
|
-
[
|
|
144680
|
-
[
|
|
144681
|
-
[
|
|
144704
|
+
[Q2] = false;
|
|
144705
|
+
[nt] = false;
|
|
144706
|
+
[De] = false;
|
|
144682
144707
|
[Ne] = false;
|
|
144683
144708
|
[qt] = null;
|
|
144684
144709
|
[_] = 0;
|
|
144685
144710
|
[w] = false;
|
|
144686
144711
|
[Jt];
|
|
144687
|
-
[
|
|
144712
|
+
[Ce] = false;
|
|
144688
144713
|
[Rt] = 0;
|
|
144689
|
-
[
|
|
144714
|
+
[C2] = false;
|
|
144690
144715
|
writable = true;
|
|
144691
144716
|
readable = true;
|
|
144692
144717
|
constructor(...t2) {
|
|
144693
144718
|
let e = t2[0] || {};
|
|
144694
144719
|
if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
|
|
144695
|
-
|
|
144720
|
+
Xr(e) ? (this[L2] = true, this[z2] = null) : qr(e) ? (this[z2] = e.encoding, this[L2] = false) : (this[L2] = false, this[z2] = null), this[Z2] = !!e.async, this[Mt] = this[z2] ? new import_node_string_decoder.StringDecoder(this[z2]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[b] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[N2] });
|
|
144696
144721
|
let { signal: i } = e;
|
|
144697
|
-
i && (this[Jt] = i, i.aborted ? this[
|
|
144722
|
+
i && (this[Jt] = i, i.aborted ? this[xi]() : i.addEventListener("abort", () => this[xi]()));
|
|
144698
144723
|
}
|
|
144699
144724
|
get bufferLength() {
|
|
144700
144725
|
return this[_];
|
|
@@ -144720,53 +144745,53 @@ var A = class extends import_node_events3.EventEmitter {
|
|
|
144720
144745
|
set async(t2) {
|
|
144721
144746
|
this[Z2] = this[Z2] || !!t2;
|
|
144722
144747
|
}
|
|
144723
|
-
[
|
|
144724
|
-
this[
|
|
144748
|
+
[xi]() {
|
|
144749
|
+
this[Ce] = true, this.emit("abort", this[Jt]?.reason), this.destroy(this[Jt]?.reason);
|
|
144725
144750
|
}
|
|
144726
144751
|
get aborted() {
|
|
144727
|
-
return this[
|
|
144752
|
+
return this[Ce];
|
|
144728
144753
|
}
|
|
144729
144754
|
set aborted(t2) {
|
|
144730
144755
|
}
|
|
144731
144756
|
write(t2, e, i) {
|
|
144732
|
-
if (this[
|
|
144733
|
-
if (this[
|
|
144757
|
+
if (this[Ce]) return false;
|
|
144758
|
+
if (this[Q2]) throw new Error("write after end");
|
|
144734
144759
|
if (this[w]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
|
|
144735
144760
|
typeof e == "function" && (i = e, e = "utf8"), e || (e = "utf8");
|
|
144736
|
-
let r = this[Z2] ? jt :
|
|
144761
|
+
let r = this[Z2] ? jt : Yr;
|
|
144737
144762
|
if (!this[L2] && !Buffer.isBuffer(t2)) {
|
|
144738
|
-
if (
|
|
144739
|
-
else if (
|
|
144763
|
+
if ($r(t2)) t2 = Buffer.from(t2.buffer, t2.byteOffset, t2.byteLength);
|
|
144764
|
+
else if (Vr(t2)) t2 = Buffer.from(t2);
|
|
144740
144765
|
else if (typeof t2 != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
|
|
144741
144766
|
}
|
|
144742
|
-
return this[L2] ? (this[g] && this[_] !== 0 && this[
|
|
144767
|
+
return this[L2] ? (this[g] && this[_] !== 0 && this[Ae](true), this[g] ? this.emit("data", t2) : this[bi](t2), this[_] !== 0 && this.emit("readable"), i && r(i), this[g]) : t2.length ? (typeof t2 == "string" && !(e === this[z2] && !this[Mt]?.lastNeed) && (t2 = Buffer.from(t2, e)), Buffer.isBuffer(t2) && this[z2] && (t2 = this[Mt].write(t2)), this[g] && this[_] !== 0 && this[Ae](true), this[g] ? this.emit("data", t2) : this[bi](t2), this[_] !== 0 && this.emit("readable"), i && r(i), this[g]) : (this[_] !== 0 && this.emit("readable"), i && r(i), this[g]);
|
|
144743
144768
|
}
|
|
144744
144769
|
read(t2) {
|
|
144745
144770
|
if (this[w]) return null;
|
|
144746
|
-
if (this[
|
|
144771
|
+
if (this[C2] = false, this[_] === 0 || t2 === 0 || t2 && t2 > this[_]) return this[J2](), null;
|
|
144747
144772
|
this[L2] && (t2 = null), this[b].length > 1 && !this[L2] && (this[b] = [this[z2] ? this[b].join("") : Buffer.concat(this[b], this[_])]);
|
|
144748
|
-
let e = this[
|
|
144749
|
-
return this[
|
|
144773
|
+
let e = this[Ns](t2 || null, this[b][0]);
|
|
144774
|
+
return this[J2](), e;
|
|
144750
144775
|
}
|
|
144751
|
-
[
|
|
144752
|
-
if (this[L2]) this[
|
|
144776
|
+
[Ns](t2, e) {
|
|
144777
|
+
if (this[L2]) this[Ie]();
|
|
144753
144778
|
else {
|
|
144754
144779
|
let i = e;
|
|
144755
|
-
t2 === i.length || t2 === null ? this[
|
|
144780
|
+
t2 === i.length || t2 === null ? this[Ie]() : typeof i == "string" ? (this[b][0] = i.slice(t2), e = i.slice(0, t2), this[_] -= t2) : (this[b][0] = i.subarray(t2), e = i.subarray(0, t2), this[_] -= t2);
|
|
144756
144781
|
}
|
|
144757
|
-
return this.emit("data", e), !this[b].length && !this[
|
|
144782
|
+
return this.emit("data", e), !this[b].length && !this[Q2] && this.emit("drain"), e;
|
|
144758
144783
|
}
|
|
144759
144784
|
end(t2, e, i) {
|
|
144760
|
-
return typeof t2 == "function" && (i = t2, t2 = void 0), typeof e == "function" && (i = e, e = "utf8"), t2 !== void 0 && this.write(t2, e), i && this.once("end", i), this[
|
|
144785
|
+
return typeof t2 == "function" && (i = t2, t2 = void 0), typeof e == "function" && (i = e, e = "utf8"), t2 !== void 0 && this.write(t2, e), i && this.once("end", i), this[Q2] = true, this.writable = false, (this[g] || !this[Qt]) && this[J2](), this;
|
|
144761
144786
|
}
|
|
144762
144787
|
[Bt]() {
|
|
144763
|
-
this[w] || (!this[Rt] && !this[
|
|
144788
|
+
this[w] || (!this[Rt] && !this[N2].length && (this[C2] = true), this[Qt] = false, this[g] = true, this.emit("resume"), this[b].length ? this[Ae]() : this[Q2] ? this[J2]() : this.emit("drain"));
|
|
144764
144789
|
}
|
|
144765
144790
|
resume() {
|
|
144766
144791
|
return this[Bt]();
|
|
144767
144792
|
}
|
|
144768
144793
|
pause() {
|
|
144769
|
-
this[g] = false, this[Qt] = true, this[
|
|
144794
|
+
this[g] = false, this[Qt] = true, this[C2] = false;
|
|
144770
144795
|
}
|
|
144771
144796
|
get destroyed() {
|
|
144772
144797
|
return this[w];
|
|
@@ -144777,39 +144802,39 @@ var A = class extends import_node_events3.EventEmitter {
|
|
|
144777
144802
|
get paused() {
|
|
144778
144803
|
return this[Qt];
|
|
144779
144804
|
}
|
|
144780
|
-
[
|
|
144805
|
+
[bi](t2) {
|
|
144781
144806
|
this[L2] ? this[_] += 1 : this[_] += t2.length, this[b].push(t2);
|
|
144782
144807
|
}
|
|
144783
|
-
[
|
|
144808
|
+
[Ie]() {
|
|
144784
144809
|
return this[L2] ? this[_] -= 1 : this[_] -= this[b][0].length, this[b].shift();
|
|
144785
144810
|
}
|
|
144786
|
-
[
|
|
144811
|
+
[Ae](t2 = false) {
|
|
144787
144812
|
do
|
|
144788
144813
|
;
|
|
144789
|
-
while (this[
|
|
144790
|
-
!t2 && !this[b].length && !this[
|
|
144814
|
+
while (this[As](this[Ie]()) && this[b].length);
|
|
144815
|
+
!t2 && !this[b].length && !this[Q2] && this.emit("drain");
|
|
144791
144816
|
}
|
|
144792
|
-
[
|
|
144817
|
+
[As](t2) {
|
|
144793
144818
|
return this.emit("data", t2), this[g];
|
|
144794
144819
|
}
|
|
144795
144820
|
pipe(t2, e) {
|
|
144796
144821
|
if (this[w]) return t2;
|
|
144797
|
-
this[
|
|
144798
|
-
let i = this[
|
|
144799
|
-
return e = e || {}, t2 ===
|
|
144822
|
+
this[C2] = false;
|
|
144823
|
+
let i = this[nt];
|
|
144824
|
+
return e = e || {}, t2 === Ds.stdout || t2 === Ds.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, i ? e.end && t2.end() : (this[N2].push(e.proxyErrors ? new Li(this, t2, e) : new Fe(this, t2, e)), this[Z2] ? jt(() => this[Bt]()) : this[Bt]()), t2;
|
|
144800
144825
|
}
|
|
144801
144826
|
unpipe(t2) {
|
|
144802
|
-
let e = this[
|
|
144803
|
-
e && (this[
|
|
144827
|
+
let e = this[N2].find((i) => i.dest === t2);
|
|
144828
|
+
e && (this[N2].length === 1 ? (this[g] && this[Rt] === 0 && (this[g] = false), this[N2] = []) : this[N2].splice(this[N2].indexOf(e), 1), e.unpipe());
|
|
144804
144829
|
}
|
|
144805
144830
|
addListener(t2, e) {
|
|
144806
144831
|
return this.on(t2, e);
|
|
144807
144832
|
}
|
|
144808
144833
|
on(t2, e) {
|
|
144809
144834
|
let i = super.on(t2, e);
|
|
144810
|
-
if (t2 === "data") this[
|
|
144835
|
+
if (t2 === "data") this[C2] = false, this[Rt]++, !this[N2].length && !this[g] && this[Bt]();
|
|
144811
144836
|
else if (t2 === "readable" && this[_] !== 0) super.emit("readable");
|
|
144812
|
-
else if (
|
|
144837
|
+
else if (Kr(t2) && this[nt]) super.emit(t2), this.removeAllListeners(t2);
|
|
144813
144838
|
else if (t2 === "error" && this[qt]) {
|
|
144814
144839
|
let r = e;
|
|
144815
144840
|
this[Z2] ? jt(() => r.call(this, this[qt])) : r.call(this, this[qt]);
|
|
@@ -144821,58 +144846,58 @@ var A = class extends import_node_events3.EventEmitter {
|
|
|
144821
144846
|
}
|
|
144822
144847
|
off(t2, e) {
|
|
144823
144848
|
let i = super.off(t2, e);
|
|
144824
|
-
return t2 === "data" && (this[Rt] = this.listeners("data").length, this[Rt] === 0 && !this[
|
|
144849
|
+
return t2 === "data" && (this[Rt] = this.listeners("data").length, this[Rt] === 0 && !this[C2] && !this[N2].length && (this[g] = false)), i;
|
|
144825
144850
|
}
|
|
144826
144851
|
removeAllListeners(t2) {
|
|
144827
144852
|
let e = super.removeAllListeners(t2);
|
|
144828
|
-
return (t2 === "data" || t2 === void 0) && (this[Rt] = 0, !this[
|
|
144853
|
+
return (t2 === "data" || t2 === void 0) && (this[Rt] = 0, !this[C2] && !this[N2].length && (this[g] = false)), e;
|
|
144829
144854
|
}
|
|
144830
144855
|
get emittedEnd() {
|
|
144831
|
-
return this[
|
|
144856
|
+
return this[nt];
|
|
144832
144857
|
}
|
|
144833
|
-
[
|
|
144834
|
-
!this[
|
|
144858
|
+
[J2]() {
|
|
144859
|
+
!this[De] && !this[nt] && !this[w] && this[b].length === 0 && this[Q2] && (this[De] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Ne] && this.emit("close"), this[De] = false);
|
|
144835
144860
|
}
|
|
144836
144861
|
emit(t2, ...e) {
|
|
144837
144862
|
let i = e[0];
|
|
144838
144863
|
if (t2 !== "error" && t2 !== "close" && t2 !== w && this[w]) return false;
|
|
144839
|
-
if (t2 === "data") return !this[L2] && !i ? false : this[Z2] ? (jt(() => this[
|
|
144840
|
-
if (t2 === "end") return this[
|
|
144864
|
+
if (t2 === "data") return !this[L2] && !i ? false : this[Z2] ? (jt(() => this[Oi](i)), true) : this[Oi](i);
|
|
144865
|
+
if (t2 === "end") return this[Is]();
|
|
144841
144866
|
if (t2 === "close") {
|
|
144842
|
-
if (this[Ne] = true, !this[
|
|
144867
|
+
if (this[Ne] = true, !this[nt] && !this[w]) return false;
|
|
144843
144868
|
let n = super.emit("close");
|
|
144844
144869
|
return this.removeAllListeners("close"), n;
|
|
144845
144870
|
} else if (t2 === "error") {
|
|
144846
|
-
this[qt] = i, super.emit(
|
|
144871
|
+
this[qt] = i, super.emit(_i, i);
|
|
144847
144872
|
let n = !this[Jt] || this.listeners("error").length ? super.emit("error", i) : false;
|
|
144848
|
-
return this[
|
|
144873
|
+
return this[J2](), n;
|
|
144849
144874
|
} else if (t2 === "resume") {
|
|
144850
144875
|
let n = super.emit("resume");
|
|
144851
|
-
return this[
|
|
144876
|
+
return this[J2](), n;
|
|
144852
144877
|
} else if (t2 === "finish" || t2 === "prefinish") {
|
|
144853
144878
|
let n = super.emit(t2);
|
|
144854
144879
|
return this.removeAllListeners(t2), n;
|
|
144855
144880
|
}
|
|
144856
144881
|
let r = super.emit(t2, ...e);
|
|
144857
|
-
return this[
|
|
144882
|
+
return this[J2](), r;
|
|
144858
144883
|
}
|
|
144859
|
-
[
|
|
144860
|
-
for (let i of this[
|
|
144861
|
-
let e = this[
|
|
144862
|
-
return this[
|
|
144884
|
+
[Oi](t2) {
|
|
144885
|
+
for (let i of this[N2]) i.dest.write(t2) === false && this.pause();
|
|
144886
|
+
let e = this[C2] ? false : super.emit("data", t2);
|
|
144887
|
+
return this[J2](), e;
|
|
144863
144888
|
}
|
|
144864
|
-
[
|
|
144865
|
-
return this[
|
|
144889
|
+
[Is]() {
|
|
144890
|
+
return this[nt] ? false : (this[nt] = true, this.readable = false, this[Z2] ? (jt(() => this[Ti]()), true) : this[Ti]());
|
|
144866
144891
|
}
|
|
144867
|
-
[
|
|
144892
|
+
[Ti]() {
|
|
144868
144893
|
if (this[Mt]) {
|
|
144869
144894
|
let e = this[Mt].end();
|
|
144870
144895
|
if (e) {
|
|
144871
|
-
for (let i of this[
|
|
144872
|
-
this[
|
|
144896
|
+
for (let i of this[N2]) i.dest.write(e);
|
|
144897
|
+
this[C2] || super.emit("data", e);
|
|
144873
144898
|
}
|
|
144874
144899
|
}
|
|
144875
|
-
for (let e of this[
|
|
144900
|
+
for (let e of this[N2]) e.end();
|
|
144876
144901
|
let t2 = super.emit("end");
|
|
144877
144902
|
return this.removeAllListeners("end"), t2;
|
|
144878
144903
|
}
|
|
@@ -144895,22 +144920,22 @@ var A = class extends import_node_events3.EventEmitter {
|
|
|
144895
144920
|
});
|
|
144896
144921
|
}
|
|
144897
144922
|
[Symbol.asyncIterator]() {
|
|
144898
|
-
this[
|
|
144923
|
+
this[C2] = false;
|
|
144899
144924
|
let t2 = false, e = async () => (this.pause(), t2 = true, { value: void 0, done: true });
|
|
144900
144925
|
return { next: () => {
|
|
144901
144926
|
if (t2) return e();
|
|
144902
144927
|
let r = this.read();
|
|
144903
144928
|
if (r !== null) return Promise.resolve({ done: false, value: r });
|
|
144904
|
-
if (this[
|
|
144905
|
-
let n, o,
|
|
144906
|
-
this.off("data",
|
|
144907
|
-
},
|
|
144908
|
-
this.off("error",
|
|
144929
|
+
if (this[Q2]) return e();
|
|
144930
|
+
let n, o, h = (d) => {
|
|
144931
|
+
this.off("data", a), this.off("end", l), this.off(w, c), e(), o(d);
|
|
144932
|
+
}, a = (d) => {
|
|
144933
|
+
this.off("error", h), this.off("end", l), this.off(w, c), this.pause(), n({ value: d, done: !!this[Q2] });
|
|
144909
144934
|
}, l = () => {
|
|
144910
|
-
this.off("error",
|
|
144911
|
-
}, c = () =>
|
|
144935
|
+
this.off("error", h), this.off("data", a), this.off(w, c), e(), n({ done: true, value: void 0 });
|
|
144936
|
+
}, c = () => h(new Error("stream destroyed"));
|
|
144912
144937
|
return new Promise((d, S2) => {
|
|
144913
|
-
o = S2, n = d, this.once(w, c), this.once("error",
|
|
144938
|
+
o = S2, n = d, this.once(w, c), this.once("error", h), this.once("end", l), this.once("data", a);
|
|
144914
144939
|
});
|
|
144915
144940
|
}, throw: e, return: e, [Symbol.asyncIterator]() {
|
|
144916
144941
|
return this;
|
|
@@ -144918,71 +144943,71 @@ var A = class extends import_node_events3.EventEmitter {
|
|
|
144918
144943
|
} };
|
|
144919
144944
|
}
|
|
144920
144945
|
[Symbol.iterator]() {
|
|
144921
|
-
this[
|
|
144922
|
-
let t2 = false, e = () => (this.pause(), this.off(
|
|
144946
|
+
this[C2] = false;
|
|
144947
|
+
let t2 = false, e = () => (this.pause(), this.off(_i, e), this.off(w, e), this.off("end", e), t2 = true, { done: true, value: void 0 }), i = () => {
|
|
144923
144948
|
if (t2) return e();
|
|
144924
144949
|
let r = this.read();
|
|
144925
144950
|
return r === null ? e() : { done: false, value: r };
|
|
144926
144951
|
};
|
|
144927
|
-
return this.once("end", e), this.once(
|
|
144952
|
+
return this.once("end", e), this.once(_i, e), this.once(w, e), { next: i, throw: e, return: e, [Symbol.iterator]() {
|
|
144928
144953
|
return this;
|
|
144929
144954
|
}, [Symbol.dispose]: () => {
|
|
144930
144955
|
} };
|
|
144931
144956
|
}
|
|
144932
144957
|
destroy(t2) {
|
|
144933
144958
|
if (this[w]) return t2 ? this.emit("error", t2) : this.emit(w), this;
|
|
144934
|
-
this[w] = true, this[
|
|
144959
|
+
this[w] = true, this[C2] = true, this[b].length = 0, this[_] = 0;
|
|
144935
144960
|
let e = this;
|
|
144936
144961
|
return typeof e.close == "function" && !this[Ne] && e.close(), t2 ? this.emit("error", t2) : this.emit(w), this;
|
|
144937
144962
|
}
|
|
144938
144963
|
static get isStream() {
|
|
144939
|
-
return
|
|
144964
|
+
return Wr;
|
|
144940
144965
|
}
|
|
144941
144966
|
};
|
|
144942
|
-
var
|
|
144943
|
-
var
|
|
144967
|
+
var Jr = import_fs24.default.writev;
|
|
144968
|
+
var ht = /* @__PURE__ */ Symbol("_autoClose");
|
|
144944
144969
|
var H = /* @__PURE__ */ Symbol("_close");
|
|
144945
144970
|
var te = /* @__PURE__ */ Symbol("_ended");
|
|
144946
|
-
var
|
|
144971
|
+
var u2 = /* @__PURE__ */ Symbol("_fd");
|
|
144947
144972
|
var Ni = /* @__PURE__ */ Symbol("_finished");
|
|
144948
|
-
var
|
|
144949
|
-
var
|
|
144950
|
-
var
|
|
144951
|
-
var
|
|
144973
|
+
var tt = /* @__PURE__ */ Symbol("_flags");
|
|
144974
|
+
var Ai = /* @__PURE__ */ Symbol("_flush");
|
|
144975
|
+
var ki = /* @__PURE__ */ Symbol("_handleChunk");
|
|
144976
|
+
var vi = /* @__PURE__ */ Symbol("_makeBuf");
|
|
144952
144977
|
var ie = /* @__PURE__ */ Symbol("_mode");
|
|
144953
|
-
var
|
|
144978
|
+
var ke = /* @__PURE__ */ Symbol("_needDrain");
|
|
144954
144979
|
var Ut = /* @__PURE__ */ Symbol("_onerror");
|
|
144955
144980
|
var Ht = /* @__PURE__ */ Symbol("_onopen");
|
|
144956
|
-
var
|
|
144981
|
+
var Ii = /* @__PURE__ */ Symbol("_onread");
|
|
144957
144982
|
var Pt = /* @__PURE__ */ Symbol("_onwrite");
|
|
144958
|
-
var
|
|
144983
|
+
var at = /* @__PURE__ */ Symbol("_open");
|
|
144959
144984
|
var U2 = /* @__PURE__ */ Symbol("_path");
|
|
144960
|
-
var
|
|
144985
|
+
var ot = /* @__PURE__ */ Symbol("_pos");
|
|
144961
144986
|
var Y2 = /* @__PURE__ */ Symbol("_queue");
|
|
144962
144987
|
var zt = /* @__PURE__ */ Symbol("_read");
|
|
144963
|
-
var
|
|
144964
|
-
var
|
|
144988
|
+
var Ci = /* @__PURE__ */ Symbol("_readSize");
|
|
144989
|
+
var j = /* @__PURE__ */ Symbol("_reading");
|
|
144965
144990
|
var ee = /* @__PURE__ */ Symbol("_remain");
|
|
144966
144991
|
var Fi = /* @__PURE__ */ Symbol("_size");
|
|
144967
|
-
var
|
|
144992
|
+
var ve = /* @__PURE__ */ Symbol("_write");
|
|
144968
144993
|
var gt = /* @__PURE__ */ Symbol("_writing");
|
|
144969
|
-
var
|
|
144994
|
+
var Me = /* @__PURE__ */ Symbol("_defaultFlag");
|
|
144970
144995
|
var bt = /* @__PURE__ */ Symbol("_errored");
|
|
144971
144996
|
var _t = class extends A {
|
|
144972
144997
|
[bt] = false;
|
|
144973
|
-
[
|
|
144998
|
+
[u2];
|
|
144974
144999
|
[U2];
|
|
144975
|
-
[
|
|
144976
|
-
[
|
|
145000
|
+
[Ci];
|
|
145001
|
+
[j] = false;
|
|
144977
145002
|
[Fi];
|
|
144978
145003
|
[ee];
|
|
144979
|
-
[
|
|
145004
|
+
[ht];
|
|
144980
145005
|
constructor(t2, e) {
|
|
144981
145006
|
if (e = e || {}, super(e), this.readable = true, this.writable = false, typeof t2 != "string") throw new TypeError("path must be a string");
|
|
144982
|
-
this[bt] = false, this[
|
|
145007
|
+
this[bt] = false, this[u2] = typeof e.fd == "number" ? e.fd : void 0, this[U2] = t2, this[Ci] = e.readSize || 16 * 1024 * 1024, this[j] = false, this[Fi] = typeof e.size == "number" ? e.size : 1 / 0, this[ee] = this[Fi], this[ht] = typeof e.autoClose == "boolean" ? e.autoClose : true, typeof this[u2] == "number" ? this[zt]() : this[at]();
|
|
144983
145008
|
}
|
|
144984
145009
|
get fd() {
|
|
144985
|
-
return this[
|
|
145010
|
+
return this[u2];
|
|
144986
145011
|
}
|
|
144987
145012
|
get path() {
|
|
144988
145013
|
return this[U2];
|
|
@@ -144993,36 +145018,36 @@ var _t = class extends A {
|
|
|
144993
145018
|
end() {
|
|
144994
145019
|
throw new TypeError("this is a readable stream");
|
|
144995
145020
|
}
|
|
144996
|
-
[
|
|
145021
|
+
[at]() {
|
|
144997
145022
|
import_fs24.default.open(this[U2], "r", (t2, e) => this[Ht](t2, e));
|
|
144998
145023
|
}
|
|
144999
145024
|
[Ht](t2, e) {
|
|
145000
|
-
t2 ? this[Ut](t2) : (this[
|
|
145025
|
+
t2 ? this[Ut](t2) : (this[u2] = e, this.emit("open", e), this[zt]());
|
|
145001
145026
|
}
|
|
145002
|
-
[
|
|
145003
|
-
return Buffer.allocUnsafe(Math.min(this[
|
|
145027
|
+
[vi]() {
|
|
145028
|
+
return Buffer.allocUnsafe(Math.min(this[Ci], this[ee]));
|
|
145004
145029
|
}
|
|
145005
145030
|
[zt]() {
|
|
145006
|
-
if (!this[
|
|
145007
|
-
this[
|
|
145008
|
-
let t2 = this[
|
|
145009
|
-
if (t2.length === 0) return process.nextTick(() => this[
|
|
145010
|
-
import_fs24.default.read(this[
|
|
145031
|
+
if (!this[j]) {
|
|
145032
|
+
this[j] = true;
|
|
145033
|
+
let t2 = this[vi]();
|
|
145034
|
+
if (t2.length === 0) return process.nextTick(() => this[Ii](null, 0, t2));
|
|
145035
|
+
import_fs24.default.read(this[u2], t2, 0, t2.length, null, (e, i, r) => this[Ii](e, i, r));
|
|
145011
145036
|
}
|
|
145012
145037
|
}
|
|
145013
|
-
[
|
|
145014
|
-
this[
|
|
145038
|
+
[Ii](t2, e, i) {
|
|
145039
|
+
this[j] = false, t2 ? this[Ut](t2) : this[ki](e, i) && this[zt]();
|
|
145015
145040
|
}
|
|
145016
145041
|
[H]() {
|
|
145017
|
-
if (this[
|
|
145018
|
-
let t2 = this[
|
|
145019
|
-
this[
|
|
145042
|
+
if (this[ht] && typeof this[u2] == "number") {
|
|
145043
|
+
let t2 = this[u2];
|
|
145044
|
+
this[u2] = void 0, import_fs24.default.close(t2, (e) => e ? this.emit("error", e) : this.emit("close"));
|
|
145020
145045
|
}
|
|
145021
145046
|
}
|
|
145022
145047
|
[Ut](t2) {
|
|
145023
|
-
this[
|
|
145048
|
+
this[j] = true, this[H](), this.emit("error", t2);
|
|
145024
145049
|
}
|
|
145025
|
-
[
|
|
145050
|
+
[ki](t2, e) {
|
|
145026
145051
|
let i = false;
|
|
145027
145052
|
return this[ee] -= t2, t2 > 0 && (i = super.write(t2 < e.length ? e.subarray(0, t2) : e)), (t2 === 0 || this[ee] <= 0) && (i = false, this[H](), super.end()), i;
|
|
145028
145053
|
}
|
|
@@ -145032,7 +145057,7 @@ var _t = class extends A {
|
|
|
145032
145057
|
case "finish":
|
|
145033
145058
|
return false;
|
|
145034
145059
|
case "drain":
|
|
145035
|
-
return typeof this[
|
|
145060
|
+
return typeof this[u2] == "number" && this[zt](), false;
|
|
145036
145061
|
case "error":
|
|
145037
145062
|
return this[bt] ? false : (this[bt] = true, super.emit(t2, ...e));
|
|
145038
145063
|
default:
|
|
@@ -145040,8 +145065,8 @@ var _t = class extends A {
|
|
|
145040
145065
|
}
|
|
145041
145066
|
}
|
|
145042
145067
|
};
|
|
145043
|
-
var
|
|
145044
|
-
[
|
|
145068
|
+
var Be = class extends _t {
|
|
145069
|
+
[at]() {
|
|
145045
145070
|
let t2 = true;
|
|
145046
145071
|
try {
|
|
145047
145072
|
this[Ht](null, import_fs24.default.openSync(this[U2], "r")), t2 = false;
|
|
@@ -145052,13 +145077,13 @@ var Me = class extends _t {
|
|
|
145052
145077
|
[zt]() {
|
|
145053
145078
|
let t2 = true;
|
|
145054
145079
|
try {
|
|
145055
|
-
if (!this[
|
|
145056
|
-
this[
|
|
145080
|
+
if (!this[j]) {
|
|
145081
|
+
this[j] = true;
|
|
145057
145082
|
do {
|
|
145058
|
-
let e = this[
|
|
145059
|
-
if (!this[
|
|
145083
|
+
let e = this[vi](), i = e.length === 0 ? 0 : import_fs24.default.readSync(this[u2], e, 0, e.length, null);
|
|
145084
|
+
if (!this[ki](i, e)) break;
|
|
145060
145085
|
} while (true);
|
|
145061
|
-
this[
|
|
145086
|
+
this[j] = false;
|
|
145062
145087
|
}
|
|
145063
145088
|
t2 = false;
|
|
145064
145089
|
} finally {
|
|
@@ -145066,32 +145091,32 @@ var Me = class extends _t {
|
|
|
145066
145091
|
}
|
|
145067
145092
|
}
|
|
145068
145093
|
[H]() {
|
|
145069
|
-
if (this[
|
|
145070
|
-
let t2 = this[
|
|
145071
|
-
this[
|
|
145094
|
+
if (this[ht] && typeof this[u2] == "number") {
|
|
145095
|
+
let t2 = this[u2];
|
|
145096
|
+
this[u2] = void 0, import_fs24.default.closeSync(t2), this.emit("close");
|
|
145072
145097
|
}
|
|
145073
145098
|
}
|
|
145074
145099
|
};
|
|
145075
|
-
var
|
|
145100
|
+
var et = class extends import_events4.default {
|
|
145076
145101
|
readable = false;
|
|
145077
145102
|
writable = true;
|
|
145078
145103
|
[bt] = false;
|
|
145079
145104
|
[gt] = false;
|
|
145080
145105
|
[te] = false;
|
|
145081
145106
|
[Y2] = [];
|
|
145082
|
-
[
|
|
145107
|
+
[ke] = false;
|
|
145083
145108
|
[U2];
|
|
145084
145109
|
[ie];
|
|
145085
|
-
[
|
|
145086
|
-
[
|
|
145087
|
-
[
|
|
145088
|
-
[
|
|
145110
|
+
[ht];
|
|
145111
|
+
[u2];
|
|
145112
|
+
[Me];
|
|
145113
|
+
[tt];
|
|
145089
145114
|
[Ni] = false;
|
|
145090
|
-
[
|
|
145115
|
+
[ot];
|
|
145091
145116
|
constructor(t2, e) {
|
|
145092
|
-
e = e || {}, super(e), this[U2] = t2, this[
|
|
145093
|
-
let i = this[
|
|
145094
|
-
this[
|
|
145117
|
+
e = e || {}, super(e), this[U2] = t2, this[u2] = typeof e.fd == "number" ? e.fd : void 0, this[ie] = e.mode === void 0 ? 438 : e.mode, this[ot] = typeof e.start == "number" ? e.start : void 0, this[ht] = typeof e.autoClose == "boolean" ? e.autoClose : true;
|
|
145118
|
+
let i = this[ot] !== void 0 ? "r+" : "w";
|
|
145119
|
+
this[Me] = e.flags === void 0, this[tt] = e.flags === void 0 ? i : e.flags, this[u2] === void 0 && this[at]();
|
|
145095
145120
|
}
|
|
145096
145121
|
emit(t2, ...e) {
|
|
145097
145122
|
if (t2 === "error") {
|
|
@@ -145101,7 +145126,7 @@ var tt = class extends import_events4.default {
|
|
|
145101
145126
|
return super.emit(t2, ...e);
|
|
145102
145127
|
}
|
|
145103
145128
|
get fd() {
|
|
145104
|
-
return this[
|
|
145129
|
+
return this[u2];
|
|
145105
145130
|
}
|
|
145106
145131
|
get path() {
|
|
145107
145132
|
return this[U2];
|
|
@@ -145109,61 +145134,61 @@ var tt = class extends import_events4.default {
|
|
|
145109
145134
|
[Ut](t2) {
|
|
145110
145135
|
this[H](), this[gt] = true, this.emit("error", t2);
|
|
145111
145136
|
}
|
|
145112
|
-
[
|
|
145113
|
-
import_fs24.default.open(this[U2], this[
|
|
145137
|
+
[at]() {
|
|
145138
|
+
import_fs24.default.open(this[U2], this[tt], this[ie], (t2, e) => this[Ht](t2, e));
|
|
145114
145139
|
}
|
|
145115
145140
|
[Ht](t2, e) {
|
|
145116
|
-
this[
|
|
145141
|
+
this[Me] && this[tt] === "r+" && t2 && t2.code === "ENOENT" ? (this[tt] = "w", this[at]()) : t2 ? this[Ut](t2) : (this[u2] = e, this.emit("open", e), this[gt] || this[Ai]());
|
|
145117
145142
|
}
|
|
145118
145143
|
end(t2, e) {
|
|
145119
|
-
return t2 && this.write(t2, e), this[te] = true, !this[gt] && !this[Y2].length && typeof this[
|
|
145144
|
+
return t2 && this.write(t2, e), this[te] = true, !this[gt] && !this[Y2].length && typeof this[u2] == "number" && this[Pt](null, 0), this;
|
|
145120
145145
|
}
|
|
145121
145146
|
write(t2, e) {
|
|
145122
|
-
return typeof t2 == "string" && (t2 = Buffer.from(t2, e)), this[te] ? (this.emit("error", new Error("write() after end()")), false) : this[
|
|
145147
|
+
return typeof t2 == "string" && (t2 = Buffer.from(t2, e)), this[te] ? (this.emit("error", new Error("write() after end()")), false) : this[u2] === void 0 || this[gt] || this[Y2].length ? (this[Y2].push(t2), this[ke] = true, false) : (this[gt] = true, this[ve](t2), true);
|
|
145123
145148
|
}
|
|
145124
|
-
[
|
|
145125
|
-
import_fs24.default.write(this[
|
|
145149
|
+
[ve](t2) {
|
|
145150
|
+
import_fs24.default.write(this[u2], t2, 0, t2.length, this[ot], (e, i) => this[Pt](e, i));
|
|
145126
145151
|
}
|
|
145127
145152
|
[Pt](t2, e) {
|
|
145128
|
-
t2 ? this[Ut](t2) : (this[
|
|
145153
|
+
t2 ? this[Ut](t2) : (this[ot] !== void 0 && typeof e == "number" && (this[ot] += e), this[Y2].length ? this[Ai]() : (this[gt] = false, this[te] && !this[Ni] ? (this[Ni] = true, this[H](), this.emit("finish")) : this[ke] && (this[ke] = false, this.emit("drain"))));
|
|
145129
145154
|
}
|
|
145130
|
-
[
|
|
145155
|
+
[Ai]() {
|
|
145131
145156
|
if (this[Y2].length === 0) this[te] && this[Pt](null, 0);
|
|
145132
|
-
else if (this[Y2].length === 1) this[
|
|
145157
|
+
else if (this[Y2].length === 1) this[ve](this[Y2].pop());
|
|
145133
145158
|
else {
|
|
145134
145159
|
let t2 = this[Y2];
|
|
145135
|
-
this[Y2] = [],
|
|
145160
|
+
this[Y2] = [], Jr(this[u2], t2, this[ot], (e, i) => this[Pt](e, i));
|
|
145136
145161
|
}
|
|
145137
145162
|
}
|
|
145138
145163
|
[H]() {
|
|
145139
|
-
if (this[
|
|
145140
|
-
let t2 = this[
|
|
145141
|
-
this[
|
|
145164
|
+
if (this[ht] && typeof this[u2] == "number") {
|
|
145165
|
+
let t2 = this[u2];
|
|
145166
|
+
this[u2] = void 0, import_fs24.default.close(t2, (e) => e ? this.emit("error", e) : this.emit("close"));
|
|
145142
145167
|
}
|
|
145143
145168
|
}
|
|
145144
145169
|
};
|
|
145145
|
-
var Wt = class extends
|
|
145146
|
-
[
|
|
145170
|
+
var Wt = class extends et {
|
|
145171
|
+
[at]() {
|
|
145147
145172
|
let t2;
|
|
145148
|
-
if (this[
|
|
145149
|
-
t2 = import_fs24.default.openSync(this[U2], this[
|
|
145173
|
+
if (this[Me] && this[tt] === "r+") try {
|
|
145174
|
+
t2 = import_fs24.default.openSync(this[U2], this[tt], this[ie]);
|
|
145150
145175
|
} catch (e) {
|
|
145151
|
-
if (e?.code === "ENOENT") return this[
|
|
145176
|
+
if (e?.code === "ENOENT") return this[tt] = "w", this[at]();
|
|
145152
145177
|
throw e;
|
|
145153
145178
|
}
|
|
145154
|
-
else t2 = import_fs24.default.openSync(this[U2], this[
|
|
145179
|
+
else t2 = import_fs24.default.openSync(this[U2], this[tt], this[ie]);
|
|
145155
145180
|
this[Ht](null, t2);
|
|
145156
145181
|
}
|
|
145157
145182
|
[H]() {
|
|
145158
|
-
if (this[
|
|
145159
|
-
let t2 = this[
|
|
145160
|
-
this[
|
|
145183
|
+
if (this[ht] && typeof this[u2] == "number") {
|
|
145184
|
+
let t2 = this[u2];
|
|
145185
|
+
this[u2] = void 0, import_fs24.default.closeSync(t2), this.emit("close");
|
|
145161
145186
|
}
|
|
145162
145187
|
}
|
|
145163
|
-
[
|
|
145188
|
+
[ve](t2) {
|
|
145164
145189
|
let e = true;
|
|
145165
145190
|
try {
|
|
145166
|
-
this[Pt](null, import_fs24.default.writeSync(this[
|
|
145191
|
+
this[Pt](null, import_fs24.default.writeSync(this[u2], t2, 0, t2.length, this[ot])), e = false;
|
|
145167
145192
|
} finally {
|
|
145168
145193
|
if (e) try {
|
|
145169
145194
|
this[H]();
|
|
@@ -145172,50 +145197,50 @@ var Wt = class extends tt {
|
|
|
145172
145197
|
}
|
|
145173
145198
|
}
|
|
145174
145199
|
};
|
|
145175
|
-
var
|
|
145176
|
-
var
|
|
145177
|
-
var
|
|
145178
|
-
var
|
|
145179
|
-
var
|
|
145180
|
-
var
|
|
145181
|
-
var
|
|
145182
|
-
let t2 =
|
|
145200
|
+
var jr = /* @__PURE__ */ new Map([["C", "cwd"], ["f", "file"], ["z", "gzip"], ["P", "preservePaths"], ["U", "unlink"], ["strip-components", "strip"], ["stripComponents", "strip"], ["keep-newer", "newer"], ["keepNewer", "newer"], ["keep-newer-files", "newer"], ["keepNewerFiles", "newer"], ["k", "keep"], ["keep-existing", "keep"], ["keepExisting", "keep"], ["m", "noMtime"], ["no-mtime", "noMtime"], ["p", "preserveOwner"], ["L", "follow"], ["h", "follow"], ["onentry", "onReadEntry"]]);
|
|
145201
|
+
var Fs = (s3) => !!s3.sync && !!s3.file;
|
|
145202
|
+
var ks = (s3) => !s3.sync && !!s3.file;
|
|
145203
|
+
var vs = (s3) => !!s3.sync && !s3.file;
|
|
145204
|
+
var Ms = (s3) => !s3.sync && !s3.file;
|
|
145205
|
+
var Bs = (s3) => !!s3.file;
|
|
145206
|
+
var tn = (s3) => {
|
|
145207
|
+
let t2 = jr.get(s3);
|
|
145183
145208
|
return t2 || s3;
|
|
145184
145209
|
};
|
|
145185
145210
|
var se = (s3 = {}) => {
|
|
145186
145211
|
if (!s3) return {};
|
|
145187
145212
|
let t2 = {};
|
|
145188
145213
|
for (let [e, i] of Object.entries(s3)) {
|
|
145189
|
-
let r =
|
|
145214
|
+
let r = tn(e);
|
|
145190
145215
|
t2[r] = i;
|
|
145191
145216
|
}
|
|
145192
145217
|
return t2.chmod === void 0 && t2.noChmod === false && (t2.chmod = true), delete t2.noChmod, t2;
|
|
145193
145218
|
};
|
|
145194
|
-
var K2 = (s3, t2, e, i, r) => Object.assign((n = [], o,
|
|
145195
|
-
Array.isArray(n) && (o = n, n = {}), typeof o == "function" && (
|
|
145196
|
-
let
|
|
145197
|
-
if (r?.(
|
|
145198
|
-
if (typeof
|
|
145199
|
-
return s3(
|
|
145200
|
-
} else if (
|
|
145201
|
-
let l = t2(
|
|
145202
|
-
return
|
|
145203
|
-
} else if (
|
|
145204
|
-
if (typeof
|
|
145205
|
-
return e(
|
|
145206
|
-
} else if (
|
|
145207
|
-
if (typeof
|
|
145208
|
-
return i(
|
|
145219
|
+
var K2 = (s3, t2, e, i, r) => Object.assign((n = [], o, h) => {
|
|
145220
|
+
Array.isArray(n) && (o = n, n = {}), typeof o == "function" && (h = o, o = void 0), o = o ? Array.from(o) : [];
|
|
145221
|
+
let a = se(n);
|
|
145222
|
+
if (r?.(a, o), Fs(a)) {
|
|
145223
|
+
if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
|
|
145224
|
+
return s3(a, o);
|
|
145225
|
+
} else if (ks(a)) {
|
|
145226
|
+
let l = t2(a, o);
|
|
145227
|
+
return h ? l.then(() => h(), h) : l;
|
|
145228
|
+
} else if (vs(a)) {
|
|
145229
|
+
if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
|
|
145230
|
+
return e(a, o);
|
|
145231
|
+
} else if (Ms(a)) {
|
|
145232
|
+
if (typeof h == "function") throw new TypeError("callback only supported with file option");
|
|
145233
|
+
return i(a, o);
|
|
145209
145234
|
}
|
|
145210
145235
|
throw new Error("impossible options??");
|
|
145211
145236
|
}, { syncFile: s3, asyncFile: t2, syncNoFile: e, asyncNoFile: i, validate: r });
|
|
145212
|
-
var
|
|
145213
|
-
var M2 = Object.freeze(Object.assign(/* @__PURE__ */ Object.create(null), { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, Z_VERSION_ERROR: -6, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, DEFLATE: 1, INFLATE: 2, GZIP: 3, GUNZIP: 4, DEFLATERAW: 5, INFLATERAW: 6, UNZIP: 7, BROTLI_DECODE: 8, BROTLI_ENCODE: 9, Z_MIN_WINDOWBITS: 8, Z_MAX_WINDOWBITS: 15, Z_DEFAULT_WINDOWBITS: 15, Z_MIN_CHUNK: 64, Z_MAX_CHUNK: 1 / 0, Z_DEFAULT_CHUNK: 16384, Z_MIN_MEMLEVEL: 1, Z_MAX_MEMLEVEL: 9, Z_DEFAULT_MEMLEVEL: 8, Z_MIN_LEVEL: -1, Z_MAX_LEVEL: 9, Z_DEFAULT_LEVEL: -1, BROTLI_OPERATION_PROCESS: 0, BROTLI_OPERATION_FLUSH: 1, BROTLI_OPERATION_FINISH: 2, BROTLI_OPERATION_EMIT_METADATA: 3, BROTLI_MODE_GENERIC: 0, BROTLI_MODE_TEXT: 1, BROTLI_MODE_FONT: 2, BROTLI_DEFAULT_MODE: 0, BROTLI_MIN_QUALITY: 0, BROTLI_MAX_QUALITY: 11, BROTLI_DEFAULT_QUALITY: 11, BROTLI_MIN_WINDOW_BITS: 10, BROTLI_MAX_WINDOW_BITS: 24, BROTLI_LARGE_MAX_WINDOW_BITS: 30, BROTLI_DEFAULT_WINDOW: 22, BROTLI_MIN_INPUT_BLOCK_BITS: 16, BROTLI_MAX_INPUT_BLOCK_BITS: 24, BROTLI_PARAM_MODE: 0, BROTLI_PARAM_QUALITY: 1, BROTLI_PARAM_LGWIN: 2, BROTLI_PARAM_LGBLOCK: 3, BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, BROTLI_PARAM_SIZE_HINT: 5, BROTLI_PARAM_LARGE_WINDOW: 6, BROTLI_PARAM_NPOSTFIX: 7, BROTLI_PARAM_NDIRECT: 8, BROTLI_DECODER_RESULT_ERROR: 0, BROTLI_DECODER_RESULT_SUCCESS: 1, BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, BROTLI_DECODER_NO_ERROR: 0, BROTLI_DECODER_SUCCESS: 1, BROTLI_DECODER_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, BROTLI_DECODER_ERROR_UNREACHABLE: -31 },
|
|
145214
|
-
var
|
|
145215
|
-
var
|
|
145216
|
-
var
|
|
145217
|
-
var
|
|
145218
|
-
import_buffer.Buffer.concat = s3 ?
|
|
145237
|
+
var sn = import_zlib.default.constants || { ZLIB_VERNUM: 4736 };
|
|
145238
|
+
var M2 = Object.freeze(Object.assign(/* @__PURE__ */ Object.create(null), { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, Z_VERSION_ERROR: -6, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, DEFLATE: 1, INFLATE: 2, GZIP: 3, GUNZIP: 4, DEFLATERAW: 5, INFLATERAW: 6, UNZIP: 7, BROTLI_DECODE: 8, BROTLI_ENCODE: 9, Z_MIN_WINDOWBITS: 8, Z_MAX_WINDOWBITS: 15, Z_DEFAULT_WINDOWBITS: 15, Z_MIN_CHUNK: 64, Z_MAX_CHUNK: 1 / 0, Z_DEFAULT_CHUNK: 16384, Z_MIN_MEMLEVEL: 1, Z_MAX_MEMLEVEL: 9, Z_DEFAULT_MEMLEVEL: 8, Z_MIN_LEVEL: -1, Z_MAX_LEVEL: 9, Z_DEFAULT_LEVEL: -1, BROTLI_OPERATION_PROCESS: 0, BROTLI_OPERATION_FLUSH: 1, BROTLI_OPERATION_FINISH: 2, BROTLI_OPERATION_EMIT_METADATA: 3, BROTLI_MODE_GENERIC: 0, BROTLI_MODE_TEXT: 1, BROTLI_MODE_FONT: 2, BROTLI_DEFAULT_MODE: 0, BROTLI_MIN_QUALITY: 0, BROTLI_MAX_QUALITY: 11, BROTLI_DEFAULT_QUALITY: 11, BROTLI_MIN_WINDOW_BITS: 10, BROTLI_MAX_WINDOW_BITS: 24, BROTLI_LARGE_MAX_WINDOW_BITS: 30, BROTLI_DEFAULT_WINDOW: 22, BROTLI_MIN_INPUT_BLOCK_BITS: 16, BROTLI_MAX_INPUT_BLOCK_BITS: 24, BROTLI_PARAM_MODE: 0, BROTLI_PARAM_QUALITY: 1, BROTLI_PARAM_LGWIN: 2, BROTLI_PARAM_LGBLOCK: 3, BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, BROTLI_PARAM_SIZE_HINT: 5, BROTLI_PARAM_LARGE_WINDOW: 6, BROTLI_PARAM_NPOSTFIX: 7, BROTLI_PARAM_NDIRECT: 8, BROTLI_DECODER_RESULT_ERROR: 0, BROTLI_DECODER_RESULT_SUCCESS: 1, BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, BROTLI_DECODER_NO_ERROR: 0, BROTLI_DECODER_SUCCESS: 1, BROTLI_DECODER_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, BROTLI_DECODER_ERROR_UNREACHABLE: -31 }, sn));
|
|
145239
|
+
var rn = import_buffer.Buffer.concat;
|
|
145240
|
+
var zs = Object.getOwnPropertyDescriptor(import_buffer.Buffer, "concat");
|
|
145241
|
+
var nn = (s3) => s3;
|
|
145242
|
+
var Bi = zs?.writable === true || zs?.set !== void 0 ? (s3) => {
|
|
145243
|
+
import_buffer.Buffer.concat = s3 ? nn : rn;
|
|
145219
145244
|
} : (s3) => {
|
|
145220
145245
|
};
|
|
145221
145246
|
var Tt = /* @__PURE__ */ Symbol("_superWrite");
|
|
@@ -145229,7 +145254,7 @@ var Gt = class extends Error {
|
|
|
145229
145254
|
return "ZlibError";
|
|
145230
145255
|
}
|
|
145231
145256
|
};
|
|
145232
|
-
var
|
|
145257
|
+
var Pi = /* @__PURE__ */ Symbol("flushFlag");
|
|
145233
145258
|
var re = class extends A {
|
|
145234
145259
|
#t = false;
|
|
145235
145260
|
#i = false;
|
|
@@ -145249,9 +145274,9 @@ var re = class extends A {
|
|
|
145249
145274
|
}
|
|
145250
145275
|
constructor(t2, e) {
|
|
145251
145276
|
if (!t2 || typeof t2 != "object") throw new TypeError("invalid options for ZlibBase constructor");
|
|
145252
|
-
if (super(t2), this.#s = t2.flush ?? 0, this.#n = t2.finishFlush ?? 0, this.#r = t2.fullFlushFlag ?? 0, typeof
|
|
145277
|
+
if (super(t2), this.#s = t2.flush ?? 0, this.#n = t2.finishFlush ?? 0, this.#r = t2.fullFlushFlag ?? 0, typeof Ps[e] != "function") throw new TypeError("Compression method not supported: " + e);
|
|
145253
145278
|
try {
|
|
145254
|
-
this.#e = new
|
|
145279
|
+
this.#e = new Ps[e](t2);
|
|
145255
145280
|
} catch (i) {
|
|
145256
145281
|
throw new Gt(i, this.constructor);
|
|
145257
145282
|
}
|
|
@@ -145266,7 +145291,7 @@ var re = class extends A {
|
|
|
145266
145291
|
if (!this.#t) return (0, import_assert.default)(this.#e, "zlib binding closed"), this.#e.reset?.();
|
|
145267
145292
|
}
|
|
145268
145293
|
flush(t2) {
|
|
145269
|
-
this.ended || (typeof t2 != "number" && (t2 = this.#r), this.write(Object.assign(import_buffer.Buffer.alloc(0), { [
|
|
145294
|
+
this.ended || (typeof t2 != "number" && (t2 = this.#r), this.write(Object.assign(import_buffer.Buffer.alloc(0), { [Pi]: t2 })));
|
|
145270
145295
|
}
|
|
145271
145296
|
end(t2, e, i) {
|
|
145272
145297
|
return typeof t2 == "function" && (i = t2, e = void 0, t2 = void 0), typeof e == "function" && (i = e, e = void 0), t2 && (e ? this.write(t2, e) : this.write(t2)), this.flush(this.#n), this.#i = true, super.end(i);
|
|
@@ -145285,27 +145310,27 @@ var re = class extends A {
|
|
|
145285
145310
|
};
|
|
145286
145311
|
let o = this.#e.close;
|
|
145287
145312
|
this.#e.close = () => {
|
|
145288
|
-
},
|
|
145289
|
-
let
|
|
145313
|
+
}, Bi(true);
|
|
145314
|
+
let h;
|
|
145290
145315
|
try {
|
|
145291
|
-
let l = typeof t2[
|
|
145292
|
-
|
|
145316
|
+
let l = typeof t2[Pi] == "number" ? t2[Pi] : this.#s;
|
|
145317
|
+
h = this.#e._processChunk(t2, l), Bi(false);
|
|
145293
145318
|
} catch (l) {
|
|
145294
|
-
|
|
145319
|
+
Bi(false), this.#o(new Gt(l, this.write));
|
|
145295
145320
|
} finally {
|
|
145296
145321
|
this.#e && (this.#e._handle = r, r.close = n, this.#e.close = o, this.#e.removeAllListeners("error"));
|
|
145297
145322
|
}
|
|
145298
145323
|
this.#e && this.#e.on("error", (l) => this.#o(new Gt(l, this.write)));
|
|
145299
|
-
let
|
|
145300
|
-
if (
|
|
145301
|
-
let l =
|
|
145302
|
-
|
|
145303
|
-
for (let c = 1; c <
|
|
145304
|
-
} else
|
|
145305
|
-
return i && i(),
|
|
145324
|
+
let a;
|
|
145325
|
+
if (h) if (Array.isArray(h) && h.length > 0) {
|
|
145326
|
+
let l = h[0];
|
|
145327
|
+
a = this[Tt](import_buffer.Buffer.from(l));
|
|
145328
|
+
for (let c = 1; c < h.length; c++) a = this[Tt](h[c]);
|
|
145329
|
+
} else a = this[Tt](import_buffer.Buffer.from(h));
|
|
145330
|
+
return i && i(), a;
|
|
145306
145331
|
}
|
|
145307
145332
|
};
|
|
145308
|
-
var
|
|
145333
|
+
var Pe = class extends re {
|
|
145309
145334
|
#t;
|
|
145310
145335
|
#i;
|
|
145311
145336
|
constructor(t2, e) {
|
|
@@ -145331,7 +145356,7 @@ var Be = class extends re {
|
|
|
145331
145356
|
}
|
|
145332
145357
|
}
|
|
145333
145358
|
};
|
|
145334
|
-
var
|
|
145359
|
+
var ze = class extends Pe {
|
|
145335
145360
|
#t;
|
|
145336
145361
|
constructor(t2) {
|
|
145337
145362
|
super(t2, "Gzip"), this.#t = t2 && !!t2.portable;
|
|
@@ -145340,89 +145365,90 @@ var Pe = class extends Be {
|
|
|
145340
145365
|
return this.#t ? (this.#t = false, t2[9] = 255, super[Tt](t2)) : super[Tt](t2);
|
|
145341
145366
|
}
|
|
145342
145367
|
};
|
|
145343
|
-
var
|
|
145368
|
+
var Ue = class extends Pe {
|
|
145344
145369
|
constructor(t2) {
|
|
145345
145370
|
super(t2, "Unzip");
|
|
145346
145371
|
}
|
|
145347
145372
|
};
|
|
145348
|
-
var
|
|
145373
|
+
var He = class extends re {
|
|
145349
145374
|
constructor(t2, e) {
|
|
145350
145375
|
t2 = t2 || {}, t2.flush = t2.flush || M2.BROTLI_OPERATION_PROCESS, t2.finishFlush = t2.finishFlush || M2.BROTLI_OPERATION_FINISH, t2.fullFlushFlag = M2.BROTLI_OPERATION_FLUSH, super(t2, e);
|
|
145351
145376
|
}
|
|
145352
145377
|
};
|
|
145353
|
-
var
|
|
145378
|
+
var We = class extends He {
|
|
145354
145379
|
constructor(t2) {
|
|
145355
145380
|
super(t2, "BrotliCompress");
|
|
145356
145381
|
}
|
|
145357
145382
|
};
|
|
145358
|
-
var
|
|
145383
|
+
var Ge = class extends He {
|
|
145359
145384
|
constructor(t2) {
|
|
145360
145385
|
super(t2, "BrotliDecompress");
|
|
145361
145386
|
}
|
|
145362
145387
|
};
|
|
145363
|
-
var
|
|
145388
|
+
var Ze = class extends re {
|
|
145364
145389
|
constructor(t2, e) {
|
|
145365
145390
|
t2 = t2 || {}, t2.flush = t2.flush || M2.ZSTD_e_continue, t2.finishFlush = t2.finishFlush || M2.ZSTD_e_end, t2.fullFlushFlag = M2.ZSTD_e_flush, super(t2, e);
|
|
145366
145391
|
}
|
|
145367
145392
|
};
|
|
145368
|
-
var
|
|
145393
|
+
var Ye = class extends Ze {
|
|
145369
145394
|
constructor(t2) {
|
|
145370
145395
|
super(t2, "ZstdCompress");
|
|
145371
145396
|
}
|
|
145372
145397
|
};
|
|
145373
|
-
var
|
|
145398
|
+
var Ke = class extends Ze {
|
|
145374
145399
|
constructor(t2) {
|
|
145375
145400
|
super(t2, "ZstdDecompress");
|
|
145376
145401
|
}
|
|
145377
145402
|
};
|
|
145378
|
-
var
|
|
145379
|
-
if (Number.isSafeInteger(s3)) s3 < 0 ?
|
|
145403
|
+
var Us = (s3, t2) => {
|
|
145404
|
+
if (Number.isSafeInteger(s3)) s3 < 0 ? an(s3, t2) : hn(s3, t2);
|
|
145380
145405
|
else throw Error("cannot encode number outside of javascript safe integer range");
|
|
145381
145406
|
return t2;
|
|
145382
145407
|
};
|
|
145383
|
-
var
|
|
145408
|
+
var hn = (s3, t2) => {
|
|
145384
145409
|
t2[0] = 128;
|
|
145385
145410
|
for (var e = t2.length; e > 1; e--) t2[e - 1] = s3 & 255, s3 = Math.floor(s3 / 256);
|
|
145386
145411
|
};
|
|
145387
|
-
var
|
|
145412
|
+
var an = (s3, t2) => {
|
|
145388
145413
|
t2[0] = 255;
|
|
145389
145414
|
var e = false;
|
|
145390
145415
|
s3 = s3 * -1;
|
|
145391
145416
|
for (var i = t2.length; i > 1; i--) {
|
|
145392
145417
|
var r = s3 & 255;
|
|
145393
|
-
s3 = Math.floor(s3 / 256), e ? t2[i - 1] =
|
|
145418
|
+
s3 = Math.floor(s3 / 256), e ? t2[i - 1] = Ws(r) : r === 0 ? t2[i - 1] = 0 : (e = true, t2[i - 1] = Gs(r));
|
|
145394
145419
|
}
|
|
145395
145420
|
};
|
|
145396
|
-
var
|
|
145397
|
-
let t2 = s3[0], e = t2 === 128 ?
|
|
145421
|
+
var Hs = (s3) => {
|
|
145422
|
+
let t2 = s3[0], e = t2 === 128 ? cn(s3.subarray(1, s3.length)) : t2 === 255 ? ln(s3) : null;
|
|
145398
145423
|
if (e === null) throw Error("invalid base256 encoding");
|
|
145399
145424
|
if (!Number.isSafeInteger(e)) throw Error("parsed number outside of javascript safe integer range");
|
|
145400
145425
|
return e;
|
|
145401
145426
|
};
|
|
145402
|
-
var
|
|
145427
|
+
var ln = (s3) => {
|
|
145403
145428
|
for (var t2 = s3.length, e = 0, i = false, r = t2 - 1; r > -1; r--) {
|
|
145404
145429
|
var n = Number(s3[r]), o;
|
|
145405
|
-
i ? o =
|
|
145430
|
+
i ? o = Ws(n) : n === 0 ? o = n : (i = true, o = Gs(n)), o !== 0 && (e -= o * Math.pow(256, t2 - r - 1));
|
|
145406
145431
|
}
|
|
145407
145432
|
return e;
|
|
145408
145433
|
};
|
|
145409
|
-
var
|
|
145434
|
+
var cn = (s3) => {
|
|
145410
145435
|
for (var t2 = s3.length, e = 0, i = t2 - 1; i > -1; i--) {
|
|
145411
145436
|
var r = Number(s3[i]);
|
|
145412
145437
|
r !== 0 && (e += r * Math.pow(256, t2 - i - 1));
|
|
145413
145438
|
}
|
|
145414
145439
|
return e;
|
|
145415
145440
|
};
|
|
145416
|
-
var
|
|
145417
|
-
var
|
|
145418
|
-
var
|
|
145419
|
-
|
|
145441
|
+
var Ws = (s3) => (255 ^ s3) & 255;
|
|
145442
|
+
var Gs = (s3) => (255 ^ s3) + 1 & 255;
|
|
145443
|
+
var Hi = {};
|
|
145444
|
+
Ur(Hi, { code: () => Ve, isCode: () => ne, isName: () => dn, name: () => oe, normalFsTypes: () => Ui });
|
|
145420
145445
|
var ne = (s3) => oe.has(s3);
|
|
145421
|
-
var
|
|
145422
|
-
var
|
|
145446
|
+
var dn = (s3) => Ve.has(s3);
|
|
145447
|
+
var Ui = /* @__PURE__ */ new Set(["0", "", "1", "2", "3", "4", "5", "6", "7", "D"]);
|
|
145423
145448
|
var oe = /* @__PURE__ */ new Map([["0", "File"], ["", "OldFile"], ["1", "Link"], ["2", "SymbolicLink"], ["3", "CharacterDevice"], ["4", "BlockDevice"], ["5", "Directory"], ["6", "FIFO"], ["7", "ContiguousFile"], ["g", "GlobalExtendedHeader"], ["x", "ExtendedHeader"], ["A", "SolarisACL"], ["D", "GNUDumpDir"], ["I", "Inode"], ["K", "NextFileHasLongLinkpath"], ["L", "NextFileHasLongPath"], ["M", "ContinuationFile"], ["N", "OldGnuLongPath"], ["S", "SparseFile"], ["V", "TapeVolumeHeader"], ["X", "OldExtendedHeader"]]);
|
|
145424
|
-
var
|
|
145425
|
-
var
|
|
145449
|
+
var Ve = new Map(Array.from(oe).map((s3) => [s3[1], s3[0]]));
|
|
145450
|
+
var mn = (s3) => s3 === void 0 || s3 < 0 ? void 0 : s3;
|
|
145451
|
+
var F2 = class {
|
|
145426
145452
|
cksumValid = false;
|
|
145427
145453
|
needPax = false;
|
|
145428
145454
|
nullBlock = false;
|
|
@@ -145449,13 +145475,13 @@ var C2 = class {
|
|
|
145449
145475
|
}
|
|
145450
145476
|
decode(t2, e, i, r) {
|
|
145451
145477
|
if (e || (e = 0), !t2 || !(t2.length >= e + 512)) throw new Error("need 512 bytes for header");
|
|
145452
|
-
let n = xt(t2, e + 156, 1), o =
|
|
145453
|
-
if (this.path =
|
|
145478
|
+
let n = xt(t2, e + 156, 1), o = Ui.has(n), h = o ? i : void 0, a = o ? r : void 0;
|
|
145479
|
+
if (this.path = h?.path ?? xt(t2, e, 100), this.mode = h?.mode ?? a?.mode ?? lt(t2, e + 100, 8), this.uid = h?.uid ?? a?.uid ?? lt(t2, e + 108, 8), this.gid = h?.gid ?? a?.gid ?? lt(t2, e + 116, 8), this.size = mn(h?.size ?? a?.size ?? lt(t2, e + 124, 12)), this.mtime = h?.mtime ?? a?.mtime ?? Wi(t2, e + 136, 12), this.cksum = lt(t2, e + 148, 12), a && this.#i(a, true), h && this.#i(h), ne(n) && (this.#t = n || "0"), this.#t === "0" && this.path.slice(-1) === "/" && (this.#t = "5"), this.#t === "5" && (this.size = 0), this.linkpath = xt(t2, e + 157, 100), t2.subarray(e + 257, e + 265).toString() === "ustar\x0000") if (this.uname = h?.uname ?? a?.uname ?? xt(t2, e + 265, 32), this.gname = h?.gname ?? a?.gname ?? xt(t2, e + 297, 32), this.devmaj = h?.devmaj ?? a?.devmaj ?? lt(t2, e + 329, 8) ?? 0, this.devmin = h?.devmin ?? a?.devmin ?? lt(t2, e + 337, 8) ?? 0, t2[e + 475] !== 0) {
|
|
145454
145480
|
let c = xt(t2, e + 345, 155);
|
|
145455
145481
|
this.path = c + "/" + this.path;
|
|
145456
145482
|
} else {
|
|
145457
145483
|
let c = xt(t2, e + 345, 130);
|
|
145458
|
-
c && (this.path = c + "/" + this.path), this.atime = i?.atime ?? r?.atime ??
|
|
145484
|
+
c && (this.path = c + "/" + this.path), this.atime = i?.atime ?? r?.atime ?? Wi(t2, e + 476, 12), this.ctime = i?.ctime ?? r?.ctime ?? Wi(t2, e + 488, 12);
|
|
145459
145485
|
}
|
|
145460
145486
|
let l = 256;
|
|
145461
145487
|
for (let c = e; c < e + 148; c++) l += t2[c];
|
|
@@ -145463,16 +145489,16 @@ var C2 = class {
|
|
|
145463
145489
|
this.cksumValid = l === this.cksum, this.cksum === void 0 && l === 256 && (this.nullBlock = true);
|
|
145464
145490
|
}
|
|
145465
145491
|
#i(t2, e = false) {
|
|
145466
|
-
Object.assign(this, Object.fromEntries(Object.entries(t2).filter(([i, r]) => !(r == null || i === "path" && e || i === "linkpath" && e || i === "global"))));
|
|
145492
|
+
Object.assign(this, Object.fromEntries(Object.entries(t2).filter(([i, r]) => !(r == null || i === "size" && Number(r) < 0 || i === "path" && e || i === "linkpath" && e || i === "global"))));
|
|
145467
145493
|
}
|
|
145468
145494
|
encode(t2, e = 0) {
|
|
145469
145495
|
if (t2 || (t2 = this.block = Buffer.alloc(512)), this.#t === "Unsupported" && (this.#t = "0"), !(t2.length >= e + 512)) throw new Error("need 512 bytes for header");
|
|
145470
|
-
let i = this.ctime || this.atime ? 130 : 155, r =
|
|
145471
|
-
this.needPax = !!r[2], this.needPax = Lt(t2, e, 100, n) || this.needPax, this.needPax =
|
|
145472
|
-
let
|
|
145473
|
-
for (let
|
|
145474
|
-
for (let
|
|
145475
|
-
return this.cksum =
|
|
145496
|
+
let i = this.ctime || this.atime ? 130 : 155, r = un(this.path || "", i), n = r[0], o = r[1];
|
|
145497
|
+
this.needPax = !!r[2], this.needPax = Lt(t2, e, 100, n) || this.needPax, this.needPax = ct(t2, e + 100, 8, this.mode) || this.needPax, this.needPax = ct(t2, e + 108, 8, this.uid) || this.needPax, this.needPax = ct(t2, e + 116, 8, this.gid) || this.needPax, this.needPax = ct(t2, e + 124, 12, this.size) || this.needPax, this.needPax = Gi(t2, e + 136, 12, this.mtime) || this.needPax, t2[e + 156] = Number(this.#t.codePointAt(0)), this.needPax = Lt(t2, e + 157, 100, this.linkpath) || this.needPax, t2.write("ustar\x0000", e + 257, 8), this.needPax = Lt(t2, e + 265, 32, this.uname) || this.needPax, this.needPax = Lt(t2, e + 297, 32, this.gname) || this.needPax, this.needPax = ct(t2, e + 329, 8, this.devmaj) || this.needPax, this.needPax = ct(t2, e + 337, 8, this.devmin) || this.needPax, this.needPax = Lt(t2, e + 345, i, o) || this.needPax, t2[e + 475] !== 0 ? this.needPax = Lt(t2, e + 345, 155, o) || this.needPax : (this.needPax = Lt(t2, e + 345, 130, o) || this.needPax, this.needPax = Gi(t2, e + 476, 12, this.atime) || this.needPax, this.needPax = Gi(t2, e + 488, 12, this.ctime) || this.needPax);
|
|
145498
|
+
let h = 256;
|
|
145499
|
+
for (let a = e; a < e + 148; a++) h += t2[a];
|
|
145500
|
+
for (let a = e + 156; a < e + 512; a++) h += t2[a];
|
|
145501
|
+
return this.cksum = h, ct(t2, e + 148, 8, this.cksum), this.cksumValid = true, this.needPax;
|
|
145476
145502
|
}
|
|
145477
145503
|
get type() {
|
|
145478
145504
|
return this.#t === "Unsupported" ? this.#t : oe.get(this.#t);
|
|
@@ -145481,13 +145507,13 @@ var C2 = class {
|
|
|
145481
145507
|
return this.#t;
|
|
145482
145508
|
}
|
|
145483
145509
|
set type(t2) {
|
|
145484
|
-
let e = String(
|
|
145510
|
+
let e = String(Ve.get(t2));
|
|
145485
145511
|
if (ne(e) || e === "Unsupported") this.#t = e;
|
|
145486
145512
|
else if (ne(t2)) this.#t = t2;
|
|
145487
145513
|
else throw new TypeError("invalid entry type: " + t2);
|
|
145488
145514
|
}
|
|
145489
145515
|
};
|
|
145490
|
-
var
|
|
145516
|
+
var un = (s3, t2) => {
|
|
145491
145517
|
let i = s3, r = "", n, o = import_node_path13.posix.parse(s3).root || ".";
|
|
145492
145518
|
if (Buffer.byteLength(i) < 100) n = [i, r, false];
|
|
145493
145519
|
else {
|
|
@@ -145500,20 +145526,20 @@ var cn = (s3, t2) => {
|
|
|
145500
145526
|
return n;
|
|
145501
145527
|
};
|
|
145502
145528
|
var xt = (s3, t2, e) => s3.subarray(t2, t2 + e).toString("utf8").replace(/\0.*/, "");
|
|
145503
|
-
var
|
|
145504
|
-
var
|
|
145505
|
-
var
|
|
145506
|
-
var
|
|
145507
|
-
var
|
|
145508
|
-
var
|
|
145509
|
-
var
|
|
145510
|
-
var
|
|
145511
|
-
var
|
|
145512
|
-
var
|
|
145513
|
-
var
|
|
145514
|
-
var
|
|
145515
|
-
var Lt = (s3, t2, e, i) => i === void 0 ? false : (s3.write(i +
|
|
145516
|
-
var
|
|
145529
|
+
var Wi = (s3, t2, e) => pn(lt(s3, t2, e));
|
|
145530
|
+
var pn = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
|
|
145531
|
+
var lt = (s3, t2, e) => Number(s3[t2]) & 128 ? Hs(s3.subarray(t2, t2 + e)) : wn(s3, t2, e);
|
|
145532
|
+
var En = (s3) => isNaN(s3) ? void 0 : s3;
|
|
145533
|
+
var wn = (s3, t2, e) => En(parseInt(s3.subarray(t2, t2 + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
|
|
145534
|
+
var Sn = { 12: 8589934591, 8: 2097151 };
|
|
145535
|
+
var ct = (s3, t2, e, i) => i === void 0 ? false : i > Sn[e] || i < 0 ? (Us(i, s3.subarray(t2, t2 + e)), true) : (yn(s3, t2, e, i), false);
|
|
145536
|
+
var yn = (s3, t2, e, i) => s3.write(Rn(i, e), t2, e, "ascii");
|
|
145537
|
+
var Rn = (s3, t2) => gn(Math.floor(s3).toString(8), t2);
|
|
145538
|
+
var gn = (s3, t2) => (s3.length === t2 - 1 ? s3 : new Array(t2 - s3.length - 1).join("0") + s3 + " ") + "\0";
|
|
145539
|
+
var Gi = (s3, t2, e, i) => i === void 0 ? false : ct(s3, t2, e, i.getTime() / 1e3);
|
|
145540
|
+
var bn = new Array(156).join("\0");
|
|
145541
|
+
var Lt = (s3, t2, e, i) => i === void 0 ? false : (s3.write(i + bn, t2, e, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e);
|
|
145542
|
+
var ft = class s {
|
|
145517
145543
|
atime;
|
|
145518
145544
|
mtime;
|
|
145519
145545
|
ctime;
|
|
@@ -145539,7 +145565,7 @@ var ct = class s {
|
|
|
145539
145565
|
if (t2 === "") return Buffer.allocUnsafe(0);
|
|
145540
145566
|
let e = Buffer.byteLength(t2), i = 512 * Math.ceil(1 + e / 512), r = Buffer.allocUnsafe(i);
|
|
145541
145567
|
for (let n = 0; n < 512; n++) r[n] = 0;
|
|
145542
|
-
new
|
|
145568
|
+
new F2({ path: ("PaxHeader/" + (0, import_node_path14.basename)(this.path ?? "")).slice(0, 99), mode: this.mode || 420, uid: this.uid, gid: this.gid, size: e, mtime: this.mtime, type: this.global ? "GlobalExtendedHeader" : "ExtendedHeader", linkpath: "", uname: this.uname || "", gname: this.gname || "", devmaj: 0, devmin: 0, atime: this.atime, ctime: this.ctime }).encode(r), r.write(t2, 512, e, "utf8");
|
|
145543
145569
|
for (let n = e + 512; n < r.length; n++) r[n] = 0;
|
|
145544
145570
|
return r;
|
|
145545
145571
|
}
|
|
@@ -145553,24 +145579,52 @@ var ct = class s {
|
|
|
145553
145579
|
return n + o >= Math.pow(10, o) && (o += 1), o + n + r;
|
|
145554
145580
|
}
|
|
145555
145581
|
static parse(t2, e, i = false) {
|
|
145556
|
-
return new s(
|
|
145582
|
+
return new s(On(Tn(t2), e), i);
|
|
145557
145583
|
}
|
|
145558
145584
|
};
|
|
145559
|
-
var
|
|
145560
|
-
var
|
|
145561
|
-
`).reduce(
|
|
145562
|
-
var
|
|
145585
|
+
var On = (s3, t2) => t2 ? Object.assign({}, t2, s3) : s3;
|
|
145586
|
+
var Tn = (s3) => s3.replace(/\n$/, "").split(`
|
|
145587
|
+
`).reduce(xn, /* @__PURE__ */ Object.create(null));
|
|
145588
|
+
var xn = (s3, t2) => {
|
|
145563
145589
|
let e = parseInt(t2, 10);
|
|
145564
145590
|
if (e !== Buffer.byteLength(t2) + 1) return s3;
|
|
145565
145591
|
t2 = t2.slice((e + " ").length);
|
|
145566
145592
|
let i = t2.split("="), r = i.shift();
|
|
145567
145593
|
if (!r) return s3;
|
|
145568
|
-
let n = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o = i.join("=");
|
|
145569
|
-
|
|
145594
|
+
let n = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o = i.join("=").replace(/\0.*/, "");
|
|
145595
|
+
switch (n) {
|
|
145596
|
+
case "path":
|
|
145597
|
+
case "linkpath":
|
|
145598
|
+
case "type":
|
|
145599
|
+
case "charset":
|
|
145600
|
+
case "comment":
|
|
145601
|
+
case "gname":
|
|
145602
|
+
case "uname":
|
|
145603
|
+
s3[n] = o;
|
|
145604
|
+
break;
|
|
145605
|
+
case "ctime":
|
|
145606
|
+
case "atime":
|
|
145607
|
+
case "mtime":
|
|
145608
|
+
s3[n] = new Date(Number(o) * 1e3);
|
|
145609
|
+
break;
|
|
145610
|
+
case "size":
|
|
145611
|
+
let h = +o;
|
|
145612
|
+
h >= 0 && (s3[n] = h);
|
|
145613
|
+
break;
|
|
145614
|
+
case "gid":
|
|
145615
|
+
case "uid":
|
|
145616
|
+
case "dev":
|
|
145617
|
+
case "ino":
|
|
145618
|
+
case "nlink":
|
|
145619
|
+
case "mode":
|
|
145620
|
+
s3[n] = +o;
|
|
145621
|
+
break;
|
|
145622
|
+
}
|
|
145623
|
+
return s3;
|
|
145570
145624
|
};
|
|
145571
|
-
var
|
|
145572
|
-
var f =
|
|
145573
|
-
var
|
|
145625
|
+
var Ln = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
145626
|
+
var f = Ln !== "win32" ? (s3) => String(s3) : (s3) => String(s3).replaceAll(/\\/g, "/");
|
|
145627
|
+
var $e = class extends A {
|
|
145574
145628
|
extended;
|
|
145575
145629
|
globalExtended;
|
|
145576
145630
|
header;
|
|
@@ -145634,163 +145688,170 @@ var Ve = class extends A {
|
|
|
145634
145688
|
t2.path && (t2.path = f(t2.path)), t2.linkpath && (t2.linkpath = f(t2.linkpath)), Object.assign(this, Object.fromEntries(Object.entries(t2).filter(([i, r]) => !(r == null || i === "path" && e))));
|
|
145635
145689
|
}
|
|
145636
145690
|
};
|
|
145637
|
-
var
|
|
145691
|
+
var Dt = (s3, t2, e, i = {}) => {
|
|
145638
145692
|
s3.file && (i.file = s3.file), s3.cwd && (i.cwd = s3.cwd), i.code = e instanceof Error && e.code || t2, i.tarCode = t2, !s3.strict && i.recoverable !== false ? (e instanceof Error && (i = Object.assign(e, i), e = e.message), s3.emit("warn", t2, e, i)) : e instanceof Error ? s3.emit("error", Object.assign(e, i)) : s3.emit("error", Object.assign(new Error(`${t2}: ${e}`), i));
|
|
145639
145693
|
};
|
|
145640
|
-
var
|
|
145641
|
-
var
|
|
145642
|
-
var
|
|
145643
|
-
var
|
|
145694
|
+
var Nn = 1024 * 1024;
|
|
145695
|
+
var Xi = Buffer.from([31, 139]);
|
|
145696
|
+
var qi = Buffer.from([40, 181, 47, 253]);
|
|
145697
|
+
var An = Math.max(Xi.length, qi.length);
|
|
145644
145698
|
var B = /* @__PURE__ */ Symbol("state");
|
|
145645
|
-
var
|
|
145646
|
-
var
|
|
145647
|
-
var
|
|
145648
|
-
var
|
|
145699
|
+
var Nt = /* @__PURE__ */ Symbol("writeEntry");
|
|
145700
|
+
var it = /* @__PURE__ */ Symbol("readEntry");
|
|
145701
|
+
var Zi = /* @__PURE__ */ Symbol("nextEntry");
|
|
145702
|
+
var Zs = /* @__PURE__ */ Symbol("processEntry");
|
|
145649
145703
|
var V2 = /* @__PURE__ */ Symbol("extendedHeader");
|
|
145650
145704
|
var he = /* @__PURE__ */ Symbol("globalExtendedHeader");
|
|
145651
|
-
var
|
|
145652
|
-
var
|
|
145705
|
+
var dt = /* @__PURE__ */ Symbol("meta");
|
|
145706
|
+
var Ys = /* @__PURE__ */ Symbol("emitMeta");
|
|
145653
145707
|
var p = /* @__PURE__ */ Symbol("buffer");
|
|
145654
|
-
var
|
|
145655
|
-
var
|
|
145656
|
-
var
|
|
145708
|
+
var st = /* @__PURE__ */ Symbol("queue");
|
|
145709
|
+
var mt = /* @__PURE__ */ Symbol("ended");
|
|
145710
|
+
var Yi = /* @__PURE__ */ Symbol("emittedEnd");
|
|
145657
145711
|
var At = /* @__PURE__ */ Symbol("emit");
|
|
145658
145712
|
var y = /* @__PURE__ */ Symbol("unzip");
|
|
145659
|
-
var
|
|
145660
|
-
var
|
|
145661
|
-
var
|
|
145662
|
-
var
|
|
145663
|
-
var
|
|
145713
|
+
var Xe = /* @__PURE__ */ Symbol("consumeChunk");
|
|
145714
|
+
var qe = /* @__PURE__ */ Symbol("consumeChunkSub");
|
|
145715
|
+
var Ki = /* @__PURE__ */ Symbol("consumeBody");
|
|
145716
|
+
var Ks = /* @__PURE__ */ Symbol("consumeMeta");
|
|
145717
|
+
var Vs = /* @__PURE__ */ Symbol("consumeHeader");
|
|
145664
145718
|
var ae = /* @__PURE__ */ Symbol("consuming");
|
|
145665
|
-
var
|
|
145666
|
-
var
|
|
145719
|
+
var Vi = /* @__PURE__ */ Symbol("bufferConcat");
|
|
145720
|
+
var Qe = /* @__PURE__ */ Symbol("maybeEnd");
|
|
145667
145721
|
var Yt = /* @__PURE__ */ Symbol("writing");
|
|
145668
|
-
var
|
|
145669
|
-
var
|
|
145722
|
+
var $ = /* @__PURE__ */ Symbol("aborted");
|
|
145723
|
+
var Je = /* @__PURE__ */ Symbol("onDone");
|
|
145670
145724
|
var It = /* @__PURE__ */ Symbol("sawValidEntry");
|
|
145671
|
-
var
|
|
145672
|
-
var
|
|
145673
|
-
var
|
|
145674
|
-
var
|
|
145675
|
-
var
|
|
145725
|
+
var je = /* @__PURE__ */ Symbol("sawNullBlock");
|
|
145726
|
+
var ti = /* @__PURE__ */ Symbol("sawEOF");
|
|
145727
|
+
var $s = /* @__PURE__ */ Symbol("closeStream");
|
|
145728
|
+
var In = 1e3;
|
|
145729
|
+
var le = /* @__PURE__ */ Symbol("compressedBytesRead");
|
|
145730
|
+
var $i = /* @__PURE__ */ Symbol("decompressedBytesRead");
|
|
145731
|
+
var Xs = /* @__PURE__ */ Symbol("checkDecompressionRatio");
|
|
145732
|
+
var Cn = () => true;
|
|
145733
|
+
var rt = class extends import_events5.EventEmitter {
|
|
145676
145734
|
file;
|
|
145677
145735
|
strict;
|
|
145678
145736
|
maxMetaEntrySize;
|
|
145679
145737
|
filter;
|
|
145680
145738
|
brotli;
|
|
145681
145739
|
zstd;
|
|
145740
|
+
maxDecompressionRatio;
|
|
145682
145741
|
writable = true;
|
|
145683
145742
|
readable = false;
|
|
145684
|
-
[
|
|
145743
|
+
[st] = [];
|
|
145685
145744
|
[p];
|
|
145686
|
-
[
|
|
145687
|
-
[
|
|
145745
|
+
[it];
|
|
145746
|
+
[Nt];
|
|
145688
145747
|
[B] = "begin";
|
|
145689
|
-
[
|
|
145748
|
+
[dt] = "";
|
|
145690
145749
|
[V2];
|
|
145691
145750
|
[he];
|
|
145692
|
-
[
|
|
145751
|
+
[mt] = false;
|
|
145693
145752
|
[y];
|
|
145694
|
-
[
|
|
145753
|
+
[$] = false;
|
|
145695
145754
|
[It];
|
|
145696
|
-
[Je] = false;
|
|
145697
145755
|
[je] = false;
|
|
145756
|
+
[ti] = false;
|
|
145698
145757
|
[Yt] = false;
|
|
145699
145758
|
[ae] = false;
|
|
145700
|
-
[
|
|
145759
|
+
[Yi] = false;
|
|
145760
|
+
[le] = 0;
|
|
145761
|
+
[$i] = 0;
|
|
145701
145762
|
constructor(t2 = {}) {
|
|
145702
|
-
super(), this.file = t2.file || "", this.on(
|
|
145763
|
+
super(), this.file = t2.file || "", this.on(Je, () => {
|
|
145703
145764
|
(this[B] === "begin" || this[It] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
|
|
145704
|
-
}), t2.ondone ? this.on(
|
|
145765
|
+
}), t2.ondone ? this.on(Je, t2.ondone) : this.on(Je, () => {
|
|
145705
145766
|
this.emit("prefinish"), this.emit("finish"), this.emit("end");
|
|
145706
|
-
}), this.strict = !!t2.strict, this.maxMetaEntrySize = t2.maxMetaEntrySize ||
|
|
145767
|
+
}), this.strict = !!t2.strict, this.maxDecompressionRatio = typeof t2.maxDecompressionRatio == "number" ? t2.maxDecompressionRatio : In, this.maxMetaEntrySize = t2.maxMetaEntrySize || Nn, this.filter = typeof t2.filter == "function" ? t2.filter : Cn;
|
|
145707
145768
|
let e = t2.file && (t2.file.endsWith(".tar.br") || t2.file.endsWith(".tbr"));
|
|
145708
145769
|
this.brotli = !(t2.gzip || t2.zstd) && t2.brotli !== void 0 ? t2.brotli : e ? void 0 : false;
|
|
145709
145770
|
let i = t2.file && (t2.file.endsWith(".tar.zst") || t2.file.endsWith(".tzst"));
|
|
145710
|
-
this.zstd = !(t2.gzip || t2.brotli) && t2.zstd !== void 0 ? t2.zstd : i ? true : void 0, this.on("end", () => this[
|
|
145771
|
+
this.zstd = !(t2.gzip || t2.brotli) && t2.zstd !== void 0 ? t2.zstd : i ? true : void 0, this.on("end", () => this[$s]()), typeof t2.onwarn == "function" && this.on("warn", t2.onwarn), typeof t2.onReadEntry == "function" && this.on("entry", t2.onReadEntry);
|
|
145711
145772
|
}
|
|
145712
145773
|
warn(t2, e, i = {}) {
|
|
145713
|
-
|
|
145774
|
+
Dt(this, t2, e, i);
|
|
145714
145775
|
}
|
|
145715
|
-
[
|
|
145776
|
+
[Vs](t2, e) {
|
|
145716
145777
|
this[It] === void 0 && (this[It] = false);
|
|
145717
145778
|
let i;
|
|
145718
145779
|
try {
|
|
145719
|
-
i = new
|
|
145780
|
+
i = new F2(t2, e, this[V2], this[he]);
|
|
145720
145781
|
} catch (r) {
|
|
145721
145782
|
return this.warn("TAR_ENTRY_INVALID", r);
|
|
145722
145783
|
}
|
|
145723
|
-
if (i.nullBlock) this[
|
|
145724
|
-
else if (this[
|
|
145784
|
+
if (i.nullBlock) this[je] ? (this[ti] = true, this[B] === "begin" && (this[B] = "header"), this[At]("eof")) : (this[je] = true, this[At]("nullBlock"));
|
|
145785
|
+
else if (this[je] = false, !i.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: i });
|
|
145725
145786
|
else if (!i.path) this.warn("TAR_ENTRY_INVALID", "path is required", { header: i });
|
|
145726
145787
|
else {
|
|
145727
145788
|
let r = i.type;
|
|
145728
145789
|
if (/^(Symbolic)?Link$/.test(r) && !i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath required", { header: i });
|
|
145729
145790
|
else if (!/^(Symbolic)?Link$/.test(r) && !/^(Global)?ExtendedHeader$/.test(r) && i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: i });
|
|
145730
145791
|
else {
|
|
145731
|
-
let n = this[
|
|
145792
|
+
let n = this[Nt] = new $e(i, this[V2], this[he]);
|
|
145732
145793
|
if (!this[It]) if (n.remain) {
|
|
145733
145794
|
let o = () => {
|
|
145734
145795
|
n.invalid || (this[It] = true);
|
|
145735
145796
|
};
|
|
145736
145797
|
n.on("end", o);
|
|
145737
145798
|
} else this[It] = true;
|
|
145738
|
-
n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[At]("ignoredEntry", n), this[B] = "ignore", n.resume()) : n.size > 0 && (this[
|
|
145799
|
+
n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[At]("ignoredEntry", n), this[B] = "ignore", n.resume()) : n.size > 0 && (this[dt] = "", n.on("data", (o) => this[dt] += o), this[B] = "meta") : (this[V2] = void 0, n.ignore = n.ignore || !this.filter(n.path, n), n.ignore ? (this[At]("ignoredEntry", n), this[B] = n.remain ? "ignore" : "header", n.resume()) : (n.remain ? this[B] = "body" : (this[B] = "header", n.end()), this[it] ? this[st].push(n) : (this[st].push(n), this[Zi]())));
|
|
145739
145800
|
}
|
|
145740
145801
|
}
|
|
145741
145802
|
}
|
|
145742
|
-
[
|
|
145803
|
+
[$s]() {
|
|
145743
145804
|
queueMicrotask(() => this.emit("close"));
|
|
145744
145805
|
}
|
|
145745
|
-
[
|
|
145806
|
+
[Zs](t2) {
|
|
145746
145807
|
let e = true;
|
|
145747
|
-
if (!t2) this[
|
|
145808
|
+
if (!t2) this[it] = void 0, e = false;
|
|
145748
145809
|
else if (Array.isArray(t2)) {
|
|
145749
145810
|
let [i, ...r] = t2;
|
|
145750
145811
|
this.emit(i, ...r);
|
|
145751
|
-
} else this[
|
|
145812
|
+
} else this[it] = t2, this.emit("entry", t2), t2.emittedEnd || (t2.on("end", () => this[Zi]()), e = false);
|
|
145752
145813
|
return e;
|
|
145753
145814
|
}
|
|
145754
|
-
[
|
|
145815
|
+
[Zi]() {
|
|
145755
145816
|
do
|
|
145756
145817
|
;
|
|
145757
|
-
while (this[
|
|
145758
|
-
if (this[
|
|
145759
|
-
let t2 = this[
|
|
145818
|
+
while (this[Zs](this[st].shift()));
|
|
145819
|
+
if (this[st].length === 0) {
|
|
145820
|
+
let t2 = this[it];
|
|
145760
145821
|
!t2 || t2.flowing || t2.size === t2.remain ? this[Yt] || this.emit("drain") : t2.once("drain", () => this.emit("drain"));
|
|
145761
145822
|
}
|
|
145762
145823
|
}
|
|
145763
|
-
[
|
|
145764
|
-
let i = this[
|
|
145824
|
+
[Ki](t2, e) {
|
|
145825
|
+
let i = this[Nt];
|
|
145765
145826
|
if (!i) throw new Error("attempt to consume body without entry??");
|
|
145766
145827
|
let r = i.blockRemain ?? 0, n = r >= t2.length && e === 0 ? t2 : t2.subarray(e, e + r);
|
|
145767
|
-
return i.write(n), i.blockRemain || (this[B] = "header", this[
|
|
145828
|
+
return i.write(n), i.blockRemain || (this[B] = "header", this[Nt] = void 0, i.end()), n.length;
|
|
145768
145829
|
}
|
|
145769
|
-
[
|
|
145770
|
-
let i = this[
|
|
145771
|
-
return !this[
|
|
145830
|
+
[Ks](t2, e) {
|
|
145831
|
+
let i = this[Nt], r = this[Ki](t2, e);
|
|
145832
|
+
return !this[Nt] && i && this[Ys](i), r;
|
|
145772
145833
|
}
|
|
145773
145834
|
[At](t2, e, i) {
|
|
145774
|
-
this[
|
|
145835
|
+
this[st].length === 0 && !this[it] ? this.emit(t2, e, i) : this[st].push([t2, e, i]);
|
|
145775
145836
|
}
|
|
145776
|
-
[
|
|
145777
|
-
switch (this[At]("meta", this[
|
|
145837
|
+
[Ys](t2) {
|
|
145838
|
+
switch (this[At]("meta", this[dt]), t2.type) {
|
|
145778
145839
|
case "ExtendedHeader":
|
|
145779
145840
|
case "OldExtendedHeader":
|
|
145780
|
-
this[V2] =
|
|
145841
|
+
this[V2] = ft.parse(this[dt], this[V2], false);
|
|
145781
145842
|
break;
|
|
145782
145843
|
case "GlobalExtendedHeader":
|
|
145783
|
-
this[he] =
|
|
145844
|
+
this[he] = ft.parse(this[dt], this[he], true);
|
|
145784
145845
|
break;
|
|
145785
145846
|
case "NextFileHasLongPath":
|
|
145786
145847
|
case "OldGnuLongPath": {
|
|
145787
145848
|
let e = this[V2] ?? /* @__PURE__ */ Object.create(null);
|
|
145788
|
-
this[V2] = e, e.path = this[
|
|
145849
|
+
this[V2] = e, e.path = this[dt].replace(/\0.*/, "");
|
|
145789
145850
|
break;
|
|
145790
145851
|
}
|
|
145791
145852
|
case "NextFileHasLongLinkpath": {
|
|
145792
145853
|
let e = this[V2] || /* @__PURE__ */ Object.create(null);
|
|
145793
|
-
this[V2] = e, e.linkpath = this[
|
|
145854
|
+
this[V2] = e, e.linkpath = this[dt].replace(/\0.*/, "");
|
|
145794
145855
|
break;
|
|
145795
145856
|
}
|
|
145796
145857
|
default:
|
|
@@ -145798,86 +145859,95 @@ var st = class extends import_events5.EventEmitter {
|
|
|
145798
145859
|
}
|
|
145799
145860
|
}
|
|
145800
145861
|
abort(t2) {
|
|
145801
|
-
this[
|
|
145862
|
+
this[$] || (this[$] = true, this.emit("abort", t2), this.warn("TAR_ABORT", t2, { recoverable: false }));
|
|
145863
|
+
}
|
|
145864
|
+
[Xs](t2) {
|
|
145865
|
+
this[$i] += t2.length;
|
|
145866
|
+
let e = this[$i] / this[le];
|
|
145867
|
+
return e > this.maxDecompressionRatio ? (this.abort(new Error(`max decompression ratio exceeded: ${e.toFixed(2)} > ${this.maxDecompressionRatio}`)), false) : true;
|
|
145802
145868
|
}
|
|
145803
145869
|
write(t2, e, i) {
|
|
145804
|
-
if (typeof e == "function" && (i = e, e = void 0), typeof t2 == "string" && (t2 = Buffer.from(t2, typeof e == "string" ? e : "utf8")), this[
|
|
145870
|
+
if (typeof e == "function" && (i = e, e = void 0), typeof t2 == "string" && (t2 = Buffer.from(t2, typeof e == "string" ? e : "utf8")), this[$]) return i?.(), false;
|
|
145805
145871
|
if ((this[y] === void 0 || this.brotli === void 0 && this[y] === false) && t2) {
|
|
145806
|
-
if (this[p] && (t2 = Buffer.concat([this[p], t2]), this[p] = void 0), t2.length <
|
|
145807
|
-
for (let
|
|
145872
|
+
if (this[p] && (t2 = Buffer.concat([this[p], t2]), this[p] = void 0), t2.length < An) return this[p] = t2, i?.(), true;
|
|
145873
|
+
for (let a = 0; this[y] === void 0 && a < Xi.length; a++) t2[a] !== Xi[a] && (this[y] = false);
|
|
145808
145874
|
let o = false;
|
|
145809
145875
|
if (this[y] === false && this.zstd !== false) {
|
|
145810
145876
|
o = true;
|
|
145811
|
-
for (let
|
|
145877
|
+
for (let a = 0; a < qi.length; a++) if (t2[a] !== qi[a]) {
|
|
145812
145878
|
o = false;
|
|
145813
145879
|
break;
|
|
145814
145880
|
}
|
|
145815
145881
|
}
|
|
145816
|
-
let
|
|
145817
|
-
if (this[y] === false &&
|
|
145882
|
+
let h = this.brotli === void 0 && !o;
|
|
145883
|
+
if (this[y] === false && h) if (t2.length < 512) if (this[mt]) this.brotli = true;
|
|
145818
145884
|
else return this[p] = t2, i?.(), true;
|
|
145819
145885
|
else try {
|
|
145820
|
-
new
|
|
145886
|
+
new F2(t2.subarray(0, 512)), this.brotli = false;
|
|
145821
145887
|
} catch {
|
|
145822
145888
|
this.brotli = true;
|
|
145823
145889
|
}
|
|
145824
145890
|
if (this[y] === void 0 || this[y] === false && (this.brotli || o)) {
|
|
145825
|
-
let
|
|
145826
|
-
this[
|
|
145827
|
-
this[
|
|
145828
|
-
}), this[
|
|
145829
|
-
|
|
145891
|
+
let a = this[mt];
|
|
145892
|
+
this[mt] = false, this[y] = this[y] === void 0 ? new Ue({}) : o ? new Ke({}) : new Ge({}), this[y].on("data", (c) => {
|
|
145893
|
+
this[Xs](c) && this[Xe](c);
|
|
145894
|
+
}), this[y].on("error", (c) => {
|
|
145895
|
+
this[$] || this.abort(c);
|
|
145896
|
+
}), this[y].on("end", () => {
|
|
145897
|
+
this[mt] = true, this[Xe]();
|
|
145898
|
+
}), this[Yt] = true, this[le] += t2.length;
|
|
145899
|
+
let l = !!this[y][a ? "end" : "write"](t2);
|
|
145830
145900
|
return this[Yt] = false, i?.(), l;
|
|
145831
145901
|
}
|
|
145832
145902
|
}
|
|
145833
|
-
this[Yt] = true, this[y] ? this[y].write(t2) : this[
|
|
145834
|
-
let n = this[
|
|
145835
|
-
return !n && this[
|
|
145903
|
+
this[Yt] = true, this[y] ? (this[le] += t2.length, this[y].write(t2)) : this[Xe](t2), this[Yt] = false;
|
|
145904
|
+
let n = this[st].length > 0 ? false : this[it] ? this[it].flowing : true;
|
|
145905
|
+
return !n && this[st].length === 0 && this[it]?.once("drain", () => this.emit("drain")), i?.(), n;
|
|
145836
145906
|
}
|
|
145837
|
-
[
|
|
145838
|
-
t2 && !this[
|
|
145907
|
+
[Vi](t2) {
|
|
145908
|
+
t2 && !this[$] && (this[p] = this[p] ? Buffer.concat([this[p], t2]) : t2);
|
|
145839
145909
|
}
|
|
145840
|
-
[
|
|
145841
|
-
if (this[
|
|
145842
|
-
this[
|
|
145843
|
-
let t2 = this[
|
|
145844
|
-
if (t2
|
|
145910
|
+
[Qe]() {
|
|
145911
|
+
if (this[mt] && !this[Yi] && !this[$] && !this[ae]) {
|
|
145912
|
+
this[Yi] = true;
|
|
145913
|
+
let t2 = this[Nt];
|
|
145914
|
+
if (t2?.blockRemain) {
|
|
145845
145915
|
let e = this[p] ? this[p].length : 0;
|
|
145846
145916
|
this.warn("TAR_BAD_ARCHIVE", `Truncated input (needed ${t2.blockRemain} more bytes, only ${e} available)`, { entry: t2 }), this[p] && t2.write(this[p]), t2.end();
|
|
145847
145917
|
}
|
|
145848
|
-
this[At](
|
|
145918
|
+
this[At](Je);
|
|
145849
145919
|
}
|
|
145850
145920
|
}
|
|
145851
|
-
[
|
|
145852
|
-
if (this[ae] && t2) this[
|
|
145853
|
-
else if (!t2 && !this[p]) this[
|
|
145921
|
+
[Xe](t2) {
|
|
145922
|
+
if (this[ae] && t2) this[Vi](t2);
|
|
145923
|
+
else if (!t2 && !this[p]) this[Qe]();
|
|
145854
145924
|
else if (t2) {
|
|
145855
145925
|
if (this[ae] = true, this[p]) {
|
|
145856
|
-
this[
|
|
145926
|
+
this[Vi](t2);
|
|
145857
145927
|
let e = this[p];
|
|
145858
|
-
this[p] = void 0, this[
|
|
145859
|
-
} else this[
|
|
145860
|
-
for (; this[p] && this[p]?.length >= 512 && !this[
|
|
145928
|
+
this[p] = void 0, this[qe](e);
|
|
145929
|
+
} else this[qe](t2);
|
|
145930
|
+
for (; this[p] && this[p]?.length >= 512 && !this[$] && !this[ti]; ) {
|
|
145861
145931
|
let e = this[p];
|
|
145862
|
-
this[p] = void 0, this[
|
|
145932
|
+
this[p] = void 0, this[qe](e);
|
|
145863
145933
|
}
|
|
145864
145934
|
this[ae] = false;
|
|
145865
145935
|
}
|
|
145866
|
-
(!this[p] || this[
|
|
145936
|
+
(!this[p] || this[mt]) && this[Qe]();
|
|
145867
145937
|
}
|
|
145868
|
-
[
|
|
145938
|
+
[qe](t2) {
|
|
145869
145939
|
let e = 0, i = t2.length;
|
|
145870
|
-
for (; e + 512 <= i && !this[
|
|
145940
|
+
for (; e + 512 <= i && !this[$] && !this[ti]; ) switch (this[B]) {
|
|
145871
145941
|
case "begin":
|
|
145872
145942
|
case "header":
|
|
145873
|
-
this[
|
|
145943
|
+
this[Vs](t2, e), e += 512;
|
|
145874
145944
|
break;
|
|
145875
145945
|
case "ignore":
|
|
145876
145946
|
case "body":
|
|
145877
|
-
e += this[
|
|
145947
|
+
e += this[Ki](t2, e);
|
|
145878
145948
|
break;
|
|
145879
145949
|
case "meta":
|
|
145880
|
-
e += this[
|
|
145950
|
+
e += this[Ks](t2, e);
|
|
145881
145951
|
break;
|
|
145882
145952
|
default:
|
|
145883
145953
|
throw new Error("invalid state: " + this[B]);
|
|
@@ -145885,46 +145955,46 @@ var st = class extends import_events5.EventEmitter {
|
|
|
145885
145955
|
e < i && (this[p] = this[p] ? Buffer.concat([t2.subarray(e), this[p]]) : t2.subarray(e));
|
|
145886
145956
|
}
|
|
145887
145957
|
end(t2, e, i) {
|
|
145888
|
-
return typeof t2 == "function" && (i = t2, e = void 0, t2 = void 0), typeof e == "function" && (i = e, e = void 0), typeof t2 == "string" && (t2 = Buffer.from(t2, e)), i && this.once("finish", i), this[
|
|
145958
|
+
return typeof t2 == "function" && (i = t2, e = void 0, t2 = void 0), typeof e == "function" && (i = e, e = void 0), typeof t2 == "string" && (t2 = Buffer.from(t2, e)), i && this.once("finish", i), this[$] || (this[y] ? (t2 && (this[le] += t2.length, this[y].write(t2)), this[y].end()) : (this[mt] = true, (this.brotli === void 0 || this.zstd === void 0) && (t2 = t2 || Buffer.alloc(0)), t2 && this.write(t2), this[Qe]())), this;
|
|
145889
145959
|
}
|
|
145890
145960
|
};
|
|
145891
|
-
var
|
|
145961
|
+
var ut = (s3) => {
|
|
145892
145962
|
let t2 = s3.length - 1, e = -1;
|
|
145893
145963
|
for (; t2 > -1 && s3.charAt(t2) === "/"; ) e = t2, t2--;
|
|
145894
145964
|
return e === -1 ? s3 : s3.slice(0, e);
|
|
145895
145965
|
};
|
|
145896
|
-
var
|
|
145966
|
+
var vn = (s3) => {
|
|
145897
145967
|
let t2 = s3.onReadEntry;
|
|
145898
145968
|
s3.onReadEntry = t2 ? (e) => {
|
|
145899
145969
|
t2(e), e.resume();
|
|
145900
145970
|
} : (e) => e.resume();
|
|
145901
145971
|
};
|
|
145902
|
-
var
|
|
145903
|
-
let e = new Map(t2.map((n) => [
|
|
145904
|
-
let
|
|
145905
|
-
if (n ===
|
|
145972
|
+
var Qi = (s3, t2) => {
|
|
145973
|
+
let e = new Map(t2.map((n) => [ut(n), true])), i = s3.filter, r = (n, o = "") => {
|
|
145974
|
+
let h = o || (0, import_path20.parse)(n).root || ".", a;
|
|
145975
|
+
if (n === h) a = false;
|
|
145906
145976
|
else {
|
|
145907
145977
|
let l = e.get(n);
|
|
145908
|
-
|
|
145978
|
+
a = l !== void 0 ? l : r((0, import_path20.dirname)(n), h);
|
|
145909
145979
|
}
|
|
145910
|
-
return e.set(n,
|
|
145980
|
+
return e.set(n, a), a;
|
|
145911
145981
|
};
|
|
145912
|
-
s3.filter = i ? (n, o) => i(n, o) && r(
|
|
145982
|
+
s3.filter = i ? (n, o) => i(n, o) && r(ut(n)) : (n) => r(ut(n));
|
|
145913
145983
|
};
|
|
145914
|
-
var
|
|
145915
|
-
let t2 = new
|
|
145984
|
+
var Mn = (s3) => {
|
|
145985
|
+
let t2 = new rt(s3), e = s3.file, i;
|
|
145916
145986
|
try {
|
|
145917
145987
|
i = import_node_fs10.default.openSync(e, "r");
|
|
145918
145988
|
let r = import_node_fs10.default.fstatSync(i), n = s3.maxReadSize || 16 * 1024 * 1024;
|
|
145919
145989
|
if (r.size < n) {
|
|
145920
|
-
let o = Buffer.allocUnsafe(r.size),
|
|
145921
|
-
t2.end(
|
|
145990
|
+
let o = Buffer.allocUnsafe(r.size), h = import_node_fs10.default.readSync(i, o, 0, r.size, 0);
|
|
145991
|
+
t2.end(h === o.byteLength ? o : o.subarray(0, h));
|
|
145922
145992
|
} else {
|
|
145923
|
-
let o = 0,
|
|
145993
|
+
let o = 0, h = Buffer.allocUnsafe(n);
|
|
145924
145994
|
for (; o < r.size; ) {
|
|
145925
|
-
let
|
|
145926
|
-
if (
|
|
145927
|
-
o +=
|
|
145995
|
+
let a = import_node_fs10.default.readSync(i, h, 0, n, o);
|
|
145996
|
+
if (a === 0) break;
|
|
145997
|
+
o += a, t2.write(h.subarray(0, a));
|
|
145928
145998
|
}
|
|
145929
145999
|
t2.end();
|
|
145930
146000
|
}
|
|
@@ -145935,58 +146005,58 @@ var In = (s3) => {
|
|
|
145935
146005
|
}
|
|
145936
146006
|
}
|
|
145937
146007
|
};
|
|
145938
|
-
var
|
|
145939
|
-
let e = new
|
|
145940
|
-
return new Promise((o,
|
|
145941
|
-
e.on("error",
|
|
145942
|
-
if (
|
|
146008
|
+
var Bn = (s3, t2) => {
|
|
146009
|
+
let e = new rt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
|
|
146010
|
+
return new Promise((o, h) => {
|
|
146011
|
+
e.on("error", h), e.on("end", o), import_node_fs10.default.stat(r, (a, l) => {
|
|
146012
|
+
if (a) h(a);
|
|
145943
146013
|
else {
|
|
145944
146014
|
let c = new _t(r, { readSize: i, size: l.size });
|
|
145945
|
-
c.on("error",
|
|
146015
|
+
c.on("error", h), c.pipe(e);
|
|
145946
146016
|
}
|
|
145947
146017
|
});
|
|
145948
146018
|
});
|
|
145949
146019
|
};
|
|
145950
|
-
var
|
|
145951
|
-
t2?.length &&
|
|
145952
|
-
});
|
|
145953
|
-
var
|
|
145954
|
-
var { isAbsolute:
|
|
145955
|
-
var
|
|
145956
|
-
let t2 = "", e =
|
|
145957
|
-
for (;
|
|
146020
|
+
var Ct = K2(Mn, Bn, (s3) => new rt(s3), (s3) => new rt(s3), (s3, t2) => {
|
|
146021
|
+
t2?.length && Qi(s3, t2), s3.noResume || vn(s3);
|
|
146022
|
+
});
|
|
146023
|
+
var Ji = (s3, t2, e) => (s3 &= 4095, e && (s3 = (s3 | 384) & -19), t2 && (s3 & 256 && (s3 |= 64), s3 & 32 && (s3 |= 8), s3 & 4 && (s3 |= 1)), s3);
|
|
146024
|
+
var { isAbsolute: zn, parse: qs } = import_node_path15.win32;
|
|
146025
|
+
var ce = (s3) => {
|
|
146026
|
+
let t2 = "", e = qs(s3);
|
|
146027
|
+
for (; zn(s3) || e.root; ) {
|
|
145958
146028
|
let i = s3.charAt(0) === "/" && s3.slice(0, 4) !== "//?/" ? "/" : e.root;
|
|
145959
|
-
s3 = s3.slice(i.length), t2 += i, e =
|
|
146029
|
+
s3 = s3.slice(i.length), t2 += i, e = qs(s3);
|
|
145960
146030
|
}
|
|
145961
146031
|
return [t2, s3];
|
|
145962
146032
|
};
|
|
145963
|
-
var
|
|
145964
|
-
var
|
|
145965
|
-
var
|
|
145966
|
-
var
|
|
145967
|
-
var
|
|
145968
|
-
var
|
|
145969
|
-
var
|
|
145970
|
-
var
|
|
145971
|
-
var
|
|
145972
|
-
var
|
|
145973
|
-
var
|
|
145974
|
-
var
|
|
145975
|
-
var
|
|
145976
|
-
var
|
|
145977
|
-
var
|
|
145978
|
-
var
|
|
145979
|
-
var
|
|
145980
|
-
var
|
|
145981
|
-
var
|
|
145982
|
-
var
|
|
145983
|
-
var
|
|
146033
|
+
var ei = ["|", "<", ">", "?", ":"];
|
|
146034
|
+
var ji = ei.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
|
|
146035
|
+
var Un = new Map(ei.map((s3, t2) => [s3, ji[t2]]));
|
|
146036
|
+
var Hn = new Map(ji.map((s3, t2) => [s3, ei[t2]]));
|
|
146037
|
+
var ts = (s3) => ei.reduce((t2, e) => t2.split(e).join(Un.get(e)), s3);
|
|
146038
|
+
var Qs = (s3) => ji.reduce((t2, e) => t2.split(e).join(Hn.get(e)), s3);
|
|
146039
|
+
var rr = (s3, t2) => t2 ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), ut(t2) + "/" + s3) : f(s3);
|
|
146040
|
+
var Wn = 16 * 1024 * 1024;
|
|
146041
|
+
var tr = /* @__PURE__ */ Symbol("process");
|
|
146042
|
+
var er = /* @__PURE__ */ Symbol("file");
|
|
146043
|
+
var ir = /* @__PURE__ */ Symbol("directory");
|
|
146044
|
+
var is = /* @__PURE__ */ Symbol("symlink");
|
|
146045
|
+
var sr = /* @__PURE__ */ Symbol("hardlink");
|
|
146046
|
+
var fe = /* @__PURE__ */ Symbol("header");
|
|
146047
|
+
var ii = /* @__PURE__ */ Symbol("read");
|
|
146048
|
+
var ss = /* @__PURE__ */ Symbol("lstat");
|
|
146049
|
+
var si = /* @__PURE__ */ Symbol("onlstat");
|
|
146050
|
+
var rs = /* @__PURE__ */ Symbol("onread");
|
|
146051
|
+
var ns = /* @__PURE__ */ Symbol("onreadlink");
|
|
146052
|
+
var os = /* @__PURE__ */ Symbol("openfile");
|
|
146053
|
+
var hs = /* @__PURE__ */ Symbol("onopenfile");
|
|
145984
146054
|
var pt = /* @__PURE__ */ Symbol("close");
|
|
145985
|
-
var
|
|
145986
|
-
var
|
|
145987
|
-
var
|
|
145988
|
-
var
|
|
145989
|
-
var
|
|
146055
|
+
var ri = /* @__PURE__ */ Symbol("mode");
|
|
146056
|
+
var as = /* @__PURE__ */ Symbol("awaitDrain");
|
|
146057
|
+
var es = /* @__PURE__ */ Symbol("ondrain");
|
|
146058
|
+
var q = /* @__PURE__ */ Symbol("prefix");
|
|
146059
|
+
var de = class extends A {
|
|
145990
146060
|
path;
|
|
145991
146061
|
portable;
|
|
145992
146062
|
myuid = process.getuid && process.getuid() || 0;
|
|
@@ -146019,109 +146089,109 @@ var fe = class extends A {
|
|
|
146019
146089
|
#t = false;
|
|
146020
146090
|
constructor(t2, e = {}) {
|
|
146021
146091
|
let i = se(e);
|
|
146022
|
-
super(), this.path = f(t2), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize ||
|
|
146092
|
+
super(), this.path = f(t2), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize || Wn, this.linkCache = i.linkCache || /* @__PURE__ */ new Map(), this.statCache = i.statCache || /* @__PURE__ */ new Map(), this.preservePaths = !!i.preservePaths, this.cwd = f(i.cwd || process.cwd()), this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.mtime = i.mtime, this.prefix = i.prefix ? f(i.prefix) : void 0, this.onWriteEntry = i.onWriteEntry, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
|
|
146023
146093
|
let r = false;
|
|
146024
146094
|
if (!this.preservePaths) {
|
|
146025
|
-
let [o,
|
|
146026
|
-
o && typeof
|
|
146095
|
+
let [o, h] = ce(this.path);
|
|
146096
|
+
o && typeof h == "string" && (this.path = h, r = o);
|
|
146027
146097
|
}
|
|
146028
|
-
this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path =
|
|
146098
|
+
this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = Qs(this.path.replaceAll(/\\/g, "/")), t2 = t2.replaceAll(/\\/g, "/")), this.absolute = f(i.absolute || import_path21.default.resolve(this.cwd, t2)), this.path === "" && (this.path = "./"), r && this.warn("TAR_ENTRY_INFO", `stripping ${r} from absolute path`, { entry: this, path: r + this.path });
|
|
146029
146099
|
let n = this.statCache.get(this.absolute);
|
|
146030
|
-
n ? this[
|
|
146100
|
+
n ? this[si](n) : this[ss]();
|
|
146031
146101
|
}
|
|
146032
146102
|
warn(t2, e, i = {}) {
|
|
146033
|
-
return
|
|
146103
|
+
return Dt(this, t2, e, i);
|
|
146034
146104
|
}
|
|
146035
146105
|
emit(t2, ...e) {
|
|
146036
146106
|
return t2 === "error" && (this.#t = true), super.emit(t2, ...e);
|
|
146037
146107
|
}
|
|
146038
|
-
[
|
|
146108
|
+
[ss]() {
|
|
146039
146109
|
import_fs26.default.lstat(this.absolute, (t2, e) => {
|
|
146040
146110
|
if (t2) return this.emit("error", t2);
|
|
146041
|
-
this[
|
|
146111
|
+
this[si](e);
|
|
146042
146112
|
});
|
|
146043
146113
|
}
|
|
146044
|
-
[
|
|
146045
|
-
this.statCache.set(this.absolute, t2), this.stat = t2, t2.isFile() || (t2.size = 0), this.type =
|
|
146114
|
+
[si](t2) {
|
|
146115
|
+
this.statCache.set(this.absolute, t2), this.stat = t2, t2.isFile() || (t2.size = 0), this.type = Gn(t2), this.emit("stat", t2), this[tr]();
|
|
146046
146116
|
}
|
|
146047
|
-
[
|
|
146117
|
+
[tr]() {
|
|
146048
146118
|
switch (this.type) {
|
|
146049
146119
|
case "File":
|
|
146050
|
-
return this[
|
|
146120
|
+
return this[er]();
|
|
146051
146121
|
case "Directory":
|
|
146052
|
-
return this[
|
|
146122
|
+
return this[ir]();
|
|
146053
146123
|
case "SymbolicLink":
|
|
146054
|
-
return this[
|
|
146124
|
+
return this[is]();
|
|
146055
146125
|
default:
|
|
146056
146126
|
return this.end();
|
|
146057
146127
|
}
|
|
146058
146128
|
}
|
|
146059
|
-
[
|
|
146060
|
-
return
|
|
146129
|
+
[ri](t2) {
|
|
146130
|
+
return Ji(t2, this.type === "Directory", this.portable);
|
|
146061
146131
|
}
|
|
146062
|
-
[
|
|
146063
|
-
return
|
|
146132
|
+
[q](t2) {
|
|
146133
|
+
return rr(t2, this.prefix);
|
|
146064
146134
|
}
|
|
146065
|
-
[
|
|
146135
|
+
[fe]() {
|
|
146066
146136
|
if (!this.stat) throw new Error("cannot write header before stat");
|
|
146067
|
-
this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new
|
|
146137
|
+
this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new F2({ path: this[q](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[q](this.linkpath) : this.linkpath, mode: this[ri](this.stat.mode), uid: this.portable ? void 0 : this.stat.uid, gid: this.portable ? void 0 : this.stat.gid, size: this.stat.size, mtime: this.noMtime ? void 0 : this.mtime || this.stat.mtime, type: this.type === "Unsupported" ? void 0 : this.type, uname: this.portable ? void 0 : this.stat.uid === this.myuid ? this.myuser : "", atime: this.portable ? void 0 : this.stat.atime, ctime: this.portable ? void 0 : this.stat.ctime }), this.header.encode() && !this.noPax && super.write(new ft({ atime: this.portable ? void 0 : this.header.atime, ctime: this.portable ? void 0 : this.header.ctime, gid: this.portable ? void 0 : this.header.gid, mtime: this.noMtime ? void 0 : this.mtime || this.header.mtime, path: this[q](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[q](this.linkpath) : this.linkpath, size: this.header.size, uid: this.portable ? void 0 : this.header.uid, uname: this.portable ? void 0 : this.header.uname, dev: this.portable ? void 0 : this.stat.dev, ino: this.portable ? void 0 : this.stat.ino, nlink: this.portable ? void 0 : this.stat.nlink }).encode());
|
|
146068
146138
|
let t2 = this.header?.block;
|
|
146069
146139
|
if (!t2) throw new Error("failed to encode header");
|
|
146070
146140
|
super.write(t2);
|
|
146071
146141
|
}
|
|
146072
|
-
[
|
|
146142
|
+
[ir]() {
|
|
146073
146143
|
if (!this.stat) throw new Error("cannot create directory entry without stat");
|
|
146074
|
-
this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[
|
|
146144
|
+
this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[fe](), this.end();
|
|
146075
146145
|
}
|
|
146076
|
-
[
|
|
146146
|
+
[is]() {
|
|
146077
146147
|
import_fs26.default.readlink(this.absolute, (t2, e) => {
|
|
146078
146148
|
if (t2) return this.emit("error", t2);
|
|
146079
|
-
this[
|
|
146149
|
+
this[ns](e);
|
|
146080
146150
|
});
|
|
146081
146151
|
}
|
|
146082
|
-
[
|
|
146083
|
-
this.linkpath = f(t2), this[
|
|
146152
|
+
[ns](t2) {
|
|
146153
|
+
this.linkpath = f(t2), this[fe](), this.end();
|
|
146084
146154
|
}
|
|
146085
|
-
[
|
|
146155
|
+
[sr](t2) {
|
|
146086
146156
|
if (!this.stat) throw new Error("cannot create link entry without stat");
|
|
146087
|
-
this.type = "Link", this.linkpath = f(import_path21.default.relative(this.cwd, t2)), this.stat.size = 0, this[
|
|
146157
|
+
this.type = "Link", this.linkpath = f(import_path21.default.relative(this.cwd, t2)), this.stat.size = 0, this[fe](), this.end();
|
|
146088
146158
|
}
|
|
146089
|
-
[
|
|
146159
|
+
[er]() {
|
|
146090
146160
|
if (!this.stat) throw new Error("cannot create file entry without stat");
|
|
146091
146161
|
if (this.stat.nlink > 1) {
|
|
146092
146162
|
let t2 = `${this.stat.dev}:${this.stat.ino}`, e = this.linkCache.get(t2);
|
|
146093
|
-
if (e?.indexOf(this.cwd) === 0) return this[
|
|
146163
|
+
if (e?.indexOf(this.cwd) === 0) return this[sr](e);
|
|
146094
146164
|
this.linkCache.set(t2, this.absolute);
|
|
146095
146165
|
}
|
|
146096
|
-
if (this[
|
|
146097
|
-
this[
|
|
146166
|
+
if (this[fe](), this.stat.size === 0) return this.end();
|
|
146167
|
+
this[os]();
|
|
146098
146168
|
}
|
|
146099
|
-
[
|
|
146169
|
+
[os]() {
|
|
146100
146170
|
import_fs26.default.open(this.absolute, "r", (t2, e) => {
|
|
146101
146171
|
if (t2) return this.emit("error", t2);
|
|
146102
|
-
this[
|
|
146172
|
+
this[hs](e);
|
|
146103
146173
|
});
|
|
146104
146174
|
}
|
|
146105
|
-
[
|
|
146175
|
+
[hs](t2) {
|
|
146106
146176
|
if (this.fd = t2, this.#t) return this[pt]();
|
|
146107
146177
|
if (!this.stat) throw new Error("should stat before calling onopenfile");
|
|
146108
146178
|
this.blockLen = 512 * Math.ceil(this.stat.size / 512), this.blockRemain = this.blockLen;
|
|
146109
146179
|
let e = Math.min(this.blockLen, this.maxReadSize);
|
|
146110
|
-
this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[
|
|
146180
|
+
this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[ii]();
|
|
146111
146181
|
}
|
|
146112
|
-
[
|
|
146182
|
+
[ii]() {
|
|
146113
146183
|
let { fd: t2, buf: e, offset: i, length: r, pos: n } = this;
|
|
146114
146184
|
if (t2 === void 0 || e === void 0) throw new Error("cannot read file without first opening");
|
|
146115
|
-
import_fs26.default.read(t2, e, i, r, n, (o,
|
|
146185
|
+
import_fs26.default.read(t2, e, i, r, n, (o, h) => {
|
|
146116
146186
|
if (o) return this[pt](() => this.emit("error", o));
|
|
146117
|
-
this[
|
|
146187
|
+
this[rs](h);
|
|
146118
146188
|
});
|
|
146119
146189
|
}
|
|
146120
146190
|
[pt](t2 = () => {
|
|
146121
146191
|
}) {
|
|
146122
146192
|
this.fd !== void 0 && import_fs26.default.close(this.fd, t2);
|
|
146123
146193
|
}
|
|
146124
|
-
[
|
|
146194
|
+
[rs](t2) {
|
|
146125
146195
|
if (t2 <= 0 && this.remain > 0) {
|
|
146126
146196
|
let r = Object.assign(new Error("encountered unexpected EOF"), { path: this.absolute, syscall: "read", code: "EOF" });
|
|
146127
146197
|
return this[pt](() => this.emit("error", r));
|
|
@@ -146133,9 +146203,9 @@ var fe = class extends A {
|
|
|
146133
146203
|
if (!this.buf) throw new Error("should have created buffer prior to reading");
|
|
146134
146204
|
if (t2 === this.remain) for (let r = t2; r < this.length && t2 < this.blockRemain; r++) this.buf[r + this.offset] = 0, t2++, this.remain++;
|
|
146135
146205
|
let e = this.offset === 0 && t2 === this.buf.length ? this.buf : this.buf.subarray(this.offset, this.offset + t2);
|
|
146136
|
-
this.write(e) ? this[
|
|
146206
|
+
this.write(e) ? this[es]() : this[as](() => this[es]());
|
|
146137
146207
|
}
|
|
146138
|
-
[
|
|
146208
|
+
[as](t2) {
|
|
146139
146209
|
this.once("drain", t2);
|
|
146140
146210
|
}
|
|
146141
146211
|
write(t2, e, i) {
|
|
@@ -146145,30 +146215,30 @@ var fe = class extends A {
|
|
|
146145
146215
|
}
|
|
146146
146216
|
return this.remain -= t2.length, this.blockRemain -= t2.length, this.pos += t2.length, this.offset += t2.length, super.write(t2, null, i);
|
|
146147
146217
|
}
|
|
146148
|
-
[
|
|
146218
|
+
[es]() {
|
|
146149
146219
|
if (!this.remain) return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), this[pt]((t2) => t2 ? this.emit("error", t2) : this.end());
|
|
146150
146220
|
if (!this.buf) throw new Error("buffer lost somehow in ONDRAIN");
|
|
146151
|
-
this.offset >= this.length && (this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)), this.offset = 0), this.length = this.buf.length - this.offset, this[
|
|
146221
|
+
this.offset >= this.length && (this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)), this.offset = 0), this.length = this.buf.length - this.offset, this[ii]();
|
|
146152
146222
|
}
|
|
146153
146223
|
};
|
|
146154
|
-
var
|
|
146224
|
+
var ni = class extends de {
|
|
146155
146225
|
sync = true;
|
|
146156
|
-
[
|
|
146157
|
-
this[
|
|
146226
|
+
[ss]() {
|
|
146227
|
+
this[si](import_fs26.default.lstatSync(this.absolute));
|
|
146158
146228
|
}
|
|
146159
|
-
[
|
|
146160
|
-
this[
|
|
146229
|
+
[is]() {
|
|
146230
|
+
this[ns](import_fs26.default.readlinkSync(this.absolute));
|
|
146161
146231
|
}
|
|
146162
|
-
[
|
|
146163
|
-
this[
|
|
146232
|
+
[os]() {
|
|
146233
|
+
this[hs](import_fs26.default.openSync(this.absolute, "r"));
|
|
146164
146234
|
}
|
|
146165
|
-
[
|
|
146235
|
+
[ii]() {
|
|
146166
146236
|
let t2 = true;
|
|
146167
146237
|
try {
|
|
146168
146238
|
let { fd: e, buf: i, offset: r, length: n, pos: o } = this;
|
|
146169
146239
|
if (e === void 0 || i === void 0) throw new Error("fd and buf must be set in READ method");
|
|
146170
|
-
let
|
|
146171
|
-
this[
|
|
146240
|
+
let h = import_fs26.default.readSync(e, i, r, n, o);
|
|
146241
|
+
this[rs](h), t2 = false;
|
|
146172
146242
|
} finally {
|
|
146173
146243
|
if (t2) try {
|
|
146174
146244
|
this[pt](() => {
|
|
@@ -146177,7 +146247,7 @@ var ri = class extends fe {
|
|
|
146177
146247
|
}
|
|
146178
146248
|
}
|
|
146179
146249
|
}
|
|
146180
|
-
[
|
|
146250
|
+
[as](t2) {
|
|
146181
146251
|
t2();
|
|
146182
146252
|
}
|
|
146183
146253
|
[pt](t2 = () => {
|
|
@@ -146185,7 +146255,7 @@ var ri = class extends fe {
|
|
|
146185
146255
|
this.fd !== void 0 && import_fs26.default.closeSync(this.fd), t2();
|
|
146186
146256
|
}
|
|
146187
146257
|
};
|
|
146188
|
-
var
|
|
146258
|
+
var oi = class extends A {
|
|
146189
146259
|
blockLen = 0;
|
|
146190
146260
|
blockRemain = 0;
|
|
146191
146261
|
buf = 0;
|
|
@@ -146214,29 +146284,29 @@ var ni = class extends A {
|
|
|
146214
146284
|
size;
|
|
146215
146285
|
onWriteEntry;
|
|
146216
146286
|
warn(t2, e, i = {}) {
|
|
146217
|
-
return
|
|
146287
|
+
return Dt(this, t2, e, i);
|
|
146218
146288
|
}
|
|
146219
146289
|
constructor(t2, e = {}) {
|
|
146220
146290
|
let i = se(e);
|
|
146221
146291
|
super(), this.preservePaths = !!i.preservePaths, this.portable = !!i.portable, this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.onWriteEntry = i.onWriteEntry, this.readEntry = t2;
|
|
146222
146292
|
let { type: r } = t2;
|
|
146223
146293
|
if (r === "Unsupported") throw new Error("writing entry that should be ignored");
|
|
146224
|
-
this.type = r, this.type === "Directory" && this.portable && (this.noMtime = true), this.prefix = i.prefix, this.path = f(t2.path), this.mode = t2.mode !== void 0 ? this[
|
|
146294
|
+
this.type = r, this.type === "Directory" && this.portable && (this.noMtime = true), this.prefix = i.prefix, this.path = f(t2.path), this.mode = t2.mode !== void 0 ? this[ri](t2.mode) : void 0, this.uid = this.portable ? void 0 : t2.uid, this.gid = this.portable ? void 0 : t2.gid, this.uname = this.portable ? void 0 : t2.uname, this.gname = this.portable ? void 0 : t2.gname, this.size = t2.size, this.mtime = this.noMtime ? void 0 : i.mtime || t2.mtime, this.atime = this.portable ? void 0 : t2.atime, this.ctime = this.portable ? void 0 : t2.ctime, this.linkpath = t2.linkpath !== void 0 ? f(t2.linkpath) : void 0, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
|
|
146225
146295
|
let n = false;
|
|
146226
146296
|
if (!this.preservePaths) {
|
|
146227
|
-
let [
|
|
146228
|
-
|
|
146297
|
+
let [h, a] = ce(this.path);
|
|
146298
|
+
h && typeof a == "string" && (this.path = a, n = h);
|
|
146229
146299
|
}
|
|
146230
|
-
this.remain = t2.size, this.blockRemain = t2.startBlockSize, this.onWriteEntry?.(this), this.header = new
|
|
146300
|
+
this.remain = t2.size, this.blockRemain = t2.startBlockSize, this.onWriteEntry?.(this), this.header = new F2({ path: this[q](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[q](this.linkpath) : this.linkpath, mode: this.mode, uid: this.portable ? void 0 : this.uid, gid: this.portable ? void 0 : this.gid, size: this.size, mtime: this.noMtime ? void 0 : this.mtime, type: this.type, uname: this.portable ? void 0 : this.uname, atime: this.portable ? void 0 : this.atime, ctime: this.portable ? void 0 : this.ctime }), n && this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute path`, { entry: this, path: n + this.path }), this.header.encode() && !this.noPax && super.write(new ft({ atime: this.portable ? void 0 : this.atime, ctime: this.portable ? void 0 : this.ctime, gid: this.portable ? void 0 : this.gid, mtime: this.noMtime ? void 0 : this.mtime, path: this[q](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[q](this.linkpath) : this.linkpath, size: this.size, uid: this.portable ? void 0 : this.uid, uname: this.portable ? void 0 : this.uname, dev: this.portable ? void 0 : this.readEntry.dev, ino: this.portable ? void 0 : this.readEntry.ino, nlink: this.portable ? void 0 : this.readEntry.nlink }).encode());
|
|
146231
146301
|
let o = this.header?.block;
|
|
146232
146302
|
if (!o) throw new Error("failed to encode header");
|
|
146233
146303
|
super.write(o), t2.pipe(this);
|
|
146234
146304
|
}
|
|
146235
|
-
[
|
|
146236
|
-
return
|
|
146305
|
+
[q](t2) {
|
|
146306
|
+
return rr(t2, this.prefix);
|
|
146237
146307
|
}
|
|
146238
|
-
[
|
|
146239
|
-
return
|
|
146308
|
+
[ri](t2) {
|
|
146309
|
+
return Ji(t2, this.type === "Directory", this.portable);
|
|
146240
146310
|
}
|
|
146241
146311
|
write(t2, e, i) {
|
|
146242
146312
|
typeof e == "function" && (i = e, e = void 0), typeof t2 == "string" && (t2 = Buffer.from(t2, typeof e == "string" ? e : "utf8"));
|
|
@@ -146248,8 +146318,8 @@ var ni = class extends A {
|
|
|
146248
146318
|
return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), typeof t2 == "function" && (i = t2, e = void 0, t2 = void 0), typeof e == "function" && (i = e, e = void 0), typeof t2 == "string" && (t2 = Buffer.from(t2, e ?? "utf8")), i && this.once("finish", i), t2 ? super.end(t2, i) : super.end(i), this;
|
|
146249
146319
|
}
|
|
146250
146320
|
};
|
|
146251
|
-
var
|
|
146252
|
-
var
|
|
146321
|
+
var Gn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
|
|
146322
|
+
var hi = class s2 {
|
|
146253
146323
|
tail;
|
|
146254
146324
|
head;
|
|
146255
146325
|
length = 0;
|
|
@@ -146280,11 +146350,11 @@ var oi = class s2 {
|
|
|
146280
146350
|
t2.list = this, t2.prev = e, e && (e.next = t2), this.tail = t2, this.head || (this.head = t2), this.length++;
|
|
146281
146351
|
}
|
|
146282
146352
|
push(...t2) {
|
|
146283
|
-
for (let e = 0, i = t2.length; e < i; e++)
|
|
146353
|
+
for (let e = 0, i = t2.length; e < i; e++) Yn(this, t2[e]);
|
|
146284
146354
|
return this.length;
|
|
146285
146355
|
}
|
|
146286
146356
|
unshift(...t2) {
|
|
146287
|
-
for (var e = 0, i = t2.length; e < i; e++)
|
|
146357
|
+
for (var e = 0, i = t2.length; e < i; e++) Kn(this, t2[e]);
|
|
146288
146358
|
return this.length;
|
|
146289
146359
|
}
|
|
146290
146360
|
pop() {
|
|
@@ -146380,7 +146450,7 @@ var oi = class s2 {
|
|
|
146380
146450
|
let n = [];
|
|
146381
146451
|
for (let o = 0; r && o < e; o++) n.push(r.value), r = this.removeNode(r);
|
|
146382
146452
|
r ? r !== this.tail && (r = r.prev) : r = this.tail;
|
|
146383
|
-
for (let o of i) r =
|
|
146453
|
+
for (let o of i) r = Zn(this, r, o);
|
|
146384
146454
|
return n;
|
|
146385
146455
|
}
|
|
146386
146456
|
reverse() {
|
|
@@ -146392,17 +146462,17 @@ var oi = class s2 {
|
|
|
146392
146462
|
return this.head = e, this.tail = t2, this;
|
|
146393
146463
|
}
|
|
146394
146464
|
};
|
|
146395
|
-
function
|
|
146396
|
-
let i = t2, r = t2 ? t2.next : s3.head, n = new
|
|
146465
|
+
function Zn(s3, t2, e) {
|
|
146466
|
+
let i = t2, r = t2 ? t2.next : s3.head, n = new me(e, i, r, s3);
|
|
146397
146467
|
return n.next === void 0 && (s3.tail = n), n.prev === void 0 && (s3.head = n), s3.length++, n;
|
|
146398
146468
|
}
|
|
146399
|
-
function
|
|
146400
|
-
s3.tail = new
|
|
146469
|
+
function Yn(s3, t2) {
|
|
146470
|
+
s3.tail = new me(t2, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
|
|
146401
146471
|
}
|
|
146402
|
-
function
|
|
146403
|
-
s3.head = new
|
|
146472
|
+
function Kn(s3, t2) {
|
|
146473
|
+
s3.head = new me(t2, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
|
|
146404
146474
|
}
|
|
146405
|
-
var
|
|
146475
|
+
var me = class {
|
|
146406
146476
|
list;
|
|
146407
146477
|
next;
|
|
146408
146478
|
prev;
|
|
@@ -146411,7 +146481,7 @@ var de = class {
|
|
|
146411
146481
|
this.list = r, this.value = t2, e ? (e.next = this, this.prev = e) : this.prev = void 0, i ? (i.prev = this, this.next = i) : this.next = void 0;
|
|
146412
146482
|
}
|
|
146413
146483
|
};
|
|
146414
|
-
var
|
|
146484
|
+
var pi = class {
|
|
146415
146485
|
path;
|
|
146416
146486
|
absolute;
|
|
146417
146487
|
entry;
|
|
@@ -146425,28 +146495,28 @@ var mi = class {
|
|
|
146425
146495
|
this.path = t2 || "./", this.absolute = e;
|
|
146426
146496
|
}
|
|
146427
146497
|
};
|
|
146428
|
-
var
|
|
146429
|
-
var
|
|
146498
|
+
var nr = Buffer.alloc(1024);
|
|
146499
|
+
var li = /* @__PURE__ */ Symbol("onStat");
|
|
146430
146500
|
var ue = /* @__PURE__ */ Symbol("ended");
|
|
146431
146501
|
var W = /* @__PURE__ */ Symbol("queue");
|
|
146432
|
-
var
|
|
146502
|
+
var pe = /* @__PURE__ */ Symbol("pendingLinks");
|
|
146433
146503
|
var Et = /* @__PURE__ */ Symbol("current");
|
|
146434
|
-
var
|
|
146435
|
-
var
|
|
146436
|
-
var
|
|
146504
|
+
var Ft = /* @__PURE__ */ Symbol("process");
|
|
146505
|
+
var Ee = /* @__PURE__ */ Symbol("processing");
|
|
146506
|
+
var ai = /* @__PURE__ */ Symbol("processJob");
|
|
146437
146507
|
var G2 = /* @__PURE__ */ Symbol("jobs");
|
|
146438
|
-
var
|
|
146439
|
-
var
|
|
146440
|
-
var
|
|
146441
|
-
var
|
|
146442
|
-
var
|
|
146443
|
-
var
|
|
146444
|
-
var
|
|
146445
|
-
var
|
|
146446
|
-
var
|
|
146447
|
-
var
|
|
146448
|
-
var
|
|
146449
|
-
var
|
|
146508
|
+
var ls = /* @__PURE__ */ Symbol("jobDone");
|
|
146509
|
+
var ci = /* @__PURE__ */ Symbol("addFSEntry");
|
|
146510
|
+
var or = /* @__PURE__ */ Symbol("addTarEntry");
|
|
146511
|
+
var ds = /* @__PURE__ */ Symbol("stat");
|
|
146512
|
+
var ms = /* @__PURE__ */ Symbol("readdir");
|
|
146513
|
+
var fi = /* @__PURE__ */ Symbol("onreaddir");
|
|
146514
|
+
var di = /* @__PURE__ */ Symbol("pipe");
|
|
146515
|
+
var hr = /* @__PURE__ */ Symbol("entry");
|
|
146516
|
+
var cs = /* @__PURE__ */ Symbol("entryOpt");
|
|
146517
|
+
var mi = /* @__PURE__ */ Symbol("writeEntryClass");
|
|
146518
|
+
var lr = /* @__PURE__ */ Symbol("write");
|
|
146519
|
+
var fs2 = /* @__PURE__ */ Symbol("ondrain");
|
|
146450
146520
|
var wt = class extends A {
|
|
146451
146521
|
sync = false;
|
|
146452
146522
|
opt;
|
|
@@ -146468,139 +146538,139 @@ var wt = class extends A {
|
|
|
146468
146538
|
mtime;
|
|
146469
146539
|
filter;
|
|
146470
146540
|
jobs;
|
|
146471
|
-
[
|
|
146541
|
+
[mi];
|
|
146472
146542
|
onWriteEntry;
|
|
146473
146543
|
[W];
|
|
146474
|
-
[
|
|
146544
|
+
[pe] = /* @__PURE__ */ new Map();
|
|
146475
146545
|
[G2] = 0;
|
|
146476
|
-
[
|
|
146546
|
+
[Ee] = false;
|
|
146477
146547
|
[ue] = false;
|
|
146478
146548
|
constructor(t2 = {}) {
|
|
146479
|
-
if (super(), this.opt = t2, this.file = t2.file || "", this.cwd = t2.cwd || process.cwd(), this.maxReadSize = t2.maxReadSize, this.preservePaths = !!t2.preservePaths, this.strict = !!t2.strict, this.noPax = !!t2.noPax, this.prefix = f(t2.prefix || ""), this.linkCache = t2.linkCache || /* @__PURE__ */ new Map(), this.statCache = t2.statCache || /* @__PURE__ */ new Map(), this.readdirCache = t2.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = t2.onWriteEntry, this[
|
|
146549
|
+
if (super(), this.opt = t2, this.file = t2.file || "", this.cwd = t2.cwd || process.cwd(), this.maxReadSize = t2.maxReadSize, this.preservePaths = !!t2.preservePaths, this.strict = !!t2.strict, this.noPax = !!t2.noPax, this.prefix = f(t2.prefix || ""), this.linkCache = t2.linkCache || /* @__PURE__ */ new Map(), this.statCache = t2.statCache || /* @__PURE__ */ new Map(), this.readdirCache = t2.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = t2.onWriteEntry, this[mi] = de, typeof t2.onwarn == "function" && this.on("warn", t2.onwarn), this.portable = !!t2.portable, t2.gzip || t2.brotli || t2.zstd) {
|
|
146480
146550
|
if ((t2.gzip ? 1 : 0) + (t2.brotli ? 1 : 0) + (t2.zstd ? 1 : 0) > 1) throw new TypeError("gzip, brotli, zstd are mutually exclusive");
|
|
146481
|
-
if (t2.gzip && (typeof t2.gzip != "object" && (t2.gzip = {}), this.portable && (t2.gzip.portable = true), this.zip = new
|
|
146551
|
+
if (t2.gzip && (typeof t2.gzip != "object" && (t2.gzip = {}), this.portable && (t2.gzip.portable = true), this.zip = new ze(t2.gzip)), t2.brotli && (typeof t2.brotli != "object" && (t2.brotli = {}), this.zip = new We(t2.brotli)), t2.zstd && (typeof t2.zstd != "object" && (t2.zstd = {}), this.zip = new Ye(t2.zstd)), !this.zip) throw new Error("impossible");
|
|
146482
146552
|
let e = this.zip;
|
|
146483
|
-
e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[
|
|
146484
|
-
} else this.on("drain", this[
|
|
146485
|
-
this.noDirRecurse = !!t2.noDirRecurse, this.follow = !!t2.follow, this.noMtime = !!t2.noMtime, t2.mtime && (this.mtime = t2.mtime), this.filter = typeof t2.filter == "function" ? t2.filter : () => true, this[W] = new
|
|
146553
|
+
e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[fs2]()), this.on("resume", () => e.resume());
|
|
146554
|
+
} else this.on("drain", this[fs2]);
|
|
146555
|
+
this.noDirRecurse = !!t2.noDirRecurse, this.follow = !!t2.follow, this.noMtime = !!t2.noMtime, t2.mtime && (this.mtime = t2.mtime), this.filter = typeof t2.filter == "function" ? t2.filter : () => true, this[W] = new hi(), this[G2] = 0, this.jobs = Number(t2.jobs) || 4, this[Ee] = false, this[ue] = false;
|
|
146486
146556
|
}
|
|
146487
|
-
[
|
|
146557
|
+
[lr](t2) {
|
|
146488
146558
|
return super.write(t2);
|
|
146489
146559
|
}
|
|
146490
146560
|
add(t2) {
|
|
146491
146561
|
return this.write(t2), this;
|
|
146492
146562
|
}
|
|
146493
146563
|
end(t2, e, i) {
|
|
146494
|
-
return typeof t2 == "function" && (i = t2, t2 = void 0), typeof e == "function" && (i = e, e = void 0), t2 && this.add(t2), this[ue] = true, this[
|
|
146564
|
+
return typeof t2 == "function" && (i = t2, t2 = void 0), typeof e == "function" && (i = e, e = void 0), t2 && this.add(t2), this[ue] = true, this[Ft](), i && i(), this;
|
|
146495
146565
|
}
|
|
146496
146566
|
write(t2) {
|
|
146497
146567
|
if (this[ue]) throw new Error("write after end");
|
|
146498
|
-
return typeof t2 == "string" ? this[
|
|
146568
|
+
return typeof t2 == "string" ? this[ci](t2) : this[or](t2), this.flowing;
|
|
146499
146569
|
}
|
|
146500
|
-
[
|
|
146570
|
+
[or](t2) {
|
|
146501
146571
|
let e = f(import_path22.default.resolve(this.cwd, t2.path));
|
|
146502
146572
|
if (!this.filter(t2.path, t2)) t2.resume();
|
|
146503
146573
|
else {
|
|
146504
|
-
let i = new
|
|
146505
|
-
i.entry = new
|
|
146574
|
+
let i = new pi(t2.path, e);
|
|
146575
|
+
i.entry = new oi(t2, this[cs](i)), i.entry.on("end", () => this[ls](i)), this[G2] += 1, this[W].push(i);
|
|
146506
146576
|
}
|
|
146507
|
-
this[
|
|
146577
|
+
this[Ft]();
|
|
146508
146578
|
}
|
|
146509
|
-
[
|
|
146579
|
+
[ci](t2) {
|
|
146510
146580
|
let e = f(import_path22.default.resolve(this.cwd, t2));
|
|
146511
|
-
this[W].push(new
|
|
146581
|
+
this[W].push(new pi(t2, e)), this[Ft]();
|
|
146512
146582
|
}
|
|
146513
|
-
[
|
|
146583
|
+
[ds](t2) {
|
|
146514
146584
|
t2.pending = true, this[G2] += 1;
|
|
146515
146585
|
let e = this.follow ? "stat" : "lstat";
|
|
146516
146586
|
import_fs25.default[e](t2.absolute, (i, r) => {
|
|
146517
|
-
t2.pending = false, this[G2] -= 1, i ? this.emit("error", i) : this[
|
|
146587
|
+
t2.pending = false, this[G2] -= 1, i ? this.emit("error", i) : this[li](t2, r);
|
|
146518
146588
|
});
|
|
146519
146589
|
}
|
|
146520
|
-
[
|
|
146590
|
+
[li](t2, e) {
|
|
146521
146591
|
if (this.statCache.set(t2.absolute, e), t2.stat = e, !this.filter(t2.path, e)) t2.ignore = true;
|
|
146522
|
-
else if (e.isFile() && e.nlink > 1 && !this.linkCache.get(`${e.dev}:${e.ino}`) && !this.sync) if (t2 === this[Et]) this[
|
|
146592
|
+
else if (e.isFile() && e.nlink > 1 && !this.linkCache.get(`${e.dev}:${e.ino}`) && !this.sync) if (t2 === this[Et]) this[ai](t2);
|
|
146523
146593
|
else {
|
|
146524
|
-
let i = `${e.dev}:${e.ino}`, r = this[
|
|
146525
|
-
r ? r.push(t2) : this[
|
|
146594
|
+
let i = `${e.dev}:${e.ino}`, r = this[pe].get(i);
|
|
146595
|
+
r ? r.push(t2) : this[pe].set(i, [t2]), t2.pendingLink = true, t2.pending = true;
|
|
146526
146596
|
}
|
|
146527
|
-
this[
|
|
146597
|
+
this[Ft]();
|
|
146528
146598
|
}
|
|
146529
|
-
[
|
|
146599
|
+
[ms](t2) {
|
|
146530
146600
|
t2.pending = true, this[G2] += 1, import_fs25.default.readdir(t2.absolute, (e, i) => {
|
|
146531
146601
|
if (t2.pending = false, this[G2] -= 1, e) return this.emit("error", e);
|
|
146532
|
-
this[
|
|
146602
|
+
this[fi](t2, i);
|
|
146533
146603
|
});
|
|
146534
146604
|
}
|
|
146535
|
-
[
|
|
146536
|
-
this.readdirCache.set(t2.absolute, e), t2.readdir = e, this[
|
|
146605
|
+
[fi](t2, e) {
|
|
146606
|
+
this.readdirCache.set(t2.absolute, e), t2.readdir = e, this[Ft]();
|
|
146537
146607
|
}
|
|
146538
|
-
[
|
|
146539
|
-
if (!this[
|
|
146540
|
-
this[
|
|
146541
|
-
for (let t2 = this[W].head; t2 && this[G2] < this.jobs; t2 = t2.next) if (this[
|
|
146608
|
+
[Ft]() {
|
|
146609
|
+
if (!this[Ee]) {
|
|
146610
|
+
this[Ee] = true;
|
|
146611
|
+
for (let t2 = this[W].head; t2 && this[G2] < this.jobs; t2 = t2.next) if (this[ai](t2.value), t2.value.ignore) {
|
|
146542
146612
|
let e = t2.next;
|
|
146543
146613
|
this[W].removeNode(t2), t2.next = e;
|
|
146544
146614
|
}
|
|
146545
|
-
this[
|
|
146615
|
+
this[Ee] = false, this[ue] && this[W].length === 0 && this[G2] === 0 && (this.zip ? this.zip.end(nr) : (super.write(nr), super.end()));
|
|
146546
146616
|
}
|
|
146547
146617
|
}
|
|
146548
146618
|
get [Et]() {
|
|
146549
146619
|
return this[W] && this[W].head && this[W].head.value;
|
|
146550
146620
|
}
|
|
146551
|
-
[
|
|
146621
|
+
[ls](t2) {
|
|
146552
146622
|
this[W].shift(), this[G2] -= 1;
|
|
146553
146623
|
let { stat: e } = t2;
|
|
146554
146624
|
if (e && e.isFile() && e.nlink > 1) {
|
|
146555
|
-
let i = `${e.dev}:${e.ino}`, r = this[
|
|
146625
|
+
let i = `${e.dev}:${e.ino}`, r = this[pe].get(i);
|
|
146556
146626
|
if (r) {
|
|
146557
|
-
this[
|
|
146558
|
-
for (let n of r) n.pending = false, this[
|
|
146627
|
+
this[pe].delete(i);
|
|
146628
|
+
for (let n of r) n.pending = false, this[ai](n);
|
|
146559
146629
|
}
|
|
146560
146630
|
}
|
|
146561
|
-
this[
|
|
146631
|
+
this[Ft]();
|
|
146562
146632
|
}
|
|
146563
|
-
[
|
|
146633
|
+
[ai](t2) {
|
|
146564
146634
|
if (t2.pending && t2.pendingLink && t2 === this[Et] && (t2.pending = false, t2.pendingLink = false), !t2.pending) {
|
|
146565
146635
|
if (t2.entry) {
|
|
146566
|
-
t2 === this[Et] && !t2.piped && this[
|
|
146636
|
+
t2 === this[Et] && !t2.piped && this[di](t2);
|
|
146567
146637
|
return;
|
|
146568
146638
|
}
|
|
146569
146639
|
if (!t2.stat) {
|
|
146570
146640
|
let e = this.statCache.get(t2.absolute);
|
|
146571
|
-
e ? this[
|
|
146641
|
+
e ? this[li](t2, e) : this[ds](t2);
|
|
146572
146642
|
}
|
|
146573
146643
|
if (t2.stat && !t2.ignore) {
|
|
146574
146644
|
if (!this.noDirRecurse && t2.stat.isDirectory() && !t2.readdir) {
|
|
146575
146645
|
let e = this.readdirCache.get(t2.absolute);
|
|
146576
|
-
if (e ? this[
|
|
146646
|
+
if (e ? this[fi](t2, e) : this[ms](t2), !t2.readdir) return;
|
|
146577
146647
|
}
|
|
146578
|
-
if (t2.entry = this[
|
|
146648
|
+
if (t2.entry = this[hr](t2), !t2.entry) {
|
|
146579
146649
|
t2.ignore = true;
|
|
146580
146650
|
return;
|
|
146581
146651
|
}
|
|
146582
|
-
t2 === this[Et] && !t2.piped && this[
|
|
146652
|
+
t2 === this[Et] && !t2.piped && this[di](t2);
|
|
146583
146653
|
}
|
|
146584
146654
|
}
|
|
146585
146655
|
}
|
|
146586
|
-
[
|
|
146656
|
+
[cs](t2) {
|
|
146587
146657
|
return { onwarn: (e, i, r) => this.warn(e, i, r), noPax: this.noPax, cwd: this.cwd, absolute: t2.absolute, preservePaths: this.preservePaths, maxReadSize: this.maxReadSize, strict: this.strict, portable: this.portable, linkCache: this.linkCache, statCache: this.statCache, noMtime: this.noMtime, mtime: this.mtime, prefix: this.prefix, onWriteEntry: this.onWriteEntry };
|
|
146588
146658
|
}
|
|
146589
|
-
[
|
|
146659
|
+
[hr](t2) {
|
|
146590
146660
|
this[G2] += 1;
|
|
146591
146661
|
try {
|
|
146592
|
-
return new this[
|
|
146662
|
+
return new this[mi](t2.path, this[cs](t2)).on("end", () => this[ls](t2)).on("error", (i) => this.emit("error", i));
|
|
146593
146663
|
} catch (e) {
|
|
146594
146664
|
this.emit("error", e);
|
|
146595
146665
|
}
|
|
146596
146666
|
}
|
|
146597
|
-
[
|
|
146667
|
+
[fs2]() {
|
|
146598
146668
|
this[Et] && this[Et].entry && this[Et].entry.resume();
|
|
146599
146669
|
}
|
|
146600
|
-
[
|
|
146670
|
+
[di](t2) {
|
|
146601
146671
|
t2.piped = true, t2.readdir && t2.readdir.forEach((r) => {
|
|
146602
146672
|
let n = t2.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
|
|
146603
|
-
this[
|
|
146673
|
+
this[ci](o + r);
|
|
146604
146674
|
});
|
|
146605
146675
|
let e = t2.entry, i = this.zip;
|
|
146606
146676
|
if (!e) throw new Error("cannot pipe without source");
|
|
@@ -146614,137 +146684,137 @@ var wt = class extends A {
|
|
|
146614
146684
|
return this.zip && this.zip.pause(), super.pause();
|
|
146615
146685
|
}
|
|
146616
146686
|
warn(t2, e, i = {}) {
|
|
146617
|
-
|
|
146687
|
+
Dt(this, t2, e, i);
|
|
146618
146688
|
}
|
|
146619
146689
|
};
|
|
146620
146690
|
var kt = class extends wt {
|
|
146621
146691
|
sync = true;
|
|
146622
146692
|
constructor(t2) {
|
|
146623
|
-
super(t2), this[
|
|
146693
|
+
super(t2), this[mi] = ni;
|
|
146624
146694
|
}
|
|
146625
146695
|
pause() {
|
|
146626
146696
|
}
|
|
146627
146697
|
resume() {
|
|
146628
146698
|
}
|
|
146629
|
-
[
|
|
146699
|
+
[ds](t2) {
|
|
146630
146700
|
let e = this.follow ? "statSync" : "lstatSync";
|
|
146631
|
-
this[
|
|
146701
|
+
this[li](t2, import_fs25.default[e](t2.absolute));
|
|
146632
146702
|
}
|
|
146633
|
-
[
|
|
146634
|
-
this[
|
|
146703
|
+
[ms](t2) {
|
|
146704
|
+
this[fi](t2, import_fs25.default.readdirSync(t2.absolute));
|
|
146635
146705
|
}
|
|
146636
|
-
[
|
|
146706
|
+
[di](t2) {
|
|
146637
146707
|
let e = t2.entry, i = this.zip;
|
|
146638
146708
|
if (t2.readdir && t2.readdir.forEach((r) => {
|
|
146639
146709
|
let n = t2.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
|
|
146640
|
-
this[
|
|
146710
|
+
this[ci](o + r);
|
|
146641
146711
|
}), !e) throw new Error("Cannot pipe without source");
|
|
146642
146712
|
i ? e.on("data", (r) => {
|
|
146643
146713
|
i.write(r);
|
|
146644
146714
|
}) : e.on("data", (r) => {
|
|
146645
|
-
super[
|
|
146715
|
+
super[lr](r);
|
|
146646
146716
|
});
|
|
146647
146717
|
}
|
|
146648
146718
|
};
|
|
146649
|
-
var
|
|
146719
|
+
var Vn = (s3, t2) => {
|
|
146650
146720
|
let e = new kt(s3), i = new Wt(s3.file, { mode: s3.mode || 438 });
|
|
146651
|
-
e.pipe(i),
|
|
146721
|
+
e.pipe(i), fr(e, t2);
|
|
146652
146722
|
};
|
|
146653
|
-
var
|
|
146654
|
-
let e = new wt(s3), i = new
|
|
146723
|
+
var $n = (s3, t2) => {
|
|
146724
|
+
let e = new wt(s3), i = new et(s3.file, { mode: s3.mode || 438 });
|
|
146655
146725
|
e.pipe(i);
|
|
146656
146726
|
let r = new Promise((n, o) => {
|
|
146657
146727
|
i.on("error", o), i.on("close", n), e.on("error", o);
|
|
146658
146728
|
});
|
|
146659
|
-
return
|
|
146729
|
+
return dr(e, t2).catch((n) => e.emit("error", n)), r;
|
|
146660
146730
|
};
|
|
146661
|
-
var
|
|
146731
|
+
var fr = (s3, t2) => {
|
|
146662
146732
|
t2.forEach((e) => {
|
|
146663
|
-
e.charAt(0) === "@" ?
|
|
146733
|
+
e.charAt(0) === "@" ? Ct({ file: import_node_path12.default.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
|
|
146664
146734
|
}), s3.end();
|
|
146665
146735
|
};
|
|
146666
|
-
var
|
|
146667
|
-
for (let e of t2) e.charAt(0) === "@" ? await
|
|
146736
|
+
var dr = async (s3, t2) => {
|
|
146737
|
+
for (let e of t2) e.charAt(0) === "@" ? await Ct({ file: import_node_path12.default.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => {
|
|
146668
146738
|
s3.add(i);
|
|
146669
146739
|
} }) : s3.add(e);
|
|
146670
146740
|
s3.end();
|
|
146671
146741
|
};
|
|
146672
|
-
var
|
|
146742
|
+
var Xn = (s3, t2) => {
|
|
146673
146743
|
let e = new kt(s3);
|
|
146674
|
-
return
|
|
146744
|
+
return fr(e, t2), e;
|
|
146675
146745
|
};
|
|
146676
|
-
var
|
|
146746
|
+
var qn = (s3, t2) => {
|
|
146677
146747
|
let e = new wt(s3);
|
|
146678
|
-
return
|
|
146748
|
+
return dr(e, t2).catch((i) => e.emit("error", i)), e;
|
|
146679
146749
|
};
|
|
146680
|
-
var
|
|
146750
|
+
var Qn = K2(Vn, $n, Xn, qn, (s3, t2) => {
|
|
146681
146751
|
if (!t2?.length) throw new TypeError("no paths specified to add to archive");
|
|
146682
146752
|
});
|
|
146683
|
-
var
|
|
146684
|
-
var
|
|
146685
|
-
var { O_CREAT:
|
|
146686
|
-
var
|
|
146687
|
-
var
|
|
146688
|
-
var
|
|
146689
|
-
var
|
|
146690
|
-
var
|
|
146691
|
-
var
|
|
146692
|
-
var
|
|
146753
|
+
var Jn = process.env.__FAKE_PLATFORM__ || process.platform;
|
|
146754
|
+
var Er = Jn === "win32";
|
|
146755
|
+
var { O_CREAT: wr, O_NOFOLLOW: mr, O_TRUNC: Sr, O_WRONLY: yr } = import_fs27.default.constants;
|
|
146756
|
+
var Rr = Number(process.env.__FAKE_FS_O_FILENAME__) || import_fs27.default.constants.UV_FS_O_FILEMAP || 0;
|
|
146757
|
+
var jn = Er && !!Rr;
|
|
146758
|
+
var to = 512 * 1024;
|
|
146759
|
+
var eo = Rr | Sr | wr | yr;
|
|
146760
|
+
var ur = !Er && typeof mr == "number" ? mr | Sr | wr | yr : null;
|
|
146761
|
+
var us = ur !== null ? () => ur : jn ? (s3) => s3 < to ? eo : "w" : () => "w";
|
|
146762
|
+
var ps = (s3, t2, e) => {
|
|
146693
146763
|
try {
|
|
146694
146764
|
return import_node_fs13.default.lchownSync(s3, t2, e);
|
|
146695
146765
|
} catch (i) {
|
|
146696
146766
|
if (i?.code !== "ENOENT") throw i;
|
|
146697
146767
|
}
|
|
146698
146768
|
};
|
|
146699
|
-
var
|
|
146769
|
+
var Ei = (s3, t2, e, i) => {
|
|
146700
146770
|
import_node_fs13.default.lchown(s3, t2, e, (r) => {
|
|
146701
146771
|
i(r && r?.code !== "ENOENT" ? r : null);
|
|
146702
146772
|
});
|
|
146703
146773
|
};
|
|
146704
|
-
var
|
|
146705
|
-
if (t2.isDirectory())
|
|
146774
|
+
var io = (s3, t2, e, i, r) => {
|
|
146775
|
+
if (t2.isDirectory()) Es(import_node_path17.default.resolve(s3, t2.name), e, i, (n) => {
|
|
146706
146776
|
if (n) return r(n);
|
|
146707
146777
|
let o = import_node_path17.default.resolve(s3, t2.name);
|
|
146708
|
-
|
|
146778
|
+
Ei(o, e, i, r);
|
|
146709
146779
|
});
|
|
146710
146780
|
else {
|
|
146711
146781
|
let n = import_node_path17.default.resolve(s3, t2.name);
|
|
146712
|
-
|
|
146782
|
+
Ei(n, e, i, r);
|
|
146713
146783
|
}
|
|
146714
146784
|
};
|
|
146715
|
-
var
|
|
146785
|
+
var Es = (s3, t2, e, i) => {
|
|
146716
146786
|
import_node_fs13.default.readdir(s3, { withFileTypes: true }, (r, n) => {
|
|
146717
146787
|
if (r) {
|
|
146718
146788
|
if (r.code === "ENOENT") return i();
|
|
146719
146789
|
if (r.code !== "ENOTDIR" && r.code !== "ENOTSUP") return i(r);
|
|
146720
146790
|
}
|
|
146721
|
-
if (r || !n.length) return
|
|
146722
|
-
let o = n.length,
|
|
146723
|
-
if (!
|
|
146724
|
-
if (l) return i(
|
|
146725
|
-
if (--o === 0) return
|
|
146791
|
+
if (r || !n.length) return Ei(s3, t2, e, i);
|
|
146792
|
+
let o = n.length, h = null, a = (l) => {
|
|
146793
|
+
if (!h) {
|
|
146794
|
+
if (l) return i(h = l);
|
|
146795
|
+
if (--o === 0) return Ei(s3, t2, e, i);
|
|
146726
146796
|
}
|
|
146727
146797
|
};
|
|
146728
|
-
for (let l of n)
|
|
146798
|
+
for (let l of n) io(s3, l, t2, e, a);
|
|
146729
146799
|
});
|
|
146730
146800
|
};
|
|
146731
|
-
var
|
|
146732
|
-
t2.isDirectory() &&
|
|
146801
|
+
var so = (s3, t2, e, i) => {
|
|
146802
|
+
t2.isDirectory() && ws(import_node_path17.default.resolve(s3, t2.name), e, i), ps(import_node_path17.default.resolve(s3, t2.name), e, i);
|
|
146733
146803
|
};
|
|
146734
|
-
var
|
|
146804
|
+
var ws = (s3, t2, e) => {
|
|
146735
146805
|
let i;
|
|
146736
146806
|
try {
|
|
146737
146807
|
i = import_node_fs13.default.readdirSync(s3, { withFileTypes: true });
|
|
146738
146808
|
} catch (r) {
|
|
146739
146809
|
let n = r;
|
|
146740
146810
|
if (n?.code === "ENOENT") return;
|
|
146741
|
-
if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return
|
|
146811
|
+
if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return ps(s3, t2, e);
|
|
146742
146812
|
throw n;
|
|
146743
146813
|
}
|
|
146744
|
-
for (let r of i)
|
|
146745
|
-
return
|
|
146814
|
+
for (let r of i) so(s3, r, t2, e);
|
|
146815
|
+
return ps(s3, t2, e);
|
|
146746
146816
|
};
|
|
146747
|
-
var
|
|
146817
|
+
var Se = class extends Error {
|
|
146748
146818
|
path;
|
|
146749
146819
|
code;
|
|
146750
146820
|
syscall = "chdir";
|
|
@@ -146767,97 +146837,97 @@ var St = class extends Error {
|
|
|
146767
146837
|
return "SymlinkError";
|
|
146768
146838
|
}
|
|
146769
146839
|
};
|
|
146770
|
-
var
|
|
146840
|
+
var no = (s3, t2) => {
|
|
146771
146841
|
import_node_fs14.default.stat(s3, (e, i) => {
|
|
146772
|
-
(e || !i.isDirectory()) && (e = new
|
|
146842
|
+
(e || !i.isDirectory()) && (e = new Se(s3, e?.code || "ENOTDIR")), t2(e);
|
|
146773
146843
|
});
|
|
146774
146844
|
};
|
|
146775
|
-
var
|
|
146845
|
+
var gr = (s3, t2, e) => {
|
|
146776
146846
|
s3 = f(s3);
|
|
146777
|
-
let i = t2.umask ?? 18, r = t2.mode | 448, n = (r & i) !== 0, o = t2.uid,
|
|
146778
|
-
E2 ? e(E2) : x2 &&
|
|
146847
|
+
let i = t2.umask ?? 18, r = t2.mode | 448, n = (r & i) !== 0, o = t2.uid, h = t2.gid, a = typeof o == "number" && typeof h == "number" && (o !== t2.processUid || h !== t2.processGid), l = t2.preserve, c = t2.unlink, d = f(t2.cwd), S2 = (E2, x2) => {
|
|
146848
|
+
E2 ? e(E2) : x2 && a ? Es(x2, o, h, (Le) => S2(Le)) : n ? import_node_fs14.default.chmod(s3, r, e) : e();
|
|
146779
146849
|
};
|
|
146780
|
-
if (s3 === d) return
|
|
146850
|
+
if (s3 === d) return no(s3, S2);
|
|
146781
146851
|
if (l) return import_promises16.default.mkdir(s3, { mode: r, recursive: true }).then((E2) => S2(null, E2 ?? void 0), S2);
|
|
146782
|
-
let
|
|
146783
|
-
|
|
146852
|
+
let D2 = f(import_node_path18.default.relative(d, s3)).split("/");
|
|
146853
|
+
Ss(d, D2, r, c, d, void 0, S2);
|
|
146784
146854
|
};
|
|
146785
|
-
var
|
|
146855
|
+
var Ss = (s3, t2, e, i, r, n, o) => {
|
|
146786
146856
|
if (t2.length === 0) return o(null, n);
|
|
146787
|
-
let
|
|
146788
|
-
import_node_fs14.default.mkdir(
|
|
146857
|
+
let h = t2.shift(), a = f(import_node_path18.default.resolve(s3 + "/" + h));
|
|
146858
|
+
import_node_fs14.default.mkdir(a, e, br(a, t2, e, i, r, n, o));
|
|
146789
146859
|
};
|
|
146790
|
-
var
|
|
146791
|
-
|
|
146792
|
-
if (
|
|
146793
|
-
else if (l.isDirectory())
|
|
146860
|
+
var br = (s3, t2, e, i, r, n, o) => (h) => {
|
|
146861
|
+
h ? import_node_fs14.default.lstat(s3, (a, l) => {
|
|
146862
|
+
if (a) a.path = a.path && f(a.path), o(a);
|
|
146863
|
+
else if (l.isDirectory()) Ss(s3, t2, e, i, r, n, o);
|
|
146794
146864
|
else if (i) import_node_fs14.default.unlink(s3, (c) => {
|
|
146795
146865
|
if (c) return o(c);
|
|
146796
|
-
import_node_fs14.default.mkdir(s3, e,
|
|
146866
|
+
import_node_fs14.default.mkdir(s3, e, br(s3, t2, e, i, r, n, o));
|
|
146797
146867
|
});
|
|
146798
146868
|
else {
|
|
146799
146869
|
if (l.isSymbolicLink()) return o(new St(s3, s3 + "/" + t2.join("/")));
|
|
146800
|
-
o(
|
|
146870
|
+
o(h);
|
|
146801
146871
|
}
|
|
146802
|
-
}) : (n = n || s3,
|
|
146872
|
+
}) : (n = n || s3, Ss(s3, t2, e, i, r, n, o));
|
|
146803
146873
|
};
|
|
146804
|
-
var
|
|
146874
|
+
var oo = (s3) => {
|
|
146805
146875
|
let t2 = false, e;
|
|
146806
146876
|
try {
|
|
146807
146877
|
t2 = import_node_fs14.default.statSync(s3).isDirectory();
|
|
146808
146878
|
} catch (i) {
|
|
146809
146879
|
e = i?.code;
|
|
146810
146880
|
} finally {
|
|
146811
|
-
if (!t2) throw new
|
|
146881
|
+
if (!t2) throw new Se(s3, e ?? "ENOTDIR");
|
|
146812
146882
|
}
|
|
146813
146883
|
};
|
|
146814
|
-
var
|
|
146884
|
+
var _r = (s3, t2) => {
|
|
146815
146885
|
s3 = f(s3);
|
|
146816
|
-
let e = t2.umask ?? 18, i = t2.mode | 448, r = (i & e) !== 0, n = t2.uid, o = t2.gid,
|
|
146817
|
-
E2 &&
|
|
146886
|
+
let e = t2.umask ?? 18, i = t2.mode | 448, r = (i & e) !== 0, n = t2.uid, o = t2.gid, h = typeof n == "number" && typeof o == "number" && (n !== t2.processUid || o !== t2.processGid), a = t2.preserve, l = t2.unlink, c = f(t2.cwd), d = (E2) => {
|
|
146887
|
+
E2 && h && ws(E2, n, o), r && import_node_fs14.default.chmodSync(s3, i);
|
|
146818
146888
|
};
|
|
146819
|
-
if (s3 === c) return
|
|
146820
|
-
if (
|
|
146821
|
-
let T2 = f(import_node_path18.default.relative(c, s3)).split("/"),
|
|
146889
|
+
if (s3 === c) return oo(c), d();
|
|
146890
|
+
if (a) return d(import_node_fs14.default.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
|
|
146891
|
+
let T2 = f(import_node_path18.default.relative(c, s3)).split("/"), D2;
|
|
146822
146892
|
for (let E2 = T2.shift(), x2 = c; E2 && (x2 += "/" + E2); E2 = T2.shift()) {
|
|
146823
146893
|
x2 = f(import_node_path18.default.resolve(x2));
|
|
146824
146894
|
try {
|
|
146825
|
-
import_node_fs14.default.mkdirSync(x2, i),
|
|
146895
|
+
import_node_fs14.default.mkdirSync(x2, i), D2 = D2 || x2;
|
|
146826
146896
|
} catch {
|
|
146827
|
-
let
|
|
146828
|
-
if (
|
|
146897
|
+
let Le = import_node_fs14.default.lstatSync(x2);
|
|
146898
|
+
if (Le.isDirectory()) continue;
|
|
146829
146899
|
if (l) {
|
|
146830
|
-
import_node_fs14.default.unlinkSync(x2), import_node_fs14.default.mkdirSync(x2, i),
|
|
146900
|
+
import_node_fs14.default.unlinkSync(x2), import_node_fs14.default.mkdirSync(x2, i), D2 = D2 || x2;
|
|
146831
146901
|
continue;
|
|
146832
|
-
} else if (
|
|
146902
|
+
} else if (Le.isSymbolicLink()) return new St(x2, x2 + "/" + T2.join("/"));
|
|
146833
146903
|
}
|
|
146834
146904
|
}
|
|
146835
|
-
return d(
|
|
146905
|
+
return d(D2);
|
|
146836
146906
|
};
|
|
146837
|
-
var
|
|
146838
|
-
var
|
|
146907
|
+
var ys = /* @__PURE__ */ Object.create(null);
|
|
146908
|
+
var Or = 1e4;
|
|
146839
146909
|
var Vt = /* @__PURE__ */ new Set();
|
|
146840
|
-
var
|
|
146841
|
-
Vt.has(s3) ? Vt.delete(s3) :
|
|
146842
|
-
let t2 =
|
|
146843
|
-
if (e >
|
|
146844
|
-
for (let i of Vt) if (Vt.delete(i), delete
|
|
146910
|
+
var Tr = (s3) => {
|
|
146911
|
+
Vt.has(s3) ? Vt.delete(s3) : ys[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), Vt.add(s3);
|
|
146912
|
+
let t2 = ys[s3], e = Vt.size - Or;
|
|
146913
|
+
if (e > Or / 10) {
|
|
146914
|
+
for (let i of Vt) if (Vt.delete(i), delete ys[i], --e <= 0) break;
|
|
146845
146915
|
}
|
|
146846
146916
|
return t2;
|
|
146847
146917
|
};
|
|
146848
|
-
var
|
|
146849
|
-
var
|
|
146850
|
-
var
|
|
146918
|
+
var ho = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
146919
|
+
var ao = ho === "win32";
|
|
146920
|
+
var lo = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
|
|
146851
146921
|
let r = e.at(-1);
|
|
146852
146922
|
return r !== void 0 && (i = (0, import_node_path19.join)(r, i)), e.push(i || "/"), e;
|
|
146853
146923
|
}, []);
|
|
146854
|
-
var
|
|
146924
|
+
var yi = class {
|
|
146855
146925
|
#t = /* @__PURE__ */ new Map();
|
|
146856
146926
|
#i = /* @__PURE__ */ new Map();
|
|
146857
146927
|
#s = /* @__PURE__ */ new Set();
|
|
146858
146928
|
reserve(t2, e) {
|
|
146859
|
-
t2 =
|
|
146860
|
-
let i = new Set(t2.map((r) =>
|
|
146929
|
+
t2 = ao ? ["win32 parallelization disabled"] : t2.map((r) => ut((0, import_node_path19.join)(Tr(r))));
|
|
146930
|
+
let i = new Set(t2.map((r) => lo(r)).reduce((r, n) => r.concat(n)));
|
|
146861
146931
|
this.#i.set(e, { dirs: i, paths: t2 });
|
|
146862
146932
|
for (let r of t2) {
|
|
146863
146933
|
let n = this.#t.get(r);
|
|
@@ -146891,79 +146961,79 @@ var Si = class {
|
|
|
146891
146961
|
if (!e) throw new Error("invalid reservation");
|
|
146892
146962
|
let { paths: i, dirs: r } = e, n = /* @__PURE__ */ new Set();
|
|
146893
146963
|
for (let o of i) {
|
|
146894
|
-
let
|
|
146895
|
-
if (!
|
|
146896
|
-
let
|
|
146897
|
-
if (!
|
|
146964
|
+
let h = this.#t.get(o);
|
|
146965
|
+
if (!h || h?.[0] !== t2) continue;
|
|
146966
|
+
let a = h[1];
|
|
146967
|
+
if (!a) {
|
|
146898
146968
|
this.#t.delete(o);
|
|
146899
146969
|
continue;
|
|
146900
146970
|
}
|
|
146901
|
-
if (
|
|
146902
|
-
else for (let l of
|
|
146971
|
+
if (h.shift(), typeof a == "function") n.add(a);
|
|
146972
|
+
else for (let l of a) n.add(l);
|
|
146903
146973
|
}
|
|
146904
146974
|
for (let o of r) {
|
|
146905
|
-
let
|
|
146906
|
-
if (!(!
|
|
146975
|
+
let h = this.#t.get(o), a = h?.[0];
|
|
146976
|
+
if (!(!h || !(a instanceof Set))) if (a.size === 1 && h.length === 1) {
|
|
146907
146977
|
this.#t.delete(o);
|
|
146908
146978
|
continue;
|
|
146909
|
-
} else if (
|
|
146910
|
-
|
|
146911
|
-
let l =
|
|
146979
|
+
} else if (a.size === 1) {
|
|
146980
|
+
h.shift();
|
|
146981
|
+
let l = h[0];
|
|
146912
146982
|
typeof l == "function" && n.add(l);
|
|
146913
|
-
} else
|
|
146983
|
+
} else a.delete(t2);
|
|
146914
146984
|
}
|
|
146915
146985
|
return this.#s.delete(t2), n.forEach((o) => this.#r(o)), true;
|
|
146916
146986
|
}
|
|
146917
146987
|
};
|
|
146918
|
-
var
|
|
146919
|
-
var
|
|
146920
|
-
var
|
|
146921
|
-
var
|
|
146922
|
-
var
|
|
146988
|
+
var Lr = () => process.umask();
|
|
146989
|
+
var Dr = /* @__PURE__ */ Symbol("onEntry");
|
|
146990
|
+
var _s = /* @__PURE__ */ Symbol("checkFs");
|
|
146991
|
+
var Nr = /* @__PURE__ */ Symbol("checkFs2");
|
|
146992
|
+
var Os = /* @__PURE__ */ Symbol("isReusable");
|
|
146923
146993
|
var P2 = /* @__PURE__ */ Symbol("makeFs");
|
|
146924
|
-
var
|
|
146925
|
-
var
|
|
146926
|
-
var
|
|
146927
|
-
var
|
|
146928
|
-
var
|
|
146929
|
-
var
|
|
146930
|
-
var
|
|
146931
|
-
var
|
|
146932
|
-
var
|
|
146994
|
+
var Ts = /* @__PURE__ */ Symbol("file");
|
|
146995
|
+
var xs = /* @__PURE__ */ Symbol("directory");
|
|
146996
|
+
var gi = /* @__PURE__ */ Symbol("link");
|
|
146997
|
+
var Ar = /* @__PURE__ */ Symbol("symlink");
|
|
146998
|
+
var Ir = /* @__PURE__ */ Symbol("hardlink");
|
|
146999
|
+
var Re = /* @__PURE__ */ Symbol("ensureNoSymlink");
|
|
147000
|
+
var Cr = /* @__PURE__ */ Symbol("unsupported");
|
|
147001
|
+
var Fr = /* @__PURE__ */ Symbol("checkPath");
|
|
147002
|
+
var Rs = /* @__PURE__ */ Symbol("stripAbsolutePath");
|
|
146933
147003
|
var yt = /* @__PURE__ */ Symbol("mkdir");
|
|
146934
147004
|
var O2 = /* @__PURE__ */ Symbol("onError");
|
|
146935
|
-
var
|
|
146936
|
-
var
|
|
147005
|
+
var Ri = /* @__PURE__ */ Symbol("pending");
|
|
147006
|
+
var kr = /* @__PURE__ */ Symbol("pend");
|
|
146937
147007
|
var $t = /* @__PURE__ */ Symbol("unpend");
|
|
146938
|
-
var
|
|
146939
|
-
var
|
|
146940
|
-
var
|
|
146941
|
-
var
|
|
146942
|
-
var
|
|
146943
|
-
var
|
|
146944
|
-
var
|
|
146945
|
-
var
|
|
146946
|
-
var
|
|
146947
|
-
var
|
|
146948
|
-
var
|
|
146949
|
-
if (!
|
|
147008
|
+
var gs = /* @__PURE__ */ Symbol("ended");
|
|
147009
|
+
var bs = /* @__PURE__ */ Symbol("maybeClose");
|
|
147010
|
+
var Ls = /* @__PURE__ */ Symbol("skip");
|
|
147011
|
+
var ge = /* @__PURE__ */ Symbol("doChown");
|
|
147012
|
+
var be = /* @__PURE__ */ Symbol("uid");
|
|
147013
|
+
var _e = /* @__PURE__ */ Symbol("gid");
|
|
147014
|
+
var Oe = /* @__PURE__ */ Symbol("checkedCwd");
|
|
147015
|
+
var fo = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
147016
|
+
var Te = fo === "win32";
|
|
147017
|
+
var mo = 1024;
|
|
147018
|
+
var uo = (s3, t2) => {
|
|
147019
|
+
if (!Te) return import_node_fs12.default.unlink(s3, t2);
|
|
146950
147020
|
let e = s3 + ".DELETE." + (0, import_node_crypto5.randomBytes)(16).toString("hex");
|
|
146951
147021
|
import_node_fs12.default.rename(s3, e, (i) => {
|
|
146952
147022
|
if (i) return t2(i);
|
|
146953
147023
|
import_node_fs12.default.unlink(e, t2);
|
|
146954
147024
|
});
|
|
146955
147025
|
};
|
|
146956
|
-
var
|
|
146957
|
-
if (!
|
|
147026
|
+
var po = (s3) => {
|
|
147027
|
+
if (!Te) return import_node_fs12.default.unlinkSync(s3);
|
|
146958
147028
|
let t2 = s3 + ".DELETE." + (0, import_node_crypto5.randomBytes)(16).toString("hex");
|
|
146959
147029
|
import_node_fs12.default.renameSync(s3, t2), import_node_fs12.default.unlinkSync(t2);
|
|
146960
147030
|
};
|
|
146961
|
-
var
|
|
146962
|
-
var Xt = class extends
|
|
146963
|
-
[
|
|
146964
|
-
[
|
|
146965
|
-
[
|
|
146966
|
-
reservations = new
|
|
147031
|
+
var vr = (s3, t2, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t2 !== void 0 && t2 === t2 >>> 0 ? t2 : e;
|
|
147032
|
+
var Xt = class extends rt {
|
|
147033
|
+
[gs] = false;
|
|
147034
|
+
[Oe] = false;
|
|
147035
|
+
[Ri] = 0;
|
|
147036
|
+
reservations = new yi();
|
|
146967
147037
|
transform;
|
|
146968
147038
|
writable = true;
|
|
146969
147039
|
readable = false;
|
|
@@ -146990,32 +147060,32 @@ var Xt = class extends st {
|
|
|
146990
147060
|
chmod;
|
|
146991
147061
|
constructor(t2 = {}) {
|
|
146992
147062
|
if (t2.ondone = () => {
|
|
146993
|
-
this[
|
|
147063
|
+
this[gs] = true, this[bs]();
|
|
146994
147064
|
}, super(t2), this.transform = t2.transform, this.chmod = !!t2.chmod, typeof t2.uid == "number" || typeof t2.gid == "number") {
|
|
146995
147065
|
if (typeof t2.uid != "number" || typeof t2.gid != "number") throw new TypeError("cannot set owner without number uid and gid");
|
|
146996
147066
|
if (t2.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
|
|
146997
147067
|
this.uid = t2.uid, this.gid = t2.gid, this.setOwner = true;
|
|
146998
147068
|
} else this.uid = void 0, this.gid = void 0, this.setOwner = false;
|
|
146999
|
-
this.preserveOwner = t2.preserveOwner === void 0 && typeof t2.uid != "number" ?
|
|
147069
|
+
this.preserveOwner = t2.preserveOwner === void 0 && typeof t2.uid != "number" ? process.getuid?.() === 0 : !!t2.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t2.maxDepth == "number" ? t2.maxDepth : mo, this.forceChown = t2.forceChown === true, this.win32 = !!t2.win32 || Te, this.newer = !!t2.newer, this.keep = !!t2.keep, this.noMtime = !!t2.noMtime, this.preservePaths = !!t2.preservePaths, this.unlink = !!t2.unlink, this.cwd = f(import_node_path16.default.resolve(t2.cwd || process.cwd())), this.strip = Number(t2.strip) || 0, this.processUmask = this.chmod ? typeof t2.processUmask == "number" ? t2.processUmask : Lr() : 0, this.umask = typeof t2.umask == "number" ? t2.umask : this.processUmask, this.dmode = t2.dmode || 511 & ~this.umask, this.fmode = t2.fmode || 438 & ~this.umask, this.on("entry", (e) => this[Dr](e));
|
|
147000
147070
|
}
|
|
147001
147071
|
warn(t2, e, i = {}) {
|
|
147002
147072
|
return (t2 === "TAR_BAD_ARCHIVE" || t2 === "TAR_ABORT") && (i.recoverable = false), super.warn(t2, e, i);
|
|
147003
147073
|
}
|
|
147004
|
-
[
|
|
147005
|
-
this[
|
|
147074
|
+
[bs]() {
|
|
147075
|
+
this[gs] && this[Ri] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
|
|
147006
147076
|
}
|
|
147007
|
-
[
|
|
147077
|
+
[Rs](t2, e) {
|
|
147008
147078
|
let i = t2[e], { type: r } = t2;
|
|
147009
147079
|
if (!i || this.preservePaths) return true;
|
|
147010
|
-
let [n, o] =
|
|
147011
|
-
if (
|
|
147080
|
+
let [n, o] = ce(i), h = o.replaceAll(/\\/g, "/").split("/");
|
|
147081
|
+
if (h.includes("..") || Te && /^[a-z]:\.\.$/i.test(h[0] ?? "")) {
|
|
147012
147082
|
if (e === "path" || r === "Link") return this.warn("TAR_ENTRY_ERROR", `${e} contains '..'`, { entry: t2, [e]: i }), false;
|
|
147013
|
-
let
|
|
147083
|
+
let a = import_node_path16.default.posix.dirname(t2.path), l = import_node_path16.default.posix.normalize(import_node_path16.default.posix.join(a, h.join("/")));
|
|
147014
147084
|
if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t2, [e]: i }), false;
|
|
147015
147085
|
}
|
|
147016
147086
|
return n && (t2[e] = String(o), this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute ${e}`, { entry: t2, [e]: i })), true;
|
|
147017
147087
|
}
|
|
147018
|
-
[
|
|
147088
|
+
[Fr](t2) {
|
|
147019
147089
|
let e = f(t2.path), i = e.split("/");
|
|
147020
147090
|
if (this.strip) {
|
|
147021
147091
|
if (i.length < this.strip) return false;
|
|
@@ -147027,19 +147097,19 @@ var Xt = class extends st {
|
|
|
147027
147097
|
i.splice(0, this.strip), t2.path = i.join("/");
|
|
147028
147098
|
}
|
|
147029
147099
|
if (isFinite(this.maxDepth) && i.length > this.maxDepth) return this.warn("TAR_ENTRY_ERROR", "path excessively deep", { entry: t2, path: e, depth: i.length, maxDepth: this.maxDepth }), false;
|
|
147030
|
-
if (!this[
|
|
147100
|
+
if (!this[Rs](t2, "path") || !this[Rs](t2, "linkpath")) return false;
|
|
147031
147101
|
if (t2.absolute = import_node_path16.default.isAbsolute(t2.path) ? f(import_node_path16.default.resolve(t2.path)) : f(import_node_path16.default.resolve(this.cwd, t2.path)), !this.preservePaths && typeof t2.absolute == "string" && t2.absolute.indexOf(this.cwd + "/") !== 0 && t2.absolute !== this.cwd) return this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", { entry: t2, path: f(t2.path), resolvedPath: t2.absolute, cwd: this.cwd }), false;
|
|
147032
147102
|
if (t2.absolute === this.cwd && t2.type !== "Directory" && t2.type !== "GNUDumpDir") return false;
|
|
147033
147103
|
if (this.win32) {
|
|
147034
147104
|
let { root: r } = import_node_path16.default.win32.parse(String(t2.absolute));
|
|
147035
|
-
t2.absolute = r +
|
|
147105
|
+
t2.absolute = r + ts(String(t2.absolute).slice(r.length));
|
|
147036
147106
|
let { root: n } = import_node_path16.default.win32.parse(t2.path);
|
|
147037
|
-
t2.path = n +
|
|
147107
|
+
t2.path = n + ts(t2.path.slice(n.length));
|
|
147038
147108
|
}
|
|
147039
147109
|
return true;
|
|
147040
147110
|
}
|
|
147041
|
-
[
|
|
147042
|
-
if (!this[
|
|
147111
|
+
[Dr](t2) {
|
|
147112
|
+
if (!this[Fr](t2)) return t2.resume();
|
|
147043
147113
|
switch (import_node_assert.default.equal(typeof t2.absolute, "string"), t2.type) {
|
|
147044
147114
|
case "Directory":
|
|
147045
147115
|
case "GNUDumpDir":
|
|
@@ -147049,36 +147119,36 @@ var Xt = class extends st {
|
|
|
147049
147119
|
case "ContiguousFile":
|
|
147050
147120
|
case "Link":
|
|
147051
147121
|
case "SymbolicLink":
|
|
147052
|
-
return this[
|
|
147122
|
+
return this[_s](t2);
|
|
147053
147123
|
default:
|
|
147054
|
-
return this[
|
|
147124
|
+
return this[Cr](t2);
|
|
147055
147125
|
}
|
|
147056
147126
|
}
|
|
147057
147127
|
[O2](t2, e) {
|
|
147058
147128
|
t2.name === "CwdError" ? this.emit("error", t2) : (this.warn("TAR_ENTRY_ERROR", t2, { entry: e }), this[$t](), e.resume());
|
|
147059
147129
|
}
|
|
147060
147130
|
[yt](t2, e, i) {
|
|
147061
|
-
|
|
147062
|
-
}
|
|
147063
|
-
[Re](t2) {
|
|
147064
|
-
return this.forceChown || this.preserveOwner && (typeof t2.uid == "number" && t2.uid !== this.processUid || typeof t2.gid == "number" && t2.gid !== this.processGid) || typeof this.uid == "number" && this.uid !== this.processUid || typeof this.gid == "number" && this.gid !== this.processGid;
|
|
147131
|
+
gr(f(t2), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e }, i);
|
|
147065
147132
|
}
|
|
147066
147133
|
[ge](t2) {
|
|
147067
|
-
return
|
|
147134
|
+
return this.forceChown || this.preserveOwner && (typeof t2.uid == "number" && t2.uid !== this.processUid || typeof t2.gid == "number" && t2.gid !== this.processGid) || typeof this.uid == "number" && this.uid !== this.processUid || typeof this.gid == "number" && this.gid !== this.processGid;
|
|
147068
147135
|
}
|
|
147069
147136
|
[be](t2) {
|
|
147070
|
-
return
|
|
147137
|
+
return vr(this.uid, t2.uid, this.processUid);
|
|
147071
147138
|
}
|
|
147072
|
-
[
|
|
147073
|
-
|
|
147074
|
-
|
|
147139
|
+
[_e](t2) {
|
|
147140
|
+
return vr(this.gid, t2.gid, this.processGid);
|
|
147141
|
+
}
|
|
147142
|
+
[Ts](t2, e) {
|
|
147143
|
+
let i = typeof t2.mode == "number" ? t2.mode & 4095 : this.fmode, r = new et(String(t2.absolute), { flags: us(t2.size), mode: i, autoClose: false });
|
|
147144
|
+
r.on("error", (a) => {
|
|
147075
147145
|
r.fd && import_node_fs12.default.close(r.fd, () => {
|
|
147076
|
-
}), r.write = () => true, this[O2](
|
|
147146
|
+
}), r.write = () => true, this[O2](a, t2), e();
|
|
147077
147147
|
});
|
|
147078
|
-
let n = 1, o = (
|
|
147079
|
-
if (
|
|
147148
|
+
let n = 1, o = (a) => {
|
|
147149
|
+
if (a) {
|
|
147080
147150
|
r.fd && import_node_fs12.default.close(r.fd, () => {
|
|
147081
|
-
}), this[O2](
|
|
147151
|
+
}), this[O2](a, t2), e();
|
|
147082
147152
|
return;
|
|
147083
147153
|
}
|
|
147084
147154
|
--n === 0 && r.fd !== void 0 && import_node_fs12.default.close(r.fd, (l) => {
|
|
@@ -147086,25 +147156,25 @@ var Xt = class extends st {
|
|
|
147086
147156
|
});
|
|
147087
147157
|
};
|
|
147088
147158
|
r.on("finish", () => {
|
|
147089
|
-
let
|
|
147159
|
+
let a = String(t2.absolute), l = r.fd;
|
|
147090
147160
|
if (typeof l == "number" && t2.mtime && !this.noMtime) {
|
|
147091
147161
|
n++;
|
|
147092
147162
|
let c = t2.atime || /* @__PURE__ */ new Date(), d = t2.mtime;
|
|
147093
|
-
import_node_fs12.default.futimes(l, c, d, (S2) => S2 ? import_node_fs12.default.utimes(
|
|
147163
|
+
import_node_fs12.default.futimes(l, c, d, (S2) => S2 ? import_node_fs12.default.utimes(a, c, d, (T2) => o(T2 && S2)) : o());
|
|
147094
147164
|
}
|
|
147095
|
-
if (typeof l == "number" && this[
|
|
147165
|
+
if (typeof l == "number" && this[ge](t2)) {
|
|
147096
147166
|
n++;
|
|
147097
|
-
let c = this[
|
|
147098
|
-
typeof c == "number" && typeof d == "number" && import_node_fs12.default.fchown(l, c, d, (S2) => S2 ? import_node_fs12.default.chown(
|
|
147167
|
+
let c = this[be](t2), d = this[_e](t2);
|
|
147168
|
+
typeof c == "number" && typeof d == "number" && import_node_fs12.default.fchown(l, c, d, (S2) => S2 ? import_node_fs12.default.chown(a, c, d, (T2) => o(T2 && S2)) : o());
|
|
147099
147169
|
}
|
|
147100
147170
|
o();
|
|
147101
147171
|
});
|
|
147102
|
-
let
|
|
147103
|
-
|
|
147104
|
-
this[O2](
|
|
147105
|
-
}), t2.pipe(
|
|
147172
|
+
let h = this.transform && this.transform(t2) || t2;
|
|
147173
|
+
h !== t2 && (h.on("error", (a) => {
|
|
147174
|
+
this[O2](a, t2), e();
|
|
147175
|
+
}), t2.pipe(h)), h.pipe(r);
|
|
147106
147176
|
}
|
|
147107
|
-
[
|
|
147177
|
+
[xs](t2, e) {
|
|
147108
147178
|
let i = typeof t2.mode == "number" ? t2.mode & 4095 : this.dmode;
|
|
147109
147179
|
this[yt](String(t2.absolute), i, (r) => {
|
|
147110
147180
|
if (r) {
|
|
@@ -147114,68 +147184,68 @@ var Xt = class extends st {
|
|
|
147114
147184
|
let n = 1, o = () => {
|
|
147115
147185
|
--n === 0 && (e(), this[$t](), t2.resume());
|
|
147116
147186
|
};
|
|
147117
|
-
t2.mtime && !this.noMtime && (n++, import_node_fs12.default.utimes(String(t2.absolute), t2.atime || /* @__PURE__ */ new Date(), t2.mtime, o)), this[
|
|
147187
|
+
t2.mtime && !this.noMtime && (n++, import_node_fs12.default.utimes(String(t2.absolute), t2.atime || /* @__PURE__ */ new Date(), t2.mtime, o)), this[ge](t2) && (n++, import_node_fs12.default.chown(String(t2.absolute), Number(this[be](t2)), Number(this[_e](t2)), o)), o();
|
|
147118
147188
|
});
|
|
147119
147189
|
}
|
|
147120
|
-
[
|
|
147190
|
+
[Cr](t2) {
|
|
147121
147191
|
t2.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${t2.type}`, { entry: t2 }), t2.resume();
|
|
147122
147192
|
}
|
|
147123
|
-
[
|
|
147193
|
+
[Ar](t2, e) {
|
|
147124
147194
|
let i = f(import_node_path16.default.relative(this.cwd, import_node_path16.default.resolve(import_node_path16.default.dirname(String(t2.absolute)), String(t2.linkpath)))).split("/");
|
|
147125
|
-
this[
|
|
147195
|
+
this[Re](t2, this.cwd, i, () => this[gi](t2, String(t2.linkpath), "symlink", e), (r) => {
|
|
147126
147196
|
this[O2](r, t2), e();
|
|
147127
147197
|
});
|
|
147128
147198
|
}
|
|
147129
|
-
[
|
|
147199
|
+
[Ir](t2, e) {
|
|
147130
147200
|
let i = f(import_node_path16.default.resolve(this.cwd, String(t2.linkpath))), r = f(String(t2.linkpath)).split("/");
|
|
147131
|
-
this[
|
|
147201
|
+
this[Re](t2, this.cwd, r, () => this[gi](t2, i, "link", e), (n) => {
|
|
147132
147202
|
this[O2](n, t2), e();
|
|
147133
147203
|
});
|
|
147134
147204
|
}
|
|
147135
|
-
[
|
|
147205
|
+
[Re](t2, e, i, r, n) {
|
|
147136
147206
|
let o = i.shift();
|
|
147137
147207
|
if (this.preservePaths || o === void 0) return r();
|
|
147138
|
-
let
|
|
147139
|
-
import_node_fs12.default.lstat(
|
|
147140
|
-
if (
|
|
147141
|
-
if (l?.isSymbolicLink()) return n(new St(
|
|
147142
|
-
this[
|
|
147208
|
+
let h = import_node_path16.default.resolve(e, o);
|
|
147209
|
+
import_node_fs12.default.lstat(h, (a, l) => {
|
|
147210
|
+
if (a) return r();
|
|
147211
|
+
if (l?.isSymbolicLink()) return n(new St(h, import_node_path16.default.resolve(h, i.join("/"))));
|
|
147212
|
+
this[Re](t2, h, i, r, n);
|
|
147143
147213
|
});
|
|
147144
147214
|
}
|
|
147145
|
-
[
|
|
147146
|
-
this[
|
|
147215
|
+
[kr]() {
|
|
147216
|
+
this[Ri]++;
|
|
147147
147217
|
}
|
|
147148
147218
|
[$t]() {
|
|
147149
|
-
this[
|
|
147219
|
+
this[Ri]--, this[bs]();
|
|
147150
147220
|
}
|
|
147151
|
-
[
|
|
147221
|
+
[Ls](t2) {
|
|
147152
147222
|
this[$t](), t2.resume();
|
|
147153
147223
|
}
|
|
147154
|
-
[
|
|
147155
|
-
return t2.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !
|
|
147224
|
+
[Os](t2, e) {
|
|
147225
|
+
return t2.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Te;
|
|
147156
147226
|
}
|
|
147157
|
-
[
|
|
147158
|
-
this[
|
|
147227
|
+
[_s](t2) {
|
|
147228
|
+
this[kr]();
|
|
147159
147229
|
let e = [t2.path];
|
|
147160
|
-
t2.linkpath && e.push(t2.linkpath), this.reservations.reserve(e, (i) => this[
|
|
147230
|
+
t2.linkpath && e.push(t2.linkpath), this.reservations.reserve(e, (i) => this[Nr](t2, i));
|
|
147161
147231
|
}
|
|
147162
|
-
[
|
|
147163
|
-
let i = (
|
|
147164
|
-
e(
|
|
147232
|
+
[Nr](t2, e) {
|
|
147233
|
+
let i = (h) => {
|
|
147234
|
+
e(h);
|
|
147165
147235
|
}, r = () => {
|
|
147166
|
-
this[yt](this.cwd, this.dmode, (
|
|
147167
|
-
if (
|
|
147168
|
-
this[O2](
|
|
147236
|
+
this[yt](this.cwd, this.dmode, (h) => {
|
|
147237
|
+
if (h) {
|
|
147238
|
+
this[O2](h, t2), i();
|
|
147169
147239
|
return;
|
|
147170
147240
|
}
|
|
147171
|
-
this[
|
|
147241
|
+
this[Oe] = true, n();
|
|
147172
147242
|
});
|
|
147173
147243
|
}, n = () => {
|
|
147174
147244
|
if (t2.absolute !== this.cwd) {
|
|
147175
|
-
let
|
|
147176
|
-
if (
|
|
147177
|
-
if (
|
|
147178
|
-
this[O2](
|
|
147245
|
+
let h = f(import_node_path16.default.dirname(String(t2.absolute)));
|
|
147246
|
+
if (h !== this.cwd) return this[yt](h, this.dmode, (a) => {
|
|
147247
|
+
if (a) {
|
|
147248
|
+
this[O2](a, t2), i();
|
|
147179
147249
|
return;
|
|
147180
147250
|
}
|
|
147181
147251
|
o();
|
|
@@ -147183,24 +147253,24 @@ var Xt = class extends st {
|
|
|
147183
147253
|
}
|
|
147184
147254
|
o();
|
|
147185
147255
|
}, o = () => {
|
|
147186
|
-
import_node_fs12.default.lstat(String(t2.absolute), (
|
|
147187
|
-
if (
|
|
147188
|
-
this[
|
|
147256
|
+
import_node_fs12.default.lstat(String(t2.absolute), (h, a) => {
|
|
147257
|
+
if (a && (this.keep || this.newer && a.mtime > (t2.mtime ?? a.mtime))) {
|
|
147258
|
+
this[Ls](t2), i();
|
|
147189
147259
|
return;
|
|
147190
147260
|
}
|
|
147191
|
-
if (
|
|
147192
|
-
if (
|
|
147261
|
+
if (h || this[Os](t2, a)) return this[P2](null, t2, i);
|
|
147262
|
+
if (a.isDirectory()) {
|
|
147193
147263
|
if (t2.type === "Directory") {
|
|
147194
|
-
let l = this.chmod && t2.mode && (
|
|
147264
|
+
let l = this.chmod && t2.mode && (a.mode & 4095) !== t2.mode, c = (d) => this[P2](d ?? null, t2, i);
|
|
147195
147265
|
return l ? import_node_fs12.default.chmod(String(t2.absolute), Number(t2.mode), c) : c();
|
|
147196
147266
|
}
|
|
147197
147267
|
if (t2.absolute !== this.cwd) return import_node_fs12.default.rmdir(String(t2.absolute), (l) => this[P2](l ?? null, t2, i));
|
|
147198
147268
|
}
|
|
147199
147269
|
if (t2.absolute === this.cwd) return this[P2](null, t2, i);
|
|
147200
|
-
|
|
147270
|
+
uo(String(t2.absolute), (l) => this[P2](l ?? null, t2, i));
|
|
147201
147271
|
});
|
|
147202
147272
|
};
|
|
147203
|
-
this[
|
|
147273
|
+
this[Oe] ? n() : r();
|
|
147204
147274
|
}
|
|
147205
147275
|
[P2](t2, e, i) {
|
|
147206
147276
|
if (t2) {
|
|
@@ -147211,40 +147281,40 @@ var Xt = class extends st {
|
|
|
147211
147281
|
case "File":
|
|
147212
147282
|
case "OldFile":
|
|
147213
147283
|
case "ContiguousFile":
|
|
147214
|
-
return this[
|
|
147284
|
+
return this[Ts](e, i);
|
|
147215
147285
|
case "Link":
|
|
147216
|
-
return this[
|
|
147286
|
+
return this[Ir](e, i);
|
|
147217
147287
|
case "SymbolicLink":
|
|
147218
|
-
return this[
|
|
147288
|
+
return this[Ar](e, i);
|
|
147219
147289
|
case "Directory":
|
|
147220
147290
|
case "GNUDumpDir":
|
|
147221
|
-
return this[
|
|
147291
|
+
return this[xs](e, i);
|
|
147222
147292
|
}
|
|
147223
147293
|
}
|
|
147224
|
-
[
|
|
147294
|
+
[gi](t2, e, i, r) {
|
|
147225
147295
|
import_node_fs12.default[i](e, String(t2.absolute), (n) => {
|
|
147226
147296
|
n ? this[O2](n, t2) : (this[$t](), t2.resume()), r();
|
|
147227
147297
|
});
|
|
147228
147298
|
}
|
|
147229
147299
|
};
|
|
147230
|
-
var
|
|
147300
|
+
var ye = (s3) => {
|
|
147231
147301
|
try {
|
|
147232
147302
|
return [null, s3()];
|
|
147233
147303
|
} catch (t2) {
|
|
147234
147304
|
return [t2, null];
|
|
147235
147305
|
}
|
|
147236
147306
|
};
|
|
147237
|
-
var
|
|
147307
|
+
var xe = class extends Xt {
|
|
147238
147308
|
sync = true;
|
|
147239
147309
|
[P2](t2, e) {
|
|
147240
147310
|
return super[P2](t2, e, () => {
|
|
147241
147311
|
});
|
|
147242
147312
|
}
|
|
147243
|
-
[
|
|
147244
|
-
if (!this[
|
|
147313
|
+
[_s](t2) {
|
|
147314
|
+
if (!this[Oe]) {
|
|
147245
147315
|
let n = this[yt](this.cwd, this.dmode);
|
|
147246
147316
|
if (n) return this[O2](n, t2);
|
|
147247
|
-
this[
|
|
147317
|
+
this[Oe] = true;
|
|
147248
147318
|
}
|
|
147249
147319
|
if (t2.absolute !== this.cwd) {
|
|
147250
147320
|
let n = f(import_node_path16.default.dirname(String(t2.absolute)));
|
|
@@ -147253,74 +147323,74 @@ var Te = class extends Xt {
|
|
|
147253
147323
|
if (o) return this[O2](o, t2);
|
|
147254
147324
|
}
|
|
147255
147325
|
}
|
|
147256
|
-
let [e, i] =
|
|
147257
|
-
if (i && (this.keep || this.newer && i.mtime > (t2.mtime ?? i.mtime))) return this[
|
|
147258
|
-
if (e || this[
|
|
147326
|
+
let [e, i] = ye(() => import_node_fs12.default.lstatSync(String(t2.absolute)));
|
|
147327
|
+
if (i && (this.keep || this.newer && i.mtime > (t2.mtime ?? i.mtime))) return this[Ls](t2);
|
|
147328
|
+
if (e || this[Os](t2, i)) return this[P2](null, t2);
|
|
147259
147329
|
if (i.isDirectory()) {
|
|
147260
147330
|
if (t2.type === "Directory") {
|
|
147261
|
-
let o = this.chmod && t2.mode && (i.mode & 4095) !== t2.mode, [
|
|
147331
|
+
let o = this.chmod && t2.mode && (i.mode & 4095) !== t2.mode, [h] = o ? ye(() => {
|
|
147262
147332
|
import_node_fs12.default.chmodSync(String(t2.absolute), Number(t2.mode));
|
|
147263
147333
|
}) : [];
|
|
147264
|
-
return this[P2](
|
|
147334
|
+
return this[P2](h, t2);
|
|
147265
147335
|
}
|
|
147266
|
-
let [n] =
|
|
147336
|
+
let [n] = ye(() => import_node_fs12.default.rmdirSync(String(t2.absolute)));
|
|
147267
147337
|
this[P2](n, t2);
|
|
147268
147338
|
}
|
|
147269
|
-
let [r] = t2.absolute === this.cwd ? [] :
|
|
147339
|
+
let [r] = t2.absolute === this.cwd ? [] : ye(() => po(String(t2.absolute)));
|
|
147270
147340
|
this[P2](r, t2);
|
|
147271
147341
|
}
|
|
147272
|
-
[
|
|
147273
|
-
let i = typeof t2.mode == "number" ? t2.mode & 4095 : this.fmode, r = (
|
|
147274
|
-
let
|
|
147342
|
+
[Ts](t2, e) {
|
|
147343
|
+
let i = typeof t2.mode == "number" ? t2.mode & 4095 : this.fmode, r = (h) => {
|
|
147344
|
+
let a;
|
|
147275
147345
|
try {
|
|
147276
147346
|
import_node_fs12.default.closeSync(n);
|
|
147277
147347
|
} catch (l) {
|
|
147278
|
-
|
|
147348
|
+
a = l;
|
|
147279
147349
|
}
|
|
147280
|
-
(
|
|
147350
|
+
(h || a) && this[O2](h || a, t2), e();
|
|
147281
147351
|
}, n;
|
|
147282
147352
|
try {
|
|
147283
|
-
n = import_node_fs12.default.openSync(String(t2.absolute),
|
|
147284
|
-
} catch (
|
|
147285
|
-
return r(
|
|
147353
|
+
n = import_node_fs12.default.openSync(String(t2.absolute), us(t2.size), i);
|
|
147354
|
+
} catch (h) {
|
|
147355
|
+
return r(h);
|
|
147286
147356
|
}
|
|
147287
147357
|
let o = this.transform && this.transform(t2) || t2;
|
|
147288
|
-
o !== t2 && (o.on("error", (
|
|
147358
|
+
o !== t2 && (o.on("error", (h) => this[O2](h, t2)), t2.pipe(o)), o.on("data", (h) => {
|
|
147289
147359
|
try {
|
|
147290
|
-
import_node_fs12.default.writeSync(n,
|
|
147291
|
-
} catch (
|
|
147292
|
-
r(
|
|
147360
|
+
import_node_fs12.default.writeSync(n, h, 0, h.length);
|
|
147361
|
+
} catch (a) {
|
|
147362
|
+
r(a);
|
|
147293
147363
|
}
|
|
147294
147364
|
}), o.on("end", () => {
|
|
147295
|
-
let
|
|
147365
|
+
let h = null;
|
|
147296
147366
|
if (t2.mtime && !this.noMtime) {
|
|
147297
|
-
let
|
|
147367
|
+
let a = t2.atime || /* @__PURE__ */ new Date(), l = t2.mtime;
|
|
147298
147368
|
try {
|
|
147299
|
-
import_node_fs12.default.futimesSync(n,
|
|
147369
|
+
import_node_fs12.default.futimesSync(n, a, l);
|
|
147300
147370
|
} catch (c) {
|
|
147301
147371
|
try {
|
|
147302
|
-
import_node_fs12.default.utimesSync(String(t2.absolute),
|
|
147372
|
+
import_node_fs12.default.utimesSync(String(t2.absolute), a, l);
|
|
147303
147373
|
} catch {
|
|
147304
|
-
|
|
147374
|
+
h = c;
|
|
147305
147375
|
}
|
|
147306
147376
|
}
|
|
147307
147377
|
}
|
|
147308
|
-
if (this[
|
|
147309
|
-
let
|
|
147378
|
+
if (this[ge](t2)) {
|
|
147379
|
+
let a = this[be](t2), l = this[_e](t2);
|
|
147310
147380
|
try {
|
|
147311
|
-
import_node_fs12.default.fchownSync(n, Number(
|
|
147381
|
+
import_node_fs12.default.fchownSync(n, Number(a), Number(l));
|
|
147312
147382
|
} catch (c) {
|
|
147313
147383
|
try {
|
|
147314
|
-
import_node_fs12.default.chownSync(String(t2.absolute), Number(
|
|
147384
|
+
import_node_fs12.default.chownSync(String(t2.absolute), Number(a), Number(l));
|
|
147315
147385
|
} catch {
|
|
147316
|
-
|
|
147386
|
+
h = h || c;
|
|
147317
147387
|
}
|
|
147318
147388
|
}
|
|
147319
147389
|
}
|
|
147320
|
-
r(
|
|
147390
|
+
r(h);
|
|
147321
147391
|
});
|
|
147322
147392
|
}
|
|
147323
|
-
[
|
|
147393
|
+
[xs](t2, e) {
|
|
147324
147394
|
let i = typeof t2.mode == "number" ? t2.mode & 4095 : this.dmode, r = this[yt](String(t2.absolute), i);
|
|
147325
147395
|
if (r) {
|
|
147326
147396
|
this[O2](r, t2), e();
|
|
@@ -147330,31 +147400,31 @@ var Te = class extends Xt {
|
|
|
147330
147400
|
import_node_fs12.default.utimesSync(String(t2.absolute), t2.atime || /* @__PURE__ */ new Date(), t2.mtime);
|
|
147331
147401
|
} catch {
|
|
147332
147402
|
}
|
|
147333
|
-
if (this[
|
|
147334
|
-
import_node_fs12.default.chownSync(String(t2.absolute), Number(this[
|
|
147403
|
+
if (this[ge](t2)) try {
|
|
147404
|
+
import_node_fs12.default.chownSync(String(t2.absolute), Number(this[be](t2)), Number(this[_e](t2)));
|
|
147335
147405
|
} catch {
|
|
147336
147406
|
}
|
|
147337
147407
|
e(), t2.resume();
|
|
147338
147408
|
}
|
|
147339
147409
|
[yt](t2, e) {
|
|
147340
147410
|
try {
|
|
147341
|
-
return
|
|
147411
|
+
return _r(f(t2), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e });
|
|
147342
147412
|
} catch (i) {
|
|
147343
147413
|
return i;
|
|
147344
147414
|
}
|
|
147345
147415
|
}
|
|
147346
|
-
[
|
|
147416
|
+
[Re](t2, e, i, r, n) {
|
|
147347
147417
|
if (this.preservePaths || i.length === 0) return r();
|
|
147348
147418
|
let o = e;
|
|
147349
|
-
for (let
|
|
147350
|
-
o = import_node_path16.default.resolve(o,
|
|
147351
|
-
let [
|
|
147352
|
-
if (
|
|
147419
|
+
for (let h of i) {
|
|
147420
|
+
o = import_node_path16.default.resolve(o, h);
|
|
147421
|
+
let [a, l] = ye(() => import_node_fs12.default.lstatSync(o));
|
|
147422
|
+
if (a) return r();
|
|
147353
147423
|
if (l.isSymbolicLink()) return n(new St(o, import_node_path16.default.resolve(e, i.join("/"))));
|
|
147354
147424
|
}
|
|
147355
147425
|
r();
|
|
147356
147426
|
}
|
|
147357
|
-
[
|
|
147427
|
+
[gi](t2, e, i, r) {
|
|
147358
147428
|
let n = `${i}Sync`;
|
|
147359
147429
|
try {
|
|
147360
147430
|
import_node_fs12.default[n](e, String(t2.absolute)), r(), t2.resume();
|
|
@@ -147363,47 +147433,47 @@ var Te = class extends Xt {
|
|
|
147363
147433
|
}
|
|
147364
147434
|
}
|
|
147365
147435
|
};
|
|
147366
|
-
var
|
|
147367
|
-
let t2 = new
|
|
147368
|
-
new
|
|
147436
|
+
var Eo = (s3) => {
|
|
147437
|
+
let t2 = new xe(s3), e = s3.file, i = import_node_fs11.default.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
|
|
147438
|
+
new Be(e, { readSize: r, size: i.size }).pipe(t2);
|
|
147369
147439
|
};
|
|
147370
|
-
var
|
|
147440
|
+
var wo = (s3, t2) => {
|
|
147371
147441
|
let e = new Xt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
|
|
147372
|
-
return new Promise((o,
|
|
147373
|
-
e.on("error",
|
|
147374
|
-
if (
|
|
147442
|
+
return new Promise((o, h) => {
|
|
147443
|
+
e.on("error", h), e.on("close", o), import_node_fs11.default.stat(r, (a, l) => {
|
|
147444
|
+
if (a) h(a);
|
|
147375
147445
|
else {
|
|
147376
147446
|
let c = new _t(r, { readSize: i, size: l.size });
|
|
147377
|
-
c.on("error",
|
|
147447
|
+
c.on("error", h), c.pipe(e);
|
|
147378
147448
|
}
|
|
147379
147449
|
});
|
|
147380
147450
|
});
|
|
147381
147451
|
};
|
|
147382
|
-
var
|
|
147383
|
-
t2?.length &&
|
|
147452
|
+
var So = K2(Eo, wo, (s3) => new xe(s3), (s3) => new Xt(s3), (s3, t2) => {
|
|
147453
|
+
t2?.length && Qi(s3, t2);
|
|
147384
147454
|
});
|
|
147385
|
-
var
|
|
147455
|
+
var yo = (s3, t2) => {
|
|
147386
147456
|
let e = new kt(s3), i = true, r, n;
|
|
147387
147457
|
try {
|
|
147388
147458
|
try {
|
|
147389
147459
|
r = import_node_fs15.default.openSync(s3.file, "r+");
|
|
147390
|
-
} catch (
|
|
147391
|
-
if (
|
|
147392
|
-
else throw
|
|
147460
|
+
} catch (a) {
|
|
147461
|
+
if (a?.code === "ENOENT") r = import_node_fs15.default.openSync(s3.file, "w+");
|
|
147462
|
+
else throw a;
|
|
147393
147463
|
}
|
|
147394
|
-
let o = import_node_fs15.default.fstatSync(r),
|
|
147464
|
+
let o = import_node_fs15.default.fstatSync(r), h = Buffer.alloc(512);
|
|
147395
147465
|
t: for (n = 0; n < o.size; n += 512) {
|
|
147396
147466
|
for (let c = 0, d = 0; c < 512; c += d) {
|
|
147397
|
-
if (d = import_node_fs15.default.readSync(r,
|
|
147467
|
+
if (d = import_node_fs15.default.readSync(r, h, c, h.length - c, n + c), n === 0 && h[0] === 31 && h[1] === 139) throw new Error("cannot append to compressed archives");
|
|
147398
147468
|
if (!d) break t;
|
|
147399
147469
|
}
|
|
147400
|
-
let
|
|
147401
|
-
if (!
|
|
147402
|
-
let l = 512 * Math.ceil((
|
|
147470
|
+
let a = new F2(h);
|
|
147471
|
+
if (!a.cksumValid) break;
|
|
147472
|
+
let l = 512 * Math.ceil((a.size || 0) / 512);
|
|
147403
147473
|
if (n + l + 512 > o.size) break;
|
|
147404
|
-
n += l, s3.mtimeCache &&
|
|
147474
|
+
n += l, s3.mtimeCache && a.mtime && s3.mtimeCache.set(String(a.path), a.mtime);
|
|
147405
147475
|
}
|
|
147406
|
-
i = false,
|
|
147476
|
+
i = false, Ro(s3, e, n, r, t2);
|
|
147407
147477
|
} finally {
|
|
147408
147478
|
if (i) try {
|
|
147409
147479
|
import_node_fs15.default.closeSync(r);
|
|
@@ -147411,69 +147481,69 @@ var mo = (s3, t2) => {
|
|
|
147411
147481
|
}
|
|
147412
147482
|
}
|
|
147413
147483
|
};
|
|
147414
|
-
var
|
|
147484
|
+
var Ro = (s3, t2, e, i, r) => {
|
|
147415
147485
|
let n = new Wt(s3.file, { fd: i, start: e });
|
|
147416
|
-
t2.pipe(n),
|
|
147486
|
+
t2.pipe(n), bo(t2, r);
|
|
147417
147487
|
};
|
|
147418
|
-
var
|
|
147488
|
+
var go = (s3, t2) => {
|
|
147419
147489
|
t2 = Array.from(t2);
|
|
147420
|
-
let e = new wt(s3), i = (n, o,
|
|
147421
|
-
let
|
|
147422
|
-
T2 ? import_node_fs15.default.close(n, (E2) =>
|
|
147490
|
+
let e = new wt(s3), i = (n, o, h) => {
|
|
147491
|
+
let a = (T2, D2) => {
|
|
147492
|
+
T2 ? import_node_fs15.default.close(n, (E2) => h(T2)) : h(null, D2);
|
|
147423
147493
|
}, l = 0;
|
|
147424
|
-
if (o === 0) return
|
|
147425
|
-
let c = 0, d = Buffer.alloc(512), S2 = (T2,
|
|
147426
|
-
if (T2 ||
|
|
147427
|
-
if (c +=
|
|
147428
|
-
if (l === 0 && d[0] === 31 && d[1] === 139) return
|
|
147429
|
-
if (c < 512) return
|
|
147430
|
-
let E2 = new
|
|
147431
|
-
if (!E2.cksumValid) return
|
|
147494
|
+
if (o === 0) return a(null, 0);
|
|
147495
|
+
let c = 0, d = Buffer.alloc(512), S2 = (T2, D2) => {
|
|
147496
|
+
if (T2 || D2 === void 0) return a(T2);
|
|
147497
|
+
if (c += D2, c < 512 && D2) return import_node_fs15.default.read(n, d, c, d.length - c, l + c, S2);
|
|
147498
|
+
if (l === 0 && d[0] === 31 && d[1] === 139) return a(new Error("cannot append to compressed archives"));
|
|
147499
|
+
if (c < 512) return a(null, l);
|
|
147500
|
+
let E2 = new F2(d);
|
|
147501
|
+
if (!E2.cksumValid) return a(null, l);
|
|
147432
147502
|
let x2 = 512 * Math.ceil((E2.size ?? 0) / 512);
|
|
147433
|
-
if (l + x2 + 512 > o || (l += x2 + 512, l >= o)) return
|
|
147503
|
+
if (l + x2 + 512 > o || (l += x2 + 512, l >= o)) return a(null, l);
|
|
147434
147504
|
s3.mtimeCache && E2.mtime && s3.mtimeCache.set(String(E2.path), E2.mtime), c = 0, import_node_fs15.default.read(n, d, 0, 512, l, S2);
|
|
147435
147505
|
};
|
|
147436
147506
|
import_node_fs15.default.read(n, d, 0, 512, l, S2);
|
|
147437
147507
|
};
|
|
147438
147508
|
return new Promise((n, o) => {
|
|
147439
147509
|
e.on("error", o);
|
|
147440
|
-
let
|
|
147441
|
-
if (l && l.code === "ENOENT" &&
|
|
147510
|
+
let h = "r+", a = (l, c) => {
|
|
147511
|
+
if (l && l.code === "ENOENT" && h === "r+") return h = "w+", import_node_fs15.default.open(s3.file, h, a);
|
|
147442
147512
|
if (l || !c) return o(l);
|
|
147443
147513
|
import_node_fs15.default.fstat(c, (d, S2) => {
|
|
147444
147514
|
if (d) return import_node_fs15.default.close(c, () => o(d));
|
|
147445
|
-
i(c, S2.size, (T2,
|
|
147515
|
+
i(c, S2.size, (T2, D2) => {
|
|
147446
147516
|
if (T2) return o(T2);
|
|
147447
|
-
let E2 = new
|
|
147448
|
-
e.pipe(E2), E2.on("error", o), E2.on("close", n),
|
|
147517
|
+
let E2 = new et(s3.file, { fd: c, start: D2 });
|
|
147518
|
+
e.pipe(E2), E2.on("error", o), E2.on("close", n), _o(e, t2);
|
|
147449
147519
|
});
|
|
147450
147520
|
});
|
|
147451
147521
|
};
|
|
147452
|
-
import_node_fs15.default.open(s3.file,
|
|
147522
|
+
import_node_fs15.default.open(s3.file, h, a);
|
|
147453
147523
|
});
|
|
147454
147524
|
};
|
|
147455
|
-
var
|
|
147525
|
+
var bo = (s3, t2) => {
|
|
147456
147526
|
t2.forEach((e) => {
|
|
147457
|
-
e.charAt(0) === "@" ?
|
|
147527
|
+
e.charAt(0) === "@" ? Ct({ file: import_node_path20.default.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
|
|
147458
147528
|
}), s3.end();
|
|
147459
147529
|
};
|
|
147460
|
-
var
|
|
147461
|
-
for (let e of t2) e.charAt(0) === "@" ? await
|
|
147530
|
+
var _o = async (s3, t2) => {
|
|
147531
|
+
for (let e of t2) e.charAt(0) === "@" ? await Ct({ file: import_node_path20.default.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
|
|
147462
147532
|
s3.end();
|
|
147463
147533
|
};
|
|
147464
|
-
var vt = K2(
|
|
147534
|
+
var vt = K2(yo, go, () => {
|
|
147465
147535
|
throw new TypeError("file is required");
|
|
147466
147536
|
}, () => {
|
|
147467
147537
|
throw new TypeError("file is required");
|
|
147468
147538
|
}, (s3, t2) => {
|
|
147469
|
-
if (!
|
|
147539
|
+
if (!Bs(s3)) throw new TypeError("file is required");
|
|
147470
147540
|
if (s3.gzip || s3.brotli || s3.zstd || s3.file.endsWith(".br") || s3.file.endsWith(".tbr")) throw new TypeError("cannot append to compressed archives");
|
|
147471
147541
|
if (!t2?.length) throw new TypeError("no paths specified to add/replace");
|
|
147472
147542
|
});
|
|
147473
|
-
var
|
|
147474
|
-
vt.validate?.(s3, t2),
|
|
147543
|
+
var Oo = K2(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t2 = []) => {
|
|
147544
|
+
vt.validate?.(s3, t2), To(s3);
|
|
147475
147545
|
});
|
|
147476
|
-
var
|
|
147546
|
+
var To = (s3) => {
|
|
147477
147547
|
let t2 = s3.filter;
|
|
147478
147548
|
s3.mtimeCache || (s3.mtimeCache = /* @__PURE__ */ new Map()), s3.filter = t2 ? (e, i) => t2(e, i) && !((s3.mtimeCache?.get(e) ?? i.mtime ?? 0) > (i.mtime ?? 0)) : (e, i) => !((s3.mtimeCache?.get(e) ?? i.mtime ?? 0) > (i.mtime ?? 0));
|
|
147479
147549
|
};
|
|
@@ -147483,7 +147553,7 @@ async function unpackTarball(opts) {
|
|
|
147483
147553
|
const { tarballPath, destDir } = opts;
|
|
147484
147554
|
(0, import_node_fs16.rmSync)(destDir, { recursive: true, force: true });
|
|
147485
147555
|
(0, import_node_fs16.mkdirSync)(destDir, { recursive: true });
|
|
147486
|
-
await
|
|
147556
|
+
await So({ file: tarballPath, cwd: destDir });
|
|
147487
147557
|
}
|
|
147488
147558
|
|
|
147489
147559
|
// src/updater/install.ts
|
|
@@ -147779,7 +147849,7 @@ function registerProdCommands(program3) {
|
|
|
147779
147849
|
var log7 = getLogger("cli");
|
|
147780
147850
|
var program2 = new Command();
|
|
147781
147851
|
program2.name("threadbase-streamer").description("PTY session management, WebSocket streaming, and REST API server for Claude Code").version(getVersion());
|
|
147782
|
-
program2.command("serve").description("Start the streamer server").option("-p, --port <number>", "Port to listen on", "8766").option("--api-key <key>", "API key for authentication").option("--local-no-auth", "Skip auth for localhost requests", false).option("-v, --verbose", "Verbose output", false).option("--browse-root <path>", "Root directory for file browsing").option(
|
|
147852
|
+
program2.command("serve").description("Start the streamer server").option("-p, --port <number>", "Port to listen on", "8766").option("--api-key <key>", "API key for authentication").option("--local-no-auth", "Skip auth for localhost requests", false).option("-v, --verbose", "Verbose output", false).option("--log-menubar-requests", "Log /healthz requests from the menubar app", false).option("--browse-root <path>", "Root directory for file browsing").option(
|
|
147783
147853
|
"--public-url <url>",
|
|
147784
147854
|
"Public URL clients should use to reach this server (https:// required, except localhost). Falls back to THREADBASE_PUBLIC_URL env or public_url: in ~/.threadbase/server.yaml."
|
|
147785
147855
|
).option("--no-pair-qr", "Skip the pairing QR on startup", false).option("--replace-prod", "Stop the launchd-supervised prod streamer and bind its port", false).option("--forget", "Clear this repo's remembered dev-vs-prod choice and re-prompt", false).option("--forget-all", "Clear every repo's remembered dev-vs-prod choice", false).option(
|
|
@@ -147826,6 +147896,7 @@ program2.command("serve").description("Start the streamer server").option("-p, -
|
|
|
147826
147896
|
apiKey,
|
|
147827
147897
|
localNoAuth: opts.localNoAuth,
|
|
147828
147898
|
verbose: opts.verbose,
|
|
147899
|
+
logMenubarRequests: opts.logMenubarRequests,
|
|
147829
147900
|
browseRoot: opts.browseRoot,
|
|
147830
147901
|
publicUrl: opts.publicUrl
|
|
147831
147902
|
});
|