@putout/bundle 5.2.2 → 5.2.3

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 CHANGED
@@ -1,33 +1,4 @@
1
- function getAugmentedNamespace(n) {
2
- if (Object.prototype.hasOwnProperty.call(n, '__esModule')) return n;
3
- var f = n.default;
4
- if (typeof f == "function") {
5
- var a = function a () {
6
- var isInstance = false;
7
- try {
8
- isInstance = this instanceof a;
9
- } catch {}
10
- if (isInstance) {
11
- return Reflect.construct(f, arguments, this.constructor);
12
- }
13
- return f.apply(this, arguments);
14
- };
15
- a.prototype = f.prototype;
16
- } else a = {};
17
- Object.defineProperty(a, '__esModule', {value: true});
18
- Object.keys(n).forEach(function (k) {
19
- var d = Object.getOwnPropertyDescriptor(n, k);
20
- Object.defineProperty(a, k, d.get ? d : {
21
- enumerable: true,
22
- get: function () {
23
- return n[k];
24
- }
25
- });
26
- });
27
- return a;
28
- }
29
-
30
- var fullstore$1 = (value) => {
1
+ function fullstore(value) {
31
2
  const data = {
32
3
  value,
33
4
  };
@@ -42,9 +13,7 @@ var fullstore$1 = (value) => {
42
13
 
43
14
  return value;
44
15
  };
45
- };
46
-
47
- var fullstore$2 = fullstore$1;
16
+ }
48
17
 
