@shopify/cli-kit 3.0.11 → 3.0.12
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/CHANGELOG.md +13 -0
- package/dist/{index-ddf77494.js → index-26330ff1.js} +1573 -390
- package/dist/index-26330ff1.js.map +1 -0
- package/dist/index.d.ts +100 -30
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/{multipart-parser-589b8668.js → multipart-parser-ab287634.js} +3 -2
- package/dist/multipart-parser-ab287634.js.map +1 -0
- package/package.json +4 -2
- package/dist/index-ddf77494.js.map +0 -1
- package/dist/multipart-parser-589b8668.js.map +0 -1
|
@@ -3,7 +3,7 @@ import require$$0$3 from 'events';
|
|
|
3
3
|
import require$$0$2 from 'readline';
|
|
4
4
|
import require$$0$5, { sep as sep$1, extname as extname$1, resolve as resolve$4, dirname as dirname$2 } from 'path';
|
|
5
5
|
import path$I from 'node:path';
|
|
6
|
-
import url$1, { fileURLToPath, format as format$
|
|
6
|
+
import url$1, { fileURLToPath, format as format$6 } from 'node:url';
|
|
7
7
|
import process$2, { platform as platform$1 } from 'node:process';
|
|
8
8
|
import fs$L, { promises } from 'node:fs';
|
|
9
9
|
import require$$1$2, { constants as constants$8, EOL, networkInterfaces } from 'os';
|
|
@@ -19,6 +19,7 @@ import require$$0$b from 'constants';
|
|
|
19
19
|
import Stream$5, { Writable as Writable$1, PassThrough as PassThrough$7, pipeline as pipeline$2 } from 'node:stream';
|
|
20
20
|
import { promisify as promisify$8, types as types$6, deprecate } from 'node:util';
|
|
21
21
|
import crypto$1, { randomUUID } from 'crypto';
|
|
22
|
+
import prettier from 'prettier';
|
|
22
23
|
import * as tty$1 from 'tty';
|
|
23
24
|
import tty__default from 'tty';
|
|
24
25
|
import StackTracey from 'stacktracey';
|
|
@@ -38,7 +39,7 @@ import require$$0$d from 'http2';
|
|
|
38
39
|
import require$$1$4 from 'tls';
|
|
39
40
|
import require$$0$e, { createServer } from 'net';
|
|
40
41
|
import require$$0$f from 'punycode';
|
|
41
|
-
import { parse as parse$i, stringify as stringify$
|
|
42
|
+
import { parse as parse$i, stringify as stringify$f } from 'envfile';
|
|
42
43
|
|
|
43
44
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
44
45
|
|
|
@@ -142,7 +143,7 @@ Reflect.defineProperty(module.exports, 'windows', { enumerable: false, value: wi
|
|
|
142
143
|
Reflect.defineProperty(module.exports, 'other', { enumerable: false, value: other });
|
|
143
144
|
}(symbols$2));
|
|
144
145
|
|
|
145
|
-
const isObject$
|
|
146
|
+
const isObject$7 = val => val !== null && typeof val === 'object' && !Array.isArray(val);
|
|
146
147
|
|
|
147
148
|
/* eslint-disable no-control-regex */
|
|
148
149
|
// this is a modified version of https://github.com/chalk/ansi-regex (MIT License)
|
|
@@ -298,7 +299,7 @@ const create$3 = () => {
|
|
|
298
299
|
};
|
|
299
300
|
|
|
300
301
|
colors.theme = custom => {
|
|
301
|
-
if (!isObject$
|
|
302
|
+
if (!isObject$7(custom)) throw new TypeError('Expected theme to be an object');
|
|
302
303
|
for (let name of Object.keys(custom)) {
|
|
303
304
|
colors.alias(name, custom[name]);
|
|
304
305
|
}
|
|
@@ -1892,7 +1893,7 @@ const colors$5 = ansiColors.exports;
|
|
|
1892
1893
|
const Prompt$5 = prompt$1;
|
|
1893
1894
|
const roles = roles_1;
|
|
1894
1895
|
const utils$t = utils$z;
|
|
1895
|
-
const { reorder, scrollUp, scrollDown, isObject: isObject$
|
|
1896
|
+
const { reorder, scrollUp, scrollDown, isObject: isObject$6, swap } = utils$t;
|
|
1896
1897
|
|
|
1897
1898
|
class ArrayPrompt$3 extends Prompt$5 {
|
|
1898
1899
|
constructor(options) {
|
|
@@ -1926,7 +1927,7 @@ class ArrayPrompt$3 extends Prompt$5 {
|
|
|
1926
1927
|
throw new Error('At least one choice must be selectable');
|
|
1927
1928
|
}
|
|
1928
1929
|
|
|
1929
|
-
if (isObject$
|
|
1930
|
+
if (isObject$6(initial)) initial = Object.keys(initial);
|
|
1930
1931
|
if (Array.isArray(initial)) {
|
|
1931
1932
|
if (autofocus != null) this.index = this.findIndex(autofocus);
|
|
1932
1933
|
initial.forEach(v => this.enable(this.find(v)));
|
|
@@ -2190,7 +2191,7 @@ class ArrayPrompt$3 extends Prompt$5 {
|
|
|
2190
2191
|
let len = this.choices.length;
|
|
2191
2192
|
let num = this.num;
|
|
2192
2193
|
|
|
2193
|
-
let handle = (val, res) => {
|
|
2194
|
+
let handle = (val = false, res) => {
|
|
2194
2195
|
clearTimeout(this.numberTimeout);
|
|
2195
2196
|
if (val) res = number(num);
|
|
2196
2197
|
this.num = '';
|
|
@@ -2402,7 +2403,7 @@ class ArrayPrompt$3 extends Prompt$5 {
|
|
|
2402
2403
|
}
|
|
2403
2404
|
|
|
2404
2405
|
find(value, prop) {
|
|
2405
|
-
if (isObject$
|
|
2406
|
+
if (isObject$6(value)) return prop ? value[prop] : value;
|
|
2406
2407
|
let isChoice = (ele, i) => [ele.name, i].includes(value);
|
|
2407
2408
|
let fn = typeof value === 'function' ? value : isChoice;
|
|
2408
2409
|
let choice = this.choices.find(fn);
|
|
@@ -2810,7 +2811,7 @@ const utils$r = utils$z;
|
|
|
2810
2811
|
* @api public
|
|
2811
2812
|
*/
|
|
2812
2813
|
|
|
2813
|
-
var placeholder$2 = (prompt, options) => {
|
|
2814
|
+
var placeholder$2 = (prompt, options = {}) => {
|
|
2814
2815
|
prompt.cursorHide();
|
|
2815
2816
|
|
|
2816
2817
|
let { input = '', initial = '', pos, showCursor = true, color } = options;
|
|
@@ -4059,7 +4060,7 @@ class Item {
|
|
|
4059
4060
|
}
|
|
4060
4061
|
}
|
|
4061
4062
|
|
|
4062
|
-
const tokenize = async(options = {}, defaults, fn = token => token) => {
|
|
4063
|
+
const tokenize = async(options = {}, defaults = {}, fn = token => token) => {
|
|
4063
4064
|
let unique = new Set();
|
|
4064
4065
|
let fields = options.fields || [];
|
|
4065
4066
|
let input = options.template;
|
|
@@ -5417,7 +5418,7 @@ const relative = function(from, to) {
|
|
|
5417
5418
|
const dirname$1 = function(p) {
|
|
5418
5419
|
return require$$0$5.posix.dirname(normalizeWindowsPath(p));
|
|
5419
5420
|
};
|
|
5420
|
-
const format$
|
|
5421
|
+
const format$5 = function(p) {
|
|
5421
5422
|
return normalizeWindowsPath(require$$0$5.posix.format(p));
|
|
5422
5423
|
};
|
|
5423
5424
|
const basename = function(p, ext) {
|
|
@@ -5440,7 +5441,7 @@ const _path = /*#__PURE__*/Object.freeze({
|
|
|
5440
5441
|
extname: extname,
|
|
5441
5442
|
relative: relative,
|
|
5442
5443
|
dirname: dirname$1,
|
|
5443
|
-
format: format$
|
|
5444
|
+
format: format$5,
|
|
5444
5445
|
basename: basename,
|
|
5445
5446
|
parse: parse$h
|
|
5446
5447
|
});
|
|
@@ -5610,7 +5611,7 @@ async function pLocate$2(
|
|
|
5610
5611
|
{
|
|
5611
5612
|
concurrency = Number.POSITIVE_INFINITY,
|
|
5612
5613
|
preserveOrder = true,
|
|
5613
|
-
},
|
|
5614
|
+
} = {},
|
|
5614
5615
|
) {
|
|
5615
5616
|
const limit = pLimit$3(concurrency);
|
|
5616
5617
|
|
|
@@ -5637,14 +5638,14 @@ const typeMappings = {
|
|
|
5637
5638
|
};
|
|
5638
5639
|
|
|
5639
5640
|
function checkType(type) {
|
|
5640
|
-
if (type
|
|
5641
|
+
if (Object.hasOwnProperty.call(typeMappings, type)) {
|
|
5641
5642
|
return;
|
|
5642
5643
|
}
|
|
5643
5644
|
|
|
5644
5645
|
throw new Error(`Invalid type specified: ${type}`);
|
|
5645
5646
|
}
|
|
5646
5647
|
|
|
5647
|
-
const matchType = (type, stat) =>
|
|
5648
|
+
const matchType = (type, stat) => stat[typeMappings[type]]();
|
|
5648
5649
|
|
|
5649
5650
|
const toPath$1 = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;
|
|
5650
5651
|
|
|
@@ -5677,7 +5678,7 @@ const toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath)
|
|
|
5677
5678
|
|
|
5678
5679
|
const findUpStop = Symbol('findUpStop');
|
|
5679
5680
|
|
|
5680
|
-
async function findUpMultiple(name, options) {
|
|
5681
|
+
async function findUpMultiple(name, options = {}) {
|
|
5681
5682
|
let directory = path$I.resolve(toPath(options.cwd) || '');
|
|
5682
5683
|
const {root} = path$I.parse(directory);
|
|
5683
5684
|
const stopAt = path$I.resolve(directory, options.stopAt || root);
|
|
@@ -6152,7 +6153,7 @@ exports.flatten = (...args) => {
|
|
|
6152
6153
|
|
|
6153
6154
|
const utils$m = utils$n;
|
|
6154
6155
|
|
|
6155
|
-
var stringify$
|
|
6156
|
+
var stringify$e = (ast, options = {}) => {
|
|
6156
6157
|
let stringify = (node, parent = {}) => {
|
|
6157
6158
|
let invalidBlock = options.escapeInvalid && utils$m.isInvalidBrace(parent);
|
|
6158
6159
|
let invalidNode = node.invalid === true && options.escapeInvalid === true;
|
|
@@ -6494,7 +6495,7 @@ var toRegexRange_1 = toRegexRange$1;
|
|
|
6494
6495
|
const util$9 = require$$0$6;
|
|
6495
6496
|
const toRegexRange = toRegexRange_1;
|
|
6496
6497
|
|
|
6497
|
-
const isObject$
|
|
6498
|
+
const isObject$5 = val => val !== null && typeof val === 'object' && !Array.isArray(val);
|
|
6498
6499
|
|
|
6499
6500
|
const transform$1 = toNumber => {
|
|
6500
6501
|
return value => toNumber === true ? Number(value) : String(value);
|
|
@@ -6515,7 +6516,7 @@ const zeros = input => {
|
|
|
6515
6516
|
return index > 0;
|
|
6516
6517
|
};
|
|
6517
6518
|
|
|
6518
|
-
const stringify$
|
|
6519
|
+
const stringify$d = (start, end, options) => {
|
|
6519
6520
|
if (typeof start === 'string' || typeof end === 'string') {
|
|
6520
6521
|
return true;
|
|
6521
6522
|
}
|
|
@@ -6611,7 +6612,7 @@ const invalidStep = (step, options) => {
|
|
|
6611
6612
|
return [];
|
|
6612
6613
|
};
|
|
6613
6614
|
|
|
6614
|
-
const fillNumbers = (start, end, step = 1, options) => {
|
|
6615
|
+
const fillNumbers = (start, end, step = 1, options = {}) => {
|
|
6615
6616
|
let a = Number(start);
|
|
6616
6617
|
let b = Number(end);
|
|
6617
6618
|
|
|
@@ -6632,7 +6633,7 @@ const fillNumbers = (start, end, step = 1, options) => {
|
|
|
6632
6633
|
|
|
6633
6634
|
let padded = zeros(startString) || zeros(endString) || zeros(stepString);
|
|
6634
6635
|
let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
|
|
6635
|
-
let toNumber = padded === false && stringify$
|
|
6636
|
+
let toNumber = padded === false && stringify$d(start, end, options) === false;
|
|
6636
6637
|
let format = options.transform || transform$1(toNumber);
|
|
6637
6638
|
|
|
6638
6639
|
if (options.toRegex && step === 1) {
|
|
@@ -6663,7 +6664,7 @@ const fillNumbers = (start, end, step = 1, options) => {
|
|
|
6663
6664
|
return range;
|
|
6664
6665
|
};
|
|
6665
6666
|
|
|
6666
|
-
const fillLetters = (start, end, step = 1, options) => {
|
|
6667
|
+
const fillLetters = (start, end, step = 1, options = {}) => {
|
|
6667
6668
|
if ((!isNumber$3(start) && start.length > 1) || (!isNumber$3(end) && end.length > 1)) {
|
|
6668
6669
|
return invalidRange(start, end, options);
|
|
6669
6670
|
}
|
|
@@ -6710,7 +6711,7 @@ const fill$2 = (start, end, step, options = {}) => {
|
|
|
6710
6711
|
return fill$2(start, end, 1, { transform: step });
|
|
6711
6712
|
}
|
|
6712
6713
|
|
|
6713
|
-
if (isObject$
|
|
6714
|
+
if (isObject$5(step)) {
|
|
6714
6715
|
return fill$2(start, end, 0, step);
|
|
6715
6716
|
}
|
|
6716
6717
|
|
|
@@ -6719,7 +6720,7 @@ const fill$2 = (start, end, step, options = {}) => {
|
|
|
6719
6720
|
step = step || opts.step || 1;
|
|
6720
6721
|
|
|
6721
6722
|
if (!isNumber$3(step)) {
|
|
6722
|
-
if (step != null && !isObject$
|
|
6723
|
+
if (step != null && !isObject$5(step)) return invalidStep(step, opts);
|
|
6723
6724
|
return fill$2(start, end, 1, step);
|
|
6724
6725
|
}
|
|
6725
6726
|
|
|
@@ -6789,7 +6790,7 @@ const compile$2 = (ast, options = {}) => {
|
|
|
6789
6790
|
var compile_1$2 = compile$2;
|
|
6790
6791
|
|
|
6791
6792
|
const fill = fillRange;
|
|
6792
|
-
const stringify$
|
|
6793
|
+
const stringify$c = stringify$e;
|
|
6793
6794
|
const utils$k = utils$n;
|
|
6794
6795
|
|
|
6795
6796
|
const append$3 = (queue = '', stash = '', enclose = false) => {
|
|
@@ -6833,7 +6834,7 @@ const expand$1 = (ast, options = {}) => {
|
|
|
6833
6834
|
}
|
|
6834
6835
|
|
|
6835
6836
|
if (node.invalid || node.dollar) {
|
|
6836
|
-
q.push(append$3(q.pop(), stringify$
|
|
6837
|
+
q.push(append$3(q.pop(), stringify$c(node, options)));
|
|
6837
6838
|
return;
|
|
6838
6839
|
}
|
|
6839
6840
|
|
|
@@ -6851,7 +6852,7 @@ const expand$1 = (ast, options = {}) => {
|
|
|
6851
6852
|
|
|
6852
6853
|
let range = fill(...args, options);
|
|
6853
6854
|
if (range.length === 0) {
|
|
6854
|
-
range = stringify$
|
|
6855
|
+
range = stringify$c(node, options);
|
|
6855
6856
|
}
|
|
6856
6857
|
|
|
6857
6858
|
q.push(append$3(q.pop(), range));
|
|
@@ -6956,7 +6957,7 @@ var constants$7 = {
|
|
|
6956
6957
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */
|
|
6957
6958
|
};
|
|
6958
6959
|
|
|
6959
|
-
const stringify$
|
|
6960
|
+
const stringify$b = stringify$e;
|
|
6960
6961
|
|
|
6961
6962
|
/**
|
|
6962
6963
|
* Constants
|
|
@@ -7199,7 +7200,7 @@ const parse$g = (input, options = {}) => {
|
|
|
7199
7200
|
if (block.ranges > 0) {
|
|
7200
7201
|
block.ranges = 0;
|
|
7201
7202
|
let open = block.nodes.shift();
|
|
7202
|
-
block.nodes = [open, { type: 'text', value: stringify$
|
|
7203
|
+
block.nodes = [open, { type: 'text', value: stringify$b(block) }];
|
|
7203
7204
|
}
|
|
7204
7205
|
|
|
7205
7206
|
push({ type: 'comma', value });
|
|
@@ -7285,7 +7286,7 @@ const parse$g = (input, options = {}) => {
|
|
|
7285
7286
|
|
|
7286
7287
|
var parse_1$3 = parse$g;
|
|
7287
7288
|
|
|
7288
|
-
const stringify$
|
|
7289
|
+
const stringify$a = stringify$e;
|
|
7289
7290
|
const compile$1 = compile_1$2;
|
|
7290
7291
|
const expand = expand_1;
|
|
7291
7292
|
const parse$f = parse_1$3;
|
|
@@ -7358,9 +7359,9 @@ braces$1.parse = (input, options = {}) => parse$f(input, options);
|
|
|
7358
7359
|
|
|
7359
7360
|
braces$1.stringify = (input, options = {}) => {
|
|
7360
7361
|
if (typeof input === 'string') {
|
|
7361
|
-
return stringify$
|
|
7362
|
+
return stringify$a(braces$1.parse(input, options), options);
|
|
7362
7363
|
}
|
|
7363
|
-
return stringify$
|
|
7364
|
+
return stringify$a(input, options);
|
|
7364
7365
|
};
|
|
7365
7366
|
|
|
7366
7367
|
/**
|
|
@@ -9185,7 +9186,7 @@ const scan = scan_1;
|
|
|
9185
9186
|
const parse$d = parse_1$2;
|
|
9186
9187
|
const utils$g = utils$j;
|
|
9187
9188
|
const constants$4 = constants$6;
|
|
9188
|
-
const isObject$
|
|
9189
|
+
const isObject$4 = val => val && typeof val === 'object' && !Array.isArray(val);
|
|
9189
9190
|
|
|
9190
9191
|
/**
|
|
9191
9192
|
* Creates a matcher function from one or more glob patterns. The
|
|
@@ -9222,7 +9223,7 @@ const picomatch$2 = (glob, options, returnState = false) => {
|
|
|
9222
9223
|
return arrayMatcher;
|
|
9223
9224
|
}
|
|
9224
9225
|
|
|
9225
|
-
const isState = isObject$
|
|
9226
|
+
const isState = isObject$4(glob) && glob.tokens && glob.input;
|
|
9226
9227
|
|
|
9227
9228
|
if (glob === '' || (typeof glob !== 'string' && !isState)) {
|
|
9228
9229
|
throw new TypeError('Expected pattern to be a non-empty string');
|
|
@@ -10354,7 +10355,7 @@ utils$o.string = string$1;
|
|
|
10354
10355
|
Object.defineProperty(tasks, "__esModule", { value: true });
|
|
10355
10356
|
tasks.convertPatternGroupToTask = tasks.convertPatternGroupsToTasks = tasks.groupPatternsByBaseDirectory = tasks.getNegativePatternsAsPositive = tasks.getPositivePatterns = tasks.convertPatternsToTasks = tasks.generate = void 0;
|
|
10356
10357
|
const utils$e = utils$o;
|
|
10357
|
-
function generate(patterns, settings) {
|
|
10358
|
+
function generate$1(patterns, settings) {
|
|
10358
10359
|
const positivePatterns = getPositivePatterns(patterns);
|
|
10359
10360
|
const negativePatterns = getNegativePatternsAsPositive(patterns, settings.ignore);
|
|
10360
10361
|
const staticPatterns = positivePatterns.filter((pattern) => utils$e.pattern.isStaticPattern(pattern, settings));
|
|
@@ -10363,7 +10364,7 @@ function generate(patterns, settings) {
|
|
|
10363
10364
|
const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, /* dynamic */ true);
|
|
10364
10365
|
return staticTasks.concat(dynamicTasks);
|
|
10365
10366
|
}
|
|
10366
|
-
tasks.generate = generate;
|
|
10367
|
+
tasks.generate = generate$1;
|
|
10367
10368
|
/**
|
|
10368
10369
|
* Returns tasks grouped by basic pattern directories.
|
|
10369
10370
|
*
|
|
@@ -12288,10 +12289,12 @@ var out = FastGlob;
|
|
|
12288
12289
|
|
|
12289
12290
|
function relativize(path) {
|
|
12290
12291
|
const result = commondir([path, process.cwd()]);
|
|
12291
|
-
|
|
12292
|
+
const relativePath = relative(process.cwd(), path);
|
|
12293
|
+
const relativeComponents = relativePath.split("/").filter((component) => component === "..").length;
|
|
12294
|
+
if (result === "/" || relativeComponents > 2) {
|
|
12292
12295
|
return path;
|
|
12293
12296
|
} else {
|
|
12294
|
-
return
|
|
12297
|
+
return relativePath;
|
|
12295
12298
|
}
|
|
12296
12299
|
}
|
|
12297
12300
|
|
|
@@ -12304,7 +12307,7 @@ var path$w = /*#__PURE__*/Object.freeze({
|
|
|
12304
12307
|
delimiter: delimiter,
|
|
12305
12308
|
dirname: dirname$1,
|
|
12306
12309
|
extname: extname,
|
|
12307
|
-
format: format$
|
|
12310
|
+
format: format$5,
|
|
12308
12311
|
isAbsolute: isAbsolute,
|
|
12309
12312
|
join: join$3,
|
|
12310
12313
|
normalize: normalize$2,
|
|
@@ -12317,7 +12320,7 @@ var path$w = /*#__PURE__*/Object.freeze({
|
|
|
12317
12320
|
});
|
|
12318
12321
|
|
|
12319
12322
|
var name = "@shopify/cli-kit";
|
|
12320
|
-
var version$
|
|
12323
|
+
var version$2 = "3.0.12";
|
|
12321
12324
|
var description$1 = "A set of utilities, interfaces, and models that are common across all the platform features";
|
|
12322
12325
|
var keywords = [
|
|
12323
12326
|
"shopify",
|
|
@@ -12370,7 +12373,8 @@ var dependencies$1 = {
|
|
|
12370
12373
|
keytar: "^7.9.0",
|
|
12371
12374
|
open: "^8.4.0",
|
|
12372
12375
|
"source-map-support": "^0.5.21",
|
|
12373
|
-
stacktracey: "^2.1.8"
|
|
12376
|
+
stacktracey: "^2.1.8",
|
|
12377
|
+
prettier: "^2.6.2"
|
|
12374
12378
|
};
|
|
12375
12379
|
var devDependencies = {
|
|
12376
12380
|
"@iarna/toml": "^2.2.5",
|
|
@@ -12396,6 +12400,7 @@ var devDependencies = {
|
|
|
12396
12400
|
"get-port-please": "^2.5.0",
|
|
12397
12401
|
graphql: "^16.4.0",
|
|
12398
12402
|
"graphql-request": "^4.3.0",
|
|
12403
|
+
haikunator: "^2.1.2",
|
|
12399
12404
|
"js-yaml": "^4.1.0",
|
|
12400
12405
|
"latest-version": "^6.0.0",
|
|
12401
12406
|
liquidjs: "^9.36.0",
|
|
@@ -12413,7 +12418,7 @@ var devDependencies = {
|
|
|
12413
12418
|
};
|
|
12414
12419
|
var cliKitPackageJson = {
|
|
12415
12420
|
name: name,
|
|
12416
|
-
version: version$
|
|
12421
|
+
version: version$2,
|
|
12417
12422
|
"private": false,
|
|
12418
12423
|
description: description$1,
|
|
12419
12424
|
keywords: keywords,
|
|
@@ -12517,7 +12522,9 @@ const constants$2 = {
|
|
|
12517
12522
|
spinWorkspace: "SPIN_WORKSPACE",
|
|
12518
12523
|
spinNamespace: "SPIN_NAMESPACE",
|
|
12519
12524
|
spinHost: "SPIN_HOST",
|
|
12520
|
-
partnersToken: "SHOPIFY_CLI_PARTNERS_TOKEN"
|
|
12525
|
+
partnersToken: "SHOPIFY_CLI_PARTNERS_TOKEN",
|
|
12526
|
+
verbose: "SHOPIFY_FLAG_VERBOSE",
|
|
12527
|
+
noAnalytics: "SHOPIFY_CLI_NO_ANALYTICS"
|
|
12521
12528
|
},
|
|
12522
12529
|
paths: {
|
|
12523
12530
|
executables: {
|
|
@@ -12540,7 +12547,7 @@ const constants$2 = {
|
|
|
12540
12547
|
}
|
|
12541
12548
|
},
|
|
12542
12549
|
versions: {
|
|
12543
|
-
cliKit: version$
|
|
12550
|
+
cliKit: version$2
|
|
12544
12551
|
},
|
|
12545
12552
|
keychain: {
|
|
12546
12553
|
service: "shopify-cli"
|
|
@@ -13217,7 +13224,7 @@ function npmRunPath(options = {}) {
|
|
|
13217
13224
|
return [...result, path_].join(path$I.delimiter);
|
|
13218
13225
|
}
|
|
13219
13226
|
|
|
13220
|
-
function npmRunPathEnv({env = process$2.env, ...options}) {
|
|
13227
|
+
function npmRunPathEnv({env = process$2.env, ...options} = {}) {
|
|
13221
13228
|
env = {...env};
|
|
13222
13229
|
|
|
13223
13230
|
const path = pathKey({env});
|
|
@@ -14652,11 +14659,25 @@ const open = async (url) => {
|
|
|
14652
14659
|
const externalOpen = await import('open');
|
|
14653
14660
|
await externalOpen.default(url);
|
|
14654
14661
|
};
|
|
14655
|
-
const captureOutput = async (command, args) => {
|
|
14656
|
-
const result = await
|
|
14662
|
+
const captureOutput = async (command, args, options) => {
|
|
14663
|
+
const result = await buildExec(command, args, options);
|
|
14657
14664
|
return result.stdout;
|
|
14658
14665
|
};
|
|
14659
14666
|
const exec$2 = (command, args, options) => {
|
|
14667
|
+
const commandProcess = buildExec(command, args, options);
|
|
14668
|
+
if (options?.stderr) {
|
|
14669
|
+
commandProcess.stderr?.pipe(options.stderr);
|
|
14670
|
+
}
|
|
14671
|
+
if (options?.stdout) {
|
|
14672
|
+
commandProcess.stdout?.pipe(options.stdout);
|
|
14673
|
+
}
|
|
14674
|
+
return commandProcess.catch((processError) => {
|
|
14675
|
+
const abortError = new Abort(processError.message);
|
|
14676
|
+
abortError.stack = processError.stack;
|
|
14677
|
+
throw abortError;
|
|
14678
|
+
});
|
|
14679
|
+
};
|
|
14680
|
+
const buildExec = (command, args, options) => {
|
|
14660
14681
|
const env = options?.env ?? process.env;
|
|
14661
14682
|
if (shouldDisplayColors()) {
|
|
14662
14683
|
env.FORCE_COLOR = "1";
|
|
@@ -14671,17 +14692,7 @@ Running system process:
|
|
|
14671
14692
|
\xB7 Command: ${command} ${args.join(" ")}
|
|
14672
14693
|
\xB7 Working directory: ${options?.cwd ?? process.cwd()}
|
|
14673
14694
|
`);
|
|
14674
|
-
|
|
14675
|
-
commandProcess.stderr?.pipe(options.stderr);
|
|
14676
|
-
}
|
|
14677
|
-
if (options?.stdout) {
|
|
14678
|
-
commandProcess.stdout?.pipe(options.stdout);
|
|
14679
|
-
}
|
|
14680
|
-
return commandProcess.catch((processError) => {
|
|
14681
|
-
const abortError = new Abort(processError.message);
|
|
14682
|
-
abortError.stack = processError.stack;
|
|
14683
|
-
throw abortError;
|
|
14684
|
-
});
|
|
14695
|
+
return commandProcess;
|
|
14685
14696
|
};
|
|
14686
14697
|
const concurrentExec = async (commands) => {
|
|
14687
14698
|
await concurrent(commands.map((command) => {
|
|
@@ -16492,7 +16503,7 @@ const assert$2 = require$$0$4;
|
|
|
16492
16503
|
|
|
16493
16504
|
const isWindows$2 = (process.platform === 'win32');
|
|
16494
16505
|
|
|
16495
|
-
function defaults$
|
|
16506
|
+
function defaults$3 (options) {
|
|
16496
16507
|
const methods = [
|
|
16497
16508
|
'unlink',
|
|
16498
16509
|
'chmod',
|
|
@@ -16524,7 +16535,7 @@ function rimraf$3 (p, options, cb) {
|
|
|
16524
16535
|
assert$2(options, 'rimraf: invalid options argument provided');
|
|
16525
16536
|
assert$2.strictEqual(typeof options, 'object', 'rimraf: options should be object');
|
|
16526
16537
|
|
|
16527
|
-
defaults$
|
|
16538
|
+
defaults$3(options);
|
|
16528
16539
|
|
|
16529
16540
|
rimraf_$1(p, options, function CB (er) {
|
|
16530
16541
|
if (er) {
|
|
@@ -16703,7 +16714,7 @@ function rimrafSync$1 (p, options) {
|
|
|
16703
16714
|
let st;
|
|
16704
16715
|
|
|
16705
16716
|
options = options || {};
|
|
16706
|
-
defaults$
|
|
16717
|
+
defaults$3(options);
|
|
16707
16718
|
|
|
16708
16719
|
assert$2(p, 'rimraf: missing path');
|
|
16709
16720
|
assert$2.strictEqual(typeof p, 'string', 'rimraf: path should be a string');
|
|
@@ -17208,7 +17219,7 @@ var ensure = {
|
|
|
17208
17219
|
ensureSymlinkSync: createSymlinkSync
|
|
17209
17220
|
};
|
|
17210
17221
|
|
|
17211
|
-
function stringify$
|
|
17222
|
+
function stringify$9 (obj, { EOL = '\n', finalEOL = true, replacer = null, spaces } = {}) {
|
|
17212
17223
|
const EOF = finalEOL ? EOL : '';
|
|
17213
17224
|
const str = JSON.stringify(obj, replacer, spaces);
|
|
17214
17225
|
|
|
@@ -17221,7 +17232,7 @@ function stripBom$1 (content) {
|
|
|
17221
17232
|
return content.replace(/^\uFEFF/, '')
|
|
17222
17233
|
}
|
|
17223
17234
|
|
|
17224
|
-
var utils$2 = { stringify: stringify$
|
|
17235
|
+
var utils$2 = { stringify: stringify$9, stripBom: stripBom$1 };
|
|
17225
17236
|
|
|
17226
17237
|
let _fs;
|
|
17227
17238
|
try {
|
|
@@ -17230,7 +17241,7 @@ try {
|
|
|
17230
17241
|
_fs = require$$0$8;
|
|
17231
17242
|
}
|
|
17232
17243
|
const universalify = universalify$1;
|
|
17233
|
-
const { stringify: stringify$
|
|
17244
|
+
const { stringify: stringify$8, stripBom } = utils$2;
|
|
17234
17245
|
|
|
17235
17246
|
async function _readFile (file, options = {}) {
|
|
17236
17247
|
if (typeof options === 'string') {
|
|
@@ -17288,7 +17299,7 @@ function readFileSync$2 (file, options = {}) {
|
|
|
17288
17299
|
async function _writeFile (file, obj, options = {}) {
|
|
17289
17300
|
const fs = options.fs || _fs;
|
|
17290
17301
|
|
|
17291
|
-
const str = stringify$
|
|
17302
|
+
const str = stringify$8(obj, options);
|
|
17292
17303
|
|
|
17293
17304
|
await universalify.fromCallback(fs.writeFile)(file, str, options);
|
|
17294
17305
|
}
|
|
@@ -17298,7 +17309,7 @@ const writeFile$1 = universalify.fromPromise(_writeFile);
|
|
|
17298
17309
|
function writeFileSync$1 (file, obj, options = {}) {
|
|
17299
17310
|
const fs = options.fs || _fs;
|
|
17300
17311
|
|
|
17301
|
-
const str = stringify$
|
|
17312
|
+
const str = stringify$8(obj, options);
|
|
17302
17313
|
// not sure if fs.writeFileSync returns anything, but just in case
|
|
17303
17314
|
return fs.writeFileSync(file, str, options)
|
|
17304
17315
|
}
|
|
@@ -17361,22 +17372,22 @@ var outputFile_1 = {
|
|
|
17361
17372
|
outputFileSync: outputFileSync$1
|
|
17362
17373
|
};
|
|
17363
17374
|
|
|
17364
|
-
const { stringify: stringify$
|
|
17375
|
+
const { stringify: stringify$7 } = utils$2;
|
|
17365
17376
|
const { outputFile } = outputFile_1;
|
|
17366
17377
|
|
|
17367
17378
|
async function outputJson (file, data, options = {}) {
|
|
17368
|
-
const str = stringify$
|
|
17379
|
+
const str = stringify$7(data, options);
|
|
17369
17380
|
|
|
17370
17381
|
await outputFile(file, str, options);
|
|
17371
17382
|
}
|
|
17372
17383
|
|
|
17373
17384
|
var outputJson_1 = outputJson;
|
|
17374
17385
|
|
|
17375
|
-
const { stringify: stringify$
|
|
17386
|
+
const { stringify: stringify$6 } = utils$2;
|
|
17376
17387
|
const { outputFileSync } = outputFile_1;
|
|
17377
17388
|
|
|
17378
17389
|
function outputJsonSync (file, data, options) {
|
|
17379
|
-
const str = stringify$
|
|
17390
|
+
const str = stringify$6(data, options);
|
|
17380
17391
|
|
|
17381
17392
|
outputFileSync(file, str, options);
|
|
17382
17393
|
}
|
|
@@ -18689,7 +18700,7 @@ let timeout = 0;
|
|
|
18689
18700
|
|
|
18690
18701
|
const isWindows$1 = (process.platform === "win32");
|
|
18691
18702
|
|
|
18692
|
-
const defaults$
|
|
18703
|
+
const defaults$2 = options => {
|
|
18693
18704
|
const methods = [
|
|
18694
18705
|
'unlink',
|
|
18695
18706
|
'chmod',
|
|
@@ -18728,7 +18739,7 @@ const rimraf$1 = (p, options, cb) => {
|
|
|
18728
18739
|
assert$1(options, 'rimraf: invalid options argument provided');
|
|
18729
18740
|
assert$1.equal(typeof options, 'object', 'rimraf: options should be object');
|
|
18730
18741
|
|
|
18731
|
-
defaults$
|
|
18742
|
+
defaults$2(options);
|
|
18732
18743
|
|
|
18733
18744
|
let busyTries = 0;
|
|
18734
18745
|
let errState = null;
|
|
@@ -18928,7 +18939,7 @@ const rmkids = (p, options, cb) => {
|
|
|
18928
18939
|
// deep directory trees.
|
|
18929
18940
|
const rimrafSync = (p, options) => {
|
|
18930
18941
|
options = options || {};
|
|
18931
|
-
defaults$
|
|
18942
|
+
defaults$2(options);
|
|
18932
18943
|
|
|
18933
18944
|
assert$1(p, 'rimraf: missing path');
|
|
18934
18945
|
assert$1.equal(typeof p, 'string', 'rimraf: path should be a string');
|
|
@@ -19030,7 +19041,7 @@ const rmkidsSync = (p, options) => {
|
|
|
19030
19041
|
var rimraf_1 = rimraf$1;
|
|
19031
19042
|
rimraf$1.sync = rimrafSync;
|
|
19032
19043
|
|
|
19033
|
-
var indentString$3 = (string, count, options) => {
|
|
19044
|
+
var indentString$3 = (string, count = 1, options) => {
|
|
19034
19045
|
options = {
|
|
19035
19046
|
indent: ' ',
|
|
19036
19047
|
includeEmptyLines: false,
|
|
@@ -19606,6 +19617,12 @@ Object.defineProperty(tempy, 'root', {
|
|
|
19606
19617
|
},
|
|
19607
19618
|
});
|
|
19608
19619
|
|
|
19620
|
+
const DEFAULT_PRETTIER_CONFIG = {
|
|
19621
|
+
arrowParens: "always",
|
|
19622
|
+
singleQuote: true,
|
|
19623
|
+
bracketSpacing: false,
|
|
19624
|
+
trailingComma: "all"
|
|
19625
|
+
};
|
|
19609
19626
|
function stripUp(path, strip) {
|
|
19610
19627
|
const parts = path.split(sep);
|
|
19611
19628
|
return join$3(...parts.slice(strip));
|
|
@@ -19620,6 +19637,9 @@ async function read$1(path) {
|
|
|
19620
19637
|
async function copy(from, to) {
|
|
19621
19638
|
await fs$g.copy(from, to);
|
|
19622
19639
|
}
|
|
19640
|
+
async function touch(path) {
|
|
19641
|
+
await fs$g.ensureFile(path);
|
|
19642
|
+
}
|
|
19623
19643
|
async function write$1(path, data) {
|
|
19624
19644
|
await fs$g.writeFile(path, data);
|
|
19625
19645
|
}
|
|
@@ -19664,6 +19684,21 @@ async function exists$1(path) {
|
|
|
19664
19684
|
return false;
|
|
19665
19685
|
}
|
|
19666
19686
|
}
|
|
19687
|
+
async function format$4(content, options) {
|
|
19688
|
+
const ext = extname(options.path);
|
|
19689
|
+
const prettierConfig = {
|
|
19690
|
+
...DEFAULT_PRETTIER_CONFIG,
|
|
19691
|
+
parser: "babel"
|
|
19692
|
+
};
|
|
19693
|
+
switch (ext) {
|
|
19694
|
+
case ".html":
|
|
19695
|
+
case ".css":
|
|
19696
|
+
prettierConfig.parser = ext.slice(1);
|
|
19697
|
+
break;
|
|
19698
|
+
}
|
|
19699
|
+
const formattedContent = await prettier.format(content, prettierConfig);
|
|
19700
|
+
return formattedContent;
|
|
19701
|
+
}
|
|
19667
19702
|
|
|
19668
19703
|
var file$1 = /*#__PURE__*/Object.freeze({
|
|
19669
19704
|
__proto__: null,
|
|
@@ -19671,6 +19706,7 @@ var file$1 = /*#__PURE__*/Object.freeze({
|
|
|
19671
19706
|
inTemporaryDirectory: inTemporaryDirectory,
|
|
19672
19707
|
read: read$1,
|
|
19673
19708
|
copy: copy,
|
|
19709
|
+
touch: touch,
|
|
19674
19710
|
write: write$1,
|
|
19675
19711
|
append: append$2,
|
|
19676
19712
|
mkdir: mkdir,
|
|
@@ -19681,7 +19717,8 @@ var file$1 = /*#__PURE__*/Object.freeze({
|
|
|
19681
19717
|
move: move,
|
|
19682
19718
|
chmod: chmod,
|
|
19683
19719
|
hasExecutablePermissions: hasExecutablePermissions,
|
|
19684
|
-
exists: exists$1
|
|
19720
|
+
exists: exists$1,
|
|
19721
|
+
format: format$4
|
|
19685
19722
|
});
|
|
19686
19723
|
|
|
19687
19724
|
function homeDirectory() {
|
|
@@ -19690,6 +19727,9 @@ function homeDirectory() {
|
|
|
19690
19727
|
function isDebug(env = process.env) {
|
|
19691
19728
|
return env[constants$2.environmentVariables.shopifyConfig] === "debug";
|
|
19692
19729
|
}
|
|
19730
|
+
function isVerbose(env = process.env) {
|
|
19731
|
+
return isTruthy$1(env[constants$2.environmentVariables.verbose]) || process.argv.includes("--verbose");
|
|
19732
|
+
}
|
|
19693
19733
|
async function isShopify(env = process.env) {
|
|
19694
19734
|
const runAsUser = isTruthy$1(env[constants$2.environmentVariables.runAsUser]);
|
|
19695
19735
|
if (runAsUser) {
|
|
@@ -19701,13 +19741,18 @@ async function isShopify(env = process.env) {
|
|
|
19701
19741
|
function isUnitTest(env = process.env) {
|
|
19702
19742
|
return isTruthy$1(env[constants$2.environmentVariables.unitTest]);
|
|
19703
19743
|
}
|
|
19744
|
+
function analyticsDisabled(env = process.env) {
|
|
19745
|
+
return isTruthy$1(env[constants$2.environmentVariables.noAnalytics]);
|
|
19746
|
+
}
|
|
19704
19747
|
|
|
19705
19748
|
var local = /*#__PURE__*/Object.freeze({
|
|
19706
19749
|
__proto__: null,
|
|
19707
19750
|
homeDirectory: homeDirectory,
|
|
19708
19751
|
isDebug: isDebug,
|
|
19752
|
+
isVerbose: isVerbose,
|
|
19709
19753
|
isShopify: isShopify,
|
|
19710
|
-
isUnitTest: isUnitTest
|
|
19754
|
+
isUnitTest: isUnitTest,
|
|
19755
|
+
analyticsDisabled: analyticsDisabled
|
|
19711
19756
|
});
|
|
19712
19757
|
|
|
19713
19758
|
const ESC = '\u001B[';
|
|
@@ -20630,7 +20675,7 @@ const ATTRIBUTE = 3;
|
|
|
20630
20675
|
* @param {any} x The value to check.
|
|
20631
20676
|
* @returns {boolean} `true` if the value is an object.
|
|
20632
20677
|
*/
|
|
20633
|
-
function isObject$
|
|
20678
|
+
function isObject$3(x) {
|
|
20634
20679
|
return x !== null && typeof x === "object" //eslint-disable-line no-restricted-syntax
|
|
20635
20680
|
}
|
|
20636
20681
|
|
|
@@ -20671,7 +20716,7 @@ function defineEventAttributeDescriptor(eventName) {
|
|
|
20671
20716
|
},
|
|
20672
20717
|
|
|
20673
20718
|
set(listener) {
|
|
20674
|
-
if (typeof listener !== "function" && !isObject$
|
|
20719
|
+
if (typeof listener !== "function" && !isObject$3(listener)) {
|
|
20675
20720
|
listener = null; // eslint-disable-line no-param-reassign
|
|
20676
20721
|
}
|
|
20677
20722
|
const listeners = getListeners(this);
|
|
@@ -20804,12 +20849,12 @@ EventTarget.prototype = {
|
|
|
20804
20849
|
if (listener == null) {
|
|
20805
20850
|
return
|
|
20806
20851
|
}
|
|
20807
|
-
if (typeof listener !== "function" && !isObject$
|
|
20852
|
+
if (typeof listener !== "function" && !isObject$3(listener)) {
|
|
20808
20853
|
throw new TypeError("'listener' should be a function or an object.")
|
|
20809
20854
|
}
|
|
20810
20855
|
|
|
20811
20856
|
const listeners = getListeners(this);
|
|
20812
|
-
const optionsIsObj = isObject$
|
|
20857
|
+
const optionsIsObj = isObject$3(options);
|
|
20813
20858
|
const capture = optionsIsObj
|
|
20814
20859
|
? Boolean(options.capture)
|
|
20815
20860
|
: Boolean(options);
|
|
@@ -20860,7 +20905,7 @@ EventTarget.prototype = {
|
|
|
20860
20905
|
}
|
|
20861
20906
|
|
|
20862
20907
|
const listeners = getListeners(this);
|
|
20863
|
-
const capture = isObject$
|
|
20908
|
+
const capture = isObject$3(options)
|
|
20864
20909
|
? Boolean(options.capture)
|
|
20865
20910
|
: Boolean(options);
|
|
20866
20911
|
const listenerType = capture ? CAPTURE : BUBBLE;
|
|
@@ -21154,50 +21199,53 @@ class ContentToken {
|
|
|
21154
21199
|
}
|
|
21155
21200
|
}
|
|
21156
21201
|
const token = {
|
|
21202
|
+
raw: (value) => {
|
|
21203
|
+
return new ContentToken(value, {}, 0 /* Raw */);
|
|
21204
|
+
},
|
|
21157
21205
|
genericShellCommand: (value) => {
|
|
21158
|
-
return new ContentToken(value, {},
|
|
21206
|
+
return new ContentToken(value, {}, 1 /* Command */);
|
|
21159
21207
|
},
|
|
21160
21208
|
json: (value) => {
|
|
21161
|
-
return new ContentToken(value, {},
|
|
21209
|
+
return new ContentToken(value, {}, 2 /* Json */);
|
|
21162
21210
|
},
|
|
21163
21211
|
path: (value) => {
|
|
21164
|
-
return new ContentToken(value, {},
|
|
21212
|
+
return new ContentToken(value, {}, 3 /* Path */);
|
|
21165
21213
|
},
|
|
21166
21214
|
link: (value, link) => {
|
|
21167
|
-
return new ContentToken(value, { link },
|
|
21215
|
+
return new ContentToken(value, { link }, 4 /* Link */);
|
|
21168
21216
|
},
|
|
21169
21217
|
heading: (value) => {
|
|
21170
|
-
return new ContentToken(value, {},
|
|
21218
|
+
return new ContentToken(value, {}, 5 /* Heading */);
|
|
21171
21219
|
},
|
|
21172
21220
|
subheading: (value) => {
|
|
21173
|
-
return new ContentToken(value, {},
|
|
21221
|
+
return new ContentToken(value, {}, 6 /* SubHeading */);
|
|
21174
21222
|
},
|
|
21175
21223
|
italic: (value) => {
|
|
21176
|
-
return new ContentToken(value, {},
|
|
21224
|
+
return new ContentToken(value, {}, 7 /* Italic */);
|
|
21177
21225
|
},
|
|
21178
21226
|
errorText: (value) => {
|
|
21179
|
-
return new ContentToken(value, {},
|
|
21227
|
+
return new ContentToken(value, {}, 8 /* ErrorText */);
|
|
21180
21228
|
},
|
|
21181
21229
|
cyan: (value) => {
|
|
21182
|
-
return new ContentToken(value, {},
|
|
21230
|
+
return new ContentToken(value, {}, 10 /* Cyan */);
|
|
21183
21231
|
},
|
|
21184
21232
|
yellow: (value) => {
|
|
21185
|
-
return new ContentToken(value, {},
|
|
21233
|
+
return new ContentToken(value, {}, 9 /* Yellow */);
|
|
21186
21234
|
},
|
|
21187
21235
|
magenta: (value) => {
|
|
21188
|
-
return new ContentToken(value, {},
|
|
21236
|
+
return new ContentToken(value, {}, 11 /* Magenta */);
|
|
21189
21237
|
},
|
|
21190
21238
|
green: (value) => {
|
|
21191
|
-
return new ContentToken(value, {},
|
|
21239
|
+
return new ContentToken(value, {}, 12 /* Green */);
|
|
21192
21240
|
},
|
|
21193
21241
|
packagejsonScript: (dependencyManager, scriptName, ...scriptArgs) => {
|
|
21194
|
-
return new ContentToken(formatPackageManagerCommand(dependencyManager, scriptName, scriptArgs), {},
|
|
21242
|
+
return new ContentToken(formatPackageManagerCommand(dependencyManager, scriptName, scriptArgs), {}, 1 /* Command */);
|
|
21195
21243
|
},
|
|
21196
21244
|
successIcon: () => {
|
|
21197
|
-
return new ContentToken("\u2714", {},
|
|
21245
|
+
return new ContentToken("\u2714", {}, 12 /* Green */);
|
|
21198
21246
|
},
|
|
21199
21247
|
failIcon: () => {
|
|
21200
|
-
return new ContentToken("\u2716", {},
|
|
21248
|
+
return new ContentToken("\u2716", {}, 8 /* ErrorText */);
|
|
21201
21249
|
}
|
|
21202
21250
|
};
|
|
21203
21251
|
function formatPackageManagerCommand(dependencyManager, scriptName, scriptArgs) {
|
|
@@ -21235,45 +21283,48 @@ function content(strings, ...keys) {
|
|
|
21235
21283
|
} else {
|
|
21236
21284
|
const enumToken = token2;
|
|
21237
21285
|
switch (enumToken.type) {
|
|
21238
|
-
case 0 /*
|
|
21239
|
-
output +=
|
|
21286
|
+
case 0 /* Raw */:
|
|
21287
|
+
output += enumToken.value;
|
|
21240
21288
|
break;
|
|
21241
|
-
case
|
|
21242
|
-
output += colors$9.
|
|
21289
|
+
case 1 /* Command */:
|
|
21290
|
+
output += colors$9.bold(colors$9.yellow(stringifyMessage(enumToken.value)));
|
|
21243
21291
|
break;
|
|
21244
|
-
case
|
|
21292
|
+
case 3 /* Path */:
|
|
21293
|
+
output += colors$9.cyan(relativize(stringifyMessage(enumToken.value)));
|
|
21294
|
+
break;
|
|
21295
|
+
case 2 /* Json */:
|
|
21245
21296
|
try {
|
|
21246
|
-
output += colorJson(enumToken.value ?? {});
|
|
21297
|
+
output += colorJson(stringifyMessage(enumToken.value) ?? {});
|
|
21247
21298
|
} catch (_) {
|
|
21248
|
-
output += JSON.stringify(enumToken.value ?? {}, null, 2);
|
|
21299
|
+
output += JSON.stringify(stringifyMessage(enumToken.value) ?? {}, null, 2);
|
|
21249
21300
|
}
|
|
21250
21301
|
break;
|
|
21251
|
-
case
|
|
21252
|
-
output += terminalLink(colors$9.green(enumToken.value), enumToken.metadata.link ?? "");
|
|
21302
|
+
case 4 /* Link */:
|
|
21303
|
+
output += terminalLink(colors$9.green(stringifyMessage(enumToken.value)), enumToken.metadata.link ?? "");
|
|
21253
21304
|
break;
|
|
21254
|
-
case
|
|
21255
|
-
output += colors$9.bold.underline(enumToken.value);
|
|
21305
|
+
case 5 /* Heading */:
|
|
21306
|
+
output += colors$9.bold.underline(stringifyMessage(enumToken.value));
|
|
21256
21307
|
break;
|
|
21257
|
-
case
|
|
21258
|
-
output += colors$9.underline(enumToken.value);
|
|
21308
|
+
case 6 /* SubHeading */:
|
|
21309
|
+
output += colors$9.underline(stringifyMessage(enumToken.value));
|
|
21259
21310
|
break;
|
|
21260
|
-
case
|
|
21261
|
-
output += colors$9.italic(enumToken.value);
|
|
21311
|
+
case 7 /* Italic */:
|
|
21312
|
+
output += colors$9.italic(stringifyMessage(enumToken.value));
|
|
21262
21313
|
break;
|
|
21263
|
-
case
|
|
21264
|
-
output += colors$9.bold.redBright(enumToken.value);
|
|
21314
|
+
case 8 /* ErrorText */:
|
|
21315
|
+
output += colors$9.bold.redBright(stringifyMessage(enumToken.value));
|
|
21265
21316
|
break;
|
|
21266
|
-
case
|
|
21267
|
-
output += colors$9.yellow(enumToken.value);
|
|
21317
|
+
case 9 /* Yellow */:
|
|
21318
|
+
output += colors$9.yellow(stringifyMessage(enumToken.value));
|
|
21268
21319
|
break;
|
|
21269
|
-
case
|
|
21270
|
-
output += colors$9.cyan(enumToken.value);
|
|
21320
|
+
case 10 /* Cyan */:
|
|
21321
|
+
output += colors$9.cyan(stringifyMessage(enumToken.value));
|
|
21271
21322
|
break;
|
|
21272
|
-
case
|
|
21273
|
-
output += colors$9.magenta(enumToken.value);
|
|
21323
|
+
case 11 /* Magenta */:
|
|
21324
|
+
output += colors$9.magenta(stringifyMessage(enumToken.value));
|
|
21274
21325
|
break;
|
|
21275
|
-
case
|
|
21276
|
-
output += colors$9.green(enumToken.value);
|
|
21326
|
+
case 12 /* Green */:
|
|
21327
|
+
output += colors$9.green(stringifyMessage(enumToken.value));
|
|
21277
21328
|
break;
|
|
21278
21329
|
}
|
|
21279
21330
|
}
|
|
@@ -21299,7 +21350,7 @@ const logLevelValue = (level) => {
|
|
|
21299
21350
|
}
|
|
21300
21351
|
};
|
|
21301
21352
|
const currentLogLevel = () => {
|
|
21302
|
-
if (
|
|
21353
|
+
if (isVerbose()) {
|
|
21303
21354
|
return "debug";
|
|
21304
21355
|
} else {
|
|
21305
21356
|
return "info";
|
|
@@ -21388,7 +21439,7 @@ function stringifyMessage(message2) {
|
|
|
21388
21439
|
return message2;
|
|
21389
21440
|
}
|
|
21390
21441
|
}
|
|
21391
|
-
const message = (content2, level) => {
|
|
21442
|
+
const message = (content2, level = "info") => {
|
|
21392
21443
|
if (shouldOutput(level)) {
|
|
21393
21444
|
consoleLog(stringifyMessage(content2));
|
|
21394
21445
|
}
|
|
@@ -21417,7 +21468,7 @@ async function concurrent(processes) {
|
|
|
21417
21468
|
write(chunk, _encoding, next) {
|
|
21418
21469
|
const lines = stripAnsiEraseCursorEscapeCharacters(chunk.toString("ascii")).split(/\n/);
|
|
21419
21470
|
for (const line of lines) {
|
|
21420
|
-
message(content`${linePrefix(process2.prefix, index)}${colors$9.bold(
|
|
21471
|
+
message(content`${linePrefix(process2.prefix, index)}${colors$9.bold(line)}`, "error");
|
|
21421
21472
|
}
|
|
21422
21473
|
next();
|
|
21423
21474
|
}
|
|
@@ -21631,7 +21682,7 @@ function __spreadArray$1(to, from, pack) {
|
|
|
21631
21682
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
21632
21683
|
}
|
|
21633
21684
|
|
|
21634
|
-
function isFunction$
|
|
21685
|
+
function isFunction$2(value) {
|
|
21635
21686
|
return typeof value === 'function';
|
|
21636
21687
|
}
|
|
21637
21688
|
|
|
@@ -21699,7 +21750,7 @@ var Subscription = (function () {
|
|
|
21699
21750
|
}
|
|
21700
21751
|
}
|
|
21701
21752
|
var initialFinalizer = this.initialTeardown;
|
|
21702
|
-
if (isFunction$
|
|
21753
|
+
if (isFunction$2(initialFinalizer)) {
|
|
21703
21754
|
try {
|
|
21704
21755
|
initialFinalizer();
|
|
21705
21756
|
}
|
|
@@ -21791,10 +21842,10 @@ var Subscription = (function () {
|
|
|
21791
21842
|
var EMPTY_SUBSCRIPTION = Subscription.EMPTY;
|
|
21792
21843
|
function isSubscription(value) {
|
|
21793
21844
|
return (value instanceof Subscription ||
|
|
21794
|
-
(value && 'closed' in value && isFunction$
|
|
21845
|
+
(value && 'closed' in value && isFunction$2(value.remove) && isFunction$2(value.add) && isFunction$2(value.unsubscribe)));
|
|
21795
21846
|
}
|
|
21796
21847
|
function execFinalizer(finalizer) {
|
|
21797
|
-
if (isFunction$
|
|
21848
|
+
if (isFunction$2(finalizer)) {
|
|
21798
21849
|
finalizer();
|
|
21799
21850
|
}
|
|
21800
21851
|
else {
|
|
@@ -21978,7 +22029,7 @@ var SafeSubscriber = (function (_super) {
|
|
|
21978
22029
|
function SafeSubscriber(observerOrNext, error, complete) {
|
|
21979
22030
|
var _this = _super.call(this) || this;
|
|
21980
22031
|
var partialObserver;
|
|
21981
|
-
if (isFunction$
|
|
22032
|
+
if (isFunction$2(observerOrNext) || !observerOrNext) {
|
|
21982
22033
|
partialObserver = {
|
|
21983
22034
|
next: observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined,
|
|
21984
22035
|
error: error !== null && error !== void 0 ? error : undefined,
|
|
@@ -22126,7 +22177,7 @@ function getPromiseCtor(promiseCtor) {
|
|
|
22126
22177
|
return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;
|
|
22127
22178
|
}
|
|
22128
22179
|
function isObserver(value) {
|
|
22129
|
-
return value && isFunction$
|
|
22180
|
+
return value && isFunction$2(value.next) && isFunction$2(value.error) && isFunction$2(value.complete);
|
|
22130
22181
|
}
|
|
22131
22182
|
function isSubscriber(value) {
|
|
22132
22183
|
return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));
|
|
@@ -25019,16 +25070,17 @@ const argv = process.argv || [];
|
|
|
25019
25070
|
const isDisabled = "NO_COLOR" in env$1 || argv.includes("--no-color");
|
|
25020
25071
|
const isForced = "FORCE_COLOR" in env$1 || argv.includes("--color");
|
|
25021
25072
|
const isWindows = process.platform === "win32";
|
|
25073
|
+
const isDumbTerminal = env$1.TERM === "dumb";
|
|
25022
25074
|
|
|
25023
25075
|
const isCompatibleTerminal =
|
|
25024
|
-
tty$1 && tty$1.isatty && tty$1.isatty(1) && env$1.TERM &&
|
|
25076
|
+
tty$1 && tty$1.isatty && tty$1.isatty(1) && env$1.TERM && !isDumbTerminal;
|
|
25025
25077
|
|
|
25026
25078
|
const isCI =
|
|
25027
25079
|
"CI" in env$1 &&
|
|
25028
25080
|
("GITHUB_ACTIONS" in env$1 || "GITLAB_CI" in env$1 || "CIRCLECI" in env$1);
|
|
25029
25081
|
|
|
25030
25082
|
const isColorSupported =
|
|
25031
|
-
!isDisabled && (isForced || isWindows || isCompatibleTerminal || isCI);
|
|
25083
|
+
!isDisabled && (isForced || (isWindows && !isDumbTerminal) || isCompatibleTerminal || isCI);
|
|
25032
25084
|
|
|
25033
25085
|
const replaceClose = (
|
|
25034
25086
|
index,
|
|
@@ -25105,13 +25157,11 @@ const colors = {
|
|
|
25105
25157
|
bgWhiteBright: init(107, 49),
|
|
25106
25158
|
};
|
|
25107
25159
|
|
|
25108
|
-
const none = (any) => any;
|
|
25109
|
-
|
|
25110
25160
|
const createColors = ({ useColor = isColorSupported } = {}) =>
|
|
25111
25161
|
useColor
|
|
25112
25162
|
? colors
|
|
25113
25163
|
: Object.keys(colors).reduce(
|
|
25114
|
-
(colors, key) => ({ ...colors, [key]:
|
|
25164
|
+
(colors, key) => ({ ...colors, [key]: String }),
|
|
25115
25165
|
{}
|
|
25116
25166
|
);
|
|
25117
25167
|
|
|
@@ -26602,12 +26652,12 @@ var Drop = /** @class */ (function () {
|
|
|
26602
26652
|
|
|
26603
26653
|
var toString$1 = Object.prototype.toString;
|
|
26604
26654
|
var toLowerCase = String.prototype.toLowerCase;
|
|
26605
|
-
var hasOwnProperty$
|
|
26655
|
+
var hasOwnProperty$2 = Object.hasOwnProperty;
|
|
26606
26656
|
function isString(value) {
|
|
26607
26657
|
return typeof value === 'string';
|
|
26608
26658
|
}
|
|
26609
26659
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
26610
|
-
function isFunction(value) {
|
|
26660
|
+
function isFunction$1(value) {
|
|
26611
26661
|
return typeof value === 'function';
|
|
26612
26662
|
}
|
|
26613
26663
|
function escapeRegex(str) {
|
|
@@ -26626,14 +26676,14 @@ function promisify$2(fn) {
|
|
|
26626
26676
|
});
|
|
26627
26677
|
};
|
|
26628
26678
|
}
|
|
26629
|
-
function stringify$
|
|
26679
|
+
function stringify$5(value) {
|
|
26630
26680
|
value = toValue$1(value);
|
|
26631
26681
|
if (isString(value))
|
|
26632
26682
|
return value;
|
|
26633
26683
|
if (isNil(value))
|
|
26634
26684
|
return '';
|
|
26635
|
-
if (isArray(value))
|
|
26636
|
-
return value.map(function (x) { return stringify$
|
|
26685
|
+
if (isArray$1(value))
|
|
26686
|
+
return value.map(function (x) { return stringify$5(x); }).join('');
|
|
26637
26687
|
return String(value);
|
|
26638
26688
|
}
|
|
26639
26689
|
function toValue$1(value) {
|
|
@@ -26643,14 +26693,14 @@ function isNumber$2(value) {
|
|
|
26643
26693
|
return typeof value === 'number';
|
|
26644
26694
|
}
|
|
26645
26695
|
function toLiquid(value) {
|
|
26646
|
-
if (value && isFunction(value.toLiquid))
|
|
26696
|
+
if (value && isFunction$1(value.toLiquid))
|
|
26647
26697
|
return toLiquid(value.toLiquid());
|
|
26648
26698
|
return value;
|
|
26649
26699
|
}
|
|
26650
26700
|
function isNil(value) {
|
|
26651
26701
|
return value == null;
|
|
26652
26702
|
}
|
|
26653
|
-
function isArray(value) {
|
|
26703
|
+
function isArray$1(value) {
|
|
26654
26704
|
// be compatible with IE 8
|
|
26655
26705
|
return toString$1.call(value) === '[object Array]';
|
|
26656
26706
|
}
|
|
@@ -26665,7 +26715,7 @@ function isArray(value) {
|
|
|
26665
26715
|
function forOwn(obj, iteratee) {
|
|
26666
26716
|
obj = obj || {};
|
|
26667
26717
|
for (var k in obj) {
|
|
26668
|
-
if (hasOwnProperty$
|
|
26718
|
+
if (hasOwnProperty$2.call(obj, k)) {
|
|
26669
26719
|
if (iteratee(obj[k], k, obj) === false)
|
|
26670
26720
|
break;
|
|
26671
26721
|
}
|
|
@@ -26681,7 +26731,7 @@ function last$1(arr) {
|
|
|
26681
26731
|
* @param {any} value The value to check.
|
|
26682
26732
|
* @return {Boolean} Returns true if value is an object, else false.
|
|
26683
26733
|
*/
|
|
26684
|
-
function isObject$
|
|
26734
|
+
function isObject$2(value) {
|
|
26685
26735
|
var type = typeof value;
|
|
26686
26736
|
return value !== null && (type === 'object' || type === 'function');
|
|
26687
26737
|
}
|
|
@@ -26889,7 +26939,7 @@ var fs$a = /*#__PURE__*/Object.freeze({
|
|
|
26889
26939
|
});
|
|
26890
26940
|
|
|
26891
26941
|
function isComparable(arg) {
|
|
26892
|
-
return arg && isFunction(arg.equals);
|
|
26942
|
+
return arg && isFunction$1(arg.equals);
|
|
26893
26943
|
}
|
|
26894
26944
|
|
|
26895
26945
|
function isTruthy(val, ctx) {
|
|
@@ -26950,7 +27000,7 @@ var defaultOperators = {
|
|
|
26950
27000
|
'contains': function (l, r) {
|
|
26951
27001
|
l = toValue$1(l);
|
|
26952
27002
|
r = toValue$1(r);
|
|
26953
|
-
return l && isFunction(l.indexOf) ? l.indexOf(r) > -1 : false;
|
|
27003
|
+
return l && isFunction$1(l.indexOf) ? l.indexOf(r) > -1 : false;
|
|
26954
27004
|
},
|
|
26955
27005
|
'and': function (l, r, ctx) { return isTruthy(l, ctx) && isTruthy(r, ctx); },
|
|
26956
27006
|
'or': function (l, r, ctx) { return isTruthy(l, ctx) || isTruthy(r, ctx); }
|
|
@@ -27013,19 +27063,19 @@ var unescapeMap = {
|
|
|
27013
27063
|
''': "'"
|
|
27014
27064
|
};
|
|
27015
27065
|
function escape(str) {
|
|
27016
|
-
return stringify$
|
|
27066
|
+
return stringify$5(str).replace(/&|<|>|"|'/g, function (m) { return escapeMap[m]; });
|
|
27017
27067
|
}
|
|
27018
27068
|
function unescape$1(str) {
|
|
27019
|
-
return stringify$
|
|
27069
|
+
return stringify$5(str).replace(/&(amp|lt|gt|#34|#39);/g, function (m) { return unescapeMap[m]; });
|
|
27020
27070
|
}
|
|
27021
27071
|
function escapeOnce(str) {
|
|
27022
|
-
return escape(unescape$1(stringify$
|
|
27072
|
+
return escape(unescape$1(stringify$5(str)));
|
|
27023
27073
|
}
|
|
27024
27074
|
function newlineToBr(v) {
|
|
27025
|
-
return stringify$
|
|
27075
|
+
return stringify$5(v).replace(/\n/g, '<br />\n');
|
|
27026
27076
|
}
|
|
27027
27077
|
function stripHtml(v) {
|
|
27028
|
-
return stringify$
|
|
27078
|
+
return stringify$5(v).replace(/<script.*?<\/script>|<!--.*?-->|<style.*?<\/style>|<.*?>/g, '');
|
|
27029
27079
|
}
|
|
27030
27080
|
|
|
27031
27081
|
var abs = argumentsToValue(Math.abs);
|
|
@@ -27053,34 +27103,34 @@ function plus(v, arg) {
|
|
|
27053
27103
|
return Number(v) + Number(arg);
|
|
27054
27104
|
}
|
|
27055
27105
|
|
|
27056
|
-
var urlDecode = function (x) { return stringify$
|
|
27057
|
-
var urlEncode = function (x) { return stringify$
|
|
27106
|
+
var urlDecode = function (x) { return stringify$5(x).split('+').map(decodeURIComponent).join(' '); };
|
|
27107
|
+
var urlEncode = function (x) { return stringify$5(x).split(' ').map(encodeURIComponent).join('+'); };
|
|
27058
27108
|
|
|
27059
27109
|
function toEnumerable(val) {
|
|
27060
|
-
if (isArray(val))
|
|
27110
|
+
if (isArray$1(val))
|
|
27061
27111
|
return val;
|
|
27062
27112
|
if (isString(val) && val.length > 0)
|
|
27063
27113
|
return [val];
|
|
27064
|
-
if (isObject$
|
|
27114
|
+
if (isObject$2(val))
|
|
27065
27115
|
return Object.keys(val).map(function (key) { return [key, val[key]]; });
|
|
27066
27116
|
return [];
|
|
27067
27117
|
}
|
|
27068
27118
|
function toArray$1(val) {
|
|
27069
27119
|
if (isNil(val))
|
|
27070
27120
|
return [];
|
|
27071
|
-
if (isArray(val))
|
|
27121
|
+
if (isArray$1(val))
|
|
27072
27122
|
return val;
|
|
27073
27123
|
return [val];
|
|
27074
27124
|
}
|
|
27075
27125
|
|
|
27076
27126
|
var join$2 = argumentsToValue(function (v, arg) { return toArray$1(v).join(arg === undefined ? ' ' : arg); });
|
|
27077
|
-
var last$2 = argumentsToValue(function (v) { return isArray(v) ? last$1(v) : ''; });
|
|
27078
|
-
var first$1 = argumentsToValue(function (v) { return isArray(v) ? v[0] : ''; });
|
|
27127
|
+
var last$2 = argumentsToValue(function (v) { return isArray$1(v) ? last$1(v) : ''; });
|
|
27128
|
+
var first$1 = argumentsToValue(function (v) { return isArray$1(v) ? v[0] : ''; });
|
|
27079
27129
|
var reverse = argumentsToValue(function (v) { return __spreadArray([], __read(toArray$1(v)), false).reverse(); });
|
|
27080
27130
|
function sort$1(arr, property) {
|
|
27081
27131
|
var _this = this;
|
|
27082
27132
|
arr = toValue$1(arr);
|
|
27083
|
-
var getValue = function (obj) { return property ? _this.context.getFromScope(obj, stringify$
|
|
27133
|
+
var getValue = function (obj) { return property ? _this.context.getFromScope(obj, stringify$5(property).split('.')) : obj; };
|
|
27084
27134
|
return __spreadArray([], __read(toArray$1(arr)), false).sort(function (lhs, rhs) {
|
|
27085
27135
|
lhs = getValue(lhs);
|
|
27086
27136
|
rhs = getValue(rhs);
|
|
@@ -27089,7 +27139,7 @@ function sort$1(arr, property) {
|
|
|
27089
27139
|
}
|
|
27090
27140
|
function sortNatural(input, property) {
|
|
27091
27141
|
input = toValue$1(input);
|
|
27092
|
-
var propertyString = stringify$
|
|
27142
|
+
var propertyString = stringify$5(property);
|
|
27093
27143
|
var compare = property === undefined
|
|
27094
27144
|
? caseInsensitiveCompare
|
|
27095
27145
|
: function (lhs, rhs) { return caseInsensitiveCompare(lhs[propertyString], rhs[propertyString]); };
|
|
@@ -27099,7 +27149,7 @@ var size = function (v) { return (v && v.length) || 0; };
|
|
|
27099
27149
|
function map$1(arr, property) {
|
|
27100
27150
|
var _this = this;
|
|
27101
27151
|
arr = toValue$1(arr);
|
|
27102
|
-
return toArray$1(arr).map(function (obj) { return _this.context.getFromScope(obj, stringify$
|
|
27152
|
+
return toArray$1(arr).map(function (obj) { return _this.context.getFromScope(obj, stringify$5(property).split('.')); });
|
|
27103
27153
|
}
|
|
27104
27154
|
function compact(arr) {
|
|
27105
27155
|
arr = toValue$1(arr);
|
|
@@ -27116,8 +27166,8 @@ function slice(v, begin, length) {
|
|
|
27116
27166
|
v = toValue$1(v);
|
|
27117
27167
|
if (isNil(v))
|
|
27118
27168
|
return [];
|
|
27119
|
-
if (!isArray(v))
|
|
27120
|
-
v = stringify$
|
|
27169
|
+
if (!isArray$1(v))
|
|
27170
|
+
v = stringify$5(v);
|
|
27121
27171
|
begin = begin < 0 ? v.length + begin : begin;
|
|
27122
27172
|
return v.slice(begin, begin + length);
|
|
27123
27173
|
}
|
|
@@ -27125,7 +27175,7 @@ function where(arr, property, expected) {
|
|
|
27125
27175
|
var _this = this;
|
|
27126
27176
|
arr = toValue$1(arr);
|
|
27127
27177
|
return toArray$1(arr).filter(function (obj) {
|
|
27128
|
-
var value = _this.context.getFromScope(obj, stringify$
|
|
27178
|
+
var value = _this.context.getFromScope(obj, stringify$5(property).split('.'));
|
|
27129
27179
|
if (expected === undefined)
|
|
27130
27180
|
return isTruthy(value, _this.context);
|
|
27131
27181
|
if (isComparable(expected))
|
|
@@ -27137,7 +27187,7 @@ function uniq(arr) {
|
|
|
27137
27187
|
arr = toValue$1(arr);
|
|
27138
27188
|
var u = {};
|
|
27139
27189
|
return (arr || []).filter(function (val) {
|
|
27140
|
-
if (hasOwnProperty$
|
|
27190
|
+
if (hasOwnProperty$2.call(u, String(val)))
|
|
27141
27191
|
return false;
|
|
27142
27192
|
u[String(val)] = true;
|
|
27143
27193
|
return true;
|
|
@@ -27414,7 +27464,7 @@ function date(v, arg) {
|
|
|
27414
27464
|
var opts = this.context.opts;
|
|
27415
27465
|
var date;
|
|
27416
27466
|
v = toValue$1(v);
|
|
27417
|
-
arg = stringify$
|
|
27467
|
+
arg = stringify$5(arg);
|
|
27418
27468
|
if (v === 'now' || v === 'today') {
|
|
27419
27469
|
date = new Date();
|
|
27420
27470
|
}
|
|
@@ -27452,7 +27502,7 @@ function Default(value, defaultValue) {
|
|
|
27452
27502
|
args[_i - 2] = arguments[_i];
|
|
27453
27503
|
}
|
|
27454
27504
|
value = toValue$1(value);
|
|
27455
|
-
if (isArray(value) || isString(value))
|
|
27505
|
+
if (isArray$1(value) || isString(value))
|
|
27456
27506
|
return value.length ? value : defaultValue;
|
|
27457
27507
|
if (value === false && (new Map(args)).get('allow_false'))
|
|
27458
27508
|
return false;
|
|
@@ -27588,40 +27638,40 @@ function assert(predicate, message) {
|
|
|
27588
27638
|
*/
|
|
27589
27639
|
function append$1(v, arg) {
|
|
27590
27640
|
assert(arguments.length === 2, 'append expect 2 arguments');
|
|
27591
|
-
return stringify$
|
|
27641
|
+
return stringify$5(v) + stringify$5(arg);
|
|
27592
27642
|
}
|
|
27593
27643
|
function prepend(v, arg) {
|
|
27594
27644
|
assert(arguments.length === 2, 'prepend expect 2 arguments');
|
|
27595
|
-
return stringify$
|
|
27645
|
+
return stringify$5(arg) + stringify$5(v);
|
|
27596
27646
|
}
|
|
27597
27647
|
function lstrip(v, chars) {
|
|
27598
27648
|
if (chars) {
|
|
27599
|
-
chars = escapeRegExp(stringify$
|
|
27600
|
-
return stringify$
|
|
27649
|
+
chars = escapeRegExp(stringify$5(chars));
|
|
27650
|
+
return stringify$5(v).replace(new RegExp("^[".concat(chars, "]+"), 'g'), '');
|
|
27601
27651
|
}
|
|
27602
|
-
return stringify$
|
|
27652
|
+
return stringify$5(v).replace(/^\s+/, '');
|
|
27603
27653
|
}
|
|
27604
27654
|
function downcase(v) {
|
|
27605
|
-
return stringify$
|
|
27655
|
+
return stringify$5(v).toLowerCase();
|
|
27606
27656
|
}
|
|
27607
27657
|
function upcase(str) {
|
|
27608
|
-
return stringify$
|
|
27658
|
+
return stringify$5(str).toUpperCase();
|
|
27609
27659
|
}
|
|
27610
27660
|
function remove$3(v, arg) {
|
|
27611
|
-
return stringify$
|
|
27661
|
+
return stringify$5(v).split(String(arg)).join('');
|
|
27612
27662
|
}
|
|
27613
27663
|
function removeFirst(v, l) {
|
|
27614
|
-
return stringify$
|
|
27664
|
+
return stringify$5(v).replace(String(l), '');
|
|
27615
27665
|
}
|
|
27616
27666
|
function rstrip(str, chars) {
|
|
27617
27667
|
if (chars) {
|
|
27618
|
-
chars = escapeRegExp(stringify$
|
|
27619
|
-
return stringify$
|
|
27668
|
+
chars = escapeRegExp(stringify$5(chars));
|
|
27669
|
+
return stringify$5(str).replace(new RegExp("[".concat(chars, "]+$"), 'g'), '');
|
|
27620
27670
|
}
|
|
27621
|
-
return stringify$
|
|
27671
|
+
return stringify$5(str).replace(/\s+$/, '');
|
|
27622
27672
|
}
|
|
27623
27673
|
function split(v, arg) {
|
|
27624
|
-
var arr = stringify$
|
|
27674
|
+
var arr = stringify$5(v).split(String(arg));
|
|
27625
27675
|
// align to ruby split, which is the behavior of shopify/liquid
|
|
27626
27676
|
// see: https://ruby-doc.org/core-2.4.0/String.html#method-i-split
|
|
27627
27677
|
while (arr.length && arr[arr.length - 1] === '')
|
|
@@ -27630,30 +27680,30 @@ function split(v, arg) {
|
|
|
27630
27680
|
}
|
|
27631
27681
|
function strip(v, chars) {
|
|
27632
27682
|
if (chars) {
|
|
27633
|
-
chars = escapeRegExp(stringify$
|
|
27634
|
-
return stringify$
|
|
27683
|
+
chars = escapeRegExp(stringify$5(chars));
|
|
27684
|
+
return stringify$5(v)
|
|
27635
27685
|
.replace(new RegExp("^[".concat(chars, "]+"), 'g'), '')
|
|
27636
27686
|
.replace(new RegExp("[".concat(chars, "]+$"), 'g'), '');
|
|
27637
27687
|
}
|
|
27638
|
-
return stringify$
|
|
27688
|
+
return stringify$5(v).trim();
|
|
27639
27689
|
}
|
|
27640
27690
|
function stripNewlines(v) {
|
|
27641
|
-
return stringify$
|
|
27691
|
+
return stringify$5(v).replace(/\n/g, '');
|
|
27642
27692
|
}
|
|
27643
27693
|
function capitalize$1(str) {
|
|
27644
|
-
str = stringify$
|
|
27694
|
+
str = stringify$5(str);
|
|
27645
27695
|
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
|
|
27646
27696
|
}
|
|
27647
27697
|
function replace$1(v, pattern, replacement) {
|
|
27648
|
-
return stringify$
|
|
27698
|
+
return stringify$5(v).split(String(pattern)).join(replacement);
|
|
27649
27699
|
}
|
|
27650
27700
|
function replaceFirst(v, arg1, arg2) {
|
|
27651
|
-
return stringify$
|
|
27701
|
+
return stringify$5(v).replace(String(arg1), arg2);
|
|
27652
27702
|
}
|
|
27653
27703
|
function truncate(v, l, o) {
|
|
27654
27704
|
if (l === void 0) { l = 50; }
|
|
27655
27705
|
if (o === void 0) { o = '...'; }
|
|
27656
|
-
v = stringify$
|
|
27706
|
+
v = stringify$5(v);
|
|
27657
27707
|
if (v.length <= l)
|
|
27658
27708
|
return v;
|
|
27659
27709
|
return v.substring(0, l - o.length) + o;
|
|
@@ -27661,7 +27711,7 @@ function truncate(v, l, o) {
|
|
|
27661
27711
|
function truncatewords(v, l, o) {
|
|
27662
27712
|
if (l === void 0) { l = 15; }
|
|
27663
27713
|
if (o === void 0) { o = '...'; }
|
|
27664
|
-
var arr = stringify$
|
|
27714
|
+
var arr = stringify$5(v).split(/\s+/);
|
|
27665
27715
|
var ret = arr.slice(0, l).join(' ');
|
|
27666
27716
|
if (arr.length >= l)
|
|
27667
27717
|
ret += o;
|
|
@@ -27811,9 +27861,9 @@ var EmptyDrop = /** @class */ (function (_super) {
|
|
|
27811
27861
|
if (value instanceof EmptyDrop)
|
|
27812
27862
|
return false;
|
|
27813
27863
|
value = toValue$1(value);
|
|
27814
|
-
if (isString(value) || isArray(value))
|
|
27864
|
+
if (isString(value) || isArray$1(value))
|
|
27815
27865
|
return value.length === 0;
|
|
27816
|
-
if (isObject$
|
|
27866
|
+
if (isObject$2(value))
|
|
27817
27867
|
return Object.keys(value).length === 0;
|
|
27818
27868
|
return false;
|
|
27819
27869
|
};
|
|
@@ -28909,7 +28959,7 @@ var Hash = /** @class */ (function () {
|
|
|
28909
28959
|
}());
|
|
28910
28960
|
|
|
28911
28961
|
function isKeyValuePair(arr) {
|
|
28912
|
-
return isArray(arr);
|
|
28962
|
+
return isArray$1(arr);
|
|
28913
28963
|
}
|
|
28914
28964
|
|
|
28915
28965
|
var Filter = /** @class */ (function () {
|
|
@@ -29018,10 +29068,10 @@ function createRejectedThenable(err) {
|
|
|
29018
29068
|
return ret;
|
|
29019
29069
|
}
|
|
29020
29070
|
function isThenable(val) {
|
|
29021
|
-
return val && isFunction(val.then);
|
|
29071
|
+
return val && isFunction$1(val.then);
|
|
29022
29072
|
}
|
|
29023
29073
|
function isAsyncIterator(val) {
|
|
29024
|
-
return val && isFunction(val.next) && isFunction(val.throw) && isFunction(val.return);
|
|
29074
|
+
return val && isFunction$1(val.next) && isFunction$1(val.throw) && isFunction$1(val.return);
|
|
29025
29075
|
}
|
|
29026
29076
|
// convert an async iterator to a thenable (Promise compatible)
|
|
29027
29077
|
function toThenable(val) {
|
|
@@ -29601,7 +29651,7 @@ var decrement = {
|
|
|
29601
29651
|
if (!isNumber$2(scope[this.variable])) {
|
|
29602
29652
|
scope[this.variable] = 0;
|
|
29603
29653
|
}
|
|
29604
|
-
emitter.write(stringify$
|
|
29654
|
+
emitter.write(stringify$5(--scope[this.variable]));
|
|
29605
29655
|
}
|
|
29606
29656
|
};
|
|
29607
29657
|
|
|
@@ -29722,7 +29772,7 @@ var increment = {
|
|
|
29722
29772
|
}
|
|
29723
29773
|
var val = scope[this.variable];
|
|
29724
29774
|
scope[this.variable]++;
|
|
29725
|
-
emitter.write(stringify$
|
|
29775
|
+
emitter.write(stringify$5(val));
|
|
29726
29776
|
}
|
|
29727
29777
|
};
|
|
29728
29778
|
|
|
@@ -30182,17 +30232,17 @@ function normalize$1(options) {
|
|
|
30182
30232
|
function getOutputEscapeFunction(nameOrFunction) {
|
|
30183
30233
|
if (isString(nameOrFunction)) {
|
|
30184
30234
|
var filterImpl = filters.get(nameOrFunction);
|
|
30185
|
-
assert(isFunction(filterImpl), "filter \"".concat(nameOrFunction, "\" not found"));
|
|
30235
|
+
assert(isFunction$1(filterImpl), "filter \"".concat(nameOrFunction, "\" not found"));
|
|
30186
30236
|
return filterImpl;
|
|
30187
30237
|
}
|
|
30188
30238
|
else {
|
|
30189
|
-
assert(isFunction(nameOrFunction), '`outputEscape` need to be of type string or function');
|
|
30239
|
+
assert(isFunction$1(nameOrFunction), '`outputEscape` need to be of type string or function');
|
|
30190
30240
|
return nameOrFunction;
|
|
30191
30241
|
}
|
|
30192
30242
|
}
|
|
30193
30243
|
function normalizeDirectoryList(value) {
|
|
30194
30244
|
var list = [];
|
|
30195
|
-
if (isArray(value))
|
|
30245
|
+
if (isArray$1(value))
|
|
30196
30246
|
list = value;
|
|
30197
30247
|
if (isString(value))
|
|
30198
30248
|
list = [value];
|
|
@@ -30282,12 +30332,12 @@ function readProperty(obj, key, ownPropertyOnly) {
|
|
|
30282
30332
|
if (isNil(obj))
|
|
30283
30333
|
return obj;
|
|
30284
30334
|
obj = toLiquid(obj);
|
|
30285
|
-
if (isArray(obj) && key < 0)
|
|
30335
|
+
if (isArray$1(obj) && key < 0)
|
|
30286
30336
|
return obj[obj.length + +key];
|
|
30287
30337
|
var jsProperty = readJSProperty(obj, key, ownPropertyOnly);
|
|
30288
30338
|
if (jsProperty === undefined && obj instanceof Drop)
|
|
30289
30339
|
return obj.liquidMethodMissing(key);
|
|
30290
|
-
if (isFunction(jsProperty))
|
|
30340
|
+
if (isFunction$1(jsProperty))
|
|
30291
30341
|
return jsProperty.call(obj);
|
|
30292
30342
|
if (key === 'size')
|
|
30293
30343
|
return readSize(obj);
|
|
@@ -30303,19 +30353,19 @@ function readJSProperty(obj, key, ownPropertyOnly) {
|
|
|
30303
30353
|
return obj[key];
|
|
30304
30354
|
}
|
|
30305
30355
|
function readFirst(obj) {
|
|
30306
|
-
if (isArray(obj))
|
|
30356
|
+
if (isArray$1(obj))
|
|
30307
30357
|
return obj[0];
|
|
30308
30358
|
return obj['first'];
|
|
30309
30359
|
}
|
|
30310
30360
|
function readLast(obj) {
|
|
30311
|
-
if (isArray(obj))
|
|
30361
|
+
if (isArray$1(obj))
|
|
30312
30362
|
return obj[obj.length - 1];
|
|
30313
30363
|
return obj['last'];
|
|
30314
30364
|
}
|
|
30315
30365
|
function readSize(obj) {
|
|
30316
30366
|
if (obj.hasOwnProperty('size') || obj['size'] !== undefined)
|
|
30317
30367
|
return obj['size'];
|
|
30318
|
-
if (isArray(obj) || isString(obj))
|
|
30368
|
+
if (isArray$1(obj) || isString(obj))
|
|
30319
30369
|
return obj.length;
|
|
30320
30370
|
if (typeof obj === 'object')
|
|
30321
30371
|
return Object.keys(obj).length;
|
|
@@ -30482,7 +30532,7 @@ var SimpleEmitter = /** @class */ (function () {
|
|
|
30482
30532
|
this.buffer = '';
|
|
30483
30533
|
}
|
|
30484
30534
|
SimpleEmitter.prototype.write = function (html) {
|
|
30485
|
-
this.buffer += stringify$
|
|
30535
|
+
this.buffer += stringify$5(html);
|
|
30486
30536
|
};
|
|
30487
30537
|
return SimpleEmitter;
|
|
30488
30538
|
}());
|
|
@@ -30493,7 +30543,7 @@ var StreamedEmitter = /** @class */ (function () {
|
|
|
30493
30543
|
this.stream = new PassThrough$6();
|
|
30494
30544
|
}
|
|
30495
30545
|
StreamedEmitter.prototype.write = function (html) {
|
|
30496
|
-
this.stream.write(stringify$
|
|
30546
|
+
this.stream.write(stringify$5(html));
|
|
30497
30547
|
};
|
|
30498
30548
|
StreamedEmitter.prototype.error = function (err) {
|
|
30499
30549
|
this.stream.emit('error', err);
|
|
@@ -30518,7 +30568,7 @@ var KeepingTypeEmitter = /** @class */ (function () {
|
|
|
30518
30568
|
this.buffer = html;
|
|
30519
30569
|
}
|
|
30520
30570
|
else {
|
|
30521
|
-
this.buffer = stringify$
|
|
30571
|
+
this.buffer = stringify$5(this.buffer) + stringify$5(html);
|
|
30522
30572
|
}
|
|
30523
30573
|
};
|
|
30524
30574
|
return KeepingTypeEmitter;
|
|
@@ -30617,7 +30667,7 @@ var Tag = /** @class */ (function (_super) {
|
|
|
30617
30667
|
case 1:
|
|
30618
30668
|
hash = (_a.sent());
|
|
30619
30669
|
impl = this.impl;
|
|
30620
|
-
if (!isFunction(impl.render)) return [3 /*break*/, 3];
|
|
30670
|
+
if (!isFunction$1(impl.render)) return [3 /*break*/, 3];
|
|
30621
30671
|
return [4 /*yield*/, impl.render(ctx, emitter, hash)];
|
|
30622
30672
|
case 2: return [2 /*return*/, _a.sent()];
|
|
30623
30673
|
case 3: return [2 /*return*/];
|
|
@@ -32344,14 +32394,14 @@ function splitOn(input, char) {
|
|
|
32344
32394
|
];
|
|
32345
32395
|
}
|
|
32346
32396
|
function first(input, offset = 0) {
|
|
32347
|
-
return isArrayLike(input) && input.length > offset ? input[offset] : void 0;
|
|
32397
|
+
return isArrayLike$1(input) && input.length > offset ? input[offset] : void 0;
|
|
32348
32398
|
}
|
|
32349
32399
|
function last(input, offset = 0) {
|
|
32350
|
-
if (isArrayLike(input) && input.length > offset) {
|
|
32400
|
+
if (isArrayLike$1(input) && input.length > offset) {
|
|
32351
32401
|
return input[input.length - 1 - offset];
|
|
32352
32402
|
}
|
|
32353
32403
|
}
|
|
32354
|
-
function isArrayLike(input) {
|
|
32404
|
+
function isArrayLike$1(input) {
|
|
32355
32405
|
return !!(input && typeof input.length === "number");
|
|
32356
32406
|
}
|
|
32357
32407
|
function toLinesWithContent(input = "", trimmed2 = true, separator = "\n") {
|
|
@@ -32425,13 +32475,13 @@ function pick(source, properties) {
|
|
|
32425
32475
|
function delay(duration = 0) {
|
|
32426
32476
|
return new Promise((done) => setTimeout(done, duration));
|
|
32427
32477
|
}
|
|
32428
|
-
var NULL, NOOP$1, objectToString;
|
|
32478
|
+
var NULL, NOOP$1, objectToString$1;
|
|
32429
32479
|
var init_util = __esm({
|
|
32430
32480
|
"src/lib/utils/util.ts"() {
|
|
32431
32481
|
NULL = "\0";
|
|
32432
32482
|
NOOP$1 = () => {
|
|
32433
32483
|
};
|
|
32434
|
-
objectToString = Object.prototype.toString.call.bind(Object.prototype.toString);
|
|
32484
|
+
objectToString$1 = Object.prototype.toString.call.bind(Object.prototype.toString);
|
|
32435
32485
|
}
|
|
32436
32486
|
});
|
|
32437
32487
|
|
|
@@ -32446,7 +32496,7 @@ function filterPrimitives(input, omit) {
|
|
|
32446
32496
|
return /number|string|boolean/.test(typeof input) && (!omit || !omit.includes(typeof input));
|
|
32447
32497
|
}
|
|
32448
32498
|
function filterPlainObject(input) {
|
|
32449
|
-
return !!input && objectToString(input) === "[object Object]";
|
|
32499
|
+
return !!input && objectToString$1(input) === "[object Object]";
|
|
32450
32500
|
}
|
|
32451
32501
|
function filterFunction(input) {
|
|
32452
32502
|
return typeof input === "function";
|
|
@@ -32681,7 +32731,7 @@ __export(utils_exports, {
|
|
|
32681
32731
|
including: () => including,
|
|
32682
32732
|
isUserFunction: () => isUserFunction,
|
|
32683
32733
|
last: () => last,
|
|
32684
|
-
objectToString: () => objectToString,
|
|
32734
|
+
objectToString: () => objectToString$1,
|
|
32685
32735
|
parseStringResponse: () => parseStringResponse,
|
|
32686
32736
|
pick: () => pick,
|
|
32687
32737
|
prefixedArray: () => prefixedArray,
|
|
@@ -33286,7 +33336,7 @@ var init_git_logger = __esm({
|
|
|
33286
33336
|
if (Buffer.isBuffer(value)) {
|
|
33287
33337
|
return value.toString("utf8");
|
|
33288
33338
|
}
|
|
33289
|
-
return objectToString(value);
|
|
33339
|
+
return objectToString$1(value);
|
|
33290
33340
|
};
|
|
33291
33341
|
}
|
|
33292
33342
|
});
|
|
@@ -33460,7 +33510,7 @@ var init_git_executor_chain = __esm({
|
|
|
33460
33510
|
logger.info(`exitCode=%s handling with custom error handler`);
|
|
33461
33511
|
return task.onError(result, error, (newStdOut) => {
|
|
33462
33512
|
logger.info(`custom error handler treated as success`);
|
|
33463
|
-
logger(`custom error returned a %s`, objectToString(newStdOut));
|
|
33513
|
+
logger(`custom error returned a %s`, objectToString$1(newStdOut));
|
|
33464
33514
|
done(new GitOutputStreams(Array.isArray(newStdOut) ? Buffer.concat(newStdOut) : newStdOut, Buffer.concat(stdErr)));
|
|
33465
33515
|
}, fail);
|
|
33466
33516
|
}
|
|
@@ -35701,7 +35751,7 @@ function isTaskError(result) {
|
|
|
35701
35751
|
function getErrorMessage(result) {
|
|
35702
35752
|
return Buffer.concat([...result.stdOut, ...result.stdErr]);
|
|
35703
35753
|
}
|
|
35704
|
-
function errorDetectionHandler(overwrite, isError = isTaskError, errorMessage = getErrorMessage) {
|
|
35754
|
+
function errorDetectionHandler(overwrite = false, isError = isTaskError, errorMessage = getErrorMessage) {
|
|
35705
35755
|
return (error, result) => {
|
|
35706
35756
|
if (!overwrite && error || !isError(result)) {
|
|
35707
35757
|
return error;
|
|
@@ -35869,6 +35919,9 @@ init_git_response_error();
|
|
|
35869
35919
|
var esm_default = gitInstanceFactory;
|
|
35870
35920
|
|
|
35871
35921
|
const factory = esm_default;
|
|
35922
|
+
async function initializeRepository(directory) {
|
|
35923
|
+
await esm_default(directory).init();
|
|
35924
|
+
}
|
|
35872
35925
|
async function downloadRepository({ repoUrl, destination }) {
|
|
35873
35926
|
const [repository, branch] = repoUrl.split("#");
|
|
35874
35927
|
const options = { "--recurse-submodules": null };
|
|
@@ -35885,6 +35938,7 @@ async function downloadRepository({ repoUrl, destination }) {
|
|
|
35885
35938
|
var git = /*#__PURE__*/Object.freeze({
|
|
35886
35939
|
__proto__: null,
|
|
35887
35940
|
factory: factory,
|
|
35941
|
+
initializeRepository: initializeRepository,
|
|
35888
35942
|
downloadRepository: downloadRepository
|
|
35889
35943
|
});
|
|
35890
35944
|
|
|
@@ -40214,7 +40268,7 @@ try {
|
|
|
40214
40268
|
const POOL_SIZE = 65536;
|
|
40215
40269
|
|
|
40216
40270
|
/** @param {(Blob | Uint8Array)[]} parts */
|
|
40217
|
-
async function * toIterator (parts, clone) {
|
|
40271
|
+
async function * toIterator (parts, clone = true) {
|
|
40218
40272
|
for (const part of parts) {
|
|
40219
40273
|
if ('stream' in part) {
|
|
40220
40274
|
yield * (/** @type {AsyncIterableIterator<Uint8Array>} */ (part.stream()));
|
|
@@ -40756,7 +40810,7 @@ class Body$1 {
|
|
|
40756
40810
|
return formData;
|
|
40757
40811
|
}
|
|
40758
40812
|
|
|
40759
|
-
const {toFormData} = await import('./multipart-parser-
|
|
40813
|
+
const {toFormData} = await import('./multipart-parser-ab287634.js');
|
|
40760
40814
|
return toFormData(this.body, ct);
|
|
40761
40815
|
}
|
|
40762
40816
|
|
|
@@ -41935,7 +41989,7 @@ class Request$1 extends Body$1 {
|
|
|
41935
41989
|
|
|
41936
41990
|
/** @returns {string} */
|
|
41937
41991
|
get url() {
|
|
41938
|
-
return format$
|
|
41992
|
+
return format$6(this[INTERNALS$3].parsedURL);
|
|
41939
41993
|
}
|
|
41940
41994
|
|
|
41941
41995
|
/** @returns {Headers} */
|
|
@@ -42065,7 +42119,7 @@ const getNodeRequestOptions$1 = request => {
|
|
|
42065
42119
|
|
|
42066
42120
|
// HTTP-network-or-cache fetch step 2.15
|
|
42067
42121
|
if (request.compress && !headers.has('Accept-Encoding')) {
|
|
42068
|
-
headers.set('Accept-Encoding', 'gzip,deflate,br');
|
|
42122
|
+
headers.set('Accept-Encoding', 'gzip, deflate, br');
|
|
42069
42123
|
}
|
|
42070
42124
|
|
|
42071
42125
|
let {agent} = request;
|
|
@@ -42484,13 +42538,7 @@ function fixResponseChunkedTransferBadEnding(request, errorCallback) {
|
|
|
42484
42538
|
}
|
|
42485
42539
|
};
|
|
42486
42540
|
|
|
42487
|
-
|
|
42488
|
-
|
|
42489
|
-
request.on('abort', () => {
|
|
42490
|
-
socket.removeListener('close', onSocketClose);
|
|
42491
|
-
});
|
|
42492
|
-
|
|
42493
|
-
socket.on('data', buf => {
|
|
42541
|
+
const onData = buf => {
|
|
42494
42542
|
properLastChunkReceived = Buffer$1.compare(buf.slice(-5), LAST_CHUNK) === 0;
|
|
42495
42543
|
|
|
42496
42544
|
// Sometimes final 0-length chunk and end of message code are in separate packets
|
|
@@ -42502,6 +42550,14 @@ function fixResponseChunkedTransferBadEnding(request, errorCallback) {
|
|
|
42502
42550
|
}
|
|
42503
42551
|
|
|
42504
42552
|
previousChunk = buf;
|
|
42553
|
+
};
|
|
42554
|
+
|
|
42555
|
+
socket.prependListener('close', onSocketClose);
|
|
42556
|
+
socket.on('data', onData);
|
|
42557
|
+
|
|
42558
|
+
request.on('close', () => {
|
|
42559
|
+
socket.removeListener('close', onSocketClose);
|
|
42560
|
+
socket.removeListener('data', onData);
|
|
42505
42561
|
});
|
|
42506
42562
|
});
|
|
42507
42563
|
}
|
|
@@ -54685,147 +54741,1062 @@ var github = /*#__PURE__*/Object.freeze({
|
|
|
54685
54741
|
parseRepoUrl: parseRepoUrl
|
|
54686
54742
|
});
|
|
54687
54743
|
|
|
54688
|
-
|
|
54689
|
-
|
|
54690
|
-
|
|
54691
|
-
|
|
54692
|
-
function
|
|
54693
|
-
|
|
54694
|
-
|
|
54695
|
-
|
|
54696
|
-
|
|
54697
|
-
|
|
54698
|
-
|
|
54744
|
+
var distWeb = {exports: {}};
|
|
54745
|
+
|
|
54746
|
+
var stringify$4 = {exports: {}};
|
|
54747
|
+
|
|
54748
|
+
(function (module, exports) {
|
|
54749
|
+
exports = module.exports = stringify;
|
|
54750
|
+
exports.getSerialize = serializer;
|
|
54751
|
+
|
|
54752
|
+
function stringify(obj, replacer, spaces, cycleReplacer) {
|
|
54753
|
+
return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces)
|
|
54754
|
+
}
|
|
54755
|
+
|
|
54756
|
+
function serializer(replacer, cycleReplacer) {
|
|
54757
|
+
var stack = [], keys = [];
|
|
54758
|
+
|
|
54759
|
+
if (cycleReplacer == null) cycleReplacer = function(key, value) {
|
|
54760
|
+
if (stack[0] === value) return "[Circular ~]"
|
|
54761
|
+
return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]"
|
|
54762
|
+
};
|
|
54763
|
+
|
|
54764
|
+
return function(key, value) {
|
|
54765
|
+
if (stack.length > 0) {
|
|
54766
|
+
var thisPos = stack.indexOf(this);
|
|
54767
|
+
~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
|
|
54768
|
+
~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
|
|
54769
|
+
if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value);
|
|
54770
|
+
}
|
|
54771
|
+
else stack.push(value);
|
|
54772
|
+
|
|
54773
|
+
return replacer == null ? value : replacer.call(this, key, value)
|
|
54699
54774
|
}
|
|
54700
54775
|
}
|
|
54701
|
-
|
|
54702
|
-
|
|
54703
|
-
|
|
54704
|
-
|
|
54705
|
-
|
|
54706
|
-
|
|
54707
|
-
|
|
54708
|
-
|
|
54709
|
-
|
|
54710
|
-
|
|
54711
|
-
|
|
54712
|
-
|
|
54713
|
-
|
|
54714
|
-
|
|
54715
|
-
|
|
54716
|
-
|
|
54776
|
+
}(stringify$4, stringify$4.exports));
|
|
54777
|
+
|
|
54778
|
+
/*
|
|
54779
|
+
* random-seed
|
|
54780
|
+
* https://github.com/skratchdot/random-seed
|
|
54781
|
+
*
|
|
54782
|
+
* This code was originally written by Steve Gibson and can be found here:
|
|
54783
|
+
*
|
|
54784
|
+
* https://www.grc.com/otg/uheprng.htm
|
|
54785
|
+
*
|
|
54786
|
+
* It was slightly modified for use in node, to pass jshint, and a few additional
|
|
54787
|
+
* helper functions were added.
|
|
54788
|
+
*
|
|
54789
|
+
* Copyright (c) 2013 skratchdot
|
|
54790
|
+
* Dual Licensed under the MIT license and the original GRC copyright/license
|
|
54791
|
+
* included below.
|
|
54792
|
+
*/
|
|
54793
|
+
var stringify$3 = stringify$4.exports;
|
|
54794
|
+
|
|
54795
|
+
/* ============================================================================
|
|
54796
|
+
This is based upon Johannes Baagoe's carefully designed and efficient hash
|
|
54797
|
+
function for use with JavaScript. It has a proven "avalanche" effect such
|
|
54798
|
+
that every bit of the input affects every bit of the output 50% of the time,
|
|
54799
|
+
which is good. See: http://baagoe.com/en/RandomMusings/hash/avalanche.xhtml
|
|
54800
|
+
============================================================================
|
|
54801
|
+
*/
|
|
54802
|
+
var Mash = function () {
|
|
54803
|
+
var n = 0xefc8249d;
|
|
54804
|
+
var mash = function (data) {
|
|
54805
|
+
if (data) {
|
|
54806
|
+
data = data.toString();
|
|
54807
|
+
for (var i = 0; i < data.length; i++) {
|
|
54808
|
+
n += data.charCodeAt(i);
|
|
54809
|
+
var h = 0.02519603282416938 * n;
|
|
54810
|
+
n = h >>> 0;
|
|
54811
|
+
h -= n;
|
|
54812
|
+
h *= n;
|
|
54813
|
+
n = h >>> 0;
|
|
54814
|
+
h -= n;
|
|
54815
|
+
n += h * 0x100000000; // 2^32
|
|
54816
|
+
}
|
|
54817
|
+
return (n >>> 0) * 2.3283064365386963e-10; // 2^-32
|
|
54818
|
+
} else {
|
|
54819
|
+
n = 0xefc8249d;
|
|
54820
|
+
}
|
|
54821
|
+
};
|
|
54822
|
+
return mash;
|
|
54823
|
+
};
|
|
54824
|
+
|
|
54825
|
+
var uheprng = function (seed) {
|
|
54826
|
+
return (function () {
|
|
54827
|
+
var o = 48; // set the 'order' number of ENTROPY-holding 32-bit values
|
|
54828
|
+
var c = 1; // init the 'carry' used by the multiply-with-carry (MWC) algorithm
|
|
54829
|
+
var p = o; // init the 'phase' (max-1) of the intermediate variable pointer
|
|
54830
|
+
var s = new Array(o); // declare our intermediate variables array
|
|
54831
|
+
var i; // general purpose local
|
|
54832
|
+
var j; // general purpose local
|
|
54833
|
+
var k = 0; // general purpose local
|
|
54834
|
+
|
|
54835
|
+
// when our "uheprng" is initially invoked our PRNG state is initialized from the
|
|
54836
|
+
// browser's own local PRNG. This is okay since although its generator might not
|
|
54837
|
+
// be wonderful, it's useful for establishing large startup entropy for our usage.
|
|
54838
|
+
var mash = new Mash(); // get a pointer to our high-performance "Mash" hash
|
|
54839
|
+
|
|
54840
|
+
// fill the array with initial mash hash values
|
|
54841
|
+
for (i = 0; i < o; i++) {
|
|
54842
|
+
s[i] = mash(Math.random());
|
|
54843
|
+
}
|
|
54844
|
+
|
|
54845
|
+
// this PRIVATE (internal access only) function is the heart of the multiply-with-carry
|
|
54846
|
+
// (MWC) PRNG algorithm. When called it returns a pseudo-random number in the form of a
|
|
54847
|
+
// 32-bit JavaScript fraction (0.0 to <1.0) it is a PRIVATE function used by the default
|
|
54848
|
+
// [0-1] return function, and by the random 'string(n)' function which returns 'n'
|
|
54849
|
+
// characters from 33 to 126.
|
|
54850
|
+
var rawprng = function () {
|
|
54851
|
+
if (++p >= o) {
|
|
54852
|
+
p = 0;
|
|
54853
|
+
}
|
|
54854
|
+
var t = 1768863 * s[p] + c * 2.3283064365386963e-10; // 2^-32
|
|
54855
|
+
return s[p] = t - (c = t | 0);
|
|
54856
|
+
};
|
|
54857
|
+
|
|
54858
|
+
// this EXPORTED function is the default function returned by this library.
|
|
54859
|
+
// The values returned are integers in the range from 0 to range-1. We first
|
|
54860
|
+
// obtain two 32-bit fractions (from rawprng) to synthesize a single high
|
|
54861
|
+
// resolution 53-bit prng (0 to <1), then we multiply this by the caller's
|
|
54862
|
+
// "range" param and take the "floor" to return a equally probable integer.
|
|
54863
|
+
var random = function (range) {
|
|
54864
|
+
return Math.floor(range * (rawprng() + (rawprng() * 0x200000 | 0) * 1.1102230246251565e-16)); // 2^-53
|
|
54865
|
+
};
|
|
54866
|
+
|
|
54867
|
+
// this EXPORTED function 'string(n)' returns a pseudo-random string of
|
|
54868
|
+
// 'n' printable characters ranging from chr(33) to chr(126) inclusive.
|
|
54869
|
+
random.string = function (count) {
|
|
54870
|
+
var i;
|
|
54871
|
+
var s = '';
|
|
54872
|
+
for (i = 0; i < count; i++) {
|
|
54873
|
+
s += String.fromCharCode(33 + random(94));
|
|
54874
|
+
}
|
|
54875
|
+
return s;
|
|
54876
|
+
};
|
|
54877
|
+
|
|
54878
|
+
// this PRIVATE "hash" function is used to evolve the generator's internal
|
|
54879
|
+
// entropy state. It is also called by the EXPORTED addEntropy() function
|
|
54880
|
+
// which is used to pour entropy into the PRNG.
|
|
54881
|
+
var hash = function () {
|
|
54882
|
+
var args = Array.prototype.slice.call(arguments);
|
|
54883
|
+
for (i = 0; i < args.length; i++) {
|
|
54884
|
+
for (j = 0; j < o; j++) {
|
|
54885
|
+
s[j] -= mash(args[i]);
|
|
54886
|
+
if (s[j] < 0) {
|
|
54887
|
+
s[j] += 1;
|
|
54888
|
+
}
|
|
54889
|
+
}
|
|
54890
|
+
}
|
|
54891
|
+
};
|
|
54892
|
+
|
|
54893
|
+
// this EXPORTED "clean string" function removes leading and trailing spaces and non-printing
|
|
54894
|
+
// control characters, including any embedded carriage-return (CR) and line-feed (LF) characters,
|
|
54895
|
+
// from any string it is handed. this is also used by the 'hashstring' function (below) to help
|
|
54896
|
+
// users always obtain the same EFFECTIVE uheprng seeding key.
|
|
54897
|
+
random.cleanString = function (inStr) {
|
|
54898
|
+
inStr = inStr.replace(/(^\s*)|(\s*$)/gi, ''); // remove any/all leading spaces
|
|
54899
|
+
inStr = inStr.replace(/[\x00-\x1F]/gi, ''); // remove any/all control characters
|
|
54900
|
+
inStr = inStr.replace(/\n /, '\n'); // remove any/all trailing spaces
|
|
54901
|
+
return inStr; // return the cleaned up result
|
|
54902
|
+
};
|
|
54903
|
+
|
|
54904
|
+
// this EXPORTED "hash string" function hashes the provided character string after first removing
|
|
54905
|
+
// any leading or trailing spaces and ignoring any embedded carriage returns (CR) or Line Feeds (LF)
|
|
54906
|
+
random.hashString = function (inStr) {
|
|
54907
|
+
inStr = random.cleanString(inStr);
|
|
54908
|
+
mash(inStr); // use the string to evolve the 'mash' state
|
|
54909
|
+
for (i = 0; i < inStr.length; i++) { // scan through the characters in our string
|
|
54910
|
+
k = inStr.charCodeAt(i); // get the character code at the location
|
|
54911
|
+
for (j = 0; j < o; j++) { // "mash" it into the UHEPRNG state
|
|
54912
|
+
s[j] -= mash(k);
|
|
54913
|
+
if (s[j] < 0) {
|
|
54914
|
+
s[j] += 1;
|
|
54915
|
+
}
|
|
54916
|
+
}
|
|
54917
|
+
}
|
|
54918
|
+
};
|
|
54919
|
+
|
|
54920
|
+
// this EXPORTED function allows you to seed the random generator.
|
|
54921
|
+
random.seed = function (seed) {
|
|
54922
|
+
if (typeof seed === 'undefined' || seed === null) {
|
|
54923
|
+
seed = Math.random();
|
|
54924
|
+
}
|
|
54925
|
+
if (typeof seed !== 'string') {
|
|
54926
|
+
seed = stringify$3(seed, function (key, value) {
|
|
54927
|
+
if (typeof value === 'function') {
|
|
54928
|
+
return (value).toString();
|
|
54929
|
+
}
|
|
54930
|
+
return value;
|
|
54931
|
+
});
|
|
54932
|
+
}
|
|
54933
|
+
random.initState();
|
|
54934
|
+
random.hashString(seed);
|
|
54935
|
+
};
|
|
54936
|
+
|
|
54937
|
+
// this handy exported function is used to add entropy to our uheprng at any time
|
|
54938
|
+
random.addEntropy = function ( /* accept zero or more arguments */ ) {
|
|
54939
|
+
var args = [];
|
|
54940
|
+
for (i = 0; i < arguments.length; i++) {
|
|
54941
|
+
args.push(arguments[i]);
|
|
54942
|
+
}
|
|
54943
|
+
hash((k++) + (new Date().getTime()) + args.join('') + Math.random());
|
|
54944
|
+
};
|
|
54945
|
+
|
|
54946
|
+
// if we want to provide a deterministic startup context for our PRNG,
|
|
54947
|
+
// but without directly setting the internal state variables, this allows
|
|
54948
|
+
// us to initialize the mash hash and PRNG's internal state before providing
|
|
54949
|
+
// some hashing input
|
|
54950
|
+
random.initState = function () {
|
|
54951
|
+
mash(); // pass a null arg to force mash hash to init
|
|
54952
|
+
for (i = 0; i < o; i++) {
|
|
54953
|
+
s[i] = mash(' '); // fill the array with initial mash hash values
|
|
54954
|
+
}
|
|
54955
|
+
c = 1; // init our multiply-with-carry carry
|
|
54956
|
+
p = o; // init our phase
|
|
54957
|
+
};
|
|
54958
|
+
|
|
54959
|
+
// we use this (optional) exported function to signal the JavaScript interpreter
|
|
54960
|
+
// that we're finished using the "Mash" hash function so that it can free up the
|
|
54961
|
+
// local "instance variables" is will have been maintaining. It's not strictly
|
|
54962
|
+
// necessary, of course, but it's good JavaScript citizenship.
|
|
54963
|
+
random.done = function () {
|
|
54964
|
+
mash = null;
|
|
54965
|
+
};
|
|
54966
|
+
|
|
54967
|
+
// if we called "uheprng" with a seed value, then execute random.seed() before returning
|
|
54968
|
+
if (typeof seed !== 'undefined') {
|
|
54969
|
+
random.seed(seed);
|
|
54970
|
+
}
|
|
54971
|
+
|
|
54972
|
+
// Returns a random integer between 0 (inclusive) and range (exclusive)
|
|
54973
|
+
random.range = function (range) {
|
|
54974
|
+
return random(range);
|
|
54975
|
+
};
|
|
54976
|
+
|
|
54977
|
+
// Returns a random float between 0 (inclusive) and 1 (exclusive)
|
|
54978
|
+
random.random = function () {
|
|
54979
|
+
return random(Number.MAX_VALUE - 1) / Number.MAX_VALUE;
|
|
54980
|
+
};
|
|
54981
|
+
|
|
54982
|
+
// Returns a random float between min (inclusive) and max (exclusive)
|
|
54983
|
+
random.floatBetween = function (min, max) {
|
|
54984
|
+
return random.random() * (max - min) + min;
|
|
54985
|
+
};
|
|
54986
|
+
|
|
54987
|
+
// Returns a random integer between min (inclusive) and max (inclusive)
|
|
54988
|
+
random.intBetween = function (min, max) {
|
|
54989
|
+
return Math.floor(random.random() * (max - min + 1)) + min;
|
|
54990
|
+
};
|
|
54991
|
+
|
|
54992
|
+
// when our main outer "uheprng" function is called, after setting up our
|
|
54993
|
+
// initial variables and entropic state, we return an "instance pointer"
|
|
54994
|
+
// to the internal anonymous function which can then be used to access
|
|
54995
|
+
// the uheprng's various exported functions. As with the ".done" function
|
|
54996
|
+
// above, we should set the returned value to 'null' once we're finished
|
|
54997
|
+
// using any of these functions.
|
|
54998
|
+
return random;
|
|
54999
|
+
}());
|
|
55000
|
+
};
|
|
55001
|
+
|
|
55002
|
+
// Modification for use in node:
|
|
55003
|
+
uheprng.create = function (seed) {
|
|
55004
|
+
return new uheprng(seed);
|
|
55005
|
+
};
|
|
55006
|
+
var randomSeed = uheprng;
|
|
55007
|
+
|
|
55008
|
+
/**
|
|
55009
|
+
* lodash (Custom Build) <https://lodash.com/>
|
|
55010
|
+
* Build: `lodash modularize exports="npm" -o ./`
|
|
55011
|
+
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
|
55012
|
+
* Released under MIT license <https://lodash.com/license>
|
|
55013
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
55014
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
55015
|
+
*/
|
|
55016
|
+
|
|
55017
|
+
/** Used as references for various `Number` constants. */
|
|
55018
|
+
var MAX_SAFE_INTEGER$2 = 9007199254740991;
|
|
55019
|
+
|
|
55020
|
+
/** `Object#toString` result references. */
|
|
55021
|
+
var argsTag = '[object Arguments]',
|
|
55022
|
+
funcTag = '[object Function]',
|
|
55023
|
+
genTag = '[object GeneratorFunction]';
|
|
55024
|
+
|
|
55025
|
+
/** Used to detect unsigned integer values. */
|
|
55026
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
55027
|
+
|
|
55028
|
+
/**
|
|
55029
|
+
* A faster alternative to `Function#apply`, this function invokes `func`
|
|
55030
|
+
* with the `this` binding of `thisArg` and the arguments of `args`.
|
|
55031
|
+
*
|
|
55032
|
+
* @private
|
|
55033
|
+
* @param {Function} func The function to invoke.
|
|
55034
|
+
* @param {*} thisArg The `this` binding of `func`.
|
|
55035
|
+
* @param {Array} args The arguments to invoke `func` with.
|
|
55036
|
+
* @returns {*} Returns the result of `func`.
|
|
55037
|
+
*/
|
|
55038
|
+
function apply(func, thisArg, args) {
|
|
55039
|
+
switch (args.length) {
|
|
55040
|
+
case 0: return func.call(thisArg);
|
|
55041
|
+
case 1: return func.call(thisArg, args[0]);
|
|
55042
|
+
case 2: return func.call(thisArg, args[0], args[1]);
|
|
55043
|
+
case 3: return func.call(thisArg, args[0], args[1], args[2]);
|
|
54717
55044
|
}
|
|
55045
|
+
return func.apply(thisArg, args);
|
|
54718
55046
|
}
|
|
54719
|
-
|
|
54720
|
-
|
|
54721
|
-
|
|
55047
|
+
|
|
55048
|
+
/**
|
|
55049
|
+
* The base implementation of `_.times` without support for iteratee shorthands
|
|
55050
|
+
* or max array length checks.
|
|
55051
|
+
*
|
|
55052
|
+
* @private
|
|
55053
|
+
* @param {number} n The number of times to invoke `iteratee`.
|
|
55054
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
55055
|
+
* @returns {Array} Returns the array of results.
|
|
55056
|
+
*/
|
|
55057
|
+
function baseTimes(n, iteratee) {
|
|
55058
|
+
var index = -1,
|
|
55059
|
+
result = Array(n);
|
|
55060
|
+
|
|
55061
|
+
while (++index < n) {
|
|
55062
|
+
result[index] = iteratee(index);
|
|
55063
|
+
}
|
|
55064
|
+
return result;
|
|
54722
55065
|
}
|
|
54723
|
-
|
|
54724
|
-
|
|
54725
|
-
|
|
55066
|
+
|
|
55067
|
+
/** Used for built-in method references. */
|
|
55068
|
+
var objectProto = Object.prototype;
|
|
55069
|
+
|
|
55070
|
+
/** Used to check objects for own properties. */
|
|
55071
|
+
var hasOwnProperty$1 = objectProto.hasOwnProperty;
|
|
55072
|
+
|
|
55073
|
+
/**
|
|
55074
|
+
* Used to resolve the
|
|
55075
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
55076
|
+
* of values.
|
|
55077
|
+
*/
|
|
55078
|
+
var objectToString = objectProto.toString;
|
|
55079
|
+
|
|
55080
|
+
/** Built-in value references. */
|
|
55081
|
+
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
55082
|
+
|
|
55083
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
55084
|
+
var nativeMax = Math.max;
|
|
55085
|
+
|
|
55086
|
+
/**
|
|
55087
|
+
* Creates an array of the enumerable property names of the array-like `value`.
|
|
55088
|
+
*
|
|
55089
|
+
* @private
|
|
55090
|
+
* @param {*} value The value to query.
|
|
55091
|
+
* @param {boolean} inherited Specify returning inherited property names.
|
|
55092
|
+
* @returns {Array} Returns the array of property names.
|
|
55093
|
+
*/
|
|
55094
|
+
function arrayLikeKeys(value, inherited) {
|
|
55095
|
+
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
|
55096
|
+
// Safari 9 makes `arguments.length` enumerable in strict mode.
|
|
55097
|
+
var result = (isArray(value) || isArguments(value))
|
|
55098
|
+
? baseTimes(value.length, String)
|
|
55099
|
+
: [];
|
|
55100
|
+
|
|
55101
|
+
var length = result.length,
|
|
55102
|
+
skipIndexes = !!length;
|
|
55103
|
+
|
|
55104
|
+
for (var key in value) {
|
|
55105
|
+
if ((inherited || hasOwnProperty$1.call(value, key)) &&
|
|
55106
|
+
!(skipIndexes && (key == 'length' || isIndex(key, length)))) {
|
|
55107
|
+
result.push(key);
|
|
55108
|
+
}
|
|
55109
|
+
}
|
|
55110
|
+
return result;
|
|
54726
55111
|
}
|
|
54727
|
-
|
|
54728
|
-
|
|
54729
|
-
|
|
54730
|
-
|
|
54731
|
-
|
|
55112
|
+
|
|
55113
|
+
/**
|
|
55114
|
+
* Used by `_.defaults` to customize its `_.assignIn` use.
|
|
55115
|
+
*
|
|
55116
|
+
* @private
|
|
55117
|
+
* @param {*} objValue The destination value.
|
|
55118
|
+
* @param {*} srcValue The source value.
|
|
55119
|
+
* @param {string} key The key of the property to assign.
|
|
55120
|
+
* @param {Object} object The parent object of `objValue`.
|
|
55121
|
+
* @returns {*} Returns the value to assign.
|
|
55122
|
+
*/
|
|
55123
|
+
function assignInDefaults(objValue, srcValue, key, object) {
|
|
55124
|
+
if (objValue === undefined ||
|
|
55125
|
+
(eq$3(objValue, objectProto[key]) && !hasOwnProperty$1.call(object, key))) {
|
|
55126
|
+
return srcValue;
|
|
55127
|
+
}
|
|
55128
|
+
return objValue;
|
|
54732
55129
|
}
|
|
54733
|
-
|
|
54734
|
-
|
|
54735
|
-
|
|
55130
|
+
|
|
55131
|
+
/**
|
|
55132
|
+
* Assigns `value` to `key` of `object` if the existing value is not equivalent
|
|
55133
|
+
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
55134
|
+
* for equality comparisons.
|
|
55135
|
+
*
|
|
55136
|
+
* @private
|
|
55137
|
+
* @param {Object} object The object to modify.
|
|
55138
|
+
* @param {string} key The key of the property to assign.
|
|
55139
|
+
* @param {*} value The value to assign.
|
|
55140
|
+
*/
|
|
55141
|
+
function assignValue(object, key, value) {
|
|
55142
|
+
var objValue = object[key];
|
|
55143
|
+
if (!(hasOwnProperty$1.call(object, key) && eq$3(objValue, value)) ||
|
|
55144
|
+
(value === undefined && !(key in object))) {
|
|
55145
|
+
object[key] = value;
|
|
54736
55146
|
}
|
|
54737
|
-
return JSON.parse(await read$1(packageJsonPath));
|
|
54738
55147
|
}
|
|
54739
|
-
|
|
54740
|
-
|
|
54741
|
-
|
|
54742
|
-
|
|
55148
|
+
|
|
55149
|
+
/**
|
|
55150
|
+
* The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
|
|
55151
|
+
*
|
|
55152
|
+
* @private
|
|
55153
|
+
* @param {Object} object The object to query.
|
|
55154
|
+
* @returns {Array} Returns the array of property names.
|
|
55155
|
+
*/
|
|
55156
|
+
function baseKeysIn(object) {
|
|
55157
|
+
if (!isObject$1(object)) {
|
|
55158
|
+
return nativeKeysIn(object);
|
|
54743
55159
|
}
|
|
54744
|
-
|
|
54745
|
-
|
|
54746
|
-
|
|
54747
|
-
|
|
54748
|
-
|
|
54749
|
-
|
|
55160
|
+
var isProto = isPrototype(object),
|
|
55161
|
+
result = [];
|
|
55162
|
+
|
|
55163
|
+
for (var key in object) {
|
|
55164
|
+
if (!(key == 'constructor' && (isProto || !hasOwnProperty$1.call(object, key)))) {
|
|
55165
|
+
result.push(key);
|
|
55166
|
+
}
|
|
54750
55167
|
}
|
|
54751
|
-
|
|
54752
|
-
|
|
54753
|
-
|
|
54754
|
-
|
|
54755
|
-
|
|
54756
|
-
|
|
54757
|
-
|
|
54758
|
-
|
|
54759
|
-
|
|
54760
|
-
|
|
54761
|
-
|
|
55168
|
+
return result;
|
|
55169
|
+
}
|
|
55170
|
+
|
|
55171
|
+
/**
|
|
55172
|
+
* The base implementation of `_.rest` which doesn't validate or coerce arguments.
|
|
55173
|
+
*
|
|
55174
|
+
* @private
|
|
55175
|
+
* @param {Function} func The function to apply a rest parameter to.
|
|
55176
|
+
* @param {number} [start=func.length-1] The start position of the rest parameter.
|
|
55177
|
+
* @returns {Function} Returns the new function.
|
|
55178
|
+
*/
|
|
55179
|
+
function baseRest(func, start) {
|
|
55180
|
+
start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
|
|
55181
|
+
return function() {
|
|
55182
|
+
var args = arguments,
|
|
55183
|
+
index = -1,
|
|
55184
|
+
length = nativeMax(args.length - start, 0),
|
|
55185
|
+
array = Array(length);
|
|
55186
|
+
|
|
55187
|
+
while (++index < length) {
|
|
55188
|
+
array[index] = args[start + index];
|
|
55189
|
+
}
|
|
55190
|
+
index = -1;
|
|
55191
|
+
var otherArgs = Array(start + 1);
|
|
55192
|
+
while (++index < start) {
|
|
55193
|
+
otherArgs[index] = args[index];
|
|
55194
|
+
}
|
|
55195
|
+
otherArgs[start] = array;
|
|
55196
|
+
return apply(func, this, otherArgs);
|
|
55197
|
+
};
|
|
55198
|
+
}
|
|
55199
|
+
|
|
55200
|
+
/**
|
|
55201
|
+
* Copies properties of `source` to `object`.
|
|
55202
|
+
*
|
|
55203
|
+
* @private
|
|
55204
|
+
* @param {Object} source The object to copy properties from.
|
|
55205
|
+
* @param {Array} props The property identifiers to copy.
|
|
55206
|
+
* @param {Object} [object={}] The object to copy properties to.
|
|
55207
|
+
* @param {Function} [customizer] The function to customize copied values.
|
|
55208
|
+
* @returns {Object} Returns `object`.
|
|
55209
|
+
*/
|
|
55210
|
+
function copyObject(source, props, object, customizer) {
|
|
55211
|
+
object || (object = {});
|
|
55212
|
+
|
|
55213
|
+
var index = -1,
|
|
55214
|
+
length = props.length;
|
|
55215
|
+
|
|
55216
|
+
while (++index < length) {
|
|
55217
|
+
var key = props[index];
|
|
55218
|
+
|
|
55219
|
+
var newValue = customizer
|
|
55220
|
+
? customizer(object[key], source[key], key, object, source)
|
|
55221
|
+
: undefined;
|
|
55222
|
+
|
|
55223
|
+
assignValue(object, key, newValue === undefined ? source[key] : newValue);
|
|
54762
55224
|
}
|
|
54763
|
-
|
|
54764
|
-
|
|
54765
|
-
|
|
54766
|
-
|
|
54767
|
-
|
|
55225
|
+
return object;
|
|
55226
|
+
}
|
|
55227
|
+
|
|
55228
|
+
/**
|
|
55229
|
+
* Creates a function like `_.assign`.
|
|
55230
|
+
*
|
|
55231
|
+
* @private
|
|
55232
|
+
* @param {Function} assigner The function to assign values.
|
|
55233
|
+
* @returns {Function} Returns the new assigner function.
|
|
55234
|
+
*/
|
|
55235
|
+
function createAssigner(assigner) {
|
|
55236
|
+
return baseRest(function(object, sources) {
|
|
55237
|
+
var index = -1,
|
|
55238
|
+
length = sources.length,
|
|
55239
|
+
customizer = length > 1 ? sources[length - 1] : undefined,
|
|
55240
|
+
guard = length > 2 ? sources[2] : undefined;
|
|
55241
|
+
|
|
55242
|
+
customizer = (assigner.length > 3 && typeof customizer == 'function')
|
|
55243
|
+
? (length--, customizer)
|
|
55244
|
+
: undefined;
|
|
55245
|
+
|
|
55246
|
+
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
|
55247
|
+
customizer = length < 3 ? undefined : customizer;
|
|
55248
|
+
length = 1;
|
|
55249
|
+
}
|
|
55250
|
+
object = Object(object);
|
|
55251
|
+
while (++index < length) {
|
|
55252
|
+
var source = sources[index];
|
|
55253
|
+
if (source) {
|
|
55254
|
+
assigner(object, source, index, customizer);
|
|
55255
|
+
}
|
|
55256
|
+
}
|
|
55257
|
+
return object;
|
|
54768
55258
|
});
|
|
54769
55259
|
}
|
|
54770
|
-
|
|
54771
|
-
|
|
54772
|
-
|
|
54773
|
-
|
|
54774
|
-
|
|
54775
|
-
|
|
54776
|
-
|
|
54777
|
-
|
|
54778
|
-
|
|
54779
|
-
|
|
54780
|
-
|
|
54781
|
-
|
|
54782
|
-
|
|
55260
|
+
|
|
55261
|
+
/**
|
|
55262
|
+
* Checks if `value` is a valid array-like index.
|
|
55263
|
+
*
|
|
55264
|
+
* @private
|
|
55265
|
+
* @param {*} value The value to check.
|
|
55266
|
+
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
55267
|
+
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
55268
|
+
*/
|
|
55269
|
+
function isIndex(value, length) {
|
|
55270
|
+
length = length == null ? MAX_SAFE_INTEGER$2 : length;
|
|
55271
|
+
return !!length &&
|
|
55272
|
+
(typeof value == 'number' || reIsUint.test(value)) &&
|
|
55273
|
+
(value > -1 && value % 1 == 0 && value < length);
|
|
55274
|
+
}
|
|
55275
|
+
|
|
55276
|
+
/**
|
|
55277
|
+
* Checks if the given arguments are from an iteratee call.
|
|
55278
|
+
*
|
|
55279
|
+
* @private
|
|
55280
|
+
* @param {*} value The potential iteratee value argument.
|
|
55281
|
+
* @param {*} index The potential iteratee index or key argument.
|
|
55282
|
+
* @param {*} object The potential iteratee object argument.
|
|
55283
|
+
* @returns {boolean} Returns `true` if the arguments are from an iteratee call,
|
|
55284
|
+
* else `false`.
|
|
55285
|
+
*/
|
|
55286
|
+
function isIterateeCall(value, index, object) {
|
|
55287
|
+
if (!isObject$1(object)) {
|
|
55288
|
+
return false;
|
|
54783
55289
|
}
|
|
54784
|
-
|
|
55290
|
+
var type = typeof index;
|
|
55291
|
+
if (type == 'number'
|
|
55292
|
+
? (isArrayLike(object) && isIndex(index, object.length))
|
|
55293
|
+
: (type == 'string' && index in object)
|
|
55294
|
+
) {
|
|
55295
|
+
return eq$3(object[index], value);
|
|
55296
|
+
}
|
|
55297
|
+
return false;
|
|
54785
55298
|
}
|
|
54786
|
-
|
|
54787
|
-
|
|
54788
|
-
|
|
54789
|
-
|
|
54790
|
-
|
|
54791
|
-
|
|
54792
|
-
|
|
54793
|
-
|
|
54794
|
-
|
|
54795
|
-
|
|
54796
|
-
|
|
54797
|
-
|
|
54798
|
-
|
|
55299
|
+
|
|
55300
|
+
/**
|
|
55301
|
+
* Checks if `value` is likely a prototype object.
|
|
55302
|
+
*
|
|
55303
|
+
* @private
|
|
55304
|
+
* @param {*} value The value to check.
|
|
55305
|
+
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
|
55306
|
+
*/
|
|
55307
|
+
function isPrototype(value) {
|
|
55308
|
+
var Ctor = value && value.constructor,
|
|
55309
|
+
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
|
|
55310
|
+
|
|
55311
|
+
return value === proto;
|
|
55312
|
+
}
|
|
55313
|
+
|
|
55314
|
+
/**
|
|
55315
|
+
* This function is like
|
|
55316
|
+
* [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
55317
|
+
* except that it includes inherited enumerable properties.
|
|
55318
|
+
*
|
|
55319
|
+
* @private
|
|
55320
|
+
* @param {Object} object The object to query.
|
|
55321
|
+
* @returns {Array} Returns the array of property names.
|
|
55322
|
+
*/
|
|
55323
|
+
function nativeKeysIn(object) {
|
|
55324
|
+
var result = [];
|
|
55325
|
+
if (object != null) {
|
|
55326
|
+
for (var key in Object(object)) {
|
|
55327
|
+
result.push(key);
|
|
55328
|
+
}
|
|
54799
55329
|
}
|
|
54800
|
-
return
|
|
55330
|
+
return result;
|
|
54801
55331
|
}
|
|
54802
|
-
|
|
54803
|
-
|
|
54804
|
-
|
|
54805
|
-
|
|
54806
|
-
|
|
54807
|
-
|
|
54808
|
-
|
|
54809
|
-
|
|
54810
|
-
|
|
54811
|
-
|
|
54812
|
-
|
|
54813
|
-
|
|
54814
|
-
|
|
55332
|
+
|
|
55333
|
+
/**
|
|
55334
|
+
* Performs a
|
|
55335
|
+
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
55336
|
+
* comparison between two values to determine if they are equivalent.
|
|
55337
|
+
*
|
|
55338
|
+
* @static
|
|
55339
|
+
* @memberOf _
|
|
55340
|
+
* @since 4.0.0
|
|
55341
|
+
* @category Lang
|
|
55342
|
+
* @param {*} value The value to compare.
|
|
55343
|
+
* @param {*} other The other value to compare.
|
|
55344
|
+
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
55345
|
+
* @example
|
|
55346
|
+
*
|
|
55347
|
+
* var object = { 'a': 1 };
|
|
55348
|
+
* var other = { 'a': 1 };
|
|
55349
|
+
*
|
|
55350
|
+
* _.eq(object, object);
|
|
55351
|
+
* // => true
|
|
55352
|
+
*
|
|
55353
|
+
* _.eq(object, other);
|
|
55354
|
+
* // => false
|
|
55355
|
+
*
|
|
55356
|
+
* _.eq('a', 'a');
|
|
55357
|
+
* // => true
|
|
55358
|
+
*
|
|
55359
|
+
* _.eq('a', Object('a'));
|
|
55360
|
+
* // => false
|
|
55361
|
+
*
|
|
55362
|
+
* _.eq(NaN, NaN);
|
|
55363
|
+
* // => true
|
|
55364
|
+
*/
|
|
55365
|
+
function eq$3(value, other) {
|
|
55366
|
+
return value === other || (value !== value && other !== other);
|
|
55367
|
+
}
|
|
55368
|
+
|
|
55369
|
+
/**
|
|
55370
|
+
* Checks if `value` is likely an `arguments` object.
|
|
55371
|
+
*
|
|
55372
|
+
* @static
|
|
55373
|
+
* @memberOf _
|
|
55374
|
+
* @since 0.1.0
|
|
55375
|
+
* @category Lang
|
|
55376
|
+
* @param {*} value The value to check.
|
|
55377
|
+
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
55378
|
+
* else `false`.
|
|
55379
|
+
* @example
|
|
55380
|
+
*
|
|
55381
|
+
* _.isArguments(function() { return arguments; }());
|
|
55382
|
+
* // => true
|
|
55383
|
+
*
|
|
55384
|
+
* _.isArguments([1, 2, 3]);
|
|
55385
|
+
* // => false
|
|
55386
|
+
*/
|
|
55387
|
+
function isArguments(value) {
|
|
55388
|
+
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
|
55389
|
+
return isArrayLikeObject(value) && hasOwnProperty$1.call(value, 'callee') &&
|
|
55390
|
+
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
|
|
55391
|
+
}
|
|
55392
|
+
|
|
55393
|
+
/**
|
|
55394
|
+
* Checks if `value` is classified as an `Array` object.
|
|
55395
|
+
*
|
|
55396
|
+
* @static
|
|
55397
|
+
* @memberOf _
|
|
55398
|
+
* @since 0.1.0
|
|
55399
|
+
* @category Lang
|
|
55400
|
+
* @param {*} value The value to check.
|
|
55401
|
+
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
55402
|
+
* @example
|
|
55403
|
+
*
|
|
55404
|
+
* _.isArray([1, 2, 3]);
|
|
55405
|
+
* // => true
|
|
55406
|
+
*
|
|
55407
|
+
* _.isArray(document.body.children);
|
|
55408
|
+
* // => false
|
|
55409
|
+
*
|
|
55410
|
+
* _.isArray('abc');
|
|
55411
|
+
* // => false
|
|
55412
|
+
*
|
|
55413
|
+
* _.isArray(_.noop);
|
|
55414
|
+
* // => false
|
|
55415
|
+
*/
|
|
55416
|
+
var isArray = Array.isArray;
|
|
55417
|
+
|
|
55418
|
+
/**
|
|
55419
|
+
* Checks if `value` is array-like. A value is considered array-like if it's
|
|
55420
|
+
* not a function and has a `value.length` that's an integer greater than or
|
|
55421
|
+
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
|
55422
|
+
*
|
|
55423
|
+
* @static
|
|
55424
|
+
* @memberOf _
|
|
55425
|
+
* @since 4.0.0
|
|
55426
|
+
* @category Lang
|
|
55427
|
+
* @param {*} value The value to check.
|
|
55428
|
+
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
|
55429
|
+
* @example
|
|
55430
|
+
*
|
|
55431
|
+
* _.isArrayLike([1, 2, 3]);
|
|
55432
|
+
* // => true
|
|
55433
|
+
*
|
|
55434
|
+
* _.isArrayLike(document.body.children);
|
|
55435
|
+
* // => true
|
|
55436
|
+
*
|
|
55437
|
+
* _.isArrayLike('abc');
|
|
55438
|
+
* // => true
|
|
55439
|
+
*
|
|
55440
|
+
* _.isArrayLike(_.noop);
|
|
55441
|
+
* // => false
|
|
55442
|
+
*/
|
|
55443
|
+
function isArrayLike(value) {
|
|
55444
|
+
return value != null && isLength(value.length) && !isFunction(value);
|
|
55445
|
+
}
|
|
55446
|
+
|
|
55447
|
+
/**
|
|
55448
|
+
* This method is like `_.isArrayLike` except that it also checks if `value`
|
|
55449
|
+
* is an object.
|
|
55450
|
+
*
|
|
55451
|
+
* @static
|
|
55452
|
+
* @memberOf _
|
|
55453
|
+
* @since 4.0.0
|
|
55454
|
+
* @category Lang
|
|
55455
|
+
* @param {*} value The value to check.
|
|
55456
|
+
* @returns {boolean} Returns `true` if `value` is an array-like object,
|
|
55457
|
+
* else `false`.
|
|
55458
|
+
* @example
|
|
55459
|
+
*
|
|
55460
|
+
* _.isArrayLikeObject([1, 2, 3]);
|
|
55461
|
+
* // => true
|
|
55462
|
+
*
|
|
55463
|
+
* _.isArrayLikeObject(document.body.children);
|
|
55464
|
+
* // => true
|
|
55465
|
+
*
|
|
55466
|
+
* _.isArrayLikeObject('abc');
|
|
55467
|
+
* // => false
|
|
55468
|
+
*
|
|
55469
|
+
* _.isArrayLikeObject(_.noop);
|
|
55470
|
+
* // => false
|
|
55471
|
+
*/
|
|
55472
|
+
function isArrayLikeObject(value) {
|
|
55473
|
+
return isObjectLike$1(value) && isArrayLike(value);
|
|
55474
|
+
}
|
|
55475
|
+
|
|
55476
|
+
/**
|
|
55477
|
+
* Checks if `value` is classified as a `Function` object.
|
|
55478
|
+
*
|
|
55479
|
+
* @static
|
|
55480
|
+
* @memberOf _
|
|
55481
|
+
* @since 0.1.0
|
|
55482
|
+
* @category Lang
|
|
55483
|
+
* @param {*} value The value to check.
|
|
55484
|
+
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
55485
|
+
* @example
|
|
55486
|
+
*
|
|
55487
|
+
* _.isFunction(_);
|
|
55488
|
+
* // => true
|
|
55489
|
+
*
|
|
55490
|
+
* _.isFunction(/abc/);
|
|
55491
|
+
* // => false
|
|
55492
|
+
*/
|
|
55493
|
+
function isFunction(value) {
|
|
55494
|
+
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
55495
|
+
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
|
55496
|
+
var tag = isObject$1(value) ? objectToString.call(value) : '';
|
|
55497
|
+
return tag == funcTag || tag == genTag;
|
|
55498
|
+
}
|
|
55499
|
+
|
|
55500
|
+
/**
|
|
55501
|
+
* Checks if `value` is a valid array-like length.
|
|
55502
|
+
*
|
|
55503
|
+
* **Note:** This method is loosely based on
|
|
55504
|
+
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
|
55505
|
+
*
|
|
55506
|
+
* @static
|
|
55507
|
+
* @memberOf _
|
|
55508
|
+
* @since 4.0.0
|
|
55509
|
+
* @category Lang
|
|
55510
|
+
* @param {*} value The value to check.
|
|
55511
|
+
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
|
55512
|
+
* @example
|
|
55513
|
+
*
|
|
55514
|
+
* _.isLength(3);
|
|
55515
|
+
* // => true
|
|
55516
|
+
*
|
|
55517
|
+
* _.isLength(Number.MIN_VALUE);
|
|
55518
|
+
* // => false
|
|
55519
|
+
*
|
|
55520
|
+
* _.isLength(Infinity);
|
|
55521
|
+
* // => false
|
|
55522
|
+
*
|
|
55523
|
+
* _.isLength('3');
|
|
55524
|
+
* // => false
|
|
55525
|
+
*/
|
|
55526
|
+
function isLength(value) {
|
|
55527
|
+
return typeof value == 'number' &&
|
|
55528
|
+
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER$2;
|
|
55529
|
+
}
|
|
55530
|
+
|
|
55531
|
+
/**
|
|
55532
|
+
* Checks if `value` is the
|
|
55533
|
+
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
55534
|
+
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
55535
|
+
*
|
|
55536
|
+
* @static
|
|
55537
|
+
* @memberOf _
|
|
55538
|
+
* @since 0.1.0
|
|
55539
|
+
* @category Lang
|
|
55540
|
+
* @param {*} value The value to check.
|
|
55541
|
+
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
55542
|
+
* @example
|
|
55543
|
+
*
|
|
55544
|
+
* _.isObject({});
|
|
55545
|
+
* // => true
|
|
55546
|
+
*
|
|
55547
|
+
* _.isObject([1, 2, 3]);
|
|
55548
|
+
* // => true
|
|
55549
|
+
*
|
|
55550
|
+
* _.isObject(_.noop);
|
|
55551
|
+
* // => true
|
|
55552
|
+
*
|
|
55553
|
+
* _.isObject(null);
|
|
55554
|
+
* // => false
|
|
55555
|
+
*/
|
|
55556
|
+
function isObject$1(value) {
|
|
55557
|
+
var type = typeof value;
|
|
55558
|
+
return !!value && (type == 'object' || type == 'function');
|
|
55559
|
+
}
|
|
55560
|
+
|
|
55561
|
+
/**
|
|
55562
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
55563
|
+
* and has a `typeof` result of "object".
|
|
55564
|
+
*
|
|
55565
|
+
* @static
|
|
55566
|
+
* @memberOf _
|
|
55567
|
+
* @since 4.0.0
|
|
55568
|
+
* @category Lang
|
|
55569
|
+
* @param {*} value The value to check.
|
|
55570
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
55571
|
+
* @example
|
|
55572
|
+
*
|
|
55573
|
+
* _.isObjectLike({});
|
|
55574
|
+
* // => true
|
|
55575
|
+
*
|
|
55576
|
+
* _.isObjectLike([1, 2, 3]);
|
|
55577
|
+
* // => true
|
|
55578
|
+
*
|
|
55579
|
+
* _.isObjectLike(_.noop);
|
|
55580
|
+
* // => false
|
|
55581
|
+
*
|
|
55582
|
+
* _.isObjectLike(null);
|
|
55583
|
+
* // => false
|
|
55584
|
+
*/
|
|
55585
|
+
function isObjectLike$1(value) {
|
|
55586
|
+
return !!value && typeof value == 'object';
|
|
55587
|
+
}
|
|
55588
|
+
|
|
55589
|
+
/**
|
|
55590
|
+
* This method is like `_.assignIn` except that it accepts `customizer`
|
|
55591
|
+
* which is invoked to produce the assigned values. If `customizer` returns
|
|
55592
|
+
* `undefined`, assignment is handled by the method instead. The `customizer`
|
|
55593
|
+
* is invoked with five arguments: (objValue, srcValue, key, object, source).
|
|
55594
|
+
*
|
|
55595
|
+
* **Note:** This method mutates `object`.
|
|
55596
|
+
*
|
|
55597
|
+
* @static
|
|
55598
|
+
* @memberOf _
|
|
55599
|
+
* @since 4.0.0
|
|
55600
|
+
* @alias extendWith
|
|
55601
|
+
* @category Object
|
|
55602
|
+
* @param {Object} object The destination object.
|
|
55603
|
+
* @param {...Object} sources The source objects.
|
|
55604
|
+
* @param {Function} [customizer] The function to customize assigned values.
|
|
55605
|
+
* @returns {Object} Returns `object`.
|
|
55606
|
+
* @see _.assignWith
|
|
55607
|
+
* @example
|
|
55608
|
+
*
|
|
55609
|
+
* function customizer(objValue, srcValue) {
|
|
55610
|
+
* return _.isUndefined(objValue) ? srcValue : objValue;
|
|
55611
|
+
* }
|
|
55612
|
+
*
|
|
55613
|
+
* var defaults = _.partialRight(_.assignInWith, customizer);
|
|
55614
|
+
*
|
|
55615
|
+
* defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
|
|
55616
|
+
* // => { 'a': 1, 'b': 2 }
|
|
55617
|
+
*/
|
|
55618
|
+
var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
|
|
55619
|
+
copyObject(source, keysIn(source), object, customizer);
|
|
55620
|
+
});
|
|
55621
|
+
|
|
55622
|
+
/**
|
|
55623
|
+
* Assigns own and inherited enumerable string keyed properties of source
|
|
55624
|
+
* objects to the destination object for all destination properties that
|
|
55625
|
+
* resolve to `undefined`. Source objects are applied from left to right.
|
|
55626
|
+
* Once a property is set, additional values of the same property are ignored.
|
|
55627
|
+
*
|
|
55628
|
+
* **Note:** This method mutates `object`.
|
|
55629
|
+
*
|
|
55630
|
+
* @static
|
|
55631
|
+
* @since 0.1.0
|
|
55632
|
+
* @memberOf _
|
|
55633
|
+
* @category Object
|
|
55634
|
+
* @param {Object} object The destination object.
|
|
55635
|
+
* @param {...Object} [sources] The source objects.
|
|
55636
|
+
* @returns {Object} Returns `object`.
|
|
55637
|
+
* @see _.defaultsDeep
|
|
55638
|
+
* @example
|
|
55639
|
+
*
|
|
55640
|
+
* _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
|
|
55641
|
+
* // => { 'a': 1, 'b': 2 }
|
|
55642
|
+
*/
|
|
55643
|
+
var defaults$1 = baseRest(function(args) {
|
|
55644
|
+
args.push(undefined, assignInDefaults);
|
|
55645
|
+
return apply(assignInWith, undefined, args);
|
|
55646
|
+
});
|
|
55647
|
+
|
|
55648
|
+
/**
|
|
55649
|
+
* Creates an array of the own and inherited enumerable property names of `object`.
|
|
55650
|
+
*
|
|
55651
|
+
* **Note:** Non-object values are coerced to objects.
|
|
55652
|
+
*
|
|
55653
|
+
* @static
|
|
55654
|
+
* @memberOf _
|
|
55655
|
+
* @since 3.0.0
|
|
55656
|
+
* @category Object
|
|
55657
|
+
* @param {Object} object The object to query.
|
|
55658
|
+
* @returns {Array} Returns the array of property names.
|
|
55659
|
+
* @example
|
|
55660
|
+
*
|
|
55661
|
+
* function Foo() {
|
|
55662
|
+
* this.a = 1;
|
|
55663
|
+
* this.b = 2;
|
|
55664
|
+
* }
|
|
55665
|
+
*
|
|
55666
|
+
* Foo.prototype.c = 3;
|
|
55667
|
+
*
|
|
55668
|
+
* _.keysIn(new Foo);
|
|
55669
|
+
* // => ['a', 'b', 'c'] (iteration order is not guaranteed)
|
|
55670
|
+
*/
|
|
55671
|
+
function keysIn(object) {
|
|
55672
|
+
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
|
|
55673
|
+
}
|
|
55674
|
+
|
|
55675
|
+
var lodash_defaults = defaults$1;
|
|
55676
|
+
|
|
55677
|
+
(function (module, exports) {
|
|
55678
|
+
Object.defineProperty(exports, "__esModule", {
|
|
55679
|
+
value: true
|
|
55680
|
+
});
|
|
55681
|
+
exports["default"] = void 0;
|
|
55682
|
+
|
|
55683
|
+
var _randomSeed = _interopRequireDefault(randomSeed);
|
|
55684
|
+
|
|
55685
|
+
var _lodash = _interopRequireDefault(lodash_defaults);
|
|
55686
|
+
|
|
55687
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
55688
|
+
|
|
55689
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
55690
|
+
|
|
55691
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
55692
|
+
|
|
55693
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
55694
|
+
|
|
55695
|
+
/**
|
|
55696
|
+
* Adjectives used by haikunator
|
|
55697
|
+
*/
|
|
55698
|
+
var defaultAdjectives = ['aged', 'ancient', 'autumn', 'billowing', 'bitter', 'black', 'blue', 'bold', 'broad', 'broken', 'calm', 'cold', 'cool', 'crimson', 'curly', 'damp', 'dark', 'dawn', 'delicate', 'divine', 'dry', 'empty', 'falling', 'fancy', 'flat', 'floral', 'fragrant', 'frosty', 'gentle', 'green', 'hidden', 'holy', 'icy', 'jolly', 'late', 'lingering', 'little', 'lively', 'long', 'lucky', 'misty', 'morning', 'muddy', 'mute', 'nameless', 'noisy', 'odd', 'old', 'orange', 'patient', 'plain', 'polished', 'proud', 'purple', 'quiet', 'rapid', 'raspy', 'red', 'restless', 'rough', 'round', 'royal', 'shiny', 'shrill', 'shy', 'silent', 'small', 'snowy', 'soft', 'solitary', 'sparkling', 'spring', 'square', 'steep', 'still', 'summer', 'super', 'sweet', 'throbbing', 'tight', 'tiny', 'twilight', 'wandering', 'weathered', 'white', 'wild', 'winter', 'wispy', 'withered', 'yellow', 'young'];
|
|
55699
|
+
/**
|
|
55700
|
+
* Nouns used by haikunator
|
|
55701
|
+
*/
|
|
55702
|
+
|
|
55703
|
+
var defaultNouns = ['art', 'band', 'bar', 'base', 'bird', 'block', 'boat', 'bonus', 'bread', 'breeze', 'brook', 'bush', 'butterfly', 'cake', 'cell', 'cherry', 'cloud', 'credit', 'darkness', 'dawn', 'dew', 'disk', 'dream', 'dust', 'feather', 'field', 'fire', 'firefly', 'flower', 'fog', 'forest', 'frog', 'frost', 'glade', 'glitter', 'grass', 'hall', 'hat', 'haze', 'heart', 'hill', 'king', 'lab', 'lake', 'leaf', 'limit', 'math', 'meadow', 'mode', 'moon', 'morning', 'mountain', 'mouse', 'mud', 'night', 'paper', 'pine', 'poetry', 'pond', 'queen', 'rain', 'recipe', 'resonance', 'rice', 'river', 'salad', 'scene', 'sea', 'shadow', 'shape', 'silence', 'sky', 'smoke', 'snow', 'snowflake', 'sound', 'star', 'sun', 'sun', 'sunset', 'surf', 'term', 'thunder', 'tooth', 'tree', 'truth', 'union', 'unit', 'violet', 'voice', 'water', 'waterfall', 'wave', 'wildflower', 'wind', 'wood'];
|
|
55704
|
+
|
|
55705
|
+
/**
|
|
55706
|
+
* Default options used by haikunate method
|
|
55707
|
+
*/
|
|
55708
|
+
var defaultOptions = {
|
|
55709
|
+
delimiter: '-',
|
|
55710
|
+
tokenLength: 4,
|
|
55711
|
+
tokenHex: false,
|
|
55712
|
+
tokenChars: '0123456789'
|
|
55713
|
+
};
|
|
55714
|
+
|
|
55715
|
+
var Haikunator =
|
|
55716
|
+
/*#__PURE__*/
|
|
55717
|
+
function () {
|
|
55718
|
+
/**
|
|
55719
|
+
* Initialize new haikunator
|
|
55720
|
+
*/
|
|
55721
|
+
function Haikunator() {
|
|
55722
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
55723
|
+
|
|
55724
|
+
_classCallCheck(this, Haikunator);
|
|
55725
|
+
|
|
55726
|
+
this.adjectives = options.adjectives || defaultAdjectives;
|
|
55727
|
+
this.nouns = options.nouns || defaultNouns;
|
|
55728
|
+
this.random = _randomSeed["default"].create(options.seed);
|
|
55729
|
+
this.config = (0, _lodash["default"])(options.defaults, defaultOptions);
|
|
54815
55730
|
}
|
|
54816
|
-
|
|
55731
|
+
/**
|
|
55732
|
+
* Generate heroku-like random names
|
|
55733
|
+
*/
|
|
55734
|
+
|
|
55735
|
+
|
|
55736
|
+
_createClass(Haikunator, [{
|
|
55737
|
+
key: "haikunate",
|
|
55738
|
+
value: function haikunate(options) {
|
|
55739
|
+
// set specified options
|
|
55740
|
+
var config = (0, _lodash["default"])(options, this.config); // set tokenChars if tokenHex is set
|
|
55741
|
+
|
|
55742
|
+
if (config.tokenHex === true) {
|
|
55743
|
+
config.tokenChars = '0123456789abcdef';
|
|
55744
|
+
} // pick adjective and noun
|
|
55745
|
+
|
|
55746
|
+
|
|
55747
|
+
var adjective = this._randomElement(this.adjectives);
|
|
55748
|
+
|
|
55749
|
+
var noun = this._randomElement(this.nouns); // create random token
|
|
55750
|
+
|
|
55751
|
+
|
|
55752
|
+
if (!config.tokenLength) config.tokenLength = 0;
|
|
55753
|
+
var token = '';
|
|
55754
|
+
|
|
55755
|
+
for (var i = 0; i < config.tokenLength; i++) {
|
|
55756
|
+
token += this._randomElement(config.tokenChars);
|
|
55757
|
+
} // create result and return
|
|
55758
|
+
|
|
55759
|
+
|
|
55760
|
+
var sections = [adjective, noun, token];
|
|
55761
|
+
return sections.filter(function (e) {
|
|
55762
|
+
return !!e;
|
|
55763
|
+
}).join(config.delimiter);
|
|
55764
|
+
}
|
|
55765
|
+
/**
|
|
55766
|
+
* Get a random element from an array/string
|
|
55767
|
+
* @param {(string|Array)} array
|
|
55768
|
+
* @returns {*}
|
|
55769
|
+
* @private
|
|
55770
|
+
*/
|
|
55771
|
+
|
|
55772
|
+
}, {
|
|
55773
|
+
key: "_randomElement",
|
|
55774
|
+
value: function _randomElement(array) {
|
|
55775
|
+
if (!array) return undefined;
|
|
55776
|
+
return array[this.random(array.length)];
|
|
55777
|
+
}
|
|
55778
|
+
}]);
|
|
55779
|
+
|
|
55780
|
+
return Haikunator;
|
|
55781
|
+
}();
|
|
55782
|
+
|
|
55783
|
+
exports["default"] = Haikunator;
|
|
55784
|
+
module.exports = exports.default;
|
|
55785
|
+
|
|
55786
|
+
}(distWeb, distWeb.exports));
|
|
55787
|
+
|
|
55788
|
+
var Haikunator = /*@__PURE__*/getDefaultExportFromCjs(distWeb.exports);
|
|
55789
|
+
|
|
55790
|
+
const haikunator = new Haikunator();
|
|
55791
|
+
function generate(suffix) {
|
|
55792
|
+
const generated = haikunator.haikunate();
|
|
55793
|
+
const [adjective, noun, token] = generated.split("-");
|
|
55794
|
+
return [adjective, noun, suffix, token].join("-");
|
|
54817
55795
|
}
|
|
54818
55796
|
|
|
54819
|
-
var
|
|
55797
|
+
var haiku = /*#__PURE__*/Object.freeze({
|
|
54820
55798
|
__proto__: null,
|
|
54821
|
-
|
|
54822
|
-
PackageJsonNotFoundError: PackageJsonNotFoundError,
|
|
54823
|
-
dependencyManagerUsedForCreating: dependencyManagerUsedForCreating,
|
|
54824
|
-
installNPMDependenciesRecursively: installNPMDependenciesRecursively,
|
|
54825
|
-
install: install,
|
|
54826
|
-
getPackageName: getPackageName,
|
|
54827
|
-
getDependencies: getDependencies,
|
|
54828
|
-
addNPMDependenciesIfNeeded: addNPMDependenciesIfNeeded
|
|
55799
|
+
generate: generate
|
|
54829
55800
|
});
|
|
54830
55801
|
|
|
54831
55802
|
var packageJson$2 = {exports: {}};
|
|
@@ -57488,6 +58459,7 @@ const compressBrotli = src$2.exports;
|
|
|
57488
58459
|
const loadStore = options => {
|
|
57489
58460
|
const adapters = {
|
|
57490
58461
|
redis: '@keyv/redis',
|
|
58462
|
+
rediss: '@keyv/redis',
|
|
57491
58463
|
mongodb: '@keyv/mongo',
|
|
57492
58464
|
mongo: '@keyv/mongo',
|
|
57493
58465
|
sqlite: '@keyv/sqlite',
|
|
@@ -57495,9 +58467,11 @@ const loadStore = options => {
|
|
|
57495
58467
|
postgres: '@keyv/postgres',
|
|
57496
58468
|
mysql: '@keyv/mysql',
|
|
57497
58469
|
etcd: '@keyv/etcd',
|
|
58470
|
+
offline: '@keyv/offline',
|
|
58471
|
+
tiered: '@keyv/tiered',
|
|
57498
58472
|
};
|
|
57499
58473
|
if (options.adapter || options.uri) {
|
|
57500
|
-
const adapter = options.adapter || /^[
|
|
58474
|
+
const adapter = options.adapter || /^[^:+]*/.exec(options.uri)[0];
|
|
57501
58475
|
return new (commonjsRequire(adapters[adapter]))(options);
|
|
57502
58476
|
}
|
|
57503
58477
|
|
|
@@ -57510,10 +58484,11 @@ const iterableAdapters = [
|
|
|
57510
58484
|
'mysql',
|
|
57511
58485
|
'mongo',
|
|
57512
58486
|
'redis',
|
|
58487
|
+
'tiered',
|
|
57513
58488
|
];
|
|
57514
58489
|
|
|
57515
58490
|
class Keyv$1 extends EventEmitter$2 {
|
|
57516
|
-
constructor(uri, options) {
|
|
58491
|
+
constructor(uri, {emitErrors = true, ...options} = {}) {
|
|
57517
58492
|
super();
|
|
57518
58493
|
this.opts = {
|
|
57519
58494
|
namespace: 'keyv',
|
|
@@ -57537,30 +58512,29 @@ class Keyv$1 extends EventEmitter$2 {
|
|
|
57537
58512
|
};
|
|
57538
58513
|
}
|
|
57539
58514
|
|
|
57540
|
-
if (typeof this.opts.store.on === 'function') {
|
|
58515
|
+
if (typeof this.opts.store.on === 'function' && emitErrors) {
|
|
57541
58516
|
this.opts.store.on('error', error => this.emit('error', error));
|
|
57542
58517
|
}
|
|
57543
58518
|
|
|
57544
58519
|
this.opts.store.namespace = this.opts.namespace;
|
|
57545
58520
|
|
|
57546
|
-
const generateIterator = iterator =>
|
|
57547
|
-
|
|
57548
|
-
|
|
57549
|
-
|
|
57550
|
-
|
|
57551
|
-
|
|
57552
|
-
|
|
57553
|
-
|
|
57554
|
-
}
|
|
57555
|
-
|
|
57556
|
-
if (typeof data.expires === 'number' && Date.now() > data.expires) {
|
|
57557
|
-
this.delete(key);
|
|
57558
|
-
continue;
|
|
57559
|
-
}
|
|
58521
|
+
const generateIterator = iterator => async function * () {
|
|
58522
|
+
for await (const [key, raw] of typeof iterator === 'function'
|
|
58523
|
+
? iterator(this.opts.store.namespace)
|
|
58524
|
+
: iterator) {
|
|
58525
|
+
const data = this.opts.deserialize(raw);
|
|
58526
|
+
if (this.opts.store.namespace && !key.includes(this.opts.store.namespace)) {
|
|
58527
|
+
continue;
|
|
58528
|
+
}
|
|
57560
58529
|
|
|
57561
|
-
|
|
58530
|
+
if (typeof data.expires === 'number' && Date.now() > data.expires) {
|
|
58531
|
+
this.delete(key);
|
|
58532
|
+
continue;
|
|
57562
58533
|
}
|
|
57563
|
-
|
|
58534
|
+
|
|
58535
|
+
yield [this._getKeyUnprefix(key), data.value];
|
|
58536
|
+
}
|
|
58537
|
+
};
|
|
57564
58538
|
|
|
57565
58539
|
// Attach iterators
|
|
57566
58540
|
if (typeof this.opts.store[Symbol.iterator] === 'function' && this.opts.store instanceof Map) {
|
|
@@ -57585,12 +58559,10 @@ class Keyv$1 extends EventEmitter$2 {
|
|
|
57585
58559
|
}
|
|
57586
58560
|
|
|
57587
58561
|
_getKeyUnprefix(key) {
|
|
57588
|
-
return
|
|
57589
|
-
|
|
57590
|
-
|
|
57591
|
-
|
|
57592
|
-
.join(':')
|
|
57593
|
-
: key;
|
|
58562
|
+
return key
|
|
58563
|
+
.split(':')
|
|
58564
|
+
.splice(1)
|
|
58565
|
+
.join(':');
|
|
57594
58566
|
}
|
|
57595
58567
|
|
|
57596
58568
|
get(key, options) {
|
|
@@ -57632,13 +58604,13 @@ class Keyv$1 extends EventEmitter$2 {
|
|
|
57632
58604
|
.then(() => isArray ? store.getMany(keyPrefixed) : store.get(keyPrefixed))
|
|
57633
58605
|
.then(data => (typeof data === 'string') ? this.opts.deserialize(data) : data)
|
|
57634
58606
|
.then(data => {
|
|
57635
|
-
// Console.log('get', data);
|
|
57636
58607
|
if (data === undefined || data === null) {
|
|
57637
58608
|
return undefined;
|
|
57638
58609
|
}
|
|
57639
58610
|
|
|
57640
58611
|
if (isArray) {
|
|
57641
58612
|
const result = [];
|
|
58613
|
+
|
|
57642
58614
|
if (data.length === 0) {
|
|
57643
58615
|
return [];
|
|
57644
58616
|
}
|
|
@@ -57740,6 +58712,13 @@ class Keyv$1 extends EventEmitter$2 {
|
|
|
57740
58712
|
return value !== undefined;
|
|
57741
58713
|
});
|
|
57742
58714
|
}
|
|
58715
|
+
|
|
58716
|
+
disconnect() {
|
|
58717
|
+
const {store} = this.opts;
|
|
58718
|
+
if (typeof store.disconnect === 'function') {
|
|
58719
|
+
return store.disconnect();
|
|
58720
|
+
}
|
|
58721
|
+
}
|
|
57743
58722
|
}
|
|
57744
58723
|
|
|
57745
58724
|
var src$1 = Keyv$1;
|
|
@@ -61125,6 +62104,14 @@ class Request extends stream_1.Duplex {
|
|
|
61125
62104
|
const redirectUrl = new url_1.URL(redirectBuffer, url);
|
|
61126
62105
|
const redirectString = redirectUrl.toString();
|
|
61127
62106
|
decodeURI(redirectString);
|
|
62107
|
+
// eslint-disable-next-line no-inner-declarations
|
|
62108
|
+
function isUnixSocketURL(url) {
|
|
62109
|
+
return url.protocol === 'unix:' || url.hostname === 'unix';
|
|
62110
|
+
}
|
|
62111
|
+
if (!isUnixSocketURL(url) && isUnixSocketURL(redirectUrl)) {
|
|
62112
|
+
this._beforeError(new RequestError('Cannot redirect to UNIX socket', {}, this));
|
|
62113
|
+
return;
|
|
62114
|
+
}
|
|
61128
62115
|
// Redirecting to a different site, clear sensitive data.
|
|
61129
62116
|
if (redirectUrl.hostname !== url.hostname || redirectUrl.port !== url.port) {
|
|
61130
62117
|
if ('host' in options.headers) {
|
|
@@ -61942,11 +62929,11 @@ function asPromise(normalizedOptions) {
|
|
|
61942
62929
|
request._beforeError(new types_1.RequestError(error.message, error, request));
|
|
61943
62930
|
return;
|
|
61944
62931
|
}
|
|
62932
|
+
globalResponse = response;
|
|
61945
62933
|
if (!is_response_ok_1.isResponseOk(response)) {
|
|
61946
62934
|
request._beforeError(new types_1.HTTPError(response));
|
|
61947
62935
|
return;
|
|
61948
62936
|
}
|
|
61949
|
-
globalResponse = response;
|
|
61950
62937
|
resolve(request.options.resolveBodyOnly ? response.body : response);
|
|
61951
62938
|
});
|
|
61952
62939
|
const onError = (error) => {
|
|
@@ -66370,11 +67357,178 @@ async function latestNpmPackageVersion(name) {
|
|
|
66370
67357
|
return latestVersion(name);
|
|
66371
67358
|
}
|
|
66372
67359
|
|
|
66373
|
-
var version = /*#__PURE__*/Object.freeze({
|
|
67360
|
+
var version$1 = /*#__PURE__*/Object.freeze({
|
|
66374
67361
|
__proto__: null,
|
|
66375
67362
|
latestNpmPackageVersion: latestNpmPackageVersion
|
|
66376
67363
|
});
|
|
66377
67364
|
|
|
67365
|
+
var semver = /*#__PURE__*/Object.freeze({
|
|
67366
|
+
__proto__: null,
|
|
67367
|
+
Version: semver$3,
|
|
67368
|
+
coerce: coerce_1
|
|
67369
|
+
});
|
|
67370
|
+
|
|
67371
|
+
const dependencyManager = ["yarn", "npm", "pnpm"];
|
|
67372
|
+
const PackageJsonNotFoundError = (directory) => {
|
|
67373
|
+
return new Abort(`The directory ${directory} doesn't have a package.json.`);
|
|
67374
|
+
};
|
|
67375
|
+
function dependencyManagerUsedForCreating(env = process.env) {
|
|
67376
|
+
if (env.npm_config_user_agent?.includes("yarn")) {
|
|
67377
|
+
return "yarn";
|
|
67378
|
+
} else if (env.npm_config_user_agent?.includes("pnpm")) {
|
|
67379
|
+
return "pnpm";
|
|
67380
|
+
} else {
|
|
67381
|
+
return "npm";
|
|
67382
|
+
}
|
|
67383
|
+
}
|
|
67384
|
+
async function installNPMDependenciesRecursively(options) {
|
|
67385
|
+
const packageJsons = await out(join$3(options.directory, "**/package.json"), {
|
|
67386
|
+
ignore: [join$3(options.directory, "node_modules/**/package.json")],
|
|
67387
|
+
cwd: options.directory,
|
|
67388
|
+
onlyFiles: true,
|
|
67389
|
+
deep: options.deep
|
|
67390
|
+
});
|
|
67391
|
+
const abortController = new AbortController$1();
|
|
67392
|
+
try {
|
|
67393
|
+
await Promise.all(packageJsons.map(async (packageJsonPath) => {
|
|
67394
|
+
const directory = dirname$1(packageJsonPath);
|
|
67395
|
+
await install(directory, options.dependencyManager, void 0, void 0, abortController.signal);
|
|
67396
|
+
}));
|
|
67397
|
+
} catch (error) {
|
|
67398
|
+
abortController.abort();
|
|
67399
|
+
throw error;
|
|
67400
|
+
}
|
|
67401
|
+
}
|
|
67402
|
+
async function install(directory, dependencyManager2, stdout, stderr, signal) {
|
|
67403
|
+
const options = { cwd: directory, stdout, stderr, signal };
|
|
67404
|
+
await exec$2(dependencyManager2, ["install"], options);
|
|
67405
|
+
}
|
|
67406
|
+
async function getPackageName(packageJsonPath) {
|
|
67407
|
+
const packageJsonContent = await packageJSONContents(packageJsonPath);
|
|
67408
|
+
return packageJsonContent.name;
|
|
67409
|
+
}
|
|
67410
|
+
async function getDependencies(packageJsonPath) {
|
|
67411
|
+
const packageJsonContent = await packageJSONContents(packageJsonPath);
|
|
67412
|
+
const dependencies = packageJsonContent.dependencies ?? {};
|
|
67413
|
+
const devDependencies = packageJsonContent.devDependencies ?? {};
|
|
67414
|
+
return { ...dependencies, ...devDependencies };
|
|
67415
|
+
}
|
|
67416
|
+
async function checkForNewVersion(dependency, currentVersion) {
|
|
67417
|
+
try {
|
|
67418
|
+
const lastVersion = await latestNpmPackageVersion(dependency);
|
|
67419
|
+
if (lastVersion && new semver$3(currentVersion).compare(lastVersion) < 0) {
|
|
67420
|
+
return lastVersion;
|
|
67421
|
+
} else {
|
|
67422
|
+
return void 0;
|
|
67423
|
+
}
|
|
67424
|
+
} catch (error) {
|
|
67425
|
+
return void 0;
|
|
67426
|
+
}
|
|
67427
|
+
}
|
|
67428
|
+
function getOutputUpdateCLIReminder(dependencyManager2, packages) {
|
|
67429
|
+
const updateCommand = dependencyManager2 === "yarn" ? "upgrade" : "update";
|
|
67430
|
+
return content`To update to the latest version of the Shopify CLI, run ${token.genericShellCommand(`${dependencyManager2} ${updateCommand}${packages === void 0 ? "" : ` ${packages.join(", ")}`}`)}`.value;
|
|
67431
|
+
}
|
|
67432
|
+
async function packageJSONContents(packageJsonPath) {
|
|
67433
|
+
if (!await exists$1(packageJsonPath)) {
|
|
67434
|
+
throw PackageJsonNotFoundError(dirname$1(packageJsonPath));
|
|
67435
|
+
}
|
|
67436
|
+
return JSON.parse(await read$1(packageJsonPath));
|
|
67437
|
+
}
|
|
67438
|
+
async function addNPMDependenciesIfNeeded(dependencies, options) {
|
|
67439
|
+
const packageJsonPath = join$3(options.directory, "package.json");
|
|
67440
|
+
if (!await exists$1(packageJsonPath)) {
|
|
67441
|
+
throw PackageJsonNotFoundError(options.directory);
|
|
67442
|
+
}
|
|
67443
|
+
const existingDependencies = Object.keys(await getDependencies(packageJsonPath));
|
|
67444
|
+
const dependenciesToAdd = dependencies.filter((dep) => {
|
|
67445
|
+
return !existingDependencies.includes(dep);
|
|
67446
|
+
});
|
|
67447
|
+
if (dependenciesToAdd.length === 0) {
|
|
67448
|
+
return;
|
|
67449
|
+
}
|
|
67450
|
+
let args;
|
|
67451
|
+
switch (options.dependencyManager) {
|
|
67452
|
+
case "npm":
|
|
67453
|
+
args = argumentsToAddDependenciesWithNPM(dependenciesToAdd, options.type);
|
|
67454
|
+
break;
|
|
67455
|
+
case "yarn":
|
|
67456
|
+
args = argumentsToAddDependenciesWithYarn(dependenciesToAdd, options.type);
|
|
67457
|
+
break;
|
|
67458
|
+
case "pnpm":
|
|
67459
|
+
args = argumentsToAddDependenciesWithPNPM(dependenciesToAdd, options.type);
|
|
67460
|
+
break;
|
|
67461
|
+
}
|
|
67462
|
+
await exec$2(options.dependencyManager, args, {
|
|
67463
|
+
cwd: options.directory,
|
|
67464
|
+
stdout: options.stdout,
|
|
67465
|
+
stderr: options.stderr,
|
|
67466
|
+
signal: options.signal
|
|
67467
|
+
});
|
|
67468
|
+
}
|
|
67469
|
+
function argumentsToAddDependenciesWithNPM(dependencies, type) {
|
|
67470
|
+
let command = ["install"];
|
|
67471
|
+
command = command.concat(dependencies);
|
|
67472
|
+
switch (type) {
|
|
67473
|
+
case "dev":
|
|
67474
|
+
command.push("--save-dev");
|
|
67475
|
+
break;
|
|
67476
|
+
case "peer":
|
|
67477
|
+
command.push("--save-peer");
|
|
67478
|
+
break;
|
|
67479
|
+
case "prod":
|
|
67480
|
+
command.push("--save-prod");
|
|
67481
|
+
break;
|
|
67482
|
+
}
|
|
67483
|
+
return command;
|
|
67484
|
+
}
|
|
67485
|
+
function argumentsToAddDependenciesWithYarn(dependencies, type) {
|
|
67486
|
+
let command = ["add"];
|
|
67487
|
+
command = command.concat(dependencies);
|
|
67488
|
+
switch (type) {
|
|
67489
|
+
case "dev":
|
|
67490
|
+
command.push("--dev");
|
|
67491
|
+
break;
|
|
67492
|
+
case "peer":
|
|
67493
|
+
command.push("--peer");
|
|
67494
|
+
break;
|
|
67495
|
+
case "prod":
|
|
67496
|
+
command.push("--prod");
|
|
67497
|
+
break;
|
|
67498
|
+
}
|
|
67499
|
+
return command;
|
|
67500
|
+
}
|
|
67501
|
+
function argumentsToAddDependenciesWithPNPM(dependencies, type) {
|
|
67502
|
+
let command = ["add"];
|
|
67503
|
+
command = command.concat(dependencies);
|
|
67504
|
+
switch (type) {
|
|
67505
|
+
case "dev":
|
|
67506
|
+
command.push("--save-dev");
|
|
67507
|
+
break;
|
|
67508
|
+
case "peer":
|
|
67509
|
+
command.push("--save-peer");
|
|
67510
|
+
break;
|
|
67511
|
+
case "prod":
|
|
67512
|
+
command.push("--save-prod");
|
|
67513
|
+
break;
|
|
67514
|
+
}
|
|
67515
|
+
return command;
|
|
67516
|
+
}
|
|
67517
|
+
|
|
67518
|
+
var dependency = /*#__PURE__*/Object.freeze({
|
|
67519
|
+
__proto__: null,
|
|
67520
|
+
dependencyManager: dependencyManager,
|
|
67521
|
+
PackageJsonNotFoundError: PackageJsonNotFoundError,
|
|
67522
|
+
dependencyManagerUsedForCreating: dependencyManagerUsedForCreating,
|
|
67523
|
+
installNPMDependenciesRecursively: installNPMDependenciesRecursively,
|
|
67524
|
+
install: install,
|
|
67525
|
+
getPackageName: getPackageName,
|
|
67526
|
+
getDependencies: getDependencies,
|
|
67527
|
+
checkForNewVersion: checkForNewVersion,
|
|
67528
|
+
getOutputUpdateCLIReminder: getOutputUpdateCLIReminder,
|
|
67529
|
+
addNPMDependenciesIfNeeded: addNPMDependenciesIfNeeded
|
|
67530
|
+
});
|
|
67531
|
+
|
|
66378
67532
|
const getEnvironmentVariable = () => {
|
|
66379
67533
|
const { env } = process;
|
|
66380
67534
|
return env.SUDO_USER || env.C9_USER || env.LOGNAME || env.USER || env.LNAME || env.USERNAME;
|
|
@@ -84353,7 +85507,7 @@ var mimicFn_1 = mimicFn$1;
|
|
|
84353
85507
|
|
|
84354
85508
|
const mimicFn = mimicFn_1;
|
|
84355
85509
|
|
|
84356
|
-
var debounceFn = (inputFunction, options) => {
|
|
85510
|
+
var debounceFn = (inputFunction, options = {}) => {
|
|
84357
85511
|
if (typeof inputFunction !== 'function') {
|
|
84358
85512
|
throw new TypeError(`Expected the first argument to be a function, got \`${typeof inputFunction}\``);
|
|
84359
85513
|
}
|
|
@@ -162959,6 +164113,7 @@ var combiningMarksRegex = /[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\
|
|
|
162959
164113
|
function validateLabel(label, processing_option) {
|
|
162960
164114
|
if (label.substr(0, 4) === "xn--") {
|
|
162961
164115
|
label = punycode.toUnicode(label);
|
|
164116
|
+
PROCESSING_OPTIONS.NONTRANSITIONAL;
|
|
162962
164117
|
}
|
|
162963
164118
|
|
|
162964
164119
|
var error = false;
|
|
@@ -170704,7 +171859,7 @@ const printDocASTReducer = {
|
|
|
170704
171859
|
* print all items together separated by separator if provided
|
|
170705
171860
|
*/
|
|
170706
171861
|
|
|
170707
|
-
function join(maybeArray, separator) {
|
|
171862
|
+
function join(maybeArray, separator = '') {
|
|
170708
171863
|
var _maybeArray$filter$jo;
|
|
170709
171864
|
|
|
170710
171865
|
return (_maybeArray$filter$jo =
|
|
@@ -172159,7 +173314,7 @@ function makeRequest(_a) {
|
|
|
172159
173314
|
successfullyPassedErrorPolicy = !result.errors || fetchOptions.errorPolicy === 'all' || fetchOptions.errorPolicy === 'ignore';
|
|
172160
173315
|
if (response.ok && successfullyPassedErrorPolicy && successfullyReceivedData) {
|
|
172161
173316
|
headers_1 = response.headers, status_1 = response.status;
|
|
172162
|
-
rest = __rest(result, ["errors"]);
|
|
173317
|
+
result.errors, rest = __rest(result, ["errors"]);
|
|
172163
173318
|
data = fetchOptions.errorPolicy === 'ignore' ? rest : result;
|
|
172164
173319
|
return [2 /*return*/, __assign(__assign({}, (isBathchingQuery ? { data: data } : data)), { headers: headers_1, status: status_1 })];
|
|
172165
173320
|
}
|
|
@@ -172328,7 +173483,7 @@ The Admin GraphQL API responded unsuccessfully with the HTTP status ${`${error.r
|
|
|
172328
173483
|
|
|
172329
173484
|
${token.json(error.response.errors)}
|
|
172330
173485
|
`;
|
|
172331
|
-
const abortError = new Abort(errorMessage);
|
|
173486
|
+
const abortError = new Abort(errorMessage.value);
|
|
172332
173487
|
abortError.stack = error.stack;
|
|
172333
173488
|
throw abortError;
|
|
172334
173489
|
} else {
|
|
@@ -173017,12 +174172,6 @@ var checksum = /*#__PURE__*/Object.freeze({
|
|
|
173017
174172
|
validateMD5: validateMD5
|
|
173018
174173
|
});
|
|
173019
174174
|
|
|
173020
|
-
var semver = /*#__PURE__*/Object.freeze({
|
|
173021
|
-
__proto__: null,
|
|
173022
|
-
Version: semver$3,
|
|
173023
|
-
coerce: coerce_1
|
|
173024
|
-
});
|
|
173025
|
-
|
|
173026
174175
|
const RubyCLIVersion = "2.16.0";
|
|
173027
174176
|
const ThemeCheckVersion = "1.10.2";
|
|
173028
174177
|
const MinBundlerVersion = "2.3.8";
|
|
@@ -173154,11 +174303,16 @@ function shopifyCLIDirectory() {
|
|
|
173154
174303
|
function themeCheckDirectory() {
|
|
173155
174304
|
return join$3(constants$2.paths.directories.cache.vendor.path(), "theme-check", ThemeCheckVersion);
|
|
173156
174305
|
}
|
|
174306
|
+
async function version() {
|
|
174307
|
+
const parseOutput = (version2) => version2.match(/ruby (\d+\.\d+\.\d+)/)?.[1];
|
|
174308
|
+
return captureOutput("ruby", ["-v"]).then(parseOutput).catch(() => void 0);
|
|
174309
|
+
}
|
|
173157
174310
|
|
|
173158
174311
|
var ruby = /*#__PURE__*/Object.freeze({
|
|
173159
174312
|
__proto__: null,
|
|
173160
174313
|
execCLI: execCLI,
|
|
173161
|
-
execThemeCheckCLI: execThemeCheckCLI
|
|
174314
|
+
execThemeCheckCLI: execThemeCheckCLI,
|
|
174315
|
+
version: version
|
|
173162
174316
|
});
|
|
173163
174317
|
|
|
173164
174318
|
async function readPackageJSON(directory) {
|
|
@@ -173446,7 +174600,7 @@ async function read(path) {
|
|
|
173446
174600
|
};
|
|
173447
174601
|
}
|
|
173448
174602
|
async function write(file) {
|
|
173449
|
-
await write$1(file.path, stringify$
|
|
174603
|
+
await write$1(file.path, stringify$f(file.variables));
|
|
173450
174604
|
}
|
|
173451
174605
|
|
|
173452
174606
|
var dotEnv = /*#__PURE__*/Object.freeze({
|
|
@@ -173476,5 +174630,34 @@ var plugins = /*#__PURE__*/Object.freeze({
|
|
|
173476
174630
|
lookupTunnelPlugin: lookupTunnelPlugin
|
|
173477
174631
|
});
|
|
173478
174632
|
|
|
173479
|
-
|
|
173480
|
-
|
|
174633
|
+
const isVSCode = async (root = process.cwd()) => {
|
|
174634
|
+
const config = await findUp$2(join$3(root, ".vscode"), { type: "directory" });
|
|
174635
|
+
if (!config) {
|
|
174636
|
+
return false;
|
|
174637
|
+
}
|
|
174638
|
+
return exists$1(config);
|
|
174639
|
+
};
|
|
174640
|
+
async function addRecommendedExtensions(directory, recommendations) {
|
|
174641
|
+
const extensionsPath = join$3(directory, ".vscode/extensions.json");
|
|
174642
|
+
if (await isVSCode(directory)) {
|
|
174643
|
+
let originalExtensionsJson = { recommendations: [] };
|
|
174644
|
+
if (await exists$1(extensionsPath)) {
|
|
174645
|
+
const originalExtensionsFile = await read$1(extensionsPath);
|
|
174646
|
+
originalExtensionsJson = JSON.parse(originalExtensionsFile);
|
|
174647
|
+
}
|
|
174648
|
+
const newExtensionsJson = {
|
|
174649
|
+
...originalExtensionsJson,
|
|
174650
|
+
recommendations: [...originalExtensionsJson.recommendations, ...recommendations]
|
|
174651
|
+
};
|
|
174652
|
+
await write$1(extensionsPath, JSON.stringify(newExtensionsJson, null, 2));
|
|
174653
|
+
}
|
|
174654
|
+
}
|
|
174655
|
+
|
|
174656
|
+
var vscode = /*#__PURE__*/Object.freeze({
|
|
174657
|
+
__proto__: null,
|
|
174658
|
+
isVSCode: isVSCode,
|
|
174659
|
+
addRecommendedExtensions: addRecommendedExtensions
|
|
174660
|
+
});
|
|
174661
|
+
|
|
174662
|
+
export { semver as A, npm as B, port as C, cli as D, id as E, FormData$3 as F, temporary as G, dotEnv as H, abort as I, constants$2 as J, plugins as K, vscode as L, File$1 as a, string as b, github as c, dependency as d, error$j as e, file$1 as f, git as g, haiku as h, os$2 as i, environment as j, session as k, schema$2 as l, toml as m, store as n, output as o, path$w as p, api as q, http$2 as r, system as s, template as t, ui as u, version$1 as v, archiver as w, checksum as x, yaml as y, ruby as z };
|
|
174663
|
+
//# sourceMappingURL=index-26330ff1.js.map
|