universal-picgo 1.10.0 → 1.10.2
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/index.js +252 -213
- package/dist/package.json +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -76,7 +76,7 @@ function EventEmitter() {
|
|
|
76
76
|
EventEmitter.init.call(this);
|
|
77
77
|
}
|
|
78
78
|
events.exports = EventEmitter;
|
|
79
|
-
events.exports.once = once$
|
|
79
|
+
events.exports.once = once$2;
|
|
80
80
|
EventEmitter.EventEmitter = EventEmitter;
|
|
81
81
|
EventEmitter.prototype._events = void 0;
|
|
82
82
|
EventEmitter.prototype._eventsCount = 0;
|
|
@@ -258,7 +258,7 @@ function unwrapListeners(_) {
|
|
|
258
258
|
$[te] = _[te].listener || _[te];
|
|
259
259
|
return $;
|
|
260
260
|
}
|
|
261
|
-
function once$
|
|
261
|
+
function once$2(_, $) {
|
|
262
262
|
return new Promise(function(te, ee) {
|
|
263
263
|
function ne(se) {
|
|
264
264
|
_.removeListener($, ie), ee(se);
|
|
@@ -12231,17 +12231,17 @@ process.env = {};
|
|
|
12231
12231
|
process.argv = [];
|
|
12232
12232
|
process.version = "";
|
|
12233
12233
|
process.versions = {};
|
|
12234
|
-
function noop$
|
|
12235
|
-
}
|
|
12236
|
-
process.on = noop$
|
|
12237
|
-
process.addListener = noop$
|
|
12238
|
-
process.once = noop$
|
|
12239
|
-
process.off = noop$
|
|
12240
|
-
process.removeListener = noop$
|
|
12241
|
-
process.removeAllListeners = noop$
|
|
12242
|
-
process.emit = noop$
|
|
12243
|
-
process.prependListener = noop$
|
|
12244
|
-
process.prependOnceListener = noop$
|
|
12234
|
+
function noop$3() {
|
|
12235
|
+
}
|
|
12236
|
+
process.on = noop$3;
|
|
12237
|
+
process.addListener = noop$3;
|
|
12238
|
+
process.once = noop$3;
|
|
12239
|
+
process.off = noop$3;
|
|
12240
|
+
process.removeListener = noop$3;
|
|
12241
|
+
process.removeAllListeners = noop$3;
|
|
12242
|
+
process.emit = noop$3;
|
|
12243
|
+
process.prependListener = noop$3;
|
|
12244
|
+
process.prependOnceListener = noop$3;
|
|
12245
12245
|
process.listeners = function(_) {
|
|
12246
12246
|
return [];
|
|
12247
12247
|
};
|
|
@@ -24874,7 +24874,11 @@ typeof Object.create == "function" ? inherits_browser.exports = function($, te)
|
|
|
24874
24874
|
ee.prototype = te.prototype, $.prototype = new ee(), $.prototype.constructor = $;
|
|
24875
24875
|
}
|
|
24876
24876
|
};
|
|
24877
|
-
var inherits_browserExports = inherits_browser.exports, readableBrowser$1 = { exports: {} }, streamBrowser$1
|
|
24877
|
+
var inherits_browserExports = inherits_browser.exports, readableBrowser$1 = { exports: {} }, streamBrowser$1, hasRequiredStreamBrowser;
|
|
24878
|
+
function requireStreamBrowser() {
|
|
24879
|
+
return hasRequiredStreamBrowser || (hasRequiredStreamBrowser = 1, streamBrowser$1 = eventsExports.EventEmitter), streamBrowser$1;
|
|
24880
|
+
}
|
|
24881
|
+
var util$c = {}, types$3 = {}, shams$1 = function() {
|
|
24878
24882
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
24879
24883
|
return !1;
|
|
24880
24884
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -25649,7 +25653,7 @@ var isBufferBrowser = function($) {
|
|
|
25649
25653
|
return $ && typeof $ == "object" && typeof $.copy == "function" && typeof $.fill == "function" && typeof $.readUInt8 == "function";
|
|
25650
25654
|
};
|
|
25651
25655
|
(function(_) {
|
|
25652
|
-
var $ = { DEV_MODE: "false", NODE_ENV: "production", PICGO_VERSION: "1.10.
|
|
25656
|
+
var $ = { DEV_MODE: "false", NODE_ENV: "production", PICGO_VERSION: "1.10.2" }, te = Object.getOwnPropertyDescriptors || function(pt) {
|
|
25653
25657
|
for (var dt = Object.keys(pt), tt = {}, Je = 0; Je < dt.length; Je++)
|
|
25654
25658
|
tt[dt[Je]] = Object.getOwnPropertyDescriptor(pt, dt[Je]);
|
|
25655
25659
|
return tt;
|
|
@@ -26213,33 +26217,40 @@ function requireBuffer_list() {
|
|
|
26213
26217
|
}]), ge;
|
|
26214
26218
|
}(), buffer_list;
|
|
26215
26219
|
}
|
|
26216
|
-
|
|
26217
|
-
|
|
26218
|
-
|
|
26219
|
-
|
|
26220
|
-
|
|
26221
|
-
|
|
26222
|
-
|
|
26223
|
-
|
|
26224
|
-
|
|
26225
|
-
|
|
26226
|
-
|
|
26227
|
-
|
|
26228
|
-
|
|
26229
|
-
|
|
26230
|
-
|
|
26231
|
-
|
|
26232
|
-
|
|
26233
|
-
|
|
26234
|
-
|
|
26235
|
-
|
|
26236
|
-
|
|
26220
|
+
var destroy_1$1, hasRequiredDestroy;
|
|
26221
|
+
function requireDestroy() {
|
|
26222
|
+
if (hasRequiredDestroy)
|
|
26223
|
+
return destroy_1$1;
|
|
26224
|
+
hasRequiredDestroy = 1;
|
|
26225
|
+
function _(se, oe) {
|
|
26226
|
+
var ue = this, fe = this._readableState && this._readableState.destroyed, le = this._writableState && this._writableState.destroyed;
|
|
26227
|
+
return fe || le ? (oe ? oe(se) : se && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = !0, process$1.nextTick(ne, this, se)) : process$1.nextTick(ne, this, se)), this) : (this._readableState && (this._readableState.destroyed = !0), this._writableState && (this._writableState.destroyed = !0), this._destroy(se || null, function(de) {
|
|
26228
|
+
!oe && de ? ue._writableState ? ue._writableState.errorEmitted ? process$1.nextTick(te, ue) : (ue._writableState.errorEmitted = !0, process$1.nextTick($, ue, de)) : process$1.nextTick($, ue, de) : oe ? (process$1.nextTick(te, ue), oe(de)) : process$1.nextTick(te, ue);
|
|
26229
|
+
}), this);
|
|
26230
|
+
}
|
|
26231
|
+
function $(se, oe) {
|
|
26232
|
+
ne(se, oe), te(se);
|
|
26233
|
+
}
|
|
26234
|
+
function te(se) {
|
|
26235
|
+
se._writableState && !se._writableState.emitClose || se._readableState && !se._readableState.emitClose || se.emit("close");
|
|
26236
|
+
}
|
|
26237
|
+
function ee() {
|
|
26238
|
+
this._readableState && (this._readableState.destroyed = !1, this._readableState.reading = !1, this._readableState.ended = !1, this._readableState.endEmitted = !1), this._writableState && (this._writableState.destroyed = !1, this._writableState.ended = !1, this._writableState.ending = !1, this._writableState.finalCalled = !1, this._writableState.prefinished = !1, this._writableState.finished = !1, this._writableState.errorEmitted = !1);
|
|
26239
|
+
}
|
|
26240
|
+
function ne(se, oe) {
|
|
26241
|
+
se.emit("error", oe);
|
|
26242
|
+
}
|
|
26243
|
+
function ie(se, oe) {
|
|
26244
|
+
var ue = se._readableState, fe = se._writableState;
|
|
26245
|
+
ue && ue.autoDestroy || fe && fe.autoDestroy ? se.destroy(oe) : se.emit("error", oe);
|
|
26246
|
+
}
|
|
26247
|
+
return destroy_1$1 = {
|
|
26248
|
+
destroy: _,
|
|
26249
|
+
undestroy: ee,
|
|
26250
|
+
errorOrDestroy: ie
|
|
26251
|
+
}, destroy_1$1;
|
|
26237
26252
|
}
|
|
26238
|
-
var
|
|
26239
|
-
destroy: destroy$1,
|
|
26240
|
-
undestroy: undestroy$1,
|
|
26241
|
-
errorOrDestroy
|
|
26242
|
-
}, errorsBrowser = {};
|
|
26253
|
+
var errorsBrowser = {};
|
|
26243
26254
|
function _inheritsLoose(_, $) {
|
|
26244
26255
|
_.prototype = Object.create($.prototype), _.prototype.constructor = _, _.__proto__ = $;
|
|
26245
26256
|
}
|
|
@@ -26308,24 +26319,31 @@ createErrorType("ERR_UNKNOWN_ENCODING", function(_) {
|
|
|
26308
26319
|
}, TypeError);
|
|
26309
26320
|
createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event");
|
|
26310
26321
|
errorsBrowser.codes = codes;
|
|
26311
|
-
var
|
|
26312
|
-
function
|
|
26313
|
-
|
|
26314
|
-
|
|
26315
|
-
|
|
26316
|
-
var
|
|
26317
|
-
|
|
26318
|
-
|
|
26319
|
-
|
|
26320
|
-
|
|
26321
|
-
|
|
26322
|
-
|
|
26323
|
-
|
|
26324
|
-
|
|
26325
|
-
|
|
26326
|
-
|
|
26327
|
-
|
|
26328
|
-
}
|
|
26322
|
+
var state, hasRequiredState;
|
|
26323
|
+
function requireState() {
|
|
26324
|
+
if (hasRequiredState)
|
|
26325
|
+
return state;
|
|
26326
|
+
hasRequiredState = 1;
|
|
26327
|
+
var _ = errorsBrowser.codes.ERR_INVALID_OPT_VALUE;
|
|
26328
|
+
function $(ee, ne, ie) {
|
|
26329
|
+
return ee.highWaterMark != null ? ee.highWaterMark : ne ? ee[ie] : null;
|
|
26330
|
+
}
|
|
26331
|
+
function te(ee, ne, ie, se) {
|
|
26332
|
+
var oe = $(ne, se, ie);
|
|
26333
|
+
if (oe != null) {
|
|
26334
|
+
if (!(isFinite(oe) && Math.floor(oe) === oe) || oe < 0) {
|
|
26335
|
+
var ue = se ? ie : "highWaterMark";
|
|
26336
|
+
throw new _(ue, oe);
|
|
26337
|
+
}
|
|
26338
|
+
return Math.floor(oe);
|
|
26339
|
+
}
|
|
26340
|
+
return ee.objectMode ? 16 : 16 * 1024;
|
|
26341
|
+
}
|
|
26342
|
+
return state = {
|
|
26343
|
+
getHighWaterMark: te
|
|
26344
|
+
}, state;
|
|
26345
|
+
}
|
|
26346
|
+
var browser$d = deprecate;
|
|
26329
26347
|
function deprecate(_, $) {
|
|
26330
26348
|
if (config$9("noDeprecation"))
|
|
26331
26349
|
return _;
|
|
@@ -26365,7 +26383,7 @@ function require_stream_writable$1() {
|
|
|
26365
26383
|
Be.WritableState = ke;
|
|
26366
26384
|
var te = {
|
|
26367
26385
|
deprecate: browser$d
|
|
26368
|
-
}, ee =
|
|
26386
|
+
}, ee = requireStreamBrowser(), ne = dist$1.Buffer, ie = (typeof commonjsGlobal < "u" ? commonjsGlobal : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array || function() {
|
|
26369
26387
|
};
|
|
26370
26388
|
function se(tt) {
|
|
26371
26389
|
return ne.from(tt);
|
|
@@ -26373,7 +26391,7 @@ function require_stream_writable$1() {
|
|
|
26373
26391
|
function oe(tt) {
|
|
26374
26392
|
return ne.isBuffer(tt) || tt instanceof ie;
|
|
26375
26393
|
}
|
|
26376
|
-
var ue =
|
|
26394
|
+
var ue = requireDestroy(), fe = requireState(), le = fe.getHighWaterMark, de = errorsBrowser.codes, pe = de.ERR_INVALID_ARG_TYPE, he = de.ERR_METHOD_NOT_IMPLEMENTED, ge = de.ERR_MULTIPLE_CALLBACK, me = de.ERR_STREAM_CANNOT_PIPE, ye = de.ERR_STREAM_DESTROYED, xe = de.ERR_STREAM_NULL_VALUES, ve = de.ERR_STREAM_WRITE_AFTER_END, Se = de.ERR_UNKNOWN_ENCODING, Te = ue.errorOrDestroy;
|
|
26377
26395
|
inherits_browserExports(Be, ee);
|
|
26378
26396
|
function De() {
|
|
26379
26397
|
}
|
|
@@ -26812,49 +26830,56 @@ function simpleWrite(_) {
|
|
|
26812
26830
|
function simpleEnd(_) {
|
|
26813
26831
|
return _ && _.length ? this.write(_) : "";
|
|
26814
26832
|
}
|
|
26815
|
-
var
|
|
26816
|
-
function
|
|
26817
|
-
|
|
26818
|
-
|
|
26819
|
-
|
|
26820
|
-
|
|
26821
|
-
|
|
26822
|
-
|
|
26823
|
-
|
|
26824
|
-
|
|
26825
|
-
|
|
26826
|
-
|
|
26827
|
-
|
|
26828
|
-
|
|
26829
|
-
|
|
26830
|
-
|
|
26831
|
-
}
|
|
26832
|
-
function
|
|
26833
|
-
|
|
26834
|
-
|
|
26835
|
-
|
|
26836
|
-
|
|
26837
|
-
|
|
26838
|
-
|
|
26839
|
-
|
|
26840
|
-
|
|
26841
|
-
|
|
26842
|
-
|
|
26843
|
-
|
|
26844
|
-
|
|
26845
|
-
|
|
26846
|
-
|
|
26847
|
-
|
|
26848
|
-
|
|
26849
|
-
|
|
26850
|
-
|
|
26851
|
-
|
|
26852
|
-
|
|
26853
|
-
|
|
26854
|
-
|
|
26855
|
-
|
|
26833
|
+
var endOfStream, hasRequiredEndOfStream;
|
|
26834
|
+
function requireEndOfStream() {
|
|
26835
|
+
if (hasRequiredEndOfStream)
|
|
26836
|
+
return endOfStream;
|
|
26837
|
+
hasRequiredEndOfStream = 1;
|
|
26838
|
+
var _ = errorsBrowser.codes.ERR_STREAM_PREMATURE_CLOSE;
|
|
26839
|
+
function $(ie) {
|
|
26840
|
+
var se = !1;
|
|
26841
|
+
return function() {
|
|
26842
|
+
if (!se) {
|
|
26843
|
+
se = !0;
|
|
26844
|
+
for (var oe = arguments.length, ue = new Array(oe), fe = 0; fe < oe; fe++)
|
|
26845
|
+
ue[fe] = arguments[fe];
|
|
26846
|
+
ie.apply(this, ue);
|
|
26847
|
+
}
|
|
26848
|
+
};
|
|
26849
|
+
}
|
|
26850
|
+
function te() {
|
|
26851
|
+
}
|
|
26852
|
+
function ee(ie) {
|
|
26853
|
+
return ie.setHeader && typeof ie.abort == "function";
|
|
26854
|
+
}
|
|
26855
|
+
function ne(ie, se, oe) {
|
|
26856
|
+
if (typeof se == "function")
|
|
26857
|
+
return ne(ie, null, se);
|
|
26858
|
+
se || (se = {}), oe = $(oe || te);
|
|
26859
|
+
var ue = se.readable || se.readable !== !1 && ie.readable, fe = se.writable || se.writable !== !1 && ie.writable, le = function() {
|
|
26860
|
+
ie.writable || pe();
|
|
26861
|
+
}, de = ie._writableState && ie._writableState.finished, pe = function() {
|
|
26862
|
+
fe = !1, de = !0, ue || oe.call(ie);
|
|
26863
|
+
}, he = ie._readableState && ie._readableState.endEmitted, ge = function() {
|
|
26864
|
+
ue = !1, he = !0, fe || oe.call(ie);
|
|
26865
|
+
}, me = function(Se) {
|
|
26866
|
+
oe.call(ie, Se);
|
|
26867
|
+
}, ye = function() {
|
|
26868
|
+
var Se;
|
|
26869
|
+
if (ue && !he)
|
|
26870
|
+
return (!ie._readableState || !ie._readableState.ended) && (Se = new _()), oe.call(ie, Se);
|
|
26871
|
+
if (fe && !de)
|
|
26872
|
+
return (!ie._writableState || !ie._writableState.ended) && (Se = new _()), oe.call(ie, Se);
|
|
26873
|
+
}, xe = function() {
|
|
26874
|
+
ie.req.on("finish", pe);
|
|
26875
|
+
};
|
|
26876
|
+
return ee(ie) ? (ie.on("complete", pe), ie.on("abort", ye), ie.req ? xe() : ie.on("request", xe)) : fe && !ie._writableState && (ie.on("end", le), ie.on("close", le)), ie.on("end", ge), ie.on("finish", pe), se.error !== !1 && ie.on("error", me), ie.on("close", ye), function() {
|
|
26877
|
+
ie.removeListener("complete", pe), ie.removeListener("abort", ye), ie.removeListener("request", xe), ie.req && ie.req.removeListener("finish", pe), ie.removeListener("end", le), ie.removeListener("close", le), ie.removeListener("finish", pe), ie.removeListener("end", ge), ie.removeListener("error", me), ie.removeListener("close", ye);
|
|
26878
|
+
};
|
|
26879
|
+
}
|
|
26880
|
+
return endOfStream = ne, endOfStream;
|
|
26856
26881
|
}
|
|
26857
|
-
var
|
|
26882
|
+
var async_iterator, hasRequiredAsync_iterator;
|
|
26858
26883
|
function requireAsync_iterator() {
|
|
26859
26884
|
if (hasRequiredAsync_iterator)
|
|
26860
26885
|
return async_iterator;
|
|
@@ -26879,7 +26904,7 @@ function requireAsync_iterator() {
|
|
|
26879
26904
|
}
|
|
26880
26905
|
return (Te === "string" ? String : Number)(Se);
|
|
26881
26906
|
}
|
|
26882
|
-
var ne =
|
|
26907
|
+
var ne = requireEndOfStream(), ie = Symbol("lastResolve"), se = Symbol("lastReject"), oe = Symbol("error"), ue = Symbol("ended"), fe = Symbol("lastPromise"), le = Symbol("handlePromise"), de = Symbol("stream");
|
|
26883
26908
|
function pe(Se, Te) {
|
|
26884
26909
|
return {
|
|
26885
26910
|
value: Se,
|
|
@@ -26998,7 +27023,7 @@ function require_stream_readable$1() {
|
|
|
26998
27023
|
Me.ReadableState = Be, eventsExports.EventEmitter;
|
|
26999
27024
|
var $ = function(wt, ht) {
|
|
27000
27025
|
return wt.listeners(ht).length;
|
|
27001
|
-
}, te =
|
|
27026
|
+
}, te = requireStreamBrowser(), ee = dist$1.Buffer, ne = (typeof commonjsGlobal < "u" ? commonjsGlobal : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array || function() {
|
|
27002
27027
|
};
|
|
27003
27028
|
function ie(rt) {
|
|
27004
27029
|
return ee.from(rt);
|
|
@@ -27009,7 +27034,7 @@ function require_stream_readable$1() {
|
|
|
27009
27034
|
var oe = util$c, ue;
|
|
27010
27035
|
oe && oe.debuglog ? ue = oe.debuglog("stream") : ue = function() {
|
|
27011
27036
|
};
|
|
27012
|
-
var fe = requireBuffer_list(), le =
|
|
27037
|
+
var fe = requireBuffer_list(), le = requireDestroy(), de = requireState(), pe = de.getHighWaterMark, he = errorsBrowser.codes, ge = he.ERR_INVALID_ARG_TYPE, me = he.ERR_STREAM_PUSH_AFTER_EOF, ye = he.ERR_METHOD_NOT_IMPLEMENTED, xe = he.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, ve, Se, Te;
|
|
27013
27038
|
inherits_browserExports(Me, te);
|
|
27014
27039
|
var De = le.errorOrDestroy, ke = ["error", "close", "destroy", "pause", "resume"];
|
|
27015
27040
|
function Ne(rt, wt, ht) {
|
|
@@ -27336,77 +27361,86 @@ function require_stream_readable$1() {
|
|
|
27336
27361
|
}
|
|
27337
27362
|
return _stream_readable$1;
|
|
27338
27363
|
}
|
|
27339
|
-
var _stream_transform$1
|
|
27340
|
-
|
|
27341
|
-
|
|
27342
|
-
|
|
27343
|
-
|
|
27344
|
-
var
|
|
27345
|
-
|
|
27346
|
-
|
|
27347
|
-
|
|
27348
|
-
|
|
27349
|
-
|
|
27350
|
-
|
|
27351
|
-
|
|
27352
|
-
|
|
27353
|
-
|
|
27354
|
-
|
|
27355
|
-
afterTransform: afterTransform$1.bind(this),
|
|
27356
|
-
needTransform: !1,
|
|
27357
|
-
transforming: !1,
|
|
27358
|
-
writecb: null,
|
|
27359
|
-
writechunk: null,
|
|
27360
|
-
writeencoding: null
|
|
27361
|
-
}, this._readableState.needReadable = !0, this._readableState.sync = !1, _ && (typeof _.transform == "function" && (this._transform = _.transform), typeof _.flush == "function" && (this._flush = _.flush)), this.on("prefinish", prefinish$1);
|
|
27362
|
-
}
|
|
27363
|
-
function prefinish$1() {
|
|
27364
|
-
var _ = this;
|
|
27365
|
-
typeof this._flush == "function" && !this._readableState.destroyed ? this._flush(function($, te) {
|
|
27366
|
-
done$1(_, $, te);
|
|
27367
|
-
}) : done$1(this, null, null);
|
|
27368
|
-
}
|
|
27369
|
-
Transform$9.prototype.push = function(_, $) {
|
|
27370
|
-
return this._transformState.needTransform = !1, Duplex$1.prototype.push.call(this, _, $);
|
|
27371
|
-
};
|
|
27372
|
-
Transform$9.prototype._transform = function(_, $, te) {
|
|
27373
|
-
te(new ERR_METHOD_NOT_IMPLEMENTED("_transform()"));
|
|
27374
|
-
};
|
|
27375
|
-
Transform$9.prototype._write = function(_, $, te) {
|
|
27376
|
-
var ee = this._transformState;
|
|
27377
|
-
if (ee.writecb = te, ee.writechunk = _, ee.writeencoding = $, !ee.transforming) {
|
|
27378
|
-
var ne = this._readableState;
|
|
27379
|
-
(ee.needTransform || ne.needReadable || ne.length < ne.highWaterMark) && this._read(ne.highWaterMark);
|
|
27364
|
+
var _stream_transform$1, hasRequired_stream_transform;
|
|
27365
|
+
function require_stream_transform() {
|
|
27366
|
+
if (hasRequired_stream_transform)
|
|
27367
|
+
return _stream_transform$1;
|
|
27368
|
+
hasRequired_stream_transform = 1, _stream_transform$1 = oe;
|
|
27369
|
+
var _ = errorsBrowser.codes, $ = _.ERR_METHOD_NOT_IMPLEMENTED, te = _.ERR_MULTIPLE_CALLBACK, ee = _.ERR_TRANSFORM_ALREADY_TRANSFORMING, ne = _.ERR_TRANSFORM_WITH_LENGTH_0, ie = require_stream_duplex$1();
|
|
27370
|
+
inherits_browserExports(oe, ie);
|
|
27371
|
+
function se(le, de) {
|
|
27372
|
+
var pe = this._transformState;
|
|
27373
|
+
pe.transforming = !1;
|
|
27374
|
+
var he = pe.writecb;
|
|
27375
|
+
if (he === null)
|
|
27376
|
+
return this.emit("error", new te());
|
|
27377
|
+
pe.writechunk = null, pe.writecb = null, de != null && this.push(de), he(le);
|
|
27378
|
+
var ge = this._readableState;
|
|
27379
|
+
ge.reading = !1, (ge.needReadable || ge.length < ge.highWaterMark) && this._read(ge.highWaterMark);
|
|
27380
27380
|
}
|
|
27381
|
-
|
|
27382
|
-
|
|
27383
|
-
|
|
27384
|
-
|
|
27385
|
-
|
|
27386
|
-
|
|
27387
|
-
|
|
27388
|
-
|
|
27389
|
-
|
|
27390
|
-
|
|
27391
|
-
|
|
27392
|
-
|
|
27393
|
-
|
|
27394
|
-
|
|
27395
|
-
|
|
27396
|
-
|
|
27397
|
-
|
|
27398
|
-
|
|
27399
|
-
|
|
27400
|
-
|
|
27401
|
-
|
|
27402
|
-
|
|
27403
|
-
|
|
27404
|
-
|
|
27405
|
-
|
|
27381
|
+
function oe(le) {
|
|
27382
|
+
if (!(this instanceof oe))
|
|
27383
|
+
return new oe(le);
|
|
27384
|
+
ie.call(this, le), this._transformState = {
|
|
27385
|
+
afterTransform: se.bind(this),
|
|
27386
|
+
needTransform: !1,
|
|
27387
|
+
transforming: !1,
|
|
27388
|
+
writecb: null,
|
|
27389
|
+
writechunk: null,
|
|
27390
|
+
writeencoding: null
|
|
27391
|
+
}, this._readableState.needReadable = !0, this._readableState.sync = !1, le && (typeof le.transform == "function" && (this._transform = le.transform), typeof le.flush == "function" && (this._flush = le.flush)), this.on("prefinish", ue);
|
|
27392
|
+
}
|
|
27393
|
+
function ue() {
|
|
27394
|
+
var le = this;
|
|
27395
|
+
typeof this._flush == "function" && !this._readableState.destroyed ? this._flush(function(de, pe) {
|
|
27396
|
+
fe(le, de, pe);
|
|
27397
|
+
}) : fe(this, null, null);
|
|
27398
|
+
}
|
|
27399
|
+
oe.prototype.push = function(le, de) {
|
|
27400
|
+
return this._transformState.needTransform = !1, ie.prototype.push.call(this, le, de);
|
|
27401
|
+
}, oe.prototype._transform = function(le, de, pe) {
|
|
27402
|
+
pe(new $("_transform()"));
|
|
27403
|
+
}, oe.prototype._write = function(le, de, pe) {
|
|
27404
|
+
var he = this._transformState;
|
|
27405
|
+
if (he.writecb = pe, he.writechunk = le, he.writeencoding = de, !he.transforming) {
|
|
27406
|
+
var ge = this._readableState;
|
|
27407
|
+
(he.needTransform || ge.needReadable || ge.length < ge.highWaterMark) && this._read(ge.highWaterMark);
|
|
27408
|
+
}
|
|
27409
|
+
}, oe.prototype._read = function(le) {
|
|
27410
|
+
var de = this._transformState;
|
|
27411
|
+
de.writechunk !== null && !de.transforming ? (de.transforming = !0, this._transform(de.writechunk, de.writeencoding, de.afterTransform)) : de.needTransform = !0;
|
|
27412
|
+
}, oe.prototype._destroy = function(le, de) {
|
|
27413
|
+
ie.prototype._destroy.call(this, le, function(pe) {
|
|
27414
|
+
de(pe);
|
|
27415
|
+
});
|
|
27416
|
+
};
|
|
27417
|
+
function fe(le, de, pe) {
|
|
27418
|
+
if (de)
|
|
27419
|
+
return le.emit("error", de);
|
|
27420
|
+
if (pe != null && le.push(pe), le._writableState.length)
|
|
27421
|
+
throw new ne();
|
|
27422
|
+
if (le._transformState.transforming)
|
|
27423
|
+
throw new ee();
|
|
27424
|
+
return le.push(null);
|
|
27425
|
+
}
|
|
27426
|
+
return _stream_transform$1;
|
|
27427
|
+
}
|
|
27428
|
+
var _stream_passthrough$1, hasRequired_stream_passthrough;
|
|
27429
|
+
function require_stream_passthrough() {
|
|
27430
|
+
if (hasRequired_stream_passthrough)
|
|
27431
|
+
return _stream_passthrough$1;
|
|
27432
|
+
hasRequired_stream_passthrough = 1, _stream_passthrough$1 = $;
|
|
27433
|
+
var _ = require_stream_transform();
|
|
27434
|
+
inherits_browserExports($, _);
|
|
27435
|
+
function $(te) {
|
|
27436
|
+
if (!(this instanceof $))
|
|
27437
|
+
return new $(te);
|
|
27438
|
+
_.call(this, te);
|
|
27439
|
+
}
|
|
27440
|
+
return $.prototype._transform = function(te, ee, ne) {
|
|
27441
|
+
ne(null, te);
|
|
27442
|
+
}, _stream_passthrough$1;
|
|
27406
27443
|
}
|
|
27407
|
-
PassThrough$1.prototype._transform = function(_, $, te) {
|
|
27408
|
-
te(null, _);
|
|
27409
|
-
};
|
|
27410
27444
|
var eos;
|
|
27411
27445
|
function once$1(_) {
|
|
27412
27446
|
var $ = !1;
|
|
@@ -27427,7 +27461,7 @@ function destroyer(_, $, te, ee) {
|
|
|
27427
27461
|
var ne = !1;
|
|
27428
27462
|
_.on("close", function() {
|
|
27429
27463
|
ne = !0;
|
|
27430
|
-
}), eos === void 0 && (eos =
|
|
27464
|
+
}), eos === void 0 && (eos = requireEndOfStream()), eos(_, {
|
|
27431
27465
|
readable: $,
|
|
27432
27466
|
writable: te
|
|
27433
27467
|
}, function(se) {
|
|
@@ -27471,7 +27505,7 @@ function pipeline() {
|
|
|
27471
27505
|
}
|
|
27472
27506
|
var pipeline_1 = pipeline;
|
|
27473
27507
|
(function(_, $) {
|
|
27474
|
-
$ = _.exports = require_stream_readable$1(), $.Stream = $, $.Readable = $, $.Writable = require_stream_writable$1(), $.Duplex = require_stream_duplex$1(), $.Transform =
|
|
27508
|
+
$ = _.exports = require_stream_readable$1(), $.Stream = $, $.Readable = $, $.Writable = require_stream_writable$1(), $.Duplex = require_stream_duplex$1(), $.Transform = require_stream_transform(), $.PassThrough = require_stream_passthrough(), $.finished = requireEndOfStream(), $.pipeline = pipeline_1;
|
|
27475
27509
|
})(readableBrowser$1, readableBrowser$1.exports);
|
|
27476
27510
|
var readableBrowserExports$1 = readableBrowser$1.exports, Buffer$A = safeBufferExports$1.Buffer, Transform$7 = readableBrowserExports$1.Transform, inherits$t = inherits_browserExports;
|
|
27477
27511
|
function throwIfNotStringOrBuffer(_, $) {
|
|
@@ -28403,9 +28437,9 @@ inherits$k(Stream, EE);
|
|
|
28403
28437
|
Stream.Readable = require_stream_readable$1();
|
|
28404
28438
|
Stream.Writable = require_stream_writable$1();
|
|
28405
28439
|
Stream.Duplex = require_stream_duplex$1();
|
|
28406
|
-
Stream.Transform =
|
|
28407
|
-
Stream.PassThrough =
|
|
28408
|
-
Stream.finished =
|
|
28440
|
+
Stream.Transform = require_stream_transform();
|
|
28441
|
+
Stream.PassThrough = require_stream_passthrough();
|
|
28442
|
+
Stream.finished = requireEndOfStream();
|
|
28409
28443
|
Stream.pipeline = pipeline_1;
|
|
28410
28444
|
Stream.Stream = Stream;
|
|
28411
28445
|
function Stream() {
|
|
@@ -39402,7 +39436,16 @@ const getImageSize = (_) => {
|
|
|
39402
39436
|
return $.warn(`Can't find plugin: ${_}`), "";
|
|
39403
39437
|
}
|
|
39404
39438
|
}
|
|
39405
|
-
}, isSiyuanProxyAvailable = (_) => _ && _.trim() !== "" && _ === Tt.location.origin,
|
|
39439
|
+
}, isSiyuanProxyAvailable = (_) => _ && _.trim() !== "" && _ === Tt.location.origin, getBrowserDirectoryPath = (_) => {
|
|
39440
|
+
const $ = _.split("/");
|
|
39441
|
+
return $.pop(), $.join("/");
|
|
39442
|
+
}, browserPathJoin = (..._) => {
|
|
39443
|
+
const $ = _.filter((ee) => ee && ee.trim() !== "");
|
|
39444
|
+
if ($.length === 0)
|
|
39445
|
+
return "";
|
|
39446
|
+
let te = $.join("/");
|
|
39447
|
+
return te = te.replace(/([^:/]|^)\/{2,}/g, "$1/"), te;
|
|
39448
|
+
}, postOptions$7 = (_, $, te) => {
|
|
39406
39449
|
const ee = $.path || "", { token: ne, repo: ie } = $;
|
|
39407
39450
|
return {
|
|
39408
39451
|
method: "PUT",
|
|
@@ -39438,9 +39481,11 @@ const getImageSize = (_) => {
|
|
|
39438
39481
|
try {
|
|
39439
39482
|
const de = await _.request(le);
|
|
39440
39483
|
if (de)
|
|
39441
|
-
delete oe.base64Image, delete oe.buffer, $.customUrl
|
|
39442
|
-
|
|
39443
|
-
|
|
39484
|
+
if (delete oe.base64Image, delete oe.buffer, $.customUrl) {
|
|
39485
|
+
let pe = $.customUrl;
|
|
39486
|
+
$.path && (pe = browserPathJoin(pe, encodeURI($.path))), pe = browserPathJoin(pe, encodeURIComponent(oe.fileName)), oe.imgUrl = pe;
|
|
39487
|
+
} else
|
|
39488
|
+
oe.imgUrl = de.content.download_url;
|
|
39444
39489
|
else
|
|
39445
39490
|
throw new Error("Server error, please try again");
|
|
39446
39491
|
} catch (de) {
|
|
@@ -39557,10 +39602,10 @@ const postOptions$6 = (_, $, te) => {
|
|
|
39557
39602
|
encoding: "base64",
|
|
39558
39603
|
commit_message: _.commitMessage,
|
|
39559
39604
|
content: $
|
|
39560
|
-
}, ne = encodeURIComponent(_.repo), ie =
|
|
39605
|
+
}, ne = encodeURIComponent(_.repo), ie = _.path || "", se = encodeURIComponent(ie + te);
|
|
39561
39606
|
return {
|
|
39562
39607
|
method: "POST",
|
|
39563
|
-
url: `${_.url}/api/v4/projects/${ne}/repository/files/${
|
|
39608
|
+
url: `${_.url}/api/v4/projects/${ne}/repository/files/${se}`,
|
|
39564
39609
|
headers: {
|
|
39565
39610
|
"Content-Type": "application/json",
|
|
39566
39611
|
// "User-Agent": "PicGo",
|
|
@@ -60274,7 +60319,7 @@ const OSS = /* @__PURE__ */ getDefaultExportFromCjs$1(aliyunOssSdkExports), hand
|
|
|
60274
60319
|
accessKeyId: $.accessKeyId,
|
|
60275
60320
|
accessKeySecret: $.accessKeySecret,
|
|
60276
60321
|
bucket: $.bucket
|
|
60277
|
-
}), ee = _.output, ne = $.customUrl, ie = $.path;
|
|
60322
|
+
}), ee = _.output, ne = $.customUrl || "", ie = $.path || "";
|
|
60278
60323
|
for (const ue of ee)
|
|
60279
60324
|
if (ue.fileName) {
|
|
60280
60325
|
let fe = ue.buffer;
|
|
@@ -60326,7 +60371,7 @@ ${te}
|
|
|
60326
60371
|
const $ = _.getConfig("picBed.aliyun");
|
|
60327
60372
|
if (!$)
|
|
60328
60373
|
throw new Error("Can't find aliYun OSS config");
|
|
60329
|
-
const te = _.output, ee = $.customUrl, ne = $.path;
|
|
60374
|
+
const te = _.output, ee = $.customUrl || "", ne = $.path || "";
|
|
60330
60375
|
for (const se of te)
|
|
60331
60376
|
if (se.fileName) {
|
|
60332
60377
|
let oe = se.buffer;
|
|
@@ -60476,7 +60521,7 @@ ${pe}
|
|
|
60476
60521
|
signTime: oe
|
|
60477
60522
|
};
|
|
60478
60523
|
}, postOptions$4 = (_, $, te, ee, ne) => {
|
|
60479
|
-
const ie = _.area, se = _.path;
|
|
60524
|
+
const ie = _.area, se = _.path || "";
|
|
60480
60525
|
return !_.version || _.version === "v4" ? {
|
|
60481
60526
|
method: "POST",
|
|
60482
60527
|
url: `http://${ie}.file.myqcloud.com/files/v2/${te.appId}/${te.bucket}/${encodeURI(
|
|
@@ -60789,8 +60834,8 @@ const handle$6 = async (_) => {
|
|
|
60789
60834
|
const ie = postOptions$3($, ee.fileName, getToken($), ne), se = await _.request(ie), oe = safeParse(se);
|
|
60790
60835
|
if (oe != null && oe.key) {
|
|
60791
60836
|
delete ee.base64Image, delete ee.buffer;
|
|
60792
|
-
const ue = $.url, fe = $.options;
|
|
60793
|
-
ee.imgUrl =
|
|
60837
|
+
const ue = $.url, fe = $.options || "";
|
|
60838
|
+
ee.imgUrl = browserPathJoin(ue, oe.key, fe);
|
|
60794
60839
|
} else
|
|
60795
60840
|
throw _.emit(IBuildInEvent.NOTIFICATION, {
|
|
60796
60841
|
title: _.i18n.translate("UPLOAD_FAILED"),
|
|
@@ -61378,7 +61423,7 @@ const hostHeaderMiddleware = (_) => ($) => async (te) => {
|
|
|
61378
61423
|
$.add(loggerMiddleware(), loggerMiddlewareOptions);
|
|
61379
61424
|
}
|
|
61380
61425
|
});
|
|
61381
|
-
var define_process_env_default$2 = { DEV_MODE: "false", NODE_ENV: "production", PICGO_VERSION: "1.10.
|
|
61426
|
+
var define_process_env_default$2 = { DEV_MODE: "false", NODE_ENV: "production", PICGO_VERSION: "1.10.2" };
|
|
61382
61427
|
const TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id", ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME", ENV_TRACE_ID = "_X_AMZN_TRACE_ID", recursionDetectionMiddleware = (_) => ($) => async (te) => {
|
|
61383
61428
|
const { request: ee } = te;
|
|
61384
61429
|
if (!HttpRequest.isInstance(ee) || _.runtime !== "node" || ee.headers.hasOwnProperty(TRACE_ID_HEADER_NAME))
|
|
@@ -73579,10 +73624,10 @@ const uploader = {
|
|
|
73579
73624
|
client: te,
|
|
73580
73625
|
index: oe,
|
|
73581
73626
|
bucketName: $.bucketName,
|
|
73582
|
-
path: formatPath(se, $.uploadPath),
|
|
73627
|
+
path: formatPath(se, $.uploadPath || ""),
|
|
73583
73628
|
item: se,
|
|
73584
73629
|
acl: $.acl || "public-read",
|
|
73585
|
-
customUrl: $.customUrl,
|
|
73630
|
+
customUrl: $.customUrl || "",
|
|
73586
73631
|
corsProxy: $.corsProxy
|
|
73587
73632
|
})
|
|
73588
73633
|
);
|
|
@@ -74121,16 +74166,7 @@ const dayjs = /* @__PURE__ */ getDefaultExportFromCjs$1(dayjs_minExports), handl
|
|
|
74121
74166
|
register(_) {
|
|
74122
74167
|
_.helper.transformer.register("path", ImgFromPath), _.helper.transformer.register("base64", ImgFromBase64);
|
|
74123
74168
|
}
|
|
74124
|
-
})
|
|
74125
|
-
const $ = _.split("/");
|
|
74126
|
-
return $.pop(), $.join("/");
|
|
74127
|
-
}, browserPathJoin = (..._) => {
|
|
74128
|
-
const $ = _.filter((ee) => ee && ee.trim() !== "");
|
|
74129
|
-
if ($.length === 0)
|
|
74130
|
-
return "";
|
|
74131
|
-
let te = $.join("/");
|
|
74132
|
-
return te = te.replace(/([^:/]|^)\/{2,}/g, "$1/"), te;
|
|
74133
|
-
};
|
|
74169
|
+
});
|
|
74134
74170
|
class PluginLoaderDb {
|
|
74135
74171
|
constructor($) {
|
|
74136
74172
|
Gr(this, "ctx");
|
|
@@ -80852,7 +80888,7 @@ logger.logger = new Logger();
|
|
|
80852
80888
|
(function(_) {
|
|
80853
80889
|
Object.defineProperty(_, "__esModule", { value: !0 }), (0, require$$0.__exportStar)(logger, _);
|
|
80854
80890
|
})(utils$2);
|
|
80855
|
-
var define_process_env_default$1 = { DEV_MODE: "false", NODE_ENV: "production", PICGO_VERSION: "1.10.
|
|
80891
|
+
var define_process_env_default$1 = { DEV_MODE: "false", NODE_ENV: "production", PICGO_VERSION: "1.10.2" };
|
|
80856
80892
|
Object.defineProperty(fileSync, "__esModule", { value: !0 });
|
|
80857
80893
|
fileSync.FileSyncAdapter = void 0;
|
|
80858
80894
|
const tslib_1 = require$$0, fs = (0, tslib_1.__importStar)(require$$1), path = (0, tslib_1.__importStar)(pathBrowserify), base_1$1 = base, utils_1$1 = utils$2, types_1 = types$1;
|
|
@@ -84578,7 +84614,7 @@ class PicGoRequestWrapper {
|
|
|
84578
84614
|
}
|
|
84579
84615
|
}
|
|
84580
84616
|
}
|
|
84581
|
-
var define_process_env_default = { DEV_MODE: "false", NODE_ENV: "production", PICGO_VERSION: "1.10.
|
|
84617
|
+
var define_process_env_default = { DEV_MODE: "false", NODE_ENV: "production", PICGO_VERSION: "1.10.2" };
|
|
84582
84618
|
class UniversalPicGo extends eventsExports.EventEmitter {
|
|
84583
84619
|
constructor(te, ee, ne, ie) {
|
|
84584
84620
|
super();
|
|
@@ -84814,16 +84850,19 @@ class ExternalPicgo {
|
|
|
84814
84850
|
throw new Error("bundled picgo cannot use extenal picgo api");
|
|
84815
84851
|
if (ee !== PicgoTypeEnum.App)
|
|
84816
84852
|
throw new Error(`picgoType ${ee} is not supported via external picgo api`);
|
|
84817
|
-
|
|
84853
|
+
const ne = [];
|
|
84818
84854
|
if ($) {
|
|
84819
84855
|
for (const de of $)
|
|
84820
|
-
if (isFileOrBlob(de)
|
|
84821
|
-
|
|
84822
|
-
|
|
84823
|
-
|
|
84856
|
+
if (isFileOrBlob(de)) {
|
|
84857
|
+
if (this.logger.warn("try to get path from blob", de.path), de.path.trim() === "") {
|
|
84858
|
+
this.logger.warn("blob path is empty");
|
|
84859
|
+
continue;
|
|
84860
|
+
}
|
|
84861
|
+
ne.push(de.path);
|
|
84862
|
+
} else
|
|
84863
|
+
ne.push(de);
|
|
84864
|
+
$ = ne;
|
|
84824
84865
|
}
|
|
84825
|
-
if (ne)
|
|
84826
|
-
throw new Error("blob is not supported via external picgo api");
|
|
84827
84866
|
this.requestUrl = this.db.get("extPicgoApiUrl") ?? this.requestUrl;
|
|
84828
84867
|
let ie = [];
|
|
84829
84868
|
const se = {
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "universal-picgo",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "picgo lib for node, browser and electron",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"queue": "^7.0.0",
|
|
42
42
|
"zhi-lib-base": "^0.8.0",
|
|
43
43
|
"file-type": "^16.2.0",
|
|
44
|
-
"universal-picgo-store": "1.10.
|
|
44
|
+
"universal-picgo-store": "1.10.2"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|