@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.
@@ -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 :
@@ -2820,7 +2789,7 @@ __export(lib_exports, {
2820
2789
  TSUnionType: () => TSUnionType$1,
2821
2790
  TSUnknownKeyword: () => TSUnknownKeyword$1,
2822
2791
  TSVoidKeyword: () => TSVoidKeyword$1,
2823
- TYPES: () => TYPES$4,
2792
+ TYPES: () => TYPES$3,
2824
2793
  TYPESCRIPT_TYPES: () => TYPESCRIPT_TYPES,
2825
2794
  TaggedTemplateExpression: () => TaggedTemplateExpression$1,
2826
2795
  TemplateElement: () => TemplateElement,
@@ -3686,7 +3655,7 @@ __export(lib_exports, {
3686
3655
  toKeyAlias: () => toKeyAlias,
3687
3656
  toStatement: () => toStatement$1,
3688
3657
  topicReference: () => topicReference,
3689
- traverse: () => traverse$2,
3658
+ traverse: () => traverse$4,
3690
3659
  traverseFast: () => traverseFast,
3691
3660
  tryStatement: () => tryStatement,
3692
3661
  tsAnyKeyword: () => tsAnyKeyword,
@@ -13568,7 +13537,7 @@ for (const {types: types2, set} of allExpandedTypes) {
13568
13537
  }
13569
13538
  }
13570
13539
 
13571
- var TYPES$4 = [].concat(Object.keys(VISITOR_KEYS), Object.keys(FLIPPED_ALIAS_KEYS), Object.keys(DEPRECATED_KEYS));
13540
+ var TYPES$3 = [].concat(Object.keys(VISITOR_KEYS), Object.keys(FLIPPED_ALIAS_KEYS), Object.keys(DEPRECATED_KEYS));
13572
13541
 
13573
13542
  function validate$1$1(node, key, val) {
13574
13543
  if (!node)
@@ -19591,7 +19560,7 @@ function getFunctionName(node, parent) {
19591
19560
  };
19592
19561
  }
19593
19562
 
19594
- function traverse$2(node, handlers, state) {
19563
+ function traverse$4(node, handlers, state) {
19595
19564
  if (typeof handlers === 'function') {
19596
19565
  handlers = {
19597
19566
  enter: handlers,
@@ -21375,7 +21344,7 @@ var TokContext = class {
21375
21344
  preserveSpace;
21376
21345
  };
21377
21346
 
21378
- var types$2 = {
21347
+ var types = {
21379
21348
  brace: new TokContext('{'),
21380
21349
  j_oTag: new TokContext('<tag'),
21381
21350
  j_cTag: new TokContext('</tag'),
@@ -23289,9 +23258,9 @@ var jsx = (superClass) => class JSXParserMixin extends superClass {
23289
23258
  switch(this.state.type) {
23290
23259
  case 2:
23291
23260
  node = this.startNode();
23292
- this.setContext(types$2.brace);
23261
+ this.setContext(types.brace);
23293
23262
  this.next();
23294
- node = this.jsxParseExpressionContainer(node, types$2.j_oTag);
23263
+ node = this.jsxParseExpressionContainer(node, types.j_oTag);
23295
23264
 
23296
23265
  if (node.expression.type === 'JSXEmptyExpression') {
23297
23266
  this.raise(JsxErrors.AttributeIsEmpty, node);
@@ -23316,7 +23285,7 @@ var jsx = (superClass) => class JSXParserMixin extends superClass {
23316
23285
  jsxParseSpreadChild(node) {
23317
23286
  this.next();
23318
23287
  node.expression = this.parseExpression();
23319
- this.setContext(types$2.j_expr);
23288
+ this.setContext(types.j_expr);
23320
23289
  this.state.canStartJSXElement = true;
23321
23290
  this.expect(4);
23322
23291
  return this.finishNode(node, 'JSXSpreadChild');
@@ -23345,11 +23314,11 @@ var jsx = (superClass) => class JSXParserMixin extends superClass {
23345
23314
  const node = this.startNode();
23346
23315
 
23347
23316
  if (this.match(2)) {
23348
- this.setContext(types$2.brace);
23317
+ this.setContext(types.brace);
23349
23318
  this.next();
23350
23319
  this.expect(17);
23351
23320
  node.argument = this.parseMaybeAssignAllowIn();
23352
- this.setContext(types$2.j_oTag);
23321
+ this.setContext(types.j_oTag);
23353
23322
  this.state.canStartJSXElement = true;
23354
23323
  this.expect(4);
23355
23324
  return this.finishNode(node, 'JSXSpreadAttribute');
@@ -23423,13 +23392,13 @@ var jsx = (superClass) => class JSXParserMixin extends superClass {
23423
23392
 
23424
23393
  case 2: {
23425
23394
  const node2 = this.startNode();
23426
- this.setContext(types$2.brace);
23395
+ this.setContext(types.brace);
23427
23396
  this.next();
23428
23397
 
23429
23398
  if (this.match(17)) {
23430
23399
  children.push(this.jsxParseSpreadChild(node2));
23431
23400
  } else {
23432
- children.push(this.jsxParseExpressionContainer(node2, types$2.j_expr));
23401
+ children.push(this.jsxParseExpressionContainer(node2, types.j_expr));
23433
23402
  }
23434
23403
 
23435
23404
  break;
@@ -23505,12 +23474,12 @@ var jsx = (superClass) => class JSXParserMixin extends superClass {
23505
23474
  getTokenFromCode(code2) {
23506
23475
  const context = this.curContext();
23507
23476
 
23508
- if (context === types$2.j_expr) {
23477
+ if (context === types.j_expr) {
23509
23478
  this.jsxReadToken();
23510
23479
  return;
23511
23480
  }
23512
23481
 
23513
- if (context === types$2.j_oTag || context === types$2.j_cTag) {
23482
+ if (context === types.j_oTag || context === types.j_cTag) {
23514
23483
  if (isIdentifierStart2(code2)) {
23515
23484
  this.jsxReadWord();
23516
23485
  return;
@@ -23522,7 +23491,7 @@ var jsx = (superClass) => class JSXParserMixin extends superClass {
23522
23491
  return;
23523
23492
  }
23524
23493
 
23525
- if ((code2 === 34 || code2 === 39) && context === types$2.j_oTag) {
23494
+ if ((code2 === 34 || code2 === 39) && context === types.j_oTag) {
23526
23495
  this.jsxReadString(code2);
23527
23496
  return;
23528
23497
  }
@@ -23541,18 +23510,18 @@ var jsx = (superClass) => class JSXParserMixin extends superClass {
23541
23510
  const {context, type} = this.state;
23542
23511
 
23543
23512
  if (type === 52 && prevType === 138) {
23544
- context.splice(-2, 2, types$2.j_cTag);
23513
+ context.splice(-2, 2, types.j_cTag);
23545
23514
  this.state.canStartJSXElement = false;
23546
23515
  } else if (type === 138) {
23547
- context.push(types$2.j_oTag);
23516
+ context.push(types.j_oTag);
23548
23517
  } else if (type === 139) {
23549
23518
  const out = context[context.length - 1];
23550
23519
 
23551
- if (out === types$2.j_oTag && prevType === 52 || out === types$2.j_cTag) {
23520
+ if (out === types.j_oTag && prevType === 52 || out === types.j_cTag) {
23552
23521
  context.pop();
23553
- this.state.canStartJSXElement = context[context.length - 1] === types$2.j_expr;
23522
+ this.state.canStartJSXElement = context[context.length - 1] === types.j_expr;
23554
23523
  } else {
23555
- this.setContext(types$2.j_expr);
23524
+ this.setContext(types.j_expr);
23556
23525
  this.state.canStartJSXElement = true;
23557
23526
  }
23558
23527
  } else {
@@ -24134,7 +24103,7 @@ var State$2 = class _State {
24134
24103
  end = 0;
24135
24104
  lastTokEndLoc = null;
24136
24105
  lastTokStartLoc = null;
24137
- context = [types$2.brace];
24106
+ context = [types.brace];
24138
24107
  get canStartJSXElement() {
24139
24108
  return (this.flags & 1024) > 0;
24140
24109
  }
@@ -28522,7 +28491,7 @@ var typescript$1 = (superClass) => class TypeScriptParserMixin extends superClas
28522
28491
  }
28523
28492
 
28524
28493
  tsInTopLevelContext(cb) {
28525
- if (this.curContext() !== types$2.brace) {
28494
+ if (this.curContext() !== types.brace) {
28526
28495
  const oldContext = this.state.context;
28527
28496
 
28528
28497
  this.state.context = [oldContext[0]];
@@ -28908,7 +28877,7 @@ var typescript$1 = (superClass) => class TypeScriptParserMixin extends superClas
28908
28877
 
28909
28878
  if (node.params.length === 0) {
28910
28879
  this.raise(TSErrors.EmptyTypeArguments, node);
28911
- } else if (!this.state.inType && this.curContext() === types$2.brace) {
28880
+ } else if (!this.state.inType && this.curContext() === types.brace) {
28912
28881
  this.reScan_lt_gt();
28913
28882
  }
28914
28883
 
@@ -29815,7 +29784,7 @@ var typescript$1 = (superClass) => class TypeScriptParserMixin extends superClas
29815
29784
 
29816
29785
  const currentContext = context[context.length - 1];
29817
29786
 
29818
- if (currentContext === types$2.j_oTag || currentContext === types$2.j_expr) {
29787
+ if (currentContext === types.j_oTag || currentContext === types.j_expr) {
29819
29788
  context.pop();
29820
29789
  }
29821
29790
  }
@@ -35432,16 +35401,6 @@ function parse$9(input, options) {
35432
35401
  }
35433
35402
  }
35434
35403
 
35435
- function parseExpression$1(input, options) {
35436
- const parser = getParser$1(options, input);
35437
-
35438
- if (parser.options.strictMode) {
35439
- parser.state.strict = true;
35440
- }
35441
-
35442
- return parser.getExpression();
35443
- }
35444
-
35445
35404
  function generateExportedTokenTypes(internalTokenTypes) {
35446
35405
  const tokenTypes2 = {};
35447
35406
 
@@ -35452,7 +35411,7 @@ function generateExportedTokenTypes(internalTokenTypes) {
35452
35411
  return tokenTypes2;
35453
35412
  }
35454
35413
 
35455
- var tokTypes = generateExportedTokenTypes(tt);
35414
+ generateExportedTokenTypes(tt);
35456
35415
 
35457
35416
  function getParser$1(options, input) {
35458
35417
  let cls = Parser;
@@ -44659,7 +44618,7 @@ function verify$1(visitor) {
44659
44618
  continue;
44660
44619
 
44661
44620
  if (!TYPES2.includes(nodeType)) {
44662
- 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'}`);
44621
+ 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'}`);
44663
44622
  }
44664
44623
 
44665
44624
  const visitors2 = visitor[nodeType];
@@ -47585,7 +47544,7 @@ function replaceWithSourceString(replacement) {
47585
47544
  return this.replaceWith(expressionAST);
47586
47545
  }
47587
47546
 
47588
- function replaceWith$3(replacementPath) {
47547
+ function replaceWith$1(replacementPath) {
47589
47548
  resync.call(this);
47590
47549
 
47591
47550
  if (this.removed) {
@@ -50214,7 +50173,7 @@ var methods = {
50214
50173
  isGenericType,
50215
50174
  replaceWithMultiple: replaceWithMultiple$1,
50216
50175
  replaceWithSourceString,
50217
- replaceWith: replaceWith$3,
50176
+ replaceWith: replaceWith$1,
50218
50177
  replaceExpressionWithStatements,
50219
50178
  replaceInline,
50220
50179
  evaluateTruthy,
@@ -50271,7 +50230,7 @@ var methods = {
50271
50230
  };
50272
50231
 
50273
50232
  Object.assign(NodePath_Final.prototype, methods);
50274
- for (const type of TYPES$4) {
50233
+ for (const type of TYPES$3) {
50275
50234
  const typeKey = `is${type}`;
50276
50235
  const fn = lib_exports[typeKey];
50277
50236
 
@@ -50290,8 +50249,8 @@ for (const type of Object.keys(virtualTypes)) {
50290
50249
  if (type.startsWith('_'))
50291
50250
  continue;
50292
50251
 
50293
- if (!TYPES$4.includes(type))
50294
- TYPES$4.push(type);
50252
+ if (!TYPES$3.includes(type))
50253
+ TYPES$3.push(type);
50295
50254
  }
50296
50255
 
50297
50256
  var {VISITOR_KEYS: VISITOR_KEYS$2} = lib_exports;
@@ -50963,19 +50922,7 @@ traverse3.hasType = function(tree, type, denylistTypes) {
50963
50922
  };
50964
50923
  traverse3.cache = cache;
50965
50924
 
50966
- var bundle = /*#__PURE__*/Object.freeze({
50967
- __proto__: null,
50968
- codeFrameColumns: codeFrameColumns,
50969
- generate: generate$1,
50970
- parse: parse$9,
50971
- parseExpression: parseExpression$1,
50972
- template: index,
50973
- tokTypes: tokTypes,
50974
- traverse: traverse3,
50975
- types: lib_exports
50976
- });
50977
-
50978
- const TYPES$3 = {
50925
+ const TYPES$2 = {
50979
50926
  TOKEN: 'Token',
50980
50927
  NEWLINE: 'Newline',
50981
50928
  SPLITTER: 'Splitter',
@@ -52675,7 +52622,7 @@ function maybePrintBrace(brace, path, printer, semantics) {
52675
52622
 
52676
52623
  const {isArrayExpression: isArrayExpression$8} = lib_exports;
52677
52624
 
52678
- const TYPES$2 = [
52625
+ const TYPES$1 = [
52679
52626
  'NullLiteral',
52680
52627
  'NumericLiteral',
52681
52628
  'BigIntLiteral',
@@ -52692,7 +52639,7 @@ const isInsideTuple = (path) => {
52692
52639
  if (second !== path.node)
52693
52640
  return false;
52694
52641
 
52695
- return TYPES$2.includes(first.type);
52642
+ return TYPES$1.includes(first.type);
52696
52643
  };
52697
52644
 
52698
52645
  const {
@@ -53836,7 +53783,7 @@ function usedInAssignment(path) {
53836
53783
  return false;
53837
53784
  }
53838
53785
 
53839
- const {entries: entries$a} = Object;
53786
+ const {entries: entries$b} = Object;
53840
53787
  const isOneDeclaration = ({node}) => node.declarations.length === 1;
53841
53788
 
53842
53789
  const remove = (path) => {
@@ -53862,7 +53809,7 @@ const remove = (path) => {
53862
53809
  const elements = path.parentPath.get('elements');
53863
53810
  const n = elements.length - 1;
53864
53811
 
53865
- for (const [i, el] of entries$a(elements)) {
53812
+ for (const [i, el] of entries$b(elements)) {
53866
53813
  if (el !== path)
53867
53814
  continue;
53868
53815
 
@@ -54092,7 +54039,7 @@ const getProperties = (path, names) => {
54092
54039
  return result;
54093
54040
  };
54094
54041
 
54095
- const getProperty$2 = (path, name) => {
54042
+ const getProperty = (path, name) => {
54096
54043
  if (!isObjectExpression$4(path) && !isObjectPattern$1(path))
54097
54044
  throw Error(`☝️Looks like path is not 'ObjectExpression | ObjectPattern', but: '${path.type}' for path: ${path}`);
54098
54045
 
@@ -54238,7 +54185,7 @@ const parseNode$2 = (a) => {
54238
54185
  return a;
54239
54186
  };
54240
54187
 
54241
- const replaceWith$2 = (path, node) => {
54188
+ const replaceWith = (path, node) => {
54242
54189
  node = parseNode$2(node);
54243
54190
 
54244
54191
  if (path?.parentPath?.isExpressionStatement() && !path.parentPath.isProgram()) {
@@ -54339,34 +54286,6 @@ const isESM = (path) => {
54339
54286
  return false;
54340
54287
  };
54341
54288
 
54342
- var operate = /*#__PURE__*/Object.freeze({
54343
- __proto__: null,
54344
- compute: compute,
54345
- extract: extract,
54346
- findBinding: findBinding,
54347
- getBinding: getBinding,
54348
- getBindingPath: getBindingPath,
54349
- getExportDefault: getExportDefault,
54350
- getLiteralRaw: getLiteralRaw,
54351
- getPathAfterImports: getPathAfterImports,
54352
- getPathAfterRequires: getPathAfterRequires,
54353
- getProperties: getProperties,
54354
- getProperty: getProperty$2,
54355
- insertAfter: insertAfter,
54356
- insertBefore: insertBefore,
54357
- isESM: isESM,
54358
- isModuleExports: isModuleExports,
54359
- isSimple: isSimple,
54360
- remove: remove,
54361
- rename: rename,
54362
- renameProperty: renameProperty,
54363
- replaceWith: replaceWith$2,
54364
- replaceWithMultiple: replaceWithMultiple,
54365
- setLiteralValue: setLiteralValue,
54366
- toExpression: toExpression,
54367
- traverseProperties: traverseProperties
54368
- });
54369
-
54370
54289
  const {
54371
54290
  isObjectExpression: isObjectExpression$3,
54372
54291
  isArrayExpression: isArrayExpression$3,
@@ -55798,6 +55717,35 @@ const ExportNamedDeclaration = {
55798
55717
  },
55799
55718
  };
55800
55719
 
55720
+ function getAugmentedNamespace(n) {
55721
+ if (Object.prototype.hasOwnProperty.call(n, '__esModule')) return n;
55722
+ var f = n.default;
55723
+ if (typeof f == "function") {
55724
+ var a = function a () {
55725
+ var isInstance = false;
55726
+ try {
55727
+ isInstance = this instanceof a;
55728
+ } catch {}
55729
+ if (isInstance) {
55730
+ return Reflect.construct(f, arguments, this.constructor);
55731
+ }
55732
+ return f.apply(this, arguments);
55733
+ };
55734
+ a.prototype = f.prototype;
55735
+ } else a = {};
55736
+ Object.defineProperty(a, '__esModule', {value: true});
55737
+ Object.keys(n).forEach(function (k) {
55738
+ var d = Object.getOwnPropertyDescriptor(n, k);
55739
+ Object.defineProperty(a, k, d.get ? d : {
55740
+ enumerable: true,
55741
+ get: function () {
55742
+ return n[k];
55743
+ }
55744
+ });
55745
+ });
55746
+ return a;
55747
+ }
55748
+
55801
55749
  var parseImportSpecifiers_1 = (specifiers) => {
55802
55750
  const defaults = [];
55803
55751
  const namespaces = [];
@@ -58456,168 +58404,168 @@ const JSXClosingElement = (path, {print}) => {
58456
58404
  };
58457
58405
 
58458
58406
  var baseVisitors = /*#__PURE__*/Object.freeze({
58459
- __proto__: null,
58460
- ArrayExpression: ArrayExpression,
58461
- ArrayPattern: ArrayPattern,
58462
- ArrowFunctionExpression: ArrowFunctionExpression,
58463
- AssignmentExpression: AssignmentExpression,
58464
- AssignmentPattern: AssignmentPattern,
58465
- AwaitExpression: AwaitExpression,
58466
- BigIntLiteral: BigIntLiteral,
58467
- BinaryExpression: BinaryExpression,
58468
- BlockStatement: BlockStatement,
58469
- BooleanLiteral: BooleanLiteral,
58470
- BreakStatement: BreakStatement,
58471
- CallExpression: CallExpression,
58472
- CatchClause: CatchClause,
58473
- ClassAccessorProperty: ClassAccessorProperty,
58474
- ClassDeclaration: ClassDeclaration,
58475
- ClassExpression: ClassExpression,
58476
- ClassMethod: ClassMethod,
58477
- ClassPrivateMethod: ClassPrivateMethod,
58478
- ClassPrivateProperty: ClassPrivateProperty,
58479
- ClassProperty: ClassProperty,
58480
- ConditionalExpression: ConditionalExpression,
58481
- ContinueStatement: ContinueStatement,
58482
- DebuggerStatement: DebuggerStatement,
58483
- Decorator: Decorator,
58484
- Directive: Directive,
58485
- DirectiveLiteral: DirectiveLiteral,
58486
- DoWhileStatement: DoWhileStatement,
58487
- EmptyStatement: EmptyStatement,
58488
- ExportAllDeclaration: ExportAllDeclaration,
58489
- ExportDefaultDeclaration: ExportDefaultDeclaration,
58490
- ExportDefaultSpecifier: ExportDefaultSpecifier,
58491
- ExportNamedDeclaration: ExportNamedDeclaration,
58492
- ExportNamespaceSpecifier: ExportNamespaceSpecifier,
58493
- ExportSpecifier: ExportSpecifier,
58494
- ExpressionStatement: ExpressionStatement,
58495
- ForInStatement: ForInStatement,
58496
- ForOfStatement: ForOfStatement,
58497
- ForStatement: ForStatement,
58498
- FunctionDeclaration: FunctionDeclaration,
58499
- FunctionExpression: FunctionExpression,
58500
- Identifier: Identifier,
58501
- IfStatement: IfStatement,
58502
- ImportAttribute: ImportAttribute,
58503
- ImportDeclaration: ImportDeclaration,
58504
- ImportExpression: ImportExpression,
58505
- InterpreterDirective: InterpreterDirective,
58506
- JSXAttribute: JSXAttribute,
58507
- JSXClosingElement: JSXClosingElement,
58508
- JSXClosingFragment: JSXClosingFragment,
58509
- JSXElement: JSXElement,
58510
- JSXEmptyExpression: JSXEmptyExpression,
58511
- JSXExpressionContainer: JSXExpressionContainer,
58512
- JSXFragment: JSXFragment,
58513
- JSXIdentifier: JSXIdentifier,
58514
- JSXMemberExpression: JSXMemberExpression,
58515
- JSXOpeningElement: JSXOpeningElement,
58516
- JSXOpeningFragment: JSXOpeningFragment,
58517
- JSXSpreadAttribute: JSXSpreadAttribute,
58518
- JSXText: JSXText,
58519
- LabeledStatement: LabeledStatement,
58520
- LogicalExpression: LogicalExpression,
58521
- MemberExpression: MemberExpression,
58522
- MetaProperty: MetaProperty,
58523
- NewExpression: NewExpression,
58524
- NullLiteral: NullLiteral,
58525
- NumericLiteral: NumericLiteral,
58526
- ObjectExpression: ObjectExpression,
58527
- ObjectMethod: ObjectMethod,
58528
- ObjectPattern: ObjectPattern,
58529
- ObjectProperty: ObjectProperty,
58530
- OptionalCallExpression: OptionalCallExpression,
58531
- OptionalMemberExpression: OptionalMemberExpression,
58532
- ParenthesizedExpression: ParenthesizedExpression,
58533
- PrivateName: PrivateName,
58534
- Program: Program,
58535
- RegExpLiteral: RegExpLiteral,
58536
- RestElement: RestElement,
58537
- ReturnStatement: ReturnStatement,
58538
- SequenceExpression: SequenceExpression,
58539
- SpreadElement: SpreadElement,
58540
- StaticBlock: StaticBlock,
58541
- StringLiteral: StringLiteral,
58542
- Super: Super,
58543
- SwitchStatement: SwitchStatement,
58544
- TSAnyKeyword: TSAnyKeyword,
58545
- TSArrayType: TSArrayType,
58546
- TSAsExpression: TSAsExpression,
58547
- TSBigIntKeyword: TSBigIntKeyword,
58548
- TSBooleanKeyword: TSBooleanKeyword,
58549
- TSCallSignatureDeclaration: TSCallSignatureDeclaration,
58550
- TSClassImplements: TSClassImplements,
58551
- TSConditionalType: TSConditionalType,
58552
- TSConstructSignatureDeclaration: TSConstructSignatureDeclaration,
58553
- TSConstructorType: TSConstructorType,
58554
- TSDeclareFunction: TSDeclareFunction,
58555
- TSDeclareMethod: TSDeclareMethod,
58556
- TSEnumDeclaration: TSEnumDeclaration,
58557
- TSEnumMember: TSEnumMember,
58558
- TSExportAssignment: TSExportAssignment,
58559
- TSExternalModuleReference: TSExternalModuleReference,
58560
- TSFunctionType: TSFunctionType,
58561
- TSImportEqualsDeclaration: TSImportEqualsDeclaration,
58562
- TSImportType: TSImportType,
58563
- TSIndexSignature: TSIndexSignature,
58564
- TSIndexedAccessType: TSIndexedAccessType,
58565
- TSInferType: TSInferType,
58566
- TSInstantiationExpression: TSInstantiationExpression,
58567
- TSInterfaceBody: TSInterfaceBody,
58568
- TSInterfaceDeclaration: TSInterfaceDeclaration,
58569
- TSInterfaceHeritage: TSInterfaceHeritage,
58570
- TSIntersectionType: TSIntersectionType,
58571
- TSLiteralType: TSLiteralType,
58572
- TSMappedType: TSMappedType,
58573
- TSMethodSignature: TSMethodSignature,
58574
- TSModuleBlock: TSModuleBlock,
58575
- TSModuleDeclaration: TSModuleDeclaration,
58576
- TSNamedTupleMember: TSNamedTupleMember,
58577
- TSNeverKeyword: TSNeverKeyword,
58578
- TSNonNullExpression: TSNonNullExpression,
58579
- TSNullKeyword: TSNullKeyword,
58580
- TSNumberKeyword: TSNumberKeyword,
58581
- TSObjectKeyword: TSObjectKeyword,
58582
- TSOptionalType: TSOptionalType,
58583
- TSParameterProperty: TSParameterProperty,
58584
- TSParenthesizedType: TSParenthesizedType,
58585
- TSPropertySignature: TSPropertySignature,
58586
- TSQualifiedName: TSQualifiedName,
58587
- TSRestType: TSRestType,
58588
- TSSatisfiesExpression: TSSatisfiesExpression,
58589
- TSStringKeyword: TSStringKeyword,
58590
- TSSymbolKeyword: TSSymbolKeyword,
58591
- TSTemplateLiteralType: TSTemplateLiteralType,
58592
- TSThisType: TSThisType,
58593
- TSTupleType: TSTupleType,
58594
- TSTypeAliasDeclaration: TSTypeAliasDeclaration,
58595
- TSTypeAnnotation: TSTypeAnnotation,
58596
- TSTypeAssertion: TSTypeAssertion,
58597
- TSTypeLiteral: TSTypeLiteral,
58598
- TSTypeOperator: TSTypeOperator,
58599
- TSTypeParameter: TSTypeParameter,
58600
- TSTypeParameterDeclaration: TSTypeParameterDeclaration,
58601
- TSTypeParameterInstantiation: TSTypeParameterInstantiation,
58602
- TSTypePredicate: TSTypePredicate,
58603
- TSTypeQuery: TSTypeQuery,
58604
- TSTypeReference: TSTypeReference,
58605
- TSUndefinedKeyword: TSUndefinedKeyword,
58606
- TSUnionType: TSUnionType,
58607
- TSUnknownKeyword: TSUnknownKeyword,
58608
- TSVoidKeyword: TSVoidKeyword,
58609
- TaggedTemplateExpression: TaggedTemplateExpression,
58610
- TemplateLiteral: TemplateLiteral,
58611
- ThisExpression: ThisExpression,
58612
- ThrowStatement: ThrowStatement,
58613
- TryStatement: TryStatement,
58614
- UnaryExpression: UnaryExpression,
58615
- UpdateExpression: UpdateExpression,
58616
- VariableDeclaration: VariableDeclaration,
58617
- VoidPattern: VoidPattern,
58618
- WhileStatement: WhileStatement,
58619
- WithStatement: WithStatement,
58620
- YieldExpression: YieldExpression
58407
+ __proto__: null,
58408
+ ArrayExpression: ArrayExpression,
58409
+ ArrayPattern: ArrayPattern,
58410
+ ArrowFunctionExpression: ArrowFunctionExpression,
58411
+ AssignmentExpression: AssignmentExpression,
58412
+ AssignmentPattern: AssignmentPattern,
58413
+ AwaitExpression: AwaitExpression,
58414
+ BigIntLiteral: BigIntLiteral,
58415
+ BinaryExpression: BinaryExpression,
58416
+ BlockStatement: BlockStatement,
58417
+ BooleanLiteral: BooleanLiteral,
58418
+ BreakStatement: BreakStatement,
58419
+ CallExpression: CallExpression,
58420
+ CatchClause: CatchClause,
58421
+ ClassAccessorProperty: ClassAccessorProperty,
58422
+ ClassDeclaration: ClassDeclaration,
58423
+ ClassExpression: ClassExpression,
58424
+ ClassMethod: ClassMethod,
58425
+ ClassPrivateMethod: ClassPrivateMethod,
58426
+ ClassPrivateProperty: ClassPrivateProperty,
58427
+ ClassProperty: ClassProperty,
58428
+ ConditionalExpression: ConditionalExpression,
58429
+ ContinueStatement: ContinueStatement,
58430
+ DebuggerStatement: DebuggerStatement,
58431
+ Decorator: Decorator,
58432
+ Directive: Directive,
58433
+ DirectiveLiteral: DirectiveLiteral,
58434
+ DoWhileStatement: DoWhileStatement,
58435
+ EmptyStatement: EmptyStatement,
58436
+ ExportAllDeclaration: ExportAllDeclaration,
58437
+ ExportDefaultDeclaration: ExportDefaultDeclaration,
58438
+ ExportDefaultSpecifier: ExportDefaultSpecifier,
58439
+ ExportNamedDeclaration: ExportNamedDeclaration,
58440
+ ExportNamespaceSpecifier: ExportNamespaceSpecifier,
58441
+ ExportSpecifier: ExportSpecifier,
58442
+ ExpressionStatement: ExpressionStatement,
58443
+ ForInStatement: ForInStatement,
58444
+ ForOfStatement: ForOfStatement,
58445
+ ForStatement: ForStatement,
58446
+ FunctionDeclaration: FunctionDeclaration,
58447
+ FunctionExpression: FunctionExpression,
58448
+ Identifier: Identifier,
58449
+ IfStatement: IfStatement,
58450
+ ImportAttribute: ImportAttribute,
58451
+ ImportDeclaration: ImportDeclaration,
58452
+ ImportExpression: ImportExpression,
58453
+ InterpreterDirective: InterpreterDirective,
58454
+ JSXAttribute: JSXAttribute,
58455
+ JSXClosingElement: JSXClosingElement,
58456
+ JSXClosingFragment: JSXClosingFragment,
58457
+ JSXElement: JSXElement,
58458
+ JSXEmptyExpression: JSXEmptyExpression,
58459
+ JSXExpressionContainer: JSXExpressionContainer,
58460
+ JSXFragment: JSXFragment,
58461
+ JSXIdentifier: JSXIdentifier,
58462
+ JSXMemberExpression: JSXMemberExpression,
58463
+ JSXOpeningElement: JSXOpeningElement,
58464
+ JSXOpeningFragment: JSXOpeningFragment,
58465
+ JSXSpreadAttribute: JSXSpreadAttribute,
58466
+ JSXText: JSXText,
58467
+ LabeledStatement: LabeledStatement,
58468
+ LogicalExpression: LogicalExpression,
58469
+ MemberExpression: MemberExpression,
58470
+ MetaProperty: MetaProperty,
58471
+ NewExpression: NewExpression,
58472
+ NullLiteral: NullLiteral,
58473
+ NumericLiteral: NumericLiteral,
58474
+ ObjectExpression: ObjectExpression,
58475
+ ObjectMethod: ObjectMethod,
58476
+ ObjectPattern: ObjectPattern,
58477
+ ObjectProperty: ObjectProperty,
58478
+ OptionalCallExpression: OptionalCallExpression,
58479
+ OptionalMemberExpression: OptionalMemberExpression,
58480
+ ParenthesizedExpression: ParenthesizedExpression,
58481
+ PrivateName: PrivateName,
58482
+ Program: Program,
58483
+ RegExpLiteral: RegExpLiteral,
58484
+ RestElement: RestElement,
58485
+ ReturnStatement: ReturnStatement,
58486
+ SequenceExpression: SequenceExpression,
58487
+ SpreadElement: SpreadElement,
58488
+ StaticBlock: StaticBlock,
58489
+ StringLiteral: StringLiteral,
58490
+ Super: Super,
58491
+ SwitchStatement: SwitchStatement,
58492
+ TSAnyKeyword: TSAnyKeyword,
58493
+ TSArrayType: TSArrayType,
58494
+ TSAsExpression: TSAsExpression,
58495
+ TSBigIntKeyword: TSBigIntKeyword,
58496
+ TSBooleanKeyword: TSBooleanKeyword,
58497
+ TSCallSignatureDeclaration: TSCallSignatureDeclaration,
58498
+ TSClassImplements: TSClassImplements,
58499
+ TSConditionalType: TSConditionalType,
58500
+ TSConstructSignatureDeclaration: TSConstructSignatureDeclaration,
58501
+ TSConstructorType: TSConstructorType,
58502
+ TSDeclareFunction: TSDeclareFunction,
58503
+ TSDeclareMethod: TSDeclareMethod,
58504
+ TSEnumDeclaration: TSEnumDeclaration,
58505
+ TSEnumMember: TSEnumMember,
58506
+ TSExportAssignment: TSExportAssignment,
58507
+ TSExternalModuleReference: TSExternalModuleReference,
58508
+ TSFunctionType: TSFunctionType,
58509
+ TSImportEqualsDeclaration: TSImportEqualsDeclaration,
58510
+ TSImportType: TSImportType,
58511
+ TSIndexSignature: TSIndexSignature,
58512
+ TSIndexedAccessType: TSIndexedAccessType,
58513
+ TSInferType: TSInferType,
58514
+ TSInstantiationExpression: TSInstantiationExpression,
58515
+ TSInterfaceBody: TSInterfaceBody,
58516
+ TSInterfaceDeclaration: TSInterfaceDeclaration,
58517
+ TSInterfaceHeritage: TSInterfaceHeritage,
58518
+ TSIntersectionType: TSIntersectionType,
58519
+ TSLiteralType: TSLiteralType,
58520
+ TSMappedType: TSMappedType,
58521
+ TSMethodSignature: TSMethodSignature,
58522
+ TSModuleBlock: TSModuleBlock,
58523
+ TSModuleDeclaration: TSModuleDeclaration,
58524
+ TSNamedTupleMember: TSNamedTupleMember,
58525
+ TSNeverKeyword: TSNeverKeyword,
58526
+ TSNonNullExpression: TSNonNullExpression,
58527
+ TSNullKeyword: TSNullKeyword,
58528
+ TSNumberKeyword: TSNumberKeyword,
58529
+ TSObjectKeyword: TSObjectKeyword,
58530
+ TSOptionalType: TSOptionalType,
58531
+ TSParameterProperty: TSParameterProperty,
58532
+ TSParenthesizedType: TSParenthesizedType,
58533
+ TSPropertySignature: TSPropertySignature,
58534
+ TSQualifiedName: TSQualifiedName,
58535
+ TSRestType: TSRestType,
58536
+ TSSatisfiesExpression: TSSatisfiesExpression,
58537
+ TSStringKeyword: TSStringKeyword,
58538
+ TSSymbolKeyword: TSSymbolKeyword,
58539
+ TSTemplateLiteralType: TSTemplateLiteralType,
58540
+ TSThisType: TSThisType,
58541
+ TSTupleType: TSTupleType,
58542
+ TSTypeAliasDeclaration: TSTypeAliasDeclaration,
58543
+ TSTypeAnnotation: TSTypeAnnotation,
58544
+ TSTypeAssertion: TSTypeAssertion,
58545
+ TSTypeLiteral: TSTypeLiteral,
58546
+ TSTypeOperator: TSTypeOperator,
58547
+ TSTypeParameter: TSTypeParameter,
58548
+ TSTypeParameterDeclaration: TSTypeParameterDeclaration,
58549
+ TSTypeParameterInstantiation: TSTypeParameterInstantiation,
58550
+ TSTypePredicate: TSTypePredicate,
58551
+ TSTypeQuery: TSTypeQuery,
58552
+ TSTypeReference: TSTypeReference,
58553
+ TSUndefinedKeyword: TSUndefinedKeyword,
58554
+ TSUnionType: TSUnionType,
58555
+ TSUnknownKeyword: TSUnknownKeyword,
58556
+ TSVoidKeyword: TSVoidKeyword,
58557
+ TaggedTemplateExpression: TaggedTemplateExpression,
58558
+ TemplateLiteral: TemplateLiteral,
58559
+ ThisExpression: ThisExpression,
58560
+ ThrowStatement: ThrowStatement,
58561
+ TryStatement: TryStatement,
58562
+ UnaryExpression: UnaryExpression,
58563
+ UpdateExpression: UpdateExpression,
58564
+ VariableDeclaration: VariableDeclaration,
58565
+ VoidPattern: VoidPattern,
58566
+ WhileStatement: WhileStatement,
58567
+ WithStatement: WithStatement,
58568
+ YieldExpression: YieldExpression
58621
58569
  });
58622
58570
 
58623
58571
  const isString$c = (a) => typeof a === 'string';
@@ -58803,7 +58751,7 @@ const createDebug$3 = (tokens) => (a) => {
58803
58751
  return;
58804
58752
 
58805
58753
  tokens.push({
58806
- type: TYPES$3.DEBUG,
58754
+ type: TYPES$2.DEBUG,
58807
58755
  value: `/*__${stringSnakeCase(a)}*/`,
58808
58756
  });
58809
58757
  };
@@ -58988,14 +58936,14 @@ const tokenize = (ast, overrides) => {
58988
58936
 
58989
58937
  const write = (value) => {
58990
58938
  addToken({
58991
- type: TYPES$3.TOKEN,
58939
+ type: TYPES$2.TOKEN,
58992
58940
  value,
58993
58941
  });
58994
58942
  };
58995
58943
 
58996
58944
  const indent = () => {
58997
58945
  addToken({
58998
- type: TYPES$3.INDENT,
58946
+ type: TYPES$2.INDENT,
58999
58947
  value: printIndent(i, format.indent),
59000
58948
  });
59001
58949
  };
@@ -59008,7 +58956,7 @@ const tokenize = (ast, overrides) => {
59008
58956
 
59009
58957
  const newline = () => {
59010
58958
  addToken({
59011
- type: TYPES$3.NEWLINE,
58959
+ type: TYPES$2.NEWLINE,
59012
58960
  value: format.newline,
59013
58961
  });
59014
58962
  };
@@ -59032,7 +58980,7 @@ const tokenize = (ast, overrides) => {
59032
58980
 
59033
58981
  const space = () => {
59034
58982
  addToken({
59035
- type: TYPES$3.SPACE,
58983
+ type: TYPES$2.SPACE,
59036
58984
  value: format.space,
59037
58985
  });
59038
58986
  };
@@ -59049,21 +58997,21 @@ const tokenize = (ast, overrides) => {
59049
58997
 
59050
58998
  const splitter = () => {
59051
58999
  addToken({
59052
- type: TYPES$3.SPLITTER,
59000
+ type: TYPES$2.SPLITTER,
59053
59001
  value: format.splitter,
59054
59002
  });
59055
59003
  };
59056
59004
 
59057
59005
  const quote = () => {
59058
59006
  addToken({
59059
- type: TYPES$3.QUOTE,
59007
+ type: TYPES$2.QUOTE,
59060
59008
  value: format.quote,
59061
59009
  });
59062
59010
  };
59063
59011
 
59064
59012
  const endOfFile = () => {
59065
59013
  addToken({
59066
- type: TYPES$3.END_OF_FILE,
59014
+ type: TYPES$2.END_OF_FILE,
59067
59015
  value: format.endOfFile,
59068
59016
  });
59069
59017
  };
@@ -59106,7 +59054,7 @@ const tokenize = (ast, overrides) => {
59106
59054
  traverse,
59107
59055
  maybe,
59108
59056
  quote,
59109
- store: fullstore$2(),
59057
+ store: fullstore(),
59110
59058
  });
59111
59059
 
59112
59060
  const currentTraversers = {
@@ -59264,20 +59212,59 @@ var lib = removeBlankLines;
59264
59212
 
59265
59213
  var removeBlankLines$1 = lib.default;
59266
59214
 
59267
- const __json_name$1 = '__putout_processor_json';
59268
- const __yaml_name$1 = '__putout_processor_yaml';
59269
- const __filesystem_name$3 = '__putout_processor_filesystem';
59270
- const __ignore_name$1 = '__putout_processor_ignore';
59215
+ const cut$1 = (a) => a.slice(0, a.indexOf('('));
59216
+ const createPrefix = (name) => {
59217
+ if (name.includes('('))
59218
+ return `${cut$1(name)}(`;
59219
+
59220
+ return `${name}(`;
59221
+ };
59271
59222
 
59272
- const TYPES$1 = [
59273
- __json_name$1,
59274
- __yaml_name$1,
59275
- __filesystem_name$3,
59276
- __ignore_name$1,
59223
+ const createSuffix = () => ');\n';
59224
+ const maybeNewline = (a) => a.at(-1) === '\n' ? a : `${a}\n`;
59225
+
59226
+ const __json_name = '__putout_processor_json';
59227
+ const __yaml_name = '__putout_processor_yaml';
59228
+ const __toml_name = '__putout_processor_toml';
59229
+ const __filesystem_name = '__putout_processor_filesystem';
59230
+ const __ignore_name = '__putout_processor_ignore';
59231
+
59232
+ const __json = `${__json_name}(__object)`;
59233
+ const __yaml = `${__yaml_name}(__object)`;
59234
+ const __toml = `${__toml_name}(__object)`;
59235
+ const __filesystem = `${__filesystem_name}(__object)`;
59236
+ const __ignore = `${__ignore_name}(__array)`;
59237
+
59238
+ const TYPES = [
59239
+ __json_name,
59240
+ __yaml_name,
59241
+ __filesystem_name,
59242
+ __ignore_name,
59277
59243
  ];
59278
59244
 
59279
- var isJSON$1 = (source) => {
59280
- for (const type of TYPES$1) {
59245
+ const toJS = (source, name = __json) => {
59246
+ const prefix = createPrefix(name);
59247
+ const suffix = createSuffix();
59248
+
59249
+ return `${prefix}${source}${suffix}`;
59250
+ };
59251
+
59252
+ const fromJS = (source, name = __json) => {
59253
+ source = maybeNewline(source);
59254
+ const shortName = cut$1(name);
59255
+
59256
+ source = source.slice(source.indexOf(shortName));
59257
+
59258
+ const prefix = createPrefix(name);
59259
+ const suffix = createSuffix();
59260
+ const length = source.length - suffix.length;
59261
+ const sliced = source.slice(prefix.length, length);
59262
+
59263
+ return maybeNewline(removeBlankLines$1(sliced));
59264
+ };
59265
+
59266
+ const isJSON = (source) => {
59267
+ for (const type of TYPES) {
59281
59268
  if (!source.indexOf(type))
59282
59269
  return true;
59283
59270
  }
@@ -59330,7 +59317,7 @@ function isASTJSON(ast) {
59330
59317
  if (!isIdentifier$5(callee))
59331
59318
  return false;
59332
59319
 
59333
- return isJSON$1(callee.name);
59320
+ return isJSON(callee.name);
59334
59321
  }
59335
59322
 
59336
59323
  const print$2 = (ast, overrides = {}) => {
@@ -60026,11 +60013,11 @@ var onceExports = once$6.exports;
60026
60013
  const noop$3 = () => {};
60027
60014
 
60028
60015
  var empty = /*#__PURE__*/Object.freeze({
60029
- __proto__: null,
60030
- default: noop$3
60016
+ __proto__: null,
60017
+ default: noop$3
60031
60018
  });
60032
60019
 
60033
- var require$$1$1 = /*@__PURE__*/getAugmentedNamespace(empty);
60020
+ var require$$1 = /*@__PURE__*/getAugmentedNamespace(empty);
60034
60021
 
60035
60022
  // eslint-disable-next-line node/no-unsupported-features/es-syntax
60036
60023
 
@@ -60058,11 +60045,11 @@ function privateMethods(Parser) {
60058
60045
  }
60059
60046
 
60060
60047
  var acornPrivateMethods = /*#__PURE__*/Object.freeze({
60061
- __proto__: null,
60062
- default: privateMethods
60048
+ __proto__: null,
60049
+ default: privateMethods
60063
60050
  });
60064
60051
 
60065
- var require$$2$1 = /*@__PURE__*/getAugmentedNamespace(acornPrivateMethods);
60052
+ var require$$2 = /*@__PURE__*/getAugmentedNamespace(acornPrivateMethods);
60066
60053
 
60067
60054
  var acornStage3;
60068
60055
  var hasRequiredAcornStage3;
@@ -60073,9 +60060,9 @@ function requireAcornStage3 () {
60073
60060
 
60074
60061
  acornStage3 = function(Parser) {
60075
60062
  return Parser.extend(
60076
- require$$1$1,
60077
- require$$1$1,
60078
- require$$2$1
60063
+ require$$1,
60064
+ require$$1,
60065
+ require$$2
60079
60066
  )
60080
60067
  };
60081
60068
  return acornStage3;
@@ -60084,10 +60071,10 @@ function requireAcornStage3 () {
60084
60071
  const once$4 = onceExports;
60085
60072
 
60086
60073
  const initAcorn = once$4(() => {
60087
- const {Parser} = require$$1$1;
60074
+ const {Parser} = require$$1;
60088
60075
 
60089
60076
  const stage3 = requireAcornStage3();
60090
- const typescript = require$$1$1.default;
60077
+ const typescript = require$$1.default;
60091
60078
 
60092
60079
  return Parser.extend(typescript(), stage3);
60093
60080
  });
@@ -60140,10 +60127,10 @@ const allowUndeclaredExports = true;
60140
60127
  const allowImportExportEverywhere = true;
60141
60128
 
60142
60129
  var options = /*#__PURE__*/Object.freeze({
60143
- __proto__: null,
60144
- allowImportExportEverywhere: allowImportExportEverywhere,
60145
- allowReturnOutsideFunction: allowReturnOutsideFunction,
60146
- allowUndeclaredExports: allowUndeclaredExports
60130
+ __proto__: null,
60131
+ allowImportExportEverywhere: allowImportExportEverywhere,
60132
+ allowReturnOutsideFunction: allowReturnOutsideFunction,
60133
+ allowUndeclaredExports: allowUndeclaredExports
60147
60134
  });
60148
60135
 
60149
60136
  const {assign: assign$5} = Object;
@@ -60200,7 +60187,7 @@ function getBabelLangExts({isTS, isFlow, isJSX}) {
60200
60187
 
60201
60188
  const once$3 = onceExports;
60202
60189
 
60203
- const initEspree = once$3(() => require$$1$1);
60190
+ const initEspree = once$3(() => require$$1);
60204
60191
 
60205
60192
  var parse$6 = (source) => {
60206
60193
  const {parse} = initEspree();
@@ -60220,7 +60207,7 @@ var parse$6 = (source) => {
60220
60207
 
60221
60208
  const once$2 = onceExports;
60222
60209
 
60223
- const initEsprima = once$2(() => require$$1$1);
60210
+ const initEsprima = once$2(() => require$$1);
60224
60211
 
60225
60212
  var parse$5 = (source) => {
60226
60213
  const {parse} = initEsprima();
@@ -60236,7 +60223,7 @@ var parse$5 = (source) => {
60236
60223
 
60237
60224
  const once$1 = onceExports;
60238
60225
 
60239
- const initTenko = once$1(() => require$$1$1);
60226
+ const initTenko = once$1(() => require$$1);
60240
60227
 
60241
60228
  var parse$4 = (source) => {
60242
60229
  const {Tenko} = initTenko();
@@ -60250,7 +60237,7 @@ var parse$4 = (source) => {
60250
60237
  };
60251
60238
 
60252
60239
  const once = onceExports;
60253
- const initHermes = once(() => require$$1$1);
60240
+ const initHermes = once(() => require$$1);
60254
60241
 
60255
60242
  var parse$3 = (source) => {
60256
60243
  const parser = initHermes();
@@ -60807,7 +60794,7 @@ function relative(from, to) {
60807
60794
  var sep = '/';
60808
60795
  var delimiter = ':';
60809
60796
 
60810
- function dirname$1(path) {
60797
+ function dirname(path) {
60811
60798
  var result = splitPath(path),
60812
60799
  root = result[0],
60813
60800
  dir = result[1];
@@ -60825,7 +60812,7 @@ function dirname$1(path) {
60825
60812
  return root + dir;
60826
60813
  }
60827
60814
 
60828
- function basename$1(path, ext) {
60815
+ function basename(path, ext) {
60829
60816
  var f = splitPath(path)[2];
60830
60817
  // TODO: make this comparison case-insensitive on windows?
60831
60818
  if (ext && f.substr(-1 * ext.length) === ext) {
@@ -60840,8 +60827,8 @@ function extname(path) {
60840
60827
  }
60841
60828
  var path = {
60842
60829
  extname: extname,
60843
- basename: basename$1,
60844
- dirname: dirname$1,
60830
+ basename: basename,
60831
+ dirname: dirname,
60845
60832
  sep: sep,
60846
60833
  delimiter: delimiter,
60847
60834
  relative: relative,
@@ -60868,21 +60855,6 @@ var substr = 'ab'.substr(-1) === 'b' ?
60868
60855
  }
60869
60856
  ;
60870
60857
 
60871
- var _polyfillNode_path = /*#__PURE__*/Object.freeze({
60872
- __proto__: null,
60873
- basename: basename$1,
60874
- default: path,
60875
- delimiter: delimiter,
60876
- dirname: dirname$1,
60877
- extname: extname,
60878
- isAbsolute: isAbsolute,
60879
- join: join$1,
60880
- normalize: normalize,
60881
- relative: relative,
60882
- resolve: resolve,
60883
- sep: sep
60884
- });
60885
-
60886
60858
  const isFn$5 = (a) => typeof a === 'function';
60887
60859
 
60888
60860
  const tryToCatch = async (fn, ...args) => {
@@ -60900,12 +60872,12 @@ function check$a(fn) {
60900
60872
  throw Error('fn should be a function!');
60901
60873
  }
60902
60874
 
60903
- const returns$1 = (a) => () => a;
60875
+ const returns$2 = (a) => () => a;
60904
60876
  const noop$2 = () => {};
60905
60877
 
60906
60878
  const createRequire = (url, overrides = {}) => {
60907
60879
  const {module = _module} = overrides;
60908
- const {createRequire = returns$1(noop$2)} = module;
60880
+ const {createRequire = returns$2(noop$2)} = module;
60909
60881
 
60910
60882
  return createRequire(url);
60911
60883
  };
@@ -61014,7 +60986,7 @@ function buildPluginsDirs(name) {
61014
60986
 
61015
60987
  const isStr$2 = (a) => typeof a === 'string';
61016
60988
  const {isArray: isArray$a} = Array;
61017
- const {entries: entries$9} = Object;
60989
+ const {entries: entries$a} = Object;
61018
60990
 
61019
60991
  const parsePluginNames = (plugins) => {
61020
60992
  const result = [];
@@ -61031,7 +61003,7 @@ const parsePluginNames = (plugins) => {
61031
61003
  continue;
61032
61004
  }
61033
61005
 
61034
- result.push(...entries$9(plugin));
61006
+ result.push(...entries$a(plugin));
61035
61007
  }
61036
61008
 
61037
61009
  return result;
@@ -61041,7 +61013,7 @@ const {isArray: isArray$9} = Array;
61041
61013
  const isBool$1 = (a) => typeof a === 'boolean';
61042
61014
  const isStr$1 = (a) => typeof a === 'string';
61043
61015
  const isObj = (a) => typeof a === 'object';
61044
- const {entries: entries$8} = Object;
61016
+ const {entries: entries$9} = Object;
61045
61017
  const {stringify: stringify$6} = JSON;
61046
61018
 
61047
61019
  const notSupportedError = (a) => Error(`☝️ Rule format not supported ${a}: ${typeof a}`);
@@ -61068,7 +61040,7 @@ const parseRules = (rules) => {
61068
61040
 
61069
61041
  check$9(rules);
61070
61042
 
61071
- for (const [rule, value] of entries$8(rules)) {
61043
+ for (const [rule, value] of entries$9(rules)) {
61072
61044
  if (isStr$1(value)) {
61073
61045
  result.push({
61074
61046
  rule,
@@ -61153,21 +61125,6 @@ function validateState(rule, value) {
61153
61125
  });
61154
61126
  }
61155
61127
 
61156
- const cut$1 = (a) => a.split('/')[0];
61157
-
61158
- const enableNestedRules = (rules) => {
61159
- const newRules = {};
61160
-
61161
- for (const [rule, value] of entries$8(rules)) {
61162
- if (rule.includes('/') && parseState(rule, value))
61163
- newRules[cut$1(rule)] = 'on';
61164
-
61165
- newRules[rule] = value;
61166
- }
61167
-
61168
- return newRules;
61169
- };
61170
-
61171
61128
  function check$9(rules) {
61172
61129
  if (isArray$9(rules))
61173
61130
  throw Error(`☝️Looks like type of 'rules' passed to @putout/engine-loader is 'array', expected: 'object'.`);
@@ -61298,6 +61255,25 @@ const validateRulesRelations = (options) => {
61298
61255
  });
61299
61256
  };
61300
61257
 
61258
+ const {entries: entries$8, fromEntries} = Object;
61259
+ const cut = (a) => a.split('/')[0];
61260
+
61261
+ const enableNestedRules = (rules) => {
61262
+ const newRules = new Map();
61263
+
61264
+ for (const [rule, value] of entries$8(rules)) {
61265
+ if (newRules.has(rule))
61266
+ continue;
61267
+
61268
+ if (rule.includes('/') && parseState(rule, value))
61269
+ newRules.set(cut(rule), 'on');
61270
+
61271
+ newRules.set(rule, value);
61272
+ }
61273
+
61274
+ return fromEntries(newRules);
61275
+ };
61276
+
61301
61277
  const prepareRules = ({rules, pluginNames}) => {
61302
61278
  const enabledRules = enableNestedRules(rules);
61303
61279
  const cookedEnabledRules = parseRules(enabledRules);
@@ -61457,7 +61433,7 @@ function extendRules$1(rule, plugin) {
61457
61433
 
61458
61434
  function parseRuleName(rule) {
61459
61435
  if (rule.startsWith('import:')) {
61460
- const shortName = basename$1(rule.replace('import:', ''));
61436
+ const shortName = basename(rule.replace('import:', ''));
61461
61437
 
61462
61438
  return shortName.replace('plugin-', '');
61463
61439
  }
@@ -62509,7 +62485,7 @@ function setValues({waysTo, values, path}) {
62509
62485
  for (const [name, ways] of entries$6(waysTo)) {
62510
62486
  for (let way of ways) {
62511
62487
  if (!way) {
62512
- replaceWith$2(path, values[name]);
62488
+ replaceWith(path, values[name]);
62513
62489
  continue;
62514
62490
  }
62515
62491
 
@@ -63882,7 +63858,7 @@ const parseExpression = (nodeFrom, {node}) => {
63882
63858
  return node;
63883
63859
  };
63884
63860
 
63885
- const fix$4 = (from, to, path) => {
63861
+ const fix$7 = (from, to, path) => {
63886
63862
  const nodeFrom = template$1.ast(from);
63887
63863
  const mark = watermark(from, to, path);
63888
63864
 
@@ -63909,7 +63885,7 @@ const fix$4 = (from, to, path) => {
63909
63885
  checkExpressionStatement(nodeFrom, nodeTo, path);
63910
63886
 
63911
63887
  const waysTo = findVarsWays(nodeTo);
63912
- const newPath = replaceWith$2(path, nodeTo);
63888
+ const newPath = replaceWith(path, nodeTo);
63913
63889
 
63914
63890
  if (!nodeTo.__putout_replace_cooked) {
63915
63891
  validateTemplateValues(waysTo, waysFrom);
@@ -63937,7 +63913,7 @@ const getFix = (items, match) => (path) => {
63937
63913
  const matchFn = match[from];
63938
63914
 
63939
63915
  if (!matchFn || runMatch(path, nodeFrom, matchFn))
63940
- fix$4(from, to, path);
63916
+ fix$7(from, to, path);
63941
63917
  }
63942
63918
  }
63943
63919
  };
@@ -64080,13 +64056,13 @@ const TS_EXCLUDE = [
64080
64056
  ];
64081
64057
 
64082
64058
  const declare$1 = (declarations) => ({
64083
- report: report$3,
64059
+ report: report$6,
64084
64060
  include,
64085
- fix: fix$3(declarations),
64061
+ fix: fix$6(declarations),
64086
64062
  filter: filter(declarations),
64087
64063
  });
64088
64064
 
64089
- const report$3 = (path) => {
64065
+ const report$6 = (path) => {
64090
64066
  const {name} = path.node;
64091
64067
  const peaceOfName = cutName(name);
64092
64068
 
@@ -64126,7 +64102,7 @@ const filter = (declarations) => (path, {options}) => {
64126
64102
  return parseCode(type, allDeclarations[name]);
64127
64103
  };
64128
64104
 
64129
- const fix$3 = (declarations) => (path, {options}) => {
64105
+ const fix$6 = (declarations) => (path, {options}) => {
64130
64106
  const type = getModuleType(path);
64131
64107
 
64132
64108
  const allDeclarations = {
@@ -64245,111 +64221,17 @@ function validateDeclare(declare) {
64245
64221
  throw Error(`☝️ Looks like 'declare' property value is not a 'function', but '${typeof declare}' with value '${stringify(declare)}'.`);
64246
64222
  }
64247
64223
 
64248
- function fullstore(value) {
64249
- const data = {
64250
- value,
64251
- };
64252
-
64253
- return (...args) => {
64254
- const [value] = args;
64255
-
64256
- if (!args.length)
64257
- return data.value;
64258
-
64259
- data.value = value;
64260
-
64261
- return value;
64262
- };
64263
- }
64264
-
64265
- const cut = (a) => a.slice(0, a.indexOf('('));
64266
- const createPrefix = (name) => {
64267
- if (name.includes('('))
64268
- return `${cut(name)}(`;
64269
-
64270
- return `${name}(`;
64271
- };
64272
-
64273
- const createSuffix = () => ');\n';
64274
- const maybeNewline = (a) => a.at(-1) === '\n' ? a : `${a}\n`;
64275
-
64276
- const __json_name = '__putout_processor_json';
64277
- const __yaml_name = '__putout_processor_yaml';
64278
- const __toml_name = '__putout_processor_toml';
64279
- const __filesystem_name$2 = '__putout_processor_filesystem';
64280
- const __ignore_name = '__putout_processor_ignore';
64281
-
64282
- const __json = `${__json_name}(__object)`;
64283
- const __yaml = `${__yaml_name}(__object)`;
64284
- const __toml = `${__toml_name}(__object)`;
64285
- const __filesystem = `${__filesystem_name$2}(__object)`;
64286
- const __ignore = `${__ignore_name}(__array)`;
64287
-
64288
- const TYPES = [
64289
- __json_name,
64290
- __yaml_name,
64291
- __filesystem_name$2,
64292
- __ignore_name,
64293
- ];
64294
-
64295
- const toJS = (source, name = __json) => {
64296
- const prefix = createPrefix(name);
64297
- const suffix = createSuffix();
64298
-
64299
- return `${prefix}${source}${suffix}`;
64300
- };
64301
-
64302
- const fromJS = (source, name = __json) => {
64303
- source = maybeNewline(source);
64304
- const shortName = cut(name);
64305
-
64306
- source = source.slice(source.indexOf(shortName));
64307
-
64308
- const prefix = createPrefix(name);
64309
- const suffix = createSuffix();
64310
- const length = source.length - suffix.length;
64311
- const sliced = source.slice(prefix.length, length);
64312
-
64313
- return maybeNewline(removeBlankLines$1(sliced));
64314
- };
64315
-
64316
- const isJSON = (source) => {
64317
- for (const type of TYPES) {
64318
- if (!source.indexOf(type))
64319
- return true;
64320
- }
64321
-
64322
- return false;
64323
- };
64324
-
64325
- var json = /*#__PURE__*/Object.freeze({
64326
- __proto__: null,
64327
- __filesystem: __filesystem,
64328
- __filesystem_name: __filesystem_name$2,
64329
- __ignore: __ignore,
64330
- __ignore_name: __ignore_name,
64331
- __json: __json,
64332
- __json_name: __json_name,
64333
- __toml: __toml,
64334
- __toml_name: __toml_name,
64335
- __yaml: __yaml,
64336
- __yaml_name: __yaml_name,
64337
- fromJS: fromJS,
64338
- isJSON: isJSON,
64339
- toJS: toJS
64340
- });
64341
-
64342
64224
  const driverStore = fullstore();
64343
64225
 
64344
64226
  const {assign} = Object;
64345
64227
  const noop = () => {};
64346
- const returns = (a) => () => a;
64228
+ const returns$1 = (a) => () => a;
64347
64229
 
64348
64230
  const defaultFS = {
64349
64231
  renameFile: noop,
64350
64232
  removeFile: noop,
64351
64233
  createDirectory: noop,
64352
- readFileContent: returns(''),
64234
+ readFileContent: returns$1(''),
64353
64235
  writeFileContent: noop,
64354
64236
  copyFile: noop,
64355
64237
  };
@@ -64368,7 +64250,7 @@ const copyFile$1 = (from, to) => {
64368
64250
  maybeFS.copyFile(from, to);
64369
64251
  };
64370
64252
 
64371
- const createDirectory$2 = (name) => {
64253
+ const createDirectory$1 = (name) => {
64372
64254
  maybeFS.createDirectory(name);
64373
64255
  };
64374
64256
 
@@ -64398,17 +64280,17 @@ function deinit$1() {
64398
64280
  }
64399
64281
 
64400
64282
  var maybeFS$1 = /*#__PURE__*/Object.freeze({
64401
- __proto__: null,
64402
- copyFile: copyFile$1,
64403
- createDirectory: createDirectory$2,
64404
- deinit: deinit$1,
64405
- init: init$1,
64406
- pause: pause$1,
64407
- readFileContent: readFileContent$1,
64408
- removeFile: removeFile$1,
64409
- renameFile: renameFile$1,
64410
- start: start$1,
64411
- writeFileContent: writeFileContent$1
64283
+ __proto__: null,
64284
+ copyFile: copyFile$1,
64285
+ createDirectory: createDirectory$1,
64286
+ deinit: deinit$1,
64287
+ init: init$1,
64288
+ pause: pause$1,
64289
+ readFileContent: readFileContent$1,
64290
+ removeFile: removeFile$1,
64291
+ renameFile: renameFile$1,
64292
+ start: start$1,
64293
+ writeFileContent: writeFileContent$1
64412
64294
  });
64413
64295
 
64414
64296
  const {
@@ -64502,7 +64384,7 @@ function isExcluded({name, base, exclude}) {
64502
64384
  return false;
64503
64385
  }
64504
64386
 
64505
- function findFile$2(node, name, exclude = []) {
64387
+ function findFile(node, name, exclude = []) {
64506
64388
  checkName(name);
64507
64389
 
64508
64390
  const filePaths = [];
@@ -64510,7 +64392,7 @@ function findFile$2(node, name, exclude = []) {
64510
64392
 
64511
64393
  for (const filenamePath of traverseProperties(node, 'filename')) {
64512
64394
  const {value} = filenamePath.node.value;
64513
- const base = basename$1(value);
64395
+ const base = basename(value);
64514
64396
 
64515
64397
  for (const name of names) {
64516
64398
  if (value === name || getRegExp(name).test(base)) {
@@ -64538,22 +64420,22 @@ function checkName(name) {
64538
64420
  }
64539
64421
 
64540
64422
  function getFilenamePath(filePath) {
64541
- const filenamePath = getProperty$2(filePath, 'filename');
64423
+ const filenamePath = getProperty(filePath, 'filename');
64542
64424
  return filenamePath.get('value');
64543
64425
  }
64544
64426
 
64545
- function getFilename$2(filePath) {
64427
+ function getFilename(filePath) {
64546
64428
  const {value} = getFilenamePath(filePath).node;
64547
64429
  return value;
64548
64430
  }
64549
64431
 
64550
- function getFileType$2(filePath) {
64551
- const typePath = getProperty$2(filePath, 'type');
64432
+ function getFileType(filePath) {
64433
+ const typePath = getProperty(filePath, 'type');
64552
64434
  return typePath.node.value.value;
64553
64435
  }
64554
64436
 
64555
64437
  function getFileContent(filePath) {
64556
- const content = getProperty$2(filePath, 'content');
64438
+ const content = getProperty(filePath, 'content');
64557
64439
 
64558
64440
  return [
64559
64441
  Boolean(content),
@@ -64562,7 +64444,7 @@ function getFileContent(filePath) {
64562
64444
  }
64563
64445
 
64564
64446
  const renameFile = (filePath, name) => {
64565
- const oldName = getFilename$2(filePath);
64447
+ const oldName = getFilename(filePath);
64566
64448
  const valuePath = getFilenamePath(filePath);
64567
64449
  const baseName = oldName
64568
64450
  .split('/')
@@ -64579,7 +64461,7 @@ const renameFile = (filePath, name) => {
64579
64461
  };
64580
64462
 
64581
64463
  function removeFile(filePath) {
64582
- const filename = getFilename$2(filePath);
64464
+ const filename = getFilename(filePath);
64583
64465
 
64584
64466
  if (!getParentDirectory(filePath))
64585
64467
  return;
@@ -64589,7 +64471,7 @@ function removeFile(filePath) {
64589
64471
  }
64590
64472
 
64591
64473
  const removeEmptyDirectory = (dirPath) => {
64592
- const type = getFileType$2(dirPath);
64474
+ const type = getFileType(dirPath);
64593
64475
 
64594
64476
  if (type !== 'directory')
64595
64477
  return;
@@ -64597,7 +64479,7 @@ const removeEmptyDirectory = (dirPath) => {
64597
64479
  let nextParentDir = dirPath;
64598
64480
 
64599
64481
  while (!readDirectory(dirPath).length) {
64600
- const name = getFilename$2(dirPath);
64482
+ const name = getFilename(dirPath);
64601
64483
 
64602
64484
  if (name === '/')
64603
64485
  break;
@@ -64616,10 +64498,10 @@ const moveFile = (filePath, dirPath) => {
64616
64498
  if (filePath === dirPath)
64617
64499
  return;
64618
64500
 
64619
- const dirname = getFilename$2(dirPath);
64620
- const filename = getFilename$2(filePath);
64501
+ const dirname = getFilename(dirPath);
64502
+ const filename = getFilename(filePath);
64621
64503
  const dirPathFiles = getFiles$1(dirPath);
64622
- const filenamePath = getProperty$2(filePath, 'filename');
64504
+ const filenamePath = getProperty(filePath, 'filename');
64623
64505
 
64624
64506
  const basename = filename
64625
64507
  .split('/')
@@ -64637,8 +64519,8 @@ const moveFile = (filePath, dirPath) => {
64637
64519
  };
64638
64520
 
64639
64521
  const copyFile = (filePath, dirPath) => {
64640
- const dirname = getFilename$2(dirPath);
64641
- const filename = getFilename$2(filePath);
64522
+ const dirname = getFilename(dirPath);
64523
+ const filename = getFilename(filePath);
64642
64524
 
64643
64525
  const basename = filename
64644
64526
  .split('/')
@@ -64662,16 +64544,16 @@ const copyFile = (filePath, dirPath) => {
64662
64544
  };
64663
64545
 
64664
64546
  function maybeRemoveFile(dirPath, filename) {
64665
- const type = getFileType$2(dirPath);
64547
+ const type = getFileType(dirPath);
64666
64548
 
64667
64549
  if (type !== 'directory') {
64668
- const filename = getFilename$2(dirPath);
64550
+ const filename = getFilename(dirPath);
64669
64551
  throw Error(`☝️ Looks like '${filename}' is not a directory, but: '${type}'. Rename to '${filename}/'`);
64670
64552
  }
64671
64553
 
64672
- const dirPathFiles = getProperty$2(dirPath, 'files');
64673
- const name = join$1(getFilename$2(dirPath), basename$1(filename));
64674
- const [fileToOverwrite] = findFile$2(dirPathFiles, name);
64554
+ const dirPathFiles = getProperty(dirPath, 'files');
64555
+ const name = join$1(getFilename(dirPath), basename(filename));
64556
+ const [fileToOverwrite] = findFile(dirPathFiles, name);
64675
64557
 
64676
64558
  if (!fileToOverwrite)
64677
64559
  return;
@@ -64683,7 +64565,7 @@ const createFile = (dirPath, name, content) => {
64683
64565
  maybeRemoveFile(dirPath, name);
64684
64566
 
64685
64567
  const dirPathFiles = getFiles$1(dirPath);
64686
- const parentFilename = getFilename$2(dirPath);
64568
+ const parentFilename = getFilename(dirPath);
64687
64569
  const filename = join$1(parentFilename, name);
64688
64570
 
64689
64571
  const typeProperty = createTypeProperty('file');
@@ -64705,10 +64587,10 @@ const createFile = (dirPath, name, content) => {
64705
64587
  return filePath;
64706
64588
  };
64707
64589
 
64708
- const getFiles$1 = (dirPath) => getProperty$2(dirPath, 'files');
64590
+ const getFiles$1 = (dirPath) => getProperty(dirPath, 'files');
64709
64591
 
64710
64592
  function readDirectory(dirPath) {
64711
- const fileType = getFileType$2(dirPath);
64593
+ const fileType = getFileType(dirPath);
64712
64594
 
64713
64595
  if (fileType !== 'directory')
64714
64596
  return [];
@@ -64716,9 +64598,9 @@ function readDirectory(dirPath) {
64716
64598
  return getFiles$1(dirPath).get('value.elements');
64717
64599
  }
64718
64600
 
64719
- function createDirectory$1(dirPath, name) {
64601
+ function createDirectory(dirPath, name) {
64720
64602
  const dirPathFiles = getFiles$1(dirPath);
64721
- const parentFilename = getFilename$2(dirPath);
64603
+ const parentFilename = getFilename(dirPath);
64722
64604
  const filename = join$1(parentFilename, name);
64723
64605
 
64724
64606
  const typeProperty = createTypeProperty('directory');
@@ -64731,13 +64613,13 @@ function createDirectory$1(dirPath, name) {
64731
64613
  filesProperty,
64732
64614
  ]));
64733
64615
 
64734
- createDirectory$2(filename);
64616
+ createDirectory$1(filename);
64735
64617
 
64736
64618
  return dirPathFiles.get('value.elements').at(-1);
64737
64619
  }
64738
64620
 
64739
64621
  const readFileContent = (filePath) => {
64740
- const fileType = getFileType$2(filePath);
64622
+ const fileType = getFileType(filePath);
64741
64623
 
64742
64624
  if (fileType === 'directory')
64743
64625
  return '';
@@ -64747,7 +64629,7 @@ const readFileContent = (filePath) => {
64747
64629
  if (hasContent)
64748
64630
  return fromBase64(content);
64749
64631
 
64750
- const filename = getFilename$2(filePath);
64632
+ const filename = getFilename(filePath);
64751
64633
  const fileContent = readFileContent$1(filename);
64752
64634
 
64753
64635
  const property = createContentProperty(toBase64(fileContent));
@@ -64758,16 +64640,16 @@ const readFileContent = (filePath) => {
64758
64640
  };
64759
64641
 
64760
64642
  function writeFileContent(filePath, content) {
64761
- const fileType = getFileType$2(filePath);
64643
+ const fileType = getFileType(filePath);
64762
64644
 
64763
64645
  if (fileType === 'directory')
64764
64646
  return;
64765
64647
 
64766
- const filename = getFilename$2(filePath);
64648
+ const filename = getFilename(filePath);
64767
64649
 
64768
64650
  writeFileContent$1(filename, content);
64769
64651
 
64770
- const contentPath = getProperty$2(filePath, 'content');
64652
+ const contentPath = getProperty(filePath, 'content');
64771
64653
 
64772
64654
  if (contentPath) {
64773
64655
  setLiteralValue(contentPath.node.value, toBase64(content));
@@ -64780,21 +64662,21 @@ function writeFileContent(filePath, content) {
64780
64662
 
64781
64663
  const createNestedDirectory = (path, name) => {
64782
64664
  const rootPath = getRootDirectory(path);
64783
- const dir = dirname$1(name);
64665
+ const dir = dirname(name);
64784
64666
 
64785
- if (dir === getFilename$2(path))
64786
- return createDirectory$1(path, basename$1(name));
64667
+ if (dir === getFilename(path))
64668
+ return createDirectory(path, basename(name));
64787
64669
 
64788
64670
  let currentDir = name;
64789
64671
 
64790
- const rootDir = getFilename$2(rootPath);
64672
+ const rootDir = getFilename(rootPath);
64791
64673
  const directories = [];
64792
64674
  let prevDir = currentDir;
64793
64675
 
64794
64676
  while (currentDir !== rootDir) {
64795
64677
  directories.unshift(currentDir);
64796
64678
  prevDir = currentDir;
64797
- currentDir = dirname$1(currentDir);
64679
+ currentDir = dirname(currentDir);
64798
64680
 
64799
64681
  if (currentDir === prevDir) {
64800
64682
  currentDir = rootDir;
@@ -64808,16 +64690,16 @@ const createNestedDirectory = (path, name) => {
64808
64690
  }
64809
64691
  }
64810
64692
 
64811
- let lastDirectoryPath = findFile$2(rootPath, directories).at(-1) || rootPath;
64812
- const lastDirectoryName = getFilename$2(lastDirectoryPath);
64693
+ let lastDirectoryPath = findFile(rootPath, directories).at(-1) || rootPath;
64694
+ const lastDirectoryName = getFilename(lastDirectoryPath);
64813
64695
 
64814
64696
  const n = directories.length;
64815
64697
 
64816
64698
  let i = directories.indexOf(lastDirectoryName) + 1;
64817
64699
 
64818
64700
  for (; i < n; i++) {
64819
- const name = basename$1(directories[i]);
64820
- lastDirectoryPath = createDirectory$1(lastDirectoryPath, name);
64701
+ const name = basename(directories[i]);
64702
+ lastDirectoryPath = createDirectory(lastDirectoryPath, name);
64821
64703
  }
64822
64704
 
64823
64705
  return lastDirectoryPath;
@@ -64845,55 +64727,6 @@ const {
64845
64727
  start,
64846
64728
  } = maybeFS$1;
64847
64729
 
64848
- var filesystem = /*#__PURE__*/Object.freeze({
64849
- __proto__: null,
64850
- copyFile: copyFile,
64851
- createDirectory: createDirectory$1,
64852
- createFile: createFile,
64853
- createNestedDirectory: createNestedDirectory,
64854
- deinit: deinit,
64855
- findFile: findFile$2,
64856
- getFileContent: getFileContent,
64857
- getFileType: getFileType$2,
64858
- getFilename: getFilename$2,
64859
- getParentDirectory: getParentDirectory,
64860
- getRootDirectory: getRootDirectory,
64861
- init: init,
64862
- moveFile: moveFile,
64863
- pause: pause,
64864
- readDirectory: readDirectory,
64865
- readFileContent: readFileContent,
64866
- removeEmptyDirectory: removeEmptyDirectory,
64867
- removeFile: removeFile,
64868
- renameFile: renameFile,
64869
- start: start,
64870
- writeFileContent: writeFileContent
64871
- });
64872
-
64873
- var convertSimpleFilesystemToFilesystem = {};
64874
-
64875
- var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_path);
64876
-
64877
- var require$$0 = /*@__PURE__*/getAugmentedNamespace(bundle);
64878
-
64879
- var require$$3 = /*@__PURE__*/getAugmentedNamespace(filesystem);
64880
-
64881
- var require$$2 = /*@__PURE__*/getAugmentedNamespace(json);
64882
-
64883
- var require$$1 = /*@__PURE__*/getAugmentedNamespace(operate);
64884
-
64885
- const {basename, dirname} = require$$0$1;
64886
- const {types: types$1} = require$$0;
64887
- const {
64888
- createDirectory,
64889
- getFileType: getFileType$1,
64890
- getFilename: getFilename$1,
64891
- findFile: findFile$1,
64892
- } = require$$3;
64893
-
64894
- const {__filesystem_name: __filesystem_name$1} = require$$2;
64895
- const {replaceWith: replaceWith$1, getProperty: getProperty$1} = require$$1;
64896
-
64897
64730
  const {
64898
64731
  objectExpression,
64899
64732
  arrayExpression: arrayExpression$1,
@@ -64902,9 +64735,9 @@ const {
64902
64735
  isStringLiteral,
64903
64736
  isTemplateLiteral,
64904
64737
  objectProperty: objectProperty$1,
64905
- } = types$1;
64738
+ } = lib_exports;
64906
64739
 
64907
- convertSimpleFilesystemToFilesystem.report = () => `Convert Simple Filesystem to Filesystem`;
64740
+ const report$5 = () => `Convert Simple Filesystem to Filesystem`;
64908
64741
 
64909
64742
  const isDirectory = (a) => a.endsWith('/');
64910
64743
  const getType = (a) => {
@@ -64938,14 +64771,19 @@ function parseContent(node, path) {
64938
64771
  throw Error(`☝️ Looks like wrong content type: '${node.type}' from file: '${path}'`);
64939
64772
  }
64940
64773
 
64941
- convertSimpleFilesystemToFilesystem.fix = (path) => {
64774
+ const fix$5 = (path) => {
64942
64775
  const array = arrayExpression$1([]);
64943
64776
 
64944
64777
  for (const element of path.get('elements')) {
64945
- if (isArrayExpression(element)) {
64778
+ if (isOneElementTuple(element)) {
64779
+ const [node] = element.node.elements;
64780
+ array.elements.push(createFileFromStringLiteral(node));
64781
+ continue;
64782
+ }
64783
+
64784
+ if (isTwoElementsTuple(element)) {
64946
64785
  const [nodeValue, nodeContent] = element.node.elements;
64947
64786
  const {value} = nodeValue;
64948
-
64949
64787
  const content = parseContent(nodeContent, element);
64950
64788
 
64951
64789
  array.elements.push(objectExpression([
@@ -64957,13 +64795,8 @@ convertSimpleFilesystemToFilesystem.fix = (path) => {
64957
64795
  }
64958
64796
 
64959
64797
  if (isStringLiteral(element)) {
64960
- const {value} = element.node;
64961
-
64962
- array.elements.push(objectExpression([
64963
- getType(value),
64964
- createFilename(noTrailingSlash(value)),
64965
- getFiles(value),
64966
- ].filter(Boolean)));
64798
+ const file = createFileFromStringLiteral(element);
64799
+ array.elements.push(file);
64967
64800
  continue;
64968
64801
  }
64969
64802
 
@@ -64973,8 +64806,20 @@ convertSimpleFilesystemToFilesystem.fix = (path) => {
64973
64806
  buildTree(path, array);
64974
64807
  };
64975
64808
 
64976
- convertSimpleFilesystemToFilesystem.traverse = ({push}) => ({
64977
- [`${__filesystem_name$1}(__array)`]: (path) => {
64809
+ const maybeNode = (a) => a.node || a;
64810
+
64811
+ function createFileFromStringLiteral(element) {
64812
+ const {value} = maybeNode(element);
64813
+
64814
+ return objectExpression([
64815
+ getType(value),
64816
+ createFilename(noTrailingSlash(value)),
64817
+ getFiles(value),
64818
+ ].filter(Boolean));
64819
+ }
64820
+
64821
+ const traverse$3 = ({push}) => ({
64822
+ [`${__filesystem_name}(__array)`]: (path) => {
64978
64823
  const root = path.get('arguments.0');
64979
64824
  push(root);
64980
64825
  },
@@ -64988,19 +64833,19 @@ const noTrailingSlash = (a) => {
64988
64833
  };
64989
64834
 
64990
64835
  function buildTree(path, list) {
64991
- const [root, ...files] = findFile$1(list, '*');
64836
+ const [root, ...files] = findFile(list, '*');
64992
64837
 
64993
64838
  for (const filePath of files) {
64994
- const filename = getFilename$1(filePath);
64839
+ const filename = getFilename(filePath);
64995
64840
 
64996
64841
  check$3(filename);
64997
64842
 
64998
- const type = getFileType$1(filePath);
64843
+ const type = getFileType(filePath);
64999
64844
  const dir = dirname(filename);
65000
64845
  const name = basename(filename);
65001
- const [dirPath] = findFile$1(root, dir);
64846
+ const [dirPath] = findFile(root, dir);
65002
64847
 
65003
- if (!dirPath || getFileType$1(dirPath) !== 'directory')
64848
+ if (!dirPath || getFileType(dirPath) !== 'directory')
65004
64849
  throw Error(`☝️ Looks like directory '${dir}/' is missing`);
65005
64850
 
65006
64851
  if (type === 'directory') {
@@ -65008,41 +64853,54 @@ function buildTree(path, list) {
65008
64853
  continue;
65009
64854
  }
65010
64855
 
65011
- const filesProperty = getProperty$1(dirPath, 'files');
64856
+ const filesProperty = getProperty(dirPath, 'files');
65012
64857
  filesProperty.node.value.elements.push(filePath.node);
65013
64858
  }
65014
64859
 
65015
- replaceWith$1(path, root);
64860
+ replaceWith(path, root);
65016
64861
  }
65017
64862
 
64863
+ const isTwoElementsTuple = (a) => {
64864
+ if (!isArrayExpression(a))
64865
+ return false;
64866
+
64867
+ const {elements} = a.node;
64868
+
64869
+ return elements.length === 2;
64870
+ };
64871
+
64872
+ const isOneElementTuple = (a) => {
64873
+ if (!isArrayExpression(a))
64874
+ return false;
64875
+
64876
+ const {elements} = a.node;
64877
+
64878
+ return elements.length === 1;
64879
+ };
64880
+
65018
64881
  function check$3(filename) {
65019
64882
  if (!filename.includes('/'))
65020
64883
  throw Error(`☝️ Looks like directory path is missing: '${filename}'`);
65021
64884
  }
65022
64885
 
65023
- var convertFilesystemToSimpleFilesystem = {};
65024
-
65025
- const {types} = require$$0;
65026
- const {replaceWith, getProperty} = require$$1;
65027
- const {__filesystem_name} = require$$2;
65028
-
65029
- const {
65030
- findFile,
65031
- getFilename,
65032
- getFileType,
65033
- } = require$$3;
64886
+ var fromSimple = /*#__PURE__*/Object.freeze({
64887
+ __proto__: null,
64888
+ fix: fix$5,
64889
+ report: report$5,
64890
+ traverse: traverse$3
64891
+ });
65034
64892
 
65035
64893
  const {
65036
64894
  stringLiteral: stringLiteral$2,
65037
64895
  arrayExpression,
65038
- } = types;
64896
+ } = lib_exports;
65039
64897
 
65040
64898
  const {isArray} = Array;
65041
64899
  const maybeAddSlash = (a) => a === '/' ? a : `${a}/`;
65042
64900
 
65043
- convertFilesystemToSimpleFilesystem.report = () => `Convert Filesystem to Simple Filesystem`;
64901
+ const report$4 = () => `Convert Filesystem to Simple Filesystem`;
65044
64902
 
65045
- convertFilesystemToSimpleFilesystem.fix = (root, {files}) => {
64903
+ const fix$4 = (root, {files}) => {
65046
64904
  const names = [];
65047
64905
 
65048
64906
  for (const file of files) {
@@ -65081,7 +64939,7 @@ convertFilesystemToSimpleFilesystem.fix = (root, {files}) => {
65081
64939
  replaceWith(root, arrayExpression(list));
65082
64940
  };
65083
64941
 
65084
- convertFilesystemToSimpleFilesystem.traverse = ({push}) => ({
64942
+ const traverse$2 = ({push}) => ({
65085
64943
  [`${__filesystem_name}(__object)`]: (path) => {
65086
64944
  const root = path.get('arguments.0');
65087
64945
  const files = findFile(root, '*');
@@ -65092,9 +64950,16 @@ convertFilesystemToSimpleFilesystem.traverse = ({push}) => ({
65092
64950
  },
65093
64951
  });
65094
64952
 
64953
+ var toSimple = /*#__PURE__*/Object.freeze({
64954
+ __proto__: null,
64955
+ fix: fix$4,
64956
+ report: report$4,
64957
+ traverse: traverse$2
64958
+ });
64959
+
65095
64960
  const log = createDebug$1('putout:runner:scanner');
65096
64961
 
65097
- const scan$1 = ({rule, plugin, msg, options}, {progress}) => {
64962
+ const scan = ({rule, plugin, msg, options}, {progress}) => {
65098
64963
  const {
65099
64964
  scan,
65100
64965
  report,
@@ -65139,7 +65004,7 @@ const createFileProgress = ({rule, progress}) => ({i, n}) => {
65139
65004
  };
65140
65005
 
65141
65006
  const createTrackFile = (fileProgress) => function*(...a) {
65142
- const files = findFile$2(...a);
65007
+ const files = findFile(...a);
65143
65008
  const n = files.length;
65144
65009
 
65145
65010
  for (const [i, file] of files.entries()) {
@@ -65152,7 +65017,7 @@ const createTrackFile = (fileProgress) => function*(...a) {
65152
65017
  };
65153
65018
 
65154
65019
  const getTraverse = ({scan, rule, progress}) => ({push, options}) => ({
65155
- [`${__filesystem_name$2}(__)`](path) {
65020
+ [`${__filesystem_name}(__)`](path) {
65156
65021
  log(rule);
65157
65022
  progress.start(rule);
65158
65023
 
@@ -65166,7 +65031,7 @@ const getTraverse = ({scan, rule, progress}) => ({push, options}) => ({
65166
65031
 
65167
65032
  const trackFile = createTrackFile(fileProgress);
65168
65033
 
65169
- runSimple(convertSimpleFilesystemToFilesystem, {
65034
+ runSimple(fromSimple, {
65170
65035
  shouldConvert: true,
65171
65036
  path,
65172
65037
  isSimple,
@@ -65183,7 +65048,7 @@ const getTraverse = ({scan, rule, progress}) => ({push, options}) => ({
65183
65048
  options,
65184
65049
  });
65185
65050
 
65186
- runSimple(convertFilesystemToSimpleFilesystem, {
65051
+ runSimple(toSimple, {
65187
65052
  shouldConvert: isSimple(),
65188
65053
  path,
65189
65054
  isSimple,
@@ -65223,18 +65088,18 @@ function runSimple(plugin, {path, isSimple, shouldConvert = true}) {
65223
65088
  }
65224
65089
 
65225
65090
  function parseVisitor(visitors) {
65226
- const to = visitors[`${__filesystem_name$2}(__object)`];
65227
- const from = visitors[`${__filesystem_name$2}(__array)`];
65091
+ const to = visitors[`${__filesystem_name}(__object)`];
65092
+ const from = visitors[`${__filesystem_name}(__array)`];
65228
65093
 
65229
65094
  if (to)
65230
65095
  return [
65231
65096
  to,
65232
- `${__filesystem_name$2}(__object)`,
65097
+ `${__filesystem_name}(__object)`,
65233
65098
  ];
65234
65099
 
65235
65100
  return [
65236
65101
  from,
65237
- `${__filesystem_name$2}(__array)`,
65102
+ `${__filesystem_name}(__array)`,
65238
65103
  ];
65239
65104
  }
65240
65105
 
@@ -65402,7 +65267,7 @@ function splitPlugins(plugins, {progress}) {
65402
65267
  }
65403
65268
 
65404
65269
  if (plugin.scan) {
65405
- pluginsTraverse.push(scan$1(item, {
65270
+ pluginsTraverse.push(scan(item, {
65406
65271
  progress,
65407
65272
  }));
65408
65273
  continue;
@@ -71756,15 +71621,15 @@ const isCall = (path) => {
71756
71621
  return isCallExpression(path.find(isCallOrStatement));
71757
71622
  };
71758
71623
 
71759
- const report$2 = ({name}) => `Argument '${name}' is missing`;
71624
+ const report$3 = ({name}) => `Argument '${name}' is missing`;
71760
71625
 
71761
71626
  const addArgs = (args) => ({
71762
- report: report$2,
71763
- fix: fix$2,
71627
+ report: report$3,
71628
+ fix: fix$3,
71764
71629
  traverse: traverse(args),
71765
71630
  });
71766
71631
 
71767
- const fix$2 = ({declaration, path, pattern, params, index}) => {
71632
+ const fix$3 = ({declaration, path, pattern, params, index}) => {
71768
71633
  const declarationNode = template$1.ast.fresh(declaration);
71769
71634
 
71770
71635
  if (isBlockStatement(declarationNode)) {
@@ -72002,7 +71867,7 @@ const {join} = path;
72002
71867
 
72003
71868
  const isObject = (a) => a && typeof a === 'object';
72004
71869
  const {entries} = Object;
72005
- const report$1 = (path, {message}) => message;
71870
+ const report$2 = (path, {message}) => message;
72006
71871
 
72007
71872
  const matchFiles = (options) => {
72008
71873
  const {filename} = options;
@@ -72011,20 +71876,20 @@ const matchFiles = (options) => {
72011
71876
 
72012
71877
  check(files);
72013
71878
 
72014
- const scan = createScan({
71879
+ const scan = createScan$2({
72015
71880
  defaultFilename: filename,
72016
71881
  files,
72017
71882
  exclude,
72018
71883
  });
72019
71884
 
72020
71885
  return {
72021
- fix: fix$1,
71886
+ fix: fix$2,
72022
71887
  scan,
72023
- report: report$1,
71888
+ report: report$2,
72024
71889
  };
72025
71890
  };
72026
71891
 
72027
- function fix$1(inputFile, {dirPath, matchInputFilename, outputFilename, matchedJS, matchedAST, options}) {
71892
+ function fix$2(inputFile, {dirPath, matchInputFilename, outputFilename, matchedJS, matchedAST, options}) {
72028
71893
  transform(matchedAST, matchedJS, options);
72029
71894
 
72030
71895
  const matchedJSON = magicPrint(outputFilename, matchedAST);
@@ -72041,19 +71906,19 @@ function fix$1(inputFile, {dirPath, matchInputFilename, outputFilename, matchedJ
72041
71906
  removeFile(inputFile);
72042
71907
  }
72043
71908
 
72044
- const createScan = ({files, exclude, defaultFilename}) => (mainPath, {push, progress, options}) => {
71909
+ const createScan$2 = ({files, exclude, defaultFilename}) => (mainPath, {push, progress, options}) => {
72045
71910
  const allFiles = [];
72046
- const cwd = getFilename$2(mainPath);
71911
+ const cwd = getFilename(mainPath);
72047
71912
 
72048
71913
  options.filename = options.filename ?? defaultFilename;
72049
71914
 
72050
71915
  for (const [filename, rawOptions] of entries(files)) {
72051
71916
  const [matchInputFilenameMask] = parseMatcher(filename, options);
72052
- const inputFiles = findFile$2(mainPath, matchInputFilenameMask, exclude);
71917
+ const inputFiles = findFile(mainPath, matchInputFilenameMask, exclude);
72053
71918
 
72054
71919
  for (const inputFile of inputFiles) {
72055
71920
  const dirPath = getParentDirectory(inputFile);
72056
- const inputFilename = getFilename$2(inputFile);
71921
+ const inputFilename = getFilename(inputFile);
72057
71922
 
72058
71923
  const [matchInputFilename, outputFilename = matchInputFilename] = parseMatcher(filename, {
72059
71924
  filename: inputFilename,
@@ -72155,8 +72020,8 @@ function getOutputFile({dirPath, matchInputFilename, outputFilename, inputFile})
72155
72020
  if (matchInputFilename === outputFilename)
72156
72021
  return inputFile;
72157
72022
 
72158
- const name = join(getFilename$2(dirPath), outputFilename);
72159
- const [outputFile] = findFile$2(dirPath, name);
72023
+ const name = join(getFilename(dirPath), outputFilename);
72024
+ const [outputFile] = findFile(dirPath, name);
72160
72025
 
72161
72026
  if (outputFile)
72162
72027
  return outputFile;
@@ -72195,28 +72060,18 @@ function parseOptions(inputFilename, rawOptions) {
72195
72060
 
72196
72061
  const {parse} = JSON;
72197
72062
 
72198
- const renameFiles = ({type, mask, rename}) => ({
72199
- report,
72200
- fix,
72201
- scan: scan({
72202
- type,
72203
- mask,
72204
- rename,
72205
- }),
72206
- });
72207
-
72208
- const report = (file, {from, to}) => `Rename '${from}' to '${to}'`;
72063
+ const report$1 = (file, {from, to}) => `Rename '${from}' to '${to}'`;
72209
72064
 
72210
- const fix = (file, {to}) => {
72065
+ const fix$1 = (file, {to}) => {
72211
72066
  renameFile(file, to);
72212
72067
  };
72213
72068
 
72214
- const scan = ({type, mask, rename}) => (path, {push, trackFile}) => {
72069
+ const createScan$1 = ({type, mask, rename} = {}) => (path, {push, trackFile}) => {
72215
72070
  for (const file of trackFile(path, mask)) {
72216
72071
  if (type && !checkType(type, file))
72217
72072
  continue;
72218
72073
 
72219
- const from = getFilename$2(file);
72074
+ const from = getFilename(file);
72220
72075
  const to = rename(from);
72221
72076
 
72222
72077
  push(file, {
@@ -72251,13 +72106,118 @@ function findUpPackage(file) {
72251
72106
  let dirPath = getParentDirectory(file);
72252
72107
 
72253
72108
  do {
72254
- const dir = getFilename$2(dirPath);
72255
- [packageJSON] = findFile$2(dirPath, join$1(dir, 'package.json'));
72109
+ const dir = getFilename(dirPath);
72110
+ [packageJSON] = findFile(dirPath, join$1(dir, 'package.json'));
72256
72111
  } while (!packageJSON && (dirPath = getParentDirectory(dirPath)));
72257
72112
 
72258
72113
  return packageJSON;
72259
72114
  }
72260
72115
 
72116
+ var renameFileWithFn = /*#__PURE__*/Object.freeze({
72117
+ __proto__: null,
72118
+ createScan: createScan$1,
72119
+ fix: fix$1,
72120
+ report: report$1
72121
+ });
72122
+
72123
+ const returns = (a) => () => a;
72124
+
72125
+ const report = (path, {mask, from, to}) => {
72126
+ if (!mask)
72127
+ return `Rename '${from}' to '${to}'`;
72128
+
72129
+ return `Rename '${mask}' to '${mask.replace(from, to)}'`;
72130
+ };
72131
+
72132
+ const fix = (path, {from, to}) => {
72133
+ const filename = getFilename(path);
72134
+ const newFilename = filename.replace(from, to);
72135
+
72136
+ renameFile(path, newFilename);
72137
+ };
72138
+
72139
+ const createScan = (baseOptions) => (rootPath, {push, options, trackFile}) => {
72140
+ const from = options.from || baseOptions.from;
72141
+ const to = options.to || baseOptions.to;
72142
+ const mask = options.mask || baseOptions.mask;
72143
+ const near = options.near || baseOptions.near;
72144
+ const checkNear = near ? createCheckNear(near) : returns(true);
72145
+
72146
+ if (!from || !to)
72147
+ return {};
72148
+
72149
+ for (const file of trackFile(rootPath, mask || from).filter(checkNear)) {
72150
+ push(file, {
72151
+ from,
72152
+ to,
72153
+ mask,
72154
+ });
72155
+ }
72156
+ };
72157
+
72158
+ const createCheckNear = (near) => (file) => {
72159
+ const parentDirectory = getParentDirectory(file);
72160
+
72161
+ for (const currentFile of readDirectory(parentDirectory)) {
72162
+ const type = getFileType(currentFile);
72163
+
72164
+ if (type !== 'file')
72165
+ continue;
72166
+
72167
+ const name = getFilename(currentFile);
72168
+ const base = basename(name);
72169
+
72170
+ if (base === near)
72171
+ return true;
72172
+ }
72173
+
72174
+ return false;
72175
+ };
72176
+
72177
+ var renameFileByMask = /*#__PURE__*/Object.freeze({
72178
+ __proto__: null,
72179
+ createScan: createScan,
72180
+ fix: fix,
72181
+ report: report
72182
+ });
72183
+
72184
+ const renameFiles = ({type, mask, rename, from, to, near} = {}) => {
72185
+ if (rename) {
72186
+ const {
72187
+ report,
72188
+ fix,
72189
+ createScan,
72190
+ } = renameFileWithFn;
72191
+
72192
+ return {
72193
+ report,
72194
+ fix,
72195
+ scan: createScan({
72196
+ type,
72197
+ mask,
72198
+ rename,
72199
+ }),
72200
+ };
72201
+ }
72202
+
72203
+ const {
72204
+ report,
72205
+ fix,
72206
+ createScan,
72207
+ } = renameFileByMask;
72208
+
72209
+ return {
72210
+ fix,
72211
+ report,
72212
+ scan: createScan({
72213
+ mask,
72214
+ from,
72215
+ to,
72216
+ near,
72217
+ }),
72218
+ };
72219
+ };
72220
+
72261
72221
  const {stringLiteral} = lib_exports;
72262
72222
  const getValue = ({value}) => value;
72263
72223
 
@@ -72423,106 +72383,106 @@ function hasParens(path, printer = getPrinter(path)) {
72423
72383
  }
72424
72384
 
72425
72385
  var operator = /*#__PURE__*/Object.freeze({
72426
- __proto__: null,
72427
- __filesystem: __filesystem,
72428
- __filesystem_name: __filesystem_name$2,
72429
- __ignore: __ignore,
72430
- __ignore_name: __ignore_name,
72431
- __json: __json,
72432
- __json_name: __json_name,
72433
- __toml: __toml,
72434
- __toml_name: __toml_name,
72435
- __yaml: __yaml,
72436
- __yaml_name: __yaml_name,
72437
- addArgs: addArgs,
72438
- addAttribute: addAttribute,
72439
- addAttributeValue: addAttributeValue,
72440
- addClassName: addClassName,
72441
- addParens: addParens,
72442
- compare: compare,
72443
- compareAll: compareAll,
72444
- compareAny: compareAny,
72445
- compute: compute,
72446
- contains: contains,
72447
- containsClassName: containsClassName,
72448
- copyFile: copyFile,
72449
- createDirectory: createDirectory$1,
72450
- createFile: createFile,
72451
- createNestedDirectory: createNestedDirectory,
72452
- declare: declare$1,
72453
- deinit: deinit,
72454
- extract: extract,
72455
- findBinding: findBinding,
72456
- findFile: findFile$2,
72457
- findVarsWays: findVarsWays,
72458
- fromJS: fromJS,
72459
- getAttributeNode: getAttributeNode,
72460
- getAttributePath: getAttributePath,
72461
- getAttributeValue: getAttributeValue,
72462
- getBinding: getBinding,
72463
- getBindingPath: getBindingPath,
72464
- getClassName: getClassName,
72465
- getExportDefault: getExportDefault,
72466
- getFileContent: getFileContent,
72467
- getFileType: getFileType$2,
72468
- getFilename: getFilename$2,
72469
- getLiteralRaw: getLiteralRaw,
72470
- getParentDirectory: getParentDirectory,
72471
- getPathAfterImports: getPathAfterImports,
72472
- getPathAfterRequires: getPathAfterRequires,
72473
- getProperties: getProperties,
72474
- getProperty: getProperty$2,
72475
- getRootDirectory: getRootDirectory,
72476
- getTemplateValues: getTemplateValues,
72477
- getValues: getValues,
72478
- hasAttributeValue: hasAttributeValue,
72479
- hasDataName: hasDataName,
72480
- hasParens: hasParens,
72481
- hasTagName: hasTagName,
72482
- ignore: ignore,
72483
- init: init,
72484
- insertAfter: insertAfter,
72485
- insertBefore: insertBefore,
72486
- isConditionKeyword: isConditionKeyword,
72487
- isDeclarationKeyword: isDeclarationKeyword,
72488
- isESM: isESM,
72489
- isJSON: isJSON,
72490
- isKeyword: isKeyword,
72491
- isModuleDeclarationKeyword: isModuleDeclarationKeyword,
72492
- isModuleExports: isModuleExports,
72493
- isSimple: isSimple,
72494
- isSimpleRegExp: isSimpleRegExp,
72495
- isStatementKeyword: isStatementKeyword,
72496
- isTSKeyword: isTSKeyword,
72497
- isTemplate: isTemplate,
72498
- matchFiles: matchFiles,
72499
- moveFile: moveFile,
72500
- parseTemplate: parseTemplate,
72501
- pause: pause,
72502
- readDirectory: readDirectory,
72503
- readFileContent: readFileContent,
72504
- remove: remove,
72505
- removeAttributeValue: removeAttributeValue,
72506
- removeClassName: removeClassName,
72507
- removeEmptyDirectory: removeEmptyDirectory,
72508
- removeFile: removeFile,
72509
- removeParens: removeParens,
72510
- rename: rename,
72511
- renameFile: renameFile,
72512
- renameFiles: renameFiles,
72513
- renameProperty: renameProperty,
72514
- replaceWith: replaceWith$2,
72515
- replaceWithMultiple: replaceWithMultiple,
72516
- setAttributeValue: setAttributeValue,
72517
- setLiteralValue: setLiteralValue,
72518
- setValues: setValues,
72519
- start: start,
72520
- toExpression: toExpression,
72521
- toJS: toJS,
72522
- transformRegExp: transformRegExp,
72523
- traverse: traverse$1,
72524
- traverseProperties: traverseProperties,
72525
- writeFileContent: writeFileContent
72386
+ __proto__: null,
72387
+ __filesystem: __filesystem,
72388
+ __filesystem_name: __filesystem_name,
72389
+ __ignore: __ignore,
72390
+ __ignore_name: __ignore_name,
72391
+ __json: __json,
72392
+ __json_name: __json_name,
72393
+ __toml: __toml,
72394
+ __toml_name: __toml_name,
72395
+ __yaml: __yaml,
72396
+ __yaml_name: __yaml_name,
72397
+ addArgs: addArgs,
72398
+ addAttribute: addAttribute,
72399
+ addAttributeValue: addAttributeValue,
72400
+ addClassName: addClassName,
72401
+ addParens: addParens,
72402
+ compare: compare,
72403
+ compareAll: compareAll,
72404
+ compareAny: compareAny,
72405
+ compute: compute,
72406
+ contains: contains,
72407
+ containsClassName: containsClassName,
72408
+ copyFile: copyFile,
72409
+ createDirectory: createDirectory,
72410
+ createFile: createFile,
72411
+ createNestedDirectory: createNestedDirectory,
72412
+ declare: declare$1,
72413
+ deinit: deinit,
72414
+ extract: extract,
72415
+ findBinding: findBinding,
72416
+ findFile: findFile,
72417
+ findVarsWays: findVarsWays,
72418
+ fromJS: fromJS,
72419
+ getAttributeNode: getAttributeNode,
72420
+ getAttributePath: getAttributePath,
72421
+ getAttributeValue: getAttributeValue,
72422
+ getBinding: getBinding,
72423
+ getBindingPath: getBindingPath,
72424
+ getClassName: getClassName,
72425
+ getExportDefault: getExportDefault,
72426
+ getFileContent: getFileContent,
72427
+ getFileType: getFileType,
72428
+ getFilename: getFilename,
72429
+ getLiteralRaw: getLiteralRaw,
72430
+ getParentDirectory: getParentDirectory,
72431
+ getPathAfterImports: getPathAfterImports,
72432
+ getPathAfterRequires: getPathAfterRequires,
72433
+ getProperties: getProperties,
72434
+ getProperty: getProperty,
72435
+ getRootDirectory: getRootDirectory,
72436
+ getTemplateValues: getTemplateValues,
72437
+ getValues: getValues,
72438
+ hasAttributeValue: hasAttributeValue,
72439
+ hasDataName: hasDataName,
72440
+ hasParens: hasParens,
72441
+ hasTagName: hasTagName,
72442
+ ignore: ignore,
72443
+ init: init,
72444
+ insertAfter: insertAfter,
72445
+ insertBefore: insertBefore,
72446
+ isConditionKeyword: isConditionKeyword,
72447
+ isDeclarationKeyword: isDeclarationKeyword,
72448
+ isESM: isESM,
72449
+ isJSON: isJSON,
72450
+ isKeyword: isKeyword,
72451
+ isModuleDeclarationKeyword: isModuleDeclarationKeyword,
72452
+ isModuleExports: isModuleExports,
72453
+ isSimple: isSimple,
72454
+ isSimpleRegExp: isSimpleRegExp,
72455
+ isStatementKeyword: isStatementKeyword,
72456
+ isTSKeyword: isTSKeyword,
72457
+ isTemplate: isTemplate,
72458
+ matchFiles: matchFiles,
72459
+ moveFile: moveFile,
72460
+ parseTemplate: parseTemplate,
72461
+ pause: pause,
72462
+ readDirectory: readDirectory,
72463
+ readFileContent: readFileContent,
72464
+ remove: remove,
72465
+ removeAttributeValue: removeAttributeValue,
72466
+ removeClassName: removeClassName,
72467
+ removeEmptyDirectory: removeEmptyDirectory,
72468
+ removeFile: removeFile,
72469
+ removeParens: removeParens,
72470
+ rename: rename,
72471
+ renameFile: renameFile,
72472
+ renameFiles: renameFiles,
72473
+ renameProperty: renameProperty,
72474
+ replaceWith: replaceWith,
72475
+ replaceWithMultiple: replaceWithMultiple,
72476
+ setAttributeValue: setAttributeValue,
72477
+ setLiteralValue: setLiteralValue,
72478
+ setValues: setValues,
72479
+ start: start,
72480
+ toExpression: toExpression,
72481
+ toJS: toJS,
72482
+ transformRegExp: transformRegExp,
72483
+ traverse: traverse$1,
72484
+ traverseProperties: traverseProperties,
72485
+ writeFileContent: writeFileContent
72526
72486
  });
72527
72487
 
72528
72488
  const codeframe = ({source, error, highlightCode = true}) => {
@@ -72542,20 +72502,20 @@ const codeframe = ({source, error, highlightCode = true}) => {
72542
72502
  };
72543
72503
 
72544
72504
  var exports$1 = /*#__PURE__*/Object.freeze({
72545
- __proto__: null,
72546
- codeframe: codeframe,
72547
- findPlaces: findPlaces,
72548
- findPlacesAsync: findPlacesAsync,
72549
- generate: generate,
72550
- operator: operator,
72551
- parse: parse$2,
72552
- print: print,
72553
- putoutAsync: putoutAsync,
72554
- template: template$1,
72555
- transform: transform,
72556
- transformAsync: transformAsync,
72557
- traverse: traverse3,
72558
- types: lib_exports
72505
+ __proto__: null,
72506
+ codeframe: codeframe,
72507
+ findPlaces: findPlaces,
72508
+ findPlacesAsync: findPlacesAsync,
72509
+ generate: generate,
72510
+ operator: operator,
72511
+ parse: parse$2,
72512
+ print: print,
72513
+ putoutAsync: putoutAsync,
72514
+ template: template$1,
72515
+ transform: transform,
72516
+ transformAsync: transformAsync,
72517
+ traverse: traverse3,
72518
+ types: lib_exports
72559
72519
  });
72560
72520
 
72561
72521
  Object.assign(putout, exports$1);