@shopify/cli-kit 3.0.9 → 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 +21 -0
- package/dist/{index-2310cc02.js → index-26330ff1.js} +1597 -402
- package/dist/index-26330ff1.js.map +1 -0
- package/dist/index.d.ts +371 -303
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/{multipart-parser-c0dd350f.js → multipart-parser-ab287634.js} +3 -2
- package/dist/multipart-parser-ab287634.js.map +1 -0
- package/package.json +5 -3
- package/dist/index-2310cc02.js.map +0 -1
- package/dist/multipart-parser-c0dd350f.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",
|
|
@@ -12380,12 +12384,12 @@ var devDependencies = {
|
|
|
12380
12384
|
"abort-controller": "^3.0.0",
|
|
12381
12385
|
"ansi-colors": "^4.1.1",
|
|
12382
12386
|
"change-case": "^4.1.2",
|
|
12383
|
-
"color-json": "^2.0.1",
|
|
12384
12387
|
commondir: "^1.0.1",
|
|
12385
12388
|
conf: "^10.1.2",
|
|
12386
12389
|
"cross-zip": "^4.0.0",
|
|
12387
12390
|
del: "^6.0.0",
|
|
12388
12391
|
enquirer: "^2.3.6",
|
|
12392
|
+
"color-json": "^2.0.1",
|
|
12389
12393
|
"env-paths": "^3.0.0",
|
|
12390
12394
|
execa: "^6.0.0",
|
|
12391
12395
|
"fast-glob": "^3.2.11",
|
|
@@ -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;
|
|
@@ -21127,7 +21172,7 @@ const defaultColors = {
|
|
|
21127
21172
|
key: 'white'
|
|
21128
21173
|
};
|
|
21129
21174
|
|
|
21130
|
-
var colorJson
|
|
21175
|
+
var colorJson = supportsColor() ? function syntaxHighlight(json, colors = defaultColors, colorMap = defaultColorMap, spacing = 2) { // thanks: https://stackoverflow.com/a/7220510/4151489
|
|
21131
21176
|
if (typeof json != 'string') json = JSON.stringify(json, undefined, spacing);
|
|
21132
21177
|
else json = JSON.stringify(JSON.parse(json), undefined, spacing);
|
|
21133
21178
|
return colorMap[colors.separator] + json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g, function (match) {
|
|
@@ -21154,41 +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 */);
|
|
21207
|
+
},
|
|
21208
|
+
json: (value) => {
|
|
21209
|
+
return new ContentToken(value, {}, 2 /* Json */);
|
|
21159
21210
|
},
|
|
21160
21211
|
path: (value) => {
|
|
21161
|
-
return new ContentToken(value, {},
|
|
21212
|
+
return new ContentToken(value, {}, 3 /* Path */);
|
|
21162
21213
|
},
|
|
21163
21214
|
link: (value, link) => {
|
|
21164
|
-
return new ContentToken(value, { link },
|
|
21215
|
+
return new ContentToken(value, { link }, 4 /* Link */);
|
|
21165
21216
|
},
|
|
21166
21217
|
heading: (value) => {
|
|
21167
|
-
return new ContentToken(value, {},
|
|
21218
|
+
return new ContentToken(value, {}, 5 /* Heading */);
|
|
21168
21219
|
},
|
|
21169
21220
|
subheading: (value) => {
|
|
21170
|
-
return new ContentToken(value, {},
|
|
21221
|
+
return new ContentToken(value, {}, 6 /* SubHeading */);
|
|
21171
21222
|
},
|
|
21172
21223
|
italic: (value) => {
|
|
21173
|
-
return new ContentToken(value, {},
|
|
21224
|
+
return new ContentToken(value, {}, 7 /* Italic */);
|
|
21174
21225
|
},
|
|
21175
21226
|
errorText: (value) => {
|
|
21176
|
-
return new ContentToken(value, {},
|
|
21227
|
+
return new ContentToken(value, {}, 8 /* ErrorText */);
|
|
21177
21228
|
},
|
|
21178
21229
|
cyan: (value) => {
|
|
21179
|
-
return new ContentToken(value, {},
|
|
21230
|
+
return new ContentToken(value, {}, 10 /* Cyan */);
|
|
21180
21231
|
},
|
|
21181
21232
|
yellow: (value) => {
|
|
21182
|
-
return new ContentToken(value, {},
|
|
21233
|
+
return new ContentToken(value, {}, 9 /* Yellow */);
|
|
21183
21234
|
},
|
|
21184
21235
|
magenta: (value) => {
|
|
21185
|
-
return new ContentToken(value, {},
|
|
21236
|
+
return new ContentToken(value, {}, 11 /* Magenta */);
|
|
21186
21237
|
},
|
|
21187
21238
|
green: (value) => {
|
|
21188
|
-
return new ContentToken(value, {},
|
|
21239
|
+
return new ContentToken(value, {}, 12 /* Green */);
|
|
21189
21240
|
},
|
|
21190
|
-
|
|
21191
|
-
return new ContentToken(formatPackageManagerCommand(dependencyManager, scriptName, scriptArgs), {},
|
|
21241
|
+
packagejsonScript: (dependencyManager, scriptName, ...scriptArgs) => {
|
|
21242
|
+
return new ContentToken(formatPackageManagerCommand(dependencyManager, scriptName, scriptArgs), {}, 1 /* Command */);
|
|
21243
|
+
},
|
|
21244
|
+
successIcon: () => {
|
|
21245
|
+
return new ContentToken("\u2714", {}, 12 /* Green */);
|
|
21246
|
+
},
|
|
21247
|
+
failIcon: () => {
|
|
21248
|
+
return new ContentToken("\u2716", {}, 8 /* ErrorText */);
|
|
21192
21249
|
}
|
|
21193
21250
|
};
|
|
21194
21251
|
function formatPackageManagerCommand(dependencyManager, scriptName, scriptArgs) {
|
|
@@ -21226,38 +21283,48 @@ function content(strings, ...keys) {
|
|
|
21226
21283
|
} else {
|
|
21227
21284
|
const enumToken = token2;
|
|
21228
21285
|
switch (enumToken.type) {
|
|
21229
|
-
case 0 /*
|
|
21230
|
-
output +=
|
|
21286
|
+
case 0 /* Raw */:
|
|
21287
|
+
output += enumToken.value;
|
|
21288
|
+
break;
|
|
21289
|
+
case 1 /* Command */:
|
|
21290
|
+
output += colors$9.bold(colors$9.yellow(stringifyMessage(enumToken.value)));
|
|
21231
21291
|
break;
|
|
21232
|
-
case
|
|
21233
|
-
output += colors$9.
|
|
21292
|
+
case 3 /* Path */:
|
|
21293
|
+
output += colors$9.cyan(relativize(stringifyMessage(enumToken.value)));
|
|
21294
|
+
break;
|
|
21295
|
+
case 2 /* Json */:
|
|
21296
|
+
try {
|
|
21297
|
+
output += colorJson(stringifyMessage(enumToken.value) ?? {});
|
|
21298
|
+
} catch (_) {
|
|
21299
|
+
output += JSON.stringify(stringifyMessage(enumToken.value) ?? {}, null, 2);
|
|
21300
|
+
}
|
|
21234
21301
|
break;
|
|
21235
|
-
case
|
|
21236
|
-
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 ?? "");
|
|
21237
21304
|
break;
|
|
21238
|
-
case
|
|
21239
|
-
output += colors$9.bold.underline(enumToken.value);
|
|
21305
|
+
case 5 /* Heading */:
|
|
21306
|
+
output += colors$9.bold.underline(stringifyMessage(enumToken.value));
|
|
21240
21307
|
break;
|
|
21241
|
-
case
|
|
21242
|
-
output += colors$9.underline(enumToken.value);
|
|
21308
|
+
case 6 /* SubHeading */:
|
|
21309
|
+
output += colors$9.underline(stringifyMessage(enumToken.value));
|
|
21243
21310
|
break;
|
|
21244
|
-
case
|
|
21245
|
-
output += colors$9.italic(enumToken.value);
|
|
21311
|
+
case 7 /* Italic */:
|
|
21312
|
+
output += colors$9.italic(stringifyMessage(enumToken.value));
|
|
21246
21313
|
break;
|
|
21247
|
-
case
|
|
21248
|
-
output += colors$9.bold.redBright(enumToken.value);
|
|
21314
|
+
case 8 /* ErrorText */:
|
|
21315
|
+
output += colors$9.bold.redBright(stringifyMessage(enumToken.value));
|
|
21249
21316
|
break;
|
|
21250
|
-
case
|
|
21251
|
-
output += colors$9.yellow(enumToken.value);
|
|
21317
|
+
case 9 /* Yellow */:
|
|
21318
|
+
output += colors$9.yellow(stringifyMessage(enumToken.value));
|
|
21252
21319
|
break;
|
|
21253
|
-
case
|
|
21254
|
-
output += colors$9.cyan(enumToken.value);
|
|
21320
|
+
case 10 /* Cyan */:
|
|
21321
|
+
output += colors$9.cyan(stringifyMessage(enumToken.value));
|
|
21255
21322
|
break;
|
|
21256
|
-
case
|
|
21257
|
-
output += colors$9.magenta(enumToken.value);
|
|
21323
|
+
case 11 /* Magenta */:
|
|
21324
|
+
output += colors$9.magenta(stringifyMessage(enumToken.value));
|
|
21258
21325
|
break;
|
|
21259
|
-
case
|
|
21260
|
-
output += colors$9.green(enumToken.value);
|
|
21326
|
+
case 12 /* Green */:
|
|
21327
|
+
output += colors$9.green(stringifyMessage(enumToken.value));
|
|
21261
21328
|
break;
|
|
21262
21329
|
}
|
|
21263
21330
|
}
|
|
@@ -21283,7 +21350,7 @@ const logLevelValue = (level) => {
|
|
|
21283
21350
|
}
|
|
21284
21351
|
};
|
|
21285
21352
|
const currentLogLevel = () => {
|
|
21286
|
-
if (
|
|
21353
|
+
if (isVerbose()) {
|
|
21287
21354
|
return "debug";
|
|
21288
21355
|
} else {
|
|
21289
21356
|
return "info";
|
|
@@ -21319,9 +21386,6 @@ const warn = (content2) => {
|
|
|
21319
21386
|
const newline = () => {
|
|
21320
21387
|
console.log();
|
|
21321
21388
|
};
|
|
21322
|
-
const colorJson = (json) => {
|
|
21323
|
-
return colorJson$1(json);
|
|
21324
|
-
};
|
|
21325
21389
|
const error$k = async (content2) => {
|
|
21326
21390
|
if (shouldOutput("error")) {
|
|
21327
21391
|
if (!content2.message) {
|
|
@@ -21375,7 +21439,7 @@ function stringifyMessage(message2) {
|
|
|
21375
21439
|
return message2;
|
|
21376
21440
|
}
|
|
21377
21441
|
}
|
|
21378
|
-
const message = (content2, level) => {
|
|
21442
|
+
const message = (content2, level = "info") => {
|
|
21379
21443
|
if (shouldOutput(level)) {
|
|
21380
21444
|
consoleLog(stringifyMessage(content2));
|
|
21381
21445
|
}
|
|
@@ -21404,7 +21468,7 @@ async function concurrent(processes) {
|
|
|
21404
21468
|
write(chunk, _encoding, next) {
|
|
21405
21469
|
const lines = stripAnsiEraseCursorEscapeCharacters(chunk.toString("ascii")).split(/\n/);
|
|
21406
21470
|
for (const line of lines) {
|
|
21407
|
-
message(content`${linePrefix(process2.prefix, index)}${colors$9.bold(
|
|
21471
|
+
message(content`${linePrefix(process2.prefix, index)}${colors$9.bold(line)}`, "error");
|
|
21408
21472
|
}
|
|
21409
21473
|
next();
|
|
21410
21474
|
}
|
|
@@ -21459,7 +21523,6 @@ var output = /*#__PURE__*/Object.freeze({
|
|
|
21459
21523
|
debug: debug$5,
|
|
21460
21524
|
warn: warn,
|
|
21461
21525
|
newline: newline,
|
|
21462
|
-
colorJson: colorJson,
|
|
21463
21526
|
error: error$k,
|
|
21464
21527
|
stringifyMessage: stringifyMessage,
|
|
21465
21528
|
concurrent: concurrent,
|
|
@@ -21470,7 +21533,7 @@ var output = /*#__PURE__*/Object.freeze({
|
|
|
21470
21533
|
sourceMapSupport.install();
|
|
21471
21534
|
class Fatal extends Error {
|
|
21472
21535
|
constructor(message, type, tryMessage = null) {
|
|
21473
|
-
super(message);
|
|
21536
|
+
super(stringifyMessage(message));
|
|
21474
21537
|
this.tryMessage = tryMessage;
|
|
21475
21538
|
this.type = type;
|
|
21476
21539
|
}
|
|
@@ -21619,7 +21682,7 @@ function __spreadArray$1(to, from, pack) {
|
|
|
21619
21682
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
21620
21683
|
}
|
|
21621
21684
|
|
|
21622
|
-
function isFunction$
|
|
21685
|
+
function isFunction$2(value) {
|
|
21623
21686
|
return typeof value === 'function';
|
|
21624
21687
|
}
|
|
21625
21688
|
|
|
@@ -21687,7 +21750,7 @@ var Subscription = (function () {
|
|
|
21687
21750
|
}
|
|
21688
21751
|
}
|
|
21689
21752
|
var initialFinalizer = this.initialTeardown;
|
|
21690
|
-
if (isFunction$
|
|
21753
|
+
if (isFunction$2(initialFinalizer)) {
|
|
21691
21754
|
try {
|
|
21692
21755
|
initialFinalizer();
|
|
21693
21756
|
}
|
|
@@ -21779,10 +21842,10 @@ var Subscription = (function () {
|
|
|
21779
21842
|
var EMPTY_SUBSCRIPTION = Subscription.EMPTY;
|
|
21780
21843
|
function isSubscription(value) {
|
|
21781
21844
|
return (value instanceof Subscription ||
|
|
21782
|
-
(value && 'closed' in value && isFunction$
|
|
21845
|
+
(value && 'closed' in value && isFunction$2(value.remove) && isFunction$2(value.add) && isFunction$2(value.unsubscribe)));
|
|
21783
21846
|
}
|
|
21784
21847
|
function execFinalizer(finalizer) {
|
|
21785
|
-
if (isFunction$
|
|
21848
|
+
if (isFunction$2(finalizer)) {
|
|
21786
21849
|
finalizer();
|
|
21787
21850
|
}
|
|
21788
21851
|
else {
|
|
@@ -21966,7 +22029,7 @@ var SafeSubscriber = (function (_super) {
|
|
|
21966
22029
|
function SafeSubscriber(observerOrNext, error, complete) {
|
|
21967
22030
|
var _this = _super.call(this) || this;
|
|
21968
22031
|
var partialObserver;
|
|
21969
|
-
if (isFunction$
|
|
22032
|
+
if (isFunction$2(observerOrNext) || !observerOrNext) {
|
|
21970
22033
|
partialObserver = {
|
|
21971
22034
|
next: observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined,
|
|
21972
22035
|
error: error !== null && error !== void 0 ? error : undefined,
|
|
@@ -22114,7 +22177,7 @@ function getPromiseCtor(promiseCtor) {
|
|
|
22114
22177
|
return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;
|
|
22115
22178
|
}
|
|
22116
22179
|
function isObserver(value) {
|
|
22117
|
-
return value && isFunction$
|
|
22180
|
+
return value && isFunction$2(value.next) && isFunction$2(value.error) && isFunction$2(value.complete);
|
|
22118
22181
|
}
|
|
22119
22182
|
function isSubscriber(value) {
|
|
22120
22183
|
return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));
|
|
@@ -25007,16 +25070,17 @@ const argv = process.argv || [];
|
|
|
25007
25070
|
const isDisabled = "NO_COLOR" in env$1 || argv.includes("--no-color");
|
|
25008
25071
|
const isForced = "FORCE_COLOR" in env$1 || argv.includes("--color");
|
|
25009
25072
|
const isWindows = process.platform === "win32";
|
|
25073
|
+
const isDumbTerminal = env$1.TERM === "dumb";
|
|
25010
25074
|
|
|
25011
25075
|
const isCompatibleTerminal =
|
|
25012
|
-
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;
|
|
25013
25077
|
|
|
25014
25078
|
const isCI =
|
|
25015
25079
|
"CI" in env$1 &&
|
|
25016
25080
|
("GITHUB_ACTIONS" in env$1 || "GITLAB_CI" in env$1 || "CIRCLECI" in env$1);
|
|
25017
25081
|
|
|
25018
25082
|
const isColorSupported =
|
|
25019
|
-
!isDisabled && (isForced || isWindows || isCompatibleTerminal || isCI);
|
|
25083
|
+
!isDisabled && (isForced || (isWindows && !isDumbTerminal) || isCompatibleTerminal || isCI);
|
|
25020
25084
|
|
|
25021
25085
|
const replaceClose = (
|
|
25022
25086
|
index,
|
|
@@ -25093,13 +25157,11 @@ const colors = {
|
|
|
25093
25157
|
bgWhiteBright: init(107, 49),
|
|
25094
25158
|
};
|
|
25095
25159
|
|
|
25096
|
-
const none = (any) => any;
|
|
25097
|
-
|
|
25098
25160
|
const createColors = ({ useColor = isColorSupported } = {}) =>
|
|
25099
25161
|
useColor
|
|
25100
25162
|
? colors
|
|
25101
25163
|
: Object.keys(colors).reduce(
|
|
25102
|
-
(colors, key) => ({ ...colors, [key]:
|
|
25164
|
+
(colors, key) => ({ ...colors, [key]: String }),
|
|
25103
25165
|
{}
|
|
25104
25166
|
);
|
|
25105
25167
|
|
|
@@ -26590,12 +26652,12 @@ var Drop = /** @class */ (function () {
|
|
|
26590
26652
|
|
|
26591
26653
|
var toString$1 = Object.prototype.toString;
|
|
26592
26654
|
var toLowerCase = String.prototype.toLowerCase;
|
|
26593
|
-
var hasOwnProperty$
|
|
26655
|
+
var hasOwnProperty$2 = Object.hasOwnProperty;
|
|
26594
26656
|
function isString(value) {
|
|
26595
26657
|
return typeof value === 'string';
|
|
26596
26658
|
}
|
|
26597
26659
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
26598
|
-
function isFunction(value) {
|
|
26660
|
+
function isFunction$1(value) {
|
|
26599
26661
|
return typeof value === 'function';
|
|
26600
26662
|
}
|
|
26601
26663
|
function escapeRegex(str) {
|
|
@@ -26614,14 +26676,14 @@ function promisify$2(fn) {
|
|
|
26614
26676
|
});
|
|
26615
26677
|
};
|
|
26616
26678
|
}
|
|
26617
|
-
function stringify$
|
|
26679
|
+
function stringify$5(value) {
|
|
26618
26680
|
value = toValue$1(value);
|
|
26619
26681
|
if (isString(value))
|
|
26620
26682
|
return value;
|
|
26621
26683
|
if (isNil(value))
|
|
26622
26684
|
return '';
|
|
26623
|
-
if (isArray(value))
|
|
26624
|
-
return value.map(function (x) { return stringify$
|
|
26685
|
+
if (isArray$1(value))
|
|
26686
|
+
return value.map(function (x) { return stringify$5(x); }).join('');
|
|
26625
26687
|
return String(value);
|
|
26626
26688
|
}
|
|
26627
26689
|
function toValue$1(value) {
|
|
@@ -26631,14 +26693,14 @@ function isNumber$2(value) {
|
|
|
26631
26693
|
return typeof value === 'number';
|
|
26632
26694
|
}
|
|
26633
26695
|
function toLiquid(value) {
|
|
26634
|
-
if (value && isFunction(value.toLiquid))
|
|
26696
|
+
if (value && isFunction$1(value.toLiquid))
|
|
26635
26697
|
return toLiquid(value.toLiquid());
|
|
26636
26698
|
return value;
|
|
26637
26699
|
}
|
|
26638
26700
|
function isNil(value) {
|
|
26639
26701
|
return value == null;
|
|
26640
26702
|
}
|
|
26641
|
-
function isArray(value) {
|
|
26703
|
+
function isArray$1(value) {
|
|
26642
26704
|
// be compatible with IE 8
|
|
26643
26705
|
return toString$1.call(value) === '[object Array]';
|
|
26644
26706
|
}
|
|
@@ -26653,7 +26715,7 @@ function isArray(value) {
|
|
|
26653
26715
|
function forOwn(obj, iteratee) {
|
|
26654
26716
|
obj = obj || {};
|
|
26655
26717
|
for (var k in obj) {
|
|
26656
|
-
if (hasOwnProperty$
|
|
26718
|
+
if (hasOwnProperty$2.call(obj, k)) {
|
|
26657
26719
|
if (iteratee(obj[k], k, obj) === false)
|
|
26658
26720
|
break;
|
|
26659
26721
|
}
|
|
@@ -26669,7 +26731,7 @@ function last$1(arr) {
|
|
|
26669
26731
|
* @param {any} value The value to check.
|
|
26670
26732
|
* @return {Boolean} Returns true if value is an object, else false.
|
|
26671
26733
|
*/
|
|
26672
|
-
function isObject$
|
|
26734
|
+
function isObject$2(value) {
|
|
26673
26735
|
var type = typeof value;
|
|
26674
26736
|
return value !== null && (type === 'object' || type === 'function');
|
|
26675
26737
|
}
|
|
@@ -26877,7 +26939,7 @@ var fs$a = /*#__PURE__*/Object.freeze({
|
|
|
26877
26939
|
});
|
|
26878
26940
|
|
|
26879
26941
|
function isComparable(arg) {
|
|
26880
|
-
return arg && isFunction(arg.equals);
|
|
26942
|
+
return arg && isFunction$1(arg.equals);
|
|
26881
26943
|
}
|
|
26882
26944
|
|
|
26883
26945
|
function isTruthy(val, ctx) {
|
|
@@ -26938,7 +27000,7 @@ var defaultOperators = {
|
|
|
26938
27000
|
'contains': function (l, r) {
|
|
26939
27001
|
l = toValue$1(l);
|
|
26940
27002
|
r = toValue$1(r);
|
|
26941
|
-
return l && isFunction(l.indexOf) ? l.indexOf(r) > -1 : false;
|
|
27003
|
+
return l && isFunction$1(l.indexOf) ? l.indexOf(r) > -1 : false;
|
|
26942
27004
|
},
|
|
26943
27005
|
'and': function (l, r, ctx) { return isTruthy(l, ctx) && isTruthy(r, ctx); },
|
|
26944
27006
|
'or': function (l, r, ctx) { return isTruthy(l, ctx) || isTruthy(r, ctx); }
|
|
@@ -27001,19 +27063,19 @@ var unescapeMap = {
|
|
|
27001
27063
|
''': "'"
|
|
27002
27064
|
};
|
|
27003
27065
|
function escape(str) {
|
|
27004
|
-
return stringify$
|
|
27066
|
+
return stringify$5(str).replace(/&|<|>|"|'/g, function (m) { return escapeMap[m]; });
|
|
27005
27067
|
}
|
|
27006
27068
|
function unescape$1(str) {
|
|
27007
|
-
return stringify$
|
|
27069
|
+
return stringify$5(str).replace(/&(amp|lt|gt|#34|#39);/g, function (m) { return unescapeMap[m]; });
|
|
27008
27070
|
}
|
|
27009
27071
|
function escapeOnce(str) {
|
|
27010
|
-
return escape(unescape$1(stringify$
|
|
27072
|
+
return escape(unescape$1(stringify$5(str)));
|
|
27011
27073
|
}
|
|
27012
27074
|
function newlineToBr(v) {
|
|
27013
|
-
return stringify$
|
|
27075
|
+
return stringify$5(v).replace(/\n/g, '<br />\n');
|
|
27014
27076
|
}
|
|
27015
27077
|
function stripHtml(v) {
|
|
27016
|
-
return stringify$
|
|
27078
|
+
return stringify$5(v).replace(/<script.*?<\/script>|<!--.*?-->|<style.*?<\/style>|<.*?>/g, '');
|
|
27017
27079
|
}
|
|
27018
27080
|
|
|
27019
27081
|
var abs = argumentsToValue(Math.abs);
|
|
@@ -27041,34 +27103,34 @@ function plus(v, arg) {
|
|
|
27041
27103
|
return Number(v) + Number(arg);
|
|
27042
27104
|
}
|
|
27043
27105
|
|
|
27044
|
-
var urlDecode = function (x) { return stringify$
|
|
27045
|
-
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('+'); };
|
|
27046
27108
|
|
|
27047
27109
|
function toEnumerable(val) {
|
|
27048
|
-
if (isArray(val))
|
|
27110
|
+
if (isArray$1(val))
|
|
27049
27111
|
return val;
|
|
27050
27112
|
if (isString(val) && val.length > 0)
|
|
27051
27113
|
return [val];
|
|
27052
|
-
if (isObject$
|
|
27114
|
+
if (isObject$2(val))
|
|
27053
27115
|
return Object.keys(val).map(function (key) { return [key, val[key]]; });
|
|
27054
27116
|
return [];
|
|
27055
27117
|
}
|
|
27056
27118
|
function toArray$1(val) {
|
|
27057
27119
|
if (isNil(val))
|
|
27058
27120
|
return [];
|
|
27059
|
-
if (isArray(val))
|
|
27121
|
+
if (isArray$1(val))
|
|
27060
27122
|
return val;
|
|
27061
27123
|
return [val];
|
|
27062
27124
|
}
|
|
27063
27125
|
|
|
27064
27126
|
var join$2 = argumentsToValue(function (v, arg) { return toArray$1(v).join(arg === undefined ? ' ' : arg); });
|
|
27065
|
-
var last$2 = argumentsToValue(function (v) { return isArray(v) ? last$1(v) : ''; });
|
|
27066
|
-
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] : ''; });
|
|
27067
27129
|
var reverse = argumentsToValue(function (v) { return __spreadArray([], __read(toArray$1(v)), false).reverse(); });
|
|
27068
27130
|
function sort$1(arr, property) {
|
|
27069
27131
|
var _this = this;
|
|
27070
27132
|
arr = toValue$1(arr);
|
|
27071
|
-
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; };
|
|
27072
27134
|
return __spreadArray([], __read(toArray$1(arr)), false).sort(function (lhs, rhs) {
|
|
27073
27135
|
lhs = getValue(lhs);
|
|
27074
27136
|
rhs = getValue(rhs);
|
|
@@ -27077,7 +27139,7 @@ function sort$1(arr, property) {
|
|
|
27077
27139
|
}
|
|
27078
27140
|
function sortNatural(input, property) {
|
|
27079
27141
|
input = toValue$1(input);
|
|
27080
|
-
var propertyString = stringify$
|
|
27142
|
+
var propertyString = stringify$5(property);
|
|
27081
27143
|
var compare = property === undefined
|
|
27082
27144
|
? caseInsensitiveCompare
|
|
27083
27145
|
: function (lhs, rhs) { return caseInsensitiveCompare(lhs[propertyString], rhs[propertyString]); };
|
|
@@ -27087,7 +27149,7 @@ var size = function (v) { return (v && v.length) || 0; };
|
|
|
27087
27149
|
function map$1(arr, property) {
|
|
27088
27150
|
var _this = this;
|
|
27089
27151
|
arr = toValue$1(arr);
|
|
27090
|
-
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('.')); });
|
|
27091
27153
|
}
|
|
27092
27154
|
function compact(arr) {
|
|
27093
27155
|
arr = toValue$1(arr);
|
|
@@ -27104,8 +27166,8 @@ function slice(v, begin, length) {
|
|
|
27104
27166
|
v = toValue$1(v);
|
|
27105
27167
|
if (isNil(v))
|
|
27106
27168
|
return [];
|
|
27107
|
-
if (!isArray(v))
|
|
27108
|
-
v = stringify$
|
|
27169
|
+
if (!isArray$1(v))
|
|
27170
|
+
v = stringify$5(v);
|
|
27109
27171
|
begin = begin < 0 ? v.length + begin : begin;
|
|
27110
27172
|
return v.slice(begin, begin + length);
|
|
27111
27173
|
}
|
|
@@ -27113,7 +27175,7 @@ function where(arr, property, expected) {
|
|
|
27113
27175
|
var _this = this;
|
|
27114
27176
|
arr = toValue$1(arr);
|
|
27115
27177
|
return toArray$1(arr).filter(function (obj) {
|
|
27116
|
-
var value = _this.context.getFromScope(obj, stringify$
|
|
27178
|
+
var value = _this.context.getFromScope(obj, stringify$5(property).split('.'));
|
|
27117
27179
|
if (expected === undefined)
|
|
27118
27180
|
return isTruthy(value, _this.context);
|
|
27119
27181
|
if (isComparable(expected))
|
|
@@ -27125,7 +27187,7 @@ function uniq(arr) {
|
|
|
27125
27187
|
arr = toValue$1(arr);
|
|
27126
27188
|
var u = {};
|
|
27127
27189
|
return (arr || []).filter(function (val) {
|
|
27128
|
-
if (hasOwnProperty$
|
|
27190
|
+
if (hasOwnProperty$2.call(u, String(val)))
|
|
27129
27191
|
return false;
|
|
27130
27192
|
u[String(val)] = true;
|
|
27131
27193
|
return true;
|
|
@@ -27402,7 +27464,7 @@ function date(v, arg) {
|
|
|
27402
27464
|
var opts = this.context.opts;
|
|
27403
27465
|
var date;
|
|
27404
27466
|
v = toValue$1(v);
|
|
27405
|
-
arg = stringify$
|
|
27467
|
+
arg = stringify$5(arg);
|
|
27406
27468
|
if (v === 'now' || v === 'today') {
|
|
27407
27469
|
date = new Date();
|
|
27408
27470
|
}
|
|
@@ -27440,7 +27502,7 @@ function Default(value, defaultValue) {
|
|
|
27440
27502
|
args[_i - 2] = arguments[_i];
|
|
27441
27503
|
}
|
|
27442
27504
|
value = toValue$1(value);
|
|
27443
|
-
if (isArray(value) || isString(value))
|
|
27505
|
+
if (isArray$1(value) || isString(value))
|
|
27444
27506
|
return value.length ? value : defaultValue;
|
|
27445
27507
|
if (value === false && (new Map(args)).get('allow_false'))
|
|
27446
27508
|
return false;
|
|
@@ -27576,40 +27638,40 @@ function assert(predicate, message) {
|
|
|
27576
27638
|
*/
|
|
27577
27639
|
function append$1(v, arg) {
|
|
27578
27640
|
assert(arguments.length === 2, 'append expect 2 arguments');
|
|
27579
|
-
return stringify$
|
|
27641
|
+
return stringify$5(v) + stringify$5(arg);
|
|
27580
27642
|
}
|
|
27581
27643
|
function prepend(v, arg) {
|
|
27582
27644
|
assert(arguments.length === 2, 'prepend expect 2 arguments');
|
|
27583
|
-
return stringify$
|
|
27645
|
+
return stringify$5(arg) + stringify$5(v);
|
|
27584
27646
|
}
|
|
27585
27647
|
function lstrip(v, chars) {
|
|
27586
27648
|
if (chars) {
|
|
27587
|
-
chars = escapeRegExp(stringify$
|
|
27588
|
-
return stringify$
|
|
27649
|
+
chars = escapeRegExp(stringify$5(chars));
|
|
27650
|
+
return stringify$5(v).replace(new RegExp("^[".concat(chars, "]+"), 'g'), '');
|
|
27589
27651
|
}
|
|
27590
|
-
return stringify$
|
|
27652
|
+
return stringify$5(v).replace(/^\s+/, '');
|
|
27591
27653
|
}
|
|
27592
27654
|
function downcase(v) {
|
|
27593
|
-
return stringify$
|
|
27655
|
+
return stringify$5(v).toLowerCase();
|
|
27594
27656
|
}
|
|
27595
27657
|
function upcase(str) {
|
|
27596
|
-
return stringify$
|
|
27658
|
+
return stringify$5(str).toUpperCase();
|
|
27597
27659
|
}
|
|
27598
27660
|
function remove$3(v, arg) {
|
|
27599
|
-
return stringify$
|
|
27661
|
+
return stringify$5(v).split(String(arg)).join('');
|
|
27600
27662
|
}
|
|
27601
27663
|
function removeFirst(v, l) {
|
|
27602
|
-
return stringify$
|
|
27664
|
+
return stringify$5(v).replace(String(l), '');
|
|
27603
27665
|
}
|
|
27604
27666
|
function rstrip(str, chars) {
|
|
27605
27667
|
if (chars) {
|
|
27606
|
-
chars = escapeRegExp(stringify$
|
|
27607
|
-
return stringify$
|
|
27668
|
+
chars = escapeRegExp(stringify$5(chars));
|
|
27669
|
+
return stringify$5(str).replace(new RegExp("[".concat(chars, "]+$"), 'g'), '');
|
|
27608
27670
|
}
|
|
27609
|
-
return stringify$
|
|
27671
|
+
return stringify$5(str).replace(/\s+$/, '');
|
|
27610
27672
|
}
|
|
27611
27673
|
function split(v, arg) {
|
|
27612
|
-
var arr = stringify$
|
|
27674
|
+
var arr = stringify$5(v).split(String(arg));
|
|
27613
27675
|
// align to ruby split, which is the behavior of shopify/liquid
|
|
27614
27676
|
// see: https://ruby-doc.org/core-2.4.0/String.html#method-i-split
|
|
27615
27677
|
while (arr.length && arr[arr.length - 1] === '')
|
|
@@ -27618,30 +27680,30 @@ function split(v, arg) {
|
|
|
27618
27680
|
}
|
|
27619
27681
|
function strip(v, chars) {
|
|
27620
27682
|
if (chars) {
|
|
27621
|
-
chars = escapeRegExp(stringify$
|
|
27622
|
-
return stringify$
|
|
27683
|
+
chars = escapeRegExp(stringify$5(chars));
|
|
27684
|
+
return stringify$5(v)
|
|
27623
27685
|
.replace(new RegExp("^[".concat(chars, "]+"), 'g'), '')
|
|
27624
27686
|
.replace(new RegExp("[".concat(chars, "]+$"), 'g'), '');
|
|
27625
27687
|
}
|
|
27626
|
-
return stringify$
|
|
27688
|
+
return stringify$5(v).trim();
|
|
27627
27689
|
}
|
|
27628
27690
|
function stripNewlines(v) {
|
|
27629
|
-
return stringify$
|
|
27691
|
+
return stringify$5(v).replace(/\n/g, '');
|
|
27630
27692
|
}
|
|
27631
27693
|
function capitalize$1(str) {
|
|
27632
|
-
str = stringify$
|
|
27694
|
+
str = stringify$5(str);
|
|
27633
27695
|
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
|
|
27634
27696
|
}
|
|
27635
27697
|
function replace$1(v, pattern, replacement) {
|
|
27636
|
-
return stringify$
|
|
27698
|
+
return stringify$5(v).split(String(pattern)).join(replacement);
|
|
27637
27699
|
}
|
|
27638
27700
|
function replaceFirst(v, arg1, arg2) {
|
|
27639
|
-
return stringify$
|
|
27701
|
+
return stringify$5(v).replace(String(arg1), arg2);
|
|
27640
27702
|
}
|
|
27641
27703
|
function truncate(v, l, o) {
|
|
27642
27704
|
if (l === void 0) { l = 50; }
|
|
27643
27705
|
if (o === void 0) { o = '...'; }
|
|
27644
|
-
v = stringify$
|
|
27706
|
+
v = stringify$5(v);
|
|
27645
27707
|
if (v.length <= l)
|
|
27646
27708
|
return v;
|
|
27647
27709
|
return v.substring(0, l - o.length) + o;
|
|
@@ -27649,7 +27711,7 @@ function truncate(v, l, o) {
|
|
|
27649
27711
|
function truncatewords(v, l, o) {
|
|
27650
27712
|
if (l === void 0) { l = 15; }
|
|
27651
27713
|
if (o === void 0) { o = '...'; }
|
|
27652
|
-
var arr = stringify$
|
|
27714
|
+
var arr = stringify$5(v).split(/\s+/);
|
|
27653
27715
|
var ret = arr.slice(0, l).join(' ');
|
|
27654
27716
|
if (arr.length >= l)
|
|
27655
27717
|
ret += o;
|
|
@@ -27799,9 +27861,9 @@ var EmptyDrop = /** @class */ (function (_super) {
|
|
|
27799
27861
|
if (value instanceof EmptyDrop)
|
|
27800
27862
|
return false;
|
|
27801
27863
|
value = toValue$1(value);
|
|
27802
|
-
if (isString(value) || isArray(value))
|
|
27864
|
+
if (isString(value) || isArray$1(value))
|
|
27803
27865
|
return value.length === 0;
|
|
27804
|
-
if (isObject$
|
|
27866
|
+
if (isObject$2(value))
|
|
27805
27867
|
return Object.keys(value).length === 0;
|
|
27806
27868
|
return false;
|
|
27807
27869
|
};
|
|
@@ -28897,7 +28959,7 @@ var Hash = /** @class */ (function () {
|
|
|
28897
28959
|
}());
|
|
28898
28960
|
|
|
28899
28961
|
function isKeyValuePair(arr) {
|
|
28900
|
-
return isArray(arr);
|
|
28962
|
+
return isArray$1(arr);
|
|
28901
28963
|
}
|
|
28902
28964
|
|
|
28903
28965
|
var Filter = /** @class */ (function () {
|
|
@@ -29006,10 +29068,10 @@ function createRejectedThenable(err) {
|
|
|
29006
29068
|
return ret;
|
|
29007
29069
|
}
|
|
29008
29070
|
function isThenable(val) {
|
|
29009
|
-
return val && isFunction(val.then);
|
|
29071
|
+
return val && isFunction$1(val.then);
|
|
29010
29072
|
}
|
|
29011
29073
|
function isAsyncIterator(val) {
|
|
29012
|
-
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);
|
|
29013
29075
|
}
|
|
29014
29076
|
// convert an async iterator to a thenable (Promise compatible)
|
|
29015
29077
|
function toThenable(val) {
|
|
@@ -29589,7 +29651,7 @@ var decrement = {
|
|
|
29589
29651
|
if (!isNumber$2(scope[this.variable])) {
|
|
29590
29652
|
scope[this.variable] = 0;
|
|
29591
29653
|
}
|
|
29592
|
-
emitter.write(stringify$
|
|
29654
|
+
emitter.write(stringify$5(--scope[this.variable]));
|
|
29593
29655
|
}
|
|
29594
29656
|
};
|
|
29595
29657
|
|
|
@@ -29710,7 +29772,7 @@ var increment = {
|
|
|
29710
29772
|
}
|
|
29711
29773
|
var val = scope[this.variable];
|
|
29712
29774
|
scope[this.variable]++;
|
|
29713
|
-
emitter.write(stringify$
|
|
29775
|
+
emitter.write(stringify$5(val));
|
|
29714
29776
|
}
|
|
29715
29777
|
};
|
|
29716
29778
|
|
|
@@ -30170,17 +30232,17 @@ function normalize$1(options) {
|
|
|
30170
30232
|
function getOutputEscapeFunction(nameOrFunction) {
|
|
30171
30233
|
if (isString(nameOrFunction)) {
|
|
30172
30234
|
var filterImpl = filters.get(nameOrFunction);
|
|
30173
|
-
assert(isFunction(filterImpl), "filter \"".concat(nameOrFunction, "\" not found"));
|
|
30235
|
+
assert(isFunction$1(filterImpl), "filter \"".concat(nameOrFunction, "\" not found"));
|
|
30174
30236
|
return filterImpl;
|
|
30175
30237
|
}
|
|
30176
30238
|
else {
|
|
30177
|
-
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');
|
|
30178
30240
|
return nameOrFunction;
|
|
30179
30241
|
}
|
|
30180
30242
|
}
|
|
30181
30243
|
function normalizeDirectoryList(value) {
|
|
30182
30244
|
var list = [];
|
|
30183
|
-
if (isArray(value))
|
|
30245
|
+
if (isArray$1(value))
|
|
30184
30246
|
list = value;
|
|
30185
30247
|
if (isString(value))
|
|
30186
30248
|
list = [value];
|
|
@@ -30270,12 +30332,12 @@ function readProperty(obj, key, ownPropertyOnly) {
|
|
|
30270
30332
|
if (isNil(obj))
|
|
30271
30333
|
return obj;
|
|
30272
30334
|
obj = toLiquid(obj);
|
|
30273
|
-
if (isArray(obj) && key < 0)
|
|
30335
|
+
if (isArray$1(obj) && key < 0)
|
|
30274
30336
|
return obj[obj.length + +key];
|
|
30275
30337
|
var jsProperty = readJSProperty(obj, key, ownPropertyOnly);
|
|
30276
30338
|
if (jsProperty === undefined && obj instanceof Drop)
|
|
30277
30339
|
return obj.liquidMethodMissing(key);
|
|
30278
|
-
if (isFunction(jsProperty))
|
|
30340
|
+
if (isFunction$1(jsProperty))
|
|
30279
30341
|
return jsProperty.call(obj);
|
|
30280
30342
|
if (key === 'size')
|
|
30281
30343
|
return readSize(obj);
|
|
@@ -30291,19 +30353,19 @@ function readJSProperty(obj, key, ownPropertyOnly) {
|
|
|
30291
30353
|
return obj[key];
|
|
30292
30354
|
}
|
|
30293
30355
|
function readFirst(obj) {
|
|
30294
|
-
if (isArray(obj))
|
|
30356
|
+
if (isArray$1(obj))
|
|
30295
30357
|
return obj[0];
|
|
30296
30358
|
return obj['first'];
|
|
30297
30359
|
}
|
|
30298
30360
|
function readLast(obj) {
|
|
30299
|
-
if (isArray(obj))
|
|
30361
|
+
if (isArray$1(obj))
|
|
30300
30362
|
return obj[obj.length - 1];
|
|
30301
30363
|
return obj['last'];
|
|
30302
30364
|
}
|
|
30303
30365
|
function readSize(obj) {
|
|
30304
30366
|
if (obj.hasOwnProperty('size') || obj['size'] !== undefined)
|
|
30305
30367
|
return obj['size'];
|
|
30306
|
-
if (isArray(obj) || isString(obj))
|
|
30368
|
+
if (isArray$1(obj) || isString(obj))
|
|
30307
30369
|
return obj.length;
|
|
30308
30370
|
if (typeof obj === 'object')
|
|
30309
30371
|
return Object.keys(obj).length;
|
|
@@ -30470,7 +30532,7 @@ var SimpleEmitter = /** @class */ (function () {
|
|
|
30470
30532
|
this.buffer = '';
|
|
30471
30533
|
}
|
|
30472
30534
|
SimpleEmitter.prototype.write = function (html) {
|
|
30473
|
-
this.buffer += stringify$
|
|
30535
|
+
this.buffer += stringify$5(html);
|
|
30474
30536
|
};
|
|
30475
30537
|
return SimpleEmitter;
|
|
30476
30538
|
}());
|
|
@@ -30481,7 +30543,7 @@ var StreamedEmitter = /** @class */ (function () {
|
|
|
30481
30543
|
this.stream = new PassThrough$6();
|
|
30482
30544
|
}
|
|
30483
30545
|
StreamedEmitter.prototype.write = function (html) {
|
|
30484
|
-
this.stream.write(stringify$
|
|
30546
|
+
this.stream.write(stringify$5(html));
|
|
30485
30547
|
};
|
|
30486
30548
|
StreamedEmitter.prototype.error = function (err) {
|
|
30487
30549
|
this.stream.emit('error', err);
|
|
@@ -30506,7 +30568,7 @@ var KeepingTypeEmitter = /** @class */ (function () {
|
|
|
30506
30568
|
this.buffer = html;
|
|
30507
30569
|
}
|
|
30508
30570
|
else {
|
|
30509
|
-
this.buffer = stringify$
|
|
30571
|
+
this.buffer = stringify$5(this.buffer) + stringify$5(html);
|
|
30510
30572
|
}
|
|
30511
30573
|
};
|
|
30512
30574
|
return KeepingTypeEmitter;
|
|
@@ -30605,7 +30667,7 @@ var Tag = /** @class */ (function (_super) {
|
|
|
30605
30667
|
case 1:
|
|
30606
30668
|
hash = (_a.sent());
|
|
30607
30669
|
impl = this.impl;
|
|
30608
|
-
if (!isFunction(impl.render)) return [3 /*break*/, 3];
|
|
30670
|
+
if (!isFunction$1(impl.render)) return [3 /*break*/, 3];
|
|
30609
30671
|
return [4 /*yield*/, impl.render(ctx, emitter, hash)];
|
|
30610
30672
|
case 2: return [2 /*return*/, _a.sent()];
|
|
30611
30673
|
case 3: return [2 /*return*/];
|
|
@@ -32332,14 +32394,14 @@ function splitOn(input, char) {
|
|
|
32332
32394
|
];
|
|
32333
32395
|
}
|
|
32334
32396
|
function first(input, offset = 0) {
|
|
32335
|
-
return isArrayLike(input) && input.length > offset ? input[offset] : void 0;
|
|
32397
|
+
return isArrayLike$1(input) && input.length > offset ? input[offset] : void 0;
|
|
32336
32398
|
}
|
|
32337
32399
|
function last(input, offset = 0) {
|
|
32338
|
-
if (isArrayLike(input) && input.length > offset) {
|
|
32400
|
+
if (isArrayLike$1(input) && input.length > offset) {
|
|
32339
32401
|
return input[input.length - 1 - offset];
|
|
32340
32402
|
}
|
|
32341
32403
|
}
|
|
32342
|
-
function isArrayLike(input) {
|
|
32404
|
+
function isArrayLike$1(input) {
|
|
32343
32405
|
return !!(input && typeof input.length === "number");
|
|
32344
32406
|
}
|
|
32345
32407
|
function toLinesWithContent(input = "", trimmed2 = true, separator = "\n") {
|
|
@@ -32413,13 +32475,13 @@ function pick(source, properties) {
|
|
|
32413
32475
|
function delay(duration = 0) {
|
|
32414
32476
|
return new Promise((done) => setTimeout(done, duration));
|
|
32415
32477
|
}
|
|
32416
|
-
var NULL, NOOP$1, objectToString;
|
|
32478
|
+
var NULL, NOOP$1, objectToString$1;
|
|
32417
32479
|
var init_util = __esm({
|
|
32418
32480
|
"src/lib/utils/util.ts"() {
|
|
32419
32481
|
NULL = "\0";
|
|
32420
32482
|
NOOP$1 = () => {
|
|
32421
32483
|
};
|
|
32422
|
-
objectToString = Object.prototype.toString.call.bind(Object.prototype.toString);
|
|
32484
|
+
objectToString$1 = Object.prototype.toString.call.bind(Object.prototype.toString);
|
|
32423
32485
|
}
|
|
32424
32486
|
});
|
|
32425
32487
|
|
|
@@ -32434,7 +32496,7 @@ function filterPrimitives(input, omit) {
|
|
|
32434
32496
|
return /number|string|boolean/.test(typeof input) && (!omit || !omit.includes(typeof input));
|
|
32435
32497
|
}
|
|
32436
32498
|
function filterPlainObject(input) {
|
|
32437
|
-
return !!input && objectToString(input) === "[object Object]";
|
|
32499
|
+
return !!input && objectToString$1(input) === "[object Object]";
|
|
32438
32500
|
}
|
|
32439
32501
|
function filterFunction(input) {
|
|
32440
32502
|
return typeof input === "function";
|
|
@@ -32669,7 +32731,7 @@ __export(utils_exports, {
|
|
|
32669
32731
|
including: () => including,
|
|
32670
32732
|
isUserFunction: () => isUserFunction,
|
|
32671
32733
|
last: () => last,
|
|
32672
|
-
objectToString: () => objectToString,
|
|
32734
|
+
objectToString: () => objectToString$1,
|
|
32673
32735
|
parseStringResponse: () => parseStringResponse,
|
|
32674
32736
|
pick: () => pick,
|
|
32675
32737
|
prefixedArray: () => prefixedArray,
|
|
@@ -33274,7 +33336,7 @@ var init_git_logger = __esm({
|
|
|
33274
33336
|
if (Buffer.isBuffer(value)) {
|
|
33275
33337
|
return value.toString("utf8");
|
|
33276
33338
|
}
|
|
33277
|
-
return objectToString(value);
|
|
33339
|
+
return objectToString$1(value);
|
|
33278
33340
|
};
|
|
33279
33341
|
}
|
|
33280
33342
|
});
|
|
@@ -33448,7 +33510,7 @@ var init_git_executor_chain = __esm({
|
|
|
33448
33510
|
logger.info(`exitCode=%s handling with custom error handler`);
|
|
33449
33511
|
return task.onError(result, error, (newStdOut) => {
|
|
33450
33512
|
logger.info(`custom error handler treated as success`);
|
|
33451
|
-
logger(`custom error returned a %s`, objectToString(newStdOut));
|
|
33513
|
+
logger(`custom error returned a %s`, objectToString$1(newStdOut));
|
|
33452
33514
|
done(new GitOutputStreams(Array.isArray(newStdOut) ? Buffer.concat(newStdOut) : newStdOut, Buffer.concat(stdErr)));
|
|
33453
33515
|
}, fail);
|
|
33454
33516
|
}
|
|
@@ -35689,7 +35751,7 @@ function isTaskError(result) {
|
|
|
35689
35751
|
function getErrorMessage(result) {
|
|
35690
35752
|
return Buffer.concat([...result.stdOut, ...result.stdErr]);
|
|
35691
35753
|
}
|
|
35692
|
-
function errorDetectionHandler(overwrite, isError = isTaskError, errorMessage = getErrorMessage) {
|
|
35754
|
+
function errorDetectionHandler(overwrite = false, isError = isTaskError, errorMessage = getErrorMessage) {
|
|
35693
35755
|
return (error, result) => {
|
|
35694
35756
|
if (!overwrite && error || !isError(result)) {
|
|
35695
35757
|
return error;
|
|
@@ -35857,6 +35919,9 @@ init_git_response_error();
|
|
|
35857
35919
|
var esm_default = gitInstanceFactory;
|
|
35858
35920
|
|
|
35859
35921
|
const factory = esm_default;
|
|
35922
|
+
async function initializeRepository(directory) {
|
|
35923
|
+
await esm_default(directory).init();
|
|
35924
|
+
}
|
|
35860
35925
|
async function downloadRepository({ repoUrl, destination }) {
|
|
35861
35926
|
const [repository, branch] = repoUrl.split("#");
|
|
35862
35927
|
const options = { "--recurse-submodules": null };
|
|
@@ -35873,6 +35938,7 @@ async function downloadRepository({ repoUrl, destination }) {
|
|
|
35873
35938
|
var git = /*#__PURE__*/Object.freeze({
|
|
35874
35939
|
__proto__: null,
|
|
35875
35940
|
factory: factory,
|
|
35941
|
+
initializeRepository: initializeRepository,
|
|
35876
35942
|
downloadRepository: downloadRepository
|
|
35877
35943
|
});
|
|
35878
35944
|
|
|
@@ -40202,7 +40268,7 @@ try {
|
|
|
40202
40268
|
const POOL_SIZE = 65536;
|
|
40203
40269
|
|
|
40204
40270
|
/** @param {(Blob | Uint8Array)[]} parts */
|
|
40205
|
-
async function * toIterator (parts, clone) {
|
|
40271
|
+
async function * toIterator (parts, clone = true) {
|
|
40206
40272
|
for (const part of parts) {
|
|
40207
40273
|
if ('stream' in part) {
|
|
40208
40274
|
yield * (/** @type {AsyncIterableIterator<Uint8Array>} */ (part.stream()));
|
|
@@ -40744,7 +40810,7 @@ class Body$1 {
|
|
|
40744
40810
|
return formData;
|
|
40745
40811
|
}
|
|
40746
40812
|
|
|
40747
|
-
const {toFormData} = await import('./multipart-parser-
|
|
40813
|
+
const {toFormData} = await import('./multipart-parser-ab287634.js');
|
|
40748
40814
|
return toFormData(this.body, ct);
|
|
40749
40815
|
}
|
|
40750
40816
|
|
|
@@ -41923,7 +41989,7 @@ class Request$1 extends Body$1 {
|
|
|
41923
41989
|
|
|
41924
41990
|
/** @returns {string} */
|
|
41925
41991
|
get url() {
|
|
41926
|
-
return format$
|
|
41992
|
+
return format$6(this[INTERNALS$3].parsedURL);
|
|
41927
41993
|
}
|
|
41928
41994
|
|
|
41929
41995
|
/** @returns {Headers} */
|
|
@@ -42053,7 +42119,7 @@ const getNodeRequestOptions$1 = request => {
|
|
|
42053
42119
|
|
|
42054
42120
|
// HTTP-network-or-cache fetch step 2.15
|
|
42055
42121
|
if (request.compress && !headers.has('Accept-Encoding')) {
|
|
42056
|
-
headers.set('Accept-Encoding', 'gzip,deflate,br');
|
|
42122
|
+
headers.set('Accept-Encoding', 'gzip, deflate, br');
|
|
42057
42123
|
}
|
|
42058
42124
|
|
|
42059
42125
|
let {agent} = request;
|
|
@@ -42472,13 +42538,7 @@ function fixResponseChunkedTransferBadEnding(request, errorCallback) {
|
|
|
42472
42538
|
}
|
|
42473
42539
|
};
|
|
42474
42540
|
|
|
42475
|
-
|
|
42476
|
-
|
|
42477
|
-
request.on('abort', () => {
|
|
42478
|
-
socket.removeListener('close', onSocketClose);
|
|
42479
|
-
});
|
|
42480
|
-
|
|
42481
|
-
socket.on('data', buf => {
|
|
42541
|
+
const onData = buf => {
|
|
42482
42542
|
properLastChunkReceived = Buffer$1.compare(buf.slice(-5), LAST_CHUNK) === 0;
|
|
42483
42543
|
|
|
42484
42544
|
// Sometimes final 0-length chunk and end of message code are in separate packets
|
|
@@ -42490,6 +42550,14 @@ function fixResponseChunkedTransferBadEnding(request, errorCallback) {
|
|
|
42490
42550
|
}
|
|
42491
42551
|
|
|
42492
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);
|
|
42493
42561
|
});
|
|
42494
42562
|
});
|
|
42495
42563
|
}
|
|
@@ -54673,147 +54741,1062 @@ var github = /*#__PURE__*/Object.freeze({
|
|
|
54673
54741
|
parseRepoUrl: parseRepoUrl
|
|
54674
54742
|
});
|
|
54675
54743
|
|
|
54676
|
-
|
|
54677
|
-
|
|
54678
|
-
|
|
54679
|
-
|
|
54680
|
-
function
|
|
54681
|
-
|
|
54682
|
-
|
|
54683
|
-
|
|
54684
|
-
|
|
54685
|
-
|
|
54686
|
-
|
|
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)
|
|
54687
54774
|
}
|
|
54688
54775
|
}
|
|
54689
|
-
|
|
54690
|
-
|
|
54691
|
-
|
|
54692
|
-
|
|
54693
|
-
|
|
54694
|
-
|
|
54695
|
-
|
|
54696
|
-
|
|
54697
|
-
|
|
54698
|
-
|
|
54699
|
-
|
|
54700
|
-
|
|
54701
|
-
|
|
54702
|
-
|
|
54703
|
-
|
|
54704
|
-
|
|
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]);
|
|
54705
55044
|
}
|
|
55045
|
+
return func.apply(thisArg, args);
|
|
54706
55046
|
}
|
|
54707
|
-
|
|
54708
|
-
|
|
54709
|
-
|
|
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;
|
|
54710
55065
|
}
|
|
54711
|
-
|
|
54712
|
-
|
|
54713
|
-
|
|
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;
|
|
54714
55111
|
}
|
|
54715
|
-
|
|
54716
|
-
|
|
54717
|
-
|
|
54718
|
-
|
|
54719
|
-
|
|
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;
|
|
54720
55129
|
}
|
|
54721
|
-
|
|
54722
|
-
|
|
54723
|
-
|
|
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;
|
|
54724
55146
|
}
|
|
54725
|
-
return JSON.parse(await read$1(packageJsonPath));
|
|
54726
55147
|
}
|
|
54727
|
-
|
|
54728
|
-
|
|
54729
|
-
|
|
54730
|
-
|
|
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);
|
|
54731
55159
|
}
|
|
54732
|
-
|
|
54733
|
-
|
|
54734
|
-
|
|
54735
|
-
|
|
54736
|
-
|
|
54737
|
-
|
|
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
|
+
}
|
|
54738
55167
|
}
|
|
54739
|
-
|
|
54740
|
-
|
|
54741
|
-
|
|
54742
|
-
|
|
54743
|
-
|
|
54744
|
-
|
|
54745
|
-
|
|
54746
|
-
|
|
54747
|
-
|
|
54748
|
-
|
|
54749
|
-
|
|
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);
|
|
54750
55224
|
}
|
|
54751
|
-
|
|
54752
|
-
|
|
54753
|
-
|
|
54754
|
-
|
|
54755
|
-
|
|
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;
|
|
54756
55258
|
});
|
|
54757
55259
|
}
|
|
54758
|
-
|
|
54759
|
-
|
|
54760
|
-
|
|
54761
|
-
|
|
54762
|
-
|
|
54763
|
-
|
|
54764
|
-
|
|
54765
|
-
|
|
54766
|
-
|
|
54767
|
-
|
|
54768
|
-
|
|
54769
|
-
|
|
54770
|
-
|
|
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;
|
|
54771
55289
|
}
|
|
54772
|
-
|
|
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;
|
|
54773
55298
|
}
|
|
54774
|
-
|
|
54775
|
-
|
|
54776
|
-
|
|
54777
|
-
|
|
54778
|
-
|
|
54779
|
-
|
|
54780
|
-
|
|
54781
|
-
|
|
54782
|
-
|
|
54783
|
-
|
|
54784
|
-
|
|
54785
|
-
|
|
54786
|
-
|
|
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
|
+
}
|
|
54787
55329
|
}
|
|
54788
|
-
return
|
|
55330
|
+
return result;
|
|
54789
55331
|
}
|
|
54790
|
-
|
|
54791
|
-
|
|
54792
|
-
|
|
54793
|
-
|
|
54794
|
-
|
|
54795
|
-
|
|
54796
|
-
|
|
54797
|
-
|
|
54798
|
-
|
|
54799
|
-
|
|
54800
|
-
|
|
54801
|
-
|
|
54802
|
-
|
|
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);
|
|
54803
55730
|
}
|
|
54804
|
-
|
|
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("-");
|
|
54805
55795
|
}
|
|
54806
55796
|
|
|
54807
|
-
var
|
|
55797
|
+
var haiku = /*#__PURE__*/Object.freeze({
|
|
54808
55798
|
__proto__: null,
|
|
54809
|
-
|
|
54810
|
-
PackageJsonNotFoundError: PackageJsonNotFoundError,
|
|
54811
|
-
dependencyManagerUsedForCreating: dependencyManagerUsedForCreating,
|
|
54812
|
-
installNPMDependenciesRecursively: installNPMDependenciesRecursively,
|
|
54813
|
-
install: install,
|
|
54814
|
-
getPackageName: getPackageName,
|
|
54815
|
-
getDependencies: getDependencies,
|
|
54816
|
-
addNPMDependenciesIfNeeded: addNPMDependenciesIfNeeded
|
|
55799
|
+
generate: generate
|
|
54817
55800
|
});
|
|
54818
55801
|
|
|
54819
55802
|
var packageJson$2 = {exports: {}};
|
|
@@ -57476,6 +58459,7 @@ const compressBrotli = src$2.exports;
|
|
|
57476
58459
|
const loadStore = options => {
|
|
57477
58460
|
const adapters = {
|
|
57478
58461
|
redis: '@keyv/redis',
|
|
58462
|
+
rediss: '@keyv/redis',
|
|
57479
58463
|
mongodb: '@keyv/mongo',
|
|
57480
58464
|
mongo: '@keyv/mongo',
|
|
57481
58465
|
sqlite: '@keyv/sqlite',
|
|
@@ -57483,9 +58467,11 @@ const loadStore = options => {
|
|
|
57483
58467
|
postgres: '@keyv/postgres',
|
|
57484
58468
|
mysql: '@keyv/mysql',
|
|
57485
58469
|
etcd: '@keyv/etcd',
|
|
58470
|
+
offline: '@keyv/offline',
|
|
58471
|
+
tiered: '@keyv/tiered',
|
|
57486
58472
|
};
|
|
57487
58473
|
if (options.adapter || options.uri) {
|
|
57488
|
-
const adapter = options.adapter || /^[
|
|
58474
|
+
const adapter = options.adapter || /^[^:+]*/.exec(options.uri)[0];
|
|
57489
58475
|
return new (commonjsRequire(adapters[adapter]))(options);
|
|
57490
58476
|
}
|
|
57491
58477
|
|
|
@@ -57498,10 +58484,11 @@ const iterableAdapters = [
|
|
|
57498
58484
|
'mysql',
|
|
57499
58485
|
'mongo',
|
|
57500
58486
|
'redis',
|
|
58487
|
+
'tiered',
|
|
57501
58488
|
];
|
|
57502
58489
|
|
|
57503
58490
|
class Keyv$1 extends EventEmitter$2 {
|
|
57504
|
-
constructor(uri, options) {
|
|
58491
|
+
constructor(uri, {emitErrors = true, ...options} = {}) {
|
|
57505
58492
|
super();
|
|
57506
58493
|
this.opts = {
|
|
57507
58494
|
namespace: 'keyv',
|
|
@@ -57525,30 +58512,29 @@ class Keyv$1 extends EventEmitter$2 {
|
|
|
57525
58512
|
};
|
|
57526
58513
|
}
|
|
57527
58514
|
|
|
57528
|
-
if (typeof this.opts.store.on === 'function') {
|
|
58515
|
+
if (typeof this.opts.store.on === 'function' && emitErrors) {
|
|
57529
58516
|
this.opts.store.on('error', error => this.emit('error', error));
|
|
57530
58517
|
}
|
|
57531
58518
|
|
|
57532
58519
|
this.opts.store.namespace = this.opts.namespace;
|
|
57533
58520
|
|
|
57534
|
-
const generateIterator = iterator =>
|
|
57535
|
-
|
|
57536
|
-
|
|
57537
|
-
|
|
57538
|
-
|
|
57539
|
-
|
|
57540
|
-
|
|
57541
|
-
|
|
57542
|
-
}
|
|
57543
|
-
|
|
57544
|
-
if (typeof data.expires === 'number' && Date.now() > data.expires) {
|
|
57545
|
-
this.delete(key);
|
|
57546
|
-
continue;
|
|
57547
|
-
}
|
|
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
|
+
}
|
|
57548
58529
|
|
|
57549
|
-
|
|
58530
|
+
if (typeof data.expires === 'number' && Date.now() > data.expires) {
|
|
58531
|
+
this.delete(key);
|
|
58532
|
+
continue;
|
|
57550
58533
|
}
|
|
57551
|
-
|
|
58534
|
+
|
|
58535
|
+
yield [this._getKeyUnprefix(key), data.value];
|
|
58536
|
+
}
|
|
58537
|
+
};
|
|
57552
58538
|
|
|
57553
58539
|
// Attach iterators
|
|
57554
58540
|
if (typeof this.opts.store[Symbol.iterator] === 'function' && this.opts.store instanceof Map) {
|
|
@@ -57573,12 +58559,10 @@ class Keyv$1 extends EventEmitter$2 {
|
|
|
57573
58559
|
}
|
|
57574
58560
|
|
|
57575
58561
|
_getKeyUnprefix(key) {
|
|
57576
|
-
return
|
|
57577
|
-
|
|
57578
|
-
|
|
57579
|
-
|
|
57580
|
-
.join(':')
|
|
57581
|
-
: key;
|
|
58562
|
+
return key
|
|
58563
|
+
.split(':')
|
|
58564
|
+
.splice(1)
|
|
58565
|
+
.join(':');
|
|
57582
58566
|
}
|
|
57583
58567
|
|
|
57584
58568
|
get(key, options) {
|
|
@@ -57620,13 +58604,13 @@ class Keyv$1 extends EventEmitter$2 {
|
|
|
57620
58604
|
.then(() => isArray ? store.getMany(keyPrefixed) : store.get(keyPrefixed))
|
|
57621
58605
|
.then(data => (typeof data === 'string') ? this.opts.deserialize(data) : data)
|
|
57622
58606
|
.then(data => {
|
|
57623
|
-
// Console.log('get', data);
|
|
57624
58607
|
if (data === undefined || data === null) {
|
|
57625
58608
|
return undefined;
|
|
57626
58609
|
}
|
|
57627
58610
|
|
|
57628
58611
|
if (isArray) {
|
|
57629
58612
|
const result = [];
|
|
58613
|
+
|
|
57630
58614
|
if (data.length === 0) {
|
|
57631
58615
|
return [];
|
|
57632
58616
|
}
|
|
@@ -57728,6 +58712,13 @@ class Keyv$1 extends EventEmitter$2 {
|
|
|
57728
58712
|
return value !== undefined;
|
|
57729
58713
|
});
|
|
57730
58714
|
}
|
|
58715
|
+
|
|
58716
|
+
disconnect() {
|
|
58717
|
+
const {store} = this.opts;
|
|
58718
|
+
if (typeof store.disconnect === 'function') {
|
|
58719
|
+
return store.disconnect();
|
|
58720
|
+
}
|
|
58721
|
+
}
|
|
57731
58722
|
}
|
|
57732
58723
|
|
|
57733
58724
|
var src$1 = Keyv$1;
|
|
@@ -61113,6 +62104,14 @@ class Request extends stream_1.Duplex {
|
|
|
61113
62104
|
const redirectUrl = new url_1.URL(redirectBuffer, url);
|
|
61114
62105
|
const redirectString = redirectUrl.toString();
|
|
61115
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
|
+
}
|
|
61116
62115
|
// Redirecting to a different site, clear sensitive data.
|
|
61117
62116
|
if (redirectUrl.hostname !== url.hostname || redirectUrl.port !== url.port) {
|
|
61118
62117
|
if ('host' in options.headers) {
|
|
@@ -61930,11 +62929,11 @@ function asPromise(normalizedOptions) {
|
|
|
61930
62929
|
request._beforeError(new types_1.RequestError(error.message, error, request));
|
|
61931
62930
|
return;
|
|
61932
62931
|
}
|
|
62932
|
+
globalResponse = response;
|
|
61933
62933
|
if (!is_response_ok_1.isResponseOk(response)) {
|
|
61934
62934
|
request._beforeError(new types_1.HTTPError(response));
|
|
61935
62935
|
return;
|
|
61936
62936
|
}
|
|
61937
|
-
globalResponse = response;
|
|
61938
62937
|
resolve(request.options.resolveBodyOnly ? response.body : response);
|
|
61939
62938
|
});
|
|
61940
62939
|
const onError = (error) => {
|
|
@@ -66358,11 +67357,178 @@ async function latestNpmPackageVersion(name) {
|
|
|
66358
67357
|
return latestVersion(name);
|
|
66359
67358
|
}
|
|
66360
67359
|
|
|
66361
|
-
var version = /*#__PURE__*/Object.freeze({
|
|
67360
|
+
var version$1 = /*#__PURE__*/Object.freeze({
|
|
66362
67361
|
__proto__: null,
|
|
66363
67362
|
latestNpmPackageVersion: latestNpmPackageVersion
|
|
66364
67363
|
});
|
|
66365
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
|
+
|
|
66366
67532
|
const getEnvironmentVariable = () => {
|
|
66367
67533
|
const { env } = process;
|
|
66368
67534
|
return env.SUDO_USER || env.C9_USER || env.LOGNAME || env.USER || env.LNAME || env.USERNAME;
|
|
@@ -84341,7 +85507,7 @@ var mimicFn_1 = mimicFn$1;
|
|
|
84341
85507
|
|
|
84342
85508
|
const mimicFn = mimicFn_1;
|
|
84343
85509
|
|
|
84344
|
-
var debounceFn = (inputFunction, options) => {
|
|
85510
|
+
var debounceFn = (inputFunction, options = {}) => {
|
|
84345
85511
|
if (typeof inputFunction !== 'function') {
|
|
84346
85512
|
throw new TypeError(`Expected the first argument to be a function, got \`${typeof inputFunction}\``);
|
|
84347
85513
|
}
|
|
@@ -162947,6 +164113,7 @@ var combiningMarksRegex = /[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\
|
|
|
162947
164113
|
function validateLabel(label, processing_option) {
|
|
162948
164114
|
if (label.substr(0, 4) === "xn--") {
|
|
162949
164115
|
label = punycode.toUnicode(label);
|
|
164116
|
+
PROCESSING_OPTIONS.NONTRANSITIONAL;
|
|
162950
164117
|
}
|
|
162951
164118
|
|
|
162952
164119
|
var error = false;
|
|
@@ -170692,7 +171859,7 @@ const printDocASTReducer = {
|
|
|
170692
171859
|
* print all items together separated by separator if provided
|
|
170693
171860
|
*/
|
|
170694
171861
|
|
|
170695
|
-
function join(maybeArray, separator) {
|
|
171862
|
+
function join(maybeArray, separator = '') {
|
|
170696
171863
|
var _maybeArray$filter$jo;
|
|
170697
171864
|
|
|
170698
171865
|
return (_maybeArray$filter$jo =
|
|
@@ -172147,7 +173314,7 @@ function makeRequest(_a) {
|
|
|
172147
173314
|
successfullyPassedErrorPolicy = !result.errors || fetchOptions.errorPolicy === 'all' || fetchOptions.errorPolicy === 'ignore';
|
|
172148
173315
|
if (response.ok && successfullyPassedErrorPolicy && successfullyReceivedData) {
|
|
172149
173316
|
headers_1 = response.headers, status_1 = response.status;
|
|
172150
|
-
rest = __rest(result, ["errors"]);
|
|
173317
|
+
result.errors, rest = __rest(result, ["errors"]);
|
|
172151
173318
|
data = fetchOptions.errorPolicy === 'ignore' ? rest : result;
|
|
172152
173319
|
return [2 /*return*/, __assign(__assign({}, (isBathchingQuery ? { data: data } : data)), { headers: headers_1, status: status_1 })];
|
|
172153
173320
|
}
|
|
@@ -172311,12 +173478,12 @@ ${sanitizedHeadersOutput(headers)}
|
|
|
172311
173478
|
return response;
|
|
172312
173479
|
} catch (error) {
|
|
172313
173480
|
if (error instanceof dist$1.ClientError) {
|
|
172314
|
-
const errorMessage = `
|
|
172315
|
-
The Admin GraphQL API responded unsuccessfully with the HTTP status ${error.response.status} and errors:
|
|
173481
|
+
const errorMessage = content`
|
|
173482
|
+
The Admin GraphQL API responded unsuccessfully with the HTTP status ${`${error.response.status}`} and errors:
|
|
172316
173483
|
|
|
172317
|
-
${
|
|
173484
|
+
${token.json(error.response.errors)}
|
|
172318
173485
|
`;
|
|
172319
|
-
const abortError = new Abort(errorMessage);
|
|
173486
|
+
const abortError = new Abort(errorMessage.value);
|
|
172320
173487
|
abortError.stack = error.stack;
|
|
172321
173488
|
throw abortError;
|
|
172322
173489
|
} else {
|
|
@@ -172488,8 +173655,8 @@ const GenerateSignedUploadUrl = dist$1.gql`
|
|
|
172488
173655
|
`;
|
|
172489
173656
|
|
|
172490
173657
|
const CreateDeployment = dist$1.gql`
|
|
172491
|
-
mutation CreateDeployment($apiKey: String!, $uuid: String!, $bundleUrl: String!) {
|
|
172492
|
-
deploymentCreate(input: {apiKey: $apiKey, uuid: $uuid, bundleUrl: $bundleUrl}) {
|
|
173658
|
+
mutation CreateDeployment($apiKey: String!, $uuid: String!, $bundleUrl: String!, $extensions: [ExtensionSettings!]) {
|
|
173659
|
+
deploymentCreate(input: {apiKey: $apiKey, uuid: $uuid, bundleUrl: $bundleUrl, extensions: $extensions}) {
|
|
172493
173660
|
deployment {
|
|
172494
173661
|
uuid
|
|
172495
173662
|
}
|
|
@@ -172707,10 +173874,10 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
172707
173874
|
AppFunctionSetMutation: AppFunctionSetMutation
|
|
172708
173875
|
});
|
|
172709
173876
|
|
|
172710
|
-
async function request(query, token, variables) {
|
|
173877
|
+
async function request(query, token$1, variables) {
|
|
172711
173878
|
const fqdn = await partners$1();
|
|
172712
173879
|
const url = `https://${fqdn}/api/cli/graphql`;
|
|
172713
|
-
const headers = await buildHeaders(token);
|
|
173880
|
+
const headers = await buildHeaders(token$1);
|
|
172714
173881
|
debug$5(`
|
|
172715
173882
|
Sending Partners GraphQL request:
|
|
172716
173883
|
${query}
|
|
@@ -172726,10 +173893,10 @@ ${sanitizedHeadersOutput(headers)}
|
|
|
172726
173893
|
return response;
|
|
172727
173894
|
} catch (error) {
|
|
172728
173895
|
if (error instanceof dist$1.ClientError) {
|
|
172729
|
-
const errorMessage = `
|
|
172730
|
-
The Partners GraphQL API responded unsuccessfully with the HTTP status ${error.response.status} and errors:
|
|
173896
|
+
const errorMessage = content`
|
|
173897
|
+
The Partners GraphQL API responded unsuccessfully with the HTTP status ${`${error.response.status}`} and errors:
|
|
172731
173898
|
|
|
172732
|
-
${
|
|
173899
|
+
${token.json(error.response.errors)}
|
|
172733
173900
|
`;
|
|
172734
173901
|
const abortError = new Abort(errorMessage);
|
|
172735
173902
|
abortError.stack = error.stack;
|
|
@@ -173005,12 +174172,6 @@ var checksum = /*#__PURE__*/Object.freeze({
|
|
|
173005
174172
|
validateMD5: validateMD5
|
|
173006
174173
|
});
|
|
173007
174174
|
|
|
173008
|
-
var semver = /*#__PURE__*/Object.freeze({
|
|
173009
|
-
__proto__: null,
|
|
173010
|
-
Version: semver$3,
|
|
173011
|
-
coerce: coerce_1
|
|
173012
|
-
});
|
|
173013
|
-
|
|
173014
174175
|
const RubyCLIVersion = "2.16.0";
|
|
173015
174176
|
const ThemeCheckVersion = "1.10.2";
|
|
173016
174177
|
const MinBundlerVersion = "2.3.8";
|
|
@@ -173142,11 +174303,16 @@ function shopifyCLIDirectory() {
|
|
|
173142
174303
|
function themeCheckDirectory() {
|
|
173143
174304
|
return join$3(constants$2.paths.directories.cache.vendor.path(), "theme-check", ThemeCheckVersion);
|
|
173144
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
|
+
}
|
|
173145
174310
|
|
|
173146
174311
|
var ruby = /*#__PURE__*/Object.freeze({
|
|
173147
174312
|
__proto__: null,
|
|
173148
174313
|
execCLI: execCLI,
|
|
173149
|
-
execThemeCheckCLI: execThemeCheckCLI
|
|
174314
|
+
execThemeCheckCLI: execThemeCheckCLI,
|
|
174315
|
+
version: version
|
|
173150
174316
|
});
|
|
173151
174317
|
|
|
173152
174318
|
async function readPackageJSON(directory) {
|
|
@@ -173434,7 +174600,7 @@ async function read(path) {
|
|
|
173434
174600
|
};
|
|
173435
174601
|
}
|
|
173436
174602
|
async function write(file) {
|
|
173437
|
-
await write$1(file.path, stringify$
|
|
174603
|
+
await write$1(file.path, stringify$f(file.variables));
|
|
173438
174604
|
}
|
|
173439
174605
|
|
|
173440
174606
|
var dotEnv = /*#__PURE__*/Object.freeze({
|
|
@@ -173464,5 +174630,34 @@ var plugins = /*#__PURE__*/Object.freeze({
|
|
|
173464
174630
|
lookupTunnelPlugin: lookupTunnelPlugin
|
|
173465
174631
|
});
|
|
173466
174632
|
|
|
173467
|
-
|
|
173468
|
-
|
|
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
|