@bigbinary/neeto-playwright-commons 1.8.36 → 1.8.37
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/index.cjs.js +399 -252
- package/index.cjs.js.map +1 -1
- package/index.js +399 -252
- package/index.js.map +1 -1
- package/package.json +43 -43
package/index.js
CHANGED
|
@@ -199,9 +199,13 @@ function getDefaultExportFromCjs (x) {
|
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
function getAugmentedNamespace(n) {
|
|
202
|
+
if (n.__esModule) return n;
|
|
202
203
|
var f = n.default;
|
|
203
204
|
if (typeof f == "function") {
|
|
204
|
-
var a = function () {
|
|
205
|
+
var a = function a () {
|
|
206
|
+
if (this instanceof a) {
|
|
207
|
+
return Reflect.construct(f, arguments, this.constructor);
|
|
208
|
+
}
|
|
205
209
|
return f.apply(this, arguments);
|
|
206
210
|
};
|
|
207
211
|
a.prototype = f.prototype;
|
|
@@ -882,6 +886,8 @@ var setFunctionLength = function setFunctionLength(fn, length) {
|
|
|
882
886
|
return fn;
|
|
883
887
|
};
|
|
884
888
|
|
|
889
|
+
callBind$1.exports;
|
|
890
|
+
|
|
885
891
|
(function (module) {
|
|
886
892
|
|
|
887
893
|
var bind = functionBind;
|
|
@@ -925,12 +931,14 @@ var setFunctionLength = function setFunctionLength(fn, length) {
|
|
|
925
931
|
$defineProperty(module.exports, 'apply', { value: applyBind });
|
|
926
932
|
} else {
|
|
927
933
|
module.exports.apply = applyBind;
|
|
928
|
-
}
|
|
934
|
+
}
|
|
929
935
|
} (callBind$1));
|
|
930
936
|
|
|
937
|
+
var callBindExports = callBind$1.exports;
|
|
938
|
+
|
|
931
939
|
var GetIntrinsic$1 = getIntrinsic;
|
|
932
940
|
|
|
933
|
-
var callBind =
|
|
941
|
+
var callBind = callBindExports;
|
|
934
942
|
|
|
935
943
|
var $indexOf = callBind(GetIntrinsic$1('String.prototype.indexOf'));
|
|
936
944
|
|
|
@@ -2457,6 +2465,8 @@ var lib$7 = {
|
|
|
2457
2465
|
stringify: stringify$5
|
|
2458
2466
|
};
|
|
2459
2467
|
|
|
2468
|
+
var qs$1 = /*@__PURE__*/getDefaultExportFromCjs(lib$7);
|
|
2469
|
+
|
|
2460
2470
|
class CustomCommands {
|
|
2461
2471
|
constructor(page, request, baseURL = process.env.BASE_URL) {
|
|
2462
2472
|
this.interceptMultipleResponses = ({ responseUrl = "", responseStatus = 200, times = 1, baseUrl, customPageContext, timeout = 35000, } = {}) => {
|
|
@@ -2523,7 +2533,7 @@ class CustomCommands {
|
|
|
2523
2533
|
};
|
|
2524
2534
|
const formattedUrl = isEmpty$1(params)
|
|
2525
2535
|
? url
|
|
2526
|
-
: `${url}?${
|
|
2536
|
+
: `${url}?${qs$1.stringify(params, {
|
|
2527
2537
|
arrayFormat: "brackets",
|
|
2528
2538
|
})}`;
|
|
2529
2539
|
return await this.request[method](formattedUrl, requestOptions);
|
|
@@ -3086,6 +3096,7 @@ function requireCommon$1 () {
|
|
|
3086
3096
|
}
|
|
3087
3097
|
|
|
3088
3098
|
/* eslint-env browser */
|
|
3099
|
+
browser$1.exports;
|
|
3089
3100
|
|
|
3090
3101
|
var hasRequiredBrowser;
|
|
3091
3102
|
|
|
@@ -3359,8 +3370,8 @@ function requireBrowser () {
|
|
|
3359
3370
|
} catch (error) {
|
|
3360
3371
|
return '[UnexpectedJSONParseError]: ' + error.message;
|
|
3361
3372
|
}
|
|
3362
|
-
};
|
|
3363
|
-
} (browser$1, browser$1.exports));
|
|
3373
|
+
};
|
|
3374
|
+
} (browser$1, browser$1.exports));
|
|
3364
3375
|
return browser$1.exports;
|
|
3365
3376
|
}
|
|
3366
3377
|
|
|
@@ -3528,6 +3539,7 @@ function requireSupportsColor () {
|
|
|
3528
3539
|
/**
|
|
3529
3540
|
* Module dependencies.
|
|
3530
3541
|
*/
|
|
3542
|
+
node.exports;
|
|
3531
3543
|
|
|
3532
3544
|
var hasRequiredNode;
|
|
3533
3545
|
|
|
@@ -3793,8 +3805,8 @@ function requireNode () {
|
|
|
3793
3805
|
formatters.O = function (v) {
|
|
3794
3806
|
this.inspectOpts.colors = this.useColors;
|
|
3795
3807
|
return util.inspect(v, this.inspectOpts);
|
|
3796
|
-
};
|
|
3797
|
-
} (node, node.exports));
|
|
3808
|
+
};
|
|
3809
|
+
} (node, node.exports));
|
|
3798
3810
|
return node.exports;
|
|
3799
3811
|
}
|
|
3800
3812
|
|
|
@@ -3803,15 +3815,14 @@ function requireNode () {
|
|
|
3803
3815
|
* treat as a browser.
|
|
3804
3816
|
*/
|
|
3805
3817
|
|
|
3806
|
-
(
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
}
|
|
3812
|
-
} (src$1));
|
|
3818
|
+
if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
|
|
3819
|
+
src$1.exports = requireBrowser();
|
|
3820
|
+
} else {
|
|
3821
|
+
src$1.exports = requireNode();
|
|
3822
|
+
}
|
|
3813
3823
|
|
|
3814
|
-
var
|
|
3824
|
+
var srcExports = src$1.exports;
|
|
3825
|
+
var debug$3 = /*@__PURE__*/getDefaultExportFromCjs(srcExports);
|
|
3815
3826
|
|
|
3816
3827
|
/*!
|
|
3817
3828
|
* playwright-extra v4.3.5 by berstend
|
|
@@ -5406,10 +5417,16 @@ class StealthPlugin extends PuppeteerExtraPlugin {
|
|
|
5406
5417
|
const defaultExport = opts => new StealthPlugin(opts);
|
|
5407
5418
|
var puppeteerExtraPluginStealth = defaultExport;
|
|
5408
5419
|
|
|
5420
|
+
// const moduleExport = defaultExport
|
|
5421
|
+
// moduleExport.StealthPlugin = StealthPlugin
|
|
5422
|
+
// module.exports = moduleExport
|
|
5423
|
+
|
|
5424
|
+
var stealth$1 = /*@__PURE__*/getDefaultExportFromCjs(puppeteerExtraPluginStealth);
|
|
5425
|
+
|
|
5409
5426
|
var stealth = test$2.extend({
|
|
5410
5427
|
browser: async ({ browser }, use) => {
|
|
5411
5428
|
await browser.close();
|
|
5412
|
-
chromium.use(
|
|
5429
|
+
chromium.use(stealth$1());
|
|
5413
5430
|
const stealthBrowser = await chromium.launch();
|
|
5414
5431
|
await use(stealthBrowser);
|
|
5415
5432
|
await stealthBrowser.close();
|
|
@@ -5928,7 +5945,7 @@ var utils$k = {};
|
|
|
5928
5945
|
};
|
|
5929
5946
|
flat(args);
|
|
5930
5947
|
return result;
|
|
5931
|
-
};
|
|
5948
|
+
};
|
|
5932
5949
|
} (utils$k));
|
|
5933
5950
|
|
|
5934
5951
|
const utils$j = utils$k;
|
|
@@ -7235,8 +7252,6 @@ braces$1.create = (input, options = {}) => {
|
|
|
7235
7252
|
|
|
7236
7253
|
var braces_1 = braces$1;
|
|
7237
7254
|
|
|
7238
|
-
var picomatch$2 = {exports: {}};
|
|
7239
|
-
|
|
7240
7255
|
var utils$g = {};
|
|
7241
7256
|
|
|
7242
7257
|
const path$8 = Path;
|
|
@@ -7480,7 +7495,7 @@ var constants$b = {
|
|
|
7480
7495
|
output = `(?:^(?!${output}).*$)`;
|
|
7481
7496
|
}
|
|
7482
7497
|
return output;
|
|
7483
|
-
};
|
|
7498
|
+
};
|
|
7484
7499
|
} (utils$g));
|
|
7485
7500
|
|
|
7486
7501
|
const utils$f = utils$g;
|
|
@@ -8992,9 +9007,9 @@ const isObject$1 = val => val && typeof val === 'object' && !Array.isArray(val);
|
|
|
8992
9007
|
* @api public
|
|
8993
9008
|
*/
|
|
8994
9009
|
|
|
8995
|
-
const picomatch$
|
|
9010
|
+
const picomatch$2 = (glob, options, returnState = false) => {
|
|
8996
9011
|
if (Array.isArray(glob)) {
|
|
8997
|
-
const fns = glob.map(input => picomatch$
|
|
9012
|
+
const fns = glob.map(input => picomatch$2(input, options, returnState));
|
|
8998
9013
|
const arrayMatcher = str => {
|
|
8999
9014
|
for (const isMatch of fns) {
|
|
9000
9015
|
const state = isMatch(str);
|
|
@@ -9014,8 +9029,8 @@ const picomatch$1 = (glob, options, returnState = false) => {
|
|
|
9014
9029
|
const opts = options || {};
|
|
9015
9030
|
const posix = utils$d.isWindows(options);
|
|
9016
9031
|
const regex = isState
|
|
9017
|
-
? picomatch$
|
|
9018
|
-
: picomatch$
|
|
9032
|
+
? picomatch$2.compileRe(glob, options)
|
|
9033
|
+
: picomatch$2.makeRe(glob, options, false, true);
|
|
9019
9034
|
|
|
9020
9035
|
const state = regex.state;
|
|
9021
9036
|
delete regex.state;
|
|
@@ -9023,11 +9038,11 @@ const picomatch$1 = (glob, options, returnState = false) => {
|
|
|
9023
9038
|
let isIgnored = () => false;
|
|
9024
9039
|
if (opts.ignore) {
|
|
9025
9040
|
const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
|
|
9026
|
-
isIgnored = picomatch$
|
|
9041
|
+
isIgnored = picomatch$2(opts.ignore, ignoreOpts, returnState);
|
|
9027
9042
|
}
|
|
9028
9043
|
|
|
9029
9044
|
const matcher = (input, returnObject = false) => {
|
|
9030
|
-
const { isMatch, match, output } = picomatch$
|
|
9045
|
+
const { isMatch, match, output } = picomatch$2.test(input, regex, options, { glob, posix });
|
|
9031
9046
|
const result = { glob, state, regex, posix, input, output, match, isMatch };
|
|
9032
9047
|
|
|
9033
9048
|
if (typeof opts.onResult === 'function') {
|
|
@@ -9077,7 +9092,7 @@ const picomatch$1 = (glob, options, returnState = false) => {
|
|
|
9077
9092
|
* @api public
|
|
9078
9093
|
*/
|
|
9079
9094
|
|
|
9080
|
-
picomatch$
|
|
9095
|
+
picomatch$2.test = (input, regex, options, { glob, posix } = {}) => {
|
|
9081
9096
|
if (typeof input !== 'string') {
|
|
9082
9097
|
throw new TypeError('Expected input to be a string');
|
|
9083
9098
|
}
|
|
@@ -9098,7 +9113,7 @@ picomatch$1.test = (input, regex, options, { glob, posix } = {}) => {
|
|
|
9098
9113
|
|
|
9099
9114
|
if (match === false || opts.capture === true) {
|
|
9100
9115
|
if (opts.matchBase === true || opts.basename === true) {
|
|
9101
|
-
match = picomatch$
|
|
9116
|
+
match = picomatch$2.matchBase(input, regex, options, posix);
|
|
9102
9117
|
} else {
|
|
9103
9118
|
match = regex.exec(output);
|
|
9104
9119
|
}
|
|
@@ -9121,8 +9136,8 @@ picomatch$1.test = (input, regex, options, { glob, posix } = {}) => {
|
|
|
9121
9136
|
* @api public
|
|
9122
9137
|
*/
|
|
9123
9138
|
|
|
9124
|
-
picomatch$
|
|
9125
|
-
const regex = glob instanceof RegExp ? glob : picomatch$
|
|
9139
|
+
picomatch$2.matchBase = (input, glob, options, posix = utils$d.isWindows(options)) => {
|
|
9140
|
+
const regex = glob instanceof RegExp ? glob : picomatch$2.makeRe(glob, options);
|
|
9126
9141
|
return regex.test(path$7.basename(input));
|
|
9127
9142
|
};
|
|
9128
9143
|
|
|
@@ -9143,7 +9158,7 @@ picomatch$1.matchBase = (input, glob, options, posix = utils$d.isWindows(options
|
|
|
9143
9158
|
* @api public
|
|
9144
9159
|
*/
|
|
9145
9160
|
|
|
9146
|
-
picomatch$
|
|
9161
|
+
picomatch$2.isMatch = (str, patterns, options) => picomatch$2(patterns, options)(str);
|
|
9147
9162
|
|
|
9148
9163
|
/**
|
|
9149
9164
|
* Parse a glob pattern to create the source string for a regular
|
|
@@ -9159,8 +9174,8 @@ picomatch$1.isMatch = (str, patterns, options) => picomatch$1(patterns, options)
|
|
|
9159
9174
|
* @api public
|
|
9160
9175
|
*/
|
|
9161
9176
|
|
|
9162
|
-
picomatch$
|
|
9163
|
-
if (Array.isArray(pattern)) return pattern.map(p => picomatch$
|
|
9177
|
+
picomatch$2.parse = (pattern, options) => {
|
|
9178
|
+
if (Array.isArray(pattern)) return pattern.map(p => picomatch$2.parse(p, options));
|
|
9164
9179
|
return parse$2(pattern, { ...options, fastpaths: false });
|
|
9165
9180
|
};
|
|
9166
9181
|
|
|
@@ -9191,7 +9206,7 @@ picomatch$1.parse = (pattern, options) => {
|
|
|
9191
9206
|
* @api public
|
|
9192
9207
|
*/
|
|
9193
9208
|
|
|
9194
|
-
picomatch$
|
|
9209
|
+
picomatch$2.scan = (input, options) => scan$1(input, options);
|
|
9195
9210
|
|
|
9196
9211
|
/**
|
|
9197
9212
|
* Compile a regular expression from the `state` object returned by the
|
|
@@ -9205,7 +9220,7 @@ picomatch$1.scan = (input, options) => scan$1(input, options);
|
|
|
9205
9220
|
* @api public
|
|
9206
9221
|
*/
|
|
9207
9222
|
|
|
9208
|
-
picomatch$
|
|
9223
|
+
picomatch$2.compileRe = (state, options, returnOutput = false, returnState = false) => {
|
|
9209
9224
|
if (returnOutput === true) {
|
|
9210
9225
|
return state.output;
|
|
9211
9226
|
}
|
|
@@ -9219,7 +9234,7 @@ picomatch$1.compileRe = (state, options, returnOutput = false, returnState = fal
|
|
|
9219
9234
|
source = `^(?!${source}).*$`;
|
|
9220
9235
|
}
|
|
9221
9236
|
|
|
9222
|
-
const regex = picomatch$
|
|
9237
|
+
const regex = picomatch$2.toRegex(source, options);
|
|
9223
9238
|
if (returnState === true) {
|
|
9224
9239
|
regex.state = state;
|
|
9225
9240
|
}
|
|
@@ -9246,7 +9261,7 @@ picomatch$1.compileRe = (state, options, returnOutput = false, returnState = fal
|
|
|
9246
9261
|
* @api public
|
|
9247
9262
|
*/
|
|
9248
9263
|
|
|
9249
|
-
picomatch$
|
|
9264
|
+
picomatch$2.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
|
|
9250
9265
|
if (!input || typeof input !== 'string') {
|
|
9251
9266
|
throw new TypeError('Expected a non-empty string');
|
|
9252
9267
|
}
|
|
@@ -9261,7 +9276,7 @@ picomatch$1.makeRe = (input, options = {}, returnOutput = false, returnState = f
|
|
|
9261
9276
|
parsed = parse$2(input, options);
|
|
9262
9277
|
}
|
|
9263
9278
|
|
|
9264
|
-
return picomatch$
|
|
9279
|
+
return picomatch$2.compileRe(parsed, options, returnOutput, returnState);
|
|
9265
9280
|
};
|
|
9266
9281
|
|
|
9267
9282
|
/**
|
|
@@ -9281,7 +9296,7 @@ picomatch$1.makeRe = (input, options = {}, returnOutput = false, returnState = f
|
|
|
9281
9296
|
* @api public
|
|
9282
9297
|
*/
|
|
9283
9298
|
|
|
9284
|
-
picomatch$
|
|
9299
|
+
picomatch$2.toRegex = (source, options) => {
|
|
9285
9300
|
try {
|
|
9286
9301
|
const opts = options || {};
|
|
9287
9302
|
return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
|
|
@@ -9296,22 +9311,19 @@ picomatch$1.toRegex = (source, options) => {
|
|
|
9296
9311
|
* @return {Object}
|
|
9297
9312
|
*/
|
|
9298
9313
|
|
|
9299
|
-
picomatch$
|
|
9314
|
+
picomatch$2.constants = constants$9;
|
|
9300
9315
|
|
|
9301
9316
|
/**
|
|
9302
9317
|
* Expose "picomatch"
|
|
9303
9318
|
*/
|
|
9304
9319
|
|
|
9305
|
-
var picomatch_1 = picomatch$
|
|
9306
|
-
|
|
9307
|
-
(function (module) {
|
|
9320
|
+
var picomatch_1 = picomatch$2;
|
|
9308
9321
|
|
|
9309
|
-
|
|
9310
|
-
} (picomatch$2));
|
|
9322
|
+
var picomatch$1 = picomatch_1;
|
|
9311
9323
|
|
|
9312
9324
|
const util$7 = require$$0$2;
|
|
9313
9325
|
const braces = braces_1;
|
|
9314
|
-
const picomatch = picomatch$
|
|
9326
|
+
const picomatch = picomatch$1;
|
|
9315
9327
|
const utils$c = utils$g;
|
|
9316
9328
|
const isEmptyString = val => val === '' || val === './';
|
|
9317
9329
|
|
|
@@ -10365,7 +10377,7 @@ var fs$a = {};
|
|
|
10365
10377
|
}
|
|
10366
10378
|
return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
|
|
10367
10379
|
}
|
|
10368
|
-
exports.createFileSystemAdapter = createFileSystemAdapter;
|
|
10380
|
+
exports.createFileSystemAdapter = createFileSystemAdapter;
|
|
10369
10381
|
} (fs$a));
|
|
10370
10382
|
|
|
10371
10383
|
Object.defineProperty(settings$3, "__esModule", { value: true });
|
|
@@ -10718,7 +10730,7 @@ var fs$6 = {};
|
|
|
10718
10730
|
}
|
|
10719
10731
|
return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
|
|
10720
10732
|
}
|
|
10721
|
-
exports.createFileSystemAdapter = createFileSystemAdapter;
|
|
10733
|
+
exports.createFileSystemAdapter = createFileSystemAdapter;
|
|
10722
10734
|
} (fs$6));
|
|
10723
10735
|
|
|
10724
10736
|
Object.defineProperty(settings$2, "__esModule", { value: true });
|
|
@@ -11094,6 +11106,8 @@ function queueAsPromised (context, worker, concurrency) {
|
|
|
11094
11106
|
queue.exports = fastqueue;
|
|
11095
11107
|
queue.exports.promise = queueAsPromised;
|
|
11096
11108
|
|
|
11109
|
+
var queueExports = queue.exports;
|
|
11110
|
+
|
|
11097
11111
|
var common$4 = {};
|
|
11098
11112
|
|
|
11099
11113
|
Object.defineProperty(common$4, "__esModule", { value: true });
|
|
@@ -11143,7 +11157,7 @@ reader$1.default = Reader$1;
|
|
|
11143
11157
|
Object.defineProperty(async$4, "__esModule", { value: true });
|
|
11144
11158
|
const events_1 = require$$0$4;
|
|
11145
11159
|
const fsScandir$2 = out$2;
|
|
11146
|
-
const fastq =
|
|
11160
|
+
const fastq = queueExports;
|
|
11147
11161
|
const common$2 = common$4;
|
|
11148
11162
|
const reader_1$4 = reader$1;
|
|
11149
11163
|
class AsyncReader extends reader_1$4.default {
|
|
@@ -12066,7 +12080,7 @@ var settings = {};
|
|
|
12066
12080
|
return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods);
|
|
12067
12081
|
}
|
|
12068
12082
|
}
|
|
12069
|
-
exports.default = Settings;
|
|
12083
|
+
exports.default = Settings;
|
|
12070
12084
|
} (settings));
|
|
12071
12085
|
|
|
12072
12086
|
const taskManager = tasks;
|
|
@@ -13660,6 +13674,8 @@ anyBase.HEX = '0123456789abcdef';
|
|
|
13660
13674
|
|
|
13661
13675
|
var anyBase_1 = anyBase;
|
|
13662
13676
|
|
|
13677
|
+
var anyBase$1 = /*@__PURE__*/getDefaultExportFromCjs(anyBase_1);
|
|
13678
|
+
|
|
13663
13679
|
var pixelmatch_1 = pixelmatch;
|
|
13664
13680
|
|
|
13665
13681
|
function pixelmatch(img1, img2, output, width, height, options) {
|
|
@@ -13817,6 +13833,8 @@ function grayPixel(img, i) {
|
|
|
13817
13833
|
return rgb2y(r, g, b);
|
|
13818
13834
|
}
|
|
13819
13835
|
|
|
13836
|
+
var pixelMatch = /*@__PURE__*/getDefaultExportFromCjs(pixelmatch_1);
|
|
13837
|
+
|
|
13820
13838
|
// This file is autogenerated. It's used to publish ESM to npm.
|
|
13821
13839
|
function _typeof$1(obj) {
|
|
13822
13840
|
"@babel/helpers - typeof";
|
|
@@ -15113,13 +15131,23 @@ ImagePHash.prototype.getHash = function (img) {
|
|
|
15113
15131
|
|
|
15114
15132
|
// DCT function stolen from http://stackoverflow.com/questions/4240490/problems-with-dct-and-idct-algorithm-in-java
|
|
15115
15133
|
|
|
15134
|
+
/**
|
|
15135
|
+
Convert a 32-bit integer color value to an RGBA object.
|
|
15136
|
+
*/
|
|
15116
15137
|
function intToRGBA(i) {
|
|
15117
|
-
const
|
|
15118
|
-
|
|
15119
|
-
|
|
15120
|
-
|
|
15121
|
-
|
|
15122
|
-
|
|
15138
|
+
const a = i & 0xff;
|
|
15139
|
+
i >>>= 8;
|
|
15140
|
+
const b = i & 0xff;
|
|
15141
|
+
i >>>= 8;
|
|
15142
|
+
const g = i & 0xff;
|
|
15143
|
+
i >>>= 8;
|
|
15144
|
+
const r = i & 0xff;
|
|
15145
|
+
return {
|
|
15146
|
+
r,
|
|
15147
|
+
g,
|
|
15148
|
+
b,
|
|
15149
|
+
a
|
|
15150
|
+
};
|
|
15123
15151
|
}
|
|
15124
15152
|
const c$1 = [];
|
|
15125
15153
|
function initCoefficients(size) {
|
|
@@ -15343,6 +15371,8 @@ conversions["RegExp"] = function (V, opts) {
|
|
|
15343
15371
|
|
|
15344
15372
|
var utils = {exports: {}};
|
|
15345
15373
|
|
|
15374
|
+
utils.exports;
|
|
15375
|
+
|
|
15346
15376
|
(function (module) {
|
|
15347
15377
|
|
|
15348
15378
|
module.exports.mixin = function mixin(target, source) {
|
|
@@ -15361,9 +15391,11 @@ var utils = {exports: {}};
|
|
|
15361
15391
|
|
|
15362
15392
|
module.exports.implForWrapper = function (wrapper) {
|
|
15363
15393
|
return wrapper[module.exports.implSymbol];
|
|
15364
|
-
};
|
|
15394
|
+
};
|
|
15365
15395
|
} (utils));
|
|
15366
15396
|
|
|
15397
|
+
var utilsExports = utils.exports;
|
|
15398
|
+
|
|
15367
15399
|
var URLImpl = {};
|
|
15368
15400
|
|
|
15369
15401
|
var urlStateMachine = {exports: {}};
|
|
@@ -93213,6 +93245,8 @@ tr46.toUnicode = function(domain_name, useSTD3) {
|
|
|
93213
93245
|
|
|
93214
93246
|
tr46.PROCESSING_OPTIONS = PROCESSING_OPTIONS;
|
|
93215
93247
|
|
|
93248
|
+
urlStateMachine.exports;
|
|
93249
|
+
|
|
93216
93250
|
(function (module) {
|
|
93217
93251
|
const punycode = require$$0$5;
|
|
93218
93252
|
const tr46$1 = tr46;
|
|
@@ -94508,10 +94542,12 @@ tr46.PROCESSING_OPTIONS = PROCESSING_OPTIONS;
|
|
|
94508
94542
|
|
|
94509
94543
|
// We don't handle blobs, so this just delegates:
|
|
94510
94544
|
return module.exports.basicURLParse(input, { baseURL: options.baseURL, encodingOverride: options.encodingOverride });
|
|
94511
|
-
};
|
|
94545
|
+
};
|
|
94512
94546
|
} (urlStateMachine));
|
|
94513
94547
|
|
|
94514
|
-
|
|
94548
|
+
var urlStateMachineExports = urlStateMachine.exports;
|
|
94549
|
+
|
|
94550
|
+
const usm = urlStateMachineExports;
|
|
94515
94551
|
|
|
94516
94552
|
URLImpl.implementation = class URLImpl {
|
|
94517
94553
|
constructor(constructorArgs) {
|
|
@@ -94711,13 +94747,15 @@ URLImpl.implementation = class URLImpl {
|
|
|
94711
94747
|
}
|
|
94712
94748
|
};
|
|
94713
94749
|
|
|
94750
|
+
URL$2.exports;
|
|
94751
|
+
|
|
94714
94752
|
(function (module) {
|
|
94715
94753
|
|
|
94716
94754
|
const conversions = lib$6;
|
|
94717
|
-
const utils
|
|
94755
|
+
const utils = utilsExports;
|
|
94718
94756
|
const Impl = URLImpl;
|
|
94719
94757
|
|
|
94720
|
-
const impl = utils
|
|
94758
|
+
const impl = utils.implSymbol;
|
|
94721
94759
|
|
|
94722
94760
|
function URL(url) {
|
|
94723
94761
|
if (!this || this[impl] || !(this instanceof URL)) {
|
|
@@ -94898,25 +94936,27 @@ URLImpl.implementation = class URLImpl {
|
|
|
94898
94936
|
privateData.wrapper = obj;
|
|
94899
94937
|
|
|
94900
94938
|
obj[impl] = new Impl.implementation(constructorArgs, privateData);
|
|
94901
|
-
obj[impl][utils
|
|
94939
|
+
obj[impl][utils.wrapperSymbol] = obj;
|
|
94902
94940
|
},
|
|
94903
94941
|
interface: URL,
|
|
94904
94942
|
expose: {
|
|
94905
94943
|
Window: { URL: URL },
|
|
94906
94944
|
Worker: { URL: URL }
|
|
94907
94945
|
}
|
|
94908
|
-
};
|
|
94946
|
+
};
|
|
94909
94947
|
} (URL$2));
|
|
94910
94948
|
|
|
94911
|
-
|
|
94912
|
-
|
|
94913
|
-
publicApi.
|
|
94914
|
-
publicApi.
|
|
94915
|
-
publicApi.
|
|
94916
|
-
publicApi.
|
|
94917
|
-
publicApi.
|
|
94918
|
-
publicApi.
|
|
94919
|
-
publicApi.
|
|
94949
|
+
var URLExports = URL$2.exports;
|
|
94950
|
+
|
|
94951
|
+
publicApi.URL = URLExports.interface;
|
|
94952
|
+
publicApi.serializeURL = urlStateMachineExports.serializeURL;
|
|
94953
|
+
publicApi.serializeURLOrigin = urlStateMachineExports.serializeURLOrigin;
|
|
94954
|
+
publicApi.basicURLParse = urlStateMachineExports.basicURLParse;
|
|
94955
|
+
publicApi.setTheUsername = urlStateMachineExports.setTheUsername;
|
|
94956
|
+
publicApi.setThePassword = urlStateMachineExports.setThePassword;
|
|
94957
|
+
publicApi.serializeHost = urlStateMachineExports.serializeHost;
|
|
94958
|
+
publicApi.serializeInteger = urlStateMachineExports.serializeInteger;
|
|
94959
|
+
publicApi.parseURL = urlStateMachineExports.parseURL;
|
|
94920
94960
|
|
|
94921
94961
|
// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js
|
|
94922
94962
|
|
|
@@ -96696,6 +96736,8 @@ var lib$5 = /*#__PURE__*/Object.freeze({
|
|
|
96696
96736
|
|
|
96697
96737
|
var require$$0 = /*@__PURE__*/getAugmentedNamespace(lib$5);
|
|
96698
96738
|
|
|
96739
|
+
fetchNpmNode.exports;
|
|
96740
|
+
|
|
96699
96741
|
(function (module) {
|
|
96700
96742
|
|
|
96701
96743
|
var realFetch = require$$0;
|
|
@@ -96711,9 +96753,11 @@ var require$$0 = /*@__PURE__*/getAugmentedNamespace(lib$5);
|
|
|
96711
96753
|
commonjsGlobal.Response = realFetch.Response;
|
|
96712
96754
|
commonjsGlobal.Headers = realFetch.Headers;
|
|
96713
96755
|
commonjsGlobal.Request = realFetch.Request;
|
|
96714
|
-
}
|
|
96756
|
+
}
|
|
96715
96757
|
} (fetchNpmNode));
|
|
96716
96758
|
|
|
96759
|
+
fetchNpmNode.exports;
|
|
96760
|
+
|
|
96717
96761
|
var request$1 = ((_ref, cb) => {
|
|
96718
96762
|
let {
|
|
96719
96763
|
url,
|
|
@@ -97227,7 +97271,7 @@ var EndOfFileStream = {};
|
|
|
97227
97271
|
super(exports.defaultMessages);
|
|
97228
97272
|
}
|
|
97229
97273
|
}
|
|
97230
|
-
exports.EndOfStreamError = EndOfStreamError;
|
|
97274
|
+
exports.EndOfStreamError = EndOfStreamError;
|
|
97231
97275
|
} (EndOfFileStream));
|
|
97232
97276
|
|
|
97233
97277
|
var StreamReader = {};
|
|
@@ -97381,7 +97425,7 @@ Deferred$1.Deferred = Deferred;
|
|
|
97381
97425
|
}
|
|
97382
97426
|
}
|
|
97383
97427
|
}
|
|
97384
|
-
exports.StreamReader = StreamReader;
|
|
97428
|
+
exports.StreamReader = StreamReader;
|
|
97385
97429
|
} (StreamReader));
|
|
97386
97430
|
|
|
97387
97431
|
(function (exports) {
|
|
@@ -97390,7 +97434,7 @@ Deferred$1.Deferred = Deferred;
|
|
|
97390
97434
|
var EndOfFileStream_1 = EndOfFileStream;
|
|
97391
97435
|
Object.defineProperty(exports, "EndOfStreamError", { enumerable: true, get: function () { return EndOfFileStream_1.EndOfStreamError; } });
|
|
97392
97436
|
var StreamReader_1 = StreamReader;
|
|
97393
|
-
Object.defineProperty(exports, "StreamReader", { enumerable: true, get: function () { return StreamReader_1.StreamReader; } });
|
|
97437
|
+
Object.defineProperty(exports, "StreamReader", { enumerable: true, get: function () { return StreamReader_1.StreamReader; } });
|
|
97394
97438
|
} (lib$3));
|
|
97395
97439
|
|
|
97396
97440
|
Object.defineProperty(AbstractTokenizer$1, "__esModule", { value: true });
|
|
@@ -97680,7 +97724,7 @@ BufferTokenizer$1.BufferTokenizer = BufferTokenizer;
|
|
|
97680
97724
|
function fromBuffer(uint8Array, fileInfo) {
|
|
97681
97725
|
return new BufferTokenizer_1.BufferTokenizer(uint8Array, fileInfo);
|
|
97682
97726
|
}
|
|
97683
|
-
exports.fromBuffer = fromBuffer;
|
|
97727
|
+
exports.fromBuffer = fromBuffer;
|
|
97684
97728
|
} (core$2));
|
|
97685
97729
|
|
|
97686
97730
|
var FileTokenizer$1 = {};
|
|
@@ -97766,7 +97810,7 @@ FileTokenizer$1.fromFile = fromFile$1;
|
|
|
97766
97810
|
}
|
|
97767
97811
|
return core.fromStream(stream, fileInfo);
|
|
97768
97812
|
}
|
|
97769
|
-
exports.fromStream = fromStream;
|
|
97813
|
+
exports.fromStream = fromStream;
|
|
97770
97814
|
} (lib$4));
|
|
97771
97815
|
|
|
97772
97816
|
var lib$2 = {};
|
|
@@ -98314,7 +98358,7 @@ ieee754.write = function (buffer, value, offset, isLE, mLen, nBytes) {
|
|
|
98314
98358
|
201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216,
|
|
98315
98359
|
217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
|
|
98316
98360
|
233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247,
|
|
98317
|
-
248, 249, 250, 251, 252, 253, 254, 255];
|
|
98361
|
+
248, 249, 250, 251, 252, 253, 254, 255];
|
|
98318
98362
|
} (lib$2));
|
|
98319
98363
|
|
|
98320
98364
|
var util$6 = {};
|
|
@@ -100133,6 +100177,8 @@ Object.defineProperty(fileType, 'mimeTypes', {
|
|
|
100133
100177
|
|
|
100134
100178
|
var fileType_1 = fileType;
|
|
100135
100179
|
|
|
100180
|
+
var FileType = /*@__PURE__*/getDefaultExportFromCjs(fileType_1);
|
|
100181
|
+
|
|
100136
100182
|
/*jslint browser: true, devel: true, bitwise: false, debug: true, eqeq: false, es5: true, evil: false, forin: false, newcap: false, nomen: true, plusplus: true, regexp: false, unparam: false, sloppy: true, stupid: false, sub: false, todo: true, vars: true, white: true */
|
|
100137
100183
|
|
|
100138
100184
|
var jpeg$2 = {
|
|
@@ -101434,8 +101480,10 @@ var exifParser = {
|
|
|
101434
101480
|
}
|
|
101435
101481
|
};
|
|
101436
101482
|
|
|
101483
|
+
var EXIFParser = /*@__PURE__*/getDefaultExportFromCjs(exifParser);
|
|
101484
|
+
|
|
101437
101485
|
async function getMIMEFromBuffer(buffer, path) {
|
|
101438
|
-
const fileTypeFromBuffer = await
|
|
101486
|
+
const fileTypeFromBuffer = await FileType.fromBuffer(buffer);
|
|
101439
101487
|
if (fileTypeFromBuffer) {
|
|
101440
101488
|
// If fileType returns something for buffer, then return the mime given
|
|
101441
101489
|
return fileTypeFromBuffer.mime;
|
|
@@ -101581,7 +101629,7 @@ async function parseBitmap(data, path, cb) {
|
|
|
101581
101629
|
return cb.call(this, error, this);
|
|
101582
101630
|
}
|
|
101583
101631
|
try {
|
|
101584
|
-
this._exif =
|
|
101632
|
+
this._exif = EXIFParser.create(data).parse();
|
|
101585
101633
|
exifRotate(this); // EXIF data
|
|
101586
101634
|
} catch (error) {
|
|
101587
101635
|
/* meh */
|
|
@@ -101647,7 +101695,7 @@ const alphabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
|
|
|
101647
101695
|
// 0 and 1 do not exist as possible hash lengths
|
|
101648
101696
|
const maxHashLength = [NaN, NaN];
|
|
101649
101697
|
for (let i = 2; i < 65; i++) {
|
|
101650
|
-
const maxHash =
|
|
101698
|
+
const maxHash = anyBase$1(anyBase$1.BIN, alphabet.slice(0, i))(new Array(64 + 1).join("1"));
|
|
101651
101699
|
maxHashLength.push(maxHash.length);
|
|
101652
101700
|
}
|
|
101653
101701
|
|
|
@@ -102120,7 +102168,7 @@ class Jimp$1 extends require$$0$4 {
|
|
|
102120
102168
|
return throwError.call(this, "base must be a number between 2 and 64", cb);
|
|
102121
102169
|
}
|
|
102122
102170
|
let hash = this.pHash();
|
|
102123
|
-
hash =
|
|
102171
|
+
hash = anyBase$1(anyBase$1.BIN, alphabet.slice(0, base))(hash);
|
|
102124
102172
|
while (hash.length < maxHashLength[base]) {
|
|
102125
102173
|
hash = "0" + hash; // pad out with leading zeros
|
|
102126
102174
|
}
|
|
@@ -102229,10 +102277,6 @@ class Jimp$1 extends require$$0$4 {
|
|
|
102229
102277
|
*/
|
|
102230
102278
|
getPixelColor(x, y, cb) {
|
|
102231
102279
|
if (typeof x !== "number" || typeof y !== "number") return throwError.call(this, "x and y must be numbers", cb);
|
|
102232
|
-
|
|
102233
|
-
// round input
|
|
102234
|
-
x = Math.round(x);
|
|
102235
|
-
y = Math.round(y);
|
|
102236
102280
|
const idx = this.getPixelIndex(x, y);
|
|
102237
102281
|
const hex = this.bitmap.data.readUInt32BE(idx);
|
|
102238
102282
|
if (isNodePattern(cb)) {
|
|
@@ -102250,10 +102294,6 @@ class Jimp$1 extends require$$0$4 {
|
|
|
102250
102294
|
*/
|
|
102251
102295
|
setPixelColor(hex, x, y, cb) {
|
|
102252
102296
|
if (typeof hex !== "number" || typeof x !== "number" || typeof y !== "number") return throwError.call(this, "hex, x and y must be numbers", cb);
|
|
102253
|
-
|
|
102254
|
-
// round input
|
|
102255
|
-
x = Math.round(x);
|
|
102256
|
-
y = Math.round(y);
|
|
102257
102297
|
const idx = this.getPixelIndex(x, y);
|
|
102258
102298
|
this.bitmap.data.writeUInt32BE(hex, idx);
|
|
102259
102299
|
if (isNodePattern(cb)) {
|
|
@@ -102266,13 +102306,15 @@ class Jimp$1 extends require$$0$4 {
|
|
|
102266
102306
|
* @return {boolean} hasAlpha whether the image contains opaque pixels
|
|
102267
102307
|
*/
|
|
102268
102308
|
hasAlpha() {
|
|
102269
|
-
|
|
102270
|
-
|
|
102271
|
-
|
|
102272
|
-
|
|
102273
|
-
|
|
102274
|
-
|
|
102275
|
-
|
|
102309
|
+
const {
|
|
102310
|
+
width,
|
|
102311
|
+
height,
|
|
102312
|
+
data
|
|
102313
|
+
} = this.bitmap;
|
|
102314
|
+
const byteLen = width * height << 2;
|
|
102315
|
+
for (let idx = 3; idx < byteLen; idx += 4) {
|
|
102316
|
+
if (data[idx] !== 0xff) {
|
|
102317
|
+
return true;
|
|
102276
102318
|
}
|
|
102277
102319
|
}
|
|
102278
102320
|
return false;
|
|
@@ -102372,11 +102414,16 @@ Jimp$1.rgbaToInt = function (r, g, b, a, cb) {
|
|
|
102372
102414
|
if (a < 0 || a > 255) {
|
|
102373
102415
|
return throwError.call(this, "a must be between 0 and 255", cb);
|
|
102374
102416
|
}
|
|
102375
|
-
|
|
102376
|
-
|
|
102377
|
-
g
|
|
102378
|
-
|
|
102379
|
-
|
|
102417
|
+
let i = r & 0xff;
|
|
102418
|
+
i <<= 8;
|
|
102419
|
+
i |= g & 0xff;
|
|
102420
|
+
i <<= 8;
|
|
102421
|
+
i |= b & 0xff;
|
|
102422
|
+
i <<= 8;
|
|
102423
|
+
i |= a & 0xff;
|
|
102424
|
+
|
|
102425
|
+
// Ensure sign is correct
|
|
102426
|
+
i >>>= 0;
|
|
102380
102427
|
if (isNodePattern(cb)) {
|
|
102381
102428
|
cb.call(this, null, i);
|
|
102382
102429
|
}
|
|
@@ -102452,7 +102499,7 @@ Jimp$1.diff = function (img1, img2) {
|
|
|
102452
102499
|
return throwError.call(this, "threshold must be a number between 0 and 1");
|
|
102453
102500
|
}
|
|
102454
102501
|
const diff = new Jimp$1(bmp1.width, bmp1.height, 0xffffffff);
|
|
102455
|
-
const numDiffPixels =
|
|
102502
|
+
const numDiffPixels = pixelMatch(bmp1.data, bmp2.data, diff.bitmap.data, diff.bitmap.width, diff.bitmap.height, {
|
|
102456
102503
|
threshold
|
|
102457
102504
|
});
|
|
102458
102505
|
return {
|
|
@@ -103414,6 +103461,7 @@ var encoder$1 = {exports: {}};
|
|
|
103414
103461
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
103415
103462
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
103416
103463
|
*/
|
|
103464
|
+
encoder$1.exports;
|
|
103417
103465
|
|
|
103418
103466
|
(function (module) {
|
|
103419
103467
|
|
|
@@ -104159,10 +104207,13 @@ var encoder$1 = {exports: {}};
|
|
|
104159
104207
|
}
|
|
104160
104208
|
} (encoder$1));
|
|
104161
104209
|
|
|
104210
|
+
var encoderExports = encoder$1.exports;
|
|
104211
|
+
|
|
104162
104212
|
var decoder$1 = {exports: {}};
|
|
104163
104213
|
|
|
104164
104214
|
/* -*- tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /
|
|
104165
104215
|
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
|
104216
|
+
decoder$1.exports;
|
|
104166
104217
|
|
|
104167
104218
|
(function (module) {
|
|
104168
104219
|
/*
|
|
@@ -105307,17 +105358,21 @@ var decoder$1 = {exports: {}};
|
|
|
105307
105358
|
decoder.copyToImageData(image, opts.formatAsRGBA);
|
|
105308
105359
|
|
|
105309
105360
|
return image;
|
|
105310
|
-
}
|
|
105361
|
+
}
|
|
105311
105362
|
} (decoder$1));
|
|
105312
105363
|
|
|
105313
|
-
var
|
|
105314
|
-
|
|
105364
|
+
var decoderExports = decoder$1.exports;
|
|
105365
|
+
|
|
105366
|
+
var encode$2 = encoderExports,
|
|
105367
|
+
decode$2 = decoderExports;
|
|
105315
105368
|
|
|
105316
105369
|
var jpegJs = {
|
|
105317
105370
|
encode: encode$2,
|
|
105318
105371
|
decode: decode$2
|
|
105319
105372
|
};
|
|
105320
105373
|
|
|
105374
|
+
var JPEG = /*@__PURE__*/getDefaultExportFromCjs(jpegJs);
|
|
105375
|
+
|
|
105321
105376
|
const MIME_TYPE$4 = "image/jpeg";
|
|
105322
105377
|
var jpeg = (() => ({
|
|
105323
105378
|
mime: {
|
|
@@ -105327,10 +105382,10 @@ var jpeg = (() => ({
|
|
|
105327
105382
|
MIME_JPEG: MIME_TYPE$4
|
|
105328
105383
|
},
|
|
105329
105384
|
decoders: {
|
|
105330
|
-
[MIME_TYPE$4]:
|
|
105385
|
+
[MIME_TYPE$4]: JPEG.decode
|
|
105331
105386
|
},
|
|
105332
105387
|
encoders: {
|
|
105333
|
-
[MIME_TYPE$4]: image =>
|
|
105388
|
+
[MIME_TYPE$4]: image => JPEG.encode(image.bitmap, image._quality).data
|
|
105334
105389
|
},
|
|
105335
105390
|
class: {
|
|
105336
105391
|
// The quality to be used when saving JPEG images
|
|
@@ -105549,6 +105604,8 @@ ChunkStream$2.prototype._process = function () {
|
|
|
105549
105604
|
}
|
|
105550
105605
|
};
|
|
105551
105606
|
|
|
105607
|
+
var chunkstreamExports = chunkstream.exports;
|
|
105608
|
+
|
|
105552
105609
|
var filterParseAsync = {exports: {}};
|
|
105553
105610
|
|
|
105554
105611
|
var filterParse = {exports: {}};
|
|
@@ -105840,9 +105897,11 @@ Filter$2.prototype._reverseFilterLine = function (rawData) {
|
|
|
105840
105897
|
}
|
|
105841
105898
|
};
|
|
105842
105899
|
|
|
105900
|
+
var filterParseExports = filterParse.exports;
|
|
105901
|
+
|
|
105843
105902
|
let util$4 = require$$0$2;
|
|
105844
|
-
let ChunkStream$1 =
|
|
105845
|
-
let Filter$1 =
|
|
105903
|
+
let ChunkStream$1 = chunkstreamExports;
|
|
105904
|
+
let Filter$1 = filterParseExports;
|
|
105846
105905
|
|
|
105847
105906
|
let FilterAsync$1 = (filterParseAsync.exports = function (bitmapInfo) {
|
|
105848
105907
|
ChunkStream$1.call(this);
|
|
@@ -105863,6 +105922,8 @@ let FilterAsync$1 = (filterParseAsync.exports = function (bitmapInfo) {
|
|
|
105863
105922
|
});
|
|
105864
105923
|
util$4.inherits(FilterAsync$1, ChunkStream$1);
|
|
105865
105924
|
|
|
105925
|
+
var filterParseAsyncExports = filterParseAsync.exports;
|
|
105926
|
+
|
|
105866
105927
|
var parser$1 = {exports: {}};
|
|
105867
105928
|
|
|
105868
105929
|
var constants$6 = {
|
|
@@ -105937,8 +105998,10 @@ CrcCalculator$1.crc32 = function (buf) {
|
|
|
105937
105998
|
return crc ^ -1;
|
|
105938
105999
|
};
|
|
105939
106000
|
|
|
106001
|
+
var crcExports = crc.exports;
|
|
106002
|
+
|
|
105940
106003
|
let constants$5 = constants$6;
|
|
105941
|
-
let CrcCalculator =
|
|
106004
|
+
let CrcCalculator = crcExports;
|
|
105942
106005
|
|
|
105943
106006
|
let Parser$3 = (parser$1.exports = function (options, dependencies) {
|
|
105944
106007
|
this._options = options;
|
|
@@ -106226,6 +106289,8 @@ Parser$3.prototype._parseIEND = function (data) {
|
|
|
106226
106289
|
}
|
|
106227
106290
|
};
|
|
106228
106291
|
|
|
106292
|
+
var parserExports = parser$1.exports;
|
|
106293
|
+
|
|
106229
106294
|
var bitmapper$2 = {};
|
|
106230
106295
|
|
|
106231
106296
|
let interlaceUtils = interlace;
|
|
@@ -106588,9 +106653,9 @@ var formatNormaliser$2 = function (indata, imageData, skipRescale = false) {
|
|
|
106588
106653
|
|
|
106589
106654
|
let util$3 = require$$0$2;
|
|
106590
106655
|
let zlib$4 = zlib$5;
|
|
106591
|
-
let ChunkStream =
|
|
106592
|
-
let FilterAsync =
|
|
106593
|
-
let Parser$2 =
|
|
106656
|
+
let ChunkStream = chunkstreamExports;
|
|
106657
|
+
let FilterAsync = filterParseAsyncExports;
|
|
106658
|
+
let Parser$2 = parserExports;
|
|
106594
106659
|
let bitmapper$1 = bitmapper$2;
|
|
106595
106660
|
let formatNormaliser$1 = formatNormaliser$2;
|
|
106596
106661
|
|
|
@@ -106754,6 +106819,8 @@ ParserAsync.prototype._complete = function (filteredData) {
|
|
|
106754
106819
|
this.emit("parsed", normalisedBitmapData);
|
|
106755
106820
|
};
|
|
106756
106821
|
|
|
106822
|
+
var parserAsyncExports = parserAsync.exports;
|
|
106823
|
+
|
|
106757
106824
|
var packerAsync = {exports: {}};
|
|
106758
106825
|
|
|
106759
106826
|
var packer = {exports: {}};
|
|
@@ -107086,7 +107153,7 @@ var filterPack = function (pxData, width, height, options, bpp) {
|
|
|
107086
107153
|
};
|
|
107087
107154
|
|
|
107088
107155
|
let constants$3 = constants$6;
|
|
107089
|
-
let CrcStream =
|
|
107156
|
+
let CrcStream = crcExports;
|
|
107090
107157
|
let bitPacker = bitpacker;
|
|
107091
107158
|
let filter = filterPack;
|
|
107092
107159
|
let zlib$3 = zlib$5;
|
|
@@ -107213,10 +107280,12 @@ Packer$3.prototype.packIEND = function () {
|
|
|
107213
107280
|
return this._packChunk(constants$3.TYPE_IEND, null);
|
|
107214
107281
|
};
|
|
107215
107282
|
|
|
107283
|
+
var packerExports = packer.exports;
|
|
107284
|
+
|
|
107216
107285
|
let util$2 = require$$0$2;
|
|
107217
107286
|
let Stream$1 = Stream$4;
|
|
107218
107287
|
let constants$2 = constants$6;
|
|
107219
|
-
let Packer$2 =
|
|
107288
|
+
let Packer$2 = packerExports;
|
|
107220
107289
|
|
|
107221
107290
|
let PackerAsync = (packerAsync.exports = function (opt) {
|
|
107222
107291
|
Stream$1.call(this);
|
|
@@ -107262,10 +107331,14 @@ PackerAsync.prototype.pack = function (data, width, height, gamma) {
|
|
|
107262
107331
|
this._deflate.end(filteredData);
|
|
107263
107332
|
};
|
|
107264
107333
|
|
|
107334
|
+
var packerAsyncExports = packerAsync.exports;
|
|
107335
|
+
|
|
107265
107336
|
var pngSync = {};
|
|
107266
107337
|
|
|
107267
107338
|
var syncInflate = {exports: {}};
|
|
107268
107339
|
|
|
107340
|
+
syncInflate.exports;
|
|
107341
|
+
|
|
107269
107342
|
(function (module, exports) {
|
|
107270
107343
|
|
|
107271
107344
|
let assert = require$$0$6.ok;
|
|
@@ -107433,9 +107506,11 @@ var syncInflate = {exports: {}};
|
|
|
107433
107506
|
module.exports = exports = inflateSync;
|
|
107434
107507
|
exports.Inflate = Inflate;
|
|
107435
107508
|
exports.createInflate = createInflate;
|
|
107436
|
-
exports.inflateSync = inflateSync;
|
|
107509
|
+
exports.inflateSync = inflateSync;
|
|
107437
107510
|
} (syncInflate, syncInflate.exports));
|
|
107438
107511
|
|
|
107512
|
+
var syncInflateExports = syncInflate.exports;
|
|
107513
|
+
|
|
107439
107514
|
var syncReader = {exports: {}};
|
|
107440
107515
|
|
|
107441
107516
|
let SyncReader$2 = (syncReader.exports = function (buffer) {
|
|
@@ -107482,10 +107557,12 @@ SyncReader$2.prototype.process = function () {
|
|
|
107482
107557
|
}
|
|
107483
107558
|
};
|
|
107484
107559
|
|
|
107560
|
+
var syncReaderExports = syncReader.exports;
|
|
107561
|
+
|
|
107485
107562
|
var filterParseSync = {};
|
|
107486
107563
|
|
|
107487
|
-
let SyncReader$1 =
|
|
107488
|
-
let Filter =
|
|
107564
|
+
let SyncReader$1 = syncReaderExports;
|
|
107565
|
+
let Filter = filterParseExports;
|
|
107489
107566
|
|
|
107490
107567
|
filterParseSync.process = function (inBuffer, bitmapInfo) {
|
|
107491
107568
|
let outBuffers = [];
|
|
@@ -107506,13 +107583,13 @@ filterParseSync.process = function (inBuffer, bitmapInfo) {
|
|
|
107506
107583
|
|
|
107507
107584
|
let hasSyncZlib$1 = true;
|
|
107508
107585
|
let zlib$2 = zlib$5;
|
|
107509
|
-
let inflateSync =
|
|
107586
|
+
let inflateSync = syncInflateExports;
|
|
107510
107587
|
if (!zlib$2.deflateSync) {
|
|
107511
107588
|
hasSyncZlib$1 = false;
|
|
107512
107589
|
}
|
|
107513
|
-
let SyncReader =
|
|
107590
|
+
let SyncReader = syncReaderExports;
|
|
107514
107591
|
let FilterSync = filterParseSync;
|
|
107515
|
-
let Parser$1 =
|
|
107592
|
+
let Parser$1 = parserExports;
|
|
107516
107593
|
let bitmapper = bitmapper$2;
|
|
107517
107594
|
let formatNormaliser = formatNormaliser$2;
|
|
107518
107595
|
|
|
@@ -107621,7 +107698,7 @@ if (!zlib$1.deflateSync) {
|
|
|
107621
107698
|
hasSyncZlib = false;
|
|
107622
107699
|
}
|
|
107623
107700
|
let constants$1 = constants$6;
|
|
107624
|
-
let Packer$1 =
|
|
107701
|
+
let Packer$1 = packerExports;
|
|
107625
107702
|
|
|
107626
107703
|
var packerSync = function (metaData, opt) {
|
|
107627
107704
|
if (!hasSyncZlib) {
|
|
@@ -107685,8 +107762,8 @@ var PNG_1;
|
|
|
107685
107762
|
|
|
107686
107763
|
let util$1 = require$$0$2;
|
|
107687
107764
|
let Stream = Stream$4;
|
|
107688
|
-
let Parser =
|
|
107689
|
-
let Packer =
|
|
107765
|
+
let Parser = parserAsyncExports;
|
|
107766
|
+
let Packer = packerAsyncExports;
|
|
107690
107767
|
let PNGSync = pngSync;
|
|
107691
107768
|
|
|
107692
107769
|
let PNG = (PNG_1 = function (options) {
|
|
@@ -108587,6 +108664,8 @@ var bmpJs = {
|
|
|
108587
108664
|
decode: decode$1
|
|
108588
108665
|
};
|
|
108589
108666
|
|
|
108667
|
+
var BMP = /*@__PURE__*/getDefaultExportFromCjs(bmpJs);
|
|
108668
|
+
|
|
108590
108669
|
const MIME_TYPE$2 = "image/bmp";
|
|
108591
108670
|
const MIME_TYPE_SECOND = "image/x-ms-bmp";
|
|
108592
108671
|
function toAGBR(image) {
|
|
@@ -108615,8 +108694,8 @@ function fromAGBR(bitmap) {
|
|
|
108615
108694
|
this.bitmap.data[index + 3] = bitmap.is_with_alpha ? alpha : 0xff;
|
|
108616
108695
|
}).bitmap;
|
|
108617
108696
|
}
|
|
108618
|
-
const decode = data => fromAGBR(
|
|
108619
|
-
const encode = image =>
|
|
108697
|
+
const decode = data => fromAGBR(BMP.decode(data));
|
|
108698
|
+
const encode = image => BMP.encode(toAGBR(image)).data;
|
|
108620
108699
|
var bmp = (() => ({
|
|
108621
108700
|
mime: {
|
|
108622
108701
|
[MIME_TYPE$2]: ["bmp"]
|
|
@@ -108752,8 +108831,8 @@ function requireCommon () {
|
|
|
108752
108831
|
}
|
|
108753
108832
|
};
|
|
108754
108833
|
|
|
108755
|
-
exports.setTyped(TYPED_OK);
|
|
108756
|
-
} (common));
|
|
108834
|
+
exports.setTyped(TYPED_OK);
|
|
108835
|
+
} (common));
|
|
108757
108836
|
return common;
|
|
108758
108837
|
}
|
|
108759
108838
|
|
|
@@ -115557,6 +115636,8 @@ function requirePako () {
|
|
|
115557
115636
|
return pako_1;
|
|
115558
115637
|
}
|
|
115559
115638
|
|
|
115639
|
+
UTIF.exports;
|
|
115640
|
+
|
|
115560
115641
|
(function (module) {
|
|
115561
115642
|
(function(){
|
|
115562
115643
|
var UTIF = {};
|
|
@@ -117193,10 +117274,11 @@ function requirePako () {
|
|
|
117193
117274
|
|
|
117194
117275
|
|
|
117195
117276
|
})(UTIF, pako);
|
|
117196
|
-
})();
|
|
117277
|
+
})();
|
|
117197
117278
|
} (UTIF));
|
|
117198
117279
|
|
|
117199
|
-
var
|
|
117280
|
+
var UTIFExports = UTIF.exports;
|
|
117281
|
+
var utif = /*@__PURE__*/getDefaultExportFromCjs(UTIFExports);
|
|
117200
117282
|
|
|
117201
117283
|
const MIME_TYPE$1 = "image/tiff";
|
|
117202
117284
|
var tiff = (() => ({
|
|
@@ -121570,8 +121652,8 @@ function requireGifutil () {
|
|
|
121570
121652
|
return resolve();
|
|
121571
121653
|
});
|
|
121572
121654
|
});
|
|
121573
|
-
}
|
|
121574
|
-
} (gifutil));
|
|
121655
|
+
}
|
|
121656
|
+
} (gifutil));
|
|
121575
121657
|
return gifutil;
|
|
121576
121658
|
}
|
|
121577
121659
|
|
|
@@ -129733,8 +129815,8 @@ function requireSax () {
|
|
|
129733
129815
|
}
|
|
129734
129816
|
}());
|
|
129735
129817
|
}
|
|
129736
|
-
})(exports);
|
|
129737
|
-
} (sax));
|
|
129818
|
+
})(exports);
|
|
129819
|
+
} (sax));
|
|
129738
129820
|
return sax;
|
|
129739
129821
|
}
|
|
129740
129822
|
|
|
@@ -130191,8 +130273,8 @@ function requireParser () {
|
|
|
130191
130273
|
return parser.parseStringPromise(str);
|
|
130192
130274
|
};
|
|
130193
130275
|
|
|
130194
|
-
}).call(commonjsGlobal);
|
|
130195
|
-
} (parser));
|
|
130276
|
+
}).call(commonjsGlobal);
|
|
130277
|
+
} (parser));
|
|
130196
130278
|
return parser;
|
|
130197
130279
|
}
|
|
130198
130280
|
|
|
@@ -133421,6 +133503,8 @@ var loadBmfont = function loadFont(opt, cb) {
|
|
|
133421
133503
|
}
|
|
133422
133504
|
};
|
|
133423
133505
|
|
|
133506
|
+
var bMFont = /*@__PURE__*/getDefaultExportFromCjs(loadBmfont);
|
|
133507
|
+
|
|
133424
133508
|
function measureText(font, text) {
|
|
133425
133509
|
let x = 0;
|
|
133426
133510
|
for (let i = 0; i < text.length; i++) {
|
|
@@ -133432,21 +133516,21 @@ function measureText(font, text) {
|
|
|
133432
133516
|
return x;
|
|
133433
133517
|
}
|
|
133434
133518
|
function splitLines(font, text, maxWidth) {
|
|
133435
|
-
const words = text.split(" ");
|
|
133519
|
+
const words = text.replace(/[\r\n]+/g, " \n").split(" ");
|
|
133436
133520
|
const lines = [];
|
|
133437
133521
|
let currentLine = [];
|
|
133438
133522
|
let longestLine = 0;
|
|
133439
133523
|
words.forEach(word => {
|
|
133440
133524
|
const line = [...currentLine, word].join(" ");
|
|
133441
133525
|
const length = measureText(font, line);
|
|
133442
|
-
if (length <= maxWidth) {
|
|
133526
|
+
if (length <= maxWidth && !word.includes("\n")) {
|
|
133443
133527
|
if (length > longestLine) {
|
|
133444
133528
|
longestLine = length;
|
|
133445
133529
|
}
|
|
133446
133530
|
currentLine.push(word);
|
|
133447
133531
|
} else {
|
|
133448
133532
|
lines.push(currentLine);
|
|
133449
|
-
currentLine = [word];
|
|
133533
|
+
currentLine = [word.replace("\n", "")];
|
|
133450
133534
|
}
|
|
133451
133535
|
});
|
|
133452
133536
|
lines.push(currentLine);
|
|
@@ -133531,7 +133615,7 @@ var print = (() => ({
|
|
|
133531
133615
|
cb = cb || function (err, font) {
|
|
133532
133616
|
if (err) reject(err);else resolve(font);
|
|
133533
133617
|
};
|
|
133534
|
-
|
|
133618
|
+
bMFont(file, (err, font) => {
|
|
133535
133619
|
const chars = {};
|
|
133536
133620
|
const kernings = {};
|
|
133537
133621
|
if (err) {
|
|
@@ -134672,6 +134756,8 @@ var Jimp = configure({
|
|
|
134672
134756
|
|
|
134673
134757
|
var jsQR$1 = {exports: {}};
|
|
134674
134758
|
|
|
134759
|
+
jsQR$1.exports;
|
|
134760
|
+
|
|
134675
134761
|
(function (module, exports) {
|
|
134676
134762
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
134677
134763
|
module.exports = factory();
|
|
@@ -144741,10 +144827,11 @@ var jsQR$1 = {exports: {}};
|
|
|
144741
144827
|
|
|
144742
144828
|
/***/ })
|
|
144743
144829
|
/******/ ])["default"];
|
|
144744
|
-
});
|
|
144745
|
-
} (jsQR$1));
|
|
144830
|
+
});
|
|
144831
|
+
} (jsQR$1, jsQR$1.exports));
|
|
144746
144832
|
|
|
144747
|
-
var
|
|
144833
|
+
var jsQRExports = jsQR$1.exports;
|
|
144834
|
+
var jsQR = /*@__PURE__*/getDefaultExportFromCjs(jsQRExports);
|
|
144748
144835
|
|
|
144749
144836
|
const decodeQRCodeFromFile = async (filePath) => {
|
|
144750
144837
|
let decodedString;
|
|
@@ -146303,7 +146390,7 @@ const executeWithThrottledResources = async ({ code: emulatedCode, kind = "both"
|
|
|
146303
146390
|
var main$2 = {exports: {}};
|
|
146304
146391
|
|
|
146305
146392
|
var name = "dotenv";
|
|
146306
|
-
var version$1 = "16.
|
|
146393
|
+
var version$1 = "16.4.5";
|
|
146307
146394
|
var description = "Loads environment variables from .env file";
|
|
146308
146395
|
var main$1 = "lib/main.js";
|
|
146309
146396
|
var types = "lib/main.d.ts";
|
|
@@ -146327,6 +146414,7 @@ var scripts = {
|
|
|
146327
146414
|
"lint-readme": "standard-markdown",
|
|
146328
146415
|
pretest: "npm run lint && npm run dts-check",
|
|
146329
146416
|
test: "tap tests/*.js --100 -Rspec",
|
|
146417
|
+
"test:coverage": "tap --coverage-report=lcov",
|
|
146330
146418
|
prerelease: "npm test",
|
|
146331
146419
|
release: "standard-version"
|
|
146332
146420
|
};
|
|
@@ -146334,7 +146422,7 @@ var repository = {
|
|
|
146334
146422
|
type: "git",
|
|
146335
146423
|
url: "git://github.com/motdotla/dotenv.git"
|
|
146336
146424
|
};
|
|
146337
|
-
var funding = "https://
|
|
146425
|
+
var funding = "https://dotenvx.com";
|
|
146338
146426
|
var keywords = [
|
|
146339
146427
|
"dotenv",
|
|
146340
146428
|
"env",
|
|
@@ -146437,11 +146525,13 @@ function _parseVault (options) {
|
|
|
146437
146525
|
// Parse .env.vault
|
|
146438
146526
|
const result = DotenvModule.configDotenv({ path: vaultPath });
|
|
146439
146527
|
if (!result.parsed) {
|
|
146440
|
-
|
|
146528
|
+
const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`);
|
|
146529
|
+
err.code = 'MISSING_DATA';
|
|
146530
|
+
throw err
|
|
146441
146531
|
}
|
|
146442
146532
|
|
|
146443
146533
|
// handle scenario for comma separated keys - for use with key rotation
|
|
146444
|
-
// example: DOTENV_KEY="dotenv://:key_1234@
|
|
146534
|
+
// example: DOTENV_KEY="dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=prod,dotenv://:key_7890@dotenvx.com/vault/.env.vault?environment=prod"
|
|
146445
146535
|
const keys = _dotenvKey(options).split(',');
|
|
146446
146536
|
const length = keys.length;
|
|
146447
146537
|
|
|
@@ -146505,7 +146595,9 @@ function _instructions (result, dotenvKey) {
|
|
|
146505
146595
|
uri = new URL(dotenvKey);
|
|
146506
146596
|
} catch (error) {
|
|
146507
146597
|
if (error.code === 'ERR_INVALID_URL') {
|
|
146508
|
-
|
|
146598
|
+
const err = new Error('INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development');
|
|
146599
|
+
err.code = 'INVALID_DOTENV_KEY';
|
|
146600
|
+
throw err
|
|
146509
146601
|
}
|
|
146510
146602
|
|
|
146511
146603
|
throw error
|
|
@@ -146514,34 +146606,53 @@ function _instructions (result, dotenvKey) {
|
|
|
146514
146606
|
// Get decrypt key
|
|
146515
146607
|
const key = uri.password;
|
|
146516
146608
|
if (!key) {
|
|
146517
|
-
|
|
146609
|
+
const err = new Error('INVALID_DOTENV_KEY: Missing key part');
|
|
146610
|
+
err.code = 'INVALID_DOTENV_KEY';
|
|
146611
|
+
throw err
|
|
146518
146612
|
}
|
|
146519
146613
|
|
|
146520
146614
|
// Get environment
|
|
146521
146615
|
const environment = uri.searchParams.get('environment');
|
|
146522
146616
|
if (!environment) {
|
|
146523
|
-
|
|
146617
|
+
const err = new Error('INVALID_DOTENV_KEY: Missing environment part');
|
|
146618
|
+
err.code = 'INVALID_DOTENV_KEY';
|
|
146619
|
+
throw err
|
|
146524
146620
|
}
|
|
146525
146621
|
|
|
146526
146622
|
// Get ciphertext payload
|
|
146527
146623
|
const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`;
|
|
146528
146624
|
const ciphertext = result.parsed[environmentKey]; // DOTENV_VAULT_PRODUCTION
|
|
146529
146625
|
if (!ciphertext) {
|
|
146530
|
-
|
|
146626
|
+
const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`);
|
|
146627
|
+
err.code = 'NOT_FOUND_DOTENV_ENVIRONMENT';
|
|
146628
|
+
throw err
|
|
146531
146629
|
}
|
|
146532
146630
|
|
|
146533
146631
|
return { ciphertext, key }
|
|
146534
146632
|
}
|
|
146535
146633
|
|
|
146536
146634
|
function _vaultPath (options) {
|
|
146537
|
-
let
|
|
146635
|
+
let possibleVaultPath = null;
|
|
146538
146636
|
|
|
146539
146637
|
if (options && options.path && options.path.length > 0) {
|
|
146540
|
-
|
|
146638
|
+
if (Array.isArray(options.path)) {
|
|
146639
|
+
for (const filepath of options.path) {
|
|
146640
|
+
if (fs.existsSync(filepath)) {
|
|
146641
|
+
possibleVaultPath = filepath.endsWith('.vault') ? filepath : `${filepath}.vault`;
|
|
146642
|
+
}
|
|
146643
|
+
}
|
|
146644
|
+
} else {
|
|
146645
|
+
possibleVaultPath = options.path.endsWith('.vault') ? options.path : `${options.path}.vault`;
|
|
146646
|
+
}
|
|
146647
|
+
} else {
|
|
146648
|
+
possibleVaultPath = path.resolve(process.cwd(), '.env.vault');
|
|
146541
146649
|
}
|
|
146542
146650
|
|
|
146543
|
-
|
|
146544
|
-
|
|
146651
|
+
if (fs.existsSync(possibleVaultPath)) {
|
|
146652
|
+
return possibleVaultPath
|
|
146653
|
+
}
|
|
146654
|
+
|
|
146655
|
+
return null
|
|
146545
146656
|
}
|
|
146546
146657
|
|
|
146547
146658
|
function _resolveHome (envPath) {
|
|
@@ -146564,51 +146675,73 @@ function _configVault (options) {
|
|
|
146564
146675
|
}
|
|
146565
146676
|
|
|
146566
146677
|
function configDotenv (options) {
|
|
146567
|
-
|
|
146678
|
+
const dotenvPath = path.resolve(process.cwd(), '.env');
|
|
146568
146679
|
let encoding = 'utf8';
|
|
146569
146680
|
const debug = Boolean(options && options.debug);
|
|
146570
146681
|
|
|
146571
|
-
if (options) {
|
|
146572
|
-
|
|
146573
|
-
|
|
146682
|
+
if (options && options.encoding) {
|
|
146683
|
+
encoding = options.encoding;
|
|
146684
|
+
} else {
|
|
146685
|
+
if (debug) {
|
|
146686
|
+
_debug('No encoding is specified. UTF-8 is used by default');
|
|
146574
146687
|
}
|
|
146575
|
-
|
|
146576
|
-
|
|
146688
|
+
}
|
|
146689
|
+
|
|
146690
|
+
let optionPaths = [dotenvPath]; // default, look for .env
|
|
146691
|
+
if (options && options.path) {
|
|
146692
|
+
if (!Array.isArray(options.path)) {
|
|
146693
|
+
optionPaths = [_resolveHome(options.path)];
|
|
146694
|
+
} else {
|
|
146695
|
+
optionPaths = []; // reset default
|
|
146696
|
+
for (const filepath of options.path) {
|
|
146697
|
+
optionPaths.push(_resolveHome(filepath));
|
|
146698
|
+
}
|
|
146577
146699
|
}
|
|
146578
146700
|
}
|
|
146579
146701
|
|
|
146580
|
-
|
|
146581
|
-
|
|
146582
|
-
|
|
146702
|
+
// Build the parsed data in a temporary object (because we need to return it). Once we have the final
|
|
146703
|
+
// parsed data, we will combine it with process.env (or options.processEnv if provided).
|
|
146704
|
+
let lastError;
|
|
146705
|
+
const parsedAll = {};
|
|
146706
|
+
for (const path of optionPaths) {
|
|
146707
|
+
try {
|
|
146708
|
+
// Specifying an encoding returns a string instead of a buffer
|
|
146709
|
+
const parsed = DotenvModule.parse(fs.readFileSync(path, { encoding }));
|
|
146583
146710
|
|
|
146584
|
-
|
|
146585
|
-
|
|
146586
|
-
|
|
146711
|
+
DotenvModule.populate(parsedAll, parsed, options);
|
|
146712
|
+
} catch (e) {
|
|
146713
|
+
if (debug) {
|
|
146714
|
+
_debug(`Failed to load ${path} ${e.message}`);
|
|
146715
|
+
}
|
|
146716
|
+
lastError = e;
|
|
146587
146717
|
}
|
|
146718
|
+
}
|
|
146588
146719
|
|
|
146589
|
-
|
|
146720
|
+
let processEnv = process.env;
|
|
146721
|
+
if (options && options.processEnv != null) {
|
|
146722
|
+
processEnv = options.processEnv;
|
|
146723
|
+
}
|
|
146590
146724
|
|
|
146591
|
-
|
|
146592
|
-
} catch (e) {
|
|
146593
|
-
if (debug) {
|
|
146594
|
-
_debug(`Failed to load ${dotenvPath} ${e.message}`);
|
|
146595
|
-
}
|
|
146725
|
+
DotenvModule.populate(processEnv, parsedAll, options);
|
|
146596
146726
|
|
|
146597
|
-
|
|
146727
|
+
if (lastError) {
|
|
146728
|
+
return { parsed: parsedAll, error: lastError }
|
|
146729
|
+
} else {
|
|
146730
|
+
return { parsed: parsedAll }
|
|
146598
146731
|
}
|
|
146599
146732
|
}
|
|
146600
146733
|
|
|
146601
146734
|
// Populates process.env from .env file
|
|
146602
146735
|
function config (options) {
|
|
146603
|
-
const vaultPath = _vaultPath(options);
|
|
146604
|
-
|
|
146605
146736
|
// fallback to original dotenv if DOTENV_KEY is not set
|
|
146606
146737
|
if (_dotenvKey(options).length === 0) {
|
|
146607
146738
|
return DotenvModule.configDotenv(options)
|
|
146608
146739
|
}
|
|
146609
146740
|
|
|
146741
|
+
const vaultPath = _vaultPath(options);
|
|
146742
|
+
|
|
146610
146743
|
// dotenvKey exists but .env.vault file does not exist
|
|
146611
|
-
if (!
|
|
146744
|
+
if (!vaultPath) {
|
|
146612
146745
|
_warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`);
|
|
146613
146746
|
|
|
146614
146747
|
return DotenvModule.configDotenv(options)
|
|
@@ -146621,9 +146754,9 @@ function decrypt (encrypted, keyStr) {
|
|
|
146621
146754
|
const key = Buffer.from(keyStr.slice(-64), 'hex');
|
|
146622
146755
|
let ciphertext = Buffer.from(encrypted, 'base64');
|
|
146623
146756
|
|
|
146624
|
-
const nonce = ciphertext.
|
|
146625
|
-
const authTag = ciphertext.
|
|
146626
|
-
ciphertext = ciphertext.
|
|
146757
|
+
const nonce = ciphertext.subarray(0, 12);
|
|
146758
|
+
const authTag = ciphertext.subarray(-16);
|
|
146759
|
+
ciphertext = ciphertext.subarray(12, -16);
|
|
146627
146760
|
|
|
146628
146761
|
try {
|
|
146629
146762
|
const aesgcm = crypto.createDecipheriv('aes-256-gcm', key, nonce);
|
|
@@ -146635,14 +146768,14 @@ function decrypt (encrypted, keyStr) {
|
|
|
146635
146768
|
const decryptionFailed = error.message === 'Unsupported state or unable to authenticate data';
|
|
146636
146769
|
|
|
146637
146770
|
if (isRange || invalidKeyLength) {
|
|
146638
|
-
const
|
|
146639
|
-
|
|
146771
|
+
const err = new Error('INVALID_DOTENV_KEY: It must be 64 characters long (or more)');
|
|
146772
|
+
err.code = 'INVALID_DOTENV_KEY';
|
|
146773
|
+
throw err
|
|
146640
146774
|
} else if (decryptionFailed) {
|
|
146641
|
-
const
|
|
146642
|
-
|
|
146775
|
+
const err = new Error('DECRYPTION_FAILED: Please check your DOTENV_KEY');
|
|
146776
|
+
err.code = 'DECRYPTION_FAILED';
|
|
146777
|
+
throw err
|
|
146643
146778
|
} else {
|
|
146644
|
-
console.error('Error: ', error.code);
|
|
146645
|
-
console.error('Error: ', error.message);
|
|
146646
146779
|
throw error
|
|
146647
146780
|
}
|
|
146648
146781
|
}
|
|
@@ -146654,7 +146787,9 @@ function populate (processEnv, parsed, options = {}) {
|
|
|
146654
146787
|
const override = Boolean(options && options.override);
|
|
146655
146788
|
|
|
146656
146789
|
if (typeof parsed !== 'object') {
|
|
146657
|
-
|
|
146790
|
+
const err = new Error('OBJECT_REQUIRED: Please check the processEnv argument being passed to populate');
|
|
146791
|
+
err.code = 'OBJECT_REQUIRED';
|
|
146792
|
+
throw err
|
|
146658
146793
|
}
|
|
146659
146794
|
|
|
146660
146795
|
// Set process.env
|
|
@@ -146697,82 +146832,94 @@ main$2.exports.populate = DotenvModule.populate;
|
|
|
146697
146832
|
|
|
146698
146833
|
main$2.exports = DotenvModule;
|
|
146699
146834
|
|
|
146835
|
+
var mainExports = main$2.exports;
|
|
146836
|
+
var dotenv = /*@__PURE__*/getDefaultExportFromCjs(mainExports);
|
|
146837
|
+
|
|
146700
146838
|
var main = {};
|
|
146701
146839
|
|
|
146702
|
-
//
|
|
146703
|
-
|
|
146704
|
-
|
|
146705
|
-
|
|
146706
|
-
|
|
146840
|
+
// * /
|
|
146841
|
+
// * (\\)? # is it escaped with a backslash?
|
|
146842
|
+
// * (\$) # literal $
|
|
146843
|
+
// * (?!\() # shouldnt be followed by parenthesis
|
|
146844
|
+
// * (\{?) # first brace wrap opening
|
|
146845
|
+
// * ([\w.]+) # key
|
|
146846
|
+
// * (?::-((?:\$\{(?:\$\{(?:\$\{[^}]*\}|[^}])*}|[^}])*}|[^}])+))? # optional default nested 3 times
|
|
146847
|
+
// * (\}?) # last brace warp closing
|
|
146848
|
+
// * /xi
|
|
146707
146849
|
|
|
146708
|
-
|
|
146709
|
-
// find the last unescaped dollar sign in the
|
|
146710
|
-
// value so that we can evaluate it
|
|
146711
|
-
const lastUnescapedDollarSignIndex = _searchLast(envValue, /(?!(?<=\\))\$/g);
|
|
146850
|
+
const DOTENV_SUBSTITUTION_REGEX = /(\\)?(\$)(?!\()(\{?)([\w.]+)(?::?-((?:\$\{(?:\$\{(?:\$\{[^}]*\}|[^}])*}|[^}])*}|[^}])+))?(\}?)/gi;
|
|
146712
146851
|
|
|
146713
|
-
|
|
146714
|
-
|
|
146715
|
-
|
|
146852
|
+
function _resolveEscapeSequences (value) {
|
|
146853
|
+
return value.replace(/\\\$/g, '$')
|
|
146854
|
+
}
|
|
146716
146855
|
|
|
146717
|
-
|
|
146718
|
-
|
|
146856
|
+
function interpolate (value, processEnv, parsed) {
|
|
146857
|
+
return value.replace(DOTENV_SUBSTITUTION_REGEX, (match, escaped, dollarSign, openBrace, key, defaultValue, closeBrace) => {
|
|
146858
|
+
if (escaped === '\\') {
|
|
146859
|
+
return match.slice(1)
|
|
146860
|
+
} else {
|
|
146861
|
+
if (processEnv[key]) {
|
|
146862
|
+
if (processEnv[key] === parsed[key]) {
|
|
146863
|
+
return processEnv[key]
|
|
146864
|
+
} else {
|
|
146865
|
+
// scenario: PASSWORD_EXPAND_NESTED=${PASSWORD_EXPAND}
|
|
146866
|
+
return interpolate(processEnv[key], processEnv, parsed)
|
|
146867
|
+
}
|
|
146868
|
+
}
|
|
146719
146869
|
|
|
146720
|
-
|
|
146721
|
-
|
|
146722
|
-
|
|
146723
|
-
|
|
146724
|
-
|
|
146725
|
-
|
|
146726
|
-
|
|
146727
|
-
|
|
146728
|
-
* }? // optional closing curly brace
|
|
146729
|
-
* )
|
|
146730
|
-
*/
|
|
146731
|
-
const matchGroup = /((?!(?<=\\))\${?([\w]+)(?::-([^}\\]*))?}?)/;
|
|
146732
|
-
const match = rightMostGroup.match(matchGroup);
|
|
146733
|
-
|
|
146734
|
-
if (match != null) {
|
|
146735
|
-
const [, group, variableName, defaultValue] = match;
|
|
146736
|
-
|
|
146737
|
-
return _interpolate(
|
|
146738
|
-
envValue.replace(
|
|
146739
|
-
group,
|
|
146740
|
-
environment[variableName] ||
|
|
146741
|
-
defaultValue ||
|
|
146742
|
-
config.parsed[variableName] ||
|
|
146743
|
-
''
|
|
146744
|
-
),
|
|
146745
|
-
environment,
|
|
146746
|
-
config
|
|
146747
|
-
)
|
|
146748
|
-
}
|
|
146870
|
+
if (parsed[key]) {
|
|
146871
|
+
// avoid recursion from EXPAND_SELF=$EXPAND_SELF
|
|
146872
|
+
if (parsed[key] === value) {
|
|
146873
|
+
return parsed[key]
|
|
146874
|
+
} else {
|
|
146875
|
+
return interpolate(parsed[key], processEnv, parsed)
|
|
146876
|
+
}
|
|
146877
|
+
}
|
|
146749
146878
|
|
|
146750
|
-
|
|
146751
|
-
|
|
146879
|
+
if (defaultValue) {
|
|
146880
|
+
if (defaultValue.startsWith('$')) {
|
|
146881
|
+
return interpolate(defaultValue, processEnv, parsed)
|
|
146882
|
+
} else {
|
|
146883
|
+
return defaultValue
|
|
146884
|
+
}
|
|
146885
|
+
}
|
|
146752
146886
|
|
|
146753
|
-
|
|
146754
|
-
|
|
146887
|
+
return ''
|
|
146888
|
+
}
|
|
146889
|
+
})
|
|
146755
146890
|
}
|
|
146756
146891
|
|
|
146757
|
-
function expand (
|
|
146758
|
-
|
|
146759
|
-
|
|
146892
|
+
function expand (options) {
|
|
146893
|
+
let processEnv = process.env;
|
|
146894
|
+
if (options && options.processEnv != null) {
|
|
146895
|
+
processEnv = options.processEnv;
|
|
146896
|
+
}
|
|
146760
146897
|
|
|
146761
|
-
for (const
|
|
146762
|
-
|
|
146763
|
-
? environment[configKey]
|
|
146764
|
-
: config.parsed[configKey];
|
|
146898
|
+
for (const key in options.parsed) {
|
|
146899
|
+
let value = options.parsed[key];
|
|
146765
146900
|
|
|
146766
|
-
|
|
146767
|
-
|
|
146768
|
-
|
|
146901
|
+
const inProcessEnv = Object.prototype.hasOwnProperty.call(processEnv, key);
|
|
146902
|
+
if (inProcessEnv) {
|
|
146903
|
+
if (processEnv[key] === options.parsed[key]) {
|
|
146904
|
+
// assume was set to processEnv from the .env file if the values match and therefore interpolate
|
|
146905
|
+
value = interpolate(value, processEnv, options.parsed);
|
|
146906
|
+
} else {
|
|
146907
|
+
// do not interpolate - assume processEnv had the intended value even if containing a $.
|
|
146908
|
+
value = processEnv[key];
|
|
146909
|
+
}
|
|
146910
|
+
} else {
|
|
146911
|
+
// not inProcessEnv so assume interpolation for this .env key
|
|
146912
|
+
value = interpolate(value, processEnv, options.parsed);
|
|
146913
|
+
}
|
|
146914
|
+
|
|
146915
|
+
options.parsed[key] = _resolveEscapeSequences(value);
|
|
146769
146916
|
}
|
|
146770
146917
|
|
|
146771
|
-
for (const processKey in
|
|
146772
|
-
|
|
146918
|
+
for (const processKey in options.parsed) {
|
|
146919
|
+
processEnv[processKey] = options.parsed[processKey];
|
|
146773
146920
|
}
|
|
146774
146921
|
|
|
146775
|
-
return
|
|
146922
|
+
return options
|
|
146776
146923
|
}
|
|
146777
146924
|
|
|
146778
146925
|
main.expand = expand;
|
|
@@ -146780,12 +146927,12 @@ main.expand = expand;
|
|
|
146780
146927
|
// @ts-check
|
|
146781
146928
|
var _a, _b;
|
|
146782
146929
|
process.env.TEST_ENV = (_a = process.env.TEST_ENV) !== null && _a !== void 0 ? _a : ENVIRONMENT.development;
|
|
146783
|
-
const env =
|
|
146930
|
+
const env = dotenv.config({
|
|
146784
146931
|
path: `./e2e/config/.env.${process.env.TEST_ENV}`,
|
|
146785
146932
|
});
|
|
146786
146933
|
main.expand(env);
|
|
146787
146934
|
if (fs$d.existsSync("./e2e/config/.env.local")) {
|
|
146788
|
-
const localEnv =
|
|
146935
|
+
const localEnv = dotenv.config({
|
|
146789
146936
|
path: "./e2e/config/.env.local",
|
|
146790
146937
|
});
|
|
146791
146938
|
main.expand(localEnv);
|