@putout/bundle 3.18.4 → 3.18.5
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 +1165 -1541
- package/bundle/putout.min.js +1 -1
- package/package.json +3 -2
package/bundle/putout.js
CHANGED
|
@@ -174,15 +174,15 @@ var versions = {};
|
|
|
174
174
|
var release$1 = {};
|
|
175
175
|
var config = {};
|
|
176
176
|
|
|
177
|
-
function noop$
|
|
177
|
+
function noop$6() {}
|
|
178
178
|
|
|
179
|
-
var on = noop$
|
|
180
|
-
var addListener = noop$
|
|
181
|
-
var once$a = noop$
|
|
182
|
-
var off = noop$
|
|
183
|
-
var removeListener = noop$
|
|
184
|
-
var removeAllListeners = noop$
|
|
185
|
-
var emit = noop$
|
|
179
|
+
var on = noop$6;
|
|
180
|
+
var addListener = noop$6;
|
|
181
|
+
var once$a = noop$6;
|
|
182
|
+
var off = noop$6;
|
|
183
|
+
var removeListener = noop$6;
|
|
184
|
+
var removeAllListeners = noop$6;
|
|
185
|
+
var emit = noop$6;
|
|
186
186
|
|
|
187
187
|
function binding(name) {
|
|
188
188
|
throw new Error('process.binding is not supported');
|
|
@@ -257,7 +257,7 @@ var lookup = [];
|
|
|
257
257
|
var revLookup = [];
|
|
258
258
|
var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;
|
|
259
259
|
var inited = false;
|
|
260
|
-
function init$
|
|
260
|
+
function init$4 () {
|
|
261
261
|
inited = true;
|
|
262
262
|
var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
263
263
|
for (var i = 0, len = code.length; i < len; ++i) {
|
|
@@ -271,7 +271,7 @@ function init$5 () {
|
|
|
271
271
|
|
|
272
272
|
function toByteArray (b64) {
|
|
273
273
|
if (!inited) {
|
|
274
|
-
init$
|
|
274
|
+
init$4();
|
|
275
275
|
}
|
|
276
276
|
var i, j, l, tmp, placeHolders, arr;
|
|
277
277
|
var len = b64.length;
|
|
@@ -330,7 +330,7 @@ function encodeChunk (uint8, start, end) {
|
|
|
330
330
|
|
|
331
331
|
function fromByteArray (uint8) {
|
|
332
332
|
if (!inited) {
|
|
333
|
-
init$
|
|
333
|
+
init$4();
|
|
334
334
|
}
|
|
335
335
|
var tmp;
|
|
336
336
|
var len = uint8.length;
|
|
@@ -450,7 +450,7 @@ function write (buffer, value, offset, isLE, mLen, nBytes) {
|
|
|
450
450
|
|
|
451
451
|
var toString = {}.toString;
|
|
452
452
|
|
|
453
|
-
var isArray$
|
|
453
|
+
var isArray$i = Array.isArray || function (arr) {
|
|
454
454
|
return toString.call(arr) == '[object Array]';
|
|
455
455
|
};
|
|
456
456
|
|
|
@@ -734,7 +734,7 @@ function fromObject (that, obj) {
|
|
|
734
734
|
return fromArrayLike(that, obj)
|
|
735
735
|
}
|
|
736
736
|
|
|
737
|
-
if (obj.type === 'Buffer' && isArray$
|
|
737
|
+
if (obj.type === 'Buffer' && isArray$i(obj.data)) {
|
|
738
738
|
return fromArrayLike(that, obj.data)
|
|
739
739
|
}
|
|
740
740
|
}
|
|
@@ -799,7 +799,7 @@ Buffer.isEncoding = function isEncoding (encoding) {
|
|
|
799
799
|
};
|
|
800
800
|
|
|
801
801
|
Buffer.concat = function concat (list, length) {
|
|
802
|
-
if (!isArray$
|
|
802
|
+
if (!isArray$i(list)) {
|
|
803
803
|
throw new TypeError('"list" argument must be an Array of Buffers')
|
|
804
804
|
}
|
|
805
805
|
|
|
@@ -2448,7 +2448,7 @@ var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||
|
|
|
2448
2448
|
|
|
2449
2449
|
var formatRegExp = /%[sdj%]/g;
|
|
2450
2450
|
function format(f) {
|
|
2451
|
-
if (!isString$
|
|
2451
|
+
if (!isString$e(f)) {
|
|
2452
2452
|
var objects = [];
|
|
2453
2453
|
for (var i = 0; i < arguments.length; i++) {
|
|
2454
2454
|
objects.push(inspect(arguments[i]));
|
|
@@ -2641,7 +2641,7 @@ function formatValue(ctx, value, recurseTimes) {
|
|
|
2641
2641
|
// Also filter out any prototype objects using the circular check.
|
|
2642
2642
|
!(value.constructor && value.constructor.prototype === value)) {
|
|
2643
2643
|
var ret = value.inspect(recurseTimes, ctx);
|
|
2644
|
-
if (!isString$
|
|
2644
|
+
if (!isString$e(ret)) {
|
|
2645
2645
|
ret = formatValue(ctx, ret, recurseTimes);
|
|
2646
2646
|
}
|
|
2647
2647
|
return ret;
|
|
@@ -2688,7 +2688,7 @@ function formatValue(ctx, value, recurseTimes) {
|
|
|
2688
2688
|
var base = '', array = false, braces = ['{', '}'];
|
|
2689
2689
|
|
|
2690
2690
|
// Make Array say that they are Array
|
|
2691
|
-
if (isArray$
|
|
2691
|
+
if (isArray$h(value)) {
|
|
2692
2692
|
array = true;
|
|
2693
2693
|
braces = ['[', ']'];
|
|
2694
2694
|
}
|
|
@@ -2746,7 +2746,7 @@ function formatValue(ctx, value, recurseTimes) {
|
|
|
2746
2746
|
function formatPrimitive(ctx, value) {
|
|
2747
2747
|
if (isUndefined(value))
|
|
2748
2748
|
return ctx.stylize('undefined', 'undefined');
|
|
2749
|
-
if (isString$
|
|
2749
|
+
if (isString$e(value)) {
|
|
2750
2750
|
var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
|
|
2751
2751
|
.replace(/'/g, "\\'")
|
|
2752
2752
|
.replace(/\\"/g, '"') + '\'';
|
|
@@ -2867,7 +2867,7 @@ function reduceToSingleString(output, base, braces) {
|
|
|
2867
2867
|
|
|
2868
2868
|
// NOTE: These type checking functions intentionally don't use `instanceof`
|
|
2869
2869
|
// because it is fragile and can be easily faked with `Object.create()`.
|
|
2870
|
-
function isArray$
|
|
2870
|
+
function isArray$h(ar) {
|
|
2871
2871
|
return Array.isArray(ar);
|
|
2872
2872
|
}
|
|
2873
2873
|
|
|
@@ -2887,7 +2887,7 @@ function isNumber$3(arg) {
|
|
|
2887
2887
|
return typeof arg === 'number';
|
|
2888
2888
|
}
|
|
2889
2889
|
|
|
2890
|
-
function isString$
|
|
2890
|
+
function isString$e(arg) {
|
|
2891
2891
|
return typeof arg === 'string';
|
|
2892
2892
|
}
|
|
2893
2893
|
|
|
@@ -3094,12 +3094,12 @@ var _polyfillNode_util = {
|
|
|
3094
3094
|
isRegExp: isRegExp$1,
|
|
3095
3095
|
isUndefined: isUndefined,
|
|
3096
3096
|
isSymbol: isSymbol,
|
|
3097
|
-
isString: isString$
|
|
3097
|
+
isString: isString$e,
|
|
3098
3098
|
isNumber: isNumber$3,
|
|
3099
3099
|
isNullOrUndefined: isNullOrUndefined,
|
|
3100
3100
|
isNull: isNull$1,
|
|
3101
3101
|
isBoolean: isBoolean,
|
|
3102
|
-
isArray: isArray$
|
|
3102
|
+
isArray: isArray$h,
|
|
3103
3103
|
inspect: inspect,
|
|
3104
3104
|
deprecate: deprecate,
|
|
3105
3105
|
format: format,
|
|
@@ -3118,7 +3118,7 @@ var _polyfillNode_util$1 = /*#__PURE__*/Object.freeze({
|
|
|
3118
3118
|
format: format,
|
|
3119
3119
|
inherits: inherits$1,
|
|
3120
3120
|
inspect: inspect,
|
|
3121
|
-
isArray: isArray$
|
|
3121
|
+
isArray: isArray$h,
|
|
3122
3122
|
isBoolean: isBoolean,
|
|
3123
3123
|
isBuffer: isBuffer,
|
|
3124
3124
|
isDate: isDate,
|
|
@@ -3130,7 +3130,7 @@ var _polyfillNode_util$1 = /*#__PURE__*/Object.freeze({
|
|
|
3130
3130
|
isObject: isObject$6,
|
|
3131
3131
|
isPrimitive: isPrimitive$1,
|
|
3132
3132
|
isRegExp: isRegExp$1,
|
|
3133
|
-
isString: isString$
|
|
3133
|
+
isString: isString$e,
|
|
3134
3134
|
isSymbol: isSymbol,
|
|
3135
3135
|
isUndefined: isUndefined,
|
|
3136
3136
|
log: log$6,
|
|
@@ -8990,7 +8990,7 @@ __export(lib_exports, {
|
|
|
8990
8990
|
return newExpression$1;
|
|
8991
8991
|
},
|
|
8992
8992
|
Noop: function() {
|
|
8993
|
-
return noop$
|
|
8993
|
+
return noop$5;
|
|
8994
8994
|
},
|
|
8995
8995
|
NullLiteral: function() {
|
|
8996
8996
|
return nullLiteral;
|
|
@@ -11312,7 +11312,7 @@ __export(lib_exports, {
|
|
|
11312
11312
|
return isPrivateName;
|
|
11313
11313
|
},
|
|
11314
11314
|
isProgram: function() {
|
|
11315
|
-
return isProgram$
|
|
11315
|
+
return isProgram$6;
|
|
11316
11316
|
},
|
|
11317
11317
|
isProperty: function() {
|
|
11318
11318
|
return isProperty$1;
|
|
@@ -11825,7 +11825,7 @@ __export(lib_exports, {
|
|
|
11825
11825
|
return newExpression$1;
|
|
11826
11826
|
},
|
|
11827
11827
|
noop: function() {
|
|
11828
|
-
return noop$
|
|
11828
|
+
return noop$5;
|
|
11829
11829
|
},
|
|
11830
11830
|
nullLiteral: function() {
|
|
11831
11831
|
return nullLiteral;
|
|
@@ -13999,7 +13999,7 @@ function isNewExpression(node, opts) {
|
|
|
13999
13999
|
if (node.type !== "NewExpression") return false;
|
|
14000
14000
|
return opts == null || shallowEqual(node, opts);
|
|
14001
14001
|
}
|
|
14002
|
-
function isProgram$
|
|
14002
|
+
function isProgram$6(node, opts) {
|
|
14003
14003
|
if (!node) return false;
|
|
14004
14004
|
if (node.type !== "Program") return false;
|
|
14005
14005
|
return opts == null || shallowEqual(node, opts);
|
|
@@ -23216,7 +23216,7 @@ function jsxClosingFragment() {
|
|
|
23216
23216
|
type: "JSXClosingFragment"
|
|
23217
23217
|
};
|
|
23218
23218
|
}
|
|
23219
|
-
function noop$
|
|
23219
|
+
function noop$5() {
|
|
23220
23220
|
return {
|
|
23221
23221
|
type: "Noop"
|
|
23222
23222
|
};
|
|
@@ -27414,7 +27414,7 @@ var TokContext = function TokContext(token, preserveSpace) {
|
|
|
27414
27414
|
this.token = token;
|
|
27415
27415
|
this.preserveSpace = !!preserveSpace;
|
|
27416
27416
|
};
|
|
27417
|
-
var types$
|
|
27417
|
+
var types$z = {
|
|
27418
27418
|
brace: new TokContext("{"),
|
|
27419
27419
|
j_oTag: new TokContext("<tag"),
|
|
27420
27420
|
j_cTag: new TokContext("</tag"),
|
|
@@ -29641,7 +29641,7 @@ var State$2 = /*#__PURE__*/ function() {
|
|
|
29641
29641
|
__publicField(this, "lastTokEndLoc", null);
|
|
29642
29642
|
__publicField(this, "lastTokStartLoc", null);
|
|
29643
29643
|
__publicField(this, "context", [
|
|
29644
|
-
types$
|
|
29644
|
+
types$z.brace
|
|
29645
29645
|
]);
|
|
29646
29646
|
__publicField(this, "firstInvalidTemplateEscapePos", null);
|
|
29647
29647
|
__publicField(this, "strictErrors", /* @__PURE__ */ new Map());
|
|
@@ -34183,7 +34183,7 @@ var flow$1 = function(superClass) {
|
|
|
34183
34183
|
if (!jsx2.error) return jsx2.node;
|
|
34184
34184
|
var context = this.state.context;
|
|
34185
34185
|
var currentContext = context[context.length - 1];
|
|
34186
|
-
if (currentContext === types$
|
|
34186
|
+
if (currentContext === types$z.j_oTag || currentContext === types$z.j_expr) {
|
|
34187
34187
|
context.pop();
|
|
34188
34188
|
}
|
|
34189
34189
|
}
|
|
@@ -35399,9 +35399,9 @@ var jsx$3 = function(superClass) {
|
|
|
35399
35399
|
switch(this.state.type){
|
|
35400
35400
|
case 5:
|
|
35401
35401
|
node = this.startNode();
|
|
35402
|
-
this.setContext(types$
|
|
35402
|
+
this.setContext(types$z.brace);
|
|
35403
35403
|
this.next();
|
|
35404
|
-
node = this.jsxParseExpressionContainer(node, types$
|
|
35404
|
+
node = this.jsxParseExpressionContainer(node, types$z.j_oTag);
|
|
35405
35405
|
if (node.expression.type === "JSXEmptyExpression") {
|
|
35406
35406
|
this.raise(JsxErrors.AttributeIsEmpty, node);
|
|
35407
35407
|
}
|
|
@@ -35426,7 +35426,7 @@ var jsx$3 = function(superClass) {
|
|
|
35426
35426
|
value: function jsxParseSpreadChild(node) {
|
|
35427
35427
|
this.next();
|
|
35428
35428
|
node.expression = this.parseExpression();
|
|
35429
|
-
this.setContext(types$
|
|
35429
|
+
this.setContext(types$z.j_expr);
|
|
35430
35430
|
this.state.canStartJSXElement = true;
|
|
35431
35431
|
this.expect(8);
|
|
35432
35432
|
return this.finishNode(node, "JSXSpreadChild");
|
|
@@ -35458,11 +35458,11 @@ var jsx$3 = function(superClass) {
|
|
|
35458
35458
|
value: function jsxParseAttribute() {
|
|
35459
35459
|
var node = this.startNode();
|
|
35460
35460
|
if (this.match(5)) {
|
|
35461
|
-
this.setContext(types$
|
|
35461
|
+
this.setContext(types$z.brace);
|
|
35462
35462
|
this.next();
|
|
35463
35463
|
this.expect(21);
|
|
35464
35464
|
node.argument = this.parseMaybeAssignAllowIn();
|
|
35465
|
-
this.setContext(types$
|
|
35465
|
+
this.setContext(types$z.j_oTag);
|
|
35466
35466
|
this.state.canStartJSXElement = true;
|
|
35467
35467
|
this.expect(8);
|
|
35468
35468
|
return this.finishNode(node, "JSXSpreadAttribute");
|
|
@@ -35533,12 +35533,12 @@ var jsx$3 = function(superClass) {
|
|
|
35533
35533
|
case 5:
|
|
35534
35534
|
{
|
|
35535
35535
|
var node2 = this.startNode();
|
|
35536
|
-
this.setContext(types$
|
|
35536
|
+
this.setContext(types$z.brace);
|
|
35537
35537
|
this.next();
|
|
35538
35538
|
if (this.match(21)) {
|
|
35539
35539
|
children.push(this.jsxParseSpreadChild(node2));
|
|
35540
35540
|
} else {
|
|
35541
|
-
children.push(this.jsxParseExpressionContainer(node2, types$
|
|
35541
|
+
children.push(this.jsxParseExpressionContainer(node2, types$z.j_expr));
|
|
35542
35542
|
}
|
|
35543
35543
|
break;
|
|
35544
35544
|
}
|
|
@@ -35613,11 +35613,11 @@ var jsx$3 = function(superClass) {
|
|
|
35613
35613
|
key: "getTokenFromCode",
|
|
35614
35614
|
value: function getTokenFromCode(code2) {
|
|
35615
35615
|
var context = this.curContext();
|
|
35616
|
-
if (context === types$
|
|
35616
|
+
if (context === types$z.j_expr) {
|
|
35617
35617
|
this.jsxReadToken();
|
|
35618
35618
|
return;
|
|
35619
35619
|
}
|
|
35620
|
-
if (context === types$
|
|
35620
|
+
if (context === types$z.j_oTag || context === types$z.j_cTag) {
|
|
35621
35621
|
if (isIdentifierStart2(code2)) {
|
|
35622
35622
|
this.jsxReadWord();
|
|
35623
35623
|
return;
|
|
@@ -35627,7 +35627,7 @@ var jsx$3 = function(superClass) {
|
|
|
35627
35627
|
this.finishToken(143);
|
|
35628
35628
|
return;
|
|
35629
35629
|
}
|
|
35630
|
-
if ((code2 === 34 || code2 === 39) && context === types$
|
|
35630
|
+
if ((code2 === 34 || code2 === 39) && context === types$z.j_oTag) {
|
|
35631
35631
|
this.jsxReadString(code2);
|
|
35632
35632
|
return;
|
|
35633
35633
|
}
|
|
@@ -35645,17 +35645,17 @@ var jsx$3 = function(superClass) {
|
|
|
35645
35645
|
value: function updateContext(prevType) {
|
|
35646
35646
|
var _this_state = this.state, context = _this_state.context, type = _this_state.type;
|
|
35647
35647
|
if (type === 56 && prevType === 142) {
|
|
35648
|
-
context.splice(-2, 2, types$
|
|
35648
|
+
context.splice(-2, 2, types$z.j_cTag);
|
|
35649
35649
|
this.state.canStartJSXElement = false;
|
|
35650
35650
|
} else if (type === 142) {
|
|
35651
|
-
context.push(types$
|
|
35651
|
+
context.push(types$z.j_oTag);
|
|
35652
35652
|
} else if (type === 143) {
|
|
35653
35653
|
var out = context[context.length - 1];
|
|
35654
|
-
if (out === types$
|
|
35654
|
+
if (out === types$z.j_oTag && prevType === 56 || out === types$z.j_cTag) {
|
|
35655
35655
|
context.pop();
|
|
35656
|
-
this.state.canStartJSXElement = context[context.length - 1] === types$
|
|
35656
|
+
this.state.canStartJSXElement = context[context.length - 1] === types$z.j_expr;
|
|
35657
35657
|
} else {
|
|
35658
|
-
this.setContext(types$
|
|
35658
|
+
this.setContext(types$z.j_expr);
|
|
35659
35659
|
this.state.canStartJSXElement = true;
|
|
35660
35660
|
}
|
|
35661
35661
|
} else {
|
|
@@ -38157,7 +38157,7 @@ var typescript$3 = function(superClass) {
|
|
|
38157
38157
|
});
|
|
38158
38158
|
if (node.params.length === 0) {
|
|
38159
38159
|
this.raise(TSErrors.EmptyTypeArguments, node);
|
|
38160
|
-
} else if (!this.state.inType && this.curContext() === types$
|
|
38160
|
+
} else if (!this.state.inType && this.curContext() === types$z.brace) {
|
|
38161
38161
|
this.reScan_lt_gt();
|
|
38162
38162
|
}
|
|
38163
38163
|
this.expect(48);
|
|
@@ -38970,7 +38970,7 @@ var typescript$3 = function(superClass) {
|
|
|
38970
38970
|
if (!jsx2.error) return jsx2.node;
|
|
38971
38971
|
var context = this.state.context;
|
|
38972
38972
|
var currentContext = context[context.length - 1];
|
|
38973
|
-
if (currentContext === types$
|
|
38973
|
+
if (currentContext === types$z.j_oTag || currentContext === types$z.j_expr) {
|
|
38974
38974
|
context.pop();
|
|
38975
38975
|
}
|
|
38976
38976
|
}
|
|
@@ -48880,7 +48880,7 @@ function RestElement$1(node) {
|
|
|
48880
48880
|
this.token("...");
|
|
48881
48881
|
this.print(node.argument);
|
|
48882
48882
|
}
|
|
48883
|
-
function ObjectExpression$
|
|
48883
|
+
function ObjectExpression$6(node) {
|
|
48884
48884
|
var props = node.properties;
|
|
48885
48885
|
this.tokenChar(123);
|
|
48886
48886
|
if (props.length) {
|
|
@@ -48903,7 +48903,7 @@ function ObjectMethod$2(node) {
|
|
|
48903
48903
|
this.space();
|
|
48904
48904
|
this.print(node.body);
|
|
48905
48905
|
}
|
|
48906
|
-
function ObjectProperty$
|
|
48906
|
+
function ObjectProperty$6(node) {
|
|
48907
48907
|
this.printJoin(node.decorators);
|
|
48908
48908
|
if (node.computed) {
|
|
48909
48909
|
this.tokenChar(91);
|
|
@@ -48923,7 +48923,7 @@ function ObjectProperty$7(node) {
|
|
|
48923
48923
|
this.space();
|
|
48924
48924
|
this.print(node.value);
|
|
48925
48925
|
}
|
|
48926
|
-
function ArrayExpression$
|
|
48926
|
+
function ArrayExpression$7(node) {
|
|
48927
48927
|
var elems = node.elements;
|
|
48928
48928
|
var len = elems.length;
|
|
48929
48929
|
this.tokenChar(91);
|
|
@@ -49009,7 +49009,7 @@ function NumericLiteral(node) {
|
|
|
49009
49009
|
this.number(raw, value1);
|
|
49010
49010
|
}
|
|
49011
49011
|
}
|
|
49012
|
-
function StringLiteral$
|
|
49012
|
+
function StringLiteral$8(node) {
|
|
49013
49013
|
var raw = this.getPossibleRaw(node);
|
|
49014
49014
|
if (!this.format.minified && raw !== void 0) {
|
|
49015
49015
|
this.token(raw);
|
|
@@ -50509,8 +50509,8 @@ var generatorFunctions = /* @__PURE__ */ Object.freeze({
|
|
|
50509
50509
|
__proto__: null,
|
|
50510
50510
|
AnyTypeAnnotation: AnyTypeAnnotation,
|
|
50511
50511
|
ArgumentPlaceholder: ArgumentPlaceholder,
|
|
50512
|
-
ArrayExpression: ArrayExpression$
|
|
50513
|
-
ArrayPattern: ArrayExpression$
|
|
50512
|
+
ArrayExpression: ArrayExpression$7,
|
|
50513
|
+
ArrayPattern: ArrayExpression$7,
|
|
50514
50514
|
ArrayTypeAnnotation: ArrayTypeAnnotation,
|
|
50515
50515
|
ArrowFunctionExpression: ArrowFunctionExpression$1,
|
|
50516
50516
|
AssignmentExpression: AssignmentExpression$2,
|
|
@@ -50627,10 +50627,10 @@ var generatorFunctions = /* @__PURE__ */ Object.freeze({
|
|
|
50627
50627
|
NumberLiteralTypeAnnotation: NumericLiteral,
|
|
50628
50628
|
NumberTypeAnnotation: NumberTypeAnnotation,
|
|
50629
50629
|
NumericLiteral: NumericLiteral,
|
|
50630
|
-
ObjectExpression: ObjectExpression$
|
|
50630
|
+
ObjectExpression: ObjectExpression$6,
|
|
50631
50631
|
ObjectMethod: ObjectMethod$2,
|
|
50632
|
-
ObjectPattern: ObjectExpression$
|
|
50633
|
-
ObjectProperty: ObjectProperty$
|
|
50632
|
+
ObjectPattern: ObjectExpression$6,
|
|
50633
|
+
ObjectProperty: ObjectProperty$6,
|
|
50634
50634
|
ObjectTypeAnnotation: ObjectTypeAnnotation,
|
|
50635
50635
|
ObjectTypeCallProperty: ObjectTypeCallProperty,
|
|
50636
50636
|
ObjectTypeIndexer: ObjectTypeIndexer,
|
|
@@ -50656,8 +50656,8 @@ var generatorFunctions = /* @__PURE__ */ Object.freeze({
|
|
|
50656
50656
|
SequenceExpression: SequenceExpression$2,
|
|
50657
50657
|
SpreadElement: RestElement$1,
|
|
50658
50658
|
StaticBlock: StaticBlock$1,
|
|
50659
|
-
StringLiteral: StringLiteral$
|
|
50660
|
-
StringLiteralTypeAnnotation: StringLiteral$
|
|
50659
|
+
StringLiteral: StringLiteral$8,
|
|
50660
|
+
StringLiteralTypeAnnotation: StringLiteral$8,
|
|
50661
50661
|
StringTypeAnnotation: StringTypeAnnotation,
|
|
50662
50662
|
Super: Super,
|
|
50663
50663
|
SwitchCase: SwitchCase,
|
|
@@ -58416,7 +58416,7 @@ var main = {};
|
|
|
58416
58416
|
|
|
58417
58417
|
var fork = {exports: {}};
|
|
58418
58418
|
|
|
58419
|
-
var types$
|
|
58419
|
+
var types$y = {exports: {}};
|
|
58420
58420
|
|
|
58421
58421
|
var shared = {};
|
|
58422
58422
|
|
|
@@ -58516,12 +58516,12 @@ function requireShared () {
|
|
|
58516
58516
|
return shared;
|
|
58517
58517
|
}
|
|
58518
58518
|
|
|
58519
|
-
types$
|
|
58519
|
+
types$y.exports;
|
|
58520
58520
|
|
|
58521
58521
|
var hasRequiredTypes;
|
|
58522
58522
|
|
|
58523
58523
|
function requireTypes () {
|
|
58524
|
-
if (hasRequiredTypes) return types$
|
|
58524
|
+
if (hasRequiredTypes) return types$y.exports;
|
|
58525
58525
|
hasRequiredTypes = 1;
|
|
58526
58526
|
(function (module, exports) {
|
|
58527
58527
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -59313,8 +59313,8 @@ function requireTypes () {
|
|
|
59313
59313
|
exports.default = typesPlugin;
|
|
59314
59314
|
(0, shared_1.maybeSetModuleExports)(function () { return module; });
|
|
59315
59315
|
|
|
59316
|
-
} (types$
|
|
59317
|
-
return types$
|
|
59316
|
+
} (types$y, types$y.exports));
|
|
59317
|
+
return types$y.exports;
|
|
59318
59318
|
}
|
|
59319
59319
|
|
|
59320
59320
|
var pathVisitor = {exports: {}};
|
|
@@ -78645,7 +78645,7 @@ var printer = {};
|
|
|
78645
78645
|
|
|
78646
78646
|
var tokenize$1 = {};
|
|
78647
78647
|
|
|
78648
|
-
var fullstore$
|
|
78648
|
+
var fullstore$5 = (value) => {
|
|
78649
78649
|
const data = {
|
|
78650
78650
|
value,
|
|
78651
78651
|
};
|
|
@@ -78662,9 +78662,9 @@ var fullstore$6 = (value) => {
|
|
|
78662
78662
|
};
|
|
78663
78663
|
};
|
|
78664
78664
|
|
|
78665
|
-
var types$
|
|
78665
|
+
var types$x = {};
|
|
78666
78666
|
|
|
78667
|
-
types$
|
|
78667
|
+
types$x.TYPES = {
|
|
78668
78668
|
TOKEN: 'Token',
|
|
78669
78669
|
NEWLINE: 'Newline',
|
|
78670
78670
|
LINEBREAK: 'Linebreak',
|
|
@@ -78684,7 +78684,7 @@ var arrowFunctionExpression = {};
|
|
|
78684
78684
|
|
|
78685
78685
|
var is$3 = {};
|
|
78686
78686
|
|
|
78687
|
-
const {types: types$
|
|
78687
|
+
const {types: types$w} = bundle;
|
|
78688
78688
|
const {
|
|
78689
78689
|
isStringLiteral: isStringLiteral$9,
|
|
78690
78690
|
isSpreadElement: isSpreadElement$3,
|
|
@@ -78696,7 +78696,7 @@ const {
|
|
|
78696
78696
|
isMemberExpression: isMemberExpression$5,
|
|
78697
78697
|
isArrayExpression: isArrayExpression$4,
|
|
78698
78698
|
isObjectExpression: isObjectExpression$6,
|
|
78699
|
-
} = types$
|
|
78699
|
+
} = types$w;
|
|
78700
78700
|
|
|
78701
78701
|
const isParentProgram$1 = (path) => path.parentPath?.isProgram();
|
|
78702
78702
|
const isParentBlock$3 = (path) => path.parentPath.isBlockStatement();
|
|
@@ -78875,7 +78875,7 @@ maybeInsideFn$1.maybeInsideFn = (insideFn, {print, indent}) => {
|
|
|
78875
78875
|
indent.dec();
|
|
78876
78876
|
};
|
|
78877
78877
|
|
|
78878
|
-
const {types: types$
|
|
78878
|
+
const {types: types$v} = bundle;
|
|
78879
78879
|
const {
|
|
78880
78880
|
hasTrailingComment: hasTrailingComment$4,
|
|
78881
78881
|
satisfy: satisfy$4,
|
|
@@ -78891,7 +78891,7 @@ const {
|
|
|
78891
78891
|
isClassProperty,
|
|
78892
78892
|
isTSPropertySignature,
|
|
78893
78893
|
isSpreadElement: isSpreadElement$2,
|
|
78894
|
-
} = types$
|
|
78894
|
+
} = types$v;
|
|
78895
78895
|
|
|
78896
78896
|
const isProperty = satisfy$4([
|
|
78897
78897
|
isObjectProperty$1,
|
|
@@ -79630,7 +79630,7 @@ var memberExpressions$1 = {};
|
|
|
79630
79630
|
|
|
79631
79631
|
var chain$1 = {};
|
|
79632
79632
|
|
|
79633
|
-
const {assign: assign$
|
|
79633
|
+
const {assign: assign$e} = Object;
|
|
79634
79634
|
|
|
79635
79635
|
chain$1.chain = (path) => {
|
|
79636
79636
|
const all = [
|
|
@@ -79695,7 +79695,7 @@ function build(path) {
|
|
|
79695
79695
|
};
|
|
79696
79696
|
|
|
79697
79697
|
if (path.isCallExpression())
|
|
79698
|
-
assign$
|
|
79698
|
+
assign$e(prop, {
|
|
79699
79699
|
args: path.node.arguments.length,
|
|
79700
79700
|
name: path.node.callee.property?.name || '',
|
|
79701
79701
|
});
|
|
@@ -79929,12 +79929,12 @@ var callExpression = {};
|
|
|
79929
79929
|
|
|
79930
79930
|
const {exists: exists$c} = is$3;
|
|
79931
79931
|
const {maybeParens: maybeParens$4} = maybeParens$8;
|
|
79932
|
-
const {isArray: isArray$
|
|
79932
|
+
const {isArray: isArray$g} = Array;
|
|
79933
79933
|
|
|
79934
79934
|
const parseArgs = (path) => {
|
|
79935
79935
|
const argsPath = path.get('arguments');
|
|
79936
79936
|
|
|
79937
|
-
if (!isArray$
|
|
79937
|
+
if (!isArray$g(argsPath))
|
|
79938
79938
|
return [];
|
|
79939
79939
|
|
|
79940
79940
|
return argsPath;
|
|
@@ -80071,8 +80071,8 @@ const {
|
|
|
80071
80071
|
|
|
80072
80072
|
const {parseComments: parseComments$4} = comment;
|
|
80073
80073
|
const {likeChain} = memberExpressions$1;
|
|
80074
|
-
const {types: types$
|
|
80075
|
-
const {isStringLiteral: isStringLiteral$8} = types$
|
|
80074
|
+
const {types: types$u} = bundle;
|
|
80075
|
+
const {isStringLiteral: isStringLiteral$8} = types$u;
|
|
80076
80076
|
|
|
80077
80077
|
const isBodyOfArrow = (path) => path.parentPath.node.body === path.node;
|
|
80078
80078
|
const isLogical = (path) => path.get('argument').isLogicalExpression();
|
|
@@ -80781,13 +80781,13 @@ var operate = {};
|
|
|
80781
80781
|
|
|
80782
80782
|
var getBinding$2 = {};
|
|
80783
80783
|
|
|
80784
|
-
const {types: types$
|
|
80784
|
+
const {types: types$t} = bundle;
|
|
80785
80785
|
const {
|
|
80786
80786
|
isIdentifier: isIdentifier$8,
|
|
80787
80787
|
isMemberExpression: isMemberExpression$3,
|
|
80788
|
-
} = types$
|
|
80788
|
+
} = types$t;
|
|
80789
80789
|
|
|
80790
|
-
const isString$
|
|
80790
|
+
const isString$d = (a) => typeof a === 'string';
|
|
80791
80791
|
|
|
80792
80792
|
getBinding$2.getBinding = getBinding$1;
|
|
80793
80793
|
function getBinding$1(path, node) {
|
|
@@ -80798,7 +80798,7 @@ function getBinding$1(path, node) {
|
|
|
80798
80798
|
getBinding$2.getBindingPath = (path, name) => getBinding$1(path, name)?.path;
|
|
80799
80799
|
|
|
80800
80800
|
const parseName$1 = (node) => {
|
|
80801
|
-
if (isString$
|
|
80801
|
+
if (isString$d(node))
|
|
80802
80802
|
return node;
|
|
80803
80803
|
|
|
80804
80804
|
if (isIdentifier$8(node))
|
|
@@ -80812,13 +80812,13 @@ const parseName$1 = (node) => {
|
|
|
80812
80812
|
|
|
80813
80813
|
var isSimple$2 = {};
|
|
80814
80814
|
|
|
80815
|
-
const {types: types$
|
|
80815
|
+
const {types: types$s} = bundle;
|
|
80816
80816
|
const {
|
|
80817
80817
|
isOptionalMemberExpression,
|
|
80818
80818
|
isMemberExpression: isMemberExpression$2,
|
|
80819
80819
|
isIdentifier: isIdentifier$7,
|
|
80820
80820
|
isLiteral: isLiteral$3,
|
|
80821
|
-
} = types$
|
|
80821
|
+
} = types$s;
|
|
80822
80822
|
|
|
80823
80823
|
isSimple$2.isSimple = (a) => {
|
|
80824
80824
|
if (isLiteral$3(a))
|
|
@@ -80835,7 +80835,7 @@ isSimple$2.isSimple = (a) => {
|
|
|
80835
80835
|
|
|
80836
80836
|
var extract$6 = {};
|
|
80837
80837
|
|
|
80838
|
-
const {types: types$
|
|
80838
|
+
const {types: types$r} = bundle;
|
|
80839
80839
|
const {
|
|
80840
80840
|
isArrayExpression: isArrayExpression$3,
|
|
80841
80841
|
isLiteral: isLiteral$2,
|
|
@@ -80849,7 +80849,7 @@ const {
|
|
|
80849
80849
|
isJSXAttribute: isJSXAttribute$1,
|
|
80850
80850
|
isTSTypeReference: isTSTypeReference$2,
|
|
80851
80851
|
isTSTypeParameter,
|
|
80852
|
-
} = types$
|
|
80852
|
+
} = types$r;
|
|
80853
80853
|
|
|
80854
80854
|
extract$6.extract = extract$5;
|
|
80855
80855
|
|
|
@@ -81173,9 +81173,9 @@ rename$1.rename = (path, from, to) => {
|
|
|
81173
81173
|
bindingPath.scope.rename(from, to);
|
|
81174
81174
|
};
|
|
81175
81175
|
|
|
81176
|
-
var setLiteralValue$
|
|
81176
|
+
var setLiteralValue$4 = {};
|
|
81177
81177
|
|
|
81178
|
-
setLiteralValue$
|
|
81178
|
+
setLiteralValue$4.setLiteralValue = (path, newValue) => {
|
|
81179
81179
|
const node = path.node || path;
|
|
81180
81180
|
const {
|
|
81181
81181
|
raw,
|
|
@@ -81232,15 +81232,15 @@ function isRequire$1(path) {
|
|
|
81232
81232
|
|
|
81233
81233
|
var properties = {};
|
|
81234
81234
|
|
|
81235
|
-
var traverseProperties$
|
|
81235
|
+
var traverseProperties$6 = {};
|
|
81236
81236
|
|
|
81237
|
-
const {traverse: traverse$b, types: types$
|
|
81237
|
+
const {traverse: traverse$b, types: types$q} = bundle;
|
|
81238
81238
|
const {extract: extract$3} = extract$6;
|
|
81239
81239
|
|
|
81240
81240
|
const {
|
|
81241
81241
|
isObjectExpression: isObjectExpression$5,
|
|
81242
81242
|
isCallExpression: isCallExpression$3,
|
|
81243
|
-
} = types$
|
|
81243
|
+
} = types$q;
|
|
81244
81244
|
|
|
81245
81245
|
const nodeOrPath = (path) => path.node || path;
|
|
81246
81246
|
|
|
@@ -81257,7 +81257,7 @@ function getNode(path) {
|
|
|
81257
81257
|
};
|
|
81258
81258
|
}
|
|
81259
81259
|
|
|
81260
|
-
traverseProperties$
|
|
81260
|
+
traverseProperties$6.traverseProperties = (path, name, {firstLevel = false} = {}) => {
|
|
81261
81261
|
const collector = [];
|
|
81262
81262
|
const node = getNode(path);
|
|
81263
81263
|
|
|
@@ -81297,9 +81297,9 @@ const {
|
|
|
81297
81297
|
isObjectPattern: isObjectPattern$1,
|
|
81298
81298
|
} = bundle.types;
|
|
81299
81299
|
const {extract: extract$2} = extract$6;
|
|
81300
|
-
const {traverseProperties: traverseProperties$
|
|
81300
|
+
const {traverseProperties: traverseProperties$5} = traverseProperties$6;
|
|
81301
81301
|
|
|
81302
|
-
properties.traverseProperties = traverseProperties$
|
|
81302
|
+
properties.traverseProperties = traverseProperties$5;
|
|
81303
81303
|
|
|
81304
81304
|
properties.getProperties = (path, names) => {
|
|
81305
81305
|
const result = {};
|
|
@@ -81341,7 +81341,7 @@ properties.getProperty = (path, name) => {
|
|
|
81341
81341
|
|
|
81342
81342
|
var getLiteralRaw$1 = {};
|
|
81343
81343
|
|
|
81344
|
-
const isString$
|
|
81344
|
+
const isString$c = (a) => typeof a === 'string';
|
|
81345
81345
|
|
|
81346
81346
|
getLiteralRaw$1.getLiteralRaw = (path) => {
|
|
81347
81347
|
const {
|
|
@@ -81350,10 +81350,10 @@ getLiteralRaw$1.getLiteralRaw = (path) => {
|
|
|
81350
81350
|
value,
|
|
81351
81351
|
} = path.node || path;
|
|
81352
81352
|
|
|
81353
|
-
if (isString$
|
|
81353
|
+
if (isString$c(raw))
|
|
81354
81354
|
return raw;
|
|
81355
81355
|
|
|
81356
|
-
if (extra && isString$
|
|
81356
|
+
if (extra && isString$c(extra.raw))
|
|
81357
81357
|
return extra.raw;
|
|
81358
81358
|
|
|
81359
81359
|
return `'${maybeEncode$1(value)}'`;
|
|
@@ -81372,13 +81372,13 @@ var replaceWithMultiple$2 = {};
|
|
|
81372
81372
|
|
|
81373
81373
|
var maybeBody$2 = {};
|
|
81374
81374
|
|
|
81375
|
-
const {types: types$
|
|
81375
|
+
const {types: types$p} = bundle;
|
|
81376
81376
|
const {
|
|
81377
81377
|
isStatement: isStatement$4,
|
|
81378
81378
|
isBlockStatement: isBlockStatement$3,
|
|
81379
81379
|
BlockStatement: BlockStatement$1,
|
|
81380
81380
|
ExpressionStatement: ExpressionStatement$5,
|
|
81381
|
-
} = types$
|
|
81381
|
+
} = types$p;
|
|
81382
81382
|
|
|
81383
81383
|
maybeBody$2.maybeBody = (path, node) => {
|
|
81384
81384
|
const {parentPath} = path;
|
|
@@ -81399,12 +81399,12 @@ maybeBody$2.maybeBody = (path, node) => {
|
|
|
81399
81399
|
|
|
81400
81400
|
var toExpression$3 = {};
|
|
81401
81401
|
|
|
81402
|
-
const {types: types$
|
|
81402
|
+
const {types: types$o} = bundle;
|
|
81403
81403
|
const {
|
|
81404
81404
|
isExpression: isExpression$1,
|
|
81405
81405
|
ExpressionStatement: ExpressionStatement$4,
|
|
81406
81406
|
toStatement,
|
|
81407
|
-
} = types$
|
|
81407
|
+
} = types$o;
|
|
81408
81408
|
|
|
81409
81409
|
toExpression$3.toExpression = (el) => {
|
|
81410
81410
|
const {type} = el;
|
|
@@ -81454,7 +81454,7 @@ replaceWithMultiple$2.replaceWithMultiple = (path, nodes) => {
|
|
|
81454
81454
|
var replaceWith$6 = {};
|
|
81455
81455
|
|
|
81456
81456
|
const {maybeBody} = maybeBody$2;
|
|
81457
|
-
const {assign: assign$
|
|
81457
|
+
const {assign: assign$d} = Object;
|
|
81458
81458
|
|
|
81459
81459
|
replaceWith$6.replaceWith = (path, node) => {
|
|
81460
81460
|
if (path?.parentPath?.isExpressionStatement() && !path.parentPath.isProgram())
|
|
@@ -81465,7 +81465,7 @@ replaceWith$6.replaceWith = (path, node) => {
|
|
|
81465
81465
|
|
|
81466
81466
|
currentPath.replaceWith(node);
|
|
81467
81467
|
|
|
81468
|
-
assign$
|
|
81468
|
+
assign$d(currentPath.node, {
|
|
81469
81469
|
comments,
|
|
81470
81470
|
loc,
|
|
81471
81471
|
});
|
|
@@ -81481,7 +81481,7 @@ replaceWith$7.replaceWith = replaceWith$5;
|
|
|
81481
81481
|
replaceWith$7.replaceWithMultiple = replaceWithMultiple$1;
|
|
81482
81482
|
replaceWith$7.toExpression = toExpression$1;
|
|
81483
81483
|
|
|
81484
|
-
const {types: types$
|
|
81484
|
+
const {types: types$n} = bundle;
|
|
81485
81485
|
|
|
81486
81486
|
const {getBinding, getBindingPath} = getBinding$2;
|
|
81487
81487
|
const {isSimple: isSimple$1} = isSimple$2;
|
|
@@ -81491,13 +81491,13 @@ const {remove: remove$1} = remove$2;
|
|
|
81491
81491
|
const {getExportDefault} = getExportDefault$1;
|
|
81492
81492
|
const {rename} = rename$1;
|
|
81493
81493
|
const {renameProperty} = renameProperty$2;
|
|
81494
|
-
const {setLiteralValue: setLiteralValue$
|
|
81494
|
+
const {setLiteralValue: setLiteralValue$3} = setLiteralValue$4;
|
|
81495
81495
|
const {getPathAfterRequires} = getPathAfterRequires$1;
|
|
81496
81496
|
|
|
81497
81497
|
const {
|
|
81498
|
-
getProperty: getProperty$
|
|
81498
|
+
getProperty: getProperty$5,
|
|
81499
81499
|
getProperties,
|
|
81500
|
-
traverseProperties: traverseProperties$
|
|
81500
|
+
traverseProperties: traverseProperties$4,
|
|
81501
81501
|
} = properties;
|
|
81502
81502
|
|
|
81503
81503
|
const {getLiteralRaw} = getLiteralRaw$1;
|
|
@@ -81514,7 +81514,7 @@ const {
|
|
|
81514
81514
|
isImportDeclaration: isImportDeclaration$1,
|
|
81515
81515
|
isExportDeclaration: isExportDeclaration$4,
|
|
81516
81516
|
isStatement: isStatement$3,
|
|
81517
|
-
} = types$
|
|
81517
|
+
} = types$n;
|
|
81518
81518
|
|
|
81519
81519
|
operate.getBinding = getBinding;
|
|
81520
81520
|
operate.getBindingPath = getBindingPath;
|
|
@@ -81527,11 +81527,11 @@ operate.toExpression = toExpression;
|
|
|
81527
81527
|
operate.isSimple = isSimple$1;
|
|
81528
81528
|
operate.rename = rename;
|
|
81529
81529
|
operate.renameProperty = renameProperty;
|
|
81530
|
-
operate.setLiteralValue = setLiteralValue$
|
|
81530
|
+
operate.setLiteralValue = setLiteralValue$3;
|
|
81531
81531
|
|
|
81532
|
-
operate.getProperty = getProperty$
|
|
81532
|
+
operate.getProperty = getProperty$5;
|
|
81533
81533
|
operate.getProperties = getProperties;
|
|
81534
|
-
operate.traverseProperties = traverseProperties$
|
|
81534
|
+
operate.traverseProperties = traverseProperties$4;
|
|
81535
81535
|
|
|
81536
81536
|
operate.replaceWithMultiple = replaceWithMultiple;
|
|
81537
81537
|
|
|
@@ -81896,13 +81896,13 @@ newline.isCurrentNewLine = (path) => {
|
|
|
81896
81896
|
|
|
81897
81897
|
var indent = {};
|
|
81898
81898
|
|
|
81899
|
-
const {types: types$
|
|
81899
|
+
const {types: types$m} = bundle;
|
|
81900
81900
|
const {isIndented} = is$3;
|
|
81901
81901
|
|
|
81902
81902
|
const {
|
|
81903
81903
|
isStringLiteral: isStringLiteral$5,
|
|
81904
81904
|
isArrayExpression: isArrayExpression$1,
|
|
81905
|
-
} = types$
|
|
81905
|
+
} = types$m;
|
|
81906
81906
|
|
|
81907
81907
|
const isInsideArray$1 = (path) => path.parentPath.isArrayExpression();
|
|
81908
81908
|
|
|
@@ -81965,7 +81965,7 @@ isObjectAfterSimple$1.isObjectAfterSimple = (a) => {
|
|
|
81965
81965
|
return SIMPLE_TYPES.includes(type);
|
|
81966
81966
|
};
|
|
81967
81967
|
|
|
81968
|
-
const {types: types$
|
|
81968
|
+
const {types: types$l} = bundle;
|
|
81969
81969
|
const {
|
|
81970
81970
|
isCoupleLines: isCoupleLines$5,
|
|
81971
81971
|
isStringAndIdentifier,
|
|
@@ -81995,7 +81995,7 @@ const {
|
|
|
81995
81995
|
isStringLiteral: isStringLiteral$4,
|
|
81996
81996
|
isIdentifier: isIdentifier$5,
|
|
81997
81997
|
isFunction: isFunction$2,
|
|
81998
|
-
} = types$
|
|
81998
|
+
} = types$l;
|
|
81999
81999
|
|
|
82000
82000
|
const isNextString = (path) => isStringLiteral$4(path.getNextSibling());
|
|
82001
82001
|
const isPrevString = (path) => isStringLiteral$4(path.getPrevSibling());
|
|
@@ -82449,19 +82449,19 @@ staticBlock.StaticBlock = (path, {print, traverse}) => {
|
|
|
82449
82449
|
|
|
82450
82450
|
var recordExpression = {};
|
|
82451
82451
|
|
|
82452
|
-
const {ObjectExpression: ObjectExpression$
|
|
82452
|
+
const {ObjectExpression: ObjectExpression$5} = objectExpression;
|
|
82453
82453
|
|
|
82454
82454
|
recordExpression.RecordExpression = (path, operations, semantics) => {
|
|
82455
82455
|
const {write} = operations;
|
|
82456
82456
|
write('#');
|
|
82457
|
-
ObjectExpression$
|
|
82457
|
+
ObjectExpression$5(path, operations, semantics);
|
|
82458
82458
|
};
|
|
82459
82459
|
|
|
82460
82460
|
var tupleExpression = {};
|
|
82461
82461
|
|
|
82462
82462
|
var maybe = {};
|
|
82463
82463
|
|
|
82464
|
-
const isString$
|
|
82464
|
+
const isString$b = (a) => typeof a === 'string';
|
|
82465
82465
|
const constant = (a) => () => a;
|
|
82466
82466
|
const {keys: keys$3} = Object;
|
|
82467
82467
|
|
|
@@ -82487,7 +82487,7 @@ var rendy$1 = (template, values, modifiers) => {
|
|
|
82487
82487
|
};
|
|
82488
82488
|
|
|
82489
82489
|
function check$c(template, values) {
|
|
82490
|
-
if (!isString$
|
|
82490
|
+
if (!isString$b(template))
|
|
82491
82491
|
throw Error('template should be a string!');
|
|
82492
82492
|
|
|
82493
82493
|
if (typeof values !== 'object')
|
|
@@ -82549,7 +82549,7 @@ const rendy = rendy$1;
|
|
|
82549
82549
|
const maybeSatisfy = satisfy_1;
|
|
82550
82550
|
|
|
82551
82551
|
const {
|
|
82552
|
-
isProgram: isProgram$
|
|
82552
|
+
isProgram: isProgram$5,
|
|
82553
82553
|
isFile: isFile$1,
|
|
82554
82554
|
File,
|
|
82555
82555
|
ExpressionStatement: ExpressionStatement$2,
|
|
@@ -82571,7 +82571,7 @@ maybe.maybeThrow = (a, path, b) => {
|
|
|
82571
82571
|
|
|
82572
82572
|
const maybeStatement = (ast) => isStatement$2(ast) ? ast : ExpressionStatement$2(ast);
|
|
82573
82573
|
|
|
82574
|
-
const maybeProgram = (ast) => isProgram$
|
|
82574
|
+
const maybeProgram = (ast) => isProgram$5(ast) ? ast : Program$1([
|
|
82575
82575
|
maybeStatement(ast),
|
|
82576
82576
|
]);
|
|
82577
82577
|
|
|
@@ -82604,13 +82604,13 @@ function objectPlugin(plugin, path, printer, options) {
|
|
|
82604
82604
|
after(path, printer);
|
|
82605
82605
|
}
|
|
82606
82606
|
|
|
82607
|
-
const {ArrayExpression: ArrayExpression$
|
|
82607
|
+
const {ArrayExpression: ArrayExpression$6} = arrayExpression;
|
|
82608
82608
|
const {maybeVisitor: maybeVisitor$2} = maybe;
|
|
82609
82609
|
|
|
82610
82610
|
tupleExpression.TupleExpression = (path, operations, semantics) => {
|
|
82611
82611
|
const {write} = operations;
|
|
82612
82612
|
write('#');
|
|
82613
|
-
maybeVisitor$2(ArrayExpression$
|
|
82613
|
+
maybeVisitor$2(ArrayExpression$6, path, operations, semantics);
|
|
82614
82614
|
};
|
|
82615
82615
|
|
|
82616
82616
|
var importExpression = {};
|
|
@@ -82648,8 +82648,8 @@ const {
|
|
|
82648
82648
|
|
|
82649
82649
|
const {NewExpression} = newExpression;
|
|
82650
82650
|
|
|
82651
|
-
const {ObjectExpression: ObjectExpression$
|
|
82652
|
-
const {ObjectProperty: ObjectProperty$
|
|
82651
|
+
const {ObjectExpression: ObjectExpression$4} = objectExpression;
|
|
82652
|
+
const {ObjectProperty: ObjectProperty$5} = objectProperty;
|
|
82653
82653
|
const {ObjectPattern: ObjectPattern$1} = objectPattern;
|
|
82654
82654
|
|
|
82655
82655
|
const {
|
|
@@ -82660,7 +82660,7 @@ const {
|
|
|
82660
82660
|
} = classProperty;
|
|
82661
82661
|
|
|
82662
82662
|
const {AssignmentExpression} = assignmentExpression;
|
|
82663
|
-
const {ArrayExpression: ArrayExpression$
|
|
82663
|
+
const {ArrayExpression: ArrayExpression$5} = arrayExpression;
|
|
82664
82664
|
const {ArrayPattern} = arrayPattern;
|
|
82665
82665
|
const {AssignmentPattern} = assignmentPattern;
|
|
82666
82666
|
const {RestElement} = restElement;
|
|
@@ -82684,7 +82684,7 @@ var expressions$1 = {
|
|
|
82684
82684
|
...unaryExpressions,
|
|
82685
82685
|
...memberExpressions,
|
|
82686
82686
|
ArrayPattern,
|
|
82687
|
-
ArrayExpression: ArrayExpression$
|
|
82687
|
+
ArrayExpression: ArrayExpression$5,
|
|
82688
82688
|
AssignmentExpression,
|
|
82689
82689
|
AssignmentPattern,
|
|
82690
82690
|
BinaryExpression,
|
|
@@ -82698,8 +82698,8 @@ var expressions$1 = {
|
|
|
82698
82698
|
NewExpression,
|
|
82699
82699
|
LogicalExpression,
|
|
82700
82700
|
OptionalCallExpression,
|
|
82701
|
-
ObjectExpression: ObjectExpression$
|
|
82702
|
-
ObjectProperty: ObjectProperty$
|
|
82701
|
+
ObjectExpression: ObjectExpression$4,
|
|
82702
|
+
ObjectProperty: ObjectProperty$5,
|
|
82703
82703
|
ObjectPattern: ObjectPattern$1,
|
|
82704
82704
|
PrivateName: PrivateName$1,
|
|
82705
82705
|
RestElement,
|
|
@@ -84412,7 +84412,7 @@ const {TemplateLiteral} = templateLiteral;
|
|
|
84412
84412
|
const {Identifier: Identifier$2} = identifier;
|
|
84413
84413
|
|
|
84414
84414
|
const {Decorator} = decorator;
|
|
84415
|
-
const {StringLiteral: StringLiteral$
|
|
84415
|
+
const {StringLiteral: StringLiteral$7} = stringLiteral;
|
|
84416
84416
|
|
|
84417
84417
|
var literals$1 = {
|
|
84418
84418
|
Identifier: Identifier$2,
|
|
@@ -84443,7 +84443,7 @@ var literals$1 = {
|
|
|
84443
84443
|
BooleanLiteral(path, {write}) {
|
|
84444
84444
|
write(path.node.value);
|
|
84445
84445
|
},
|
|
84446
|
-
StringLiteral: StringLiteral$
|
|
84446
|
+
StringLiteral: StringLiteral$7,
|
|
84447
84447
|
RegExpLiteral(path, {print}) {
|
|
84448
84448
|
const {raw, pattern} = path.node;
|
|
84449
84449
|
print(raw || `/${pattern}/`);
|
|
@@ -84550,8 +84550,8 @@ tsTypeAliasDeclaration.TSTypeAliasDeclaration = {
|
|
|
84550
84550
|
|
|
84551
84551
|
var tsMappedType = {};
|
|
84552
84552
|
|
|
84553
|
-
const {types: types$
|
|
84554
|
-
const {isTSConditionalType} = types$
|
|
84553
|
+
const {types: types$k} = bundle;
|
|
84554
|
+
const {isTSConditionalType} = types$k;
|
|
84555
84555
|
|
|
84556
84556
|
tsMappedType.TSMappedType = (path, {print, indent, maybe}) => {
|
|
84557
84557
|
const {
|
|
@@ -85019,20 +85019,37 @@ tsTupleType.TSTupleType = (path, {write, traverse, indent, maybe}) => {
|
|
|
85019
85019
|
|
|
85020
85020
|
write('[');
|
|
85021
85021
|
indent.inc();
|
|
85022
|
-
maybe.write.newline(elementTypes.length);
|
|
85023
85022
|
|
|
85024
|
-
|
|
85025
|
-
|
|
85023
|
+
const isSame = isSameType(elementTypes);
|
|
85024
|
+
maybe.write.newline(isSame && elementTypes.length);
|
|
85025
|
+
const n = elementTypes.length - 1;
|
|
85026
|
+
|
|
85027
|
+
for (const [i, elementType] of elementTypes.entries()) {
|
|
85028
|
+
maybe.indent(isSame);
|
|
85026
85029
|
traverse(elementType);
|
|
85027
|
-
write(',');
|
|
85028
|
-
write.newline();
|
|
85030
|
+
maybe.write(i < n || isSame, ',');
|
|
85031
|
+
maybe.write.newline(isSame);
|
|
85032
|
+
maybe.write.space(i < n && !isSame);
|
|
85029
85033
|
}
|
|
85030
85034
|
|
|
85031
85035
|
indent.dec();
|
|
85032
|
-
indent();
|
|
85036
|
+
maybe.indent(isSame && elementTypes.length);
|
|
85033
85037
|
write(']');
|
|
85034
85038
|
};
|
|
85035
85039
|
|
|
85040
|
+
function isSameType(array) {
|
|
85041
|
+
let type;
|
|
85042
|
+
|
|
85043
|
+
for (const current of array) {
|
|
85044
|
+
if (type && current.type !== type)
|
|
85045
|
+
return false;
|
|
85046
|
+
|
|
85047
|
+
({type} = current);
|
|
85048
|
+
}
|
|
85049
|
+
|
|
85050
|
+
return true;
|
|
85051
|
+
}
|
|
85052
|
+
|
|
85036
85053
|
var tsNamedTupleMember = {};
|
|
85037
85054
|
|
|
85038
85055
|
tsNamedTupleMember.TSNamedTupleMember = (path, {print}) => {
|
|
@@ -85707,7 +85724,7 @@ function snakeCase(str) {
|
|
|
85707
85724
|
}
|
|
85708
85725
|
|
|
85709
85726
|
const {stringify: stringify$8} = JSON;
|
|
85710
|
-
const {TYPES: TYPES$2} = types$
|
|
85727
|
+
const {TYPES: TYPES$2} = types$x;
|
|
85711
85728
|
const toSnakeCase = justSnakeCase;
|
|
85712
85729
|
|
|
85713
85730
|
const {codeFrameColumns: codeFrameColumns$1} = bundle;
|
|
@@ -85875,10 +85892,10 @@ function initSemantics(semantics = {}) {
|
|
|
85875
85892
|
}
|
|
85876
85893
|
|
|
85877
85894
|
const {round} = Math;
|
|
85878
|
-
const fullstore$
|
|
85895
|
+
const fullstore$4 = fullstore$5;
|
|
85879
85896
|
const isObject$4 = (a) => a && typeof a === 'object';
|
|
85880
85897
|
const babelTraverse$2 = bundle.traverse;
|
|
85881
|
-
const {TYPES: TYPES$1} = types$
|
|
85898
|
+
const {TYPES: TYPES$1} = types$x;
|
|
85882
85899
|
const baseVisitors = visitors$1;
|
|
85883
85900
|
|
|
85884
85901
|
const {
|
|
@@ -85897,8 +85914,8 @@ const {
|
|
|
85897
85914
|
|
|
85898
85915
|
const {parseOverrides} = overrides;
|
|
85899
85916
|
|
|
85900
|
-
const isString$
|
|
85901
|
-
const {assign: assign$
|
|
85917
|
+
const isString$a = (a) => typeof a === 'string';
|
|
85918
|
+
const {assign: assign$c, freeze} = Object;
|
|
85902
85919
|
|
|
85903
85920
|
const GET = '__';
|
|
85904
85921
|
const get = (path, command) => path.get(command.replace(GET, ''));
|
|
@@ -85949,7 +85966,7 @@ tokenize$1.tokenize = (ast, overrides) => {
|
|
|
85949
85966
|
});
|
|
85950
85967
|
};
|
|
85951
85968
|
|
|
85952
|
-
assign$
|
|
85969
|
+
assign$c(indent, {
|
|
85953
85970
|
inc: incIndent,
|
|
85954
85971
|
dec: decIndent,
|
|
85955
85972
|
});
|
|
@@ -85999,7 +86016,7 @@ tokenize$1.tokenize = (ast, overrides) => {
|
|
|
85999
86016
|
});
|
|
86000
86017
|
};
|
|
86001
86018
|
|
|
86002
|
-
assign$
|
|
86019
|
+
assign$c(write, {
|
|
86003
86020
|
indent,
|
|
86004
86021
|
newline,
|
|
86005
86022
|
linebreak,
|
|
@@ -86010,7 +86027,7 @@ tokenize$1.tokenize = (ast, overrides) => {
|
|
|
86010
86027
|
endOfFile,
|
|
86011
86028
|
});
|
|
86012
86029
|
|
|
86013
|
-
assign$
|
|
86030
|
+
assign$c(maybeWrite, {
|
|
86014
86031
|
newline: maybeNewline,
|
|
86015
86032
|
breakline: maybeBreakline,
|
|
86016
86033
|
linebreak: maybeLinebreak,
|
|
@@ -86024,7 +86041,7 @@ tokenize$1.tokenize = (ast, overrides) => {
|
|
|
86024
86041
|
space: maybeSpace,
|
|
86025
86042
|
};
|
|
86026
86043
|
|
|
86027
|
-
assign$
|
|
86044
|
+
assign$c(maybe.indent, {
|
|
86028
86045
|
inc: maybeIndentInc,
|
|
86029
86046
|
dec: maybeIndentDec,
|
|
86030
86047
|
});
|
|
@@ -86037,7 +86054,7 @@ tokenize$1.tokenize = (ast, overrides) => {
|
|
|
86037
86054
|
traverse,
|
|
86038
86055
|
maybe,
|
|
86039
86056
|
quote,
|
|
86040
|
-
store: fullstore$
|
|
86057
|
+
store: fullstore$4(),
|
|
86041
86058
|
});
|
|
86042
86059
|
|
|
86043
86060
|
const currentTraversers = {
|
|
@@ -86067,7 +86084,7 @@ tokenize$1.tokenize = (ast, overrides) => {
|
|
|
86067
86084
|
traverse,
|
|
86068
86085
|
});
|
|
86069
86086
|
|
|
86070
|
-
assign$
|
|
86087
|
+
assign$c(print, write, {
|
|
86071
86088
|
space,
|
|
86072
86089
|
round,
|
|
86073
86090
|
});
|
|
@@ -86079,14 +86096,14 @@ tokenize$1.tokenize = (ast, overrides) => {
|
|
|
86079
86096
|
|
|
86080
86097
|
const maybePrint = (a, b) => a && print(b);
|
|
86081
86098
|
|
|
86082
|
-
assign$
|
|
86099
|
+
assign$c(maybePrint, {
|
|
86083
86100
|
newline: maybeNewline,
|
|
86084
86101
|
breakline: maybeBreakline,
|
|
86085
86102
|
linebreak: maybeLinebreak,
|
|
86086
86103
|
space: maybeSpace,
|
|
86087
86104
|
});
|
|
86088
86105
|
|
|
86089
|
-
assign$
|
|
86106
|
+
assign$c(printer.maybe, {
|
|
86090
86107
|
print: maybePrint,
|
|
86091
86108
|
});
|
|
86092
86109
|
|
|
@@ -86129,7 +86146,7 @@ const createPrint = (path, {traverse, write}) => (maybeLine) => {
|
|
|
86129
86146
|
};
|
|
86130
86147
|
|
|
86131
86148
|
const computePath = (path, maybeLine) => {
|
|
86132
|
-
if (isString$
|
|
86149
|
+
if (isString$a(maybeLine) && maybeLine.startsWith(GET))
|
|
86133
86150
|
return get(path, maybeLine);
|
|
86134
86151
|
|
|
86135
86152
|
if (isObject$4(maybeLine))
|
|
@@ -86347,9 +86364,9 @@ const putoutPrinter = printer;
|
|
|
86347
86364
|
const {generate: generate$5} = bundle;
|
|
86348
86365
|
|
|
86349
86366
|
const {stringify: stringify$7} = JSON;
|
|
86350
|
-
const {isArray: isArray$
|
|
86367
|
+
const {isArray: isArray$f} = Array;
|
|
86351
86368
|
|
|
86352
|
-
const maybeArray$
|
|
86369
|
+
const maybeArray$9 = (a) => isArray$f(a) ? a : [a, {}];
|
|
86353
86370
|
|
|
86354
86371
|
const btoa$1 = (a) => Buffer.from(a, 'binary').toString('base64');
|
|
86355
86372
|
|
|
@@ -86358,7 +86375,7 @@ const fixStrictMode = (a) => a.replace(`\n\n\n'use strict'`, `\n\n'use strict'`)
|
|
|
86358
86375
|
|
|
86359
86376
|
var print$4 = (ast, options = {}) => {
|
|
86360
86377
|
const {sourceMapName} = options;
|
|
86361
|
-
const [printer = 'putout', printerOptions] = maybeArray$
|
|
86378
|
+
const [printer = 'putout', printerOptions] = maybeArray$9(options.printer);
|
|
86362
86379
|
|
|
86363
86380
|
if (printer === 'recast') {
|
|
86364
86381
|
const printOptions = {
|
|
@@ -86402,7 +86419,7 @@ const {
|
|
|
86402
86419
|
ObjectMethod,
|
|
86403
86420
|
} = bundle.types;
|
|
86404
86421
|
|
|
86405
|
-
const {assign: assign$
|
|
86422
|
+
const {assign: assign$b} = Object;
|
|
86406
86423
|
|
|
86407
86424
|
var traverseObjectExpression$1 = (propertiesPaths) => {
|
|
86408
86425
|
for (const propPath of propertiesPaths) {
|
|
@@ -86416,7 +86433,7 @@ var traverseObjectExpression$1 = (propertiesPaths) => {
|
|
|
86416
86433
|
if (method && isFunctionExpression(value)) {
|
|
86417
86434
|
propPath.replaceWith(ObjectMethod('method', key, value.params, value.body, computed));
|
|
86418
86435
|
|
|
86419
|
-
assign$
|
|
86436
|
+
assign$b(propPath.node, {
|
|
86420
86437
|
id: null,
|
|
86421
86438
|
method: true,
|
|
86422
86439
|
generator: value.generator,
|
|
@@ -86445,7 +86462,7 @@ const {
|
|
|
86445
86462
|
Identifier: Identifier$1,
|
|
86446
86463
|
} = bundle.types;
|
|
86447
86464
|
|
|
86448
|
-
const {assign: assign$
|
|
86465
|
+
const {assign: assign$a} = Object;
|
|
86449
86466
|
|
|
86450
86467
|
var setClassMethod$1 = (path) => {
|
|
86451
86468
|
const {node} = path;
|
|
@@ -86473,7 +86490,7 @@ var setClassMethod$1 = (path) => {
|
|
|
86473
86490
|
});
|
|
86474
86491
|
|
|
86475
86492
|
path.replaceWith(method);
|
|
86476
|
-
assign$
|
|
86493
|
+
assign$a(path.node, {
|
|
86477
86494
|
loc,
|
|
86478
86495
|
expression,
|
|
86479
86496
|
generator,
|
|
@@ -86567,12 +86584,12 @@ var convertImportDeclaration$1 = (path) => {
|
|
|
86567
86584
|
path.node.attributes = attributes;
|
|
86568
86585
|
};
|
|
86569
86586
|
|
|
86570
|
-
const {assign: assign$
|
|
86587
|
+
const {assign: assign$9} = Object;
|
|
86571
86588
|
|
|
86572
86589
|
var convertExportDeclaration$1 = (path) => {
|
|
86573
86590
|
const {attributes = []} = path.node;
|
|
86574
86591
|
|
|
86575
|
-
assign$
|
|
86592
|
+
assign$9(path.node, {
|
|
86576
86593
|
attributes,
|
|
86577
86594
|
});
|
|
86578
86595
|
};
|
|
@@ -86701,7 +86718,7 @@ function getCommentGroup({trailing, leading}) {
|
|
|
86701
86718
|
return 'innerComments'; // Dangling comments, such as `[/* a */]`.
|
|
86702
86719
|
}
|
|
86703
86720
|
|
|
86704
|
-
const isString$
|
|
86721
|
+
const isString$9 = (a) => typeof a === 'string';
|
|
86705
86722
|
const isNumber$1 = (a) => typeof a === 'number';
|
|
86706
86723
|
const isNull = (a) => a === null;
|
|
86707
86724
|
const isBool$3 = (a) => typeof a === 'boolean';
|
|
@@ -86717,7 +86734,7 @@ var setLiteral$1 = (node) => {
|
|
|
86717
86734
|
return;
|
|
86718
86735
|
}
|
|
86719
86736
|
|
|
86720
|
-
if (isString$
|
|
86737
|
+
if (isString$9(value)) {
|
|
86721
86738
|
node.type = 'StringLiteral';
|
|
86722
86739
|
return;
|
|
86723
86740
|
}
|
|
@@ -86773,7 +86790,7 @@ var getAst = (node) => {
|
|
|
86773
86790
|
return ast;
|
|
86774
86791
|
};
|
|
86775
86792
|
|
|
86776
|
-
const {traverse: traverse$a, types: types$
|
|
86793
|
+
const {traverse: traverse$a, types: types$j} = bundle;
|
|
86777
86794
|
|
|
86778
86795
|
const traverseObjectExpression = traverseObjectExpression$1;
|
|
86779
86796
|
const setClassMethod = setClassMethod$1;
|
|
@@ -86799,7 +86816,7 @@ const getAST = getAst;
|
|
|
86799
86816
|
const {
|
|
86800
86817
|
isObjectExpression,
|
|
86801
86818
|
isExportDeclaration,
|
|
86802
|
-
} = types$
|
|
86819
|
+
} = types$j;
|
|
86803
86820
|
|
|
86804
86821
|
var estreeToBabel = (node) => {
|
|
86805
86822
|
const ast = getAST(node);
|
|
@@ -94381,7 +94398,7 @@ const options = options$1;
|
|
|
94381
94398
|
const getFlow = (a) => !a.indexOf('// @flow');
|
|
94382
94399
|
const clean = (a) => a.filter(Boolean);
|
|
94383
94400
|
const initBabel = once$6(() => bundle);
|
|
94384
|
-
const {assign: assign$
|
|
94401
|
+
const {assign: assign$8} = Object;
|
|
94385
94402
|
|
|
94386
94403
|
// There is a difference in options naming for babel and recast
|
|
94387
94404
|
// recast -> sourceFileName
|
|
@@ -94403,7 +94420,7 @@ babel$1.parse = function babelParse(source, {sourceFilename, isTS, isJSX = true,
|
|
|
94403
94420
|
]),
|
|
94404
94421
|
};
|
|
94405
94422
|
|
|
94406
|
-
sourceFilename && assign$
|
|
94423
|
+
sourceFilename && assign$8(parserOptions, {
|
|
94407
94424
|
sourceFilename,
|
|
94408
94425
|
});
|
|
94409
94426
|
|
|
@@ -107198,7 +107215,7 @@ function isAbsolute(path) {
|
|
|
107198
107215
|
}
|
|
107199
107216
|
|
|
107200
107217
|
// posix version
|
|
107201
|
-
function join$
|
|
107218
|
+
function join$5() {
|
|
107202
107219
|
var paths = Array.prototype.slice.call(arguments, 0);
|
|
107203
107220
|
return normalize(filter$1(paths, function(p, index) {
|
|
107204
107221
|
if (typeof p !== 'string') {
|
|
@@ -107273,7 +107290,7 @@ function dirname$1(path) {
|
|
|
107273
107290
|
return root + dir;
|
|
107274
107291
|
}
|
|
107275
107292
|
|
|
107276
|
-
function basename$
|
|
107293
|
+
function basename$5(path, ext) {
|
|
107277
107294
|
var f = splitPath(path)[2];
|
|
107278
107295
|
// TODO: make this comparison case-insensitive on windows?
|
|
107279
107296
|
if (ext && f.substr(-1 * ext.length) === ext) {
|
|
@@ -107288,12 +107305,12 @@ function extname(path) {
|
|
|
107288
107305
|
}
|
|
107289
107306
|
var _polyfillNode_path = {
|
|
107290
107307
|
extname: extname,
|
|
107291
|
-
basename: basename$
|
|
107308
|
+
basename: basename$5,
|
|
107292
107309
|
dirname: dirname$1,
|
|
107293
107310
|
sep: sep,
|
|
107294
107311
|
delimiter: delimiter,
|
|
107295
107312
|
relative: relative$1,
|
|
107296
|
-
join: join$
|
|
107313
|
+
join: join$5,
|
|
107297
107314
|
isAbsolute: isAbsolute,
|
|
107298
107315
|
normalize: normalize,
|
|
107299
107316
|
resolve: resolve
|
|
@@ -107318,13 +107335,13 @@ var substr = 'ab'.substr(-1) === 'b' ?
|
|
|
107318
107335
|
|
|
107319
107336
|
var _polyfillNode_path$1 = /*#__PURE__*/Object.freeze({
|
|
107320
107337
|
__proto__: null,
|
|
107321
|
-
basename: basename$
|
|
107338
|
+
basename: basename$5,
|
|
107322
107339
|
default: _polyfillNode_path,
|
|
107323
107340
|
delimiter: delimiter,
|
|
107324
107341
|
dirname: dirname$1,
|
|
107325
107342
|
extname: extname,
|
|
107326
107343
|
isAbsolute: isAbsolute,
|
|
107327
|
-
join: join$
|
|
107344
|
+
join: join$5,
|
|
107328
107345
|
normalize: normalize,
|
|
107329
107346
|
relative: relative$1,
|
|
107330
107347
|
resolve: resolve,
|
|
@@ -112423,7 +112440,7 @@ hermes$1.parse = function hermesParse(source) {
|
|
|
112423
112440
|
return parser.parse(source, options);
|
|
112424
112441
|
};
|
|
112425
112442
|
|
|
112426
|
-
var tryCatch$
|
|
112443
|
+
var tryCatch$8 = (fn, ...args) => {
|
|
112427
112444
|
try {
|
|
112428
112445
|
return [null, fn(...args)];
|
|
112429
112446
|
} catch(e) {
|
|
@@ -112431,11 +112448,11 @@ var tryCatch$9 = (fn, ...args) => {
|
|
|
112431
112448
|
}
|
|
112432
112449
|
};
|
|
112433
112450
|
|
|
112434
|
-
const tryCatch$
|
|
112451
|
+
const tryCatch$7 = tryCatch$8;
|
|
112435
112452
|
|
|
112436
112453
|
var secondChance$1 = (fn, source, messages, args) => {
|
|
112437
112454
|
const [a, ...others] = args;
|
|
112438
|
-
const [errorA, resultA] = tryCatch$
|
|
112455
|
+
const [errorA, resultA] = tryCatch$7(fn, source, a);
|
|
112439
112456
|
|
|
112440
112457
|
if (!errorA)
|
|
112441
112458
|
return resultA;
|
|
@@ -112444,7 +112461,7 @@ var secondChance$1 = (fn, source, messages, args) => {
|
|
|
112444
112461
|
throw errorA;
|
|
112445
112462
|
|
|
112446
112463
|
for (const b of others) {
|
|
112447
|
-
const [errorB, resultB] = tryCatch$
|
|
112464
|
+
const [errorB, resultB] = tryCatch$7(fn, source, b);
|
|
112448
112465
|
|
|
112449
112466
|
if (!errorB)
|
|
112450
112467
|
return resultB;
|
|
@@ -112533,13 +112550,13 @@ function customParse(source, {parser, isTS, isFlow, isJSX, isRecovery}) {
|
|
|
112533
112550
|
return commonjsRequire(parser).parse(source);
|
|
112534
112551
|
}
|
|
112535
112552
|
|
|
112536
|
-
const {types: types$
|
|
112553
|
+
const {types: types$i} = bundle;
|
|
112537
112554
|
const {
|
|
112538
|
-
StringLiteral: StringLiteral$
|
|
112555
|
+
StringLiteral: StringLiteral$6,
|
|
112539
112556
|
ExpressionStatement,
|
|
112540
|
-
} = types$
|
|
112557
|
+
} = types$i;
|
|
112541
112558
|
|
|
112542
|
-
const {assign: assign$
|
|
112559
|
+
const {assign: assign$7} = Object;
|
|
112543
112560
|
|
|
112544
112561
|
var moveOutDirectives$1 = (ast) => {
|
|
112545
112562
|
const {body, directives} = ast.program;
|
|
@@ -112552,7 +112569,7 @@ var moveOutDirectives$1 = (ast) => {
|
|
|
112552
112569
|
for (const directive of directives) {
|
|
112553
112570
|
const {leadingComments} = directive;
|
|
112554
112571
|
const {value} = directive.value;
|
|
112555
|
-
const expression = assign$
|
|
112572
|
+
const expression = assign$7(ExpressionStatement(StringLiteral$6(value)), {
|
|
112556
112573
|
leadingComments,
|
|
112557
112574
|
});
|
|
112558
112575
|
|
|
@@ -112876,9 +112893,9 @@ var require$$1 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_module$1);
|
|
|
112876
112893
|
|
|
112877
112894
|
const {createRequire} = require$$1;
|
|
112878
112895
|
|
|
112879
|
-
const tryCatch$
|
|
112896
|
+
const tryCatch$6 = tryCatch$8;
|
|
112880
112897
|
const once$1 = onceExports;
|
|
112881
|
-
const {assign: assign$
|
|
112898
|
+
const {assign: assign$6} = Object;
|
|
112882
112899
|
|
|
112883
112900
|
const bigFirst = (a) => `${a[0].toUpperCase()}${a.slice(1)}`;
|
|
112884
112901
|
|
|
@@ -112888,11 +112905,11 @@ const load = (type) => ({name, namespace}) => {
|
|
|
112888
112905
|
if (!pluginPath)
|
|
112889
112906
|
throw Error(`${bigFirst(type)} "${namespace}-${type}-${name}" could not be found!`);
|
|
112890
112907
|
|
|
112891
|
-
const [error, result] = tryCatch$
|
|
112908
|
+
const [error, result] = tryCatch$6(customRequire, pluginPath);
|
|
112892
112909
|
|
|
112893
112910
|
/* c8 ignore start */
|
|
112894
112911
|
if (error?.code === 'ERR_REQUIRE_ESM')
|
|
112895
|
-
assign$
|
|
112912
|
+
assign$6(error, {
|
|
112896
112913
|
message: `☝️ Looks like '${name}' is ESM, use 'await putoutAsync()' instead`,
|
|
112897
112914
|
name,
|
|
112898
112915
|
});
|
|
@@ -112940,12 +112957,12 @@ function getModulePath(name) {
|
|
|
112940
112957
|
const customRequire = createCustomRequire();
|
|
112941
112958
|
const putoutRequire = createPutoutRequire();
|
|
112942
112959
|
|
|
112943
|
-
[, path] = tryCatch$
|
|
112960
|
+
[, path] = tryCatch$6(putoutRequire.resolve, name);
|
|
112944
112961
|
|
|
112945
112962
|
if (path)
|
|
112946
112963
|
return [path, putoutRequire];
|
|
112947
112964
|
|
|
112948
|
-
[, path] = tryCatch$
|
|
112965
|
+
[, path] = tryCatch$6(customRequire.resolve, name);
|
|
112949
112966
|
|
|
112950
112967
|
return [path, customRequire];
|
|
112951
112968
|
}
|
|
@@ -112979,7 +112996,7 @@ const {nanomemoize} = require$$0$1;
|
|
|
112979
112996
|
const tryToCatch = tryToCatch$1;
|
|
112980
112997
|
const {simpleImport} = simpleImport$1;
|
|
112981
112998
|
|
|
112982
|
-
const {assign: assign$
|
|
112999
|
+
const {assign: assign$5} = Object;
|
|
112983
113000
|
const stub$2 = () => () => {};
|
|
112984
113001
|
|
|
112985
113002
|
asyncLoader.createAsyncLoader = (type) => nanomemoize(async (name, load) => {
|
|
@@ -113008,14 +113025,14 @@ async function cleverLoad(names, load = simpleImport) {
|
|
|
113008
113025
|
if (e.code === 'ERR_MODULE_NOT_FOUND')
|
|
113009
113026
|
continue;
|
|
113010
113027
|
|
|
113011
|
-
assign$
|
|
113028
|
+
assign$5(e, {
|
|
113012
113029
|
message: `${name}: ${e.message}`,
|
|
113013
113030
|
});
|
|
113014
113031
|
|
|
113015
113032
|
throw e;
|
|
113016
113033
|
}
|
|
113017
113034
|
|
|
113018
|
-
assign$
|
|
113035
|
+
assign$5(e, {
|
|
113019
113036
|
message: e.message.replace(/\simported.*/, ''),
|
|
113020
113037
|
});
|
|
113021
113038
|
|
|
@@ -113025,7 +113042,7 @@ async function cleverLoad(names, load = simpleImport) {
|
|
|
113025
113042
|
var parsePluginNames$2 = {};
|
|
113026
113043
|
|
|
113027
113044
|
const isStr$4 = (a) => typeof a === 'string';
|
|
113028
|
-
const {isArray: isArray$
|
|
113045
|
+
const {isArray: isArray$e} = Array;
|
|
113029
113046
|
const {entries: entries$9} = Object;
|
|
113030
113047
|
|
|
113031
113048
|
parsePluginNames$2.parsePluginNames = (plugins) => {
|
|
@@ -113037,7 +113054,7 @@ parsePluginNames$2.parsePluginNames = (plugins) => {
|
|
|
113037
113054
|
continue;
|
|
113038
113055
|
}
|
|
113039
113056
|
|
|
113040
|
-
if (isArray$
|
|
113057
|
+
if (isArray$e(plugin)) {
|
|
113041
113058
|
const [pluginName, fn] = plugin;
|
|
113042
113059
|
result.push([pluginName, fn]);
|
|
113043
113060
|
continue;
|
|
@@ -113050,7 +113067,7 @@ parsePluginNames$2.parsePluginNames = (plugins) => {
|
|
|
113050
113067
|
};
|
|
113051
113068
|
|
|
113052
113069
|
const isStr$3 = (a) => typeof a === 'string';
|
|
113053
|
-
const {isArray: isArray$
|
|
113070
|
+
const {isArray: isArray$d} = Array;
|
|
113054
113071
|
|
|
113055
113072
|
const isOn = (a) => a === 'on';
|
|
113056
113073
|
const isOff = (a) => a === 'off';
|
|
@@ -113064,7 +113081,7 @@ var parseProcessorNames$1 = (plugins) => {
|
|
|
113064
113081
|
continue;
|
|
113065
113082
|
}
|
|
113066
113083
|
|
|
113067
|
-
if (isArray$
|
|
113084
|
+
if (isArray$d(plugin)) {
|
|
113068
113085
|
const [pluginName, fn] = plugin;
|
|
113069
113086
|
|
|
113070
113087
|
if (isOff(fn))
|
|
@@ -113109,7 +113126,7 @@ var loadPluginsAsync$1 = {};
|
|
|
113109
113126
|
|
|
113110
113127
|
var parseRules$3 = {};
|
|
113111
113128
|
|
|
113112
|
-
const {isArray: isArray$
|
|
113129
|
+
const {isArray: isArray$c} = Array;
|
|
113113
113130
|
const isBool$2 = (a) => typeof a === 'boolean';
|
|
113114
113131
|
const isStr$2 = (a) => typeof a === 'string';
|
|
113115
113132
|
const isObj$1 = (a) => typeof a === 'object';
|
|
@@ -113163,7 +113180,7 @@ parseRules$3.parseRules = (rules) => {
|
|
|
113163
113180
|
continue;
|
|
113164
113181
|
}
|
|
113165
113182
|
|
|
113166
|
-
const looksLikeArray = isArray$
|
|
113183
|
+
const looksLikeArray = isArray$c(value);
|
|
113167
113184
|
const looksLikeNormalArray = looksLikeArray && value.length;
|
|
113168
113185
|
|
|
113169
113186
|
if (looksLikeNormalArray) {
|
|
@@ -113365,8 +113382,8 @@ var filterEnabledPlugins$2 = {};
|
|
|
113365
113382
|
|
|
113366
113383
|
const {isEnabled: isEnabled$2, mergeRules} = rules;
|
|
113367
113384
|
|
|
113368
|
-
const {isArray: isArray$
|
|
113369
|
-
const maybeTuple = (a) => isArray$
|
|
113385
|
+
const {isArray: isArray$b} = Array;
|
|
113386
|
+
const maybeTuple = (a) => isArray$b(a) ? a : ['on', a];
|
|
113370
113387
|
|
|
113371
113388
|
// Would be great to have ability to filter
|
|
113372
113389
|
// disabled plugins and prevent them from loading
|
|
@@ -113408,7 +113425,7 @@ function isExectRuleEnabled(name, status, rules) {
|
|
|
113408
113425
|
|
|
113409
113426
|
var check$9 = {};
|
|
113410
113427
|
|
|
113411
|
-
const isString$
|
|
113428
|
+
const isString$8 = (a) => typeof a === 'string';
|
|
113412
113429
|
|
|
113413
113430
|
check$9.check = (options) => {
|
|
113414
113431
|
if (!options || typeof options !== 'object')
|
|
@@ -113416,11 +113433,11 @@ check$9.check = (options) => {
|
|
|
113416
113433
|
};
|
|
113417
113434
|
|
|
113418
113435
|
check$9.checkRule = (rule) => {
|
|
113419
|
-
if (!isString$
|
|
113436
|
+
if (!isString$8(rule))
|
|
113420
113437
|
throw Error(`☝️ Looks like plugin name type is not 'string', but: '${typeof rule}'`);
|
|
113421
113438
|
};
|
|
113422
113439
|
|
|
113423
|
-
const {basename: basename$
|
|
113440
|
+
const {basename: basename$4} = require$$0$2;
|
|
113424
113441
|
|
|
113425
113442
|
const {
|
|
113426
113443
|
parseRules: parseRules$1,
|
|
@@ -113515,7 +113532,7 @@ function extendRules$1(rule, plugin) {
|
|
|
113515
113532
|
|
|
113516
113533
|
function parseRuleName(rule) {
|
|
113517
113534
|
if (rule.startsWith('import:')) {
|
|
113518
|
-
const shortName = basename$
|
|
113535
|
+
const shortName = basename$4(rule.replace('import:', ''));
|
|
113519
113536
|
|
|
113520
113537
|
return shortName.replace('plugin-', '');
|
|
113521
113538
|
}
|
|
@@ -113539,7 +113556,7 @@ const {
|
|
|
113539
113556
|
|
|
113540
113557
|
const {filterEnabledPlugins} = filterEnabledPlugins$2;
|
|
113541
113558
|
const {check: check$7, checkRule} = check$9;
|
|
113542
|
-
const {isArray: isArray$
|
|
113559
|
+
const {isArray: isArray$a} = Array;
|
|
113543
113560
|
|
|
113544
113561
|
lib$1.loadPluginsAsync = loadPluginsAsync;
|
|
113545
113562
|
lib$1.loadProcessorsAsync = async (options, load) => {
|
|
@@ -113607,7 +113624,7 @@ function parseRule(rule) {
|
|
|
113607
113624
|
.replace('@putout/plugin-', '');
|
|
113608
113625
|
}
|
|
113609
113626
|
|
|
113610
|
-
const maybeFromTuple = (a) => isArray$
|
|
113627
|
+
const maybeFromTuple = (a) => isArray$a(a) ? a[1] : a;
|
|
113611
113628
|
|
|
113612
113629
|
function loadPlugins({items, loadedRules}) {
|
|
113613
113630
|
const plugins = [];
|
|
@@ -114378,7 +114395,7 @@ var common = setup;
|
|
|
114378
114395
|
var browserExports = browser.exports;
|
|
114379
114396
|
browserExports.default;
|
|
114380
114397
|
|
|
114381
|
-
const tryCatch$
|
|
114398
|
+
const tryCatch$5 = tryCatch$8;
|
|
114382
114399
|
const debug$4 = browserExports('putout:runner:fix');
|
|
114383
114400
|
const {enabled} = debug$4;
|
|
114384
114401
|
const {stringify: stringify$5} = JSON;
|
|
@@ -114402,7 +114419,7 @@ const chooseFixArgs = ({path, pathOptions, options}) => {
|
|
|
114402
114419
|
};
|
|
114403
114420
|
|
|
114404
114421
|
const tryToFix = (fix, {path, pathOptions, position, options}) => {
|
|
114405
|
-
const [e] = tryCatch$
|
|
114422
|
+
const [e] = tryCatch$5(fix, ...chooseFixArgs({
|
|
114406
114423
|
path,
|
|
114407
114424
|
pathOptions,
|
|
114408
114425
|
options,
|
|
@@ -114477,14 +114494,14 @@ function validatePath(path) {
|
|
|
114477
114494
|
throw Error(`☝️ Looks like 'push' called without a 'path' argument.`);
|
|
114478
114495
|
}
|
|
114479
114496
|
|
|
114480
|
-
const {isArray: isArray$
|
|
114481
|
-
const maybeArray$
|
|
114497
|
+
const {isArray: isArray$9} = Array;
|
|
114498
|
+
const maybeArray$8 = (a) => isArray$9(a) ? a : [a];
|
|
114482
114499
|
|
|
114483
114500
|
var maybeArray_1 = (a) => {
|
|
114484
114501
|
if (!a)
|
|
114485
114502
|
return [];
|
|
114486
114503
|
|
|
114487
|
-
return maybeArray$
|
|
114504
|
+
return maybeArray$8(a);
|
|
114488
114505
|
};
|
|
114489
114506
|
|
|
114490
114507
|
var validate$2 = {};
|
|
@@ -114502,7 +114519,7 @@ var store = {};
|
|
|
114502
114519
|
const {
|
|
114503
114520
|
values,
|
|
114504
114521
|
entries: entries$7,
|
|
114505
|
-
assign: assign$
|
|
114522
|
+
assign: assign$4,
|
|
114506
114523
|
} = Object;
|
|
114507
114524
|
|
|
114508
114525
|
const toArray = (a) => Array.from(a);
|
|
@@ -114528,7 +114545,7 @@ store.upStore = createStore({
|
|
|
114528
114545
|
},
|
|
114529
114546
|
set(map, name, data) {
|
|
114530
114547
|
map[name] = map[name] || {};
|
|
114531
|
-
assign$
|
|
114548
|
+
assign$4(map[name], data);
|
|
114532
114549
|
},
|
|
114533
114550
|
});
|
|
114534
114551
|
|
|
@@ -114593,7 +114610,7 @@ const {generate: generate$2} = parser$6;
|
|
|
114593
114610
|
|
|
114594
114611
|
const runFix$2 = runFix$3;
|
|
114595
114612
|
const {getPosition: getPosition$1} = getPosition$2;
|
|
114596
|
-
const maybeArray$
|
|
114613
|
+
const maybeArray$7 = maybeArray_1;
|
|
114597
114614
|
const {validate: validate$1} = validate$2;
|
|
114598
114615
|
|
|
114599
114616
|
const {
|
|
@@ -114607,18 +114624,18 @@ const {
|
|
|
114607
114624
|
const shouldSkip = (a) => !a.parent;
|
|
114608
114625
|
const {merge: merge$2} = traverse$9.visitors;
|
|
114609
114626
|
|
|
114610
|
-
const {assign: assign$
|
|
114627
|
+
const {assign: assign$3} = Object;
|
|
114611
114628
|
|
|
114612
114629
|
const parse$3 = (name, plugin, options) => {
|
|
114613
114630
|
const list = [];
|
|
114614
114631
|
|
|
114615
114632
|
if (plugin[name]) {
|
|
114616
114633
|
validate$1(name, plugin[name]);
|
|
114617
|
-
list.push(...maybeArray$
|
|
114634
|
+
list.push(...maybeArray$7(plugin[name]()));
|
|
114618
114635
|
}
|
|
114619
114636
|
|
|
114620
114637
|
if (options[name])
|
|
114621
|
-
list.push(...maybeArray$
|
|
114638
|
+
list.push(...maybeArray$7(options[name]));
|
|
114622
114639
|
|
|
114623
114640
|
return list;
|
|
114624
114641
|
};
|
|
@@ -114660,7 +114677,7 @@ var mergeVisitors$1 = (pluginsToMerge, {fix, shebang, template}) => {
|
|
|
114660
114677
|
if (!visitor)
|
|
114661
114678
|
throw Error(`☝️ Visitors cannot be empty in "${rule}"`);
|
|
114662
114679
|
|
|
114663
|
-
assign$
|
|
114680
|
+
assign$3(options, {
|
|
114664
114681
|
include: parse$3('include', plugin, options),
|
|
114665
114682
|
exclude: parse$3('exclude', plugin, options),
|
|
114666
114683
|
});
|
|
@@ -114734,7 +114751,7 @@ function getStore(plugin, {fix, rule, shebang, msg, options}) {
|
|
|
114734
114751
|
|
|
114735
114752
|
mergeVisitors$1.default;
|
|
114736
114753
|
|
|
114737
|
-
const {traverse: babelTraverse$1, types: types$
|
|
114754
|
+
const {traverse: babelTraverse$1, types: types$h} = bundle;
|
|
114738
114755
|
|
|
114739
114756
|
const {generate: generate$1} = parser$6;
|
|
114740
114757
|
const {merge: merge$1} = babelTraverse$1.visitors;
|
|
@@ -114753,7 +114770,7 @@ var superFind$1 = function superFind({rule, find, ast, options, template}) {
|
|
|
114753
114770
|
template,
|
|
114754
114771
|
}),
|
|
114755
114772
|
generate: generate$1,
|
|
114756
|
-
types: types$
|
|
114773
|
+
types: types$h,
|
|
114757
114774
|
push,
|
|
114758
114775
|
options,
|
|
114759
114776
|
});
|
|
@@ -114777,7 +114794,7 @@ function traverse$8({rule, options, template}) {
|
|
|
114777
114794
|
}
|
|
114778
114795
|
|
|
114779
114796
|
const log$5 = browserExports('putout:runner:include');
|
|
114780
|
-
const maybeArray$
|
|
114797
|
+
const maybeArray$6 = maybeArray_1;
|
|
114781
114798
|
const {validate} = validate$2;
|
|
114782
114799
|
|
|
114783
114800
|
const stub$1 = () => [];
|
|
@@ -114804,7 +114821,7 @@ var include$2 = ({rule, plugin, msg, options}) => {
|
|
|
114804
114821
|
...options,
|
|
114805
114822
|
exclude: [
|
|
114806
114823
|
...exclude(),
|
|
114807
|
-
...maybeArray$
|
|
114824
|
+
...maybeArray$6(options.exclude),
|
|
114808
114825
|
],
|
|
114809
114826
|
},
|
|
114810
114827
|
plugin: {
|
|
@@ -114933,7 +114950,7 @@ function check$5(selector) {
|
|
|
114933
114950
|
var is$2 = {};
|
|
114934
114951
|
|
|
114935
114952
|
const {template: template$8} = parser$6;
|
|
114936
|
-
const {types: types$
|
|
114953
|
+
const {types: types$g} = bundle;
|
|
114937
114954
|
const {
|
|
114938
114955
|
isBlockStatement: isBlockStatement$1,
|
|
114939
114956
|
isBooleanLiteral,
|
|
@@ -114949,7 +114966,7 @@ const {
|
|
|
114949
114966
|
isJSXAttribute,
|
|
114950
114967
|
isTSTypeReference: isTSTypeReference$1,
|
|
114951
114968
|
isTSTypeParameterDeclaration,
|
|
114952
|
-
} = types$
|
|
114969
|
+
} = types$g;
|
|
114953
114970
|
|
|
114954
114971
|
const isStr$1 = (a) => typeof a === 'string';
|
|
114955
114972
|
|
|
@@ -115059,7 +115076,7 @@ const isBool$1 = (a, b) => {
|
|
|
115059
115076
|
};
|
|
115060
115077
|
|
|
115061
115078
|
const isEqualType$1 = (a, b) => a.type === b.type;
|
|
115062
|
-
const {isArray: isArray$
|
|
115079
|
+
const {isArray: isArray$8} = Array;
|
|
115063
115080
|
|
|
115064
115081
|
is$2.isId = isId$1;
|
|
115065
115082
|
is$2.isBool = isBool$1;
|
|
@@ -115082,7 +115099,7 @@ is$2.isAnyLiteral = (a, b) => {
|
|
|
115082
115099
|
};
|
|
115083
115100
|
|
|
115084
115101
|
is$2.isArgs = (a) => {
|
|
115085
|
-
const b = !isArray$
|
|
115102
|
+
const b = !isArray$8(a) ? a : a[0];
|
|
115086
115103
|
|
|
115087
115104
|
return isIdentifier$3(b, {
|
|
115088
115105
|
name: ARGS,
|
|
@@ -115112,12 +115129,12 @@ is$2.isEqualTypeParams = (a, b) => {
|
|
|
115112
115129
|
};
|
|
115113
115130
|
|
|
115114
115131
|
is$2.isLinkedArgs = (a) => {
|
|
115115
|
-
const b = !isArray$
|
|
115132
|
+
const b = !isArray$8(a) ? a : a[0];
|
|
115116
115133
|
return isIdentifier$3(b) && LINKED_ARGS.test(b.name);
|
|
115117
115134
|
};
|
|
115118
115135
|
|
|
115119
115136
|
is$2.isJSXChildren = (a) => {
|
|
115120
|
-
const b = !isArray$
|
|
115137
|
+
const b = !isArray$8(a) ? a : a[0];
|
|
115121
115138
|
|
|
115122
115139
|
return isJSXText$1(b, {
|
|
115123
115140
|
value: JSX_CHILDREN,
|
|
@@ -115125,7 +115142,7 @@ is$2.isJSXChildren = (a) => {
|
|
|
115125
115142
|
};
|
|
115126
115143
|
|
|
115127
115144
|
is$2.isJSXAttributes = (a) => {
|
|
115128
|
-
const b = !isArray$
|
|
115145
|
+
const b = !isArray$8(a) ? a : a[0];
|
|
115129
115146
|
|
|
115130
115147
|
if (!isJSXAttribute(b))
|
|
115131
115148
|
return false;
|
|
@@ -115157,27 +115174,27 @@ is$2.isLinkedRegExp = (a, b) => {
|
|
|
115157
115174
|
};
|
|
115158
115175
|
|
|
115159
115176
|
is$2.isPath = (path) => Boolean(path.node);
|
|
115160
|
-
is$2.isArray = isArray$
|
|
115177
|
+
is$2.isArray = isArray$8;
|
|
115161
115178
|
|
|
115162
115179
|
is$2.isObject = (a) => {
|
|
115163
115180
|
if (!a)
|
|
115164
115181
|
return false;
|
|
115165
115182
|
|
|
115166
|
-
if (isArray$
|
|
115183
|
+
if (isArray$8(a))
|
|
115167
115184
|
return false;
|
|
115168
115185
|
|
|
115169
115186
|
return typeof a === 'object';
|
|
115170
115187
|
};
|
|
115171
115188
|
|
|
115172
115189
|
is$2.isArrays = (a, b) => {
|
|
115173
|
-
if (!isArray$
|
|
115190
|
+
if (!isArray$8(a) || !isArray$8(b))
|
|
115174
115191
|
return false;
|
|
115175
115192
|
|
|
115176
115193
|
return a.length === b.length;
|
|
115177
115194
|
};
|
|
115178
115195
|
|
|
115179
115196
|
is$2.isImports = (a) => {
|
|
115180
|
-
const b = !isArray$
|
|
115197
|
+
const b = !isArray$8(a) ? a : a[0];
|
|
115181
115198
|
|
|
115182
115199
|
if (!isImportDefaultSpecifier(b))
|
|
115183
115200
|
return false;
|
|
@@ -115188,7 +115205,7 @@ is$2.isImports = (a) => {
|
|
|
115188
115205
|
};
|
|
115189
115206
|
|
|
115190
115207
|
is$2.isExports = (a) => {
|
|
115191
|
-
const b = !isArray$
|
|
115208
|
+
const b = !isArray$8(a) ? a : a[0];
|
|
115192
115209
|
|
|
115193
115210
|
if (!isExportSpecifier(b))
|
|
115194
115211
|
return false;
|
|
@@ -115292,7 +115309,7 @@ is$2.isInsideTypeReference = (path) => path.isIdentifier() && path.parentPath?.i
|
|
|
115292
115309
|
|
|
115293
115310
|
const jessy = jessy$1;
|
|
115294
115311
|
const nessy = nessy$1;
|
|
115295
|
-
const {traverse: traverse$7, types: types$
|
|
115312
|
+
const {traverse: traverse$7, types: types$f} = bundle;
|
|
115296
115313
|
const {template: template$7} = parser$6;
|
|
115297
115314
|
|
|
115298
115315
|
const {replaceWith: replaceWith$3, extract} = operate;
|
|
@@ -115316,13 +115333,13 @@ const {
|
|
|
115316
115333
|
isStringLiteral: isStringLiteral$3,
|
|
115317
115334
|
isTemplateLiteral: isTemplateLiteral$1,
|
|
115318
115335
|
TemplateElement,
|
|
115319
|
-
} = types$
|
|
115336
|
+
} = types$f;
|
|
115320
115337
|
|
|
115321
115338
|
const {extractExpression: extractExpression$1} = template$7;
|
|
115322
115339
|
|
|
115323
115340
|
const {entries: entries$6} = Object;
|
|
115324
115341
|
const isNumber = (a) => typeof a === 'number';
|
|
115325
|
-
const isString$
|
|
115342
|
+
const isString$7 = (a) => typeof a === 'string';
|
|
115326
115343
|
|
|
115327
115344
|
const parseNode$1 = (a) => a.node || a;
|
|
115328
115345
|
const {stringify: stringify$3} = JSON;
|
|
@@ -115330,7 +115347,7 @@ const {stringify: stringify$3} = JSON;
|
|
|
115330
115347
|
const BODY_AND_CLASS_REG = /\.body\.0(\.key)?$/;
|
|
115331
115348
|
|
|
115332
115349
|
vars.getTemplateValues = (node, str) => {
|
|
115333
|
-
if (!isString$
|
|
115350
|
+
if (!isString$7(str))
|
|
115334
115351
|
throw Error(`☝️ Looks like argument 'template' of 'getTemplateValues(node, template)': is not a string, but '${stringify$3(str)}'`);
|
|
115335
115352
|
|
|
115336
115353
|
node = parseNode$1(node);
|
|
@@ -115469,7 +115486,7 @@ var log$4 = {exports: {}};
|
|
|
115469
115486
|
|
|
115470
115487
|
const debug$3 = browserExports('putout:compare');
|
|
115471
115488
|
|
|
115472
|
-
const {isArray: isArray$
|
|
115489
|
+
const {isArray: isArray$7} = Array;
|
|
115473
115490
|
const isObject$2 = (a) => a && typeof a === 'object';
|
|
115474
115491
|
|
|
115475
115492
|
log$4.exports = (a, b) => {
|
|
@@ -115484,7 +115501,7 @@ log$4.exports = (a, b) => {
|
|
|
115484
115501
|
|
|
115485
115502
|
log$4.exports._parseValue = parseValue;
|
|
115486
115503
|
function parseValue(a) {
|
|
115487
|
-
if (isArray$
|
|
115504
|
+
if (isArray$7(a) && a[0]) {
|
|
115488
115505
|
const [{
|
|
115489
115506
|
type,
|
|
115490
115507
|
name,
|
|
@@ -115509,14 +115526,14 @@ function parseValue(a) {
|
|
|
115509
115526
|
|
|
115510
115527
|
var logExports = log$4.exports;
|
|
115511
115528
|
|
|
115512
|
-
const {types: types$
|
|
115529
|
+
const {types: types$e} = bundle;
|
|
115513
115530
|
const {
|
|
115514
115531
|
isIdentifier: isIdentifier$1,
|
|
115515
115532
|
isLiteral,
|
|
115516
115533
|
isStringLiteral: isStringLiteral$2,
|
|
115517
115534
|
isTemplateElement: isTemplateElement$1,
|
|
115518
115535
|
isTSTypeReference,
|
|
115519
|
-
} = types$
|
|
115536
|
+
} = types$e;
|
|
115520
115537
|
|
|
115521
115538
|
const parseName = (node) => {
|
|
115522
115539
|
node = node[0] || node;
|
|
@@ -115585,13 +115602,13 @@ const {
|
|
|
115585
115602
|
isLinkedRegExp: isLinkedRegExp$1,
|
|
115586
115603
|
} = is$2;
|
|
115587
115604
|
|
|
115588
|
-
const {types: types$
|
|
115605
|
+
const {types: types$d} = bundle;
|
|
115589
115606
|
const {
|
|
115590
115607
|
isClassBody,
|
|
115591
115608
|
isBlock,
|
|
115592
115609
|
isJSXText,
|
|
115593
115610
|
isTemplateElement,
|
|
115594
|
-
} = types$
|
|
115611
|
+
} = types$d;
|
|
115595
115612
|
|
|
115596
115613
|
const isEmptyBlock = (a) => isBlock(a) && !a.body.length;
|
|
115597
115614
|
const isPrimitive = (a) => typeof a !== 'object' || a === null;
|
|
@@ -115700,7 +115717,7 @@ function compareJSXTexts(node, template) {
|
|
|
115700
115717
|
|
|
115701
115718
|
var topLevelComparators = {};
|
|
115702
115719
|
|
|
115703
|
-
const {types: types$
|
|
115720
|
+
const {types: types$c} = bundle;
|
|
115704
115721
|
const {
|
|
115705
115722
|
isEqualBody,
|
|
115706
115723
|
isEqualAnyObject,
|
|
@@ -115714,7 +115731,7 @@ const {
|
|
|
115714
115731
|
const {
|
|
115715
115732
|
isIdentifier,
|
|
115716
115733
|
isStringLiteral: isStringLiteral$1,
|
|
115717
|
-
} = types$
|
|
115734
|
+
} = types$c;
|
|
115718
115735
|
|
|
115719
115736
|
const comparators = [
|
|
115720
115737
|
isEqualAnyObject,
|
|
@@ -115772,13 +115789,13 @@ const {
|
|
|
115772
115789
|
const {extractExpression} = template$6;
|
|
115773
115790
|
|
|
115774
115791
|
const {keys: keys$2} = Object;
|
|
115775
|
-
const {isArray: isArray$
|
|
115776
|
-
const noop$
|
|
115777
|
-
const isEmptyArray = (a) => isArray$
|
|
115792
|
+
const {isArray: isArray$6} = Array;
|
|
115793
|
+
const noop$4 = () => {};
|
|
115794
|
+
const isEmptyArray = (a) => isArray$6(a) && !a.length;
|
|
115778
115795
|
|
|
115779
115796
|
const compareType = (type) => (path) => path.type === type;
|
|
115780
115797
|
const superPush = (array) => (a, b) => array.push([a, b]);
|
|
115781
|
-
const maybeArray$
|
|
115798
|
+
const maybeArray$5 = (a) => isArray$6(a) ? a : [a];
|
|
115782
115799
|
|
|
115783
115800
|
const findParent = (path, type) => {
|
|
115784
115801
|
const newPathNode = path.findParent(compareType(type));
|
|
@@ -115808,7 +115825,7 @@ compare$5.getValues = getValues$1;
|
|
|
115808
115825
|
compare$5.setValues = setValues$1;
|
|
115809
115826
|
compare$5.getTemplateValues = getTemplateValues$1;
|
|
115810
115827
|
|
|
115811
|
-
function compare$4(path, template, options = {}, equal = noop$
|
|
115828
|
+
function compare$4(path, template, options = {}, equal = noop$4) {
|
|
115812
115829
|
const {findUp = true} = options;
|
|
115813
115830
|
|
|
115814
115831
|
if (!path && !template)
|
|
@@ -115842,7 +115859,7 @@ function compare$4(path, template, options = {}, equal = noop$5) {
|
|
|
115842
115859
|
}
|
|
115843
115860
|
|
|
115844
115861
|
compare$5.compareAny = (path, templateNodes, options) => {
|
|
115845
|
-
templateNodes = maybeArray$
|
|
115862
|
+
templateNodes = maybeArray$5(templateNodes);
|
|
115846
115863
|
|
|
115847
115864
|
for (const template of templateNodes) {
|
|
115848
115865
|
if (compare$4(path, template, options))
|
|
@@ -115853,7 +115870,7 @@ compare$5.compareAny = (path, templateNodes, options) => {
|
|
|
115853
115870
|
};
|
|
115854
115871
|
|
|
115855
115872
|
compare$5.compareAll = (path, templateNodes, options) => {
|
|
115856
|
-
templateNodes = maybeArray$
|
|
115873
|
+
templateNodes = maybeArray$5(templateNodes);
|
|
115857
115874
|
|
|
115858
115875
|
for (const template of templateNodes) {
|
|
115859
115876
|
if (!compare$4(path, template, options))
|
|
@@ -115934,7 +115951,7 @@ function check$3(fn) {
|
|
|
115934
115951
|
}
|
|
115935
115952
|
|
|
115936
115953
|
const {entries: entries$5} = Object;
|
|
115937
|
-
const {isArray: isArray$
|
|
115954
|
+
const {isArray: isArray$5} = Array;
|
|
115938
115955
|
|
|
115939
115956
|
var findPath$1 = (parentPath) => {
|
|
115940
115957
|
let current = {
|
|
@@ -115953,7 +115970,7 @@ function findKey(path, parent) {
|
|
|
115953
115970
|
const {node} = path;
|
|
115954
115971
|
|
|
115955
115972
|
for (const [key, value] of entries$5(parent)) {
|
|
115956
|
-
if (isArray$
|
|
115973
|
+
if (isArray$5(value)) {
|
|
115957
115974
|
const index = value.indexOf(node);
|
|
115958
115975
|
|
|
115959
115976
|
if (index >= 0)
|
|
@@ -115969,14 +115986,14 @@ function findKey(path, parent) {
|
|
|
115969
115986
|
|
|
115970
115987
|
const wraptile = wraptile$1;
|
|
115971
115988
|
const findPath = findPath$1;
|
|
115972
|
-
const {types: types$
|
|
115973
|
-
const {isProgram: isProgram$
|
|
115989
|
+
const {types: types$b} = bundle;
|
|
115990
|
+
const {isProgram: isProgram$4} = types$b;
|
|
115974
115991
|
const name = '__putout_runner_replace';
|
|
115975
115992
|
const hasWatermark = (watermark) => (path) => path.node?.[name]?.has(watermark);
|
|
115976
115993
|
|
|
115977
115994
|
watermark$1.exports = (from, to, path) => {
|
|
115978
115995
|
const {watermark, highWatermark} = create(from, to, path);
|
|
115979
|
-
const program = path.findParent(isProgram$
|
|
115996
|
+
const program = path.findParent(isProgram$4) || path;
|
|
115980
115997
|
const options = {
|
|
115981
115998
|
watermark,
|
|
115982
115999
|
highWatermark,
|
|
@@ -115985,7 +116002,7 @@ watermark$1.exports = (from, to, path) => {
|
|
|
115985
116002
|
};
|
|
115986
116003
|
|
|
115987
116004
|
return {
|
|
115988
|
-
init: wraptile(init$
|
|
116005
|
+
init: wraptile(init$3, options),
|
|
115989
116006
|
has: wraptile(has, options),
|
|
115990
116007
|
add: wraptile(add, options),
|
|
115991
116008
|
};
|
|
@@ -116004,8 +116021,8 @@ function create(from, to, path) {
|
|
|
116004
116021
|
};
|
|
116005
116022
|
}
|
|
116006
116023
|
|
|
116007
|
-
watermark$1.exports.init = init$
|
|
116008
|
-
function init$
|
|
116024
|
+
watermark$1.exports.init = init$3;
|
|
116025
|
+
function init$3({path, program}) {
|
|
116009
116026
|
if (path.node)
|
|
116010
116027
|
path.node[name] = path.node[name] || new Set();
|
|
116011
116028
|
|
|
@@ -116014,7 +116031,7 @@ function init$4({path, program}) {
|
|
|
116014
116031
|
|
|
116015
116032
|
watermark$1.exports.add = add;
|
|
116016
116033
|
function add({path, program, watermark, highWatermark}) {
|
|
116017
|
-
init$
|
|
116034
|
+
init$3({
|
|
116018
116035
|
path,
|
|
116019
116036
|
program,
|
|
116020
116037
|
});
|
|
@@ -116035,7 +116052,7 @@ var watermarkExports = watermark$1.exports;
|
|
|
116035
116052
|
|
|
116036
116053
|
const {template: template$5, print: print$2} = parser$6;
|
|
116037
116054
|
const {remove, replaceWith: replaceWith$2} = operate;
|
|
116038
|
-
const {types: types$
|
|
116055
|
+
const {types: types$a} = bundle;
|
|
116039
116056
|
|
|
116040
116057
|
const {
|
|
116041
116058
|
compare: compare$3,
|
|
@@ -116045,14 +116062,14 @@ const {
|
|
|
116045
116062
|
} = compare$5;
|
|
116046
116063
|
|
|
116047
116064
|
const debug$2 = browserExports('putout:runner:replace');
|
|
116048
|
-
const maybeArray$
|
|
116065
|
+
const maybeArray$4 = maybeArray_1;
|
|
116049
116066
|
|
|
116050
116067
|
const watermark = watermarkExports;
|
|
116051
116068
|
const {
|
|
116052
116069
|
isExpression,
|
|
116053
116070
|
isStatement,
|
|
116054
116071
|
isExpressionStatement,
|
|
116055
|
-
} = types$
|
|
116072
|
+
} = types$a;
|
|
116056
116073
|
|
|
116057
116074
|
const PRINT_OPTIONS = {
|
|
116058
116075
|
printer: ['putout', {
|
|
@@ -116065,7 +116082,7 @@ const PRINT_OPTIONS = {
|
|
|
116065
116082
|
}],
|
|
116066
116083
|
};
|
|
116067
116084
|
|
|
116068
|
-
const isString$
|
|
116085
|
+
const isString$6 = (a) => typeof a === 'string';
|
|
116069
116086
|
|
|
116070
116087
|
const log$2 = (from, path) => {
|
|
116071
116088
|
debug$2.enabled && debug$2(`${from} -> ${path}\n`);
|
|
@@ -116102,7 +116119,7 @@ replace$1.exports = ({rule, plugin, msg, options}) => {
|
|
|
116102
116119
|
...options,
|
|
116103
116120
|
exclude: [
|
|
116104
116121
|
...exclude(),
|
|
116105
|
-
...maybeArray$
|
|
116122
|
+
...maybeArray$4(options.exclude),
|
|
116106
116123
|
],
|
|
116107
116124
|
},
|
|
116108
116125
|
plugin: {
|
|
@@ -116214,7 +116231,7 @@ function parseTo(to, values, path) {
|
|
|
116214
116231
|
return toStr;
|
|
116215
116232
|
}
|
|
116216
116233
|
|
|
116217
|
-
if (!isString$
|
|
116234
|
+
if (!isString$6(toStr))
|
|
116218
116235
|
throw Error(`☝️ Looks like you passed 'replace' value with a wrong type. Allowed: 'string', 'node' and 'path'. Received: '${typeof toStr}' with value '${toStr}'.`);
|
|
116219
116236
|
|
|
116220
116237
|
return template$5.ast.fresh(toStr);
|
|
@@ -116297,14 +116314,14 @@ const {
|
|
|
116297
116314
|
setModuleType,
|
|
116298
116315
|
} = record;
|
|
116299
116316
|
|
|
116300
|
-
const {types: types$
|
|
116317
|
+
const {types: types$9} = bundle;
|
|
116301
116318
|
const {
|
|
116302
116319
|
isImportDeclaration,
|
|
116303
116320
|
isVariableDeclaration,
|
|
116304
|
-
} = types$
|
|
116321
|
+
} = types$9;
|
|
116305
116322
|
|
|
116306
116323
|
const {keys} = Object;
|
|
116307
|
-
const isString$
|
|
116324
|
+
const isString$5 = (a) => typeof a === 'string';
|
|
116308
116325
|
|
|
116309
116326
|
const getLastVarPath = (bodyPath) => bodyPath.filter(isVariableDeclaration).pop();
|
|
116310
116327
|
const isLast = (insertionPath, bodyPath) => bodyPath.at(-1) === insertionPath;
|
|
@@ -116402,7 +116419,7 @@ function isUseStrict(path) {
|
|
|
116402
116419
|
}
|
|
116403
116420
|
|
|
116404
116421
|
const parseCode = (type, current) => {
|
|
116405
|
-
if (isString$
|
|
116422
|
+
if (isString$5(current))
|
|
116406
116423
|
return current;
|
|
116407
116424
|
|
|
116408
116425
|
return current[type];
|
|
@@ -116500,406 +116517,11 @@ function validateDeclare(declare) {
|
|
|
116500
116517
|
throw Error(`☝️ Looks like 'declare' property value is not a 'function', but '${typeof declare}' with value '${stringify$1(declare)}'.`);
|
|
116501
116518
|
}
|
|
116502
116519
|
|
|
116503
|
-
var filesystem$3 = {};
|
|
116504
|
-
|
|
116505
|
-
var maybeFs$3 = {};
|
|
116506
|
-
|
|
116507
|
-
const fullstore$4 = fullstore$6;
|
|
116508
|
-
const driverStore$3 = fullstore$4();
|
|
116509
|
-
|
|
116510
|
-
const {assign: assign$3} = Object;
|
|
116511
|
-
const noop$4 = () => {};
|
|
116512
|
-
const returns$3 = (a) => () => a;
|
|
116513
|
-
|
|
116514
|
-
const defaultFS$3 = {
|
|
116515
|
-
renameFile: noop$4,
|
|
116516
|
-
removeFile: noop$4,
|
|
116517
|
-
createDirectory: noop$4,
|
|
116518
|
-
readFileContent: returns$3(''),
|
|
116519
|
-
writeFileContent: noop$4,
|
|
116520
|
-
copyFile: noop$4,
|
|
116521
|
-
};
|
|
116522
|
-
|
|
116523
|
-
const maybeFS$7 = assign$3({}, defaultFS$3);
|
|
116524
|
-
|
|
116525
|
-
maybeFs$3.renameFile = (oldName, newName) => {
|
|
116526
|
-
maybeFS$7.renameFile(oldName, newName);
|
|
116527
|
-
};
|
|
116528
|
-
|
|
116529
|
-
maybeFs$3.removeFile = (name) => {
|
|
116530
|
-
maybeFS$7.removeFile(name);
|
|
116531
|
-
};
|
|
116532
|
-
|
|
116533
|
-
maybeFs$3.copyFile = (from, to) => {
|
|
116534
|
-
maybeFS$7.copyFile(from, to);
|
|
116535
|
-
};
|
|
116536
|
-
|
|
116537
|
-
maybeFs$3.createDirectory = (name) => {
|
|
116538
|
-
maybeFS$7.createDirectory(name);
|
|
116539
|
-
};
|
|
116540
|
-
|
|
116541
|
-
maybeFs$3.readFileContent = (name) => {
|
|
116542
|
-
return maybeFS$7.readFileContent(name);
|
|
116543
|
-
};
|
|
116544
|
-
|
|
116545
|
-
maybeFs$3.writeFileContent = (name, content) => {
|
|
116546
|
-
maybeFS$7.writeFileContent(name, content);
|
|
116547
|
-
};
|
|
116548
|
-
|
|
116549
|
-
maybeFs$3.init = init$3;
|
|
116550
|
-
|
|
116551
|
-
function init$3(fsDriver) {
|
|
116552
|
-
assign$3(maybeFS$7, fsDriver);
|
|
116553
|
-
}
|
|
116554
|
-
|
|
116555
|
-
maybeFs$3.pause = () => {
|
|
116556
|
-
driverStore$3(maybeFS$7);
|
|
116557
|
-
deinit$3();
|
|
116558
|
-
};
|
|
116559
|
-
|
|
116560
|
-
maybeFs$3.start = () => {
|
|
116561
|
-
init$3(driverStore$3());
|
|
116562
|
-
};
|
|
116563
|
-
|
|
116564
|
-
maybeFs$3.deinit = deinit$3;
|
|
116565
|
-
|
|
116566
|
-
function deinit$3() {
|
|
116567
|
-
assign$3(maybeFS$7, defaultFS$3);
|
|
116568
|
-
}
|
|
116569
|
-
|
|
116570
|
-
const {join: join$5, basename: basename$4} = require$$0$2;
|
|
116571
|
-
const tryCatch$5 = tryCatch$9;
|
|
116572
|
-
const {types: types$9} = bundle;
|
|
116573
|
-
|
|
116574
|
-
const {
|
|
116575
|
-
setLiteralValue: setLiteralValue$3,
|
|
116576
|
-
getProperty: getProperty$5,
|
|
116577
|
-
traverseProperties: traverseProperties$4,
|
|
116578
|
-
} = operate;
|
|
116579
|
-
|
|
116580
|
-
const maybeFS$6 = maybeFs$3;
|
|
116581
|
-
const isString$5 = (a) => typeof a === 'string';
|
|
116582
|
-
const {isArray: isArray$5} = Array;
|
|
116583
|
-
const maybeArray$4 = (a) => isArray$5(a) ? a : [a];
|
|
116584
|
-
|
|
116585
|
-
const toBase64$3 = (content) => {
|
|
116586
|
-
const [e, result] = tryCatch$5(btoa, content);
|
|
116587
|
-
|
|
116588
|
-
if (e)
|
|
116589
|
-
return btoa(encodeURI(content));
|
|
116590
|
-
|
|
116591
|
-
return result;
|
|
116592
|
-
};
|
|
116593
|
-
|
|
116594
|
-
const fromBase64$3 = (content) => {
|
|
116595
|
-
const [e, decoded] = tryCatch$5(atob, content);
|
|
116596
|
-
|
|
116597
|
-
if (!e)
|
|
116598
|
-
return decodeURI(decoded);
|
|
116599
|
-
|
|
116600
|
-
return content;
|
|
116601
|
-
};
|
|
116602
|
-
|
|
116603
|
-
const {
|
|
116604
|
-
ObjectExpression: ObjectExpression$4,
|
|
116605
|
-
ArrayExpression: ArrayExpression$5,
|
|
116606
|
-
StringLiteral: StringLiteral$6,
|
|
116607
|
-
ObjectProperty: ObjectProperty$5,
|
|
116608
|
-
isProgram: isProgram$4,
|
|
116609
|
-
} = types$9;
|
|
116610
|
-
|
|
116611
|
-
const getRegExp$3 = (wildcard) => {
|
|
116612
|
-
const escaped = wildcard
|
|
116613
|
-
.replace(/\./g, '\\.')
|
|
116614
|
-
.replace(/\*/g, '.*')
|
|
116615
|
-
.replace('?', '.?');
|
|
116616
|
-
|
|
116617
|
-
return RegExp(`^${escaped}$`);
|
|
116618
|
-
};
|
|
116619
|
-
|
|
116620
|
-
filesystem$3.getParentDirectory = (filePath) => {
|
|
116621
|
-
const {parentPath} = filePath.parentPath.parentPath;
|
|
116622
|
-
|
|
116623
|
-
if (isProgram$4(parentPath))
|
|
116624
|
-
return null;
|
|
116625
|
-
|
|
116626
|
-
return parentPath;
|
|
116627
|
-
};
|
|
116628
|
-
|
|
116629
|
-
filesystem$3.findFile = findFile$8;
|
|
116630
|
-
|
|
116631
|
-
function findFile$8(node, name) {
|
|
116632
|
-
checkName$3(name);
|
|
116633
|
-
|
|
116634
|
-
const filePaths = [];
|
|
116635
|
-
const names = maybeArray$4(name);
|
|
116636
|
-
|
|
116637
|
-
for (const filenamePath of traverseProperties$4(node, 'filename')) {
|
|
116638
|
-
const {value} = filenamePath.node.value;
|
|
116639
|
-
const base = basename$4(value);
|
|
116640
|
-
|
|
116641
|
-
for (const name of names) {
|
|
116642
|
-
if (value === name || getRegExp$3(name).test(base))
|
|
116643
|
-
filePaths.push(filenamePath.parentPath);
|
|
116644
|
-
}
|
|
116645
|
-
}
|
|
116646
|
-
|
|
116647
|
-
return filePaths;
|
|
116648
|
-
}
|
|
116649
|
-
|
|
116650
|
-
function checkName$3(name) {
|
|
116651
|
-
if (!isString$5(name) && !isArray$5(name))
|
|
116652
|
-
throw Error(`☝️ Looks like you forget to pass the 'name' of a file to 'findFile(filePath: Path|FilePath, name: string | string[]): FilePath'`);
|
|
116653
|
-
}
|
|
116654
|
-
|
|
116655
|
-
function getFilenamePath$3(filePath) {
|
|
116656
|
-
const filenamePath = getProperty$5(filePath, 'filename');
|
|
116657
|
-
return filenamePath.get('value');
|
|
116658
|
-
}
|
|
116659
|
-
|
|
116660
|
-
function getFilename$7(filePath) {
|
|
116661
|
-
const {value} = getFilenamePath$3(filePath).node;
|
|
116662
|
-
return value;
|
|
116663
|
-
}
|
|
116664
|
-
|
|
116665
|
-
filesystem$3.getFileType = getFileType$5;
|
|
116666
|
-
|
|
116667
|
-
function getFileType$5(filePath) {
|
|
116668
|
-
const typePath = getProperty$5(filePath, 'type');
|
|
116669
|
-
return typePath.node.value.value;
|
|
116670
|
-
}
|
|
116671
|
-
|
|
116672
|
-
filesystem$3.getFileContent = getFileContent$3;
|
|
116673
|
-
|
|
116674
|
-
function getFileContent$3(filePath) {
|
|
116675
|
-
const content = getProperty$5(filePath, 'content');
|
|
116676
|
-
|
|
116677
|
-
return [
|
|
116678
|
-
Boolean(content),
|
|
116679
|
-
content?.node.value.value,
|
|
116680
|
-
];
|
|
116681
|
-
}
|
|
116682
|
-
|
|
116683
|
-
filesystem$3.getFilename = getFilename$7;
|
|
116684
|
-
|
|
116685
|
-
filesystem$3.renameFile = (filePath, name) => {
|
|
116686
|
-
const oldName = getFilename$7(filePath);
|
|
116687
|
-
const valuePath = getFilenamePath$3(filePath);
|
|
116688
|
-
const baseName = oldName
|
|
116689
|
-
.split('/')
|
|
116690
|
-
.pop();
|
|
116691
|
-
|
|
116692
|
-
const newName = name
|
|
116693
|
-
.split('/')
|
|
116694
|
-
.pop();
|
|
116695
|
-
|
|
116696
|
-
const newFilename = oldName.replace(baseName, newName);
|
|
116697
|
-
|
|
116698
|
-
setLiteralValue$3(valuePath, newFilename);
|
|
116699
|
-
maybeFS$6.renameFile(oldName, newFilename);
|
|
116700
|
-
};
|
|
116701
|
-
|
|
116702
|
-
filesystem$3.removeFile = (filePath) => {
|
|
116703
|
-
const filename = getFilename$7(filePath);
|
|
116704
|
-
|
|
116705
|
-
filePath.remove();
|
|
116706
|
-
maybeFS$6.removeFile(filename);
|
|
116707
|
-
};
|
|
116708
|
-
|
|
116709
|
-
filesystem$3.moveFile = (filePath, dirPath) => {
|
|
116710
|
-
if (filePath === dirPath)
|
|
116711
|
-
return;
|
|
116712
|
-
|
|
116713
|
-
const dirname = getFilename$7(dirPath);
|
|
116714
|
-
const filename = getFilename$7(filePath);
|
|
116715
|
-
const dirPathFiles = getProperty$5(dirPath, 'files');
|
|
116716
|
-
const filenamePath = getProperty$5(filePath, 'filename');
|
|
116717
|
-
|
|
116718
|
-
const basename = filename
|
|
116719
|
-
.split('/')
|
|
116720
|
-
.pop();
|
|
116721
|
-
|
|
116722
|
-
const newFilename = join$5(dirname, basename);
|
|
116723
|
-
|
|
116724
|
-
maybeRemoveFile$3(dirPath, newFilename);
|
|
116725
|
-
|
|
116726
|
-
setLiteralValue$3(filenamePath.get('value'), newFilename);
|
|
116727
|
-
dirPathFiles.node.value.elements.push(filePath.node);
|
|
116728
|
-
|
|
116729
|
-
filePath.remove();
|
|
116730
|
-
maybeFS$6.renameFile(filename, newFilename);
|
|
116731
|
-
};
|
|
116732
|
-
|
|
116733
|
-
filesystem$3.copyFile = (filePath, dirPath) => {
|
|
116734
|
-
const dirname = getFilename$7(dirPath);
|
|
116735
|
-
const filename = getFilename$7(filePath);
|
|
116736
|
-
|
|
116737
|
-
const basename = filename
|
|
116738
|
-
.split('/')
|
|
116739
|
-
.pop();
|
|
116740
|
-
|
|
116741
|
-
const newFilename = join$5(dirname, basename);
|
|
116742
|
-
const [hasContent, content] = getFileContent$3(filePath);
|
|
116743
|
-
|
|
116744
|
-
const copiedFile = ObjectExpression$4([
|
|
116745
|
-
createTypeProperty$3('file'),
|
|
116746
|
-
createFilenameProperty$3(newFilename),
|
|
116747
|
-
hasContent && createContentProperty$3(content),
|
|
116748
|
-
].filter(Boolean));
|
|
116749
|
-
|
|
116750
|
-
maybeRemoveFile$3(dirPath, newFilename);
|
|
116751
|
-
|
|
116752
|
-
const dirPathFiles = getFiles$4(dirPath);
|
|
116753
|
-
dirPathFiles.node.value.elements.push(copiedFile);
|
|
116754
|
-
|
|
116755
|
-
maybeFS$6.copyFile(filename, newFilename);
|
|
116756
|
-
};
|
|
116757
|
-
|
|
116758
|
-
function maybeRemoveFile$3(dirPath, filename) {
|
|
116759
|
-
const type = getFileType$5(dirPath);
|
|
116760
|
-
|
|
116761
|
-
if (type !== 'directory') {
|
|
116762
|
-
const filename = getFilename$7(dirPath);
|
|
116763
|
-
throw Error(`☝️ Looks like '${filename}' is not a directory, but: '${type}'. Rename to '${filename}/'`);
|
|
116764
|
-
}
|
|
116765
|
-
|
|
116766
|
-
const dirPathFiles = getProperty$5(dirPath, 'files');
|
|
116767
|
-
const name = join$5(getFilename$7(dirPath), basename$4(filename));
|
|
116768
|
-
const [fileToOverwrite] = findFile$8(dirPathFiles, name);
|
|
116769
|
-
|
|
116770
|
-
if (!fileToOverwrite)
|
|
116771
|
-
return;
|
|
116772
|
-
|
|
116773
|
-
fileToOverwrite.remove();
|
|
116774
|
-
}
|
|
116775
|
-
|
|
116776
|
-
const createTypeProperty$3 = (type) => ObjectProperty$5(StringLiteral$6('type'), StringLiteral$6(type));
|
|
116777
|
-
|
|
116778
|
-
filesystem$3.createTypeProperty = createTypeProperty$3;
|
|
116779
|
-
|
|
116780
|
-
const createFilesProperty$3 = (files) => ObjectProperty$5(StringLiteral$6('files'), ArrayExpression$5(files));
|
|
116781
|
-
|
|
116782
|
-
filesystem$3.createFilesProperty = createFilesProperty$3;
|
|
116783
|
-
|
|
116784
|
-
const createFilenameProperty$3 = (filename) => ObjectProperty$5(StringLiteral$6('filename'), StringLiteral$6(filename));
|
|
116785
|
-
|
|
116786
|
-
filesystem$3.createFilenameProperty = createFilenameProperty$3;
|
|
116787
|
-
|
|
116788
|
-
const createContentProperty$3 = (content) => ObjectProperty$5(StringLiteral$6('content'), StringLiteral$6(content));
|
|
116789
|
-
|
|
116790
|
-
filesystem$3.createContentProperty = createContentProperty$3;
|
|
116791
|
-
|
|
116792
|
-
filesystem$3.createFile = (dirPath, name, content) => {
|
|
116793
|
-
maybeRemoveFile$3(dirPath, name);
|
|
116794
|
-
|
|
116795
|
-
const dirPathFiles = getFiles$4(dirPath);
|
|
116796
|
-
const parentFilename = getFilename$7(dirPath);
|
|
116797
|
-
const filename = join$5(parentFilename, name);
|
|
116798
|
-
|
|
116799
|
-
const typeProperty = createTypeProperty$3('file');
|
|
116800
|
-
const filenameProperty = createFilenameProperty$3(filename);
|
|
116801
|
-
|
|
116802
|
-
const properties = [
|
|
116803
|
-
typeProperty,
|
|
116804
|
-
filenameProperty,
|
|
116805
|
-
content && createContentProperty$3(content),
|
|
116806
|
-
].filter(Boolean);
|
|
116807
|
-
|
|
116808
|
-
dirPathFiles.node.value.elements.push(ObjectExpression$4(properties));
|
|
116809
|
-
|
|
116810
|
-
const filePath = dirPathFiles
|
|
116811
|
-
.get('value.elements')
|
|
116812
|
-
.at(-1);
|
|
116813
|
-
|
|
116814
|
-
if (isString$5(content))
|
|
116815
|
-
writeFileContent$4(filePath, content);
|
|
116816
|
-
|
|
116817
|
-
return filePath;
|
|
116818
|
-
};
|
|
116819
|
-
|
|
116820
|
-
function getFiles$4(dirPath) {
|
|
116821
|
-
return getProperty$5(dirPath, 'files');
|
|
116822
|
-
}
|
|
116823
|
-
|
|
116824
|
-
filesystem$3.createDirectory = (dirPath, name) => {
|
|
116825
|
-
const dirPathFiles = getFiles$4(dirPath);
|
|
116826
|
-
const parentFilename = getFilename$7(dirPath);
|
|
116827
|
-
const filename = join$5(parentFilename, name);
|
|
116828
|
-
|
|
116829
|
-
const typeProperty = createTypeProperty$3('directory');
|
|
116830
|
-
const filesProperty = createFilesProperty$3([]);
|
|
116831
|
-
const filenameProperty = createFilenameProperty$3(filename);
|
|
116832
|
-
|
|
116833
|
-
dirPathFiles.node.value.elements.push(ObjectExpression$4([
|
|
116834
|
-
typeProperty,
|
|
116835
|
-
filenameProperty,
|
|
116836
|
-
filesProperty,
|
|
116837
|
-
]));
|
|
116838
|
-
|
|
116839
|
-
maybeFS$6.createDirectory(filename);
|
|
116840
|
-
|
|
116841
|
-
return dirPathFiles
|
|
116842
|
-
.get('value.elements')
|
|
116843
|
-
.at(-1);
|
|
116844
|
-
};
|
|
116845
|
-
|
|
116846
|
-
filesystem$3.readFileContent = (filePath) => {
|
|
116847
|
-
const fileType = getFileType$5(filePath);
|
|
116848
|
-
|
|
116849
|
-
if (fileType === 'directory')
|
|
116850
|
-
return '';
|
|
116851
|
-
|
|
116852
|
-
const [hasContent, content] = getFileContent$3(filePath);
|
|
116853
|
-
|
|
116854
|
-
if (hasContent)
|
|
116855
|
-
return fromBase64$3(content);
|
|
116856
|
-
|
|
116857
|
-
const filename = getFilename$7(filePath);
|
|
116858
|
-
const fileContent = maybeFS$6.readFileContent(filename);
|
|
116859
|
-
|
|
116860
|
-
const property = createContentProperty$3(toBase64$3(fileContent));
|
|
116861
|
-
|
|
116862
|
-
filePath.node.properties.push(property);
|
|
116863
|
-
|
|
116864
|
-
return fileContent;
|
|
116865
|
-
};
|
|
116866
|
-
|
|
116867
|
-
filesystem$3.writeFileContent = writeFileContent$4;
|
|
116868
|
-
|
|
116869
|
-
function writeFileContent$4(filePath, content) {
|
|
116870
|
-
const fileType = getFileType$5(filePath);
|
|
116871
|
-
|
|
116872
|
-
if (fileType === 'directory')
|
|
116873
|
-
return;
|
|
116874
|
-
|
|
116875
|
-
const filename = getFilename$7(filePath);
|
|
116876
|
-
|
|
116877
|
-
maybeFS$6.writeFileContent(filename, content);
|
|
116878
|
-
|
|
116879
|
-
const contentPath = getProperty$5(filePath, 'content');
|
|
116880
|
-
|
|
116881
|
-
if (contentPath) {
|
|
116882
|
-
setLiteralValue$3(contentPath.node.value, toBase64$3(content));
|
|
116883
|
-
return;
|
|
116884
|
-
}
|
|
116885
|
-
|
|
116886
|
-
const property = createContentProperty$3(toBase64$3(content));
|
|
116887
|
-
filePath.node.properties.push(property);
|
|
116888
|
-
}
|
|
116889
|
-
|
|
116890
|
-
filesystem$3.init = maybeFS$6.init;
|
|
116891
|
-
filesystem$3.deinit = maybeFS$6.deinit;
|
|
116892
|
-
|
|
116893
|
-
filesystem$3.pause = maybeFS$6.pause;
|
|
116894
|
-
filesystem$3.start = maybeFS$6.start;
|
|
116895
|
-
|
|
116896
|
-
var convertSimpleFilesystemToFilesystem = {};
|
|
116897
|
-
|
|
116898
116520
|
var filesystem$2 = {};
|
|
116899
116521
|
|
|
116900
116522
|
var maybeFs$2 = {};
|
|
116901
116523
|
|
|
116902
|
-
const fullstore$3 = fullstore$
|
|
116524
|
+
const fullstore$3 = fullstore$5;
|
|
116903
116525
|
const driverStore$2 = fullstore$3();
|
|
116904
116526
|
|
|
116905
116527
|
const {assign: assign$2} = Object;
|
|
@@ -116963,7 +116585,7 @@ function deinit$2() {
|
|
|
116963
116585
|
}
|
|
116964
116586
|
|
|
116965
116587
|
const {join: join$4, basename: basename$3} = require$$0$2;
|
|
116966
|
-
const tryCatch$4 = tryCatch$
|
|
116588
|
+
const tryCatch$4 = tryCatch$8;
|
|
116967
116589
|
const {types: types$8} = bundle;
|
|
116968
116590
|
|
|
116969
116591
|
const {
|
|
@@ -117288,27 +116910,422 @@ filesystem$2.deinit = maybeFS$4.deinit;
|
|
|
117288
116910
|
filesystem$2.pause = maybeFS$4.pause;
|
|
117289
116911
|
filesystem$2.start = maybeFS$4.start;
|
|
117290
116912
|
|
|
116913
|
+
var convertSimpleFilesystemToFilesystem = {};
|
|
116914
|
+
|
|
116915
|
+
var filesystem$1 = {};
|
|
116916
|
+
|
|
116917
|
+
var maybeFs$1 = {};
|
|
116918
|
+
|
|
116919
|
+
const fullstore$2 = fullstore$5;
|
|
116920
|
+
const driverStore$1 = fullstore$2();
|
|
116921
|
+
|
|
116922
|
+
const {assign: assign$1} = Object;
|
|
116923
|
+
const noop$2 = () => {};
|
|
116924
|
+
const returns$1 = (a) => () => a;
|
|
116925
|
+
|
|
116926
|
+
const defaultFS$1 = {
|
|
116927
|
+
renameFile: noop$2,
|
|
116928
|
+
removeFile: noop$2,
|
|
116929
|
+
createDirectory: noop$2,
|
|
116930
|
+
readFileContent: returns$1(''),
|
|
116931
|
+
writeFileContent: noop$2,
|
|
116932
|
+
copyFile: noop$2,
|
|
116933
|
+
};
|
|
116934
|
+
|
|
116935
|
+
const maybeFS$3 = assign$1({}, defaultFS$1);
|
|
116936
|
+
|
|
116937
|
+
maybeFs$1.renameFile = (oldName, newName) => {
|
|
116938
|
+
maybeFS$3.renameFile(oldName, newName);
|
|
116939
|
+
};
|
|
116940
|
+
|
|
116941
|
+
maybeFs$1.removeFile = (name) => {
|
|
116942
|
+
maybeFS$3.removeFile(name);
|
|
116943
|
+
};
|
|
116944
|
+
|
|
116945
|
+
maybeFs$1.copyFile = (from, to) => {
|
|
116946
|
+
maybeFS$3.copyFile(from, to);
|
|
116947
|
+
};
|
|
116948
|
+
|
|
116949
|
+
maybeFs$1.createDirectory = (name) => {
|
|
116950
|
+
maybeFS$3.createDirectory(name);
|
|
116951
|
+
};
|
|
116952
|
+
|
|
116953
|
+
maybeFs$1.readFileContent = (name) => {
|
|
116954
|
+
return maybeFS$3.readFileContent(name);
|
|
116955
|
+
};
|
|
116956
|
+
|
|
116957
|
+
maybeFs$1.writeFileContent = (name, content) => {
|
|
116958
|
+
maybeFS$3.writeFileContent(name, content);
|
|
116959
|
+
};
|
|
116960
|
+
|
|
116961
|
+
maybeFs$1.init = init$1;
|
|
116962
|
+
|
|
116963
|
+
function init$1(fsDriver) {
|
|
116964
|
+
assign$1(maybeFS$3, fsDriver);
|
|
116965
|
+
}
|
|
116966
|
+
|
|
116967
|
+
maybeFs$1.pause = () => {
|
|
116968
|
+
driverStore$1(maybeFS$3);
|
|
116969
|
+
deinit$1();
|
|
116970
|
+
};
|
|
116971
|
+
|
|
116972
|
+
maybeFs$1.start = () => {
|
|
116973
|
+
init$1(driverStore$1());
|
|
116974
|
+
};
|
|
116975
|
+
|
|
116976
|
+
maybeFs$1.deinit = deinit$1;
|
|
116977
|
+
|
|
116978
|
+
function deinit$1() {
|
|
116979
|
+
assign$1(maybeFS$3, defaultFS$1);
|
|
116980
|
+
}
|
|
116981
|
+
|
|
116982
|
+
const {join: join$3, basename: basename$2} = require$$0$2;
|
|
116983
|
+
const tryCatch$3 = tryCatch$8;
|
|
117291
116984
|
const {types: types$7} = bundle;
|
|
117292
|
-
|
|
116985
|
+
|
|
117293
116986
|
const {
|
|
117294
|
-
|
|
117295
|
-
|
|
117296
|
-
|
|
117297
|
-
|
|
117298
|
-
} = filesystem$2;
|
|
116987
|
+
setLiteralValue: setLiteralValue$1,
|
|
116988
|
+
getProperty: getProperty$3,
|
|
116989
|
+
traverseProperties: traverseProperties$2,
|
|
116990
|
+
} = operate;
|
|
117299
116991
|
|
|
117300
|
-
const
|
|
117301
|
-
const
|
|
116992
|
+
const maybeFS$2 = maybeFs$1;
|
|
116993
|
+
const isString$3 = (a) => typeof a === 'string';
|
|
116994
|
+
const {isArray: isArray$3} = Array;
|
|
116995
|
+
const maybeArray$2 = (a) => isArray$3(a) ? a : [a];
|
|
116996
|
+
|
|
116997
|
+
const toBase64$1 = (content) => {
|
|
116998
|
+
const [e, result] = tryCatch$3(btoa, content);
|
|
116999
|
+
|
|
117000
|
+
if (e)
|
|
117001
|
+
return btoa(encodeURI(content));
|
|
117002
|
+
|
|
117003
|
+
return result;
|
|
117004
|
+
};
|
|
117005
|
+
|
|
117006
|
+
const fromBase64$1 = (content) => {
|
|
117007
|
+
const [e, decoded] = tryCatch$3(atob, content);
|
|
117008
|
+
|
|
117009
|
+
if (!e)
|
|
117010
|
+
return decodeURI(decoded);
|
|
117011
|
+
|
|
117012
|
+
return content;
|
|
117013
|
+
};
|
|
117302
117014
|
|
|
117303
117015
|
const {
|
|
117304
117016
|
ObjectExpression: ObjectExpression$2,
|
|
117305
117017
|
ArrayExpression: ArrayExpression$3,
|
|
117306
117018
|
StringLiteral: StringLiteral$4,
|
|
117307
117019
|
ObjectProperty: ObjectProperty$3,
|
|
117020
|
+
isProgram: isProgram$2,
|
|
117021
|
+
} = types$7;
|
|
117022
|
+
|
|
117023
|
+
const getRegExp$1 = (wildcard) => {
|
|
117024
|
+
const escaped = wildcard
|
|
117025
|
+
.replace(/\./g, '\\.')
|
|
117026
|
+
.replace(/\*/g, '.*')
|
|
117027
|
+
.replace('?', '.?');
|
|
117028
|
+
|
|
117029
|
+
return RegExp(`^${escaped}$`);
|
|
117030
|
+
};
|
|
117031
|
+
|
|
117032
|
+
filesystem$1.getParentDirectory = (filePath) => {
|
|
117033
|
+
const {parentPath} = filePath.parentPath.parentPath;
|
|
117034
|
+
|
|
117035
|
+
if (isProgram$2(parentPath))
|
|
117036
|
+
return null;
|
|
117037
|
+
|
|
117038
|
+
return parentPath;
|
|
117039
|
+
};
|
|
117040
|
+
|
|
117041
|
+
filesystem$1.findFile = findFile$6;
|
|
117042
|
+
|
|
117043
|
+
function findFile$6(node, name) {
|
|
117044
|
+
checkName$1(name);
|
|
117045
|
+
|
|
117046
|
+
const filePaths = [];
|
|
117047
|
+
const names = maybeArray$2(name);
|
|
117048
|
+
|
|
117049
|
+
for (const filenamePath of traverseProperties$2(node, 'filename')) {
|
|
117050
|
+
const {value} = filenamePath.node.value;
|
|
117051
|
+
const base = basename$2(value);
|
|
117052
|
+
|
|
117053
|
+
for (const name of names) {
|
|
117054
|
+
if (value === name || getRegExp$1(name).test(base))
|
|
117055
|
+
filePaths.push(filenamePath.parentPath);
|
|
117056
|
+
}
|
|
117057
|
+
}
|
|
117058
|
+
|
|
117059
|
+
return filePaths;
|
|
117060
|
+
}
|
|
117061
|
+
|
|
117062
|
+
function checkName$1(name) {
|
|
117063
|
+
if (!isString$3(name) && !isArray$3(name))
|
|
117064
|
+
throw Error(`☝️ Looks like you forget to pass the 'name' of a file to 'findFile(filePath: Path|FilePath, name: string | string[]): FilePath'`);
|
|
117065
|
+
}
|
|
117066
|
+
|
|
117067
|
+
function getFilenamePath$1(filePath) {
|
|
117068
|
+
const filenamePath = getProperty$3(filePath, 'filename');
|
|
117069
|
+
return filenamePath.get('value');
|
|
117070
|
+
}
|
|
117071
|
+
|
|
117072
|
+
function getFilename$5(filePath) {
|
|
117073
|
+
const {value} = getFilenamePath$1(filePath).node;
|
|
117074
|
+
return value;
|
|
117075
|
+
}
|
|
117076
|
+
|
|
117077
|
+
filesystem$1.getFileType = getFileType$3;
|
|
117078
|
+
|
|
117079
|
+
function getFileType$3(filePath) {
|
|
117080
|
+
const typePath = getProperty$3(filePath, 'type');
|
|
117081
|
+
return typePath.node.value.value;
|
|
117082
|
+
}
|
|
117083
|
+
|
|
117084
|
+
filesystem$1.getFileContent = getFileContent$1;
|
|
117085
|
+
|
|
117086
|
+
function getFileContent$1(filePath) {
|
|
117087
|
+
const content = getProperty$3(filePath, 'content');
|
|
117088
|
+
|
|
117089
|
+
return [
|
|
117090
|
+
Boolean(content),
|
|
117091
|
+
content?.node.value.value,
|
|
117092
|
+
];
|
|
117093
|
+
}
|
|
117094
|
+
|
|
117095
|
+
filesystem$1.getFilename = getFilename$5;
|
|
117096
|
+
|
|
117097
|
+
filesystem$1.renameFile = (filePath, name) => {
|
|
117098
|
+
const oldName = getFilename$5(filePath);
|
|
117099
|
+
const valuePath = getFilenamePath$1(filePath);
|
|
117100
|
+
const baseName = oldName
|
|
117101
|
+
.split('/')
|
|
117102
|
+
.pop();
|
|
117103
|
+
|
|
117104
|
+
const newName = name
|
|
117105
|
+
.split('/')
|
|
117106
|
+
.pop();
|
|
117107
|
+
|
|
117108
|
+
const newFilename = oldName.replace(baseName, newName);
|
|
117109
|
+
|
|
117110
|
+
setLiteralValue$1(valuePath, newFilename);
|
|
117111
|
+
maybeFS$2.renameFile(oldName, newFilename);
|
|
117112
|
+
};
|
|
117113
|
+
|
|
117114
|
+
filesystem$1.removeFile = (filePath) => {
|
|
117115
|
+
const filename = getFilename$5(filePath);
|
|
117116
|
+
|
|
117117
|
+
filePath.remove();
|
|
117118
|
+
maybeFS$2.removeFile(filename);
|
|
117119
|
+
};
|
|
117120
|
+
|
|
117121
|
+
filesystem$1.moveFile = (filePath, dirPath) => {
|
|
117122
|
+
if (filePath === dirPath)
|
|
117123
|
+
return;
|
|
117124
|
+
|
|
117125
|
+
const dirname = getFilename$5(dirPath);
|
|
117126
|
+
const filename = getFilename$5(filePath);
|
|
117127
|
+
const dirPathFiles = getProperty$3(dirPath, 'files');
|
|
117128
|
+
const filenamePath = getProperty$3(filePath, 'filename');
|
|
117129
|
+
|
|
117130
|
+
const basename = filename
|
|
117131
|
+
.split('/')
|
|
117132
|
+
.pop();
|
|
117133
|
+
|
|
117134
|
+
const newFilename = join$3(dirname, basename);
|
|
117135
|
+
|
|
117136
|
+
maybeRemoveFile$1(dirPath, newFilename);
|
|
117137
|
+
|
|
117138
|
+
setLiteralValue$1(filenamePath.get('value'), newFilename);
|
|
117139
|
+
dirPathFiles.node.value.elements.push(filePath.node);
|
|
117140
|
+
|
|
117141
|
+
filePath.remove();
|
|
117142
|
+
maybeFS$2.renameFile(filename, newFilename);
|
|
117143
|
+
};
|
|
117144
|
+
|
|
117145
|
+
filesystem$1.copyFile = (filePath, dirPath) => {
|
|
117146
|
+
const dirname = getFilename$5(dirPath);
|
|
117147
|
+
const filename = getFilename$5(filePath);
|
|
117148
|
+
|
|
117149
|
+
const basename = filename
|
|
117150
|
+
.split('/')
|
|
117151
|
+
.pop();
|
|
117152
|
+
|
|
117153
|
+
const newFilename = join$3(dirname, basename);
|
|
117154
|
+
const [hasContent, content] = getFileContent$1(filePath);
|
|
117155
|
+
|
|
117156
|
+
const copiedFile = ObjectExpression$2([
|
|
117157
|
+
createTypeProperty$1('file'),
|
|
117158
|
+
createFilenameProperty$1(newFilename),
|
|
117159
|
+
hasContent && createContentProperty$1(content),
|
|
117160
|
+
].filter(Boolean));
|
|
117161
|
+
|
|
117162
|
+
maybeRemoveFile$1(dirPath, newFilename);
|
|
117163
|
+
|
|
117164
|
+
const dirPathFiles = getFiles$2(dirPath);
|
|
117165
|
+
dirPathFiles.node.value.elements.push(copiedFile);
|
|
117166
|
+
|
|
117167
|
+
maybeFS$2.copyFile(filename, newFilename);
|
|
117168
|
+
};
|
|
117169
|
+
|
|
117170
|
+
function maybeRemoveFile$1(dirPath, filename) {
|
|
117171
|
+
const type = getFileType$3(dirPath);
|
|
117172
|
+
|
|
117173
|
+
if (type !== 'directory') {
|
|
117174
|
+
const filename = getFilename$5(dirPath);
|
|
117175
|
+
throw Error(`☝️ Looks like '${filename}' is not a directory, but: '${type}'. Rename to '${filename}/'`);
|
|
117176
|
+
}
|
|
117177
|
+
|
|
117178
|
+
const dirPathFiles = getProperty$3(dirPath, 'files');
|
|
117179
|
+
const name = join$3(getFilename$5(dirPath), basename$2(filename));
|
|
117180
|
+
const [fileToOverwrite] = findFile$6(dirPathFiles, name);
|
|
117181
|
+
|
|
117182
|
+
if (!fileToOverwrite)
|
|
117183
|
+
return;
|
|
117184
|
+
|
|
117185
|
+
fileToOverwrite.remove();
|
|
117186
|
+
}
|
|
117187
|
+
|
|
117188
|
+
const createTypeProperty$1 = (type) => ObjectProperty$3(StringLiteral$4('type'), StringLiteral$4(type));
|
|
117189
|
+
|
|
117190
|
+
filesystem$1.createTypeProperty = createTypeProperty$1;
|
|
117191
|
+
|
|
117192
|
+
const createFilesProperty$1 = (files) => ObjectProperty$3(StringLiteral$4('files'), ArrayExpression$3(files));
|
|
117193
|
+
|
|
117194
|
+
filesystem$1.createFilesProperty = createFilesProperty$1;
|
|
117195
|
+
|
|
117196
|
+
const createFilenameProperty$1 = (filename) => ObjectProperty$3(StringLiteral$4('filename'), StringLiteral$4(filename));
|
|
117197
|
+
|
|
117198
|
+
filesystem$1.createFilenameProperty = createFilenameProperty$1;
|
|
117199
|
+
|
|
117200
|
+
const createContentProperty$1 = (content) => ObjectProperty$3(StringLiteral$4('content'), StringLiteral$4(content));
|
|
117201
|
+
|
|
117202
|
+
filesystem$1.createContentProperty = createContentProperty$1;
|
|
117203
|
+
|
|
117204
|
+
filesystem$1.createFile = (dirPath, name, content) => {
|
|
117205
|
+
maybeRemoveFile$1(dirPath, name);
|
|
117206
|
+
|
|
117207
|
+
const dirPathFiles = getFiles$2(dirPath);
|
|
117208
|
+
const parentFilename = getFilename$5(dirPath);
|
|
117209
|
+
const filename = join$3(parentFilename, name);
|
|
117210
|
+
|
|
117211
|
+
const typeProperty = createTypeProperty$1('file');
|
|
117212
|
+
const filenameProperty = createFilenameProperty$1(filename);
|
|
117213
|
+
|
|
117214
|
+
const properties = [
|
|
117215
|
+
typeProperty,
|
|
117216
|
+
filenameProperty,
|
|
117217
|
+
content && createContentProperty$1(content),
|
|
117218
|
+
].filter(Boolean);
|
|
117219
|
+
|
|
117220
|
+
dirPathFiles.node.value.elements.push(ObjectExpression$2(properties));
|
|
117221
|
+
|
|
117222
|
+
const filePath = dirPathFiles
|
|
117223
|
+
.get('value.elements')
|
|
117224
|
+
.at(-1);
|
|
117225
|
+
|
|
117226
|
+
if (isString$3(content))
|
|
117227
|
+
writeFileContent$2(filePath, content);
|
|
117228
|
+
|
|
117229
|
+
return filePath;
|
|
117230
|
+
};
|
|
117231
|
+
|
|
117232
|
+
function getFiles$2(dirPath) {
|
|
117233
|
+
return getProperty$3(dirPath, 'files');
|
|
117234
|
+
}
|
|
117235
|
+
|
|
117236
|
+
filesystem$1.createDirectory = (dirPath, name) => {
|
|
117237
|
+
const dirPathFiles = getFiles$2(dirPath);
|
|
117238
|
+
const parentFilename = getFilename$5(dirPath);
|
|
117239
|
+
const filename = join$3(parentFilename, name);
|
|
117240
|
+
|
|
117241
|
+
const typeProperty = createTypeProperty$1('directory');
|
|
117242
|
+
const filesProperty = createFilesProperty$1([]);
|
|
117243
|
+
const filenameProperty = createFilenameProperty$1(filename);
|
|
117244
|
+
|
|
117245
|
+
dirPathFiles.node.value.elements.push(ObjectExpression$2([
|
|
117246
|
+
typeProperty,
|
|
117247
|
+
filenameProperty,
|
|
117248
|
+
filesProperty,
|
|
117249
|
+
]));
|
|
117250
|
+
|
|
117251
|
+
maybeFS$2.createDirectory(filename);
|
|
117252
|
+
|
|
117253
|
+
return dirPathFiles
|
|
117254
|
+
.get('value.elements')
|
|
117255
|
+
.at(-1);
|
|
117256
|
+
};
|
|
117257
|
+
|
|
117258
|
+
filesystem$1.readFileContent = (filePath) => {
|
|
117259
|
+
const fileType = getFileType$3(filePath);
|
|
117260
|
+
|
|
117261
|
+
if (fileType === 'directory')
|
|
117262
|
+
return '';
|
|
117263
|
+
|
|
117264
|
+
const [hasContent, content] = getFileContent$1(filePath);
|
|
117265
|
+
|
|
117266
|
+
if (hasContent)
|
|
117267
|
+
return fromBase64$1(content);
|
|
117268
|
+
|
|
117269
|
+
const filename = getFilename$5(filePath);
|
|
117270
|
+
const fileContent = maybeFS$2.readFileContent(filename);
|
|
117271
|
+
|
|
117272
|
+
const property = createContentProperty$1(toBase64$1(fileContent));
|
|
117273
|
+
|
|
117274
|
+
filePath.node.properties.push(property);
|
|
117275
|
+
|
|
117276
|
+
return fileContent;
|
|
117277
|
+
};
|
|
117278
|
+
|
|
117279
|
+
filesystem$1.writeFileContent = writeFileContent$2;
|
|
117280
|
+
|
|
117281
|
+
function writeFileContent$2(filePath, content) {
|
|
117282
|
+
const fileType = getFileType$3(filePath);
|
|
117283
|
+
|
|
117284
|
+
if (fileType === 'directory')
|
|
117285
|
+
return;
|
|
117286
|
+
|
|
117287
|
+
const filename = getFilename$5(filePath);
|
|
117288
|
+
|
|
117289
|
+
maybeFS$2.writeFileContent(filename, content);
|
|
117290
|
+
|
|
117291
|
+
const contentPath = getProperty$3(filePath, 'content');
|
|
117292
|
+
|
|
117293
|
+
if (contentPath) {
|
|
117294
|
+
setLiteralValue$1(contentPath.node.value, toBase64$1(content));
|
|
117295
|
+
return;
|
|
117296
|
+
}
|
|
117297
|
+
|
|
117298
|
+
const property = createContentProperty$1(toBase64$1(content));
|
|
117299
|
+
filePath.node.properties.push(property);
|
|
117300
|
+
}
|
|
117301
|
+
|
|
117302
|
+
filesystem$1.init = maybeFS$2.init;
|
|
117303
|
+
filesystem$1.deinit = maybeFS$2.deinit;
|
|
117304
|
+
|
|
117305
|
+
filesystem$1.pause = maybeFS$2.pause;
|
|
117306
|
+
filesystem$1.start = maybeFS$2.start;
|
|
117307
|
+
|
|
117308
|
+
const {types: types$6} = bundle;
|
|
117309
|
+
const {basename: basename$1, dirname} = require$$0$2;
|
|
117310
|
+
const {
|
|
117311
|
+
createDirectory,
|
|
117312
|
+
getFileType: getFileType$2,
|
|
117313
|
+
getFilename: getFilename$4,
|
|
117314
|
+
findFile: findFile$5,
|
|
117315
|
+
} = filesystem$1;
|
|
117316
|
+
|
|
117317
|
+
const {__filesystem_name: __filesystem_name$2} = json;
|
|
117318
|
+
const {replaceWith: replaceWith$1, getProperty: getProperty$2} = operate;
|
|
117319
|
+
|
|
117320
|
+
const {
|
|
117321
|
+
ObjectExpression: ObjectExpression$1,
|
|
117322
|
+
ArrayExpression: ArrayExpression$2,
|
|
117323
|
+
StringLiteral: StringLiteral$3,
|
|
117324
|
+
ObjectProperty: ObjectProperty$2,
|
|
117308
117325
|
isArrayExpression,
|
|
117309
117326
|
isStringLiteral,
|
|
117310
117327
|
isTemplateLiteral,
|
|
117311
|
-
} = types$
|
|
117328
|
+
} = types$6;
|
|
117312
117329
|
|
|
117313
117330
|
convertSimpleFilesystemToFilesystem.report = () => `Convert Simple Filesystem to Filesystem`;
|
|
117314
117331
|
|
|
@@ -117316,22 +117333,22 @@ const isDirectory = (a) => a.endsWith('/');
|
|
|
117316
117333
|
const getType = (a) => {
|
|
117317
117334
|
const type = isDirectory(a) ? 'directory' : 'file';
|
|
117318
117335
|
|
|
117319
|
-
return ObjectProperty$
|
|
117336
|
+
return ObjectProperty$2(StringLiteral$3('type'), StringLiteral$3(type));
|
|
117320
117337
|
};
|
|
117321
117338
|
|
|
117322
117339
|
const createFilename = (filename) => {
|
|
117323
|
-
return ObjectProperty$
|
|
117340
|
+
return ObjectProperty$2(StringLiteral$3('filename'), StringLiteral$3(filename));
|
|
117324
117341
|
};
|
|
117325
117342
|
|
|
117326
|
-
const getFiles$
|
|
117343
|
+
const getFiles$1 = (a) => {
|
|
117327
117344
|
if (isDirectory(a))
|
|
117328
|
-
return ObjectProperty$
|
|
117345
|
+
return ObjectProperty$2(StringLiteral$3('files'), ArrayExpression$2([]));
|
|
117329
117346
|
|
|
117330
117347
|
return null;
|
|
117331
117348
|
};
|
|
117332
117349
|
|
|
117333
117350
|
const getContent = (a) => {
|
|
117334
|
-
return ObjectProperty$
|
|
117351
|
+
return ObjectProperty$2(StringLiteral$3('content'), StringLiteral$3(a));
|
|
117335
117352
|
};
|
|
117336
117353
|
|
|
117337
117354
|
function parseContent(node, path) {
|
|
@@ -117345,7 +117362,7 @@ function parseContent(node, path) {
|
|
|
117345
117362
|
}
|
|
117346
117363
|
|
|
117347
117364
|
convertSimpleFilesystemToFilesystem.fix = (path) => {
|
|
117348
|
-
const array = ArrayExpression$
|
|
117365
|
+
const array = ArrayExpression$2([]);
|
|
117349
117366
|
|
|
117350
117367
|
for (const element of path.get('elements')) {
|
|
117351
117368
|
if (isArrayExpression(element)) {
|
|
@@ -117354,7 +117371,7 @@ convertSimpleFilesystemToFilesystem.fix = (path) => {
|
|
|
117354
117371
|
|
|
117355
117372
|
const content = parseContent(nodeContent, element);
|
|
117356
117373
|
|
|
117357
|
-
array.elements.push(ObjectExpression$
|
|
117374
|
+
array.elements.push(ObjectExpression$1([
|
|
117358
117375
|
getType(value),
|
|
117359
117376
|
createFilename(value),
|
|
117360
117377
|
getContent(content),
|
|
@@ -117365,10 +117382,10 @@ convertSimpleFilesystemToFilesystem.fix = (path) => {
|
|
|
117365
117382
|
if (isStringLiteral(element)) {
|
|
117366
117383
|
const {value} = element.node;
|
|
117367
117384
|
|
|
117368
|
-
array.elements.push(ObjectExpression$
|
|
117385
|
+
array.elements.push(ObjectExpression$1([
|
|
117369
117386
|
getType(value),
|
|
117370
117387
|
createFilename(noTrailingSlash(value)),
|
|
117371
|
-
getFiles$
|
|
117388
|
+
getFiles$1(value),
|
|
117372
117389
|
].filter(Boolean)));
|
|
117373
117390
|
continue;
|
|
117374
117391
|
}
|
|
@@ -117394,19 +117411,19 @@ const noTrailingSlash = (a) => {
|
|
|
117394
117411
|
};
|
|
117395
117412
|
|
|
117396
117413
|
function buildTree(path, list) {
|
|
117397
|
-
const [root, ...files] = findFile$
|
|
117414
|
+
const [root, ...files] = findFile$5(list, '*');
|
|
117398
117415
|
|
|
117399
117416
|
for (const filePath of files) {
|
|
117400
|
-
const filename = getFilename$
|
|
117417
|
+
const filename = getFilename$4(filePath);
|
|
117401
117418
|
|
|
117402
117419
|
check$2(filename);
|
|
117403
117420
|
|
|
117404
|
-
const type = getFileType$
|
|
117421
|
+
const type = getFileType$2(filePath);
|
|
117405
117422
|
const dir = dirname(filename);
|
|
117406
|
-
const name = basename$
|
|
117407
|
-
const [dirPath] = findFile$
|
|
117423
|
+
const name = basename$1(filename);
|
|
117424
|
+
const [dirPath] = findFile$5(root, dir);
|
|
117408
117425
|
|
|
117409
|
-
if (!dirPath || getFileType$
|
|
117426
|
+
if (!dirPath || getFileType$2(dirPath) !== 'directory')
|
|
117410
117427
|
throw Error(`☝️ Looks like directory '${dir}/' is missing`);
|
|
117411
117428
|
|
|
117412
117429
|
if (type === 'directory') {
|
|
@@ -117414,7 +117431,7 @@ function buildTree(path, list) {
|
|
|
117414
117431
|
continue;
|
|
117415
117432
|
}
|
|
117416
117433
|
|
|
117417
|
-
const filesProperty = getProperty$
|
|
117434
|
+
const filesProperty = getProperty$2(dirPath, 'files');
|
|
117418
117435
|
filesProperty.node.value.elements.push(filePath.node);
|
|
117419
117436
|
}
|
|
117420
117437
|
|
|
@@ -117428,22 +117445,22 @@ function check$2(filename) {
|
|
|
117428
117445
|
|
|
117429
117446
|
var convertFilesystemToSimpleFilesystem = {};
|
|
117430
117447
|
|
|
117431
|
-
const {types: types$
|
|
117432
|
-
const {replaceWith, getProperty: getProperty$
|
|
117448
|
+
const {types: types$5} = bundle;
|
|
117449
|
+
const {replaceWith, getProperty: getProperty$1} = operate;
|
|
117433
117450
|
const {__filesystem_name: __filesystem_name$1} = json;
|
|
117434
117451
|
|
|
117435
117452
|
const {
|
|
117436
|
-
findFile: findFile$
|
|
117437
|
-
getFilename: getFilename$
|
|
117438
|
-
getFileType: getFileType$
|
|
117439
|
-
} = filesystem$
|
|
117453
|
+
findFile: findFile$4,
|
|
117454
|
+
getFilename: getFilename$3,
|
|
117455
|
+
getFileType: getFileType$1,
|
|
117456
|
+
} = filesystem$1;
|
|
117440
117457
|
|
|
117441
117458
|
const {
|
|
117442
|
-
StringLiteral: StringLiteral$
|
|
117443
|
-
ArrayExpression: ArrayExpression$
|
|
117444
|
-
} = types$
|
|
117459
|
+
StringLiteral: StringLiteral$2,
|
|
117460
|
+
ArrayExpression: ArrayExpression$1,
|
|
117461
|
+
} = types$5;
|
|
117445
117462
|
|
|
117446
|
-
const {isArray: isArray$
|
|
117463
|
+
const {isArray: isArray$2} = Array;
|
|
117447
117464
|
const maybeAddSlash = (a) => a === '/' ? a : `${a}/`;
|
|
117448
117465
|
|
|
117449
117466
|
convertFilesystemToSimpleFilesystem.report = () => `Convert Filesystem to Simple Filesystem`;
|
|
@@ -117452,9 +117469,9 @@ convertFilesystemToSimpleFilesystem.fix = (root, {files}) => {
|
|
|
117452
117469
|
const names = [];
|
|
117453
117470
|
|
|
117454
117471
|
for (const file of files) {
|
|
117455
|
-
const filename = getFilename$
|
|
117456
|
-
const type = getFileType$
|
|
117457
|
-
const contentPath = getProperty$
|
|
117472
|
+
const filename = getFilename$3(file);
|
|
117473
|
+
const type = getFileType$1(file);
|
|
117474
|
+
const contentPath = getProperty$1(file, 'content');
|
|
117458
117475
|
const content = contentPath?.node?.value;
|
|
117459
117476
|
|
|
117460
117477
|
if (content) {
|
|
@@ -117473,24 +117490,24 @@ convertFilesystemToSimpleFilesystem.fix = (root, {files}) => {
|
|
|
117473
117490
|
const list = [];
|
|
117474
117491
|
|
|
117475
117492
|
for (const name of names) {
|
|
117476
|
-
if (isArray$
|
|
117477
|
-
list.push(ArrayExpression$
|
|
117478
|
-
StringLiteral$
|
|
117479
|
-
StringLiteral$
|
|
117493
|
+
if (isArray$2(name)) {
|
|
117494
|
+
list.push(ArrayExpression$1([
|
|
117495
|
+
StringLiteral$2(name[0]),
|
|
117496
|
+
StringLiteral$2(name[1]),
|
|
117480
117497
|
]));
|
|
117481
117498
|
continue;
|
|
117482
117499
|
}
|
|
117483
117500
|
|
|
117484
|
-
list.push(StringLiteral$
|
|
117501
|
+
list.push(StringLiteral$2(name));
|
|
117485
117502
|
}
|
|
117486
117503
|
|
|
117487
|
-
replaceWith(root, ArrayExpression$
|
|
117504
|
+
replaceWith(root, ArrayExpression$1(list));
|
|
117488
117505
|
};
|
|
117489
117506
|
|
|
117490
117507
|
convertFilesystemToSimpleFilesystem.traverse = ({push}) => ({
|
|
117491
117508
|
[`${__filesystem_name$1}(__object)`]: (path) => {
|
|
117492
117509
|
const root = path.get('arguments.0');
|
|
117493
|
-
const files = findFile$
|
|
117510
|
+
const files = findFile$4(root, '*');
|
|
117494
117511
|
|
|
117495
117512
|
push(root, {
|
|
117496
117513
|
files,
|
|
@@ -117498,15 +117515,15 @@ convertFilesystemToSimpleFilesystem.traverse = ({push}) => ({
|
|
|
117498
117515
|
},
|
|
117499
117516
|
});
|
|
117500
117517
|
|
|
117501
|
-
const fullstore$
|
|
117518
|
+
const fullstore$1 = fullstore$5;
|
|
117502
117519
|
const {compare: compare$1} = compare$5;
|
|
117503
117520
|
const {__filesystem_name} = json;
|
|
117504
117521
|
|
|
117505
117522
|
const {
|
|
117506
|
-
findFile: findFile$
|
|
117523
|
+
findFile: findFile$3,
|
|
117507
117524
|
pause,
|
|
117508
117525
|
start,
|
|
117509
|
-
} = filesystem$
|
|
117526
|
+
} = filesystem$2;
|
|
117510
117527
|
|
|
117511
117528
|
const log$1 = browserExports('putout:runner:scanner');
|
|
117512
117529
|
|
|
@@ -117558,7 +117575,7 @@ const createFileProgress = ({rule, progress}) => ({i, n}) => {
|
|
|
117558
117575
|
};
|
|
117559
117576
|
|
|
117560
117577
|
const createTrackFile = (fileProgress) => function*(...a) {
|
|
117561
|
-
const files = findFile$
|
|
117578
|
+
const files = findFile$3(...a);
|
|
117562
117579
|
const n = files.length;
|
|
117563
117580
|
|
|
117564
117581
|
for (const [i, file] of files.entries()) {
|
|
@@ -117576,7 +117593,7 @@ const getTraverse = ({scan, rule, progress}) => ({push, options}) => ({
|
|
|
117576
117593
|
progress.start(rule);
|
|
117577
117594
|
|
|
117578
117595
|
const rootPath = path.get('arguments.0');
|
|
117579
|
-
const isSimple = fullstore$
|
|
117596
|
+
const isSimple = fullstore$1(false);
|
|
117580
117597
|
|
|
117581
117598
|
const fileProgress = createFileProgress({
|
|
117582
117599
|
rule,
|
|
@@ -117660,7 +117677,7 @@ function parseVisitor(visitors) {
|
|
|
117660
117677
|
|
|
117661
117678
|
var template$3 = {exports: {}};
|
|
117662
117679
|
|
|
117663
|
-
const tryCatch$
|
|
117680
|
+
const tryCatch$2 = tryCatch$8;
|
|
117664
117681
|
|
|
117665
117682
|
const {
|
|
117666
117683
|
compareAny: compareAny$1,
|
|
@@ -117669,7 +117686,7 @@ const {
|
|
|
117669
117686
|
isTemplate: isTemplate$1,
|
|
117670
117687
|
} = compare$5;
|
|
117671
117688
|
|
|
117672
|
-
const maybeArray$
|
|
117689
|
+
const maybeArray$1 = maybeArray_1;
|
|
117673
117690
|
const debug$1 = browserExports('putout:runner:template');
|
|
117674
117691
|
|
|
117675
117692
|
const {entries: entries$3} = Object;
|
|
@@ -117703,8 +117720,8 @@ const exclude = ({rule, tmpl, fn, nodesExclude}) => {
|
|
|
117703
117720
|
|
|
117704
117721
|
template$3.exports = ({rule, visitor, options}) => {
|
|
117705
117722
|
const parsed = [];
|
|
117706
|
-
const nodesExclude = maybeArray$
|
|
117707
|
-
const nodesInclude = maybeArray$
|
|
117723
|
+
const nodesExclude = maybeArray$1(options.exclude);
|
|
117724
|
+
const nodesInclude = maybeArray$1(options.include);
|
|
117708
117725
|
|
|
117709
117726
|
for (const [tmpl, fn] of entries$3(visitor)) {
|
|
117710
117727
|
if (!tmpl)
|
|
@@ -117755,7 +117772,7 @@ function wrapWithCheck({rule, nodesInclude, nodesExclude, fn}) {
|
|
|
117755
117772
|
if (!isFn(fn))
|
|
117756
117773
|
throw Error(`☝️ Looks like provided visitor is not a function: ${stringify(fn)}. More on using Traverser: https://git.io/JqcMn`);
|
|
117757
117774
|
|
|
117758
|
-
const [e] = tryCatch$
|
|
117775
|
+
const [e] = tryCatch$2(fn, path);
|
|
117759
117776
|
|
|
117760
117777
|
if (e) {
|
|
117761
117778
|
e.rule = rule;
|
|
@@ -118548,7 +118565,7 @@ function cutBrackets(a) {
|
|
|
118548
118565
|
return a.replace(/\s\(\d:\d+\)/, '');
|
|
118549
118566
|
}
|
|
118550
118567
|
|
|
118551
|
-
const tryCatch$
|
|
118568
|
+
const tryCatch$1 = tryCatch$8;
|
|
118552
118569
|
const {defaultOptions: defaultOptions$1} = defaultOptions$4;
|
|
118553
118570
|
const {cutShebang: cutShebang$1} = shebang;
|
|
118554
118571
|
const parseError$1 = parseError$2;
|
|
@@ -118581,7 +118598,7 @@ transform$5.transform = (ast, source, opts) => {
|
|
|
118581
118598
|
|
|
118582
118599
|
const [, shebang] = cutShebang$1(source);
|
|
118583
118600
|
|
|
118584
|
-
const [validationError] = tryCatch$
|
|
118601
|
+
const [validationError] = tryCatch$1(validateRules, {
|
|
118585
118602
|
rules,
|
|
118586
118603
|
pluginNames,
|
|
118587
118604
|
});
|
|
@@ -118623,7 +118640,7 @@ transform$5.transformAsync = async (ast, source, opts) => {
|
|
|
118623
118640
|
|
|
118624
118641
|
const [, shebang] = cutShebang$1(source);
|
|
118625
118642
|
|
|
118626
|
-
const [validationError] = tryCatch$
|
|
118643
|
+
const [validationError] = tryCatch$1(validateRules, {
|
|
118627
118644
|
rules,
|
|
118628
118645
|
pluginNames,
|
|
118629
118646
|
});
|
|
@@ -118667,8 +118684,8 @@ findPlaces$2.findPlacesAsync = async (ast, source, opts) => {
|
|
|
118667
118684
|
});
|
|
118668
118685
|
};
|
|
118669
118686
|
|
|
118670
|
-
const {isArray: isArray$
|
|
118671
|
-
const noop$
|
|
118687
|
+
const {isArray: isArray$1} = Array;
|
|
118688
|
+
const noop$1 = () => {};
|
|
118672
118689
|
|
|
118673
118690
|
var report$3 = () => {
|
|
118674
118691
|
let filesCount = 0;
|
|
@@ -118682,11 +118699,11 @@ var report$3 = () => {
|
|
|
118682
118699
|
places,
|
|
118683
118700
|
index = 0,
|
|
118684
118701
|
count = 1,
|
|
118685
|
-
trace = noop$
|
|
118702
|
+
trace = noop$1,
|
|
118686
118703
|
formatterOptions = {},
|
|
118687
118704
|
} = options;
|
|
118688
118705
|
|
|
118689
|
-
if (!isArray$
|
|
118706
|
+
if (!isArray$1(places))
|
|
118690
118707
|
throw Error(`☝️ Looks like for 'places: Places[]' you passed the wrong type: '${typeof places}'`);
|
|
118691
118708
|
|
|
118692
118709
|
if (places.length)
|
|
@@ -118724,7 +118741,7 @@ report$3.default;
|
|
|
118724
118741
|
|
|
118725
118742
|
var traverse$5 = {};
|
|
118726
118743
|
|
|
118727
|
-
const {types: types$
|
|
118744
|
+
const {types: types$4, traverse: babelTraverse} = bundle;
|
|
118728
118745
|
|
|
118729
118746
|
const {
|
|
118730
118747
|
compare,
|
|
@@ -118733,7 +118750,7 @@ const {
|
|
|
118733
118750
|
getTemplateValues,
|
|
118734
118751
|
} = compare$5;
|
|
118735
118752
|
|
|
118736
|
-
const {isFile, isProgram: isProgram$
|
|
118753
|
+
const {isFile, isProgram: isProgram$1} = types$4;
|
|
118737
118754
|
const {merge} = babelTraverse.visitors;
|
|
118738
118755
|
const {entries: entries$2} = Object;
|
|
118739
118756
|
|
|
@@ -118744,7 +118761,7 @@ const createTraverse = (path) => {
|
|
|
118744
118761
|
if (isPath(path))
|
|
118745
118762
|
return path.traverse.bind(path);
|
|
118746
118763
|
|
|
118747
|
-
const noScope = !isFile(path) && !isProgram$
|
|
118764
|
+
const noScope = !isFile(path) && !isProgram$1(path);
|
|
118748
118765
|
|
|
118749
118766
|
return (visitors) => {
|
|
118750
118767
|
babelTraverse(path, {
|
|
@@ -125921,16 +125938,16 @@ var addArgs = {};
|
|
|
125921
125938
|
|
|
125922
125939
|
const {compareAny} = compare$5;
|
|
125923
125940
|
const {template: template$1} = parser$6;
|
|
125924
|
-
const {types: types$
|
|
125941
|
+
const {types: types$3} = bundle;
|
|
125925
125942
|
const {
|
|
125926
125943
|
ObjectPattern,
|
|
125927
|
-
ObjectProperty: ObjectProperty$
|
|
125944
|
+
ObjectProperty: ObjectProperty$1,
|
|
125928
125945
|
isBlockStatement,
|
|
125929
125946
|
isFunction,
|
|
125930
125947
|
isLabeledStatement,
|
|
125931
125948
|
isObjectPattern,
|
|
125932
125949
|
isCallExpression,
|
|
125933
|
-
} = types$
|
|
125950
|
+
} = types$3;
|
|
125934
125951
|
|
|
125935
125952
|
const {entries: entries$1} = Object;
|
|
125936
125953
|
|
|
@@ -126032,12 +126049,12 @@ const traverse$1 = (args) => ({push, options}) => {
|
|
|
126032
126049
|
function createProperty(node) {
|
|
126033
126050
|
if (!isLabeledStatement(node)) {
|
|
126034
126051
|
const {expression} = node;
|
|
126035
|
-
return ObjectProperty$
|
|
126052
|
+
return ObjectProperty$1(expression, expression, !COMPUTED, SHORTHAND);
|
|
126036
126053
|
}
|
|
126037
126054
|
|
|
126038
126055
|
const {label, body} = node;
|
|
126039
126056
|
|
|
126040
|
-
return ObjectProperty$
|
|
126057
|
+
return ObjectProperty$1(label, body.expression, !COMPUTED, SHORTHAND);
|
|
126041
126058
|
}
|
|
126042
126059
|
|
|
126043
126060
|
function getObjectPattern(params) {
|
|
@@ -126052,6 +126069,399 @@ function getObjectPattern(params) {
|
|
|
126052
126069
|
];
|
|
126053
126070
|
}
|
|
126054
126071
|
|
|
126072
|
+
var filesystem = {};
|
|
126073
|
+
|
|
126074
|
+
var maybeFs = {};
|
|
126075
|
+
|
|
126076
|
+
const fullstore = fullstore$5;
|
|
126077
|
+
const driverStore = fullstore();
|
|
126078
|
+
|
|
126079
|
+
const {assign} = Object;
|
|
126080
|
+
const noop = () => {};
|
|
126081
|
+
const returns = (a) => () => a;
|
|
126082
|
+
|
|
126083
|
+
const defaultFS = {
|
|
126084
|
+
renameFile: noop,
|
|
126085
|
+
removeFile: noop,
|
|
126086
|
+
createDirectory: noop,
|
|
126087
|
+
readFileContent: returns(''),
|
|
126088
|
+
writeFileContent: noop,
|
|
126089
|
+
copyFile: noop,
|
|
126090
|
+
};
|
|
126091
|
+
|
|
126092
|
+
const maybeFS$1 = assign({}, defaultFS);
|
|
126093
|
+
|
|
126094
|
+
maybeFs.renameFile = (oldName, newName) => {
|
|
126095
|
+
maybeFS$1.renameFile(oldName, newName);
|
|
126096
|
+
};
|
|
126097
|
+
|
|
126098
|
+
maybeFs.removeFile = (name) => {
|
|
126099
|
+
maybeFS$1.removeFile(name);
|
|
126100
|
+
};
|
|
126101
|
+
|
|
126102
|
+
maybeFs.copyFile = (from, to) => {
|
|
126103
|
+
maybeFS$1.copyFile(from, to);
|
|
126104
|
+
};
|
|
126105
|
+
|
|
126106
|
+
maybeFs.createDirectory = (name) => {
|
|
126107
|
+
maybeFS$1.createDirectory(name);
|
|
126108
|
+
};
|
|
126109
|
+
|
|
126110
|
+
maybeFs.readFileContent = (name) => {
|
|
126111
|
+
return maybeFS$1.readFileContent(name);
|
|
126112
|
+
};
|
|
126113
|
+
|
|
126114
|
+
maybeFs.writeFileContent = (name, content) => {
|
|
126115
|
+
maybeFS$1.writeFileContent(name, content);
|
|
126116
|
+
};
|
|
126117
|
+
|
|
126118
|
+
maybeFs.init = init;
|
|
126119
|
+
|
|
126120
|
+
function init(fsDriver) {
|
|
126121
|
+
assign(maybeFS$1, fsDriver);
|
|
126122
|
+
}
|
|
126123
|
+
|
|
126124
|
+
maybeFs.pause = () => {
|
|
126125
|
+
driverStore(maybeFS$1);
|
|
126126
|
+
deinit();
|
|
126127
|
+
};
|
|
126128
|
+
|
|
126129
|
+
maybeFs.start = () => {
|
|
126130
|
+
init(driverStore());
|
|
126131
|
+
};
|
|
126132
|
+
|
|
126133
|
+
maybeFs.deinit = deinit;
|
|
126134
|
+
|
|
126135
|
+
function deinit() {
|
|
126136
|
+
assign(maybeFS$1, defaultFS);
|
|
126137
|
+
}
|
|
126138
|
+
|
|
126139
|
+
const {join: join$2, basename} = require$$0$2;
|
|
126140
|
+
const tryCatch = tryCatch$8;
|
|
126141
|
+
const {types: types$2} = bundle;
|
|
126142
|
+
|
|
126143
|
+
const {
|
|
126144
|
+
setLiteralValue,
|
|
126145
|
+
getProperty,
|
|
126146
|
+
traverseProperties: traverseProperties$1,
|
|
126147
|
+
} = operate;
|
|
126148
|
+
|
|
126149
|
+
const maybeFS = maybeFs;
|
|
126150
|
+
const isString$2 = (a) => typeof a === 'string';
|
|
126151
|
+
const {isArray} = Array;
|
|
126152
|
+
const maybeArray = (a) => isArray(a) ? a : [a];
|
|
126153
|
+
|
|
126154
|
+
const toBase64 = (content) => {
|
|
126155
|
+
const [e, result] = tryCatch(btoa, content);
|
|
126156
|
+
|
|
126157
|
+
if (e)
|
|
126158
|
+
return btoa(encodeURI(content));
|
|
126159
|
+
|
|
126160
|
+
return result;
|
|
126161
|
+
};
|
|
126162
|
+
|
|
126163
|
+
const fromBase64 = (content) => {
|
|
126164
|
+
const [e, decoded] = tryCatch(atob, content);
|
|
126165
|
+
|
|
126166
|
+
if (!e)
|
|
126167
|
+
return decodeURI(decoded);
|
|
126168
|
+
|
|
126169
|
+
return content;
|
|
126170
|
+
};
|
|
126171
|
+
|
|
126172
|
+
const {
|
|
126173
|
+
ObjectExpression,
|
|
126174
|
+
ArrayExpression,
|
|
126175
|
+
StringLiteral: StringLiteral$1,
|
|
126176
|
+
ObjectProperty,
|
|
126177
|
+
isProgram,
|
|
126178
|
+
} = types$2;
|
|
126179
|
+
|
|
126180
|
+
const getRegExp = (wildcard) => {
|
|
126181
|
+
const escaped = wildcard
|
|
126182
|
+
.replace(/\./g, '\\.')
|
|
126183
|
+
.replace(/\*/g, '.*')
|
|
126184
|
+
.replace('?', '.?');
|
|
126185
|
+
|
|
126186
|
+
return RegExp(`^${escaped}$`);
|
|
126187
|
+
};
|
|
126188
|
+
|
|
126189
|
+
filesystem.getParentDirectory = (filePath) => {
|
|
126190
|
+
const {parentPath} = filePath.parentPath.parentPath;
|
|
126191
|
+
|
|
126192
|
+
if (isProgram(parentPath))
|
|
126193
|
+
return null;
|
|
126194
|
+
|
|
126195
|
+
return parentPath;
|
|
126196
|
+
};
|
|
126197
|
+
|
|
126198
|
+
filesystem.findFile = findFile$2;
|
|
126199
|
+
|
|
126200
|
+
function findFile$2(node, name) {
|
|
126201
|
+
checkName(name);
|
|
126202
|
+
|
|
126203
|
+
const filePaths = [];
|
|
126204
|
+
const names = maybeArray(name);
|
|
126205
|
+
|
|
126206
|
+
for (const filenamePath of traverseProperties$1(node, 'filename')) {
|
|
126207
|
+
const {value} = filenamePath.node.value;
|
|
126208
|
+
const base = basename(value);
|
|
126209
|
+
|
|
126210
|
+
for (const name of names) {
|
|
126211
|
+
if (value === name || getRegExp(name).test(base))
|
|
126212
|
+
filePaths.push(filenamePath.parentPath);
|
|
126213
|
+
}
|
|
126214
|
+
}
|
|
126215
|
+
|
|
126216
|
+
return filePaths;
|
|
126217
|
+
}
|
|
126218
|
+
|
|
126219
|
+
function checkName(name) {
|
|
126220
|
+
if (!isString$2(name) && !isArray(name))
|
|
126221
|
+
throw Error(`☝️ Looks like you forget to pass the 'name' of a file to 'findFile(filePath: Path|FilePath, name: string | string[]): FilePath'`);
|
|
126222
|
+
}
|
|
126223
|
+
|
|
126224
|
+
function getFilenamePath(filePath) {
|
|
126225
|
+
const filenamePath = getProperty(filePath, 'filename');
|
|
126226
|
+
return filenamePath.get('value');
|
|
126227
|
+
}
|
|
126228
|
+
|
|
126229
|
+
function getFilename$2(filePath) {
|
|
126230
|
+
const {value} = getFilenamePath(filePath).node;
|
|
126231
|
+
return value;
|
|
126232
|
+
}
|
|
126233
|
+
|
|
126234
|
+
filesystem.getFileType = getFileType;
|
|
126235
|
+
|
|
126236
|
+
function getFileType(filePath) {
|
|
126237
|
+
const typePath = getProperty(filePath, 'type');
|
|
126238
|
+
return typePath.node.value.value;
|
|
126239
|
+
}
|
|
126240
|
+
|
|
126241
|
+
filesystem.getFileContent = getFileContent;
|
|
126242
|
+
|
|
126243
|
+
function getFileContent(filePath) {
|
|
126244
|
+
const content = getProperty(filePath, 'content');
|
|
126245
|
+
|
|
126246
|
+
return [
|
|
126247
|
+
Boolean(content),
|
|
126248
|
+
content?.node.value.value,
|
|
126249
|
+
];
|
|
126250
|
+
}
|
|
126251
|
+
|
|
126252
|
+
filesystem.getFilename = getFilename$2;
|
|
126253
|
+
|
|
126254
|
+
filesystem.renameFile = (filePath, name) => {
|
|
126255
|
+
const oldName = getFilename$2(filePath);
|
|
126256
|
+
const valuePath = getFilenamePath(filePath);
|
|
126257
|
+
const baseName = oldName
|
|
126258
|
+
.split('/')
|
|
126259
|
+
.pop();
|
|
126260
|
+
|
|
126261
|
+
const newName = name
|
|
126262
|
+
.split('/')
|
|
126263
|
+
.pop();
|
|
126264
|
+
|
|
126265
|
+
const newFilename = oldName.replace(baseName, newName);
|
|
126266
|
+
|
|
126267
|
+
setLiteralValue(valuePath, newFilename);
|
|
126268
|
+
maybeFS.renameFile(oldName, newFilename);
|
|
126269
|
+
};
|
|
126270
|
+
|
|
126271
|
+
filesystem.removeFile = (filePath) => {
|
|
126272
|
+
const filename = getFilename$2(filePath);
|
|
126273
|
+
|
|
126274
|
+
filePath.remove();
|
|
126275
|
+
maybeFS.removeFile(filename);
|
|
126276
|
+
};
|
|
126277
|
+
|
|
126278
|
+
filesystem.moveFile = (filePath, dirPath) => {
|
|
126279
|
+
if (filePath === dirPath)
|
|
126280
|
+
return;
|
|
126281
|
+
|
|
126282
|
+
const dirname = getFilename$2(dirPath);
|
|
126283
|
+
const filename = getFilename$2(filePath);
|
|
126284
|
+
const dirPathFiles = getProperty(dirPath, 'files');
|
|
126285
|
+
const filenamePath = getProperty(filePath, 'filename');
|
|
126286
|
+
|
|
126287
|
+
const basename = filename
|
|
126288
|
+
.split('/')
|
|
126289
|
+
.pop();
|
|
126290
|
+
|
|
126291
|
+
const newFilename = join$2(dirname, basename);
|
|
126292
|
+
|
|
126293
|
+
maybeRemoveFile(dirPath, newFilename);
|
|
126294
|
+
|
|
126295
|
+
setLiteralValue(filenamePath.get('value'), newFilename);
|
|
126296
|
+
dirPathFiles.node.value.elements.push(filePath.node);
|
|
126297
|
+
|
|
126298
|
+
filePath.remove();
|
|
126299
|
+
maybeFS.renameFile(filename, newFilename);
|
|
126300
|
+
};
|
|
126301
|
+
|
|
126302
|
+
filesystem.copyFile = (filePath, dirPath) => {
|
|
126303
|
+
const dirname = getFilename$2(dirPath);
|
|
126304
|
+
const filename = getFilename$2(filePath);
|
|
126305
|
+
|
|
126306
|
+
const basename = filename
|
|
126307
|
+
.split('/')
|
|
126308
|
+
.pop();
|
|
126309
|
+
|
|
126310
|
+
const newFilename = join$2(dirname, basename);
|
|
126311
|
+
const [hasContent, content] = getFileContent(filePath);
|
|
126312
|
+
|
|
126313
|
+
const copiedFile = ObjectExpression([
|
|
126314
|
+
createTypeProperty('file'),
|
|
126315
|
+
createFilenameProperty(newFilename),
|
|
126316
|
+
hasContent && createContentProperty(content),
|
|
126317
|
+
].filter(Boolean));
|
|
126318
|
+
|
|
126319
|
+
maybeRemoveFile(dirPath, newFilename);
|
|
126320
|
+
|
|
126321
|
+
const dirPathFiles = getFiles(dirPath);
|
|
126322
|
+
dirPathFiles.node.value.elements.push(copiedFile);
|
|
126323
|
+
|
|
126324
|
+
maybeFS.copyFile(filename, newFilename);
|
|
126325
|
+
};
|
|
126326
|
+
|
|
126327
|
+
function maybeRemoveFile(dirPath, filename) {
|
|
126328
|
+
const type = getFileType(dirPath);
|
|
126329
|
+
|
|
126330
|
+
if (type !== 'directory') {
|
|
126331
|
+
const filename = getFilename$2(dirPath);
|
|
126332
|
+
throw Error(`☝️ Looks like '${filename}' is not a directory, but: '${type}'. Rename to '${filename}/'`);
|
|
126333
|
+
}
|
|
126334
|
+
|
|
126335
|
+
const dirPathFiles = getProperty(dirPath, 'files');
|
|
126336
|
+
const name = join$2(getFilename$2(dirPath), basename(filename));
|
|
126337
|
+
const [fileToOverwrite] = findFile$2(dirPathFiles, name);
|
|
126338
|
+
|
|
126339
|
+
if (!fileToOverwrite)
|
|
126340
|
+
return;
|
|
126341
|
+
|
|
126342
|
+
fileToOverwrite.remove();
|
|
126343
|
+
}
|
|
126344
|
+
|
|
126345
|
+
const createTypeProperty = (type) => ObjectProperty(StringLiteral$1('type'), StringLiteral$1(type));
|
|
126346
|
+
|
|
126347
|
+
filesystem.createTypeProperty = createTypeProperty;
|
|
126348
|
+
|
|
126349
|
+
const createFilesProperty = (files) => ObjectProperty(StringLiteral$1('files'), ArrayExpression(files));
|
|
126350
|
+
|
|
126351
|
+
filesystem.createFilesProperty = createFilesProperty;
|
|
126352
|
+
|
|
126353
|
+
const createFilenameProperty = (filename) => ObjectProperty(StringLiteral$1('filename'), StringLiteral$1(filename));
|
|
126354
|
+
|
|
126355
|
+
filesystem.createFilenameProperty = createFilenameProperty;
|
|
126356
|
+
|
|
126357
|
+
const createContentProperty = (content) => ObjectProperty(StringLiteral$1('content'), StringLiteral$1(content));
|
|
126358
|
+
|
|
126359
|
+
filesystem.createContentProperty = createContentProperty;
|
|
126360
|
+
|
|
126361
|
+
filesystem.createFile = (dirPath, name, content) => {
|
|
126362
|
+
maybeRemoveFile(dirPath, name);
|
|
126363
|
+
|
|
126364
|
+
const dirPathFiles = getFiles(dirPath);
|
|
126365
|
+
const parentFilename = getFilename$2(dirPath);
|
|
126366
|
+
const filename = join$2(parentFilename, name);
|
|
126367
|
+
|
|
126368
|
+
const typeProperty = createTypeProperty('file');
|
|
126369
|
+
const filenameProperty = createFilenameProperty(filename);
|
|
126370
|
+
|
|
126371
|
+
const properties = [
|
|
126372
|
+
typeProperty,
|
|
126373
|
+
filenameProperty,
|
|
126374
|
+
content && createContentProperty(content),
|
|
126375
|
+
].filter(Boolean);
|
|
126376
|
+
|
|
126377
|
+
dirPathFiles.node.value.elements.push(ObjectExpression(properties));
|
|
126378
|
+
|
|
126379
|
+
const filePath = dirPathFiles
|
|
126380
|
+
.get('value.elements')
|
|
126381
|
+
.at(-1);
|
|
126382
|
+
|
|
126383
|
+
if (isString$2(content))
|
|
126384
|
+
writeFileContent$1(filePath, content);
|
|
126385
|
+
|
|
126386
|
+
return filePath;
|
|
126387
|
+
};
|
|
126388
|
+
|
|
126389
|
+
function getFiles(dirPath) {
|
|
126390
|
+
return getProperty(dirPath, 'files');
|
|
126391
|
+
}
|
|
126392
|
+
|
|
126393
|
+
filesystem.createDirectory = (dirPath, name) => {
|
|
126394
|
+
const dirPathFiles = getFiles(dirPath);
|
|
126395
|
+
const parentFilename = getFilename$2(dirPath);
|
|
126396
|
+
const filename = join$2(parentFilename, name);
|
|
126397
|
+
|
|
126398
|
+
const typeProperty = createTypeProperty('directory');
|
|
126399
|
+
const filesProperty = createFilesProperty([]);
|
|
126400
|
+
const filenameProperty = createFilenameProperty(filename);
|
|
126401
|
+
|
|
126402
|
+
dirPathFiles.node.value.elements.push(ObjectExpression([
|
|
126403
|
+
typeProperty,
|
|
126404
|
+
filenameProperty,
|
|
126405
|
+
filesProperty,
|
|
126406
|
+
]));
|
|
126407
|
+
|
|
126408
|
+
maybeFS.createDirectory(filename);
|
|
126409
|
+
|
|
126410
|
+
return dirPathFiles
|
|
126411
|
+
.get('value.elements')
|
|
126412
|
+
.at(-1);
|
|
126413
|
+
};
|
|
126414
|
+
|
|
126415
|
+
filesystem.readFileContent = (filePath) => {
|
|
126416
|
+
const fileType = getFileType(filePath);
|
|
126417
|
+
|
|
126418
|
+
if (fileType === 'directory')
|
|
126419
|
+
return '';
|
|
126420
|
+
|
|
126421
|
+
const [hasContent, content] = getFileContent(filePath);
|
|
126422
|
+
|
|
126423
|
+
if (hasContent)
|
|
126424
|
+
return fromBase64(content);
|
|
126425
|
+
|
|
126426
|
+
const filename = getFilename$2(filePath);
|
|
126427
|
+
const fileContent = maybeFS.readFileContent(filename);
|
|
126428
|
+
|
|
126429
|
+
const property = createContentProperty(toBase64(fileContent));
|
|
126430
|
+
|
|
126431
|
+
filePath.node.properties.push(property);
|
|
126432
|
+
|
|
126433
|
+
return fileContent;
|
|
126434
|
+
};
|
|
126435
|
+
|
|
126436
|
+
filesystem.writeFileContent = writeFileContent$1;
|
|
126437
|
+
|
|
126438
|
+
function writeFileContent$1(filePath, content) {
|
|
126439
|
+
const fileType = getFileType(filePath);
|
|
126440
|
+
|
|
126441
|
+
if (fileType === 'directory')
|
|
126442
|
+
return;
|
|
126443
|
+
|
|
126444
|
+
const filename = getFilename$2(filePath);
|
|
126445
|
+
|
|
126446
|
+
maybeFS.writeFileContent(filename, content);
|
|
126447
|
+
|
|
126448
|
+
const contentPath = getProperty(filePath, 'content');
|
|
126449
|
+
|
|
126450
|
+
if (contentPath) {
|
|
126451
|
+
setLiteralValue(contentPath.node.value, toBase64(content));
|
|
126452
|
+
return;
|
|
126453
|
+
}
|
|
126454
|
+
|
|
126455
|
+
const property = createContentProperty(toBase64(content));
|
|
126456
|
+
filePath.node.properties.push(property);
|
|
126457
|
+
}
|
|
126458
|
+
|
|
126459
|
+
filesystem.init = maybeFS.init;
|
|
126460
|
+
filesystem.deinit = maybeFS.deinit;
|
|
126461
|
+
|
|
126462
|
+
filesystem.pause = maybeFS.pause;
|
|
126463
|
+
filesystem.start = maybeFS.start;
|
|
126464
|
+
|
|
126055
126465
|
var matchFiles = {};
|
|
126056
126466
|
|
|
126057
126467
|
// A simple implementation of make-array
|
|
@@ -126394,11 +126804,11 @@ const makeRegex = (pattern, ignoreCase) => {
|
|
|
126394
126804
|
: new RegExp(source)
|
|
126395
126805
|
};
|
|
126396
126806
|
|
|
126397
|
-
const isString$
|
|
126807
|
+
const isString$1 = subject => typeof subject === 'string';
|
|
126398
126808
|
|
|
126399
126809
|
// > A blank line matches no files, so it can serve as a separator for readability.
|
|
126400
126810
|
const checkPattern = pattern => pattern
|
|
126401
|
-
&& isString$
|
|
126811
|
+
&& isString$1(pattern)
|
|
126402
126812
|
&& !REGEX_TEST_BLANK_LINE.test(pattern)
|
|
126403
126813
|
&& !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern)
|
|
126404
126814
|
|
|
@@ -126454,7 +126864,7 @@ const throwError = (message, Ctor) => {
|
|
|
126454
126864
|
};
|
|
126455
126865
|
|
|
126456
126866
|
const checkPath = (path, originalPath, doThrow) => {
|
|
126457
|
-
if (!isString$
|
|
126867
|
+
if (!isString$1(path)) {
|
|
126458
126868
|
return doThrow(
|
|
126459
126869
|
`path must be a string, but got \`${originalPath}\``,
|
|
126460
126870
|
TypeError
|
|
@@ -126522,7 +126932,7 @@ class Ignore {
|
|
|
126522
126932
|
this._added = false;
|
|
126523
126933
|
|
|
126524
126934
|
makeArray(
|
|
126525
|
-
isString$
|
|
126935
|
+
isString$1(pattern)
|
|
126526
126936
|
? splitPattern(pattern)
|
|
126527
126937
|
: pattern
|
|
126528
126938
|
).forEach(this._addPattern, this);
|
|
@@ -126724,399 +127134,6 @@ function mergeIgnores(ignores) {
|
|
|
126724
127134
|
|
|
126725
127135
|
ignores$2.default;
|
|
126726
127136
|
|
|
126727
|
-
var filesystem$1 = {};
|
|
126728
|
-
|
|
126729
|
-
var maybeFs$1 = {};
|
|
126730
|
-
|
|
126731
|
-
const fullstore$1 = fullstore$6;
|
|
126732
|
-
const driverStore$1 = fullstore$1();
|
|
126733
|
-
|
|
126734
|
-
const {assign: assign$1} = Object;
|
|
126735
|
-
const noop$1 = () => {};
|
|
126736
|
-
const returns$1 = (a) => () => a;
|
|
126737
|
-
|
|
126738
|
-
const defaultFS$1 = {
|
|
126739
|
-
renameFile: noop$1,
|
|
126740
|
-
removeFile: noop$1,
|
|
126741
|
-
createDirectory: noop$1,
|
|
126742
|
-
readFileContent: returns$1(''),
|
|
126743
|
-
writeFileContent: noop$1,
|
|
126744
|
-
copyFile: noop$1,
|
|
126745
|
-
};
|
|
126746
|
-
|
|
126747
|
-
const maybeFS$3 = assign$1({}, defaultFS$1);
|
|
126748
|
-
|
|
126749
|
-
maybeFs$1.renameFile = (oldName, newName) => {
|
|
126750
|
-
maybeFS$3.renameFile(oldName, newName);
|
|
126751
|
-
};
|
|
126752
|
-
|
|
126753
|
-
maybeFs$1.removeFile = (name) => {
|
|
126754
|
-
maybeFS$3.removeFile(name);
|
|
126755
|
-
};
|
|
126756
|
-
|
|
126757
|
-
maybeFs$1.copyFile = (from, to) => {
|
|
126758
|
-
maybeFS$3.copyFile(from, to);
|
|
126759
|
-
};
|
|
126760
|
-
|
|
126761
|
-
maybeFs$1.createDirectory = (name) => {
|
|
126762
|
-
maybeFS$3.createDirectory(name);
|
|
126763
|
-
};
|
|
126764
|
-
|
|
126765
|
-
maybeFs$1.readFileContent = (name) => {
|
|
126766
|
-
return maybeFS$3.readFileContent(name);
|
|
126767
|
-
};
|
|
126768
|
-
|
|
126769
|
-
maybeFs$1.writeFileContent = (name, content) => {
|
|
126770
|
-
maybeFS$3.writeFileContent(name, content);
|
|
126771
|
-
};
|
|
126772
|
-
|
|
126773
|
-
maybeFs$1.init = init$1;
|
|
126774
|
-
|
|
126775
|
-
function init$1(fsDriver) {
|
|
126776
|
-
assign$1(maybeFS$3, fsDriver);
|
|
126777
|
-
}
|
|
126778
|
-
|
|
126779
|
-
maybeFs$1.pause = () => {
|
|
126780
|
-
driverStore$1(maybeFS$3);
|
|
126781
|
-
deinit$1();
|
|
126782
|
-
};
|
|
126783
|
-
|
|
126784
|
-
maybeFs$1.start = () => {
|
|
126785
|
-
init$1(driverStore$1());
|
|
126786
|
-
};
|
|
126787
|
-
|
|
126788
|
-
maybeFs$1.deinit = deinit$1;
|
|
126789
|
-
|
|
126790
|
-
function deinit$1() {
|
|
126791
|
-
assign$1(maybeFS$3, defaultFS$1);
|
|
126792
|
-
}
|
|
126793
|
-
|
|
126794
|
-
const {join: join$3, basename: basename$1} = require$$0$2;
|
|
126795
|
-
const tryCatch$1 = tryCatch$9;
|
|
126796
|
-
const {types: types$3} = bundle;
|
|
126797
|
-
|
|
126798
|
-
const {
|
|
126799
|
-
setLiteralValue: setLiteralValue$1,
|
|
126800
|
-
getProperty: getProperty$1,
|
|
126801
|
-
traverseProperties: traverseProperties$2,
|
|
126802
|
-
} = operate;
|
|
126803
|
-
|
|
126804
|
-
const maybeFS$2 = maybeFs$1;
|
|
126805
|
-
const isString$2 = (a) => typeof a === 'string';
|
|
126806
|
-
const {isArray: isArray$1} = Array;
|
|
126807
|
-
const maybeArray$1 = (a) => isArray$1(a) ? a : [a];
|
|
126808
|
-
|
|
126809
|
-
const toBase64$1 = (content) => {
|
|
126810
|
-
const [e, result] = tryCatch$1(btoa, content);
|
|
126811
|
-
|
|
126812
|
-
if (e)
|
|
126813
|
-
return btoa(encodeURI(content));
|
|
126814
|
-
|
|
126815
|
-
return result;
|
|
126816
|
-
};
|
|
126817
|
-
|
|
126818
|
-
const fromBase64$1 = (content) => {
|
|
126819
|
-
const [e, decoded] = tryCatch$1(atob, content);
|
|
126820
|
-
|
|
126821
|
-
if (!e)
|
|
126822
|
-
return decodeURI(decoded);
|
|
126823
|
-
|
|
126824
|
-
return content;
|
|
126825
|
-
};
|
|
126826
|
-
|
|
126827
|
-
const {
|
|
126828
|
-
ObjectExpression: ObjectExpression$1,
|
|
126829
|
-
ArrayExpression: ArrayExpression$1,
|
|
126830
|
-
StringLiteral: StringLiteral$2,
|
|
126831
|
-
ObjectProperty: ObjectProperty$1,
|
|
126832
|
-
isProgram: isProgram$1,
|
|
126833
|
-
} = types$3;
|
|
126834
|
-
|
|
126835
|
-
const getRegExp$1 = (wildcard) => {
|
|
126836
|
-
const escaped = wildcard
|
|
126837
|
-
.replace(/\./g, '\\.')
|
|
126838
|
-
.replace(/\*/g, '.*')
|
|
126839
|
-
.replace('?', '.?');
|
|
126840
|
-
|
|
126841
|
-
return RegExp(`^${escaped}$`);
|
|
126842
|
-
};
|
|
126843
|
-
|
|
126844
|
-
filesystem$1.getParentDirectory = (filePath) => {
|
|
126845
|
-
const {parentPath} = filePath.parentPath.parentPath;
|
|
126846
|
-
|
|
126847
|
-
if (isProgram$1(parentPath))
|
|
126848
|
-
return null;
|
|
126849
|
-
|
|
126850
|
-
return parentPath;
|
|
126851
|
-
};
|
|
126852
|
-
|
|
126853
|
-
filesystem$1.findFile = findFile$3;
|
|
126854
|
-
|
|
126855
|
-
function findFile$3(node, name) {
|
|
126856
|
-
checkName$1(name);
|
|
126857
|
-
|
|
126858
|
-
const filePaths = [];
|
|
126859
|
-
const names = maybeArray$1(name);
|
|
126860
|
-
|
|
126861
|
-
for (const filenamePath of traverseProperties$2(node, 'filename')) {
|
|
126862
|
-
const {value} = filenamePath.node.value;
|
|
126863
|
-
const base = basename$1(value);
|
|
126864
|
-
|
|
126865
|
-
for (const name of names) {
|
|
126866
|
-
if (value === name || getRegExp$1(name).test(base))
|
|
126867
|
-
filePaths.push(filenamePath.parentPath);
|
|
126868
|
-
}
|
|
126869
|
-
}
|
|
126870
|
-
|
|
126871
|
-
return filePaths;
|
|
126872
|
-
}
|
|
126873
|
-
|
|
126874
|
-
function checkName$1(name) {
|
|
126875
|
-
if (!isString$2(name) && !isArray$1(name))
|
|
126876
|
-
throw Error(`☝️ Looks like you forget to pass the 'name' of a file to 'findFile(filePath: Path|FilePath, name: string | string[]): FilePath'`);
|
|
126877
|
-
}
|
|
126878
|
-
|
|
126879
|
-
function getFilenamePath$1(filePath) {
|
|
126880
|
-
const filenamePath = getProperty$1(filePath, 'filename');
|
|
126881
|
-
return filenamePath.get('value');
|
|
126882
|
-
}
|
|
126883
|
-
|
|
126884
|
-
function getFilename$3(filePath) {
|
|
126885
|
-
const {value} = getFilenamePath$1(filePath).node;
|
|
126886
|
-
return value;
|
|
126887
|
-
}
|
|
126888
|
-
|
|
126889
|
-
filesystem$1.getFileType = getFileType$1;
|
|
126890
|
-
|
|
126891
|
-
function getFileType$1(filePath) {
|
|
126892
|
-
const typePath = getProperty$1(filePath, 'type');
|
|
126893
|
-
return typePath.node.value.value;
|
|
126894
|
-
}
|
|
126895
|
-
|
|
126896
|
-
filesystem$1.getFileContent = getFileContent$1;
|
|
126897
|
-
|
|
126898
|
-
function getFileContent$1(filePath) {
|
|
126899
|
-
const content = getProperty$1(filePath, 'content');
|
|
126900
|
-
|
|
126901
|
-
return [
|
|
126902
|
-
Boolean(content),
|
|
126903
|
-
content?.node.value.value,
|
|
126904
|
-
];
|
|
126905
|
-
}
|
|
126906
|
-
|
|
126907
|
-
filesystem$1.getFilename = getFilename$3;
|
|
126908
|
-
|
|
126909
|
-
filesystem$1.renameFile = (filePath, name) => {
|
|
126910
|
-
const oldName = getFilename$3(filePath);
|
|
126911
|
-
const valuePath = getFilenamePath$1(filePath);
|
|
126912
|
-
const baseName = oldName
|
|
126913
|
-
.split('/')
|
|
126914
|
-
.pop();
|
|
126915
|
-
|
|
126916
|
-
const newName = name
|
|
126917
|
-
.split('/')
|
|
126918
|
-
.pop();
|
|
126919
|
-
|
|
126920
|
-
const newFilename = oldName.replace(baseName, newName);
|
|
126921
|
-
|
|
126922
|
-
setLiteralValue$1(valuePath, newFilename);
|
|
126923
|
-
maybeFS$2.renameFile(oldName, newFilename);
|
|
126924
|
-
};
|
|
126925
|
-
|
|
126926
|
-
filesystem$1.removeFile = (filePath) => {
|
|
126927
|
-
const filename = getFilename$3(filePath);
|
|
126928
|
-
|
|
126929
|
-
filePath.remove();
|
|
126930
|
-
maybeFS$2.removeFile(filename);
|
|
126931
|
-
};
|
|
126932
|
-
|
|
126933
|
-
filesystem$1.moveFile = (filePath, dirPath) => {
|
|
126934
|
-
if (filePath === dirPath)
|
|
126935
|
-
return;
|
|
126936
|
-
|
|
126937
|
-
const dirname = getFilename$3(dirPath);
|
|
126938
|
-
const filename = getFilename$3(filePath);
|
|
126939
|
-
const dirPathFiles = getProperty$1(dirPath, 'files');
|
|
126940
|
-
const filenamePath = getProperty$1(filePath, 'filename');
|
|
126941
|
-
|
|
126942
|
-
const basename = filename
|
|
126943
|
-
.split('/')
|
|
126944
|
-
.pop();
|
|
126945
|
-
|
|
126946
|
-
const newFilename = join$3(dirname, basename);
|
|
126947
|
-
|
|
126948
|
-
maybeRemoveFile$1(dirPath, newFilename);
|
|
126949
|
-
|
|
126950
|
-
setLiteralValue$1(filenamePath.get('value'), newFilename);
|
|
126951
|
-
dirPathFiles.node.value.elements.push(filePath.node);
|
|
126952
|
-
|
|
126953
|
-
filePath.remove();
|
|
126954
|
-
maybeFS$2.renameFile(filename, newFilename);
|
|
126955
|
-
};
|
|
126956
|
-
|
|
126957
|
-
filesystem$1.copyFile = (filePath, dirPath) => {
|
|
126958
|
-
const dirname = getFilename$3(dirPath);
|
|
126959
|
-
const filename = getFilename$3(filePath);
|
|
126960
|
-
|
|
126961
|
-
const basename = filename
|
|
126962
|
-
.split('/')
|
|
126963
|
-
.pop();
|
|
126964
|
-
|
|
126965
|
-
const newFilename = join$3(dirname, basename);
|
|
126966
|
-
const [hasContent, content] = getFileContent$1(filePath);
|
|
126967
|
-
|
|
126968
|
-
const copiedFile = ObjectExpression$1([
|
|
126969
|
-
createTypeProperty$1('file'),
|
|
126970
|
-
createFilenameProperty$1(newFilename),
|
|
126971
|
-
hasContent && createContentProperty$1(content),
|
|
126972
|
-
].filter(Boolean));
|
|
126973
|
-
|
|
126974
|
-
maybeRemoveFile$1(dirPath, newFilename);
|
|
126975
|
-
|
|
126976
|
-
const dirPathFiles = getFiles$1(dirPath);
|
|
126977
|
-
dirPathFiles.node.value.elements.push(copiedFile);
|
|
126978
|
-
|
|
126979
|
-
maybeFS$2.copyFile(filename, newFilename);
|
|
126980
|
-
};
|
|
126981
|
-
|
|
126982
|
-
function maybeRemoveFile$1(dirPath, filename) {
|
|
126983
|
-
const type = getFileType$1(dirPath);
|
|
126984
|
-
|
|
126985
|
-
if (type !== 'directory') {
|
|
126986
|
-
const filename = getFilename$3(dirPath);
|
|
126987
|
-
throw Error(`☝️ Looks like '${filename}' is not a directory, but: '${type}'. Rename to '${filename}/'`);
|
|
126988
|
-
}
|
|
126989
|
-
|
|
126990
|
-
const dirPathFiles = getProperty$1(dirPath, 'files');
|
|
126991
|
-
const name = join$3(getFilename$3(dirPath), basename$1(filename));
|
|
126992
|
-
const [fileToOverwrite] = findFile$3(dirPathFiles, name);
|
|
126993
|
-
|
|
126994
|
-
if (!fileToOverwrite)
|
|
126995
|
-
return;
|
|
126996
|
-
|
|
126997
|
-
fileToOverwrite.remove();
|
|
126998
|
-
}
|
|
126999
|
-
|
|
127000
|
-
const createTypeProperty$1 = (type) => ObjectProperty$1(StringLiteral$2('type'), StringLiteral$2(type));
|
|
127001
|
-
|
|
127002
|
-
filesystem$1.createTypeProperty = createTypeProperty$1;
|
|
127003
|
-
|
|
127004
|
-
const createFilesProperty$1 = (files) => ObjectProperty$1(StringLiteral$2('files'), ArrayExpression$1(files));
|
|
127005
|
-
|
|
127006
|
-
filesystem$1.createFilesProperty = createFilesProperty$1;
|
|
127007
|
-
|
|
127008
|
-
const createFilenameProperty$1 = (filename) => ObjectProperty$1(StringLiteral$2('filename'), StringLiteral$2(filename));
|
|
127009
|
-
|
|
127010
|
-
filesystem$1.createFilenameProperty = createFilenameProperty$1;
|
|
127011
|
-
|
|
127012
|
-
const createContentProperty$1 = (content) => ObjectProperty$1(StringLiteral$2('content'), StringLiteral$2(content));
|
|
127013
|
-
|
|
127014
|
-
filesystem$1.createContentProperty = createContentProperty$1;
|
|
127015
|
-
|
|
127016
|
-
filesystem$1.createFile = (dirPath, name, content) => {
|
|
127017
|
-
maybeRemoveFile$1(dirPath, name);
|
|
127018
|
-
|
|
127019
|
-
const dirPathFiles = getFiles$1(dirPath);
|
|
127020
|
-
const parentFilename = getFilename$3(dirPath);
|
|
127021
|
-
const filename = join$3(parentFilename, name);
|
|
127022
|
-
|
|
127023
|
-
const typeProperty = createTypeProperty$1('file');
|
|
127024
|
-
const filenameProperty = createFilenameProperty$1(filename);
|
|
127025
|
-
|
|
127026
|
-
const properties = [
|
|
127027
|
-
typeProperty,
|
|
127028
|
-
filenameProperty,
|
|
127029
|
-
content && createContentProperty$1(content),
|
|
127030
|
-
].filter(Boolean);
|
|
127031
|
-
|
|
127032
|
-
dirPathFiles.node.value.elements.push(ObjectExpression$1(properties));
|
|
127033
|
-
|
|
127034
|
-
const filePath = dirPathFiles
|
|
127035
|
-
.get('value.elements')
|
|
127036
|
-
.at(-1);
|
|
127037
|
-
|
|
127038
|
-
if (isString$2(content))
|
|
127039
|
-
writeFileContent$2(filePath, content);
|
|
127040
|
-
|
|
127041
|
-
return filePath;
|
|
127042
|
-
};
|
|
127043
|
-
|
|
127044
|
-
function getFiles$1(dirPath) {
|
|
127045
|
-
return getProperty$1(dirPath, 'files');
|
|
127046
|
-
}
|
|
127047
|
-
|
|
127048
|
-
filesystem$1.createDirectory = (dirPath, name) => {
|
|
127049
|
-
const dirPathFiles = getFiles$1(dirPath);
|
|
127050
|
-
const parentFilename = getFilename$3(dirPath);
|
|
127051
|
-
const filename = join$3(parentFilename, name);
|
|
127052
|
-
|
|
127053
|
-
const typeProperty = createTypeProperty$1('directory');
|
|
127054
|
-
const filesProperty = createFilesProperty$1([]);
|
|
127055
|
-
const filenameProperty = createFilenameProperty$1(filename);
|
|
127056
|
-
|
|
127057
|
-
dirPathFiles.node.value.elements.push(ObjectExpression$1([
|
|
127058
|
-
typeProperty,
|
|
127059
|
-
filenameProperty,
|
|
127060
|
-
filesProperty,
|
|
127061
|
-
]));
|
|
127062
|
-
|
|
127063
|
-
maybeFS$2.createDirectory(filename);
|
|
127064
|
-
|
|
127065
|
-
return dirPathFiles
|
|
127066
|
-
.get('value.elements')
|
|
127067
|
-
.at(-1);
|
|
127068
|
-
};
|
|
127069
|
-
|
|
127070
|
-
filesystem$1.readFileContent = (filePath) => {
|
|
127071
|
-
const fileType = getFileType$1(filePath);
|
|
127072
|
-
|
|
127073
|
-
if (fileType === 'directory')
|
|
127074
|
-
return '';
|
|
127075
|
-
|
|
127076
|
-
const [hasContent, content] = getFileContent$1(filePath);
|
|
127077
|
-
|
|
127078
|
-
if (hasContent)
|
|
127079
|
-
return fromBase64$1(content);
|
|
127080
|
-
|
|
127081
|
-
const filename = getFilename$3(filePath);
|
|
127082
|
-
const fileContent = maybeFS$2.readFileContent(filename);
|
|
127083
|
-
|
|
127084
|
-
const property = createContentProperty$1(toBase64$1(fileContent));
|
|
127085
|
-
|
|
127086
|
-
filePath.node.properties.push(property);
|
|
127087
|
-
|
|
127088
|
-
return fileContent;
|
|
127089
|
-
};
|
|
127090
|
-
|
|
127091
|
-
filesystem$1.writeFileContent = writeFileContent$2;
|
|
127092
|
-
|
|
127093
|
-
function writeFileContent$2(filePath, content) {
|
|
127094
|
-
const fileType = getFileType$1(filePath);
|
|
127095
|
-
|
|
127096
|
-
if (fileType === 'directory')
|
|
127097
|
-
return;
|
|
127098
|
-
|
|
127099
|
-
const filename = getFilename$3(filePath);
|
|
127100
|
-
|
|
127101
|
-
maybeFS$2.writeFileContent(filename, content);
|
|
127102
|
-
|
|
127103
|
-
const contentPath = getProperty$1(filePath, 'content');
|
|
127104
|
-
|
|
127105
|
-
if (contentPath) {
|
|
127106
|
-
setLiteralValue$1(contentPath.node.value, toBase64$1(content));
|
|
127107
|
-
return;
|
|
127108
|
-
}
|
|
127109
|
-
|
|
127110
|
-
const property = createContentProperty$1(toBase64$1(content));
|
|
127111
|
-
filePath.node.properties.push(property);
|
|
127112
|
-
}
|
|
127113
|
-
|
|
127114
|
-
filesystem$1.init = maybeFS$2.init;
|
|
127115
|
-
filesystem$1.deinit = maybeFS$2.deinit;
|
|
127116
|
-
|
|
127117
|
-
filesystem$1.pause = maybeFS$2.pause;
|
|
127118
|
-
filesystem$1.start = maybeFS$2.start;
|
|
127119
|
-
|
|
127120
127137
|
const path = require$$0$2;
|
|
127121
127138
|
|
|
127122
127139
|
const {parse: parse$2, print: print$1} = parser$6;
|
|
@@ -127128,15 +127145,15 @@ const {toJS, fromJS} = json;
|
|
|
127128
127145
|
|
|
127129
127146
|
const {
|
|
127130
127147
|
readFileContent: readFileContent$1,
|
|
127131
|
-
findFile: findFile$
|
|
127132
|
-
writeFileContent
|
|
127133
|
-
getFilename: getFilename$
|
|
127148
|
+
findFile: findFile$1,
|
|
127149
|
+
writeFileContent,
|
|
127150
|
+
getFilename: getFilename$1,
|
|
127134
127151
|
createFile,
|
|
127135
127152
|
removeFile,
|
|
127136
127153
|
getParentDirectory: getParentDirectory$1,
|
|
127137
127154
|
} = filesystem$1;
|
|
127138
127155
|
|
|
127139
|
-
const {join: join$
|
|
127156
|
+
const {join: join$1} = path;
|
|
127140
127157
|
|
|
127141
127158
|
const isObject = (a) => a && typeof a === 'object';
|
|
127142
127159
|
const {entries} = Object;
|
|
@@ -127164,7 +127181,7 @@ function fix$1(inputFile, {dirPath, mainPath, matchInputFilename, outputFilename
|
|
|
127164
127181
|
inputFile,
|
|
127165
127182
|
});
|
|
127166
127183
|
|
|
127167
|
-
writeFileContent
|
|
127184
|
+
writeFileContent(outputFile, matchedJSON);
|
|
127168
127185
|
|
|
127169
127186
|
if (inputFile !== outputFile)
|
|
127170
127187
|
removeFile(inputFile);
|
|
@@ -127172,15 +127189,15 @@ function fix$1(inputFile, {dirPath, mainPath, matchInputFilename, outputFilename
|
|
|
127172
127189
|
|
|
127173
127190
|
const createScan = (files) => (mainPath, {push, progress, options}) => {
|
|
127174
127191
|
const allFiles = [];
|
|
127175
|
-
const cwd = getFilename$
|
|
127192
|
+
const cwd = getFilename$1(mainPath);
|
|
127176
127193
|
|
|
127177
127194
|
for (const [filename, rawOptions] of entries(files)) {
|
|
127178
127195
|
const [matchInputFilename, outputFilename = matchInputFilename] = parseMatcher(filename, options);
|
|
127179
|
-
const inputFiles = findFile$
|
|
127196
|
+
const inputFiles = findFile$1(mainPath, matchInputFilename);
|
|
127180
127197
|
|
|
127181
127198
|
for (const inputFile of inputFiles) {
|
|
127182
127199
|
const dirPath = getParentDirectory$1(inputFile);
|
|
127183
|
-
const inputFilename = getFilename$
|
|
127200
|
+
const inputFilename = getFilename$1(inputFile);
|
|
127184
127201
|
|
|
127185
127202
|
if (ignores$1(cwd, inputFilename, options))
|
|
127186
127203
|
continue;
|
|
@@ -127281,8 +127298,8 @@ function getOutputFile(path, {dirPath, matchInputFilename, outputFilename, input
|
|
|
127281
127298
|
if (matchInputFilename === outputFilename)
|
|
127282
127299
|
return inputFile;
|
|
127283
127300
|
|
|
127284
|
-
const name = join$
|
|
127285
|
-
const [outputFile] = findFile$
|
|
127301
|
+
const name = join$1(getFilename$1(dirPath), outputFilename);
|
|
127302
|
+
const [outputFile] = findFile$1(dirPath, name);
|
|
127286
127303
|
|
|
127287
127304
|
if (outputFile)
|
|
127288
127305
|
return outputFile;
|
|
@@ -127321,399 +127338,6 @@ function parseOptions(inputFilename, rawOptions) {
|
|
|
127321
127338
|
|
|
127322
127339
|
var renameFiles = {};
|
|
127323
127340
|
|
|
127324
|
-
var filesystem = {};
|
|
127325
|
-
|
|
127326
|
-
var maybeFs = {};
|
|
127327
|
-
|
|
127328
|
-
const fullstore = fullstore$6;
|
|
127329
|
-
const driverStore = fullstore();
|
|
127330
|
-
|
|
127331
|
-
const {assign} = Object;
|
|
127332
|
-
const noop = () => {};
|
|
127333
|
-
const returns = (a) => () => a;
|
|
127334
|
-
|
|
127335
|
-
const defaultFS = {
|
|
127336
|
-
renameFile: noop,
|
|
127337
|
-
removeFile: noop,
|
|
127338
|
-
createDirectory: noop,
|
|
127339
|
-
readFileContent: returns(''),
|
|
127340
|
-
writeFileContent: noop,
|
|
127341
|
-
copyFile: noop,
|
|
127342
|
-
};
|
|
127343
|
-
|
|
127344
|
-
const maybeFS$1 = assign({}, defaultFS);
|
|
127345
|
-
|
|
127346
|
-
maybeFs.renameFile = (oldName, newName) => {
|
|
127347
|
-
maybeFS$1.renameFile(oldName, newName);
|
|
127348
|
-
};
|
|
127349
|
-
|
|
127350
|
-
maybeFs.removeFile = (name) => {
|
|
127351
|
-
maybeFS$1.removeFile(name);
|
|
127352
|
-
};
|
|
127353
|
-
|
|
127354
|
-
maybeFs.copyFile = (from, to) => {
|
|
127355
|
-
maybeFS$1.copyFile(from, to);
|
|
127356
|
-
};
|
|
127357
|
-
|
|
127358
|
-
maybeFs.createDirectory = (name) => {
|
|
127359
|
-
maybeFS$1.createDirectory(name);
|
|
127360
|
-
};
|
|
127361
|
-
|
|
127362
|
-
maybeFs.readFileContent = (name) => {
|
|
127363
|
-
return maybeFS$1.readFileContent(name);
|
|
127364
|
-
};
|
|
127365
|
-
|
|
127366
|
-
maybeFs.writeFileContent = (name, content) => {
|
|
127367
|
-
maybeFS$1.writeFileContent(name, content);
|
|
127368
|
-
};
|
|
127369
|
-
|
|
127370
|
-
maybeFs.init = init;
|
|
127371
|
-
|
|
127372
|
-
function init(fsDriver) {
|
|
127373
|
-
assign(maybeFS$1, fsDriver);
|
|
127374
|
-
}
|
|
127375
|
-
|
|
127376
|
-
maybeFs.pause = () => {
|
|
127377
|
-
driverStore(maybeFS$1);
|
|
127378
|
-
deinit();
|
|
127379
|
-
};
|
|
127380
|
-
|
|
127381
|
-
maybeFs.start = () => {
|
|
127382
|
-
init(driverStore());
|
|
127383
|
-
};
|
|
127384
|
-
|
|
127385
|
-
maybeFs.deinit = deinit;
|
|
127386
|
-
|
|
127387
|
-
function deinit() {
|
|
127388
|
-
assign(maybeFS$1, defaultFS);
|
|
127389
|
-
}
|
|
127390
|
-
|
|
127391
|
-
const {join: join$1, basename} = require$$0$2;
|
|
127392
|
-
const tryCatch = tryCatch$9;
|
|
127393
|
-
const {types: types$2} = bundle;
|
|
127394
|
-
|
|
127395
|
-
const {
|
|
127396
|
-
setLiteralValue,
|
|
127397
|
-
getProperty,
|
|
127398
|
-
traverseProperties: traverseProperties$1,
|
|
127399
|
-
} = operate;
|
|
127400
|
-
|
|
127401
|
-
const maybeFS = maybeFs;
|
|
127402
|
-
const isString$1 = (a) => typeof a === 'string';
|
|
127403
|
-
const {isArray} = Array;
|
|
127404
|
-
const maybeArray = (a) => isArray(a) ? a : [a];
|
|
127405
|
-
|
|
127406
|
-
const toBase64 = (content) => {
|
|
127407
|
-
const [e, result] = tryCatch(btoa, content);
|
|
127408
|
-
|
|
127409
|
-
if (e)
|
|
127410
|
-
return btoa(encodeURI(content));
|
|
127411
|
-
|
|
127412
|
-
return result;
|
|
127413
|
-
};
|
|
127414
|
-
|
|
127415
|
-
const fromBase64 = (content) => {
|
|
127416
|
-
const [e, decoded] = tryCatch(atob, content);
|
|
127417
|
-
|
|
127418
|
-
if (!e)
|
|
127419
|
-
return decodeURI(decoded);
|
|
127420
|
-
|
|
127421
|
-
return content;
|
|
127422
|
-
};
|
|
127423
|
-
|
|
127424
|
-
const {
|
|
127425
|
-
ObjectExpression,
|
|
127426
|
-
ArrayExpression,
|
|
127427
|
-
StringLiteral: StringLiteral$1,
|
|
127428
|
-
ObjectProperty,
|
|
127429
|
-
isProgram,
|
|
127430
|
-
} = types$2;
|
|
127431
|
-
|
|
127432
|
-
const getRegExp = (wildcard) => {
|
|
127433
|
-
const escaped = wildcard
|
|
127434
|
-
.replace(/\./g, '\\.')
|
|
127435
|
-
.replace(/\*/g, '.*')
|
|
127436
|
-
.replace('?', '.?');
|
|
127437
|
-
|
|
127438
|
-
return RegExp(`^${escaped}$`);
|
|
127439
|
-
};
|
|
127440
|
-
|
|
127441
|
-
filesystem.getParentDirectory = (filePath) => {
|
|
127442
|
-
const {parentPath} = filePath.parentPath.parentPath;
|
|
127443
|
-
|
|
127444
|
-
if (isProgram(parentPath))
|
|
127445
|
-
return null;
|
|
127446
|
-
|
|
127447
|
-
return parentPath;
|
|
127448
|
-
};
|
|
127449
|
-
|
|
127450
|
-
filesystem.findFile = findFile$1;
|
|
127451
|
-
|
|
127452
|
-
function findFile$1(node, name) {
|
|
127453
|
-
checkName(name);
|
|
127454
|
-
|
|
127455
|
-
const filePaths = [];
|
|
127456
|
-
const names = maybeArray(name);
|
|
127457
|
-
|
|
127458
|
-
for (const filenamePath of traverseProperties$1(node, 'filename')) {
|
|
127459
|
-
const {value} = filenamePath.node.value;
|
|
127460
|
-
const base = basename(value);
|
|
127461
|
-
|
|
127462
|
-
for (const name of names) {
|
|
127463
|
-
if (value === name || getRegExp(name).test(base))
|
|
127464
|
-
filePaths.push(filenamePath.parentPath);
|
|
127465
|
-
}
|
|
127466
|
-
}
|
|
127467
|
-
|
|
127468
|
-
return filePaths;
|
|
127469
|
-
}
|
|
127470
|
-
|
|
127471
|
-
function checkName(name) {
|
|
127472
|
-
if (!isString$1(name) && !isArray(name))
|
|
127473
|
-
throw Error(`☝️ Looks like you forget to pass the 'name' of a file to 'findFile(filePath: Path|FilePath, name: string | string[]): FilePath'`);
|
|
127474
|
-
}
|
|
127475
|
-
|
|
127476
|
-
function getFilenamePath(filePath) {
|
|
127477
|
-
const filenamePath = getProperty(filePath, 'filename');
|
|
127478
|
-
return filenamePath.get('value');
|
|
127479
|
-
}
|
|
127480
|
-
|
|
127481
|
-
function getFilename$1(filePath) {
|
|
127482
|
-
const {value} = getFilenamePath(filePath).node;
|
|
127483
|
-
return value;
|
|
127484
|
-
}
|
|
127485
|
-
|
|
127486
|
-
filesystem.getFileType = getFileType;
|
|
127487
|
-
|
|
127488
|
-
function getFileType(filePath) {
|
|
127489
|
-
const typePath = getProperty(filePath, 'type');
|
|
127490
|
-
return typePath.node.value.value;
|
|
127491
|
-
}
|
|
127492
|
-
|
|
127493
|
-
filesystem.getFileContent = getFileContent;
|
|
127494
|
-
|
|
127495
|
-
function getFileContent(filePath) {
|
|
127496
|
-
const content = getProperty(filePath, 'content');
|
|
127497
|
-
|
|
127498
|
-
return [
|
|
127499
|
-
Boolean(content),
|
|
127500
|
-
content?.node.value.value,
|
|
127501
|
-
];
|
|
127502
|
-
}
|
|
127503
|
-
|
|
127504
|
-
filesystem.getFilename = getFilename$1;
|
|
127505
|
-
|
|
127506
|
-
filesystem.renameFile = (filePath, name) => {
|
|
127507
|
-
const oldName = getFilename$1(filePath);
|
|
127508
|
-
const valuePath = getFilenamePath(filePath);
|
|
127509
|
-
const baseName = oldName
|
|
127510
|
-
.split('/')
|
|
127511
|
-
.pop();
|
|
127512
|
-
|
|
127513
|
-
const newName = name
|
|
127514
|
-
.split('/')
|
|
127515
|
-
.pop();
|
|
127516
|
-
|
|
127517
|
-
const newFilename = oldName.replace(baseName, newName);
|
|
127518
|
-
|
|
127519
|
-
setLiteralValue(valuePath, newFilename);
|
|
127520
|
-
maybeFS.renameFile(oldName, newFilename);
|
|
127521
|
-
};
|
|
127522
|
-
|
|
127523
|
-
filesystem.removeFile = (filePath) => {
|
|
127524
|
-
const filename = getFilename$1(filePath);
|
|
127525
|
-
|
|
127526
|
-
filePath.remove();
|
|
127527
|
-
maybeFS.removeFile(filename);
|
|
127528
|
-
};
|
|
127529
|
-
|
|
127530
|
-
filesystem.moveFile = (filePath, dirPath) => {
|
|
127531
|
-
if (filePath === dirPath)
|
|
127532
|
-
return;
|
|
127533
|
-
|
|
127534
|
-
const dirname = getFilename$1(dirPath);
|
|
127535
|
-
const filename = getFilename$1(filePath);
|
|
127536
|
-
const dirPathFiles = getProperty(dirPath, 'files');
|
|
127537
|
-
const filenamePath = getProperty(filePath, 'filename');
|
|
127538
|
-
|
|
127539
|
-
const basename = filename
|
|
127540
|
-
.split('/')
|
|
127541
|
-
.pop();
|
|
127542
|
-
|
|
127543
|
-
const newFilename = join$1(dirname, basename);
|
|
127544
|
-
|
|
127545
|
-
maybeRemoveFile(dirPath, newFilename);
|
|
127546
|
-
|
|
127547
|
-
setLiteralValue(filenamePath.get('value'), newFilename);
|
|
127548
|
-
dirPathFiles.node.value.elements.push(filePath.node);
|
|
127549
|
-
|
|
127550
|
-
filePath.remove();
|
|
127551
|
-
maybeFS.renameFile(filename, newFilename);
|
|
127552
|
-
};
|
|
127553
|
-
|
|
127554
|
-
filesystem.copyFile = (filePath, dirPath) => {
|
|
127555
|
-
const dirname = getFilename$1(dirPath);
|
|
127556
|
-
const filename = getFilename$1(filePath);
|
|
127557
|
-
|
|
127558
|
-
const basename = filename
|
|
127559
|
-
.split('/')
|
|
127560
|
-
.pop();
|
|
127561
|
-
|
|
127562
|
-
const newFilename = join$1(dirname, basename);
|
|
127563
|
-
const [hasContent, content] = getFileContent(filePath);
|
|
127564
|
-
|
|
127565
|
-
const copiedFile = ObjectExpression([
|
|
127566
|
-
createTypeProperty('file'),
|
|
127567
|
-
createFilenameProperty(newFilename),
|
|
127568
|
-
hasContent && createContentProperty(content),
|
|
127569
|
-
].filter(Boolean));
|
|
127570
|
-
|
|
127571
|
-
maybeRemoveFile(dirPath, newFilename);
|
|
127572
|
-
|
|
127573
|
-
const dirPathFiles = getFiles(dirPath);
|
|
127574
|
-
dirPathFiles.node.value.elements.push(copiedFile);
|
|
127575
|
-
|
|
127576
|
-
maybeFS.copyFile(filename, newFilename);
|
|
127577
|
-
};
|
|
127578
|
-
|
|
127579
|
-
function maybeRemoveFile(dirPath, filename) {
|
|
127580
|
-
const type = getFileType(dirPath);
|
|
127581
|
-
|
|
127582
|
-
if (type !== 'directory') {
|
|
127583
|
-
const filename = getFilename$1(dirPath);
|
|
127584
|
-
throw Error(`☝️ Looks like '${filename}' is not a directory, but: '${type}'. Rename to '${filename}/'`);
|
|
127585
|
-
}
|
|
127586
|
-
|
|
127587
|
-
const dirPathFiles = getProperty(dirPath, 'files');
|
|
127588
|
-
const name = join$1(getFilename$1(dirPath), basename(filename));
|
|
127589
|
-
const [fileToOverwrite] = findFile$1(dirPathFiles, name);
|
|
127590
|
-
|
|
127591
|
-
if (!fileToOverwrite)
|
|
127592
|
-
return;
|
|
127593
|
-
|
|
127594
|
-
fileToOverwrite.remove();
|
|
127595
|
-
}
|
|
127596
|
-
|
|
127597
|
-
const createTypeProperty = (type) => ObjectProperty(StringLiteral$1('type'), StringLiteral$1(type));
|
|
127598
|
-
|
|
127599
|
-
filesystem.createTypeProperty = createTypeProperty;
|
|
127600
|
-
|
|
127601
|
-
const createFilesProperty = (files) => ObjectProperty(StringLiteral$1('files'), ArrayExpression(files));
|
|
127602
|
-
|
|
127603
|
-
filesystem.createFilesProperty = createFilesProperty;
|
|
127604
|
-
|
|
127605
|
-
const createFilenameProperty = (filename) => ObjectProperty(StringLiteral$1('filename'), StringLiteral$1(filename));
|
|
127606
|
-
|
|
127607
|
-
filesystem.createFilenameProperty = createFilenameProperty;
|
|
127608
|
-
|
|
127609
|
-
const createContentProperty = (content) => ObjectProperty(StringLiteral$1('content'), StringLiteral$1(content));
|
|
127610
|
-
|
|
127611
|
-
filesystem.createContentProperty = createContentProperty;
|
|
127612
|
-
|
|
127613
|
-
filesystem.createFile = (dirPath, name, content) => {
|
|
127614
|
-
maybeRemoveFile(dirPath, name);
|
|
127615
|
-
|
|
127616
|
-
const dirPathFiles = getFiles(dirPath);
|
|
127617
|
-
const parentFilename = getFilename$1(dirPath);
|
|
127618
|
-
const filename = join$1(parentFilename, name);
|
|
127619
|
-
|
|
127620
|
-
const typeProperty = createTypeProperty('file');
|
|
127621
|
-
const filenameProperty = createFilenameProperty(filename);
|
|
127622
|
-
|
|
127623
|
-
const properties = [
|
|
127624
|
-
typeProperty,
|
|
127625
|
-
filenameProperty,
|
|
127626
|
-
content && createContentProperty(content),
|
|
127627
|
-
].filter(Boolean);
|
|
127628
|
-
|
|
127629
|
-
dirPathFiles.node.value.elements.push(ObjectExpression(properties));
|
|
127630
|
-
|
|
127631
|
-
const filePath = dirPathFiles
|
|
127632
|
-
.get('value.elements')
|
|
127633
|
-
.at(-1);
|
|
127634
|
-
|
|
127635
|
-
if (isString$1(content))
|
|
127636
|
-
writeFileContent(filePath, content);
|
|
127637
|
-
|
|
127638
|
-
return filePath;
|
|
127639
|
-
};
|
|
127640
|
-
|
|
127641
|
-
function getFiles(dirPath) {
|
|
127642
|
-
return getProperty(dirPath, 'files');
|
|
127643
|
-
}
|
|
127644
|
-
|
|
127645
|
-
filesystem.createDirectory = (dirPath, name) => {
|
|
127646
|
-
const dirPathFiles = getFiles(dirPath);
|
|
127647
|
-
const parentFilename = getFilename$1(dirPath);
|
|
127648
|
-
const filename = join$1(parentFilename, name);
|
|
127649
|
-
|
|
127650
|
-
const typeProperty = createTypeProperty('directory');
|
|
127651
|
-
const filesProperty = createFilesProperty([]);
|
|
127652
|
-
const filenameProperty = createFilenameProperty(filename);
|
|
127653
|
-
|
|
127654
|
-
dirPathFiles.node.value.elements.push(ObjectExpression([
|
|
127655
|
-
typeProperty,
|
|
127656
|
-
filenameProperty,
|
|
127657
|
-
filesProperty,
|
|
127658
|
-
]));
|
|
127659
|
-
|
|
127660
|
-
maybeFS.createDirectory(filename);
|
|
127661
|
-
|
|
127662
|
-
return dirPathFiles
|
|
127663
|
-
.get('value.elements')
|
|
127664
|
-
.at(-1);
|
|
127665
|
-
};
|
|
127666
|
-
|
|
127667
|
-
filesystem.readFileContent = (filePath) => {
|
|
127668
|
-
const fileType = getFileType(filePath);
|
|
127669
|
-
|
|
127670
|
-
if (fileType === 'directory')
|
|
127671
|
-
return '';
|
|
127672
|
-
|
|
127673
|
-
const [hasContent, content] = getFileContent(filePath);
|
|
127674
|
-
|
|
127675
|
-
if (hasContent)
|
|
127676
|
-
return fromBase64(content);
|
|
127677
|
-
|
|
127678
|
-
const filename = getFilename$1(filePath);
|
|
127679
|
-
const fileContent = maybeFS.readFileContent(filename);
|
|
127680
|
-
|
|
127681
|
-
const property = createContentProperty(toBase64(fileContent));
|
|
127682
|
-
|
|
127683
|
-
filePath.node.properties.push(property);
|
|
127684
|
-
|
|
127685
|
-
return fileContent;
|
|
127686
|
-
};
|
|
127687
|
-
|
|
127688
|
-
filesystem.writeFileContent = writeFileContent;
|
|
127689
|
-
|
|
127690
|
-
function writeFileContent(filePath, content) {
|
|
127691
|
-
const fileType = getFileType(filePath);
|
|
127692
|
-
|
|
127693
|
-
if (fileType === 'directory')
|
|
127694
|
-
return;
|
|
127695
|
-
|
|
127696
|
-
const filename = getFilename$1(filePath);
|
|
127697
|
-
|
|
127698
|
-
maybeFS.writeFileContent(filename, content);
|
|
127699
|
-
|
|
127700
|
-
const contentPath = getProperty(filePath, 'content');
|
|
127701
|
-
|
|
127702
|
-
if (contentPath) {
|
|
127703
|
-
setLiteralValue(contentPath.node.value, toBase64(content));
|
|
127704
|
-
return;
|
|
127705
|
-
}
|
|
127706
|
-
|
|
127707
|
-
const property = createContentProperty(toBase64(content));
|
|
127708
|
-
filePath.node.properties.push(property);
|
|
127709
|
-
}
|
|
127710
|
-
|
|
127711
|
-
filesystem.init = maybeFS.init;
|
|
127712
|
-
filesystem.deinit = maybeFS.deinit;
|
|
127713
|
-
|
|
127714
|
-
filesystem.pause = maybeFS.pause;
|
|
127715
|
-
filesystem.start = maybeFS.start;
|
|
127716
|
-
|
|
127717
127341
|
const {join} = require$$0$2;
|
|
127718
127342
|
|
|
127719
127343
|
const {
|
|
@@ -127722,7 +127346,7 @@ const {
|
|
|
127722
127346
|
readFileContent,
|
|
127723
127347
|
findFile,
|
|
127724
127348
|
renameFile,
|
|
127725
|
-
} = filesystem;
|
|
127349
|
+
} = filesystem$1;
|
|
127726
127350
|
|
|
127727
127351
|
const {parse: parse$1} = JSON;
|
|
127728
127352
|
|
|
@@ -128050,7 +127674,7 @@ var operator = putout$1.exports.operator = {
|
|
|
128050
127674
|
...declare$2,
|
|
128051
127675
|
...regexp,
|
|
128052
127676
|
...addArgs,
|
|
128053
|
-
...filesystem
|
|
127677
|
+
...filesystem,
|
|
128054
127678
|
...matchFiles,
|
|
128055
127679
|
...renameFiles,
|
|
128056
127680
|
...ignore,
|