49
18
  var global$1 = (typeof global !== "undefined" ? global :
50
19
  typeof self !== "undefined" ? self :
@@ -3024,7 +2993,7 @@ __export(lib_exports, {
3024
2993
  TSUnionType: () => TSUnionType$1,
3025
2994
  TSUnknownKeyword: () => TSUnknownKeyword$1,
3026
2995
  TSVoidKeyword: () => TSVoidKeyword$1,
3027
- TYPES: () => TYPES$4,
2996
+ TYPES: () => TYPES$3,
3028
2997
  TYPESCRIPT_TYPES: () => TYPESCRIPT_TYPES,
3029
2998
  TaggedTemplateExpression: () => TaggedTemplateExpression$1,
3030
2999
  TemplateElement: () => TemplateElement,
@@ -3890,7 +3859,7 @@ __export(lib_exports, {
3890
3859
  toKeyAlias: () => toKeyAlias,
3891
3860
  toStatement: () => toStatement$1,
3892
3861
  topicReference: () => topicReference,
3893
- traverse: () => traverse$2,
3862
+ traverse: () => traverse$4,
3894
3863
  traverseFast: () => traverseFast,
3895
3864
  tryStatement: () => tryStatement,
3896
3865
  tsAnyKeyword: () => tsAnyKeyword,
@@ -13772,7 +13741,7 @@ for (const {types: types2, set} of allExpandedTypes) {
13772
13741
  }
13773
13742
  }
13774
13743
 
13775
- var TYPES$4 = [].concat(Object.keys(VISITOR_KEYS), Object.keys(FLIPPED_ALIAS_KEYS), Object.keys(DEPRECATED_KEYS));
13744
+ var TYPES$3 = [].concat(Object.keys(VISITOR_KEYS), Object.keys(FLIPPED_ALIAS_KEYS), Object.keys(DEPRECATED_KEYS));
13776
13745
 
13777
13746
  function validate$1$1(node, key, val) {
13778
13747
  if (!node)
@@ -19795,7 +19764,7 @@ function getFunctionName(node, parent) {
19795
19764
  };
19796
19765
  }
19797
19766
 
19798
- function traverse$2(node, handlers, state) {
19767
+ function traverse$4(node, handlers, state) {
19799
19768
  if (typeof handlers === 'function') {
19800
19769
  handlers = {
19801
19770
  enter: handlers,
@@ -21579,7 +21548,7 @@ var TokContext = class {
21579
21548
  preserveSpace;
21580
21549
  };
21581
21550
 
21582
- var types$2 = {
21551
+ var types = {
21583
21552
  brace: new TokContext('{'),
21584
21553
  j_oTag: new TokContext('<tag'),
21585
21554
  j_cTag: new TokContext('</tag'),
@@ -23493,9 +23462,9 @@ var jsx = (superClass) => class JSXParserMixin extends superClass {
23493
23462
  switch(this.state.type) {
23494
23463
  case 2:
23495
23464
  node = this.startNode();
23496
- this.setContext(types$2.brace);
23465
+ this.setContext(types.brace);
23497
23466
  this.next();
23498
- node = this.jsxParseExpressionContainer(node, types$2.j_oTag);
23467
+ node = this.jsxParseExpressionContainer(node, types.j_oTag);
23499
23468
 
23500
23469
  if (node.expression.type === 'JSXEmptyExpression') {
23501
23470
  this.raise(JsxErrors.AttributeIsEmpty, node);
@@ -23520,7 +23489,7 @@ var jsx = (superClass) => class JSXParserMixin extends superClass {
23520
23489
  jsxParseSpreadChild(node) {
23521
23490
  this.next();
23522
23491
  node.expression = this.parseExpression();
23523
- this.setContext(types$2.j_expr);
23492
+ this.setContext(types.j_expr);
23524
23493
  this.state.canStartJSXElement = true;
23525
23494
  this.expect(4);
23526
23495
  return this.finishNode(node, 'JSXSpreadChild');
@@ -23549,11 +23518,11 @@ var jsx = (superClass) => class JSXParserMixin extends superClass {
23549
23518
  const node = this.startNode();
23550
23519
 
23551
23520
  if (this.match(2)) {
23552
- this.setContext(types$2.brace);
23521
+ this.setContext(types.brace);
23553
23522
  this.next();
23554
23523
  this.expect(17);
23555
23524
  node.argument = this.parseMaybeAssignAllowIn();
23556
- this.setContext(types$2.j_oTag);
23525
+ this.setContext(types.j_oTag);
23557
23526
  this.state.canStartJSXElement = true;
23558
23527
  this.expect(4);
23559
23528
  return this.finishNode(node, 'JSXSpreadAttribute');
@@ -23627,13 +23596,13 @@ var jsx = (superClass) => class JSXParserMixin extends superClass {
23627
23596
 
23628
23597
  case 2: {
23629
23598
  const node2 = this.startNode();
23630
- this.setContext(types$2.brace);
23599
+ this.setContext(types.brace);
23631
23600
  this.next();
23632
23601
 
23633
23602
  if (this.match(17)) {
23634
23603
  children.push(this.jsxParseSpreadChild(node2));
23635
23604
  } else {
23636
- children.push(this.jsxParseExpressionContainer(node2, types$2.j_expr));
23605
+ children.push(this.jsxParseExpressionContainer(node2, types.j_expr));
23637
23606
  }
23638
23607
 
23639
23608
  break;
@@ -23709,12 +23678,12 @@ var jsx = (superClass) => class JSXParserMixin extends superClass {
23709
23678
  getTokenFromCode(code2) {
23710
23679
  const context = this.curContext();
23711
23680
 
23712
- if (context === types$2.j_expr) {
23681
+ if (context === types.j_expr) {
23713
23682
  this.jsxReadToken();
23714
23683
  return;
23715
23684
  }
23716
23685
 
23717
- if (context === types$2.j_oTag || context === types$2.j_cTag) {
23686
+ if (context === types.j_oTag || context === types.j_cTag) {
23718
23687
  if (isIdentifierStart2(code2)) {
23719
23688
  this.jsxReadWord();
23720
23689
  return;
@@ -23726,7 +23695,7 @@ var jsx = (superClass) => class JSXParserMixin extends superClass {
23726
23695
  return;
23727
23696
  }
23728
23697
 
23729
- if ((code2 === 34 || code2 === 39) && context === types$2.j_oTag) {
23698
+ if ((code2 === 34 || code2 === 39) && context === types.j_oTag) {
23730
23699
  this.jsxReadString(code2);
23731
23700
  return;
23732
23701
  }
@@ -23745,18 +23714,18 @@ var jsx = (superClass) => class JSXParserMixin extends superClass {
23745
23714
  const {context, type} = this.state;
23746
23715
 
23747
23716
  if (type === 52 && prevType === 138) {
23748
- context.splice(-2, 2, types$2.j_cTag);
23717
+ context.splice(-2, 2, types.j_cTag);
23749
23718
  this.state.canStartJSXElement = false;
23750
23719
  } else if (type === 138) {
23751
- context.push(types$2.j_oTag);
23720
+ context.push(types.j_oTag);
23752
23721
  } else if (type === 139) {
23753
23722
  const out = context[context.length - 1];
23754
23723
 
23755
- if (out === types$2.j_oTag && prevType === 52 || out === types$2.j_cTag) {
23724
+ if (out === types.j_oTag && prevType === 52 || out === types.j_cTag) {
23756
23725
  context.pop();
23757
- this.state.canStartJSXElement = context[context.length - 1] === types$2.j_expr;
23726
+ this.state.canStartJSXElement = context[context.length - 1] === types.j_expr;
23758
23727
  } else {
23759
- this.setContext(types$2.j_expr);
23728
+ this.setContext(types.j_expr);
23760
23729
  this.state.canStartJSXElement = true;
23761
23730
  }
23762
23731
  } else {
@@ -24338,7 +24307,7 @@ var State$2 = class _State {
24338
24307
  end = 0;
24339
24308
  lastTokEndLoc = null;
24340
24309
  lastTokStartLoc = null;
24341
- context = [types$2.brace];
24310
+ context = [types.brace];
24342
24311
  get canStartJSXElement() {
24343
24312
  return (this.flags & 1024) > 0;
24344
24313
  }
@@ -28726,7 +28695,7 @@ var typescript$1 = (superClass) => class TypeScriptParserMixin extends superClas
28726
28695
  }
28727
28696
 
28728
28697
  tsInTopLevelContext(cb) {
28729
- if (this.curContext() !== types$2.brace) {
28698
+ if (this.curContext() !== types.brace) {
28730
28699
  const oldContext = this.state.context;
28731
28700
 
28732
28701
  this.state.context = [oldContext[0]];
@@ -29112,7 +29081,7 @@ var typescript$1 = (superClass) => class TypeScriptParserMixin extends superClas
29112
29081
 
29113
29082
  if (node.params.length === 0) {
29114
29083
  this.raise(TSErrors.EmptyTypeArguments, node);
29115
- } else if (!this.state.inType && this.curContext() === types$2.brace) {
29084
+ } else if (!this.state.inType && this.curContext() === types.brace) {
29116
29085
  this.reScan_lt_gt();
29117
29086
  }
29118
29087
 
@@ -30019,7 +29988,7 @@ var typescript$1 = (superClass) => class TypeScriptParserMixin extends superClas
30019
29988
 
30020
29989
  const currentContext = context[context.length - 1];
30021
29990
 
30022
- if (currentContext === types$2.j_oTag || currentContext === types$2.j_expr) {
29991
+ if (currentContext === types.j_oTag || currentContext === types.j_expr) {
30023
29992
  context.pop();
30024
29993
  }
30025
29994
  }
@@ -35636,16 +35605,6 @@ function parse$9(input, options) {
35636
35605
  }
35637
35606
  }
35638
35607
 
35639
- function parseExpression$1(input, options) {
35640
- const parser = getParser$1(options, input);
35641
-
35642
- if (parser.options.strictMode) {
35643
- parser.state.strict = true;
35644
- }
35645
-
35646
- return parser.getExpression();
35647
- }
35648
-
35649
35608
  function generateExportedTokenTypes(internalTokenTypes) {
35650
35609
  const tokenTypes2 = {};
35651
35610
 
@@ -35656,7 +35615,7 @@ function generateExportedTokenTypes(internalTokenTypes) {
35656
35615
  return tokenTypes2;
35657
35616
  }
35658
35617
 
35659
- var tokTypes = generateExportedTokenTypes(tt);
35618
+ generateExportedTokenTypes(tt);
35660
35619
 
35661
35620
  function getParser$1(options, input) {
35662
35621
  let cls = Parser;
@@ -44863,7 +44822,7 @@ function verify$1(visitor) {
44863
44822
  continue;
44864
44823
 
44865
44824
  if (!TYPES2.includes(nodeType)) {
44866
- throw new Error(`You gave us a visitor for the node type ${nodeType} but it's not a valid type in @babel/traverse ${'8.0.0-beta.3'}`);
44825
+ throw new Error(`You gave us a visitor for the node type ${nodeType} but it's not a valid type in @babel/traverse ${'8.0.0-beta.4'}`);
44867
44826
  }
44868
44827
 
44869
44828
  const visitors2 = visitor[nodeType];
@@ -47789,7 +47748,7 @@ function replaceWithSourceString(replacement) {
47789
47748
  return this.replaceWith(expressionAST);
47790
47749
  }
47791
47750
 
47792
- function replaceWith$3(replacementPath) {
47751
+ function replaceWith$1(replacementPath) {
47793
47752
  resync.call(this);
47794
47753
 
47795
47754
  if (this.removed) {
@@ -50418,7 +50377,7 @@ var methods = {
50418
50377
  isGenericType,
50419
50378
  replaceWithMultiple: replaceWithMultiple$1,
50420
50379
  replaceWithSourceString,
50421
- replaceWith: replaceWith$3,
50380
+ replaceWith: replaceWith$1,
50422
50381
  replaceExpressionWithStatements,
50423
50382
  replaceInline,
50424
50383
  evaluateTruthy,
@@ -50475,7 +50434,7 @@ var methods = {
50475
50434
  };
50476
50435
 
50477
50436
  Object.assign(NodePath_Final.prototype, methods);
50478
- for (const type of TYPES$4) {
50437
+ for (const type of TYPES$3) {
50479
50438
  const typeKey = `is${type}`;
50480
50439
  const fn = lib_exports[typeKey];
50481
50440
 
@@ -50494,8 +50453,8 @@ for (const type of Object.keys(virtualTypes)) {
50494
50453
  if (type.startsWith('_'))
50495
50454
  continue;
50496
50455
 
50497
- if (!TYPES$4.includes(type))
50498
- TYPES$4.push(type);
50456
+ if (!TYPES$3.includes(type))
50457
+ TYPES$3.push(type);
50499
50458
  }
50500
50459
 
50501
50460
  var {VISITOR_KEYS: VISITOR_KEYS$2} = lib_exports;
@@ -51167,19 +51126,7 @@ traverse3.hasType = function(tree, type, denylistTypes) {
51167
51126
  };
51168
51127
  traverse3.cache = cache;
51169
51128
 
51170
- var bundle = /*#__PURE__*/Object.freeze({
51171
- __proto__: null,
51172
- codeFrameColumns: codeFrameColumns,
51173
- generate: generate$1,
51174
- parse: parse$9,
51175
- parseExpression: parseExpression$1,
51176
- template: index,
51177
- tokTypes: tokTypes,
51178
- traverse: traverse3,
51179
- types: lib_exports
51180
- });
51181
-
51182
- const TYPES$3 = {
51129
+ const TYPES$2 = {
51183
51130
  TOKEN: 'Token',
51184
51131
  NEWLINE: 'Newline',
51185
51132
  SPLITTER: 'Splitter',
@@ -52879,7 +52826,7 @@ function maybePrintBrace(brace, path, printer, semantics) {
52879
52826
 
52880
52827
  const {isArrayExpression: isArrayExpression$8} = lib_exports;
52881
52828
 
52882
- const TYPES$2 = [
52829
+ const TYPES$1 = [
52883
52830
  'NullLiteral',
52884
52831
  'NumericLiteral',
52885
52832
  'BigIntLiteral',
@@ -52896,7 +52843,7 @@ const isInsideTuple = (path) => {
52896
52843
  if (second !== path.node)
52897
52844
  return false;
52898
52845
 
52899
- return TYPES$2.includes(first.type);
52846
+ return TYPES$1.includes(first.type);
52900
52847
  };
52901
52848
 
52902
52849
  const {
@@ -54040,7 +53987,7 @@ function usedInAssignment(path) {
54040
53987
  return false;
54041
53988
  }
54042
53989
 
54043
- const {entries: entries$a} = Object;
53990
+ const {entries: entries$b} = Object;
54044
53991
  const isOneDeclaration = ({node}) => node.declarations.length === 1;
54045
53992
 
54046
53993
  const remove = (path) => {
@@ -54066,7 +54013,7 @@ const remove = (path) => {
54066
54013
  const elements = path.parentPath.get('elements');
54067
54014
  const n = elements.length - 1;
54068
54015
 
54069
- for (const [i, el] of entries$a(elements)) {
54016
+ for (const [i, el] of entries$b(elements)) {
54070
54017
  if (el !== path)
54071
54018
  continue;
54072
54019
 
@@ -54296,7 +54243,7 @@ const getProperties = (path, names) => {
54296
54243
  return result;
54297
54244
  };
54298
54245
 
54299
- const getProperty$2 = (path, name) => {
54246
+ const getProperty = (path, name) => {
54300
54247
  if (!isObjectExpression$4(path) && !isObjectPattern$1(path))
54301
54248
  throw Error(`☝️Looks like path is not 'ObjectExpression | ObjectPattern', but: '${path.type}' for path: ${path}`);
54302
54249
 
@@ -54442,7 +54389,7 @@ const parseNode$2 = (a) => {
54442
54389
  return a;
54443
54390
  };
54444
54391
 
54445
- const replaceWith$2 = (path, node) => {
54392
+ const replaceWith = (path, node) => {
54446
54393
  node = parseNode$2(node);
54447
54394
 
54448
54395
  if (path?.parentPath?.isExpressionStatement() && !path.parentPath.isProgram()) {
@@ -54543,34 +54490,6 @@ const isESM = (path) => {
54543
54490
  return false;
54544
54491
  };
54545
54492
 
54546
- var operate = /*#__PURE__*/Object.freeze({
54547
- __proto__: null,
54548
- compute: compute,
54549
- extract: extract,
54550
- findBinding: findBinding,
54551
- getBinding: getBinding,
54552
- getBindingPath: getBindingPath,
54553
- getExportDefault: getExportDefault,
54554
- getLiteralRaw: getLiteralRaw,
54555
- getPathAfterImports: getPathAfterImports,
54556
- getPathAfterRequires: getPathAfterRequires,
54557
- getProperties: getProperties,
54558
- getProperty: getProperty$2,
54559
- insertAfter: insertAfter,
54560
- insertBefore: insertBefore,
54561
- isESM: isESM,
54562
- isModuleExports: isModuleExports,
54563
- isSimple: isSimple,
54564
- remove: remove,
54565
- rename: rename,
54566
- renameProperty: renameProperty,
54567
- replaceWith: replaceWith$2,
54568
- replaceWithMultiple: replaceWithMultiple,
54569
- setLiteralValue: setLiteralValue,
54570
- toExpression: toExpression,
54571
- traverseProperties: traverseProperties
54572
- });
54573
-
54574
54493
  const {
54575
54494
  isObjectExpression: isObjectExpression$3,
54576
54495
  isArrayExpression: isArrayExpression$3,
@@ -56002,6 +55921,35 @@ const ExportNamedDeclaration = {
56002
55921
  },
56003
55922
  };
56004
55923
 
55924
+ function getAugmentedNamespace(n) {
55925
+ if (Object.prototype.hasOwnProperty.call(n, '__esModule')) return n;
55926
+ var f = n.default;
55927
+ if (typeof f == "function") {
55928
+ var a = function a () {
55929
+ var isInstance = false;
55930
+ try {
55931
+ isInstance = this instanceof a;
55932
+ } catch {}
55933
+ if (isInstance) {
55934
+ return Reflect.construct(f, arguments, this.constructor);
55935
+ }
55936
+ return f.apply(this, arguments);
55937
+ };
55938
+ a.prototype = f.prototype;
55939
+ } else a = {};
55940
+ Object.defineProperty(a, '__esModule', {value: true});
55941
+ Object.keys(n).forEach(function (k) {
55942
+ var d = Object.getOwnPropertyDescriptor(n, k);
55943
+ Object.defineProperty(a, k, d.get ? d : {
55944
+ enumerable: true,
55945
+ get: function () {
55946
+ return n[k];
55947
+ }
55948
+ });
55949
+ });
55950
+ return a;
55951
+ }
55952
+
56005
55953
  var parseImportSpecifiers_1 = (specifiers) => {
56006
55954
  const defaults = [];
56007
55955
  const namespaces = [];
@@ -58660,168 +58608,168 @@ const JSXClosingElement = (path, {print}) => {
58660
58608
  };
58661
58609
 
58662
58610
  var baseVisitors = /*#__PURE__*/Object.freeze({
58663
- __proto__: null,
58664
- ArrayExpression: ArrayExpression,
58665
- ArrayPattern: ArrayPattern,
58666
- ArrowFunctionExpression: ArrowFunctionExpression,
58667
- AssignmentExpression: AssignmentExpression,
58668
- AssignmentPattern: AssignmentPattern,
58669
- AwaitExpression: AwaitExpression,
58670
- BigIntLiteral: BigIntLiteral,
58671
- BinaryExpression: BinaryExpression,
58672
- BlockStatement: BlockStatement,
58673
- BooleanLiteral: BooleanLiteral,
58674
- BreakStatement: BreakStatement,
58675
- CallExpression: CallExpression,
58676
- CatchClause: CatchClause,
58677
- ClassAccessorProperty: ClassAccessorProperty,
58678
- ClassDeclaration: ClassDeclaration,
58679
- ClassExpression: ClassExpression,
58680
- ClassMethod: ClassMethod,
58681
- ClassPrivateMethod: ClassPrivateMethod,
58682
- ClassPrivateProperty: ClassPrivateProperty,
58683
- ClassProperty: ClassProperty,
58684
- ConditionalExpression: ConditionalExpression,
58685
- ContinueStatement: ContinueStatement,
58686
- DebuggerStatement: DebuggerStatement,
58687
- Decorator: Decorator,
58688
- Directive: Directive,
58689
- DirectiveLiteral: DirectiveLiteral,
58690
- DoWhileStatement: DoWhileStatement,
58691
- EmptyStatement: EmptyStatement,
58692
- ExportAllDeclaration: ExportAllDeclaration,
58693
- ExportDefaultDeclaration: ExportDefaultDeclaration,
58694
- ExportDefaultSpecifier: ExportDefaultSpecifier,
58695
- ExportNamedDeclaration: ExportNamedDeclaration,
58696
- ExportNamespaceSpecifier: ExportNamespaceSpecifier,
58697
- ExportSpecifier: ExportSpecifier,
58698
- ExpressionStatement: ExpressionStatement,
58699
- ForInStatement: ForInStatement,
58700
- ForOfStatement: ForOfStatement,
58701
- ForStatement: ForStatement,
58702
- FunctionDeclaration: FunctionDeclaration,
58703
- FunctionExpression: FunctionExpression,
58704
- Identifier: Identifier,
58705
- IfStatement: IfStatement,
58706
- ImportAttribute: ImportAttribute,
58707
- ImportDeclaration: ImportDeclaration,
58708
- ImportExpression: ImportExpression,
58709
- InterpreterDirective: InterpreterDirective,
58710
- JSXAttribute: JSXAttribute,
58711
- JSXClosingElement: JSXClosingElement,
58712
- JSXClosingFragment: JSXClosingFragment,
58713
- JSXElement: JSXElement,
58714
- JSXEmptyExpression: JSXEmptyExpression,
58715
- JSXExpressionContainer: JSXExpressionContainer,
58716
- JSXFragment: JSXFragment,
58717
- JSXIdentifier: JSXIdentifier,
58718
- JSXMemberExpression: JSXMemberExpression,
58719
- JSXOpeningElement: JSXOpeningElement,
58720
- JSXOpeningFragment: JSXOpeningFragment,
58721
- JSXSpreadAttribute: JSXSpreadAttribute,
58722
- JSXText: JSXText,
58723
- LabeledStatement: LabeledStatement,
58724
- LogicalExpression: LogicalExpression,
58725
- MemberExpression: MemberExpression,
58726
- MetaProperty: MetaProperty,
58727
- NewExpression: NewExpression,
58728
- NullLiteral: NullLiteral,
58729
- NumericLiteral: NumericLiteral,
58730
- ObjectExpression: ObjectExpression,
58731
- ObjectMethod: ObjectMethod,
58732
- ObjectPattern: ObjectPattern,
58733
- ObjectProperty: ObjectProperty,
58734
- OptionalCallExpression: OptionalCallExpression,
58735
- OptionalMemberExpression: OptionalMemberExpression,
58736
- ParenthesizedExpression: ParenthesizedExpression,
58737
- PrivateName: PrivateName,
58738
- Program: Program,
58739
- RegExpLiteral: RegExpLiteral,
58740
- RestElement: RestElement,
58741
- ReturnStatement: ReturnStatement,
58742
- SequenceExpression: SequenceExpression,
58743
- SpreadElement: SpreadElement,
58744
- StaticBlock: StaticBlock,
58745
- StringLiteral: StringLiteral,
58746
- Super: Super,
58747
- SwitchStatement: SwitchStatement,
58748
- TSAnyKeyword: TSAnyKeyword,
58749
- TSArrayType: TSArrayType,
58750
- TSAsExpression: TSAsExpression,
58751
- TSBigIntKeyword: TSBigIntKeyword,
58752
- TSBooleanKeyword: TSBooleanKeyword,
58753
- TSCallSignatureDeclaration: TSCallSignatureDeclaration,
58754
- TSClassImplements: TSClassImplements,
58755
- TSConditionalType: TSConditionalType,
58756
- TSConstructSignatureDeclaration: TSConstructSignatureDeclaration,
58757
- TSConstructorType: TSConstructorType,
58758
- TSDeclareFunction: TSDeclareFunction,
58759
- TSDeclareMethod: TSDeclareMethod,
58760
- TSEnumDeclaration: TSEnumDeclaration,
58761
- TSEnumMember: TSEnumMember,
58762
- TSExportAssignment: TSExportAssignment,
58763
- TSExternalModuleReference: TSExternalModuleReference,
58764
- TSFunctionType: TSFunctionType,
58765
- TSImportEqualsDeclaration: TSImportEqualsDeclaration,
58766
- TSImportType: TSImportType,
58767
- TSIndexSignature: TSIndexSignature,
58768
- TSIndexedAccessType: TSIndexedAccessType,
58769
- TSInferType: TSInferType,
58770
- TSInstantiationExpression: TSInstantiationExpression,
58771
- TSInterfaceBody: TSInterfaceBody,
58772
- TSInterfaceDeclaration: TSInterfaceDeclaration,
58773
- TSInterfaceHeritage: TSInterfaceHeritage,
58774
- TSIntersectionType: TSIntersectionType,
58775
- TSLiteralType: TSLiteralType,
58776
- TSMappedType: TSMappedType,
58777
- TSMethodSignature: TSMethodSignature,
58778
- TSModuleBlock: TSModuleBlock,
58779
- TSModuleDeclaration: TSModuleDeclaration,
58780
- TSNamedTupleMember: TSNamedTupleMember,
58781
- TSNeverKeyword: TSNeverKeyword,
58782
- TSNonNullExpression: TSNonNullExpression,
58783
- TSNullKeyword: TSNullKeyword,
58784
- TSNumberKeyword: TSNumberKeyword,
58785
- TSObjectKeyword: TSObjectKeyword,
58786
- TSOptionalType: TSOptionalType,
58787
- TSParameterProperty: TSParameterProperty,
58788
- TSParenthesizedType: TSParenthesizedType,
58789
- TSPropertySignature: TSPropertySignature,
58790
- TSQualifiedName: TSQualifiedName,
58791
- TSRestType: TSRestType,
58792
- TSSatisfiesExpression: TSSatisfiesExpression,
58793
- TSStringKeyword: TSStringKeyword,
58794
- TSSymbolKeyword: TSSymbolKeyword,
58795
- TSTemplateLiteralType: TSTemplateLiteralType,
58796
- TSThisType: TSThisType,
58797
- TSTupleType: TSTupleType,
58798
- TSTypeAliasDeclaration: TSTypeAliasDeclaration,
58799
- TSTypeAnnotation: TSTypeAnnotation,
58800
- TSTypeAssertion: TSTypeAssertion,
58801
- TSTypeLiteral: TSTypeLiteral,
58802
- TSTypeOperator: TSTypeOperator,
58803
- TSTypeParameter: TSTypeParameter,
58804
- TSTypeParameterDeclaration: TSTypeParameterDeclaration,
58805
- TSTypeParameterInstantiation: TSTypeParameterInstantiation,
58806
- TSTypePredicate: TSTypePredicate,
58807
- TSTypeQuery: TSTypeQuery,
58808
- TSTypeReference: TSTypeReference,
58809
- TSUndefinedKeyword: TSUndefinedKeyword,
58810
- TSUnionType: TSUnionType,
58811
- TSUnknownKeyword: TSUnknownKeyword,
58812
- TSVoidKeyword: TSVoidKeyword,
58813
- TaggedTemplateExpression: TaggedTemplateExpression,
58814
- TemplateLiteral: TemplateLiteral,
58815
- ThisExpression: ThisExpression,
58816
- ThrowStatement: ThrowStatement,
58817
- TryStatement: TryStatement,
58818
- UnaryExpression: UnaryExpression,
58819
- UpdateExpression: UpdateExpression,
58820
- VariableDeclaration: VariableDeclaration,
58821
- VoidPattern: VoidPattern,
58822
- WhileStatement: WhileStatement,
58823
- WithStatement: WithStatement,
58824
- YieldExpression: YieldExpression
58611
+ __proto__: null,
58612
+ ArrayExpression: ArrayExpression,
58613
+ ArrayPattern: ArrayPattern,
58614
+ ArrowFunctionExpression: ArrowFunctionExpression,
58615
+ AssignmentExpression: AssignmentExpression,
58616
+ AssignmentPattern: AssignmentPattern,
58617
+ AwaitExpression: AwaitExpression,
58618
+ BigIntLiteral: BigIntLiteral,
58619
+ BinaryExpression: BinaryExpression,
58620
+ BlockStatement: BlockStatement,
58621
+ BooleanLiteral: BooleanLiteral,
58622
+ BreakStatement: BreakStatement,
58623
+ CallExpression: CallExpression,
58624
+ CatchClause: CatchClause,
58625
+ ClassAccessorProperty: ClassAccessorProperty,
58626
+ ClassDeclaration: ClassDeclaration,
58627
+ ClassExpression: ClassExpression,
58628
+ ClassMethod: ClassMethod,
58629
+ ClassPrivateMethod: ClassPrivateMethod,
58630
+ ClassPrivateProperty: ClassPrivateProperty,
58631
+ ClassProperty: ClassProperty,
58632
+ ConditionalExpression: ConditionalExpression,
58633
+ ContinueStatement: ContinueStatement,
58634
+ DebuggerStatement: DebuggerStatement,
58635
+ Decorator: Decorator,
58636
+ Directive: Directive,
58637
+ DirectiveLiteral: DirectiveLiteral,
58638
+ DoWhileStatement: DoWhileStatement,
58639
+ EmptyStatement: EmptyStatement,
58640
+ ExportAllDeclaration: ExportAllDeclaration,
58641
+ ExportDefaultDeclaration: ExportDefaultDeclaration,
58642
+ ExportDefaultSpecifier: ExportDefaultSpecifier,
58643
+ ExportNamedDeclaration: ExportNamedDeclaration,
58644
+ ExportNamespaceSpecifier: ExportNamespaceSpecifier,
58645
+ ExportSpecifier: ExportSpecifier,
58646
+ ExpressionStatement: ExpressionStatement,
58647
+ ForInStatement: ForInStatement,
58648
+ ForOfStatement: ForOfStatement,
58649
+ ForStatement: ForStatement,
58650
+ FunctionDeclaration: FunctionDeclaration,
58651
+ FunctionExpression: FunctionExpression,
58652
+ Identifier: Identifier,
58653
+ IfStatement: IfStatement,
58654
+ ImportAttribute: ImportAttribute,
58655
+ ImportDeclaration: ImportDeclaration,
58656
+ ImportExpression: ImportExpression,
58657
+ InterpreterDirective: InterpreterDirective,
58658
+ JSXAttribute: JSXAttribute,
58659
+ JSXClosingElement: JSXClosingElement,
58660
+ JSXClosingFragment: JSXClosingFragment,
58661
+ JSXElement: JSXElement,
58662
+ JSXEmptyExpression: JSXEmptyExpression,
58663
+ JSXExpressionContainer: JSXExpressionContainer,
58664
+ JSXFragment: JSXFragment,
58665
+ JSXIdentifier: JSXIdentifier,
58666
+ JSXMemberExpression: JSXMemberExpression,
58667
+ JSXOpeningElement: JSXOpeningElement,
58668
+ JSXOpeningFragment: JSXOpeningFragment,
58669
+ JSXSpreadAttribute: JSXSpreadAttribute,
58670
+ JSXText: JSXText,
58671
+ LabeledStatement: LabeledStatement,
58672
+ LogicalExpression: LogicalExpression,
58673
+ MemberExpression: MemberExpression,
58674
+ MetaProperty: MetaProperty,
58675
+ NewExpression: NewExpression,
58676
+ NullLiteral: NullLiteral,
58677
+ NumericLiteral: NumericLiteral,
58678
+ ObjectExpression: ObjectExpression,
58679
+ ObjectMethod: ObjectMethod,
58680
+ ObjectPattern: ObjectPattern,
58681
+ ObjectProperty: ObjectProperty,
58682
+ OptionalCallExpression: OptionalCallExpression,
58683
+ OptionalMemberExpression: OptionalMemberExpression,
58684
+ ParenthesizedExpression: ParenthesizedExpression,
58685
+ PrivateName: PrivateName,
58686
+ Program: Program,
58687
+ RegExpLiteral: RegExpLiteral,
58688
+ RestElement: RestElement,
58689
+ ReturnStatement: ReturnStatement,
58690
+ SequenceExpression: SequenceExpression,
58691
+ SpreadElement: SpreadElement,
58692
+ StaticBlock: StaticBlock,
58693
+ StringLiteral: StringLiteral,
58694
+ Super: Super,
58695
+ SwitchStatement: SwitchStatement,
58696
+ TSAnyKeyword: TSAnyKeyword,
58697
+ TSArrayType: TSArrayType,
58698
+ TSAsExpression: TSAsExpression,
58699
+ TSBigIntKeyword: TSBigIntKeyword,
58700
+ TSBooleanKeyword: TSBooleanKeyword,
58701
+ TSCallSignatureDeclaration: TSCallSignatureDeclaration,
58702
+ TSClassImplements: TSClassImplements,
58703
+ TSConditionalType: TSConditionalType,
58704
+ TSConstructSignatureDeclaration: TSConstructSignatureDeclaration,
58705
+ TSConstructorType: TSConstructorType,
58706
+ TSDeclareFunction: TSDeclareFunction,
58707
+ TSDeclareMethod: TSDeclareMethod,
58708
+ TSEnumDeclaration: TSEnumDeclaration,
58709
+ TSEnumMember: TSEnumMember,
58710
+ TSExportAssignment: TSExportAssignment,
58711
+ TSExternalModuleReference: TSExternalModuleReference,
58712
+ TSFunctionType: TSFunctionType,
58713
+ TSImportEqualsDeclaration: TSImportEqualsDeclaration,
58714
+ TSImportType: TSImportType,
58715
+ TSIndexSignature: TSIndexSignature,
58716
+ TSIndexedAccessType: TSIndexedAccessType,
58717
+ TSInferType: TSInferType,
58718
+ TSInstantiationExpression: TSInstantiationExpression,
58719
+ TSInterfaceBody: TSInterfaceBody,
58720
+ TSInterfaceDeclaration: TSInterfaceDeclaration,
58721
+ TSInterfaceHeritage: TSInterfaceHeritage,
58722
+ TSIntersectionType: TSIntersectionType,
58723
+ TSLiteralType: TSLiteralType,
58724
+ TSMappedType: TSMappedType,
58725
+ TSMethodSignature: TSMethodSignature,
58726
+ TSModuleBlock: TSModuleBlock,
58727
+ TSModuleDeclaration: TSModuleDeclaration,
58728
+ TSNamedTupleMember: TSNamedTupleMember,
58729
+ TSNeverKeyword: TSNeverKeyword,
58730
+ TSNonNullExpression: TSNonNullExpression,
58731
+ TSNullKeyword: TSNullKeyword,
58732
+ TSNumberKeyword: TSNumberKeyword,
58733
+ TSObjectKeyword: TSObjectKeyword,
58734
+ TSOptionalType: TSOptionalType,
58735
+ TSParameterProperty: TSParameterProperty,
58736
+ TSParenthesizedType: TSParenthesizedType,
58737
+ TSPropertySignature: TSPropertySignature,
58738
+ TSQualifiedName: TSQualifiedName,
58739
+ TSRestType: TSRestType,
58740
+ TSSatisfiesExpression: TSSatisfiesExpression,
58741
+ TSStringKeyword: TSStringKeyword,
58742
+ TSSymbolKeyword: TSSymbolKeyword,
58743
+ TSTemplateLiteralType: TSTemplateLiteralType,
58744
+ TSThisType: TSThisType,
58745
+ TSTupleType: TSTupleType,
58746
+ TSTypeAliasDeclaration: TSTypeAliasDeclaration,
58747
+ TSTypeAnnotation: TSTypeAnnotation,
58748
+ TSTypeAssertion: TSTypeAssertion,
58749
+ TSTypeLiteral: TSTypeLiteral,
58750
+ TSTypeOperator: TSTypeOperator,
58751
+ TSTypeParameter: TSTypeParameter,
58752
+ TSTypeParameterDeclaration: TSTypeParameterDeclaration,
58753
+ TSTypeParameterInstantiation: TSTypeParameterInstantiation,
58754
+ TSTypePredicate: TSTypePredicate,
58755
+ TSTypeQuery: TSTypeQuery,
58756
+ TSTypeReference: TSTypeReference,
58757
+ TSUndefinedKeyword: TSUndefinedKeyword,
58758
+ TSUnionType: TSUnionType,
58759
+ TSUnknownKeyword: TSUnknownKeyword,
58760
+ TSVoidKeyword: TSVoidKeyword,
58761
+ TaggedTemplateExpression: TaggedTemplateExpression,
58762
+ TemplateLiteral: TemplateLiteral,
58763
+ ThisExpression: ThisExpression,
58764
+ ThrowStatement: ThrowStatement,
58765
+ TryStatement: TryStatement,
58766
+ UnaryExpression: UnaryExpression,
58767
+ UpdateExpression: UpdateExpression,
58768
+ VariableDeclaration: VariableDeclaration,
58769
+ VoidPattern: VoidPattern,
58770
+ WhileStatement: WhileStatement,
58771
+ WithStatement: WithStatement,
58772
+ YieldExpression: YieldExpression
58825
58773
  });
58826
58774
 
58827
58775
  const isString$c = (a) => typeof a === 'string';
@@ -59007,7 +58955,7 @@ const createDebug$4 = (tokens) => (a) => {
59007
58955
  return;
59008
58956
 
59009
58957
  tokens.push({
59010
- type: TYPES$3.DEBUG,
58958
+ type: TYPES$2.DEBUG,
59011
58959
  value: `/*__${stringSnakeCase(a)}*/`,
59012
58960
  });
59013
58961
  };
@@ -59192,14 +59140,14 @@ const tokenize = (ast, overrides) => {
59192
59140
 
59193
59141
  const write = (value) => {
59194
59142
  addToken({
59195
- type: TYPES$3.TOKEN,
59143
+ type: TYPES$2.TOKEN,
59196
59144
  value,
59197
59145
  });
59198
59146
  };
59199
59147
 
59200
59148
  const indent = () => {
59201
59149
  addToken({
59202
- type: TYPES$3.INDENT,
59150
+ type: TYPES$2.INDENT,
59203
59151
  value: printIndent(i, format.indent),
59204
59152
  });
59205
59153
  };
@@ -59212,7 +59160,7 @@ const tokenize = (ast, overrides) => {
59212
59160
 
59213
59161
  const newline = () => {
59214
59162
  addToken({
59215
- type: TYPES$3.NEWLINE,
59163
+ type: TYPES$2.NEWLINE,
59216
59164
  value: format.newline,
59217
59165
  });
59218
59166
  };
@@ -59236,7 +59184,7 @@ const tokenize = (ast, overrides) => {
59236
59184
 
59237
59185
  const space = () => {
59238
59186
  addToken({
59239
- type: TYPES$3.SPACE,
59187
+ type: TYPES$2.SPACE,
59240
59188
  value: format.space,
59241
59189
  });
59242
59190
  };
@@ -59253,21 +59201,21 @@ const tokenize = (ast, overrides) => {
59253
59201
 
59254
59202
  const splitter = () => {
59255
59203
  addToken({
59256
- type: TYPES$3.SPLITTER,
59204
+ type: TYPES$2.SPLITTER,
59257
59205
  value: format.splitter,
59258
59206
  });
59259
59207
  };
59260
59208
 
59261
59209
  const quote = () => {
59262
59210
  addToken({
59263
- type: TYPES$3.QUOTE,
59211
+ type: TYPES$2.QUOTE,
59264
59212
  value: format.quote,
59265
59213
  });
59266
59214
  };
59267
59215
 
59268
59216
  const endOfFile = () => {
59269
59217
  addToken({
59270
- type: TYPES$3.END_OF_FILE,
59218
+ type: TYPES$2.END_OF_FILE,
59271
59219
  value: format.endOfFile,
59272
59220
  });
59273
59221
  };
@@ -59310,7 +59258,7 @@ const tokenize = (ast, overrides) => {
59310
59258
  traverse,
59311
59259
  maybe,
59312
59260
  quote,
59313
- store: fullstore$2(),
59261
+ store: fullstore(),
59314
59262
  });
59315
59263
 
59316
59264
  const currentTraversers = {
@@ -59468,20 +59416,59 @@ var lib = removeBlankLines;
59468
59416
 
59469
59417
  var removeBlankLines$1 = lib.default;
59470
59418
 
59471
- const __json_name$1 = '__putout_processor_json';
59472
- const __yaml_name$1 = '__putout_processor_yaml';
59473
- const __filesystem_name$3 = '__putout_processor_filesystem';
59474
- const __ignore_name$1 = '__putout_processor_ignore';
59419
+ const cut$1 = (a) => a.slice(0, a.indexOf('('));
59420
+ const createPrefix = (name) => {
59421
+ if (name.includes('('))
59422
+ return `${cut$1(name)}(`;
59423
+
59424
+ return `${name}(`;
59425
+ };
59475
59426
 
59476
- const TYPES$1 = [
59477
- __json_name$1,
59478
- __yaml_name$1,
59479
- __filesystem_name$3,
59480
- __ignore_name$1,
59427
+ const createSuffix = () => ');\n';
59428
+ const maybeNewline = (a) => a.at(-1) === '\n' ? a : `${a}\n`;
59429
+
59430
+ const __json_name = '__putout_processor_json';
59431
+ const __yaml_name = '__putout_processor_yaml';
59432
+ const __toml_name = '__putout_processor_toml';
59433
+ const __filesystem_name = '__putout_processor_filesystem';
59434
+ const __ignore_name = '__putout_processor_ignore';
59435
+
59436
+ const __json = `${__json_name}(__object)`;
59437
+ const __yaml = `${__yaml_name}(__object)`;
59438
+ const __toml = `${__toml_name}(__object)`;
59439
+ const __filesystem = `${__filesystem_name}(__object)`;
59440
+ const __ignore = `${__ignore_name}(__array)`;
59441
+
59442
+ const TYPES = [
59443
+ __json_name,
59444
+ __yaml_name,
59445
+ __filesystem_name,
59446
+ __ignore_name,
59481
59447
  ];
59482
59448
 
59483
- var isJSON$1 = (source) => {
59484
- for (const type of TYPES$1) {
59449
+ const toJS = (source, name = __json) => {
59450
+ const prefix = createPrefix(name);
59451
+ const suffix = createSuffix();
59452
+
59453
+ return `${prefix}${source}${suffix}`;
59454
+ };
59455
+
59456
+ const fromJS = (source, name = __json) => {
59457
+ source = maybeNewline(source);
59458
+ const shortName = cut$1(name);
59459
+
59460
+ source = source.slice(source.indexOf(shortName));
59461
+
59462
+ const prefix = createPrefix(name);
59463
+ const suffix = createSuffix();
59464
+ const length = source.length - suffix.length;
59465
+ const sliced = source.slice(prefix.length, length);
59466
+
59467
+ return maybeNewline(removeBlankLines$1(sliced));
59468
+ };
59469
+
59470
+ const isJSON = (source) => {
59471
+ for (const type of TYPES) {
59485
59472
  if (!source.indexOf(type))
59486
59473
  return true;
59487
59474
  }
@@ -59534,7 +59521,7 @@ function isASTJSON(ast) {
59534
59521
  if (!isIdentifier$5(callee))
59535
59522
  return false;
59536
59523
 
59537
- return isJSON$1(callee.name);
59524
+ return isJSON(callee.name);
59538
59525
  }
59539
59526
 
59540
59527
  const print$2 = (ast, overrides = {}) => {
@@ -60230,11 +60217,11 @@ var onceExports = once$6.exports;
60230
60217
  const noop$3 = () => {};
60231
60218
 
60232
60219
  var empty = /*#__PURE__*/Object.freeze({
60233
- __proto__: null,
60234
- default: noop$3
60220
+ __proto__: null,
60221
+ default: noop$3
60235
60222
  });
60236
60223
 
60237
- var require$$1$1 = /*@__PURE__*/getAugmentedNamespace(empty);
60224
+ var require$$1 = /*@__PURE__*/getAugmentedNamespace(empty);
60238
60225
 
60239
60226
  // eslint-disable-next-line node/no-unsupported-features/es-syntax
60240
60227
 
@@ -60262,11 +60249,11 @@ function privateMethods(Parser) {
60262
60249
  }
60263
60250
 
60264
60251
  var acornPrivateMethods = /*#__PURE__*/Object.freeze({
60265
- __proto__: null,
60266
- default: privateMethods
60252
+ __proto__: null,
60253
+ default: privateMethods
60267
60254
  });
60268
60255
 
60269
- var require$$2$1 = /*@__PURE__*/getAugmentedNamespace(acornPrivateMethods);
60256
+ var require$$2 = /*@__PURE__*/getAugmentedNamespace(acornPrivateMethods);
60270
60257
 
60271
60258
  var acornStage3;
60272
60259
  var hasRequiredAcornStage3;
@@ -60277,9 +60264,9 @@ function requireAcornStage3 () {
60277
60264
 
60278
60265
  acornStage3 = function(Parser) {
60279
60266
  return Parser.extend(
60280
- require$$1$1,
60281
- require$$1$1,
60282
- require$$2$1
60267
+ require$$1,
60268
+ require$$1,
60269
+ require$$2
60283
60270
  )
60284
60271
  };
60285
60272
  return acornStage3;
@@ -60288,10 +60275,10 @@ function requireAcornStage3 () {
60288
60275
  const once$4 = onceExports;
60289
60276
 
60290
60277
  const initAcorn = once$4(() => {
60291
- const {Parser} = require$$1$1;
60278
+ const {Parser} = require$$1;
60292
60279
 
60293
60280
  const stage3 = requireAcornStage3();
60294
- const typescript = require$$1$1.default;
60281
+ const typescript = require$$1.default;
60295
60282
 
60296
60283
  return Parser.extend(typescript(), stage3);
60297
60284
  });
@@ -60344,10 +60331,10 @@ const allowUndeclaredExports = true;
60344
60331
  const allowImportExportEverywhere = true;
60345
60332
 
60346
60333
  var options = /*#__PURE__*/Object.freeze({
60347
- __proto__: null,
60348
- allowImportExportEverywhere: allowImportExportEverywhere,
60349
- allowReturnOutsideFunction: allowReturnOutsideFunction,
60350
- allowUndeclaredExports: allowUndeclaredExports
60334
+ __proto__: null,
60335
+ allowImportExportEverywhere: allowImportExportEverywhere,
60336
+ allowReturnOutsideFunction: allowReturnOutsideFunction,
60337
+ allowUndeclaredExports: allowUndeclaredExports
60351
60338
  });
60352
60339
 
60353
60340
  const {assign: assign$5} = Object;
@@ -60404,7 +60391,7 @@ function getBabelLangExts({isTS, isFlow, isJSX}) {
60404
60391
 
60405
60392
  const once$3 = onceExports;
60406
60393
 
60407
- const initEspree = once$3(() => require$$1$1);
60394
+ const initEspree = once$3(() => require$$1);
60408
60395
 
60409
60396
  var parse$6 = (source) => {
60410
60397
  const {parse} = initEspree();
@@ -60424,7 +60411,7 @@ var parse$6 = (source) => {
60424
60411
 
60425
60412
  const once$2 = onceExports;
60426
60413
 
60427
- const initEsprima = once$2(() => require$$1$1);
60414
+ const initEsprima = once$2(() => require$$1);
60428
60415
 
60429
60416
  var parse$5 = (source) => {
60430
60417
  const {parse} = initEsprima();
@@ -60440,7 +60427,7 @@ var parse$5 = (source) => {
60440
60427
 
60441
60428
  const once$1 = onceExports;
60442
60429
 
60443
- const initTenko = once$1(() => require$$1$1);
60430
+ const initTenko = once$1(() => require$$1);
60444
60431
 
60445
60432
  var parse$4 = (source) => {
60446
60433
  const {Tenko} = initTenko();
@@ -60454,7 +60441,7 @@ var parse$4 = (source) => {
60454
60441
  };
60455
60442
 
60456
60443
  const once = onceExports;
60457
- const initHermes = once(() => require$$1$1);
60444
+ const initHermes = once(() => require$$1);
60458
60445
 
60459
60446
  var parse$3 = (source) => {
60460
60447
  const parser = initHermes();
@@ -61011,7 +60998,7 @@ function relative(from, to) {
61011
60998
  var sep = '/';
61012
60999
  var delimiter = ':';
61013
61000
 
61014
- function dirname$1(path) {
61001
+ function dirname(path) {
61015
61002
  var result = splitPath(path),
61016
61003
  root = result[0],
61017
61004
  dir = result[1];
@@ -61029,7 +61016,7 @@ function dirname$1(path) {
61029
61016
  return root + dir;
61030
61017
  }
61031
61018
 
61032
- function basename$1(path, ext) {
61019
+ function basename(path, ext) {
61033
61020
  var f = splitPath(path)[2];
61034
61021
  // TODO: make this comparison case-insensitive on windows?
61035
61022
  if (ext && f.substr(-1 * ext.length) === ext) {
@@ -61044,8 +61031,8 @@ function extname(path) {
61044
61031
  }
61045
61032
  var path = {
61046
61033
  extname: extname,
61047
- basename: basename$1,
61048
- dirname: dirname$1,
61034
+ basename: basename,
61035
+ dirname: dirname,
61049
61036
  sep: sep,
61050
61037
  delimiter: delimiter,
61051
61038
  relative: relative,
@@ -61072,21 +61059,6 @@ var substr = 'ab'.substr(-1) === 'b' ?
61072
61059
  }
61073
61060
  ;
61074
61061
 
61075
- var _polyfillNode_path = /*#__PURE__*/Object.freeze({
61076
- __proto__: null,
61077
- basename: basename$1,
61078
- default: path,
61079
- delimiter: delimiter,
61080
- dirname: dirname$1,
61081
- extname: extname,
61082
- isAbsolute: isAbsolute,
61083
- join: join$1,
61084
- normalize: normalize,
61085
- relative: relative,
61086
- resolve: resolve,
61087
- sep: sep
61088
- });
61089
-
61090
61062
  const isFn$5 = (a) => typeof a === 'function';
61091
61063
 
61092
61064
  const tryToCatch = async (fn, ...args) => {
@@ -61104,12 +61076,12 @@ function check$a(fn) {
61104
61076
  throw Error('fn should be a function!');
61105
61077
  }
61106
61078
 
61107
- const returns$1 = (a) => () => a;
61079
+ const returns$2 = (a) => () => a;
61108
61080
  const noop$2 = () => {};
61109
61081
 
61110
61082
  const createRequire = (url, overrides = {}) => {
61111
61083
  const {module = _module} = overrides;
61112
- const {createRequire = returns$1(noop$2)} = module;
61084
+ const {createRequire = returns$2(noop$2)} = module;
61113
61085
 
61114
61086
  return createRequire(url);
61115
61087
  };
@@ -61218,7 +61190,7 @@ function buildPluginsDirs(name) {
61218
61190
 
61219
61191
  const isStr$2 = (a) => typeof a === 'string';
61220
61192
  const {isArray: isArray$a} = Array;
61221
- const {entries: entries$9} = Object;
61193
+ const {entries: entries$a} = Object;
61222
61194
 
61223
61195
  const parsePluginNames = (plugins) => {
61224
61196
  const result = [];
@@ -61235,7 +61207,7 @@ const parsePluginNames = (plugins) => {
61235
61207
  continue;
61236
61208
  }
61237
61209
 
61238
- result.push(...entries$9(plugin));
61210
+ result.push(...entries$a(plugin));
61239
61211
  }
61240
61212
 
61241
61213
  return result;
@@ -61245,7 +61217,7 @@ const {isArray: isArray$9} = Array;
61245
61217
  const isBool$1 = (a) => typeof a === 'boolean';
61246
61218
  const isStr$1 = (a) => typeof a === 'string';
61247
61219
  const isObj = (a) => typeof a === 'object';
61248
- const {entries: entries$8} = Object;
61220
+ const {entries: entries$9} = Object;
61249
61221
  const {stringify: stringify$6} = JSON;
61250
61222
 
61251
61223
  const notSupportedError = (a) => Error(`☝️ Rule format not supported ${a}: ${typeof a}`);
@@ -61272,7 +61244,7 @@ const parseRules = (rules) => {
61272
61244
 
61273
61245
  check$9(rules);
61274
61246
 
61275
- for (const [rule, value] of entries$8(rules)) {
61247
+ for (const [rule, value] of entries$9(rules)) {
61276
61248
  if (isStr$1(value)) {
61277
61249
  result.push({
61278
61250
  rule,
@@ -61357,21 +61329,6 @@ function validateState(rule, value) {
61357
61329
  });
61358
61330
  }
61359
61331
 
61360
- const cut$1 = (a) => a.split('/')[0];
61361
-
61362
- const enableNestedRules = (rules) => {
61363
- const newRules = {};
61364
-
61365
- for (const [rule, value] of entries$8(rules)) {
61366
- if (rule.includes('/') && parseState(rule, value))
61367
- newRules[cut$1(rule)] = 'on';
61368
-
61369
- newRules[rule] = value;
61370
- }
61371
-
61372
- return newRules;
61373
- };
61374
-
61375
61332
  function check$9(rules) {
61376
61333
  if (isArray$9(rules))
61377
61334
  throw Error(`☝️Looks like type of 'rules' passed to @putout/engine-loader is 'array', expected: 'object'.`);
@@ -61502,6 +61459,25 @@ const validateRulesRelations = (options) => {
61502
61459
  });
61503
61460
  };
61504
61461
 
61462
+ const {entries: entries$8, fromEntries} = Object;
61463
+ const cut = (a) => a.split('/')[0];
61464
+
61465
+ const enableNestedRules = (rules) => {
61466
+ const newRules = new Map();
61467
+
61468
+ for (const [rule, value] of entries$8(rules)) {
61469
+ if (newRules.has(rule))
61470
+ continue;
61471
+
61472
+ if (rule.includes('/') && parseState(rule, value))
61473
+ newRules.set(cut(rule), 'on');
61474
+
61475
+ newRules.set(rule, value);
61476
+ }
61477
+
61478
+ return fromEntries(newRules);
61479
+ };
61480
+
61505
61481
  const prepareRules = ({rules, pluginNames}) => {
61506
61482
  const enabledRules = enableNestedRules(rules);
61507
61483
  const cookedEnabledRules = parseRules(enabledRules);
@@ -61661,7 +61637,7 @@ function extendRules$1(rule, plugin) {
61661
61637
 
61662
61638
  function parseRuleName(rule) {
61663
61639
  if (rule.startsWith('import:')) {
61664
- const shortName = basename$1(rule.replace('import:', ''));
61640
+ const shortName = basename(rule.replace('import:', ''));
61665
61641
 
61666
61642
  return shortName.replace('plugin-', '');
61667
61643
  }
@@ -62952,7 +62928,7 @@ function setValues({waysTo, values, path}) {
62952
62928
  for (const [name, ways] of entries$6(waysTo)) {
62953
62929
  for (let way of ways) {
62954
62930
  if (!way) {
62955
- replaceWith$2(path, values[name]);
62931
+ replaceWith(path, values[name]);
62956
62932
  continue;
62957
62933
  }
62958
62934
 
@@ -64325,7 +64301,7 @@ const parseExpression = (nodeFrom, {node}) => {
64325
64301
  return node;
64326
64302
  };
64327
64303
 
64328
- const fix$4 = (from, to, path) => {
64304
+ const fix$7 = (from, to, path) => {
64329
64305
  const nodeFrom = template$1.ast(from);
64330
64306
  const mark = watermark(from, to, path);
64331
64307
 
@@ -64352,7 +64328,7 @@ const fix$4 = (from, to, path) => {
64352
64328
  checkExpressionStatement(nodeFrom, nodeTo, path);
64353
64329
 
64354
64330
  const waysTo = findVarsWays(nodeTo);
64355
- const newPath = replaceWith$2(path, nodeTo);
64331
+ const newPath = replaceWith(path, nodeTo);
64356
64332
 
64357
64333
  if (!nodeTo.__putout_replace_cooked) {
64358
64334
  validateTemplateValues(waysTo, waysFrom);
@@ -64380,7 +64356,7 @@ const getFix = (items, match) => (path) => {
64380
64356
  const matchFn = match[from];
64381
64357
 
64382
64358
  if (!matchFn || runMatch(path, nodeFrom, matchFn))
64383
- fix$4(from, to, path);
64359
+ fix$7(from, to, path);
64384
64360
  }
64385
64361
  }
64386
64362
  };
@@ -64523,13 +64499,13 @@ const TS_EXCLUDE = [
64523
64499
  ];
64524
64500
 
64525
64501
  const declare$1 = (declarations) => ({
64526
- report: report$3,
64502
+ report: report$6,
64527
64503
  include,
64528
- fix: fix$3(declarations),
64504
+ fix: fix$6(declarations),
64529
64505
  filter: filter(declarations),
64530
64506
  });
64531
64507
 
64532
- const report$3 = (path) => {
64508
+ const report$6 = (path) => {
64533
64509
  const {name} = path.node;
64534
64510
  const peaceOfName = cutName(name);
64535
64511
 
@@ -64569,7 +64545,7 @@ const filter = (declarations) => (path, {options}) => {
64569
64545
  return parseCode(type, allDeclarations[name]);
64570
64546
  };
64571
64547
 
64572
- const fix$3 = (declarations) => (path, {options}) => {
64548
+ const fix$6 = (declarations) => (path, {options}) => {
64573
64549
  const type = getModuleType(path);
64574
64550
 
64575
64551
  const allDeclarations = {
@@ -64688,111 +64664,17 @@ function validateDeclare(declare) {
64688
64664
  throw Error(`☝️ Looks like 'declare' property value is not a 'function', but '${typeof declare}' with value '${stringify(declare)}'.`);
64689
64665
  }
64690
64666
 
64691
- function fullstore(value) {
64692
- const data = {
64693
- value,
64694
- };
64695
-
64696
- return (...args) => {
64697
- const [value] = args;
64698
-
64699
- if (!args.length)
64700
- return data.value;
64701
-
64702
- data.value = value;
64703
-
64704
- return value;
64705
- };
64706
- }
64707
-
64708
- const cut = (a) => a.slice(0, a.indexOf('('));
64709
- const createPrefix = (name) => {
64710
- if (name.includes('('))
64711
- return `${cut(name)}(`;
64712
-
64713
- return `${name}(`;
64714
- };
64715
-
64716
- const createSuffix = () => ');\n';
64717
- const maybeNewline = (a) => a.at(-1) === '\n' ? a : `${a}\n`;
64718
-
64719
- const __json_name = '__putout_processor_json';
64720
- const __yaml_name = '__putout_processor_yaml';
64721
- const __toml_name = '__putout_processor_toml';
64722
- const __filesystem_name$2 = '__putout_processor_filesystem';
64723
- const __ignore_name = '__putout_processor_ignore';
64724
-
64725
- const __json = `${__json_name}(__object)`;
64726
- const __yaml = `${__yaml_name}(__object)`;
64727
- const __toml = `${__toml_name}(__object)`;
64728
- const __filesystem = `${__filesystem_name$2}(__object)`;
64729
- const __ignore = `${__ignore_name}(__array)`;
64730
-
64731
- const TYPES = [
64732
- __json_name,
64733
- __yaml_name,
64734
- __filesystem_name$2,
64735
- __ignore_name,
64736
- ];
64737
-
64738
- const toJS = (source, name = __json) => {
64739
- const prefix = createPrefix(name);
64740
- const suffix = createSuffix();
64741
-
64742
- return `${prefix}${source}${suffix}`;
64743
- };
64744
-
64745
- const fromJS = (source, name = __json) => {
64746
- source = maybeNewline(source);
64747
- const shortName = cut(name);
64748
-
64749
- source = source.slice(source.indexOf(shortName));
64750
-
64751
- const prefix = createPrefix(name);
64752
- const suffix = createSuffix();
64753
- const length = source.length - suffix.length;
64754
- const sliced = source.slice(prefix.length, length);
64755
-
64756
- return maybeNewline(removeBlankLines$1(sliced));
64757
- };
64758
-
64759
- const isJSON = (source) => {
64760
- for (const type of TYPES) {
64761
- if (!source.indexOf(type))
64762
- return true;
64763
- }
64764
-
64765
- return false;
64766
- };
64767
-
64768
- var json = /*#__PURE__*/Object.freeze({
64769
- __proto__: null,
64770
- __filesystem: __filesystem,
64771
- __filesystem_name: __filesystem_name$2,
64772
- __ignore: __ignore,
64773
- __ignore_name: __ignore_name,
64774
- __json: __json,
64775
- __json_name: __json_name,
64776
- __toml: __toml,
64777
- __toml_name: __toml_name,
64778
- __yaml: __yaml,
64779
- __yaml_name: __yaml_name,
64780
- fromJS: fromJS,
64781
- isJSON: isJSON,
64782
- toJS: toJS
64783
- });
64784
-
64785
64667
  const driverStore = fullstore();
64786
64668
 
64787
64669
  const {assign} = Object;
64788
64670
  const noop = () => {};
64789
- const returns = (a) => () => a;
64671
+ const returns$1 = (a) => () => a;
64790
64672
 
64791
64673
  const defaultFS = {
64792
64674
  renameFile: noop,
64793
64675
  removeFile: noop,
64794
64676
  createDirectory: noop,
64795
- readFileContent: returns(''),
64677
+ readFileContent: returns$1(''),
64796
64678
  writeFileContent: noop,
64797
64679
  copyFile: noop,
64798
64680
  };
@@ -64811,7 +64693,7 @@ const copyFile$1 = (from, to) => {
64811
64693
  maybeFS.copyFile(from, to);
64812
64694
  };
64813
64695
 
64814
- const createDirectory$2 = (name) => {
64696
+ const createDirectory$1 = (name) => {
64815
64697
  maybeFS.createDirectory(name);
64816
64698
  };
64817
64699
 
@@ -64841,17 +64723,17 @@ function deinit$1() {
64841
64723
  }
64842
64724
 
64843
64725
  var maybeFS$1 = /*#__PURE__*/Object.freeze({
64844
- __proto__: null,
64845
- copyFile: copyFile$1,
64846
- createDirectory: createDirectory$2,
64847
- deinit: deinit$1,
64848
- init: init$1,
64849
- pause: pause$1,
64850
- readFileContent: readFileContent$1,
64851
- removeFile: removeFile$1,
64852
- renameFile: renameFile$1,
64853
- start: start$1,
64854
- writeFileContent: writeFileContent$1
64726
+ __proto__: null,
64727
+ copyFile: copyFile$1,
64728
+ createDirectory: createDirectory$1,
64729
+ deinit: deinit$1,
64730
+ init: init$1,
64731
+ pause: pause$1,
64732
+ readFileContent: readFileContent$1,
64733
+ removeFile: removeFile$1,
64734
+ renameFile: renameFile$1,
64735
+ start: start$1,
64736
+ writeFileContent: writeFileContent$1
64855
64737
  });
64856
64738
 
64857
64739
  const {
@@ -64945,7 +64827,7 @@ function isExcluded({name, base, exclude}) {
64945
64827
  return false;
64946
64828
  }
64947
64829
 
64948
- function findFile$2(node, name, exclude = []) {
64830
+ function findFile(node, name, exclude = []) {
64949
64831
  checkName(name);
64950
64832
 
64951
64833
  const filePaths = [];
@@ -64953,7 +64835,7 @@ function findFile$2(node, name, exclude = []) {
64953
64835
 
64954
64836
  for (const filenamePath of traverseProperties(node, 'filename')) {
64955
64837
  const {value} = filenamePath.node.value;
64956
- const base = basename$1(value);
64838
+ const base = basename(value);
64957
64839
 
64958
64840
  for (const name of names) {
64959
64841
  if (value === name || getRegExp(name).test(base)) {
@@ -64981,22 +64863,22 @@ function checkName(name) {
64981
64863
  }
64982
64864
 
64983
64865
  function getFilenamePath(filePath) {
64984
- const filenamePath = getProperty$2(filePath, 'filename');
64866
+ const filenamePath = getProperty(filePath, 'filename');
64985
64867
  return filenamePath.get('value');
64986
64868
  }
64987
64869
 
64988
- function getFilename$2(filePath) {
64870
+ function getFilename(filePath) {
64989
64871
  const {value} = getFilenamePath(filePath).node;
64990
64872
  return value;
64991
64873
  }
64992
64874
 
64993
- function getFileType$2(filePath) {
64994
- const typePath = getProperty$2(filePath, 'type');
64875
+ function getFileType(filePath) {
64876
+ const typePath = getProperty(filePath, 'type');
64995
64877
  return typePath.node.value.value;
64996
64878
  }
64997
64879
 
64998
64880
  function getFileContent(filePath) {
64999
- const content = getProperty$2(filePath, 'content');
64881
+ const content = getProperty(filePath, 'content');
65000
64882
 
65001
64883
  return [
65002
64884
  Boolean(content),
@@ -65005,7 +64887,7 @@ function getFileContent(filePath) {
65005
64887
  }
65006
64888
 
65007
64889
  const renameFile = (filePath, name) => {
65008
- const oldName = getFilename$2(filePath);
64890
+ const oldName = getFilename(filePath);
65009
64891
  const valuePath = getFilenamePath(filePath);
65010
64892
  const baseName = oldName
65011
64893
  .split('/')
@@ -65022,7 +64904,7 @@ const renameFile = (filePath, name) => {
65022
64904
  };
65023
64905
 
65024
64906
  function removeFile(filePath) {
65025
- const filename = getFilename$2(filePath);
64907
+ const filename = getFilename(filePath);
65026
64908
 
65027
64909
  if (!getParentDirectory(filePath))
65028
64910
  return;
@@ -65032,7 +64914,7 @@ function removeFile(filePath) {
65032
64914
  }
65033
64915
 
65034
64916
  const removeEmptyDirectory = (dirPath) => {
65035
- const type = getFileType$2(dirPath);
64917
+ const type = getFileType(dirPath);
65036
64918
 
65037
64919
  if (type !== 'directory')
65038
64920
  return;
@@ -65040,7 +64922,7 @@ const removeEmptyDirectory = (dirPath) => {
65040
64922
  let nextParentDir = dirPath;
65041
64923
 
65042
64924
  while (!readDirectory(dirPath).length) {
65043
- const name = getFilename$2(dirPath);
64925
+ const name = getFilename(dirPath);
65044
64926
 
65045
64927
  if (name === '/')
65046
64928
  break;
@@ -65059,10 +64941,10 @@ const moveFile = (filePath, dirPath) => {
65059
64941
  if (filePath === dirPath)
65060
64942
  return;
65061
64943
 
65062
- const dirname = getFilename$2(dirPath);
65063
- const filename = getFilename$2(filePath);
64944
+ const dirname = getFilename(dirPath);
64945
+ const filename = getFilename(filePath);
65064
64946
  const dirPathFiles = getFiles$1(dirPath);
65065
- const filenamePath = getProperty$2(filePath, 'filename');
64947
+ const filenamePath = getProperty(filePath, 'filename');
65066
64948
 
65067
64949
  const basename = filename
65068
64950
  .split('/')
@@ -65080,8 +64962,8 @@ const moveFile = (filePath, dirPath) => {
65080
64962
  };
65081
64963
 
65082
64964
  const copyFile = (filePath, dirPath) => {
65083
- const dirname = getFilename$2(dirPath);
65084
- const filename = getFilename$2(filePath);
64965
+ const dirname = getFilename(dirPath);
64966
+ const filename = getFilename(filePath);
65085
64967
 
65086
64968
  const basename = filename
65087
64969
  .split('/')
@@ -65105,16 +64987,16 @@ const copyFile = (filePath, dirPath) => {
65105
64987
  };
65106
64988
 
65107
64989
  function maybeRemoveFile(dirPath, filename) {
65108
- const type = getFileType$2(dirPath);
64990
+ const type = getFileType(dirPath);
65109
64991
 
65110
64992
  if (type !== 'directory') {
65111
- const filename = getFilename$2(dirPath);
64993
+ const filename = getFilename(dirPath);
65112
64994
  throw Error(`☝️ Looks like '${filename}' is not a directory, but: '${type}'. Rename to '${filename}/'`);
65113
64995
  }
65114
64996
 
65115
- const dirPathFiles = getProperty$2(dirPath, 'files');
65116
- const name = join$1(getFilename$2(dirPath), basename$1(filename));
65117
- const [fileToOverwrite] = findFile$2(dirPathFiles, name);
64997
+ const dirPathFiles = getProperty(dirPath, 'files');
64998
+ const name = join$1(getFilename(dirPath), basename(filename));
64999
+ const [fileToOverwrite] = findFile(dirPathFiles, name);
65118
65000
 
65119
65001
  if (!fileToOverwrite)
65120
65002
  return;
@@ -65126,7 +65008,7 @@ const createFile = (dirPath, name, content) => {
65126
65008
  maybeRemoveFile(dirPath, name);
65127
65009
 
65128
65010
  const dirPathFiles = getFiles$1(dirPath);
65129
- const parentFilename = getFilename$2(dirPath);
65011
+ const parentFilename = getFilename(dirPath);
65130
65012
  const filename = join$1(parentFilename, name);
65131
65013
 
65132
65014
  const typeProperty = createTypeProperty('file');
@@ -65148,10 +65030,10 @@ const createFile = (dirPath, name, content) => {
65148
65030
  return filePath;
65149
65031
  };
65150
65032
 
65151
- const getFiles$1 = (dirPath) => getProperty$2(dirPath, 'files');
65033
+ const getFiles$1 = (dirPath) => getProperty(dirPath, 'files');
65152
65034
 
65153
65035
  function readDirectory(dirPath) {
65154
- const fileType = getFileType$2(dirPath);
65036
+ const fileType = getFileType(dirPath);
65155
65037
 
65156
65038
  if (fileType !== 'directory')
65157
65039
  return [];
@@ -65159,9 +65041,9 @@ function readDirectory(dirPath) {
65159
65041
  return getFiles$1(dirPath).get('value.elements');
65160
65042
  }
65161
65043
 
65162
- function createDirectory$1(dirPath, name) {
65044
+ function createDirectory(dirPath, name) {
65163
65045
  const dirPathFiles = getFiles$1(dirPath);
65164
- const parentFilename = getFilename$2(dirPath);
65046
+ const parentFilename = getFilename(dirPath);
65165
65047
  const filename = join$1(parentFilename, name);
65166
65048
 
65167
65049
  const typeProperty = createTypeProperty('directory');
@@ -65174,13 +65056,13 @@ function createDirectory$1(dirPath, name) {
65174
65056
  filesProperty,
65175
65057
  ]));
65176
65058
 
65177
- createDirectory$2(filename);
65059
+ createDirectory$1(filename);
65178
65060
 
65179
65061
  return dirPathFiles.get('value.elements').at(-1);
65180
65062
  }
65181
65063
 
65182
65064
  const readFileContent = (filePath) => {
65183
- const fileType = getFileType$2(filePath);
65065
+ const fileType = getFileType(filePath);
65184
65066
 
65185
65067
  if (fileType === 'directory')
65186
65068
  return '';
@@ -65190,7 +65072,7 @@ const readFileContent = (filePath) => {
65190
65072
  if (hasContent)
65191
65073
  return fromBase64(content);
65192
65074
 
65193
- const filename = getFilename$2(filePath);
65075
+ const filename = getFilename(filePath);
65194
65076
  const fileContent = readFileContent$1(filename);
65195
65077
 
65196
65078
  const property = createContentProperty(toBase64(fileContent));
@@ -65201,16 +65083,16 @@ const readFileContent = (filePath) => {
65201
65083
  };
65202
65084
 
65203
65085
  function writeFileContent(filePath, content) {
65204
- const fileType = getFileType$2(filePath);
65086
+ const fileType = getFileType(filePath);
65205
65087
 
65206
65088
  if (fileType === 'directory')
65207
65089
  return;
65208
65090
 
65209
- const filename = getFilename$2(filePath);
65091
+ const filename = getFilename(filePath);
65210
65092
 
65211
65093
  writeFileContent$1(filename, content);
65212
65094
 
65213
- const contentPath = getProperty$2(filePath, 'content');
65095
+ const contentPath = getProperty(filePath, 'content');
65214
65096
 
65215
65097
  if (contentPath) {
65216
65098
  setLiteralValue(contentPath.node.value, toBase64(content));
@@ -65223,21 +65105,21 @@ function writeFileContent(filePath, content) {
65223
65105
 
65224
65106
  const createNestedDirectory = (path, name) => {
65225
65107
  const rootPath = getRootDirectory(path);
65226
- const dir = dirname$1(name);
65108
+ const dir = dirname(name);
65227
65109
 
65228
- if (dir === getFilename$2(path))
65229
- return createDirectory$1(path, basename$1(name));
65110
+ if (dir === getFilename(path))
65111
+ return createDirectory(path, basename(name));
65230
65112
 
65231
65113
  let currentDir = name;
65232
65114
 
65233
- const rootDir = getFilename$2(rootPath);
65115
+ const rootDir = getFilename(rootPath);
65234
65116
  const directories = [];
65235
65117
  let prevDir = currentDir;
65236
65118
 
65237
65119
  while (currentDir !== rootDir) {
65238
65120
  directories.unshift(currentDir);
65239
65121
  prevDir = currentDir;
65240
- currentDir = dirname$1(currentDir);
65122
+ currentDir = dirname(currentDir);
65241
65123
 
65242
65124
  if (currentDir === prevDir) {
65243
65125
  currentDir = rootDir;
@@ -65251,16 +65133,16 @@ const createNestedDirectory = (path, name) => {
65251
65133
  }
65252
65134
  }
65253
65135
 
65254
- let lastDirectoryPath = findFile$2(rootPath, directories).at(-1) || rootPath;
65255
- const lastDirectoryName = getFilename$2(lastDirectoryPath);
65136
+ let lastDirectoryPath = findFile(rootPath, directories).at(-1) || rootPath;
65137
+ const lastDirectoryName = getFilename(lastDirectoryPath);
65256
65138
 
65257
65139
  const n = directories.length;
65258
65140
 
65259
65141
  let i = directories.indexOf(lastDirectoryName) + 1;
65260
65142
 
65261
65143
  for (; i < n; i++) {
65262
- const name = basename$1(directories[i]);
65263
- lastDirectoryPath = createDirectory$1(lastDirectoryPath, name);
65144
+ const name = basename(directories[i]);
65145
+ lastDirectoryPath = createDirectory(lastDirectoryPath, name);
65264
65146
  }
65265
65147
 
65266
65148
  return lastDirectoryPath;
@@ -65288,55 +65170,6 @@ const {
65288
65170
  start,
65289
65171
  } = maybeFS$1;
65290
65172
 
65291
- var filesystem = /*#__PURE__*/Object.freeze({
65292
- __proto__: null,
65293
- copyFile: copyFile,
65294
- createDirectory: createDirectory$1,
65295
- createFile: createFile,
65296
- createNestedDirectory: createNestedDirectory,
65297
- deinit: deinit,
65298
- findFile: findFile$2,
65299
- getFileContent: getFileContent,
65300
- getFileType: getFileType$2,
65301
- getFilename: getFilename$2,
65302
- getParentDirectory: getParentDirectory,
65303
- getRootDirectory: getRootDirectory,
65304
- init: init,
65305
- moveFile: moveFile,
65306
- pause: pause,
65307
- readDirectory: readDirectory,
65308
- readFileContent: readFileContent,
65309
- removeEmptyDirectory: removeEmptyDirectory,
65310
- removeFile: removeFile,
65311
- renameFile: renameFile,
65312
- start: start,
65313
- writeFileContent: writeFileContent
65314
- });
65315
-
65316
- var convertSimpleFilesystemToFilesystem = {};
65317
-
65318
- var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_path);
65319
-
65320
- var require$$0 = /*@__PURE__*/getAugmentedNamespace(bundle);
65321
-
65322
- var require$$3 = /*@__PURE__*/getAugmentedNamespace(filesystem);
65323
-
65324
- var require$$2 = /*@__PURE__*/getAugmentedNamespace(json);
65325
-
65326
- var require$$1 = /*@__PURE__*/getAugmentedNamespace(operate);
65327
-
65328
- const {basename, dirname} = require$$0$1;
65329
- const {types: types$1} = require$$0;
65330
- const {
65331
- createDirectory,
65332
- getFileType: getFileType$1,
65333
- getFilename: getFilename$1,
65334
- findFile: findFile$1,
65335
- } = require$$3;
65336
-
65337
- const {__filesystem_name: __filesystem_name$1} = require$$2;
65338
- const {replaceWith: replaceWith$1, getProperty: getProperty$1} = require$$1;
65339
-
65340
65173
  const {
65341
65174
  objectExpression,
65342
65175
  arrayExpression: arrayExpression$1,
@@ -65345,9 +65178,9 @@ const {
65345
65178
  isStringLiteral,
65346
65179
  isTemplateLiteral,
65347
65180
  objectProperty: objectProperty$1,
65348
- } = types$1;
65181
+ } = lib_exports;
65349
65182
 
65350
- convertSimpleFilesystemToFilesystem.report = () => `Convert Simple Filesystem to Filesystem`;
65183
+ const report$5 = () => `Convert Simple Filesystem to Filesystem`;
65351
65184
 
65352
65185
  const isDirectory = (a) => a.endsWith('/');
65353
65186
  const getType = (a) => {
@@ -65381,14 +65214,19 @@ function parseContent(node, path) {
65381
65214
  throw Error(`☝️ Looks like wrong content type: '${node.type}' from file: '${path}'`);
65382
65215
  }
65383
65216
 
65384
- convertSimpleFilesystemToFilesystem.fix = (path) => {
65217
+ const fix$5 = (path) => {
65385
65218
  const array = arrayExpression$1([]);
65386
65219
 
65387
65220
  for (const element of path.get('elements')) {
65388
- if (isArrayExpression(element)) {
65221
+ if (isOneElementTuple(element)) {
65222
+ const [node] = element.node.elements;
65223
+ array.elements.push(createFileFromStringLiteral(node));
65224
+ continue;
65225
+ }
65226
+
65227
+ if (isTwoElementsTuple(element)) {
65389
65228
  const [nodeValue, nodeContent] = element.node.elements;
65390
65229
  const {value} = nodeValue;
65391
-
65392
65230
  const content = parseContent(nodeContent, element);
65393
65231
 
65394
65232
  array.elements.push(objectExpression([
@@ -65400,13 +65238,8 @@ convertSimpleFilesystemToFilesystem.fix = (path) => {
65400
65238
  }
65401
65239
 
65402
65240
  if (isStringLiteral(element)) {
65403
- const {value} = element.node;
65404
-
65405
- array.elements.push(objectExpression([
65406
- getType(value),
65407
- createFilename(noTrailingSlash(value)),
65408
- getFiles(value),
65409
- ].filter(Boolean)));
65241
+ const file = createFileFromStringLiteral(element);
65242
+ array.elements.push(file);
65410
65243
  continue;
65411
65244
  }
65412
65245
 
@@ -65416,8 +65249,20 @@ convertSimpleFilesystemToFilesystem.fix = (path) => {
65416
65249
  buildTree(path, array);
65417
65250
  };
65418
65251
 
65419
- convertSimpleFilesystemToFilesystem.traverse = ({push}) => ({
65420
- [`${__filesystem_name$1}(__array)`]: (path) => {
65252
+ const maybeNode = (a) => a.node || a;
65253
+
65254
+ function createFileFromStringLiteral(element) {
65255
+ const {value} = maybeNode(element);
65256
+
65257
+ return objectExpression([
65258
+ getType(value),
65259
+ createFilename(noTrailingSlash(value)),
65260
+ getFiles(value),
65261
+ ].filter(Boolean));
65262
+ }
65263
+
65264
+ const traverse$3 = ({push}) => ({
65265
+ [`${__filesystem_name}(__array)`]: (path) => {
65421
65266
  const root = path.get('arguments.0');
65422
65267
  push(root);
65423
65268
  },
@@ -65431,19 +65276,19 @@ const noTrailingSlash = (a) => {
65431
65276
  };
65432
65277
 
65433
65278
  function buildTree(path, list) {
65434
- const [root, ...files] = findFile$1(list, '*');
65279
+ const [root, ...files] = findFile(list, '*');
65435
65280
 
65436
65281
  for (const filePath of files) {
65437
- const filename = getFilename$1(filePath);
65282
+ const filename = getFilename(filePath);
65438
65283
 
65439
65284
  check$3(filename);
65440
65285
 
65441
- const type = getFileType$1(filePath);
65286
+ const type = getFileType(filePath);
65442
65287
  const dir = dirname(filename);
65443
65288
  const name = basename(filename);
65444
- const [dirPath] = findFile$1(root, dir);
65289
+ const [dirPath] = findFile(root, dir);
65445
65290
 
65446
- if (!dirPath || getFileType$1(dirPath) !== 'directory')
65291
+ if (!dirPath || getFileType(dirPath) !== 'directory')
65447
65292
  throw Error(`☝️ Looks like directory '${dir}/' is missing`);
65448
65293
 
65449
65294
  if (type === 'directory') {
@@ -65451,41 +65296,54 @@ function buildTree(path, list) {
65451
65296
  continue;
65452
65297
  }
65453
65298
 
65454
- const filesProperty = getProperty$1(dirPath, 'files');
65299
+ const filesProperty = getProperty(dirPath, 'files');
65455
65300
  filesProperty.node.value.elements.push(filePath.node);
65456
65301
  }
65457
65302
 
65458
- replaceWith$1(path, root);
65303
+ replaceWith(path, root);
65459
65304
  }
65460
65305
 
65306
+ const isTwoElementsTuple = (a) => {
65307
+ if (!isArrayExpression(a))
65308
+ return false;
65309
+
65310
+ const {elements} = a.node;
65311
+
65312
+ return elements.length === 2;
65313
+ };
65314
+
65315
+ const isOneElementTuple = (a) => {
65316
+ if (!isArrayExpression(a))
65317
+ return false;
65318
+
65319
+ const {elements} = a.node;
65320
+
65321
+ return elements.length === 1;
65322
+ };
65323
+
65461
65324
  function check$3(filename) {
65462
65325
  if (!filename.includes('/'))
65463
65326
  throw Error(`☝️ Looks like directory path is missing: '${filename}'`);
65464
65327
  }
65465
65328
 
65466
- var convertFilesystemToSimpleFilesystem = {};
65467
-
65468
- const {types} = require$$0;
65469
- const {replaceWith, getProperty} = require$$1;
65470
- const {__filesystem_name} = require$$2;
65471
-
65472
- const {
65473
- findFile,
65474
- getFilename,
65475
- getFileType,
65476
- } = require$$3;
65329
+ var fromSimple = /*#__PURE__*/Object.freeze({
65330
+ __proto__: null,
65331
+ fix: fix$5,
65332
+ report: report$5,
65333
+ traverse: traverse$3
65334
+ });
65477
65335
 
65478
65336
  const {
65479
65337
  stringLiteral: stringLiteral$2,
65480
65338
  arrayExpression,
65481
- } = types;
65339
+ } = lib_exports;
65482
65340
 
65483
65341
  const {isArray} = Array;
65484
65342
  const maybeAddSlash = (a) => a === '/' ? a : `${a}/`;
65485
65343
 
65486
- convertFilesystemToSimpleFilesystem.report = () => `Convert Filesystem to Simple Filesystem`;
65344
+ const report$4 = () => `Convert Filesystem to Simple Filesystem`;
65487
65345
 
65488
- convertFilesystemToSimpleFilesystem.fix = (root, {files}) => {
65346
+ const fix$4 = (root, {files}) => {
65489
65347
  const names = [];
65490
65348
 
65491
65349
  for (const file of files) {
@@ -65524,7 +65382,7 @@ convertFilesystemToSimpleFilesystem.fix = (root, {files}) => {
65524
65382
  replaceWith(root, arrayExpression(list));
65525
65383
  };
65526
65384
 
65527
- convertFilesystemToSimpleFilesystem.traverse = ({push}) => ({
65385
+ const traverse$2 = ({push}) => ({
65528
65386
  [`${__filesystem_name}(__object)`]: (path) => {
65529
65387
  const root = path.get('arguments.0');
65530
65388
  const files = findFile(root, '*');
@@ -65535,9 +65393,16 @@ convertFilesystemToSimpleFilesystem.traverse = ({push}) => ({
65535
65393
  },
65536
65394
  });
65537
65395
 
65396
+ var toSimple = /*#__PURE__*/Object.freeze({
65397
+ __proto__: null,
65398
+ fix: fix$4,
65399
+ report: report$4,
65400
+ traverse: traverse$2
65401
+ });
65402
+
65538
65403
  const log = createDebug$1('putout:runner:scanner');
65539
65404
 
65540
- const scan$1 = ({rule, plugin, msg, options}, {progress}) => {
65405
+ const scan = ({rule, plugin, msg, options}, {progress}) => {
65541
65406
  const {
65542
65407
  scan,
65543
65408
  report,
@@ -65582,7 +65447,7 @@ const createFileProgress = ({rule, progress}) => ({i, n}) => {
65582
65447
  };
65583
65448
 
65584
65449
  const createTrackFile = (fileProgress) => function*(...a) {
65585
- const files = findFile$2(...a);
65450
+ const files = findFile(...a);
65586
65451
  const n = files.length;
65587
65452
 
65588
65453
  for (const [i, file] of files.entries()) {
@@ -65595,7 +65460,7 @@ const createTrackFile = (fileProgress) => function*(...a) {
65595
65460
  };
65596
65461
 
65597
65462
  const getTraverse = ({scan, rule, progress}) => ({push, options}) => ({
65598
- [`${__filesystem_name$2}(__)`](path) {
65463
+ [`${__filesystem_name}(__)`](path) {
65599
65464
  log(rule);
65600
65465
  progress.start(rule);
65601
65466
 
@@ -65609,7 +65474,7 @@ const getTraverse = ({scan, rule, progress}) => ({push, options}) => ({
65609
65474
 
65610
65475
  const trackFile = createTrackFile(fileProgress);
65611
65476
 
65612
- runSimple(convertSimpleFilesystemToFilesystem, {
65477
+ runSimple(fromSimple, {
65613
65478
  shouldConvert: true,
65614
65479
  path,
65615
65480
  isSimple,
@@ -65626,7 +65491,7 @@ const getTraverse = ({scan, rule, progress}) => ({push, options}) => ({
65626
65491
  options,
65627
65492
  });
65628
65493
 
65629
- runSimple(convertFilesystemToSimpleFilesystem, {
65494
+ runSimple(toSimple, {
65630
65495
  shouldConvert: isSimple(),
65631
65496
  path,
65632
65497
  isSimple,
@@ -65666,18 +65531,18 @@ function runSimple(plugin, {path, isSimple, shouldConvert = true}) {
65666
65531
  }
65667
65532
 
65668
65533
  function parseVisitor(visitors) {
65669
- const to = visitors[`${__filesystem_name$2}(__object)`];
65670
- const from = visitors[`${__filesystem_name$2}(__array)`];
65534
+ const to = visitors[`${__filesystem_name}(__object)`];
65535
+ const from = visitors[`${__filesystem_name}(__array)`];
65671
65536
 
65672
65537
  if (to)
65673
65538
  return [
65674
65539
  to,
65675
- `${__filesystem_name$2}(__object)`,
65540
+ `${__filesystem_name}(__object)`,
65676
65541
  ];
65677
65542
 
65678
65543
  return [
65679
65544
  from,
65680
- `${__filesystem_name$2}(__array)`,
65545
+ `${__filesystem_name}(__array)`,
65681
65546
  ];
65682
65547
  }
65683
65548
 
@@ -65845,7 +65710,7 @@ function splitPlugins(plugins, {progress}) {
65845
65710
  }
65846
65711
 
65847
65712
  if (plugin.scan) {
65848
- pluginsTraverse.push(scan$1(item, {
65713
+ pluginsTraverse.push(scan(item, {
65849
65714
  progress,
65850
65715
  }));
65851
65716
  continue;
@@ -72199,15 +72064,15 @@ const isCall = (path) => {
72199
72064
  return isCallExpression(path.find(isCallOrStatement));
72200
72065
  };
72201
72066
 
72202
- const report$2 = ({name}) => `Argument '${name}' is missing`;
72067
+ const report$3 = ({name}) => `Argument '${name}' is missing`;
72203
72068
 
72204
72069
  const addArgs = (args) => ({
72205
- report: report$2,
72206
- fix: fix$2,
72070
+ report: report$3,
72071
+ fix: fix$3,
72207
72072
  traverse: traverse(args),
72208
72073
  });
72209
72074
 
72210
- const fix$2 = ({declaration, path, pattern, params, index}) => {
72075
+ const fix$3 = ({declaration, path, pattern, params, index}) => {
72211
72076
  const declarationNode = template$1.ast.fresh(declaration);
72212
72077
 
72213
72078
  if (isBlockStatement(declarationNode)) {
@@ -72445,7 +72310,7 @@ const {join} = path;
72445
72310
 
72446
72311
  const isObject = (a) => a && typeof a === 'object';
72447
72312
  const {entries} = Object;
72448
- const report$1 = (path, {message}) => message;
72313
+ const report$2 = (path, {message}) => message;
72449
72314
 
72450
72315
  const matchFiles = (options) => {
72451
72316
  const {filename} = options;
@@ -72454,20 +72319,20 @@ const matchFiles = (options) => {
72454
72319
 
72455
72320
  check(files);
72456
72321
 
72457
- const scan = createScan({
72322
+ const scan = createScan$2({
72458
72323
  defaultFilename: filename,
72459
72324
  files,
72460
72325
  exclude,
72461
72326
  });
72462
72327
 
72463
72328
  return {
72464
- fix: fix$1,
72329
+ fix: fix$2,
72465
72330
  scan,
72466
- report: report$1,
72331
+ report: report$2,
72467
72332
  };
72468
72333
  };
72469
72334
 
72470
- function fix$1(inputFile, {dirPath, matchInputFilename, outputFilename, matchedJS, matchedAST, options}) {
72335
+ function fix$2(inputFile, {dirPath, matchInputFilename, outputFilename, matchedJS, matchedAST, options}) {
72471
72336
  transform(matchedAST, matchedJS, options);
72472
72337
 
72473
72338
  const matchedJSON = magicPrint(outputFilename, matchedAST);
@@ -72484,19 +72349,19 @@ function fix$1(inputFile, {dirPath, matchInputFilename, outputFilename, matchedJ
72484
72349
  removeFile(inputFile);
72485
72350
  }
72486
72351
 
72487
- const createScan = ({files, exclude, defaultFilename}) => (mainPath, {push, progress, options}) => {
72352
+ const createScan$2 = ({files, exclude, defaultFilename}) => (mainPath, {push, progress, options}) => {
72488
72353
  const allFiles = [];
72489
- const cwd = getFilename$2(mainPath);
72354
+ const cwd = getFilename(mainPath);
72490
72355
 
72491
72356
  options.filename = options.filename ?? defaultFilename;
72492
72357
 
72493
72358
  for (const [filename, rawOptions] of entries(files)) {
72494
72359
  const [matchInputFilenameMask] = parseMatcher(filename, options);
72495
- const inputFiles = findFile$2(mainPath, matchInputFilenameMask, exclude);
72360
+ const inputFiles = findFile(mainPath, matchInputFilenameMask, exclude);
72496
72361
 
72497
72362
  for (const inputFile of inputFiles) {
72498
72363
  const dirPath = getParentDirectory(inputFile);
72499
- const inputFilename = getFilename$2(inputFile);
72364
+ const inputFilename = getFilename(inputFile);
72500
72365
 
72501
72366
  const [matchInputFilename, outputFilename = matchInputFilename] = parseMatcher(filename, {
72502
72367
  filename: inputFilename,
@@ -72598,8 +72463,8 @@ function getOutputFile({dirPath, matchInputFilename, outputFilename, inputFile})
72598
72463
  if (matchInputFilename === outputFilename)
72599
72464
  return inputFile;
72600
72465
 
72601
- const name = join(getFilename$2(dirPath), outputFilename);
72602
- const [outputFile] = findFile$2(dirPath, name);
72466
+ const name = join(getFilename(dirPath), outputFilename);
72467
+ const [outputFile] = findFile(dirPath, name);
72603
72468
 
72604
72469
  if (outputFile)
72605
72470
  return outputFile;
@@ -72638,28 +72503,18 @@ function parseOptions(inputFilename, rawOptions) {
72638
72503
 
72639
72504
  const {parse} = JSON;
72640
72505
 
72641
- const renameFiles = ({type, mask, rename}) => ({
72642
- report,
72643
- fix,
72644
- scan: scan({
72645
- type,
72646
- mask,
72647
- rename,
72648
- }),
72649
- });
72650
-
72651
- const report = (file, {from, to}) => `Rename '${from}' to '${to}'`;
72506
+ const report$1 = (file, {from, to}) => `Rename '${from}' to '${to}'`;
72652
72507
 
72653
- const fix = (file, {to}) => {
72508
+ const fix$1 = (file, {to}) => {
72654
72509
  renameFile(file, to);
72655
72510
  };
72656
72511
 
72657
- const scan = ({type, mask, rename}) => (path, {push, trackFile}) => {
72512
+ const createScan$1 = ({type, mask, rename} = {}) => (path, {push, trackFile}) => {
72658
72513
  for (const file of trackFile(path, mask)) {
72659
72514
  if (type && !checkType(type, file))
72660
72515
  continue;
72661
72516
 
72662
- const from = getFilename$2(file);
72517
+ const from = getFilename(file);
72663
72518
  const to = rename(from);
72664
72519
 
72665
72520
  push(file, {
@@ -72694,13 +72549,118 @@ function findUpPackage(file) {
72694
72549
  let dirPath = getParentDirectory(file);
72695
72550
 
72696
72551
  do {
72697
- const dir = getFilename$2(dirPath);
72698
- [packageJSON] = findFile$2(dirPath, join$1(dir, 'package.json'));
72552
+ const dir = getFilename(dirPath);
72553
+ [packageJSON] = findFile(dirPath, join$1(dir, 'package.json'));
72699
72554
  } while (!packageJSON && (dirPath = getParentDirectory(dirPath)));
72700
72555
 
72701
72556
  return packageJSON;
72702
72557
  }
72703
72558
 
72559
+ var renameFileWithFn = /*#__PURE__*/Object.freeze({
72560
+ __proto__: null,
72561
+ createScan: createScan$1,
72562
+ fix: fix$1,
72563
+ report: report$1
72564
+ });
72565
+
72566
+ const returns = (a) => () => a;
72567
+
72568
+ const report = (path, {mask, from, to}) => {
72569
+ if (!mask)
72570
+ return `Rename '${from}' to '${to}'`;
72571
+
72572
+ return `Rename '${mask}' to '${mask.replace(from, to)}'`;
72573
+ };
72574
+
72575
+ const fix = (path, {from, to}) => {
72576
+ const filename = getFilename(path);
72577
+ const newFilename = filename.replace(from, to);
72578
+
72579
+ renameFile(path, newFilename);
72580
+ };
72581
+
72582
+ const createScan = (baseOptions) => (rootPath, {push, options, trackFile}) => {
72583
+ const from = options.from || baseOptions.from;
72584
+ const to = options.to || baseOptions.to;
72585
+ const mask = options.mask || baseOptions.mask;
72586
+ const near = options.near || baseOptions.near;
72587
+ const checkNear = near ? createCheckNear(near) : returns(true);
72588
+
72589
+ if (!from || !to)
72590
+ return {};
72591
+
72592
+ for (const file of trackFile(rootPath, mask || from).filter(checkNear)) {
72593
+ push(file, {
72594
+ from,
72595
+ to,
72596
+ mask,
72597
+ });
72598
+ }
72599
+ };
72600
+
72601
+ const createCheckNear = (near) => (file) => {
72602
+ const parentDirectory = getParentDirectory(file);
72603
+
72604
+ for (const currentFile of readDirectory(parentDirectory)) {
72605
+ const type = getFileType(currentFile);
72606
+
72607
+ if (type !== 'file')
72608
+ continue;
72609
+
72610
+ const name = getFilename(currentFile);
72611
+ const base = basename(name);
72612
+
72613
+ if (base === near)
72614
+ return true;
72615
+ }
72616
+
72617
+ return false;
72618
+ };
72619
+
72620
+ var renameFileByMask = /*#__PURE__*/Object.freeze({
72621
+ __proto__: null,
72622
+ createScan: createScan,
72623
+ fix: fix,
72624
+ report: report
72625
+ });
72626
+
72627
+ const renameFiles = ({type, mask, rename, from, to, near} = {}) => {
72628
+ if (rename) {
72629
+ const {
72630
+ report,
72631
+ fix,
72632
+ createScan,
72633
+ } = renameFileWithFn;
72634
+
72635
+ return {
72636
+ report,
72637
+ fix,
72638
+ scan: createScan({
72639
+ type,
72640
+ mask,
72641
+ rename,
72642
+ }),
72643
+ };
72644
+ }
72645
+
72646
+ const {
72647
+ report,
72648
+ fix,
72649
+ createScan,
72650
+ } = renameFileByMask;
72651
+
72652
+ return {
72653
+ fix,
72654
+ report,
72655
+ scan: createScan({
72656
+ mask,
72657
+ from,
72658
+ to,
72659
+ near,
72660
+ }),
72661
+ };
72662
+ };
72663
+
72704
72664
  const {stringLiteral} = lib_exports;
72705
72665
  const getValue = ({value}) => value;
72706
72666
 
@@ -72866,106 +72826,106 @@ function hasParens(path, printer = getPrinter(path)) {
72866
72826
  }
72867
72827
 
72868
72828
  var operator = /*#__PURE__*/Object.freeze({
72869
- __proto__: null,
72870
- __filesystem: __filesystem,
72871
- __filesystem_name: __filesystem_name$2,
72872
- __ignore: __ignore,
72873
- __ignore_name: __ignore_name,
72874
- __json: __json,
72875
- __json_name: __json_name,
72876
- __toml: __toml,
72877
- __toml_name: __toml_name,
72878
- __yaml: __yaml,
72879
- __yaml_name: __yaml_name,
72880
- addArgs: addArgs,
72881
- addAttribute: addAttribute,
72882
- addAttributeValue: addAttributeValue,
72883
- addClassName: addClassName,
72884
- addParens: addParens,
72885
- compare: compare,
72886
- compareAll: compareAll,
72887
- compareAny: compareAny,
72888
- compute: compute,
72889
- contains: contains,
72890
- containsClassName: containsClassName,
72891
- copyFile: copyFile,
72892
- createDirectory: createDirectory$1,
72893
- createFile: createFile,
72894
- createNestedDirectory: createNestedDirectory,
72895
- declare: declare$1,
72896
- deinit: deinit,
72897
- extract: extract,
72898
- findBinding: findBinding,
72899
- findFile: findFile$2,
72900
- findVarsWays: findVarsWays,
72901
- fromJS: fromJS,
72902
- getAttributeNode: getAttributeNode,
72903
- getAttributePath: getAttributePath,
72904
- getAttributeValue: getAttributeValue,
72905
- getBinding: getBinding,
72906
- getBindingPath: getBindingPath,
72907
- getClassName: getClassName,
72908
- getExportDefault: getExportDefault,
72909
- getFileContent: getFileContent,
72910
- getFileType: getFileType$2,
72911
- getFilename: getFilename$2,
72912
- getLiteralRaw: getLiteralRaw,
72913
- getParentDirectory: getParentDirectory,
72914
- getPathAfterImports: getPathAfterImports,
72915
- getPathAfterRequires: getPathAfterRequires,
72916
- getProperties: getProperties,
72917
- getProperty: getProperty$2,
72918
- getRootDirectory: getRootDirectory,
72919
- getTemplateValues: getTemplateValues,
72920
- getValues: getValues,
72921
- hasAttributeValue: hasAttributeValue,
72922
- hasDataName: hasDataName,
72923
- hasParens: hasParens,
72924
- hasTagName: hasTagName,
72925
- ignore: ignore,
72926
- init: init,
72927
- insertAfter: insertAfter,
72928
- insertBefore: insertBefore,
72929
- isConditionKeyword: isConditionKeyword,
72930
- isDeclarationKeyword: isDeclarationKeyword,
72931
- isESM: isESM,
72932
- isJSON: isJSON,
72933
- isKeyword: isKeyword,
72934
- isModuleDeclarationKeyword: isModuleDeclarationKeyword,
72935
- isModuleExports: isModuleExports,
72936
- isSimple: isSimple,
72937
- isSimpleRegExp: isSimpleRegExp,
72938
- isStatementKeyword: isStatementKeyword,
72939
- isTSKeyword: isTSKeyword,
72940
- isTemplate: isTemplate,
72941
- matchFiles: matchFiles,
72942
- moveFile: moveFile,
72943
- parseTemplate: parseTemplate,
72944
- pause: pause,
72945
- readDirectory: readDirectory,
72946
- readFileContent: readFileContent,
72947
- remove: remove,
72948
- removeAttributeValue: removeAttributeValue,
72949
- removeClassName: removeClassName,
72950
- removeEmptyDirectory: removeEmptyDirectory,
72951
- removeFile: removeFile,
72952
- removeParens: removeParens,
72953
- rename: rename,
72954
- renameFile: renameFile,
72955
- renameFiles: renameFiles,
72956
- renameProperty: renameProperty,
72957
- replaceWith: replaceWith$2,
72958
- replaceWithMultiple: replaceWithMultiple,
72959
- setAttributeValue: setAttributeValue,
72960
- setLiteralValue: setLiteralValue,
72961
- setValues: setValues,
72962
- start: start,
72963
- toExpression: toExpression,
72964
- toJS: toJS,
72965
- transformRegExp: transformRegExp,
72966
- traverse: traverse$1,
72967
- traverseProperties: traverseProperties,
72968
- writeFileContent: writeFileContent
72829
+ __proto__: null,
72830
+ __filesystem: __filesystem,
72831
+ __filesystem_name: __filesystem_name,
72832
+ __ignore: __ignore,
72833
+ __ignore_name: __ignore_name,
72834
+ __json: __json,
72835
+ __json_name: __json_name,
72836
+ __toml: __toml,
72837
+ __toml_name: __toml_name,
72838
+ __yaml: __yaml,
72839
+ __yaml_name: __yaml_name,
72840
+ addArgs: addArgs,
72841
+ addAttribute: addAttribute,
72842
+ addAttributeValue: addAttributeValue,
72843
+ addClassName: addClassName,
72844
+ addParens: addParens,
72845
+ compare: compare,
72846
+ compareAll: compareAll,
72847
+ compareAny: compareAny,
72848
+ compute: compute,
72849
+ contains: contains,
72850
+ containsClassName: containsClassName,
72851
+ copyFile: copyFile,
72852
+ createDirectory: createDirectory,
72853
+ createFile: createFile,
72854
+ createNestedDirectory: createNestedDirectory,
72855
+ declare: declare$1,
72856
+ deinit: deinit,
72857
+ extract: extract,
72858
+ findBinding: findBinding,
72859
+ findFile: findFile,
72860
+ findVarsWays: findVarsWays,
72861
+ fromJS: fromJS,
72862
+ getAttributeNode: getAttributeNode,
72863
+ getAttributePath: getAttributePath,
72864
+ getAttributeValue: getAttributeValue,
72865
+ getBinding: getBinding,
72866
+ getBindingPath: getBindingPath,
72867
+ getClassName: getClassName,
72868
+ getExportDefault: getExportDefault,
72869
+ getFileContent: getFileContent,
72870
+ getFileType: getFileType,
72871
+ getFilename: getFilename,
72872
+ getLiteralRaw: getLiteralRaw,
72873
+ getParentDirectory: getParentDirectory,
72874
+ getPathAfterImports: getPathAfterImports,
72875
+ getPathAfterRequires: getPathAfterRequires,
72876
+ getProperties: getProperties,
72877
+ getProperty: getProperty,
72878
+ getRootDirectory: getRootDirectory,
72879
+ getTemplateValues: getTemplateValues,
72880
+ getValues: getValues,
72881
+ hasAttributeValue: hasAttributeValue,
72882
+ hasDataName: hasDataName,
72883
+ hasParens: hasParens,
72884
+ hasTagName: hasTagName,
72885
+ ignore: ignore,
72886
+ init: init,
72887
+ insertAfter: insertAfter,
72888
+ insertBefore: insertBefore,
72889
+ isConditionKeyword: isConditionKeyword,
72890
+ isDeclarationKeyword: isDeclarationKeyword,
72891
+ isESM: isESM,
72892
+ isJSON: isJSON,
72893
+ isKeyword: isKeyword,
72894
+ isModuleDeclarationKeyword: isModuleDeclarationKeyword,
72895
+ isModuleExports: isModuleExports,
72896
+ isSimple: isSimple,
72897
+ isSimpleRegExp: isSimpleRegExp,
72898
+ isStatementKeyword: isStatementKeyword,
72899
+ isTSKeyword: isTSKeyword,
72900
+ isTemplate: isTemplate,
72901
+ matchFiles: matchFiles,
72902
+ moveFile: moveFile,
72903
+ parseTemplate: parseTemplate,
72904
+ pause: pause,
72905
+ readDirectory: readDirectory,
72906
+ readFileContent: readFileContent,
72907
+ remove: remove,
72908
+ removeAttributeValue: removeAttributeValue,
72909
+ removeClassName: removeClassName,
72910
+ removeEmptyDirectory: removeEmptyDirectory,
72911
+ removeFile: removeFile,
72912
+ removeParens: removeParens,
72913
+ rename: rename,
72914
+ renameFile: renameFile,
72915
+ renameFiles: renameFiles,
72916
+ renameProperty: renameProperty,
72917
+ replaceWith: replaceWith,
72918
+ replaceWithMultiple: replaceWithMultiple,
72919
+ setAttributeValue: setAttributeValue,
72920
+ setLiteralValue: setLiteralValue,
72921
+ setValues: setValues,
72922
+ start: start,
72923
+ toExpression: toExpression,
72924
+ toJS: toJS,
72925
+ transformRegExp: transformRegExp,
72926
+ traverse: traverse$1,
72927
+ traverseProperties: traverseProperties,
72928
+ writeFileContent: writeFileContent
72969
72929
  });
72970
72930
 
72971
72931
  const codeframe = ({source, error, highlightCode = true}) => {
@@ -72985,20 +72945,20 @@ const codeframe = ({source, error, highlightCode = true}) => {
72985
72945
  };
72986
72946
 
72987
72947
  var exports$1 = /*#__PURE__*/Object.freeze({
72988
- __proto__: null,
72989
- codeframe: codeframe,
72990
- findPlaces: findPlaces,
72991
- findPlacesAsync: findPlacesAsync,
72992
- generate: generate,
72993
- operator: operator,
72994
- parse: parse$2,
72995
- print: print,
72996
- putoutAsync: putoutAsync,
72997
- template: template$1,
72998
- transform: transform,
72999
- transformAsync: transformAsync,
73000
- traverse: traverse3,
73001
- types: lib_exports
72948
+ __proto__: null,
72949
+ codeframe: codeframe,
72950
+ findPlaces: findPlaces,
72951
+ findPlacesAsync: findPlacesAsync,
72952
+ generate: generate,
72953
+ operator: operator,
72954
+ parse: parse$2,
72955
+ print: print,
72956
+ putoutAsync: putoutAsync,
72957
+ template: template$1,
72958
+ transform: transform,
72959
+ transformAsync: transformAsync,
72960
+ traverse: traverse3,
72961
+ types: lib_exports
73002
72962
  });
73003
72963
 
73004
72964
  Object.assign(putout, exports$1);