@putout/bundle 5.0.7 → 5.0.9
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/bundle/putout.js +243 -329
- package/bundle/putout.min.js +2 -2
- package/bundle/putout.slim.js +241 -327
- package/package.json +2 -2
package/bundle/putout.js
CHANGED
|
@@ -178,15 +178,15 @@ var versions = {};
|
|
|
178
178
|
var release = {};
|
|
179
179
|
var config = {};
|
|
180
180
|
|
|
181
|
-
function noop$
|
|
181
|
+
function noop$8() {}
|
|
182
182
|
|
|
183
|
-
var on = noop$
|
|
184
|
-
var addListener = noop$
|
|
185
|
-
var once$9 = noop$
|
|
186
|
-
var off = noop$
|
|
187
|
-
var removeListener = noop$
|
|
188
|
-
var removeAllListeners = noop$
|
|
189
|
-
var emit = noop$
|
|
183
|
+
var on = noop$8;
|
|
184
|
+
var addListener = noop$8;
|
|
185
|
+
var once$9 = noop$8;
|
|
186
|
+
var off = noop$8;
|
|
187
|
+
var removeListener = noop$8;
|
|
188
|
+
var removeAllListeners = noop$8;
|
|
189
|
+
var emit = noop$8;
|
|
190
190
|
|
|
191
191
|
function binding(name) {
|
|
192
192
|
throw new Error('process.binding is not supported');
|
|
@@ -482,7 +482,7 @@ function write (buffer, value, offset, isLE, mLen, nBytes) {
|
|
|
482
482
|
|
|
483
483
|
var toString = {}.toString;
|
|
484
484
|
|
|
485
|
-
var isArray$
|
|
485
|
+
var isArray$d = Array.isArray || function (arr) {
|
|
486
486
|
return toString.call(arr) == '[object Array]';
|
|
487
487
|
};
|
|
488
488
|
|
|
@@ -766,7 +766,7 @@ function fromObject (that, obj) {
|
|
|
766
766
|
return fromArrayLike(that, obj)
|
|
767
767
|
}
|
|
768
768
|
|
|
769
|
-
if (obj.type === 'Buffer' && isArray$
|
|
769
|
+
if (obj.type === 'Buffer' && isArray$d(obj.data)) {
|
|
770
770
|
return fromArrayLike(that, obj.data)
|
|
771
771
|
}
|
|
772
772
|
}
|
|
@@ -831,7 +831,7 @@ Buffer.isEncoding = function isEncoding (encoding) {
|
|
|
831
831
|
};
|
|
832
832
|
|
|
833
833
|
Buffer.concat = function concat (list, length) {
|
|
834
|
-
if (!isArray$
|
|
834
|
+
if (!isArray$d(list)) {
|
|
835
835
|
throw new TypeError('"list" argument must be an Array of Buffers')
|
|
836
836
|
}
|
|
837
837
|
|
|
@@ -2752,7 +2752,7 @@ var require_jsesc$1 = __commonJS$1({
|
|
|
2752
2752
|
var index_exports$1 = {};
|
|
2753
2753
|
|
|
2754
2754
|
__export$1(index_exports$1, {
|
|
2755
|
-
codeFrameColumns: () => codeFrameColumns$
|
|
2755
|
+
codeFrameColumns: () => codeFrameColumns$2,
|
|
2756
2756
|
generate: () => generate$7,
|
|
2757
2757
|
parse: () => parse$7,
|
|
2758
2758
|
parseExpression: () => parseExpression$2,
|
|
@@ -36520,7 +36520,7 @@ function getMarkerLines$1(loc, source, opts) {
|
|
|
36520
36520
|
};
|
|
36521
36521
|
}
|
|
36522
36522
|
|
|
36523
|
-
function codeFrameColumns$
|
|
36523
|
+
function codeFrameColumns$2(rawLines, loc, opts = {}) {
|
|
36524
36524
|
const shouldHighlight = opts.forceColor || isColorSupported$1() && opts.highlightCode;
|
|
36525
36525
|
const defs = getDefs$1(shouldHighlight);
|
|
36526
36526
|
const lines = rawLines.split(NEWLINE$3);
|
|
@@ -36889,7 +36889,7 @@ function parseWithCodeFrame$1(code2, parserOpts, syntacticPlaceholders) {
|
|
|
36889
36889
|
const loc = err.loc;
|
|
36890
36890
|
|
|
36891
36891
|
if (loc) {
|
|
36892
|
-
err.message += '\n' + codeFrameColumns$
|
|
36892
|
+
err.message += '\n' + codeFrameColumns$2(code2, {
|
|
36893
36893
|
start: loc,
|
|
36894
36894
|
});
|
|
36895
36895
|
err.code = 'BABEL_TEMPLATE_PARSE_ERROR';
|
|
@@ -47816,7 +47816,7 @@ function replaceWithSourceString$1(replacement) {
|
|
|
47816
47816
|
const loc = err.loc;
|
|
47817
47817
|
|
|
47818
47818
|
if (loc) {
|
|
47819
|
-
err.message += ' - make sure this is an expression.\n' + codeFrameColumns$
|
|
47819
|
+
err.message += ' - make sure this is an expression.\n' + codeFrameColumns$2(replacement, {
|
|
47820
47820
|
start: {
|
|
47821
47821
|
line: loc.line,
|
|
47822
47822
|
column: loc.column + 1,
|
|
@@ -52148,7 +52148,7 @@ comment.parseComments = parseComments$7;
|
|
|
52148
52148
|
|
|
52149
52149
|
const {parseComments: parseComments$6} = comment;
|
|
52150
52150
|
|
|
52151
|
-
const noop$
|
|
52151
|
+
const noop$7 = () => {};
|
|
52152
52152
|
const parseParams = (path) => path.get('params');
|
|
52153
52153
|
|
|
52154
52154
|
params.printParams = (path, printer, semantics, customization = {}) => {
|
|
@@ -52164,9 +52164,9 @@ params.printParams = (path, printer, semantics, customization = {}) => {
|
|
|
52164
52164
|
braceOpen = '(',
|
|
52165
52165
|
braceClose = ')',
|
|
52166
52166
|
printSpace = print.space,
|
|
52167
|
-
printAfterOpen = noop$
|
|
52168
|
-
printBeforeClose = noop$
|
|
52169
|
-
printAfterClose = noop$
|
|
52167
|
+
printAfterOpen = noop$7,
|
|
52168
|
+
printBeforeClose = noop$7,
|
|
52169
|
+
printAfterClose = noop$7,
|
|
52170
52170
|
} = customization;
|
|
52171
52171
|
|
|
52172
52172
|
if (typeParameters)
|
|
@@ -52964,12 +52964,12 @@ var callExpression$3 = {};
|
|
|
52964
52964
|
|
|
52965
52965
|
const {exists: exists$c} = is$4;
|
|
52966
52966
|
const {maybeParens: maybeParens$9} = maybeParens$e;
|
|
52967
|
-
const {isArray: isArray$
|
|
52967
|
+
const {isArray: isArray$c} = Array;
|
|
52968
52968
|
|
|
52969
52969
|
const parseArgs = (path) => {
|
|
52970
52970
|
const argsPath = path.get('arguments');
|
|
52971
52971
|
|
|
52972
|
-
if (!isArray$
|
|
52972
|
+
if (!isArray$c(argsPath))
|
|
52973
52973
|
return [];
|
|
52974
52974
|
|
|
52975
52975
|
return argsPath;
|
|
@@ -55789,10 +55789,10 @@ maybeWriteBrace.condition = (path, printer, semantics) => {
|
|
|
55789
55789
|
var sequenceExpressionComments = {};
|
|
55790
55790
|
|
|
55791
55791
|
const {hasLeadingComment} = is$4;
|
|
55792
|
-
const noop$
|
|
55792
|
+
const noop$6 = () => {};
|
|
55793
55793
|
|
|
55794
|
-
sequenceExpressionComments.printLeadingCommentLine = noop$
|
|
55795
|
-
sequenceExpressionComments.printLeadingCommentBlock = noop$
|
|
55794
|
+
sequenceExpressionComments.printLeadingCommentLine = noop$6;
|
|
55795
|
+
sequenceExpressionComments.printLeadingCommentBlock = noop$6;
|
|
55796
55796
|
|
|
55797
55797
|
sequenceExpressionComments.maybePrintComments = (path, {print}) => {
|
|
55798
55798
|
if (hasLeadingComment(path)) {
|
|
@@ -58900,7 +58900,7 @@ var tsPropertySignature$1 = {exports: {}};
|
|
|
58900
58900
|
var comments$1 = {};
|
|
58901
58901
|
|
|
58902
58902
|
const {isPrev} = is$4;
|
|
58903
|
-
const noop$
|
|
58903
|
+
const noop$5 = () => {};
|
|
58904
58904
|
|
|
58905
58905
|
comments$1.printLeadingCommentLine = (path, printer, semantics, {printComment}) => {
|
|
58906
58906
|
const {print} = printer;
|
|
@@ -58917,7 +58917,7 @@ comments$1.printLeadingCommentBlock = (path, printer, semantics, {printComment})
|
|
|
58917
58917
|
print.indent();
|
|
58918
58918
|
};
|
|
58919
58919
|
|
|
58920
|
-
comments$1.printTrailingCommentBlock = noop$
|
|
58920
|
+
comments$1.printTrailingCommentBlock = noop$5;
|
|
58921
58921
|
|
|
58922
58922
|
(function (module) {
|
|
58923
58923
|
|
|
@@ -59356,7 +59356,7 @@ const {types: types$t} = bundle$1;
|
|
|
59356
59356
|
const {createPrintSpace} = printFunctionParams$1;
|
|
59357
59357
|
const {printParams: printParams$1} = params;
|
|
59358
59358
|
const {isTSUnionType: isTSUnionType$1} = types$t;
|
|
59359
|
-
const noop$
|
|
59359
|
+
const noop$4 = () => {};
|
|
59360
59360
|
|
|
59361
59361
|
tsTypeParameterDeclaration$1.TSTypeParameterDeclaration = (path, printer, semantics) => {
|
|
59362
59362
|
const {print, indent} = printer;
|
|
@@ -59366,16 +59366,16 @@ tsTypeParameterDeclaration$1.TSTypeParameterDeclaration = (path, printer, semant
|
|
|
59366
59366
|
printer,
|
|
59367
59367
|
});
|
|
59368
59368
|
|
|
59369
|
-
const printAfterOpen = !isNewline ? noop$
|
|
59369
|
+
const printAfterOpen = !isNewline ? noop$4 : () => {
|
|
59370
59370
|
indent.inc();
|
|
59371
59371
|
print.breakline();
|
|
59372
59372
|
};
|
|
59373
59373
|
|
|
59374
|
-
const printAfterClose = !isNewline ? noop$
|
|
59374
|
+
const printAfterClose = !isNewline ? noop$4 : () => {
|
|
59375
59375
|
print.breakline();
|
|
59376
59376
|
};
|
|
59377
59377
|
|
|
59378
|
-
const printBeforeClose = !isNewline ? noop$
|
|
59378
|
+
const printBeforeClose = !isNewline ? noop$4 : () => {
|
|
59379
59379
|
indent.dec();
|
|
59380
59380
|
print.breakline();
|
|
59381
59381
|
};
|
|
@@ -60103,7 +60103,7 @@ function objectPlugin(plugin, path, printer, semantics) {
|
|
|
60103
60103
|
|
|
60104
60104
|
var debug$8 = {};
|
|
60105
60105
|
|
|
60106
|
-
var require$$0$
|
|
60106
|
+
var require$$0$4 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_process);
|
|
60107
60107
|
|
|
60108
60108
|
var justSnakeCase = snakeCase;
|
|
60109
60109
|
|
|
@@ -60134,9 +60134,9 @@ function snakeCase(str) {
|
|
|
60134
60134
|
.join('_');
|
|
60135
60135
|
}
|
|
60136
60136
|
|
|
60137
|
-
const process = require$$0$
|
|
60137
|
+
const process = require$$0$4;
|
|
60138
60138
|
const toSnakeCase = justSnakeCase;
|
|
60139
|
-
const {codeFrameColumns: codeFrameColumns$
|
|
60139
|
+
const {codeFrameColumns: codeFrameColumns$1} = bundle$1;
|
|
60140
60140
|
const {TYPES: TYPES$3} = types$19;
|
|
60141
60141
|
|
|
60142
60142
|
const {stringify: stringify$7} = JSON;
|
|
@@ -60160,7 +60160,7 @@ debug$8.createDebug = (tokens) => (a) => {
|
|
|
60160
60160
|
|
|
60161
60161
|
debug$8.createLog = ({newline = '\n', store = createStore$1()} = {}) => ({type, value}) => {
|
|
60162
60162
|
if (LOG_TOKENS) {
|
|
60163
|
-
console.log(codeFrameColumns$
|
|
60163
|
+
console.log(codeFrameColumns$1(stringify$7({
|
|
60164
60164
|
type,
|
|
60165
60165
|
value,
|
|
60166
60166
|
}), {}, {
|
|
@@ -60171,7 +60171,7 @@ debug$8.createLog = ({newline = '\n', store = createStore$1()} = {}) => ({type,
|
|
|
60171
60171
|
}
|
|
60172
60172
|
|
|
60173
60173
|
if (LOG_ALL) {
|
|
60174
|
-
console.log(codeFrameColumns$
|
|
60174
|
+
console.log(codeFrameColumns$1(value, {}, {
|
|
60175
60175
|
highlightCode: true,
|
|
60176
60176
|
}));
|
|
60177
60177
|
|
|
@@ -60180,7 +60180,7 @@ debug$8.createLog = ({newline = '\n', store = createStore$1()} = {}) => ({type,
|
|
|
60180
60180
|
|
|
60181
60181
|
if (LOG) {
|
|
60182
60182
|
if (value === newline) {
|
|
60183
|
-
console.log(codeFrameColumns$
|
|
60183
|
+
console.log(codeFrameColumns$1(store(), {}, {
|
|
60184
60184
|
highlightCode: true,
|
|
60185
60185
|
}));
|
|
60186
60186
|
|
|
@@ -60654,9 +60654,9 @@ var removeBlankLines$1 = function removeBlankLines(input) {
|
|
|
60654
60654
|
return input.replace(blankLines, "");
|
|
60655
60655
|
};
|
|
60656
60656
|
|
|
60657
|
-
var lib$
|
|
60657
|
+
var lib$1 = removeBlankLines$1;
|
|
60658
60658
|
|
|
60659
|
-
const removeBlankLines = lib$
|
|
60659
|
+
const removeBlankLines = lib$1;
|
|
60660
60660
|
|
|
60661
60661
|
const cut$1 = (a) => a.slice(0, a.indexOf('('));
|
|
60662
60662
|
const createPrefix = (name) => {
|
|
@@ -60868,12 +60868,14 @@ babel$2.print = (ast, options) => {
|
|
|
60868
60868
|
...options,
|
|
60869
60869
|
};
|
|
60870
60870
|
|
|
60871
|
-
let {code} = generate$6(
|
|
60872
|
-
|
|
60871
|
+
let {code} = generate$6(
|
|
60872
|
+
ast,
|
|
60873
|
+
source && {
|
|
60873
60874
|
experimental_preserveFormat: true,
|
|
60874
60875
|
retainLines: true,
|
|
60875
60876
|
},
|
|
60876
|
-
|
|
60877
|
+
source,
|
|
60878
|
+
);
|
|
60877
60879
|
|
|
60878
60880
|
if (code[0] === '\n')
|
|
60879
60881
|
code = code.trimStart();
|
|
@@ -60889,9 +60891,9 @@ babel$2.print = (ast, options) => {
|
|
|
60889
60891
|
const putoutPrinter = printer;
|
|
60890
60892
|
const babelPrinter = babel$2;
|
|
60891
60893
|
|
|
60892
|
-
const {isArray: isArray$
|
|
60894
|
+
const {isArray: isArray$b} = Array;
|
|
60893
60895
|
|
|
60894
|
-
const maybeArray$7 = (a) => isArray$
|
|
60896
|
+
const maybeArray$7 = (a) => isArray$b(a) ? a : [a, {}];
|
|
60895
60897
|
|
|
60896
60898
|
var print$4 = (ast, options = {}) => {
|
|
60897
60899
|
const [printer = 'putout', printerOptions] = maybeArray$7(options.printer);
|
|
@@ -61930,7 +61932,7 @@ var require_src = __commonJS({
|
|
|
61930
61932
|
var index_exports = {};
|
|
61931
61933
|
|
|
61932
61934
|
__export(index_exports, {
|
|
61933
|
-
codeFrameColumns: () => codeFrameColumns
|
|
61935
|
+
codeFrameColumns: () => codeFrameColumns,
|
|
61934
61936
|
generate: () => generate$5,
|
|
61935
61937
|
parse: () => parse$6,
|
|
61936
61938
|
parseExpression: () => parseExpression$1,
|
|
@@ -95418,7 +95420,7 @@ function getMarkerLines(loc, source, opts) {
|
|
|
95418
95420
|
};
|
|
95419
95421
|
}
|
|
95420
95422
|
|
|
95421
|
-
function codeFrameColumns
|
|
95423
|
+
function codeFrameColumns(rawLines, loc, opts = {}) {
|
|
95422
95424
|
const shouldHighlight = opts.forceColor || isColorSupported() && opts.highlightCode;
|
|
95423
95425
|
const defs = getDefs(shouldHighlight);
|
|
95424
95426
|
const lines = rawLines.split(NEWLINE);
|
|
@@ -95805,7 +95807,7 @@ function parseWithCodeFrame(code2, parserOpts, syntacticPlaceholders) {
|
|
|
95805
95807
|
const loc = err.loc;
|
|
95806
95808
|
|
|
95807
95809
|
if (loc) {
|
|
95808
|
-
err.message += '\n' + codeFrameColumns
|
|
95810
|
+
err.message += '\n' + codeFrameColumns(code2, {
|
|
95809
95811
|
start: loc,
|
|
95810
95812
|
});
|
|
95811
95813
|
err.code = 'BABEL_TEMPLATE_PARSE_ERROR';
|
|
@@ -106642,7 +106644,7 @@ function replaceWithSourceString(replacement) {
|
|
|
106642
106644
|
const loc = err.loc;
|
|
106643
106645
|
|
|
106644
106646
|
if (loc) {
|
|
106645
|
-
err.message += ' - make sure this is an expression.\n' + codeFrameColumns
|
|
106647
|
+
err.message += ' - make sure this is an expression.\n' + codeFrameColumns(replacement, {
|
|
106646
106648
|
start: {
|
|
106647
106649
|
line: loc.line,
|
|
106648
106650
|
column: loc.column + 1,
|
|
@@ -110638,20 +110640,20 @@ function onceStrict (fn) {
|
|
|
110638
110640
|
|
|
110639
110641
|
var onceExports = once$8.exports;
|
|
110640
110642
|
|
|
110641
|
-
const noop$
|
|
110643
|
+
const noop$3 = () => {};
|
|
110642
110644
|
|
|
110643
110645
|
var empty = /*#__PURE__*/Object.freeze({
|
|
110644
110646
|
__proto__: null,
|
|
110645
|
-
default: noop$
|
|
110647
|
+
default: noop$3
|
|
110646
110648
|
});
|
|
110647
110649
|
|
|
110648
|
-
var require$$1$
|
|
110650
|
+
var require$$1$1 = /*@__PURE__*/getAugmentedNamespace(empty);
|
|
110649
110651
|
|
|
110650
110652
|
// eslint-disable-next-line node/no-unsupported-features/es-syntax
|
|
110651
110653
|
|
|
110652
110654
|
// eslint-disable-next-line node/no-unsupported-features/es-syntax
|
|
110653
110655
|
function privateMethods(Parser) {
|
|
110654
|
-
const ExtendedParser = noop$
|
|
110656
|
+
const ExtendedParser = noop$3();
|
|
110655
110657
|
|
|
110656
110658
|
return class extends ExtendedParser {
|
|
110657
110659
|
// Parse private methods
|
|
@@ -110677,7 +110679,7 @@ var acornPrivateMethods = /*#__PURE__*/Object.freeze({
|
|
|
110677
110679
|
default: privateMethods
|
|
110678
110680
|
});
|
|
110679
110681
|
|
|
110680
|
-
var require$$2 = /*@__PURE__*/getAugmentedNamespace(acornPrivateMethods);
|
|
110682
|
+
var require$$2$1 = /*@__PURE__*/getAugmentedNamespace(acornPrivateMethods);
|
|
110681
110683
|
|
|
110682
110684
|
var acornStage3;
|
|
110683
110685
|
var hasRequiredAcornStage3;
|
|
@@ -110688,9 +110690,9 @@ function requireAcornStage3 () {
|
|
|
110688
110690
|
|
|
110689
110691
|
acornStage3 = function(Parser) {
|
|
110690
110692
|
return Parser.extend(
|
|
110691
|
-
require$$1$
|
|
110692
|
-
require$$1$
|
|
110693
|
-
require$$2
|
|
110693
|
+
require$$1$1,
|
|
110694
|
+
require$$1$1,
|
|
110695
|
+
require$$2$1
|
|
110694
110696
|
)
|
|
110695
110697
|
};
|
|
110696
110698
|
return acornStage3;
|
|
@@ -110699,10 +110701,10 @@ function requireAcornStage3 () {
|
|
|
110699
110701
|
const once$6 = onceExports;
|
|
110700
110702
|
|
|
110701
110703
|
const initAcorn = once$6(() => {
|
|
110702
|
-
const {Parser} = require$$1$
|
|
110704
|
+
const {Parser} = require$$1$1;
|
|
110703
110705
|
|
|
110704
110706
|
const stage3 = requireAcornStage3();
|
|
110705
|
-
const typescript = require$$1$
|
|
110707
|
+
const typescript = require$$1$1.default;
|
|
110706
110708
|
|
|
110707
110709
|
return Parser.extend(typescript(), stage3);
|
|
110708
110710
|
});
|
|
@@ -110819,7 +110821,7 @@ function getBabelLangExts({isTS, isFlow, isJSX}) {
|
|
|
110819
110821
|
var espree$1 = {};
|
|
110820
110822
|
|
|
110821
110823
|
const once$4 = onceExports;
|
|
110822
|
-
const initEspree = once$4(() => require$$1$
|
|
110824
|
+
const initEspree = once$4(() => require$$1$1);
|
|
110823
110825
|
|
|
110824
110826
|
espree$1.parse = function espreeParse(source) {
|
|
110825
110827
|
const {parse} = initEspree();
|
|
@@ -110840,7 +110842,7 @@ espree$1.parse = function espreeParse(source) {
|
|
|
110840
110842
|
var esprima$1 = {};
|
|
110841
110843
|
|
|
110842
110844
|
const once$3 = onceExports;
|
|
110843
|
-
const initEsprima = once$3(() => require$$1$
|
|
110845
|
+
const initEsprima = once$3(() => require$$1$1);
|
|
110844
110846
|
|
|
110845
110847
|
esprima$1.parse = function esprimaParse(source) {
|
|
110846
110848
|
const {parse} = initEsprima();
|
|
@@ -110857,7 +110859,7 @@ esprima$1.parse = function esprimaParse(source) {
|
|
|
110857
110859
|
var tenko$1 = {};
|
|
110858
110860
|
|
|
110859
110861
|
const once$2 = onceExports;
|
|
110860
|
-
const initTenko = once$2(() => require$$1$
|
|
110862
|
+
const initTenko = once$2(() => require$$1$1);
|
|
110861
110863
|
|
|
110862
110864
|
tenko$1.parse = (source) => {
|
|
110863
110865
|
const {Tenko} = initTenko();
|
|
@@ -110874,7 +110876,7 @@ tenko$1.parse = (source) => {
|
|
|
110874
110876
|
var hermes$1 = {};
|
|
110875
110877
|
|
|
110876
110878
|
const once$1 = onceExports;
|
|
110877
|
-
const initHermes = once$1(() => require$$1$
|
|
110879
|
+
const initHermes = once$1(() => require$$1$1);
|
|
110878
110880
|
|
|
110879
110881
|
hermes$1.parse = function hermesParse(source) {
|
|
110880
110882
|
const parser = initHermes();
|
|
@@ -110890,7 +110892,7 @@ hermes$1.parse = function hermesParse(source) {
|
|
|
110890
110892
|
return parser.parse(source, options);
|
|
110891
110893
|
};
|
|
110892
110894
|
|
|
110893
|
-
|
|
110895
|
+
const tryCatch$8 = (fn, ...args) => {
|
|
110894
110896
|
try {
|
|
110895
110897
|
return [null, fn(...args)];
|
|
110896
110898
|
} catch(e) {
|
|
@@ -110898,11 +110900,19 @@ var tryCatch$7 = (fn, ...args) => {
|
|
|
110898
110900
|
}
|
|
110899
110901
|
};
|
|
110900
110902
|
|
|
110901
|
-
|
|
110903
|
+
var tryCatch$9 = /*#__PURE__*/Object.freeze({
|
|
110904
|
+
__proto__: null,
|
|
110905
|
+
default: tryCatch$8,
|
|
110906
|
+
tryCatch: tryCatch$8
|
|
110907
|
+
});
|
|
110908
|
+
|
|
110909
|
+
var require$$0$3 = /*@__PURE__*/getAugmentedNamespace(tryCatch$9);
|
|
110910
|
+
|
|
110911
|
+
const tryCatch$7 = require$$0$3;
|
|
110902
110912
|
|
|
110903
110913
|
var secondChance$1 = (fn, source, messages, args) => {
|
|
110904
110914
|
const [a, ...others] = args;
|
|
110905
|
-
const [errorA, resultA] = tryCatch$
|
|
110915
|
+
const [errorA, resultA] = tryCatch$7(fn, source, a);
|
|
110906
110916
|
|
|
110907
110917
|
if (!errorA)
|
|
110908
110918
|
return resultA;
|
|
@@ -110911,7 +110921,7 @@ var secondChance$1 = (fn, source, messages, args) => {
|
|
|
110911
110921
|
throw errorA;
|
|
110912
110922
|
|
|
110913
110923
|
for (const b of others) {
|
|
110914
|
-
const [errorB, resultB] = tryCatch$
|
|
110924
|
+
const [errorB, resultB] = tryCatch$7(fn, source, b);
|
|
110915
110925
|
|
|
110916
110926
|
if (!errorB)
|
|
110917
110927
|
return resultB;
|
|
@@ -111002,10 +111012,10 @@ function customParse(source, {parser, printer, isTS, isJSX, isRecovery}) {
|
|
|
111002
111012
|
|
|
111003
111013
|
var tryThrowWithReason$3 = {};
|
|
111004
111014
|
|
|
111005
|
-
const tryCatch$
|
|
111015
|
+
const tryCatch$6 = require$$0$3;
|
|
111006
111016
|
|
|
111007
111017
|
tryThrowWithReason$3.tryThrowWithReason = (fn, ...args) => {
|
|
111008
|
-
const [error, result] = tryCatch$
|
|
111018
|
+
const [error, result] = tryCatch$6(fn, ...args);
|
|
111009
111019
|
|
|
111010
111020
|
if (error) {
|
|
111011
111021
|
error.reason = 'parse';
|
|
@@ -111185,12 +111195,12 @@ var nanoMemoize = /*#__PURE__*/Object.freeze({
|
|
|
111185
111195
|
nanomemoize: $cf838c15c8b009ba$export$22f15dd4e5be7e52
|
|
111186
111196
|
});
|
|
111187
111197
|
|
|
111188
|
-
var require$$1
|
|
111198
|
+
var require$$1 = /*@__PURE__*/getAugmentedNamespace(nanoMemoize);
|
|
111189
111199
|
|
|
111190
111200
|
(function (module) {
|
|
111191
111201
|
|
|
111192
111202
|
const {types, template} = bundle$1;
|
|
111193
|
-
const {nanomemoize} = require$$1
|
|
111203
|
+
const {nanomemoize} = require$$1;
|
|
111194
111204
|
const plugins = plugins$1;
|
|
111195
111205
|
const options = options$1;
|
|
111196
111206
|
|
|
@@ -111282,16 +111292,14 @@ parser$5.parse = parse$4;
|
|
|
111282
111292
|
parser$5.generate = generate$3;
|
|
111283
111293
|
parser$5.template = template$9;
|
|
111284
111294
|
|
|
111285
|
-
|
|
111286
|
-
|
|
111287
|
-
shebang.mergeShebang = (shebang, source) => {
|
|
111295
|
+
const mergeShebang$1 = (shebang, source) => {
|
|
111288
111296
|
if (!shebang)
|
|
111289
111297
|
return source;
|
|
111290
111298
|
|
|
111291
111299
|
return `${shebang}\n${source}`;
|
|
111292
111300
|
};
|
|
111293
111301
|
|
|
111294
|
-
|
|
111302
|
+
const cutShebang$1 = (source) => {
|
|
111295
111303
|
if (source.indexOf('#'))
|
|
111296
111304
|
return [source, ''];
|
|
111297
111305
|
|
|
@@ -111309,7 +111317,13 @@ shebang.cutShebang = (source) => {
|
|
|
111309
111317
|
];
|
|
111310
111318
|
};
|
|
111311
111319
|
|
|
111312
|
-
var
|
|
111320
|
+
var shebang = /*#__PURE__*/Object.freeze({
|
|
111321
|
+
__proto__: null,
|
|
111322
|
+
cutShebang: cutShebang$1,
|
|
111323
|
+
mergeShebang: mergeShebang$1
|
|
111324
|
+
});
|
|
111325
|
+
|
|
111326
|
+
var require$$2 = /*@__PURE__*/getAugmentedNamespace(shebang);
|
|
111313
111327
|
|
|
111314
111328
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
111315
111329
|
//
|
|
@@ -111439,7 +111453,7 @@ function join$3() {
|
|
|
111439
111453
|
|
|
111440
111454
|
// path.relative(from, to)
|
|
111441
111455
|
// posix version
|
|
111442
|
-
function relative
|
|
111456
|
+
function relative(from, to) {
|
|
111443
111457
|
from = resolve(from).substr(1);
|
|
111444
111458
|
to = resolve(to).substr(1);
|
|
111445
111459
|
|
|
@@ -111520,7 +111534,7 @@ var _polyfillNode_path = {
|
|
|
111520
111534
|
dirname: dirname$2,
|
|
111521
111535
|
sep: sep,
|
|
111522
111536
|
delimiter: delimiter,
|
|
111523
|
-
relative: relative
|
|
111537
|
+
relative: relative,
|
|
111524
111538
|
join: join$3,
|
|
111525
111539
|
isAbsolute: isAbsolute,
|
|
111526
111540
|
normalize: normalize,
|
|
@@ -111554,13 +111568,11 @@ var _polyfillNode_path$1 = /*#__PURE__*/Object.freeze({
|
|
|
111554
111568
|
isAbsolute: isAbsolute,
|
|
111555
111569
|
join: join$3,
|
|
111556
111570
|
normalize: normalize,
|
|
111557
|
-
relative: relative
|
|
111571
|
+
relative: relative,
|
|
111558
111572
|
resolve: resolve,
|
|
111559
111573
|
sep: sep
|
|
111560
111574
|
});
|
|
111561
111575
|
|
|
111562
|
-
var module$1 = {};
|
|
111563
|
-
|
|
111564
111576
|
var tryToCatch = async (fn, ...args) => {
|
|
111565
111577
|
check$a(fn);
|
|
111566
111578
|
|
|
@@ -111578,19 +111590,25 @@ function check$a(fn) {
|
|
|
111578
111590
|
|
|
111579
111591
|
var tryToCatch$1 = tryToCatch.default;
|
|
111580
111592
|
|
|
111593
|
+
var _module = {};
|
|
111594
|
+
|
|
111595
|
+
const returns$1 = (a) => () => a;
|
|
111596
|
+
const noop$2 = () => {};
|
|
111597
|
+
|
|
111598
|
+
const createRequire = (url, overrides = {}) => {
|
|
111599
|
+
const {module = _module} = overrides;
|
|
111600
|
+
const {createRequire = returns$1(noop$2)} = module;
|
|
111601
|
+
|
|
111602
|
+
return createRequire(url);
|
|
111603
|
+
};
|
|
111604
|
+
|
|
111581
111605
|
// How in other way to mock import using mock require in CommonJS?
|
|
111582
111606
|
const simpleImport = async (url) => {
|
|
111583
111607
|
const result = await import(url);
|
|
111584
111608
|
return result.default || result;
|
|
111585
111609
|
};
|
|
111586
111610
|
|
|
111587
|
-
const
|
|
111588
|
-
|
|
111589
|
-
const noop$4 = () => {};
|
|
111590
|
-
|
|
111591
|
-
const {createRequire: createRequire$1 = returns$2(noop$4)} = module$1;
|
|
111592
|
-
|
|
111593
|
-
const require$1 = createRequire$1(import.meta.url);
|
|
111611
|
+
const require$1 = createRequire(import.meta.url);
|
|
111594
111612
|
|
|
111595
111613
|
const {assign: assign$3} = Object;
|
|
111596
111614
|
const stub$2 = () => () => {};
|
|
@@ -111686,20 +111704,20 @@ function buildPluginsDirs(name) {
|
|
|
111686
111704
|
];
|
|
111687
111705
|
}
|
|
111688
111706
|
|
|
111689
|
-
const isStr$
|
|
111690
|
-
const {isArray: isArray$
|
|
111707
|
+
const isStr$3 = (a) => typeof a === 'string';
|
|
111708
|
+
const {isArray: isArray$a} = Array;
|
|
111691
111709
|
const {entries: entries$9} = Object;
|
|
111692
111710
|
|
|
111693
111711
|
const parsePluginNames = (plugins) => {
|
|
111694
111712
|
const result = [];
|
|
111695
111713
|
|
|
111696
111714
|
for (const plugin of plugins) {
|
|
111697
|
-
if (isStr$
|
|
111715
|
+
if (isStr$3(plugin)) {
|
|
111698
111716
|
result.push([plugin]);
|
|
111699
111717
|
continue;
|
|
111700
111718
|
}
|
|
111701
111719
|
|
|
111702
|
-
if (isArray$
|
|
111720
|
+
if (isArray$a(plugin)) {
|
|
111703
111721
|
const [pluginName, fn] = plugin;
|
|
111704
111722
|
result.push([pluginName, fn]);
|
|
111705
111723
|
continue;
|
|
@@ -111711,9 +111729,9 @@ const parsePluginNames = (plugins) => {
|
|
|
111711
111729
|
return result;
|
|
111712
111730
|
};
|
|
111713
111731
|
|
|
111714
|
-
const {isArray: isArray$
|
|
111732
|
+
const {isArray: isArray$9} = Array;
|
|
111715
111733
|
const isBool$2 = (a) => typeof a === 'boolean';
|
|
111716
|
-
const isStr$
|
|
111734
|
+
const isStr$2 = (a) => typeof a === 'string';
|
|
111717
111735
|
const isObj = (a) => typeof a === 'object';
|
|
111718
111736
|
const {entries: entries$8} = Object;
|
|
111719
111737
|
const {stringify: stringify$6} = JSON;
|
|
@@ -111721,7 +111739,7 @@ const {stringify: stringify$6} = JSON;
|
|
|
111721
111739
|
const notSupportedError = (a) => Error(`☝️ Rule format not supported ${a}: ${typeof a}`);
|
|
111722
111740
|
const rulesUsedInsteadOfMatchError = (a) => Error(`☝️ Looks like you need to change "rules" to "match" for ${stringify$6(a)}`);
|
|
111723
111741
|
const stateOptionError = ({rule, value}) => Error(`☝️ ${rule}: state option can be "on" or "off" only, when used as string, received: "${value}"`);
|
|
111724
|
-
const defaultOptions$
|
|
111742
|
+
const defaultOptions$5 = () => Object.create(null);
|
|
111725
111743
|
|
|
111726
111744
|
const parseState = (rule, value) => {
|
|
111727
111745
|
validateState(rule, value);
|
|
@@ -111743,13 +111761,13 @@ const parseRules = (rules) => {
|
|
|
111743
111761
|
check$9(rules);
|
|
111744
111762
|
|
|
111745
111763
|
for (const [rule, value] of entries$8(rules)) {
|
|
111746
|
-
if (isStr$
|
|
111764
|
+
if (isStr$2(value)) {
|
|
111747
111765
|
result.push({
|
|
111748
111766
|
rule,
|
|
111749
111767
|
state: parseState(rule, value),
|
|
111750
111768
|
plugin,
|
|
111751
111769
|
msg,
|
|
111752
|
-
options: defaultOptions$
|
|
111770
|
+
options: defaultOptions$5(),
|
|
111753
111771
|
});
|
|
111754
111772
|
continue;
|
|
111755
111773
|
}
|
|
@@ -111760,12 +111778,12 @@ const parseRules = (rules) => {
|
|
|
111760
111778
|
state: value,
|
|
111761
111779
|
plugin,
|
|
111762
111780
|
msg,
|
|
111763
|
-
options: defaultOptions$
|
|
111781
|
+
options: defaultOptions$5(),
|
|
111764
111782
|
});
|
|
111765
111783
|
continue;
|
|
111766
111784
|
}
|
|
111767
111785
|
|
|
111768
|
-
const looksLikeArray = isArray$
|
|
111786
|
+
const looksLikeArray = isArray$9(value);
|
|
111769
111787
|
const looksLikeNormalArray = looksLikeArray && value.length;
|
|
111770
111788
|
|
|
111771
111789
|
if (looksLikeNormalArray) {
|
|
@@ -111843,11 +111861,11 @@ const enableNestedRules = (rules) => {
|
|
|
111843
111861
|
};
|
|
111844
111862
|
|
|
111845
111863
|
function check$9(rules) {
|
|
111846
|
-
if (isArray$
|
|
111864
|
+
if (isArray$9(rules))
|
|
111847
111865
|
throw Error(`☝️Looks like type of 'rules' passed to @putout/engine-loader is 'array', expected: 'object'.`);
|
|
111848
111866
|
}
|
|
111849
111867
|
|
|
111850
|
-
const defaultOptions$
|
|
111868
|
+
const defaultOptions$4 = () => Object.create(null);
|
|
111851
111869
|
|
|
111852
111870
|
const mergeRules = ([rule, plugin], rules) => {
|
|
111853
111871
|
for (const currentRule of rules) {
|
|
@@ -111868,7 +111886,7 @@ const mergeRules = ([rule, plugin], rules) => {
|
|
|
111868
111886
|
rule,
|
|
111869
111887
|
plugin,
|
|
111870
111888
|
msg: '',
|
|
111871
|
-
options: defaultOptions$
|
|
111889
|
+
options: defaultOptions$4(),
|
|
111872
111890
|
};
|
|
111873
111891
|
};
|
|
111874
111892
|
|
|
@@ -111960,7 +111978,7 @@ const checkRule = (rule) => {
|
|
|
111960
111978
|
throw Error(`☝️ Looks like plugin name type is not 'string', but: '${typeof rule}'`);
|
|
111961
111979
|
};
|
|
111962
111980
|
|
|
111963
|
-
const validateRulesRelations
|
|
111981
|
+
const validateRulesRelations = (options) => {
|
|
111964
111982
|
check$8(options);
|
|
111965
111983
|
|
|
111966
111984
|
const {pluginNames = [], rules = {}} = options;
|
|
@@ -112008,8 +112026,8 @@ var validatePlugin = ({plugin, rule}) => {
|
|
|
112008
112026
|
throw Error(`☝️ Cannot determine type of plugin '${rule}'. Here is list of supported plugins: https://git.io/JqcMn`);
|
|
112009
112027
|
};
|
|
112010
112028
|
|
|
112011
|
-
const {isArray: isArray$
|
|
112012
|
-
const maybeTuple = (a) => isArray$
|
|
112029
|
+
const {isArray: isArray$8} = Array;
|
|
112030
|
+
const maybeTuple = (a) => isArray$8(a) ? a : ['on', a];
|
|
112013
112031
|
|
|
112014
112032
|
// Would be great to have ability to filter
|
|
112015
112033
|
// disabled plugins and prevent them from loading
|
|
@@ -112139,11 +112157,7 @@ function parseRuleName(rule) {
|
|
|
112139
112157
|
return rule;
|
|
112140
112158
|
}
|
|
112141
112159
|
|
|
112142
|
-
const
|
|
112143
|
-
const returns$1 = (a) => () => a;
|
|
112144
|
-
|
|
112145
|
-
const {createRequire = returns$1(noop$3)} = module$1;
|
|
112146
|
-
const {isArray: isArray$9} = Array;
|
|
112160
|
+
const {isArray: isArray$7} = Array;
|
|
112147
112161
|
|
|
112148
112162
|
const loadPlugins = (options) => {
|
|
112149
112163
|
check$8(options);
|
|
@@ -112175,7 +112189,7 @@ const parseRule = (rule) => rule
|
|
|
112175
112189
|
.replace('import:@putout/plugin-', '')
|
|
112176
112190
|
.replace('@putout/plugin-', '');
|
|
112177
112191
|
|
|
112178
|
-
const maybeFromTuple = (a) => isArray$
|
|
112192
|
+
const maybeFromTuple = (a) => isArray$7(a) ? a[1] : a;
|
|
112179
112193
|
|
|
112180
112194
|
function loadAllPlugins({items, loadedRules}) {
|
|
112181
112195
|
const plugins = [];
|
|
@@ -112234,75 +112248,6 @@ function loadOnePlugin({name, namespace}) {
|
|
|
112234
112248
|
});
|
|
112235
112249
|
}
|
|
112236
112250
|
|
|
112237
|
-
const isStr$2 = (a) => typeof a === 'string';
|
|
112238
|
-
const {isArray: isArray$8} = Array;
|
|
112239
|
-
|
|
112240
|
-
const isOn = (a) => a === 'on';
|
|
112241
|
-
const isOff = (a) => a === 'off';
|
|
112242
|
-
|
|
112243
|
-
var parseProcessorNames = (plugins) => {
|
|
112244
|
-
const result = [];
|
|
112245
|
-
|
|
112246
|
-
for (const plugin of plugins) {
|
|
112247
|
-
if (isStr$2(plugin)) {
|
|
112248
|
-
result.push([plugin]);
|
|
112249
|
-
continue;
|
|
112250
|
-
}
|
|
112251
|
-
|
|
112252
|
-
if (isArray$8(plugin)) {
|
|
112253
|
-
const [pluginName, fn] = plugin;
|
|
112254
|
-
|
|
112255
|
-
if (isOff(fn))
|
|
112256
|
-
continue;
|
|
112257
|
-
|
|
112258
|
-
if (isOn(fn)) {
|
|
112259
|
-
result.push([pluginName]);
|
|
112260
|
-
continue;
|
|
112261
|
-
}
|
|
112262
|
-
|
|
112263
|
-
result.push([pluginName, fn]);
|
|
112264
|
-
continue;
|
|
112265
|
-
}
|
|
112266
|
-
}
|
|
112267
|
-
|
|
112268
|
-
return result;
|
|
112269
|
-
};
|
|
112270
|
-
|
|
112271
|
-
const loadProcessorsAsync = async (options, simpleImport) => {
|
|
112272
|
-
check$8(options);
|
|
112273
|
-
|
|
112274
|
-
const {processors = []} = options;
|
|
112275
|
-
const parsedProcessors = parseProcessorNames(processors);
|
|
112276
|
-
|
|
112277
|
-
const loadProcessor = createAsyncLoader('processor', {
|
|
112278
|
-
simpleImport,
|
|
112279
|
-
});
|
|
112280
|
-
|
|
112281
|
-
const list = [];
|
|
112282
|
-
|
|
112283
|
-
for (const [name, fn] of parsedProcessors) {
|
|
112284
|
-
if (fn) {
|
|
112285
|
-
list.push(fn);
|
|
112286
|
-
continue;
|
|
112287
|
-
}
|
|
112288
|
-
|
|
112289
|
-
list.push(loadProcessor(name));
|
|
112290
|
-
}
|
|
112291
|
-
|
|
112292
|
-
return await Promise.all(list);
|
|
112293
|
-
};
|
|
112294
|
-
|
|
112295
|
-
var lib$1 = /*#__PURE__*/Object.freeze({
|
|
112296
|
-
__proto__: null,
|
|
112297
|
-
createAsyncLoader: createAsyncLoader,
|
|
112298
|
-
loadPlugins: loadPlugins,
|
|
112299
|
-
loadPluginsAsync: loadPluginsAsync,
|
|
112300
|
-
loadProcessorsAsync: loadProcessorsAsync,
|
|
112301
|
-
validateRulesRelations: validateRulesRelations$1
|
|
112302
|
-
});
|
|
112303
|
-
|
|
112304
|
-
var require$$1 = /*@__PURE__*/getAugmentedNamespace(lib$1);
|
|
112305
|
-
|
|
112306
112251
|
var lib = {};
|
|
112307
112252
|
|
|
112308
112253
|
var debug$6 = {};
|
|
@@ -112522,7 +112467,7 @@ function formatArgs(diff, args) {
|
|
|
112522
112467
|
}
|
|
112523
112468
|
const log$6 = console.debug || console.log || (() => {});
|
|
112524
112469
|
const storage = localstorage();
|
|
112525
|
-
const defaultOptions$
|
|
112470
|
+
const defaultOptions$3 = {
|
|
112526
112471
|
useColors: true,
|
|
112527
112472
|
formatArgs,
|
|
112528
112473
|
formatters: { j(v) {
|
|
@@ -112539,7 +112484,7 @@ const defaultOptions$2 = {
|
|
|
112539
112484
|
function createDebug$9(namespace, options) {
|
|
112540
112485
|
var _ref;
|
|
112541
112486
|
const color = (_ref = options && options.color) !== null && _ref !== void 0 ? _ref : selectColor(colors, namespace);
|
|
112542
|
-
return createDebug$a(namespace, Object.assign(defaultOptions$
|
|
112487
|
+
return createDebug$a(namespace, Object.assign(defaultOptions$3, { color }, options));
|
|
112543
112488
|
}
|
|
112544
112489
|
function localstorage() {
|
|
112545
112490
|
try {
|
|
@@ -112598,7 +112543,15 @@ debug$6.createDebug = (namespace) => {
|
|
|
112598
112543
|
});
|
|
112599
112544
|
};
|
|
112600
112545
|
|
|
112601
|
-
|
|
112546
|
+
var tryCatch$5 = (fn, ...args) => {
|
|
112547
|
+
try {
|
|
112548
|
+
return [null, fn(...args)];
|
|
112549
|
+
} catch(e) {
|
|
112550
|
+
return [e];
|
|
112551
|
+
}
|
|
112552
|
+
};
|
|
112553
|
+
|
|
112554
|
+
const tryCatch$4 = tryCatch$5;
|
|
112602
112555
|
const {createDebug: createDebug$7} = debug$6;
|
|
112603
112556
|
|
|
112604
112557
|
const {stringify: stringify$5} = JSON;
|
|
@@ -112700,8 +112653,8 @@ function validatePath(path) {
|
|
|
112700
112653
|
throw Error(`☝️ Looks like 'push' called without a 'path' argument.`);
|
|
112701
112654
|
}
|
|
112702
112655
|
|
|
112703
|
-
const {isArray: isArray$
|
|
112704
|
-
const maybeArray$6 = (a) => isArray$
|
|
112656
|
+
const {isArray: isArray$6} = Array;
|
|
112657
|
+
const maybeArray$6 = (a) => isArray$6(a) ? a : [a];
|
|
112705
112658
|
|
|
112706
112659
|
var maybeArray_1 = (a) => {
|
|
112707
112660
|
if (!a)
|
|
@@ -113242,7 +113195,7 @@ const isBool$1 = (a, b) => {
|
|
|
113242
113195
|
};
|
|
113243
113196
|
|
|
113244
113197
|
const isEqualType$1 = (a, b) => a.type === b.type;
|
|
113245
|
-
const {isArray: isArray$
|
|
113198
|
+
const {isArray: isArray$5} = Array;
|
|
113246
113199
|
|
|
113247
113200
|
is$2.isId = isId$2;
|
|
113248
113201
|
is$2.isBool = isBool$1;
|
|
@@ -113265,7 +113218,7 @@ is$2.isAnyLiteral = (a, b) => {
|
|
|
113265
113218
|
};
|
|
113266
113219
|
|
|
113267
113220
|
is$2.isArgs = (a) => {
|
|
113268
|
-
const b = !isArray$
|
|
113221
|
+
const b = !isArray$5(a) ? a : a[0];
|
|
113269
113222
|
|
|
113270
113223
|
return isIdentifier$4(b, {
|
|
113271
113224
|
name: ARGS,
|
|
@@ -113295,12 +113248,12 @@ is$2.isEqualTypeParams = (a, b) => {
|
|
|
113295
113248
|
};
|
|
113296
113249
|
|
|
113297
113250
|
is$2.isLinkedArgs = (a) => {
|
|
113298
|
-
const b = !isArray$
|
|
113251
|
+
const b = !isArray$5(a) ? a : a[0];
|
|
113299
113252
|
return isIdentifier$4(b) && LINKED_ARGS.test(b.name);
|
|
113300
113253
|
};
|
|
113301
113254
|
|
|
113302
113255
|
is$2.isJSXChildren = (a) => {
|
|
113303
|
-
const b = !isArray$
|
|
113256
|
+
const b = !isArray$5(a) ? a : a[0];
|
|
113304
113257
|
|
|
113305
113258
|
return isJSXText$2(b, {
|
|
113306
113259
|
value: JSX_CHILDREN,
|
|
@@ -113308,7 +113261,7 @@ is$2.isJSXChildren = (a) => {
|
|
|
113308
113261
|
};
|
|
113309
113262
|
|
|
113310
113263
|
is$2.isJSXAttributes = (a) => {
|
|
113311
|
-
const b = !isArray$
|
|
113264
|
+
const b = !isArray$5(a) ? a : a[0];
|
|
113312
113265
|
|
|
113313
113266
|
if (!isJSXAttribute$1(b))
|
|
113314
113267
|
return false;
|
|
@@ -113340,27 +113293,27 @@ is$2.isLinkedRegExp = (a, b) => {
|
|
|
113340
113293
|
};
|
|
113341
113294
|
|
|
113342
113295
|
is$2.isPath = (path) => Boolean(path.node);
|
|
113343
|
-
is$2.isArray = isArray$
|
|
113296
|
+
is$2.isArray = isArray$5;
|
|
113344
113297
|
|
|
113345
113298
|
is$2.isObject = (a) => {
|
|
113346
113299
|
if (!a)
|
|
113347
113300
|
return false;
|
|
113348
113301
|
|
|
113349
|
-
if (isArray$
|
|
113302
|
+
if (isArray$5(a))
|
|
113350
113303
|
return false;
|
|
113351
113304
|
|
|
113352
113305
|
return typeof a === 'object';
|
|
113353
113306
|
};
|
|
113354
113307
|
|
|
113355
113308
|
is$2.isArrays = (a, b) => {
|
|
113356
|
-
if (!isArray$
|
|
113309
|
+
if (!isArray$5(a) || !isArray$5(b))
|
|
113357
113310
|
return false;
|
|
113358
113311
|
|
|
113359
113312
|
return a.length === b.length;
|
|
113360
113313
|
};
|
|
113361
113314
|
|
|
113362
113315
|
is$2.isImports = (a) => {
|
|
113363
|
-
const b = !isArray$
|
|
113316
|
+
const b = !isArray$5(a) ? a : a[0];
|
|
113364
113317
|
|
|
113365
113318
|
if (!isImportDefaultSpecifier(b))
|
|
113366
113319
|
return false;
|
|
@@ -113371,7 +113324,7 @@ is$2.isImports = (a) => {
|
|
|
113371
113324
|
};
|
|
113372
113325
|
|
|
113373
113326
|
is$2.isExports = (a) => {
|
|
113374
|
-
const b = !isArray$
|
|
113327
|
+
const b = !isArray$5(a) ? a : a[0];
|
|
113375
113328
|
|
|
113376
113329
|
if (!isExportSpecifier(b))
|
|
113377
113330
|
return false;
|
|
@@ -113684,7 +113637,7 @@ debug$4.createDebug = (namespace) => {
|
|
|
113684
113637
|
const {createDebug: createDebug$5} = debug$4;
|
|
113685
113638
|
const debug$3 = createDebug$5('putout:compare');
|
|
113686
113639
|
|
|
113687
|
-
const {isArray: isArray$
|
|
113640
|
+
const {isArray: isArray$4} = Array;
|
|
113688
113641
|
const isObject$4 = (a) => a && typeof a === 'object';
|
|
113689
113642
|
|
|
113690
113643
|
log$5.exports = (a, b) => {
|
|
@@ -113699,7 +113652,7 @@ log$5.exports = (a, b) => {
|
|
|
113699
113652
|
|
|
113700
113653
|
log$5.exports._parseValue = parseValue;
|
|
113701
113654
|
function parseValue(a) {
|
|
113702
|
-
if (isArray$
|
|
113655
|
+
if (isArray$4(a) && a[0]) {
|
|
113703
113656
|
const [{
|
|
113704
113657
|
type,
|
|
113705
113658
|
name,
|
|
@@ -114055,13 +114008,13 @@ const {extractExpression} = template$5;
|
|
|
114055
114008
|
const addWaterMark = (a) => a;
|
|
114056
114009
|
|
|
114057
114010
|
const {keys: keys$2} = Object;
|
|
114058
|
-
const {isArray: isArray$
|
|
114059
|
-
const noop$
|
|
114060
|
-
const isEmptyArray = (a) => isArray$
|
|
114011
|
+
const {isArray: isArray$3} = Array;
|
|
114012
|
+
const noop$1 = () => {};
|
|
114013
|
+
const isEmptyArray = (a) => isArray$3(a) && !a.length;
|
|
114061
114014
|
|
|
114062
114015
|
const compareType = (type) => (path) => path.type === type;
|
|
114063
114016
|
const superPush = (array) => (a, b, c = {}) => array.push([a, b, c]);
|
|
114064
|
-
const maybeArray$4 = (a) => isArray$
|
|
114017
|
+
const maybeArray$4 = (a) => isArray$3(a) ? a : [a];
|
|
114065
114018
|
|
|
114066
114019
|
const findParent = (path, type) => {
|
|
114067
114020
|
const newPathNode = path.findParent(compareType(type));
|
|
@@ -114091,7 +114044,7 @@ compare$5.getValues = getValues$1;
|
|
|
114091
114044
|
compare$5.setValues = setValues$1;
|
|
114092
114045
|
compare$5.getTemplateValues = getTemplateValues$1;
|
|
114093
114046
|
|
|
114094
|
-
function compare$4(path, template, options = {}, equal = noop$
|
|
114047
|
+
function compare$4(path, template, options = {}, equal = noop$1) {
|
|
114095
114048
|
const {findUp = true} = options;
|
|
114096
114049
|
|
|
114097
114050
|
if (!path && !template)
|
|
@@ -114151,7 +114104,7 @@ compare$5.compareAll = (path, templateNodes, options) => {
|
|
|
114151
114104
|
|
|
114152
114105
|
// @babel/template creates empty array directives
|
|
114153
114106
|
// extra duplicate value
|
|
114154
|
-
const ignore$
|
|
114107
|
+
const ignore$1 = [
|
|
114155
114108
|
'loc',
|
|
114156
114109
|
'start',
|
|
114157
114110
|
'end',
|
|
@@ -114184,7 +114137,7 @@ function superCompareIterate(node, template) {
|
|
|
114184
114137
|
return false;
|
|
114185
114138
|
|
|
114186
114139
|
for (const key of keys$2(template)) {
|
|
114187
|
-
if (ignore$
|
|
114140
|
+
if (ignore$1.includes(key))
|
|
114188
114141
|
continue;
|
|
114189
114142
|
|
|
114190
114143
|
const nodeValue = extractExpression(node[key]);
|
|
@@ -114204,7 +114157,7 @@ function superCompareIterate(node, template) {
|
|
|
114204
114157
|
return true;
|
|
114205
114158
|
}
|
|
114206
114159
|
|
|
114207
|
-
const tryCatch$3 = tryCatch$
|
|
114160
|
+
const tryCatch$3 = tryCatch$5;
|
|
114208
114161
|
|
|
114209
114162
|
const {
|
|
114210
114163
|
compareAny: compareAny$1,
|
|
@@ -114795,7 +114748,7 @@ var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_events);
|
|
|
114795
114748
|
|
|
114796
114749
|
const {EventEmitter} = require$$0$1;
|
|
114797
114750
|
|
|
114798
|
-
progress.createProgress = () => {
|
|
114751
|
+
var createProgress$1 = progress.createProgress = () => {
|
|
114799
114752
|
let pluginsCount = 0;
|
|
114800
114753
|
let pluginsIndex = 0;
|
|
114801
114754
|
|
|
@@ -114849,7 +114802,7 @@ progress.createProgress = () => {
|
|
|
114849
114802
|
|
|
114850
114803
|
var tryThrowWithReason$1 = {};
|
|
114851
114804
|
|
|
114852
|
-
const tryCatch$2 = tryCatch$
|
|
114805
|
+
const tryCatch$2 = tryCatch$5;
|
|
114853
114806
|
|
|
114854
114807
|
tryThrowWithReason$1.tryThrowWithReason = (fn, ...args) => {
|
|
114855
114808
|
const [error, result] = tryCatch$2(fn, ...args);
|
|
@@ -114949,7 +114902,7 @@ function check$4(fn) {
|
|
|
114949
114902
|
}
|
|
114950
114903
|
|
|
114951
114904
|
const {entries: entries$4} = Object;
|
|
114952
|
-
const {isArray: isArray$
|
|
114905
|
+
const {isArray: isArray$2} = Array;
|
|
114953
114906
|
|
|
114954
114907
|
var findPath$1 = (parentPath) => {
|
|
114955
114908
|
let current = {
|
|
@@ -114971,7 +114924,7 @@ function findKey(path, parent) {
|
|
|
114971
114924
|
let value;
|
|
114972
114925
|
|
|
114973
114926
|
for ([key, value] of entries$4(parent)) {
|
|
114974
|
-
if (isArray$
|
|
114927
|
+
if (isArray$2(value)) {
|
|
114975
114928
|
const index = value.indexOf(node);
|
|
114976
114929
|
|
|
114977
114930
|
if (index >= 0)
|
|
@@ -115375,13 +115328,13 @@ const TS_EXCLUDE = [
|
|
|
115375
115328
|
];
|
|
115376
115329
|
|
|
115377
115330
|
declare$1.declare = (declarations) => ({
|
|
115378
|
-
report: report$
|
|
115331
|
+
report: report$3,
|
|
115379
115332
|
include: include$1,
|
|
115380
115333
|
fix: fix$3(declarations),
|
|
115381
115334
|
filter: filter(declarations),
|
|
115382
115335
|
});
|
|
115383
115336
|
|
|
115384
|
-
const report$
|
|
115337
|
+
const report$3 = (path) => {
|
|
115385
115338
|
const {name} = path.node;
|
|
115386
115339
|
const peaceOfName = cutName(name);
|
|
115387
115340
|
|
|
@@ -115554,16 +115507,16 @@ const fullstore$1 = fullstore$3;
|
|
|
115554
115507
|
const driverStore = fullstore$1();
|
|
115555
115508
|
|
|
115556
115509
|
const {assign} = Object;
|
|
115557
|
-
const noop
|
|
115510
|
+
const noop = () => {};
|
|
115558
115511
|
const returns = (a) => () => a;
|
|
115559
115512
|
|
|
115560
115513
|
const defaultFS = {
|
|
115561
|
-
renameFile: noop
|
|
115562
|
-
removeFile: noop
|
|
115563
|
-
createDirectory: noop
|
|
115514
|
+
renameFile: noop,
|
|
115515
|
+
removeFile: noop,
|
|
115516
|
+
createDirectory: noop,
|
|
115564
115517
|
readFileContent: returns(''),
|
|
115565
|
-
writeFileContent: noop
|
|
115566
|
-
copyFile: noop
|
|
115518
|
+
writeFileContent: noop,
|
|
115519
|
+
copyFile: noop,
|
|
115567
115520
|
};
|
|
115568
115521
|
|
|
115569
115522
|
const maybeFS$1 = assign({}, defaultFS);
|
|
@@ -115654,7 +115607,7 @@ const {
|
|
|
115654
115607
|
} = require$$0;
|
|
115655
115608
|
|
|
115656
115609
|
const {types: types$8} = bundle$1;
|
|
115657
|
-
const tryCatch$1 = tryCatch$
|
|
115610
|
+
const tryCatch$1 = tryCatch$5;
|
|
115658
115611
|
|
|
115659
115612
|
const {
|
|
115660
115613
|
setLiteralValue: setLiteralValue$1,
|
|
@@ -115677,8 +115630,8 @@ const {
|
|
|
115677
115630
|
} = types$8;
|
|
115678
115631
|
|
|
115679
115632
|
const isString$1 = (a) => typeof a === 'string';
|
|
115680
|
-
const {isArray: isArray$
|
|
115681
|
-
const maybeArray = (a) => isArray$
|
|
115633
|
+
const {isArray: isArray$1} = Array;
|
|
115634
|
+
const maybeArray = (a) => isArray$1(a) ? a : [a];
|
|
115682
115635
|
|
|
115683
115636
|
const toBase64 = (content) => {
|
|
115684
115637
|
const [e, result] = tryCatch$1(btoa, content);
|
|
@@ -115766,7 +115719,7 @@ function findFile$5(node, name, exclude = []) {
|
|
|
115766
115719
|
}
|
|
115767
115720
|
|
|
115768
115721
|
function checkName(name) {
|
|
115769
|
-
if (!isString$1(name) && !isArray$
|
|
115722
|
+
if (!isString$1(name) && !isArray$1(name))
|
|
115770
115723
|
throw Error(`☝️ Looks like you forget to pass the 'name' of a file to 'findFile(filePath: Path|FilePath, name: string | string[]): FilePath'`);
|
|
115771
115724
|
}
|
|
115772
115725
|
|
|
@@ -116247,7 +116200,7 @@ const {
|
|
|
116247
116200
|
arrayExpression,
|
|
116248
116201
|
} = types$6;
|
|
116249
116202
|
|
|
116250
|
-
const {isArray
|
|
116203
|
+
const {isArray} = Array;
|
|
116251
116204
|
const maybeAddSlash = (a) => a === '/' ? a : `${a}/`;
|
|
116252
116205
|
|
|
116253
116206
|
convertFilesystemToSimpleFilesystem.report = () => `Convert Filesystem to Simple Filesystem`;
|
|
@@ -116277,7 +116230,7 @@ convertFilesystemToSimpleFilesystem.fix = (root, {files}) => {
|
|
|
116277
116230
|
const list = [];
|
|
116278
116231
|
|
|
116279
116232
|
for (const name of names) {
|
|
116280
|
-
if (isArray
|
|
116233
|
+
if (isArray(name)) {
|
|
116281
116234
|
list.push(arrayExpression([
|
|
116282
116235
|
stringLiteral$2(name[0]),
|
|
116283
116236
|
stringLiteral$2(name[1]),
|
|
@@ -116469,7 +116422,7 @@ const runFix = runFix$3;
|
|
|
116469
116422
|
const mergeVisitors = mergeVisitors$1;
|
|
116470
116423
|
const superFind = superFind$1;
|
|
116471
116424
|
const template$2 = templateExports;
|
|
116472
|
-
const {createProgress
|
|
116425
|
+
const {createProgress} = progress;
|
|
116473
116426
|
const {tryThrowWithReason} = tryThrowWithReason$1;
|
|
116474
116427
|
|
|
116475
116428
|
const {include} = includer;
|
|
@@ -116481,7 +116434,7 @@ const {getPath, getPosition} = getPosition$2;
|
|
|
116481
116434
|
const debug = createDebug('putout:runner:find');
|
|
116482
116435
|
const isRemoved = (a) => a?.removed;
|
|
116483
116436
|
|
|
116484
|
-
lib.runPlugins = ({ast, shebang, fix, fixCount = 2, plugins, progress = createProgress
|
|
116437
|
+
lib.runPlugins = ({ast, shebang, fix, fixCount = 2, plugins, progress = createProgress(), traverse = defaultTraverse}) => {
|
|
116485
116438
|
let places = [];
|
|
116486
116439
|
|
|
116487
116440
|
const merge = once(mergeVisitors);
|
|
@@ -116657,20 +116610,16 @@ function splitPlugins(plugins, {progress}) {
|
|
|
116657
116610
|
};
|
|
116658
116611
|
}
|
|
116659
116612
|
|
|
116660
|
-
const
|
|
116661
|
-
const runner = lib;
|
|
116662
|
-
const {createProgress} = progress;
|
|
116663
|
-
|
|
116664
|
-
defaultOptions$5.defaultOptions = (opts = {}) => {
|
|
116613
|
+
const defaultOptions$1 = (opts = {}) => {
|
|
116665
116614
|
const {
|
|
116666
116615
|
parser = 'babel',
|
|
116667
116616
|
printer = opts.printer || 'putout',
|
|
116668
116617
|
fix = true,
|
|
116669
116618
|
fixCount = 3,
|
|
116670
|
-
loadPlugins =
|
|
116671
|
-
loadPluginsAsync =
|
|
116672
|
-
runPlugins =
|
|
116673
|
-
progress = createProgress(),
|
|
116619
|
+
loadPlugins: loadPlugins$1 = loadPlugins,
|
|
116620
|
+
loadPluginsAsync: loadPluginsAsync$1 = loadPluginsAsync,
|
|
116621
|
+
runPlugins = lib.runPlugins,
|
|
116622
|
+
progress = createProgress$1(),
|
|
116674
116623
|
} = opts;
|
|
116675
116624
|
|
|
116676
116625
|
return {
|
|
@@ -116679,16 +116628,29 @@ defaultOptions$5.defaultOptions = (opts = {}) => {
|
|
|
116679
116628
|
printer,
|
|
116680
116629
|
fix,
|
|
116681
116630
|
fixCount,
|
|
116682
|
-
loadPlugins,
|
|
116683
|
-
loadPluginsAsync,
|
|
116631
|
+
loadPlugins: loadPlugins$1,
|
|
116632
|
+
loadPluginsAsync: loadPluginsAsync$1,
|
|
116684
116633
|
runPlugins,
|
|
116685
116634
|
progress,
|
|
116686
116635
|
};
|
|
116687
116636
|
};
|
|
116688
116637
|
|
|
116689
|
-
var
|
|
116638
|
+
var defaultOptions$2 = /*#__PURE__*/Object.freeze({
|
|
116639
|
+
__proto__: null,
|
|
116640
|
+
defaultOptions: defaultOptions$1
|
|
116641
|
+
});
|
|
116642
|
+
|
|
116643
|
+
var require$$3 = /*@__PURE__*/getAugmentedNamespace(defaultOptions$2);
|
|
116690
116644
|
|
|
116691
|
-
|
|
116645
|
+
const tryCatch = (fn, ...args) => {
|
|
116646
|
+
try {
|
|
116647
|
+
return [null, fn(...args)];
|
|
116648
|
+
} catch(e) {
|
|
116649
|
+
return [e];
|
|
116650
|
+
}
|
|
116651
|
+
};
|
|
116652
|
+
|
|
116653
|
+
const parseError$1 = (e, type = 'parser') => {
|
|
116692
116654
|
const {line, column} = e.loc || {
|
|
116693
116655
|
line: 1,
|
|
116694
116656
|
column: 1,
|
|
@@ -116709,13 +116671,6 @@ var parseError$2 = (e, type = 'parser') => {
|
|
|
116709
116671
|
|
|
116710
116672
|
const cutBrackets = (a) => a.replace(/\s\(\d:\d+\)/, '');
|
|
116711
116673
|
|
|
116712
|
-
const tryCatch = tryCatch$7;
|
|
116713
|
-
|
|
116714
|
-
const {validateRulesRelations} = require$$1;
|
|
116715
|
-
const {defaultOptions: defaultOptions$1} = defaultOptions$5;
|
|
116716
|
-
const {cutShebang: cutShebang$1} = shebang;
|
|
116717
|
-
const parseError$1 = parseError$2;
|
|
116718
|
-
|
|
116719
116674
|
const maybeParseError = (a) => !a ? [] : parseError$1(a, 'loader');
|
|
116720
116675
|
|
|
116721
116676
|
// why we pass 'source' to 'transform()'?
|
|
@@ -116727,7 +116682,7 @@ const maybeParseError = (a) => !a ? [] : parseError$1(a, 'loader');
|
|
|
116727
116682
|
// 27 column,¬
|
|
116728
116683
|
// 28 };¬
|
|
116729
116684
|
//
|
|
116730
|
-
transform$
|
|
116685
|
+
const transform$4 = (ast, source, opts) => {
|
|
116731
116686
|
opts = defaultOptions$1(opts);
|
|
116732
116687
|
|
|
116733
116688
|
const {
|
|
@@ -116769,7 +116724,7 @@ transform$5.transform = (ast, source, opts) => {
|
|
|
116769
116724
|
];
|
|
116770
116725
|
};
|
|
116771
116726
|
|
|
116772
|
-
|
|
116727
|
+
const transformAsync$1 = async (ast, source, opts) => {
|
|
116773
116728
|
opts = defaultOptions$1(opts);
|
|
116774
116729
|
|
|
116775
116730
|
const {
|
|
@@ -116811,78 +116766,35 @@ transform$5.transformAsync = async (ast, source, opts) => {
|
|
|
116811
116766
|
];
|
|
116812
116767
|
};
|
|
116813
116768
|
|
|
116814
|
-
var
|
|
116769
|
+
var transform$5 = /*#__PURE__*/Object.freeze({
|
|
116770
|
+
__proto__: null,
|
|
116771
|
+
transform: transform$4,
|
|
116772
|
+
transformAsync: transformAsync$1
|
|
116773
|
+
});
|
|
116815
116774
|
|
|
116816
|
-
|
|
116775
|
+
var require$$4$1 = /*@__PURE__*/getAugmentedNamespace(transform$5);
|
|
116817
116776
|
|
|
116818
|
-
findPlaces$2
|
|
116777
|
+
const findPlaces$2 = (ast, source, opts) => {
|
|
116819
116778
|
return transform$4(ast, source, {
|
|
116820
116779
|
...opts,
|
|
116821
116780
|
fix: false,
|
|
116822
116781
|
});
|
|
116823
116782
|
};
|
|
116824
116783
|
|
|
116825
|
-
|
|
116784
|
+
const findPlacesAsync$1 = async (ast, source, opts) => {
|
|
116826
116785
|
return await transformAsync$1(ast, source, {
|
|
116827
116786
|
...opts,
|
|
116828
116787
|
fix: false,
|
|
116829
116788
|
});
|
|
116830
116789
|
};
|
|
116831
116790
|
|
|
116832
|
-
|
|
116833
|
-
|
|
116834
|
-
|
|
116835
|
-
|
|
116836
|
-
|
|
116837
|
-
let errorsCount = 0;
|
|
116838
|
-
|
|
116839
|
-
return async (formatter, options) => {
|
|
116840
|
-
const {
|
|
116841
|
-
name,
|
|
116842
|
-
rule,
|
|
116843
|
-
source,
|
|
116844
|
-
places,
|
|
116845
|
-
index = 0,
|
|
116846
|
-
count = 1,
|
|
116847
|
-
trace = noop,
|
|
116848
|
-
formatterOptions = {},
|
|
116849
|
-
} = options;
|
|
116850
|
-
|
|
116851
|
-
if (!isArray(places))
|
|
116852
|
-
throw Error(`☝️ Looks like for 'places: Places[]' you passed the wrong type: '${typeof places}'`);
|
|
116853
|
-
|
|
116854
|
-
if (places.length)
|
|
116855
|
-
++filesCount;
|
|
116856
|
-
|
|
116857
|
-
errorsCount += places.length;
|
|
116858
|
-
|
|
116859
|
-
trace('progress', {
|
|
116860
|
-
rule,
|
|
116861
|
-
name,
|
|
116862
|
-
options: formatterOptions,
|
|
116863
|
-
source,
|
|
116864
|
-
places,
|
|
116865
|
-
index,
|
|
116866
|
-
count,
|
|
116867
|
-
filesCount,
|
|
116868
|
-
errorsCount,
|
|
116869
|
-
});
|
|
116870
|
-
|
|
116871
|
-
return await formatter({
|
|
116872
|
-
rule,
|
|
116873
|
-
name,
|
|
116874
|
-
options: formatterOptions,
|
|
116875
|
-
source,
|
|
116876
|
-
places,
|
|
116877
|
-
index,
|
|
116878
|
-
count,
|
|
116879
|
-
filesCount,
|
|
116880
|
-
errorsCount,
|
|
116881
|
-
});
|
|
116882
|
-
};
|
|
116883
|
-
};
|
|
116791
|
+
var findPlaces$3 = /*#__PURE__*/Object.freeze({
|
|
116792
|
+
__proto__: null,
|
|
116793
|
+
findPlaces: findPlaces$2,
|
|
116794
|
+
findPlacesAsync: findPlacesAsync$1
|
|
116795
|
+
});
|
|
116884
116796
|
|
|
116885
|
-
|
|
116797
|
+
var require$$5 = /*@__PURE__*/getAugmentedNamespace(findPlaces$3);
|
|
116886
116798
|
|
|
116887
116799
|
var traverse$5 = {};
|
|
116888
116800
|
|
|
@@ -124493,15 +124405,12 @@ keyword.isTSKeyword = (name) => {
|
|
|
124493
124405
|
|
|
124494
124406
|
var matchFiles = {};
|
|
124495
124407
|
|
|
124496
|
-
const {relative} = require$$0;
|
|
124497
|
-
const ignore$1 = require$$1$2;
|
|
124498
|
-
|
|
124499
124408
|
const isNegative = (a) => !a.indexOf('!');
|
|
124500
124409
|
const positive = (a) => a.replace(/^!/, '');
|
|
124501
124410
|
|
|
124502
|
-
|
|
124411
|
+
const ignores$1 = (dirOpt, resolvedName, options = {}) => {
|
|
124503
124412
|
const relativeName = relative(dirOpt, resolvedName);
|
|
124504
|
-
const ignorer =
|
|
124413
|
+
const ignorer = noop$3();
|
|
124505
124414
|
const ignoreList = mergeIgnores(options.ignore || []);
|
|
124506
124415
|
|
|
124507
124416
|
ignorer.add(ignoreList);
|
|
@@ -124522,14 +124431,19 @@ function mergeIgnores(ignores) {
|
|
|
124522
124431
|
return Array.from(noDuplicates);
|
|
124523
124432
|
}
|
|
124524
124433
|
|
|
124525
|
-
ignores$2.
|
|
124434
|
+
var ignores$2 = /*#__PURE__*/Object.freeze({
|
|
124435
|
+
__proto__: null,
|
|
124436
|
+
ignores: ignores$1
|
|
124437
|
+
});
|
|
124438
|
+
|
|
124439
|
+
var require$$4 = /*@__PURE__*/getAugmentedNamespace(ignores$2);
|
|
124526
124440
|
|
|
124527
124441
|
const path = require$$0;
|
|
124528
124442
|
|
|
124529
124443
|
const {parse: parse$2, print: print$1} = parser$5;
|
|
124530
|
-
const {transform: transform$1} =
|
|
124531
|
-
const {findPlaces: findPlaces$1} =
|
|
124532
|
-
const ignores
|
|
124444
|
+
const {transform: transform$1} = require$$4$1;
|
|
124445
|
+
const {findPlaces: findPlaces$1} = require$$5;
|
|
124446
|
+
const {ignores} = require$$4;
|
|
124533
124447
|
|
|
124534
124448
|
const {toJS, fromJS} = json;
|
|
124535
124449
|
|
|
@@ -124604,7 +124518,7 @@ const createScan = ({files, exclude, defaultFilename}) => (mainPath, {push, prog
|
|
|
124604
124518
|
filename: inputFilename,
|
|
124605
124519
|
});
|
|
124606
124520
|
|
|
124607
|
-
if (ignores
|
|
124521
|
+
if (ignores(cwd, inputFilename, options))
|
|
124608
124522
|
continue;
|
|
124609
124523
|
|
|
124610
124524
|
allFiles.push({
|
|
@@ -124988,9 +124902,7 @@ function hasParens(path, printer = getPrinter(path)) {
|
|
|
124988
124902
|
return /^(TS)?Parenthesized(Expression|Type)?$/.test(type);
|
|
124989
124903
|
}
|
|
124990
124904
|
|
|
124991
|
-
const {
|
|
124992
|
-
|
|
124993
|
-
var codeframe$1 = ({source, error, highlightCode = true}) => {
|
|
124905
|
+
const codeframe$1 = ({source, error, highlightCode = true}) => {
|
|
124994
124906
|
const {message, loc} = error;
|
|
124995
124907
|
|
|
124996
124908
|
if (!loc)
|
|
@@ -125000,13 +124912,18 @@ var codeframe$1 = ({source, error, highlightCode = true}) => {
|
|
|
125000
124912
|
start: loc,
|
|
125001
124913
|
};
|
|
125002
124914
|
|
|
125003
|
-
return codeFrameColumns(source, location, {
|
|
124915
|
+
return bundle$1.codeFrameColumns(source, location, {
|
|
125004
124916
|
highlightCode,
|
|
125005
124917
|
message,
|
|
125006
124918
|
});
|
|
125007
124919
|
};
|
|
125008
124920
|
|
|
125009
|
-
codeframe$
|
|
124921
|
+
var codeframe$2 = /*#__PURE__*/Object.freeze({
|
|
124922
|
+
__proto__: null,
|
|
124923
|
+
codeframe: codeframe$1
|
|
124924
|
+
});
|
|
124925
|
+
|
|
124926
|
+
var require$$20 = /*@__PURE__*/getAugmentedNamespace(codeframe$2);
|
|
125010
124927
|
|
|
125011
124928
|
const {traverse, types} = bundle$1;
|
|
125012
124929
|
const {
|
|
@@ -125016,16 +124933,14 @@ const {
|
|
|
125016
124933
|
template,
|
|
125017
124934
|
} = parser$5;
|
|
125018
124935
|
|
|
125019
|
-
const {cutShebang, mergeShebang} =
|
|
125020
|
-
const {defaultOptions} =
|
|
125021
|
-
const {transform, transformAsync} =
|
|
124936
|
+
const {cutShebang, mergeShebang} = require$$2;
|
|
124937
|
+
const {defaultOptions} = require$$3;
|
|
124938
|
+
const {transform, transformAsync} = require$$4$1;
|
|
125022
124939
|
|
|
125023
124940
|
const {
|
|
125024
124941
|
findPlaces,
|
|
125025
124942
|
findPlacesAsync,
|
|
125026
|
-
} =
|
|
125027
|
-
|
|
125028
|
-
const isString = (a) => typeof a === 'string';
|
|
124943
|
+
} = require$$5;
|
|
125029
124944
|
|
|
125030
124945
|
putout$1.exports = putout;
|
|
125031
124946
|
var putout_2 = putout$1.exports.putout = putout;
|
|
@@ -125123,7 +125038,6 @@ var traverse_1 = putout$1.exports.traverse = traverse;
|
|
|
125123
125038
|
var types_1 = putout$1.exports.types = types;
|
|
125124
125039
|
var template_1 = putout$1.exports.template = template;
|
|
125125
125040
|
var generate_1 = putout$1.exports.generate = generate;
|
|
125126
|
-
var initReport = putout$1.exports.initReport = report$3;
|
|
125127
125041
|
|
|
125128
125042
|
var operator = putout$1.exports.operator = {
|
|
125129
125043
|
...operate,
|
|
@@ -125142,14 +125056,14 @@ var operator = putout$1.exports.operator = {
|
|
|
125142
125056
|
...parens,
|
|
125143
125057
|
};
|
|
125144
125058
|
|
|
125145
|
-
|
|
125146
|
-
|
|
125059
|
+
const {codeframe} = require$$20;
|
|
125060
|
+
const isString = (a) => typeof a === 'string';
|
|
125061
|
+
|
|
125062
|
+
var codeframe_1 = putout$1.exports.codeframe = codeframe;
|
|
125147
125063
|
|
|
125148
125064
|
function check(source) {
|
|
125149
125065
|
if (!isString(source))
|
|
125150
125066
|
throw Error(`☝️ Looks like 'source' has type '${typeof source}', expected: 'string'`);
|
|
125151
125067
|
}
|
|
125152
125068
|
|
|
125153
|
-
|
|
125154
|
-
|
|
125155
|
-
export { codeframe, putoutExports as default, findPlaces_1 as findPlaces, findPlacesAsync_1 as findPlacesAsync, generate_1 as generate, ignores, initReport, operator, parse_1 as parse, print_1 as print, putout_2 as putout, putoutAsync, template_1 as template, transform_1 as transform, transformAsync_1 as transformAsync, traverse_1 as traverse, types_1 as types };
|
|
125069
|
+
export { codeframe_1 as codeframe, putout_2 as default, findPlaces_1 as findPlaces, findPlacesAsync_1 as findPlacesAsync, generate_1 as generate, operator, parse_1 as parse, print_1 as print, putout_2 as putout, putoutAsync, template_1 as template, transform_1 as transform, transformAsync_1 as transformAsync, traverse_1 as traverse, types_1 as types };
|