commitizen 4.2.6 → 4.3.0
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/README.md +5 -4
- package/dist/cli/commitizen.js +4 -8
- package/dist/cli/git-cz.js +2 -6
- package/dist/cli/parsers/commitizen.js +0 -3
- package/dist/cli/parsers/git-cz.js +1 -12
- package/dist/cli/parsers.js +0 -6
- package/dist/cli/strategies/git-cz.js +9 -19
- package/dist/cli/strategies/git.js +0 -7
- package/dist/cli/strategies.js +0 -3
- package/dist/commitizen/adapter.js +541 -441
- package/dist/commitizen/cache.js +2 -17
- package/dist/commitizen/commit.js +11 -31
- package/dist/commitizen/configLoader.js +0 -6
- package/dist/commitizen/init.js +210 -221
- package/dist/commitizen/staging.js +0 -8
- package/dist/commitizen.js +0 -13
- package/dist/common/util.js +2 -16
- package/dist/configLoader/findup.js +1 -14
- package/dist/configLoader/getContent.js +2 -24
- package/dist/configLoader/getNormalizedConfig.js +2 -11
- package/dist/configLoader/loader.js +5 -26
- package/dist/configLoader.js +0 -5
- package/dist/git/add.js +1 -11
- package/dist/git/commit.js +3 -24
- package/dist/git/init.js +0 -8
- package/dist/git/log.js +0 -8
- package/dist/git/whatChanged.js +0 -8
- package/dist/git.js +0 -5
- package/dist/index.js +0 -3
- package/dist/npm.js +0 -3
- package/package.json +12 -12
|
@@ -4,35 +4,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.addPathToAdapterConfig = addPathToAdapterConfig;
|
|
7
|
-
exports.
|
|
8
|
-
exports.generateYarnAddAdapterCommand = generateYarnAddAdapterCommand;
|
|
7
|
+
exports.generateInstallAdapterCommand = generateInstallAdapterCommand;
|
|
9
8
|
exports.getGitRootPath = getGitRootPath;
|
|
9
|
+
exports.getInstallStringMappings = getInstallStringMappings;
|
|
10
10
|
exports.getNearestNodeModulesDirectory = getNearestNodeModulesDirectory;
|
|
11
11
|
exports.getNearestProjectRootDirectory = getNearestProjectRootDirectory;
|
|
12
|
-
exports.getNpmInstallStringMappings = getNpmInstallStringMappings;
|
|
13
12
|
exports.getPrompter = getPrompter;
|
|
14
|
-
exports.getYarnAddStringMappings = getYarnAddStringMappings;
|
|
15
13
|
exports.resolveAdapterPath = resolveAdapterPath;
|
|
16
|
-
|
|
17
14
|
var _child_process = _interopRequireDefault(require("child_process"));
|
|
18
|
-
|
|
19
15
|
var _path = _interopRequireDefault(require("path"));
|
|
20
|
-
|
|
21
16
|
var _fs = _interopRequireDefault(require("fs"));
|
|
22
|
-
|
|
23
17
|
var _findNodeModules = _interopRequireDefault(require("find-node-modules"));
|
|
24
|
-
|
|
25
18
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
26
|
-
|
|
27
19
|
var _detectIndent = _interopRequireDefault(require("detect-indent"));
|
|
28
|
-
|
|
29
20
|
var _util = require("../common/util");
|
|
30
|
-
|
|
31
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
32
|
-
|
|
33
22
|
function cov_16lcdpz3tp() {
|
|
34
23
|
var path = "/home/runner/work/cz-cli/cz-cli/src/commitizen/adapter.js";
|
|
35
|
-
var hash = "
|
|
24
|
+
var hash = "e37ec3ccafde4f581a254419294338bc76165289";
|
|
36
25
|
var global = new Function("return this")();
|
|
37
26
|
var gcv = "__coverage__";
|
|
38
27
|
var coverageData = {
|
|
@@ -40,351 +29,331 @@ function cov_16lcdpz3tp() {
|
|
|
40
29
|
statementMap: {
|
|
41
30
|
"0": {
|
|
42
31
|
start: {
|
|
43
|
-
line:
|
|
32
|
+
line: 36,
|
|
44
33
|
column: 32
|
|
45
34
|
},
|
|
46
35
|
end: {
|
|
47
|
-
line:
|
|
36
|
+
line: 42,
|
|
48
37
|
column: 3
|
|
49
38
|
}
|
|
50
39
|
},
|
|
51
40
|
"1": {
|
|
52
41
|
start: {
|
|
53
|
-
line:
|
|
42
|
+
line: 44,
|
|
54
43
|
column: 24
|
|
55
44
|
},
|
|
56
45
|
end: {
|
|
57
|
-
line:
|
|
46
|
+
line: 44,
|
|
58
47
|
column: 91
|
|
59
48
|
}
|
|
60
49
|
},
|
|
61
50
|
"2": {
|
|
62
51
|
start: {
|
|
63
|
-
line:
|
|
52
|
+
line: 45,
|
|
64
53
|
column: 26
|
|
65
54
|
},
|
|
66
55
|
end: {
|
|
67
|
-
line:
|
|
56
|
+
line: 45,
|
|
68
57
|
column: 67
|
|
69
58
|
}
|
|
70
59
|
},
|
|
71
60
|
"3": {
|
|
72
61
|
start: {
|
|
73
|
-
line:
|
|
62
|
+
line: 47,
|
|
74
63
|
column: 15
|
|
75
64
|
},
|
|
76
65
|
end: {
|
|
77
|
-
line:
|
|
66
|
+
line: 47,
|
|
78
67
|
column: 61
|
|
79
68
|
}
|
|
80
69
|
},
|
|
81
70
|
"4": {
|
|
82
71
|
start: {
|
|
83
|
-
line:
|
|
72
|
+
line: 48,
|
|
84
73
|
column: 27
|
|
85
74
|
},
|
|
86
75
|
end: {
|
|
87
|
-
line:
|
|
76
|
+
line: 48,
|
|
88
77
|
column: 56
|
|
89
78
|
}
|
|
90
79
|
},
|
|
91
80
|
"5": {
|
|
92
81
|
start: {
|
|
93
|
-
line:
|
|
82
|
+
line: 49,
|
|
94
83
|
column: 30
|
|
95
84
|
},
|
|
96
85
|
end: {
|
|
97
|
-
line:
|
|
86
|
+
line: 49,
|
|
98
87
|
column: 32
|
|
99
88
|
}
|
|
100
89
|
},
|
|
101
90
|
"6": {
|
|
102
91
|
start: {
|
|
103
|
-
line:
|
|
92
|
+
line: 50,
|
|
104
93
|
column: 2
|
|
105
94
|
},
|
|
106
95
|
end: {
|
|
107
|
-
line:
|
|
96
|
+
line: 52,
|
|
108
97
|
column: 3
|
|
109
98
|
}
|
|
110
99
|
},
|
|
111
100
|
"7": {
|
|
112
101
|
start: {
|
|
113
|
-
line:
|
|
102
|
+
line: 51,
|
|
114
103
|
column: 4
|
|
115
104
|
},
|
|
116
105
|
end: {
|
|
117
|
-
line:
|
|
106
|
+
line: 51,
|
|
118
107
|
column: 81
|
|
119
108
|
}
|
|
120
109
|
},
|
|
121
110
|
"8": {
|
|
122
111
|
start: {
|
|
123
|
-
line:
|
|
112
|
+
line: 53,
|
|
124
113
|
column: 2
|
|
125
114
|
},
|
|
126
115
|
end: {
|
|
127
|
-
line:
|
|
116
|
+
line: 53,
|
|
128
117
|
column: 96
|
|
129
118
|
}
|
|
130
119
|
},
|
|
131
120
|
"9": {
|
|
132
121
|
start: {
|
|
133
|
-
line:
|
|
134
|
-
column:
|
|
122
|
+
line: 60,
|
|
123
|
+
column: 2
|
|
135
124
|
},
|
|
136
125
|
end: {
|
|
137
|
-
line:
|
|
138
|
-
column:
|
|
126
|
+
line: 60,
|
|
127
|
+
column: 70
|
|
139
128
|
}
|
|
140
129
|
},
|
|
141
130
|
"10": {
|
|
142
131
|
start: {
|
|
143
132
|
line: 67,
|
|
144
|
-
column:
|
|
133
|
+
column: 26
|
|
145
134
|
},
|
|
146
135
|
end: {
|
|
147
|
-
line:
|
|
148
|
-
column:
|
|
136
|
+
line: 67,
|
|
137
|
+
column: 35
|
|
149
138
|
}
|
|
150
139
|
},
|
|
151
140
|
"11": {
|
|
152
141
|
start: {
|
|
153
142
|
line: 68,
|
|
154
|
-
column:
|
|
143
|
+
column: 34
|
|
155
144
|
},
|
|
156
145
|
end: {
|
|
157
|
-
line:
|
|
158
|
-
column:
|
|
146
|
+
line: 72,
|
|
147
|
+
column: 3
|
|
159
148
|
}
|
|
160
149
|
},
|
|
161
150
|
"12": {
|
|
162
151
|
start: {
|
|
163
|
-
line:
|
|
164
|
-
column:
|
|
152
|
+
line: 74,
|
|
153
|
+
column: 2
|
|
165
154
|
},
|
|
166
155
|
end: {
|
|
167
|
-
line:
|
|
168
|
-
column:
|
|
156
|
+
line: 74,
|
|
157
|
+
column: 68
|
|
169
158
|
}
|
|
170
159
|
},
|
|
171
160
|
"13": {
|
|
172
161
|
start: {
|
|
173
|
-
line:
|
|
162
|
+
line: 81,
|
|
174
163
|
column: 2
|
|
175
164
|
},
|
|
176
165
|
end: {
|
|
177
|
-
line:
|
|
178
|
-
column:
|
|
166
|
+
line: 81,
|
|
167
|
+
column: 121
|
|
179
168
|
}
|
|
180
169
|
},
|
|
181
170
|
"14": {
|
|
182
171
|
start: {
|
|
183
|
-
line:
|
|
184
|
-
column:
|
|
172
|
+
line: 90,
|
|
173
|
+
column: 31
|
|
185
174
|
},
|
|
186
175
|
end: {
|
|
187
|
-
line:
|
|
188
|
-
column:
|
|
176
|
+
line: 90,
|
|
177
|
+
column: 55
|
|
189
178
|
}
|
|
190
179
|
},
|
|
191
180
|
"15": {
|
|
192
181
|
start: {
|
|
193
|
-
line:
|
|
182
|
+
line: 95,
|
|
194
183
|
column: 2
|
|
195
184
|
},
|
|
196
185
|
end: {
|
|
197
|
-
line:
|
|
186
|
+
line: 99,
|
|
198
187
|
column: 3
|
|
199
188
|
}
|
|
200
189
|
},
|
|
201
190
|
"16": {
|
|
202
191
|
start: {
|
|
203
|
-
line:
|
|
192
|
+
line: 96,
|
|
204
193
|
column: 4
|
|
205
194
|
},
|
|
206
195
|
end: {
|
|
207
|
-
line:
|
|
208
|
-
column:
|
|
196
|
+
line: 96,
|
|
197
|
+
column: 37
|
|
209
198
|
}
|
|
210
199
|
},
|
|
211
200
|
"17": {
|
|
212
201
|
start: {
|
|
213
|
-
line:
|
|
214
|
-
column:
|
|
202
|
+
line: 106,
|
|
203
|
+
column: 2
|
|
215
204
|
},
|
|
216
205
|
end: {
|
|
217
|
-
line:
|
|
218
|
-
column:
|
|
206
|
+
line: 106,
|
|
207
|
+
column: 78
|
|
219
208
|
}
|
|
220
209
|
},
|
|
221
210
|
"18": {
|
|
222
211
|
start: {
|
|
223
|
-
line:
|
|
224
|
-
column:
|
|
212
|
+
line: 113,
|
|
213
|
+
column: 14
|
|
225
214
|
},
|
|
226
215
|
end: {
|
|
227
|
-
line:
|
|
228
|
-
column:
|
|
216
|
+
line: 117,
|
|
217
|
+
column: 48
|
|
229
218
|
}
|
|
230
219
|
},
|
|
231
220
|
"19": {
|
|
232
221
|
start: {
|
|
233
|
-
line:
|
|
234
|
-
column:
|
|
222
|
+
line: 119,
|
|
223
|
+
column: 15
|
|
235
224
|
},
|
|
236
225
|
end: {
|
|
237
|
-
line:
|
|
238
|
-
column:
|
|
226
|
+
line: 122,
|
|
227
|
+
column: 48
|
|
239
228
|
}
|
|
240
229
|
},
|
|
241
230
|
"20": {
|
|
242
231
|
start: {
|
|
243
|
-
line:
|
|
244
|
-
column:
|
|
232
|
+
line: 124,
|
|
233
|
+
column: 15
|
|
245
234
|
},
|
|
246
235
|
end: {
|
|
247
|
-
line:
|
|
248
|
-
column:
|
|
236
|
+
line: 127,
|
|
237
|
+
column: 57
|
|
249
238
|
}
|
|
250
239
|
},
|
|
251
240
|
"21": {
|
|
252
241
|
start: {
|
|
253
|
-
line:
|
|
254
|
-
column:
|
|
242
|
+
line: 129,
|
|
243
|
+
column: 14
|
|
255
244
|
},
|
|
256
245
|
end: {
|
|
257
|
-
line:
|
|
258
|
-
column:
|
|
246
|
+
line: 129,
|
|
247
|
+
column: 33
|
|
259
248
|
}
|
|
260
249
|
},
|
|
261
250
|
"22": {
|
|
262
251
|
start: {
|
|
263
|
-
line:
|
|
252
|
+
line: 131,
|
|
264
253
|
column: 2
|
|
265
254
|
},
|
|
266
255
|
end: {
|
|
267
|
-
line:
|
|
268
|
-
column:
|
|
256
|
+
line: 131,
|
|
257
|
+
column: 36
|
|
269
258
|
}
|
|
270
259
|
},
|
|
271
260
|
"23": {
|
|
272
261
|
start: {
|
|
273
|
-
line:
|
|
274
|
-
column: 2
|
|
275
|
-
},
|
|
276
|
-
end: {
|
|
277
|
-
line: 127,
|
|
278
|
-
column: 49
|
|
279
|
-
}
|
|
280
|
-
},
|
|
281
|
-
"24": {
|
|
282
|
-
start: {
|
|
283
|
-
line: 134,
|
|
284
|
-
column: 2
|
|
285
|
-
},
|
|
286
|
-
end: {
|
|
287
|
-
line: 137,
|
|
288
|
-
column: 49
|
|
289
|
-
}
|
|
290
|
-
},
|
|
291
|
-
"25": {
|
|
292
|
-
start: {
|
|
293
|
-
line: 145,
|
|
262
|
+
line: 139,
|
|
294
263
|
column: 28
|
|
295
264
|
},
|
|
296
265
|
end: {
|
|
297
|
-
line:
|
|
266
|
+
line: 139,
|
|
298
267
|
column: 59
|
|
299
268
|
}
|
|
300
269
|
},
|
|
301
|
-
"
|
|
270
|
+
"24": {
|
|
302
271
|
start: {
|
|
303
|
-
line:
|
|
272
|
+
line: 142,
|
|
304
273
|
column: 16
|
|
305
274
|
},
|
|
306
275
|
end: {
|
|
307
|
-
line:
|
|
276
|
+
line: 142,
|
|
308
277
|
column: 44
|
|
309
278
|
}
|
|
310
279
|
},
|
|
311
|
-
"
|
|
280
|
+
"25": {
|
|
312
281
|
start: {
|
|
313
|
-
line:
|
|
282
|
+
line: 160,
|
|
314
283
|
column: 15
|
|
315
284
|
},
|
|
316
285
|
end: {
|
|
317
|
-
line:
|
|
286
|
+
line: 160,
|
|
318
287
|
column: 45
|
|
319
288
|
}
|
|
320
289
|
},
|
|
321
|
-
"
|
|
290
|
+
"26": {
|
|
322
291
|
start: {
|
|
323
|
-
line:
|
|
292
|
+
line: 161,
|
|
324
293
|
column: 15
|
|
325
294
|
},
|
|
326
295
|
end: {
|
|
327
|
-
line:
|
|
296
|
+
line: 161,
|
|
328
297
|
column: 68
|
|
329
298
|
}
|
|
330
299
|
},
|
|
331
|
-
"
|
|
300
|
+
"27": {
|
|
332
301
|
start: {
|
|
333
|
-
line:
|
|
302
|
+
line: 164,
|
|
334
303
|
column: 28
|
|
335
304
|
},
|
|
336
305
|
end: {
|
|
337
|
-
line:
|
|
306
|
+
line: 166,
|
|
338
307
|
column: 22
|
|
339
308
|
}
|
|
340
309
|
},
|
|
341
|
-
"
|
|
310
|
+
"28": {
|
|
342
311
|
start: {
|
|
343
|
-
line:
|
|
312
|
+
line: 168,
|
|
344
313
|
column: 2
|
|
345
314
|
},
|
|
346
315
|
end: {
|
|
347
|
-
line:
|
|
316
|
+
line: 174,
|
|
348
317
|
column: 3
|
|
349
318
|
}
|
|
350
319
|
},
|
|
351
|
-
"
|
|
320
|
+
"29": {
|
|
352
321
|
start: {
|
|
353
|
-
line:
|
|
322
|
+
line: 170,
|
|
354
323
|
column: 4
|
|
355
324
|
},
|
|
356
325
|
end: {
|
|
357
|
-
line:
|
|
326
|
+
line: 170,
|
|
358
327
|
column: 48
|
|
359
328
|
}
|
|
360
329
|
},
|
|
361
|
-
"
|
|
330
|
+
"30": {
|
|
362
331
|
start: {
|
|
363
|
-
line:
|
|
332
|
+
line: 172,
|
|
364
333
|
column: 4
|
|
365
334
|
},
|
|
366
335
|
end: {
|
|
367
|
-
line:
|
|
336
|
+
line: 172,
|
|
368
337
|
column: 86
|
|
369
338
|
}
|
|
370
339
|
},
|
|
371
|
-
"
|
|
340
|
+
"31": {
|
|
372
341
|
start: {
|
|
373
|
-
line:
|
|
342
|
+
line: 173,
|
|
374
343
|
column: 4
|
|
375
344
|
},
|
|
376
345
|
end: {
|
|
377
|
-
line:
|
|
346
|
+
line: 173,
|
|
378
347
|
column: 16
|
|
379
348
|
}
|
|
380
349
|
},
|
|
381
|
-
"
|
|
350
|
+
"32": {
|
|
382
351
|
start: {
|
|
383
|
-
line:
|
|
352
|
+
line: 178,
|
|
384
353
|
column: 2
|
|
385
354
|
},
|
|
386
355
|
end: {
|
|
387
|
-
line:
|
|
356
|
+
line: 178,
|
|
388
357
|
column: 109
|
|
389
358
|
}
|
|
390
359
|
}
|
|
@@ -394,296 +363,296 @@ function cov_16lcdpz3tp() {
|
|
|
394
363
|
name: "addPathToAdapterConfig",
|
|
395
364
|
decl: {
|
|
396
365
|
start: {
|
|
397
|
-
line:
|
|
366
|
+
line: 34,
|
|
398
367
|
column: 9
|
|
399
368
|
},
|
|
400
369
|
end: {
|
|
401
|
-
line:
|
|
370
|
+
line: 34,
|
|
402
371
|
column: 31
|
|
403
372
|
}
|
|
404
373
|
},
|
|
405
374
|
loc: {
|
|
406
375
|
start: {
|
|
407
|
-
line:
|
|
376
|
+
line: 34,
|
|
408
377
|
column: 68
|
|
409
378
|
},
|
|
410
379
|
end: {
|
|
411
|
-
line:
|
|
380
|
+
line: 54,
|
|
412
381
|
column: 1
|
|
413
382
|
}
|
|
414
383
|
},
|
|
415
|
-
line:
|
|
384
|
+
line: 34
|
|
416
385
|
},
|
|
417
386
|
"1": {
|
|
418
|
-
name: "
|
|
387
|
+
name: "getInstallOptions",
|
|
419
388
|
decl: {
|
|
420
389
|
start: {
|
|
421
|
-
line:
|
|
390
|
+
line: 59,
|
|
422
391
|
column: 9
|
|
423
392
|
},
|
|
424
393
|
end: {
|
|
425
|
-
line:
|
|
426
|
-
column:
|
|
394
|
+
line: 59,
|
|
395
|
+
column: 26
|
|
427
396
|
}
|
|
428
397
|
},
|
|
429
398
|
loc: {
|
|
430
399
|
start: {
|
|
431
|
-
line:
|
|
432
|
-
column:
|
|
400
|
+
line: 59,
|
|
401
|
+
column: 43
|
|
433
402
|
},
|
|
434
403
|
end: {
|
|
435
|
-
line:
|
|
404
|
+
line: 61,
|
|
436
405
|
column: 1
|
|
437
406
|
}
|
|
438
407
|
},
|
|
439
|
-
line:
|
|
408
|
+
line: 59
|
|
440
409
|
},
|
|
441
410
|
"2": {
|
|
442
|
-
name: "
|
|
411
|
+
name: "getInstallCommand",
|
|
443
412
|
decl: {
|
|
444
413
|
start: {
|
|
445
|
-
line:
|
|
414
|
+
line: 66,
|
|
446
415
|
column: 9
|
|
447
416
|
},
|
|
448
417
|
end: {
|
|
449
|
-
line:
|
|
450
|
-
column:
|
|
418
|
+
line: 66,
|
|
419
|
+
column: 26
|
|
451
420
|
}
|
|
452
421
|
},
|
|
453
422
|
loc: {
|
|
454
423
|
start: {
|
|
455
|
-
line:
|
|
456
|
-
column:
|
|
424
|
+
line: 66,
|
|
425
|
+
column: 43
|
|
457
426
|
},
|
|
458
427
|
end: {
|
|
459
|
-
line:
|
|
428
|
+
line: 75,
|
|
460
429
|
column: 1
|
|
461
430
|
}
|
|
462
431
|
},
|
|
463
|
-
line:
|
|
432
|
+
line: 66
|
|
464
433
|
},
|
|
465
434
|
"3": {
|
|
466
|
-
name: "
|
|
435
|
+
name: "generateInstallAdapterCommand",
|
|
467
436
|
decl: {
|
|
468
437
|
start: {
|
|
469
|
-
line:
|
|
438
|
+
line: 80,
|
|
470
439
|
column: 9
|
|
471
440
|
},
|
|
472
441
|
end: {
|
|
473
|
-
line:
|
|
474
|
-
column:
|
|
442
|
+
line: 80,
|
|
443
|
+
column: 38
|
|
475
444
|
}
|
|
476
445
|
},
|
|
477
446
|
loc: {
|
|
478
447
|
start: {
|
|
479
|
-
line:
|
|
480
|
-
column:
|
|
448
|
+
line: 80,
|
|
449
|
+
column: 95
|
|
481
450
|
},
|
|
482
451
|
end: {
|
|
483
|
-
line:
|
|
452
|
+
line: 82,
|
|
484
453
|
column: 1
|
|
485
454
|
}
|
|
486
455
|
},
|
|
487
|
-
line:
|
|
456
|
+
line: 80
|
|
488
457
|
},
|
|
489
458
|
"4": {
|
|
490
|
-
name: "
|
|
459
|
+
name: "getNearestNodeModulesDirectory",
|
|
491
460
|
decl: {
|
|
492
461
|
start: {
|
|
493
|
-
line:
|
|
462
|
+
line: 87,
|
|
494
463
|
column: 9
|
|
495
464
|
},
|
|
496
465
|
end: {
|
|
497
|
-
line:
|
|
466
|
+
line: 87,
|
|
498
467
|
column: 39
|
|
499
468
|
}
|
|
500
469
|
},
|
|
501
470
|
loc: {
|
|
502
471
|
start: {
|
|
503
|
-
line:
|
|
504
|
-
column:
|
|
472
|
+
line: 87,
|
|
473
|
+
column: 50
|
|
505
474
|
},
|
|
506
475
|
end: {
|
|
507
|
-
line:
|
|
476
|
+
line: 100,
|
|
508
477
|
column: 1
|
|
509
478
|
}
|
|
510
479
|
},
|
|
511
|
-
line:
|
|
480
|
+
line: 87
|
|
512
481
|
},
|
|
513
482
|
"5": {
|
|
514
|
-
name: "
|
|
483
|
+
name: "getNearestProjectRootDirectory",
|
|
515
484
|
decl: {
|
|
516
485
|
start: {
|
|
517
|
-
line:
|
|
486
|
+
line: 105,
|
|
518
487
|
column: 9
|
|
519
488
|
},
|
|
520
489
|
end: {
|
|
521
|
-
line:
|
|
522
|
-
column:
|
|
490
|
+
line: 105,
|
|
491
|
+
column: 39
|
|
523
492
|
}
|
|
524
493
|
},
|
|
525
494
|
loc: {
|
|
526
495
|
start: {
|
|
527
|
-
line:
|
|
528
|
-
column:
|
|
496
|
+
line: 105,
|
|
497
|
+
column: 60
|
|
529
498
|
},
|
|
530
499
|
end: {
|
|
531
|
-
line:
|
|
500
|
+
line: 107,
|
|
532
501
|
column: 1
|
|
533
502
|
}
|
|
534
503
|
},
|
|
535
|
-
line:
|
|
504
|
+
line: 105
|
|
536
505
|
},
|
|
537
506
|
"6": {
|
|
538
|
-
name: "
|
|
507
|
+
name: "getInstallStringMappings",
|
|
539
508
|
decl: {
|
|
540
509
|
start: {
|
|
541
|
-
line:
|
|
510
|
+
line: 112,
|
|
542
511
|
column: 9
|
|
543
512
|
},
|
|
544
513
|
end: {
|
|
545
|
-
line:
|
|
514
|
+
line: 112,
|
|
546
515
|
column: 33
|
|
547
516
|
}
|
|
548
517
|
},
|
|
549
518
|
loc: {
|
|
550
519
|
start: {
|
|
551
|
-
line:
|
|
552
|
-
column:
|
|
520
|
+
line: 112,
|
|
521
|
+
column: 99
|
|
553
522
|
},
|
|
554
523
|
end: {
|
|
555
|
-
line:
|
|
524
|
+
line: 132,
|
|
556
525
|
column: 1
|
|
557
526
|
}
|
|
558
527
|
},
|
|
559
|
-
line:
|
|
528
|
+
line: 112
|
|
560
529
|
},
|
|
561
530
|
"7": {
|
|
562
531
|
name: "getPrompter",
|
|
563
532
|
decl: {
|
|
564
533
|
start: {
|
|
565
|
-
line:
|
|
534
|
+
line: 137,
|
|
566
535
|
column: 9
|
|
567
536
|
},
|
|
568
537
|
end: {
|
|
569
|
-
line:
|
|
538
|
+
line: 137,
|
|
570
539
|
column: 20
|
|
571
540
|
}
|
|
572
541
|
},
|
|
573
542
|
loc: {
|
|
574
543
|
start: {
|
|
575
|
-
line:
|
|
544
|
+
line: 137,
|
|
576
545
|
column: 35
|
|
577
546
|
},
|
|
578
547
|
end: {
|
|
579
|
-
line:
|
|
548
|
+
line: 152,
|
|
580
549
|
column: 1
|
|
581
550
|
}
|
|
582
551
|
},
|
|
583
|
-
line:
|
|
552
|
+
line: 137
|
|
584
553
|
},
|
|
585
554
|
"8": {
|
|
586
555
|
name: "resolveAdapterPath",
|
|
587
556
|
decl: {
|
|
588
557
|
start: {
|
|
589
|
-
line:
|
|
558
|
+
line: 158,
|
|
590
559
|
column: 9
|
|
591
560
|
},
|
|
592
561
|
end: {
|
|
593
|
-
line:
|
|
562
|
+
line: 158,
|
|
594
563
|
column: 27
|
|
595
564
|
}
|
|
596
565
|
},
|
|
597
566
|
loc: {
|
|
598
567
|
start: {
|
|
599
|
-
line:
|
|
568
|
+
line: 158,
|
|
600
569
|
column: 49
|
|
601
570
|
},
|
|
602
571
|
end: {
|
|
603
|
-
line:
|
|
572
|
+
line: 175,
|
|
604
573
|
column: 1
|
|
605
574
|
}
|
|
606
575
|
},
|
|
607
|
-
line:
|
|
576
|
+
line: 158
|
|
608
577
|
},
|
|
609
578
|
"9": {
|
|
610
579
|
name: "getGitRootPath",
|
|
611
580
|
decl: {
|
|
612
581
|
start: {
|
|
613
|
-
line:
|
|
582
|
+
line: 177,
|
|
614
583
|
column: 9
|
|
615
584
|
},
|
|
616
585
|
end: {
|
|
617
|
-
line:
|
|
586
|
+
line: 177,
|
|
618
587
|
column: 23
|
|
619
588
|
}
|
|
620
589
|
},
|
|
621
590
|
loc: {
|
|
622
591
|
start: {
|
|
623
|
-
line:
|
|
592
|
+
line: 177,
|
|
624
593
|
column: 27
|
|
625
594
|
},
|
|
626
595
|
end: {
|
|
627
|
-
line:
|
|
596
|
+
line: 179,
|
|
628
597
|
column: 1
|
|
629
598
|
}
|
|
630
599
|
},
|
|
631
|
-
line:
|
|
600
|
+
line: 177
|
|
632
601
|
}
|
|
633
602
|
},
|
|
634
603
|
branchMap: {
|
|
635
604
|
"0": {
|
|
636
605
|
loc: {
|
|
637
606
|
start: {
|
|
638
|
-
line:
|
|
607
|
+
line: 47,
|
|
639
608
|
column: 15
|
|
640
609
|
},
|
|
641
610
|
end: {
|
|
642
|
-
line:
|
|
611
|
+
line: 47,
|
|
643
612
|
column: 61
|
|
644
613
|
}
|
|
645
614
|
},
|
|
646
615
|
type: "binary-expr",
|
|
647
616
|
locations: [{
|
|
648
617
|
start: {
|
|
649
|
-
line:
|
|
618
|
+
line: 47,
|
|
650
619
|
column: 15
|
|
651
620
|
},
|
|
652
621
|
end: {
|
|
653
|
-
line:
|
|
622
|
+
line: 47,
|
|
654
623
|
column: 53
|
|
655
624
|
}
|
|
656
625
|
}, {
|
|
657
626
|
start: {
|
|
658
|
-
line:
|
|
627
|
+
line: 47,
|
|
659
628
|
column: 57
|
|
660
629
|
},
|
|
661
630
|
end: {
|
|
662
|
-
line:
|
|
631
|
+
line: 47,
|
|
663
632
|
column: 61
|
|
664
633
|
}
|
|
665
634
|
}],
|
|
666
|
-
line:
|
|
635
|
+
line: 47
|
|
667
636
|
},
|
|
668
637
|
"1": {
|
|
669
638
|
loc: {
|
|
670
639
|
start: {
|
|
671
|
-
line:
|
|
640
|
+
line: 50,
|
|
672
641
|
column: 2
|
|
673
642
|
},
|
|
674
643
|
end: {
|
|
675
|
-
line:
|
|
644
|
+
line: 52,
|
|
676
645
|
column: 3
|
|
677
646
|
}
|
|
678
647
|
},
|
|
679
648
|
type: "if",
|
|
680
649
|
locations: [{
|
|
681
650
|
start: {
|
|
682
|
-
line:
|
|
651
|
+
line: 50,
|
|
683
652
|
column: 2
|
|
684
653
|
},
|
|
685
654
|
end: {
|
|
686
|
-
line:
|
|
655
|
+
line: 52,
|
|
687
656
|
column: 3
|
|
688
657
|
}
|
|
689
658
|
}, {
|
|
@@ -696,460 +665,616 @@ function cov_16lcdpz3tp() {
|
|
|
696
665
|
column: undefined
|
|
697
666
|
}
|
|
698
667
|
}],
|
|
699
|
-
line:
|
|
668
|
+
line: 50
|
|
700
669
|
},
|
|
701
670
|
"2": {
|
|
702
671
|
loc: {
|
|
703
672
|
start: {
|
|
704
|
-
line:
|
|
705
|
-
column:
|
|
673
|
+
line: 74,
|
|
674
|
+
column: 9
|
|
706
675
|
},
|
|
707
676
|
end: {
|
|
708
|
-
line:
|
|
709
|
-
column:
|
|
677
|
+
line: 74,
|
|
678
|
+
column: 67
|
|
710
679
|
}
|
|
711
680
|
},
|
|
712
|
-
type: "
|
|
681
|
+
type: "binary-expr",
|
|
713
682
|
locations: [{
|
|
714
683
|
start: {
|
|
715
|
-
line:
|
|
716
|
-
column:
|
|
684
|
+
line: 74,
|
|
685
|
+
column: 9
|
|
717
686
|
},
|
|
718
687
|
end: {
|
|
719
|
-
line:
|
|
720
|
-
column:
|
|
688
|
+
line: 74,
|
|
689
|
+
column: 48
|
|
721
690
|
}
|
|
722
691
|
}, {
|
|
723
692
|
start: {
|
|
724
|
-
line:
|
|
725
|
-
column:
|
|
693
|
+
line: 74,
|
|
694
|
+
column: 52
|
|
726
695
|
},
|
|
727
696
|
end: {
|
|
728
|
-
line:
|
|
729
|
-
column:
|
|
697
|
+
line: 74,
|
|
698
|
+
column: 67
|
|
730
699
|
}
|
|
731
700
|
}],
|
|
732
|
-
line:
|
|
701
|
+
line: 74
|
|
733
702
|
},
|
|
734
703
|
"3": {
|
|
735
704
|
loc: {
|
|
736
705
|
start: {
|
|
737
|
-
line:
|
|
738
|
-
column:
|
|
706
|
+
line: 80,
|
|
707
|
+
column: 71
|
|
739
708
|
},
|
|
740
709
|
end: {
|
|
741
|
-
line:
|
|
742
|
-
column:
|
|
710
|
+
line: 80,
|
|
711
|
+
column: 93
|
|
743
712
|
}
|
|
744
713
|
},
|
|
745
|
-
type: "
|
|
714
|
+
type: "default-arg",
|
|
746
715
|
locations: [{
|
|
747
716
|
start: {
|
|
748
|
-
line:
|
|
749
|
-
column:
|
|
750
|
-
},
|
|
751
|
-
end: {
|
|
752
|
-
line: 88,
|
|
753
|
-
column: 5
|
|
754
|
-
}
|
|
755
|
-
}, {
|
|
756
|
-
start: {
|
|
757
|
-
line: undefined,
|
|
758
|
-
column: undefined
|
|
717
|
+
line: 80,
|
|
718
|
+
column: 88
|
|
759
719
|
},
|
|
760
720
|
end: {
|
|
761
|
-
line:
|
|
762
|
-
column:
|
|
721
|
+
line: 80,
|
|
722
|
+
column: 93
|
|
763
723
|
}
|
|
764
724
|
}],
|
|
765
|
-
line:
|
|
725
|
+
line: 80
|
|
766
726
|
},
|
|
767
727
|
"4": {
|
|
768
728
|
loc: {
|
|
769
729
|
start: {
|
|
770
|
-
line:
|
|
730
|
+
line: 95,
|
|
771
731
|
column: 2
|
|
772
732
|
},
|
|
773
733
|
end: {
|
|
774
|
-
line:
|
|
734
|
+
line: 99,
|
|
775
735
|
column: 3
|
|
776
736
|
}
|
|
777
737
|
},
|
|
778
738
|
type: "if",
|
|
779
739
|
locations: [{
|
|
780
740
|
start: {
|
|
781
|
-
line:
|
|
741
|
+
line: 95,
|
|
782
742
|
column: 2
|
|
783
743
|
},
|
|
784
744
|
end: {
|
|
785
|
-
line:
|
|
745
|
+
line: 99,
|
|
786
746
|
column: 3
|
|
787
747
|
}
|
|
788
748
|
}],
|
|
789
|
-
line:
|
|
749
|
+
line: 95
|
|
790
750
|
},
|
|
791
751
|
"5": {
|
|
792
752
|
loc: {
|
|
793
753
|
start: {
|
|
794
|
-
line:
|
|
754
|
+
line: 95,
|
|
795
755
|
column: 6
|
|
796
756
|
},
|
|
797
757
|
end: {
|
|
798
|
-
line:
|
|
758
|
+
line: 95,
|
|
799
759
|
column: 65
|
|
800
760
|
}
|
|
801
761
|
},
|
|
802
762
|
type: "binary-expr",
|
|
803
763
|
locations: [{
|
|
804
764
|
start: {
|
|
805
|
-
line:
|
|
765
|
+
line: 95,
|
|
806
766
|
column: 6
|
|
807
767
|
},
|
|
808
768
|
end: {
|
|
809
|
-
line:
|
|
769
|
+
line: 95,
|
|
810
770
|
column: 28
|
|
811
771
|
}
|
|
812
772
|
}, {
|
|
813
773
|
start: {
|
|
814
|
-
line:
|
|
774
|
+
line: 95,
|
|
815
775
|
column: 32
|
|
816
776
|
},
|
|
817
777
|
end: {
|
|
818
|
-
line:
|
|
778
|
+
line: 95,
|
|
819
779
|
column: 65
|
|
820
780
|
}
|
|
821
781
|
}],
|
|
822
|
-
line:
|
|
782
|
+
line: 95
|
|
823
783
|
},
|
|
824
784
|
"6": {
|
|
825
785
|
loc: {
|
|
826
786
|
start: {
|
|
827
|
-
line:
|
|
787
|
+
line: 114,
|
|
828
788
|
column: 17
|
|
829
789
|
},
|
|
830
790
|
end: {
|
|
831
|
-
line:
|
|
832
|
-
column:
|
|
791
|
+
line: 114,
|
|
792
|
+
column: 56
|
|
833
793
|
}
|
|
834
794
|
},
|
|
835
795
|
type: "cond-expr",
|
|
836
796
|
locations: [{
|
|
837
797
|
start: {
|
|
838
|
-
line:
|
|
839
|
-
column:
|
|
798
|
+
line: 114,
|
|
799
|
+
column: 36
|
|
840
800
|
},
|
|
841
801
|
end: {
|
|
842
|
-
line:
|
|
843
|
-
column:
|
|
802
|
+
line: 114,
|
|
803
|
+
column: 44
|
|
844
804
|
}
|
|
845
805
|
}, {
|
|
846
806
|
start: {
|
|
847
|
-
line:
|
|
848
|
-
column:
|
|
807
|
+
line: 114,
|
|
808
|
+
column: 47
|
|
849
809
|
},
|
|
850
810
|
end: {
|
|
851
|
-
line:
|
|
852
|
-
column:
|
|
811
|
+
line: 114,
|
|
812
|
+
column: 56
|
|
853
813
|
}
|
|
854
814
|
}],
|
|
855
|
-
line:
|
|
815
|
+
line: 114
|
|
856
816
|
},
|
|
857
817
|
"7": {
|
|
858
818
|
loc: {
|
|
859
819
|
start: {
|
|
860
|
-
line:
|
|
861
|
-
column:
|
|
820
|
+
line: 114,
|
|
821
|
+
column: 17
|
|
862
822
|
},
|
|
863
823
|
end: {
|
|
864
|
-
line:
|
|
865
|
-
column:
|
|
824
|
+
line: 114,
|
|
825
|
+
column: 33
|
|
866
826
|
}
|
|
867
827
|
},
|
|
868
828
|
type: "binary-expr",
|
|
869
829
|
locations: [{
|
|
870
830
|
start: {
|
|
871
|
-
line:
|
|
872
|
-
column:
|
|
831
|
+
line: 114,
|
|
832
|
+
column: 17
|
|
873
833
|
},
|
|
874
834
|
end: {
|
|
875
|
-
line:
|
|
876
|
-
column:
|
|
835
|
+
line: 114,
|
|
836
|
+
column: 21
|
|
877
837
|
}
|
|
878
838
|
}, {
|
|
879
839
|
start: {
|
|
880
|
-
line:
|
|
881
|
-
column:
|
|
840
|
+
line: 114,
|
|
841
|
+
column: 25
|
|
882
842
|
},
|
|
883
843
|
end: {
|
|
884
|
-
line:
|
|
885
|
-
column:
|
|
844
|
+
line: 114,
|
|
845
|
+
column: 33
|
|
886
846
|
}
|
|
887
847
|
}],
|
|
888
|
-
line:
|
|
848
|
+
line: 114
|
|
889
849
|
},
|
|
890
850
|
"8": {
|
|
891
851
|
loc: {
|
|
892
852
|
start: {
|
|
893
|
-
line:
|
|
853
|
+
line: 115,
|
|
894
854
|
column: 20
|
|
895
855
|
},
|
|
896
856
|
end: {
|
|
897
|
-
line:
|
|
857
|
+
line: 115,
|
|
898
858
|
column: 54
|
|
899
859
|
}
|
|
900
860
|
},
|
|
901
861
|
type: "cond-expr",
|
|
902
862
|
locations: [{
|
|
903
863
|
start: {
|
|
904
|
-
line:
|
|
864
|
+
line: 115,
|
|
905
865
|
column: 30
|
|
906
866
|
},
|
|
907
867
|
end: {
|
|
908
|
-
line:
|
|
868
|
+
line: 115,
|
|
909
869
|
column: 42
|
|
910
870
|
}
|
|
911
871
|
}, {
|
|
912
872
|
start: {
|
|
913
|
-
line:
|
|
873
|
+
line: 115,
|
|
914
874
|
column: 45
|
|
915
875
|
},
|
|
916
876
|
end: {
|
|
917
|
-
line:
|
|
877
|
+
line: 115,
|
|
918
878
|
column: 54
|
|
919
879
|
}
|
|
920
880
|
}],
|
|
921
|
-
line:
|
|
881
|
+
line: 115
|
|
922
882
|
},
|
|
923
883
|
"9": {
|
|
924
884
|
loc: {
|
|
925
885
|
start: {
|
|
926
|
-
line:
|
|
886
|
+
line: 116,
|
|
927
887
|
column: 22
|
|
928
888
|
},
|
|
929
889
|
end: {
|
|
930
|
-
line:
|
|
890
|
+
line: 116,
|
|
931
891
|
column: 60
|
|
932
892
|
}
|
|
933
893
|
},
|
|
934
894
|
type: "cond-expr",
|
|
935
895
|
locations: [{
|
|
936
896
|
start: {
|
|
937
|
-
line:
|
|
897
|
+
line: 116,
|
|
938
898
|
column: 34
|
|
939
899
|
},
|
|
940
900
|
end: {
|
|
941
|
-
line:
|
|
901
|
+
line: 116,
|
|
942
902
|
column: 48
|
|
943
903
|
}
|
|
944
904
|
}, {
|
|
945
905
|
start: {
|
|
946
|
-
line:
|
|
906
|
+
line: 116,
|
|
947
907
|
column: 51
|
|
948
908
|
},
|
|
949
909
|
end: {
|
|
950
|
-
line:
|
|
910
|
+
line: 116,
|
|
951
911
|
column: 60
|
|
952
912
|
}
|
|
953
913
|
}],
|
|
954
|
-
line:
|
|
914
|
+
line: 116
|
|
955
915
|
},
|
|
956
916
|
"10": {
|
|
957
917
|
loc: {
|
|
958
918
|
start: {
|
|
959
|
-
line:
|
|
919
|
+
line: 117,
|
|
960
920
|
column: 18
|
|
961
921
|
},
|
|
962
922
|
end: {
|
|
963
|
-
line:
|
|
923
|
+
line: 117,
|
|
964
924
|
column: 47
|
|
965
925
|
}
|
|
966
926
|
},
|
|
967
927
|
type: "cond-expr",
|
|
968
928
|
locations: [{
|
|
969
929
|
start: {
|
|
970
|
-
line:
|
|
930
|
+
line: 117,
|
|
971
931
|
column: 26
|
|
972
932
|
},
|
|
973
933
|
end: {
|
|
974
|
-
line:
|
|
934
|
+
line: 117,
|
|
975
935
|
column: 35
|
|
976
936
|
}
|
|
977
937
|
}, {
|
|
978
938
|
start: {
|
|
979
|
-
line:
|
|
939
|
+
line: 117,
|
|
980
940
|
column: 38
|
|
981
941
|
},
|
|
982
942
|
end: {
|
|
983
|
-
line:
|
|
943
|
+
line: 117,
|
|
984
944
|
column: 47
|
|
985
945
|
}
|
|
986
946
|
}],
|
|
987
|
-
line:
|
|
947
|
+
line: 117
|
|
988
948
|
},
|
|
989
949
|
"11": {
|
|
990
950
|
loc: {
|
|
991
951
|
start: {
|
|
992
|
-
line:
|
|
952
|
+
line: 120,
|
|
993
953
|
column: 16
|
|
994
954
|
},
|
|
995
955
|
end: {
|
|
996
|
-
line:
|
|
956
|
+
line: 120,
|
|
997
957
|
column: 41
|
|
998
958
|
}
|
|
999
959
|
},
|
|
1000
960
|
type: "cond-expr",
|
|
1001
961
|
locations: [{
|
|
1002
962
|
start: {
|
|
1003
|
-
line:
|
|
963
|
+
line: 120,
|
|
1004
964
|
column: 22
|
|
1005
965
|
},
|
|
1006
966
|
end: {
|
|
1007
|
-
line:
|
|
967
|
+
line: 120,
|
|
1008
968
|
column: 29
|
|
1009
969
|
}
|
|
1010
970
|
}, {
|
|
1011
971
|
start: {
|
|
1012
|
-
line:
|
|
972
|
+
line: 120,
|
|
1013
973
|
column: 32
|
|
1014
974
|
},
|
|
1015
975
|
end: {
|
|
1016
|
-
line:
|
|
976
|
+
line: 120,
|
|
1017
977
|
column: 41
|
|
1018
978
|
}
|
|
1019
979
|
}],
|
|
1020
|
-
line:
|
|
980
|
+
line: 120
|
|
1021
981
|
},
|
|
1022
982
|
"12": {
|
|
1023
983
|
loc: {
|
|
1024
984
|
start: {
|
|
1025
|
-
line:
|
|
985
|
+
line: 121,
|
|
1026
986
|
column: 18
|
|
1027
987
|
},
|
|
1028
988
|
end: {
|
|
1029
|
-
line:
|
|
989
|
+
line: 121,
|
|
1030
990
|
column: 47
|
|
1031
991
|
}
|
|
1032
992
|
},
|
|
1033
993
|
type: "cond-expr",
|
|
1034
994
|
locations: [{
|
|
1035
995
|
start: {
|
|
1036
|
-
line:
|
|
996
|
+
line: 121,
|
|
1037
997
|
column: 26
|
|
1038
998
|
},
|
|
1039
999
|
end: {
|
|
1040
|
-
line:
|
|
1000
|
+
line: 121,
|
|
1041
1001
|
column: 35
|
|
1042
1002
|
}
|
|
1043
1003
|
}, {
|
|
1044
1004
|
start: {
|
|
1045
|
-
line:
|
|
1005
|
+
line: 121,
|
|
1046
1006
|
column: 38
|
|
1047
1007
|
},
|
|
1048
1008
|
end: {
|
|
1049
|
-
line:
|
|
1009
|
+
line: 121,
|
|
1050
1010
|
column: 47
|
|
1051
1011
|
}
|
|
1052
1012
|
}],
|
|
1053
|
-
line:
|
|
1013
|
+
line: 121
|
|
1054
1014
|
},
|
|
1055
1015
|
"13": {
|
|
1056
1016
|
loc: {
|
|
1057
1017
|
start: {
|
|
1058
|
-
line:
|
|
1018
|
+
line: 122,
|
|
1059
1019
|
column: 18
|
|
1060
1020
|
},
|
|
1061
1021
|
end: {
|
|
1062
|
-
line:
|
|
1022
|
+
line: 122,
|
|
1063
1023
|
column: 47
|
|
1064
1024
|
}
|
|
1065
1025
|
},
|
|
1066
1026
|
type: "cond-expr",
|
|
1067
1027
|
locations: [{
|
|
1068
1028
|
start: {
|
|
1069
|
-
line:
|
|
1029
|
+
line: 122,
|
|
1070
1030
|
column: 26
|
|
1071
1031
|
},
|
|
1072
1032
|
end: {
|
|
1073
|
-
line:
|
|
1033
|
+
line: 122,
|
|
1074
1034
|
column: 35
|
|
1075
1035
|
}
|
|
1076
1036
|
}, {
|
|
1077
1037
|
start: {
|
|
1078
|
-
line:
|
|
1038
|
+
line: 122,
|
|
1079
1039
|
column: 38
|
|
1080
1040
|
},
|
|
1081
1041
|
end: {
|
|
1082
|
-
line:
|
|
1042
|
+
line: 122,
|
|
1083
1043
|
column: 47
|
|
1084
1044
|
}
|
|
1085
1045
|
}],
|
|
1086
|
-
line:
|
|
1046
|
+
line: 122
|
|
1087
1047
|
},
|
|
1088
1048
|
"14": {
|
|
1089
1049
|
loc: {
|
|
1090
1050
|
start: {
|
|
1091
|
-
line:
|
|
1051
|
+
line: 125,
|
|
1052
|
+
column: 17
|
|
1053
|
+
},
|
|
1054
|
+
end: {
|
|
1055
|
+
line: 125,
|
|
1056
|
+
column: 61
|
|
1057
|
+
}
|
|
1058
|
+
},
|
|
1059
|
+
type: "cond-expr",
|
|
1060
|
+
locations: [{
|
|
1061
|
+
start: {
|
|
1062
|
+
line: 125,
|
|
1063
|
+
column: 36
|
|
1064
|
+
},
|
|
1065
|
+
end: {
|
|
1066
|
+
line: 125,
|
|
1067
|
+
column: 49
|
|
1068
|
+
}
|
|
1069
|
+
}, {
|
|
1070
|
+
start: {
|
|
1071
|
+
line: 125,
|
|
1072
|
+
column: 52
|
|
1073
|
+
},
|
|
1074
|
+
end: {
|
|
1075
|
+
line: 125,
|
|
1076
|
+
column: 61
|
|
1077
|
+
}
|
|
1078
|
+
}],
|
|
1079
|
+
line: 125
|
|
1080
|
+
},
|
|
1081
|
+
"15": {
|
|
1082
|
+
loc: {
|
|
1083
|
+
start: {
|
|
1084
|
+
line: 125,
|
|
1085
|
+
column: 17
|
|
1086
|
+
},
|
|
1087
|
+
end: {
|
|
1088
|
+
line: 125,
|
|
1089
|
+
column: 33
|
|
1090
|
+
}
|
|
1091
|
+
},
|
|
1092
|
+
type: "binary-expr",
|
|
1093
|
+
locations: [{
|
|
1094
|
+
start: {
|
|
1095
|
+
line: 125,
|
|
1096
|
+
column: 17
|
|
1097
|
+
},
|
|
1098
|
+
end: {
|
|
1099
|
+
line: 125,
|
|
1100
|
+
column: 21
|
|
1101
|
+
}
|
|
1102
|
+
}, {
|
|
1103
|
+
start: {
|
|
1104
|
+
line: 125,
|
|
1105
|
+
column: 25
|
|
1106
|
+
},
|
|
1107
|
+
end: {
|
|
1108
|
+
line: 125,
|
|
1109
|
+
column: 33
|
|
1110
|
+
}
|
|
1111
|
+
}],
|
|
1112
|
+
line: 125
|
|
1113
|
+
},
|
|
1114
|
+
"16": {
|
|
1115
|
+
loc: {
|
|
1116
|
+
start: {
|
|
1117
|
+
line: 126,
|
|
1118
|
+
column: 16
|
|
1119
|
+
},
|
|
1120
|
+
end: {
|
|
1121
|
+
line: 126,
|
|
1122
|
+
column: 50
|
|
1123
|
+
}
|
|
1124
|
+
},
|
|
1125
|
+
type: "cond-expr",
|
|
1126
|
+
locations: [{
|
|
1127
|
+
start: {
|
|
1128
|
+
line: 126,
|
|
1129
|
+
column: 26
|
|
1130
|
+
},
|
|
1131
|
+
end: {
|
|
1132
|
+
line: 126,
|
|
1133
|
+
column: 38
|
|
1134
|
+
}
|
|
1135
|
+
}, {
|
|
1136
|
+
start: {
|
|
1137
|
+
line: 126,
|
|
1138
|
+
column: 41
|
|
1139
|
+
},
|
|
1140
|
+
end: {
|
|
1141
|
+
line: 126,
|
|
1142
|
+
column: 50
|
|
1143
|
+
}
|
|
1144
|
+
}],
|
|
1145
|
+
line: 126
|
|
1146
|
+
},
|
|
1147
|
+
"17": {
|
|
1148
|
+
loc: {
|
|
1149
|
+
start: {
|
|
1150
|
+
line: 127,
|
|
1151
|
+
column: 18
|
|
1152
|
+
},
|
|
1153
|
+
end: {
|
|
1154
|
+
line: 127,
|
|
1155
|
+
column: 56
|
|
1156
|
+
}
|
|
1157
|
+
},
|
|
1158
|
+
type: "cond-expr",
|
|
1159
|
+
locations: [{
|
|
1160
|
+
start: {
|
|
1161
|
+
line: 127,
|
|
1162
|
+
column: 30
|
|
1163
|
+
},
|
|
1164
|
+
end: {
|
|
1165
|
+
line: 127,
|
|
1166
|
+
column: 44
|
|
1167
|
+
}
|
|
1168
|
+
}, {
|
|
1169
|
+
start: {
|
|
1170
|
+
line: 127,
|
|
1171
|
+
column: 47
|
|
1172
|
+
},
|
|
1173
|
+
end: {
|
|
1174
|
+
line: 127,
|
|
1175
|
+
column: 56
|
|
1176
|
+
}
|
|
1177
|
+
}],
|
|
1178
|
+
line: 127
|
|
1179
|
+
},
|
|
1180
|
+
"18": {
|
|
1181
|
+
loc: {
|
|
1182
|
+
start: {
|
|
1183
|
+
line: 131,
|
|
1184
|
+
column: 9
|
|
1185
|
+
},
|
|
1186
|
+
end: {
|
|
1187
|
+
line: 131,
|
|
1188
|
+
column: 35
|
|
1189
|
+
}
|
|
1190
|
+
},
|
|
1191
|
+
type: "binary-expr",
|
|
1192
|
+
locations: [{
|
|
1193
|
+
start: {
|
|
1194
|
+
line: 131,
|
|
1195
|
+
column: 9
|
|
1196
|
+
},
|
|
1197
|
+
end: {
|
|
1198
|
+
line: 131,
|
|
1199
|
+
column: 28
|
|
1200
|
+
}
|
|
1201
|
+
}, {
|
|
1202
|
+
start: {
|
|
1203
|
+
line: 131,
|
|
1204
|
+
column: 32
|
|
1205
|
+
},
|
|
1206
|
+
end: {
|
|
1207
|
+
line: 131,
|
|
1208
|
+
column: 35
|
|
1209
|
+
}
|
|
1210
|
+
}],
|
|
1211
|
+
line: 131
|
|
1212
|
+
},
|
|
1213
|
+
"19": {
|
|
1214
|
+
loc: {
|
|
1215
|
+
start: {
|
|
1216
|
+
line: 161,
|
|
1092
1217
|
column: 15
|
|
1093
1218
|
},
|
|
1094
1219
|
end: {
|
|
1095
|
-
line:
|
|
1220
|
+
line: 161,
|
|
1096
1221
|
column: 68
|
|
1097
1222
|
}
|
|
1098
1223
|
},
|
|
1099
1224
|
type: "binary-expr",
|
|
1100
1225
|
locations: [{
|
|
1101
1226
|
start: {
|
|
1102
|
-
line:
|
|
1227
|
+
line: 161,
|
|
1103
1228
|
column: 15
|
|
1104
1229
|
},
|
|
1105
1230
|
end: {
|
|
1106
|
-
line:
|
|
1231
|
+
line: 161,
|
|
1107
1232
|
column: 36
|
|
1108
1233
|
}
|
|
1109
1234
|
}, {
|
|
1110
1235
|
start: {
|
|
1111
|
-
line:
|
|
1236
|
+
line: 161,
|
|
1112
1237
|
column: 40
|
|
1113
1238
|
},
|
|
1114
1239
|
end: {
|
|
1115
|
-
line:
|
|
1240
|
+
line: 161,
|
|
1116
1241
|
column: 68
|
|
1117
1242
|
}
|
|
1118
1243
|
}],
|
|
1119
|
-
line:
|
|
1244
|
+
line: 161
|
|
1120
1245
|
},
|
|
1121
|
-
"
|
|
1246
|
+
"20": {
|
|
1122
1247
|
loc: {
|
|
1123
1248
|
start: {
|
|
1124
|
-
line:
|
|
1249
|
+
line: 164,
|
|
1125
1250
|
column: 28
|
|
1126
1251
|
},
|
|
1127
1252
|
end: {
|
|
1128
|
-
line:
|
|
1253
|
+
line: 166,
|
|
1129
1254
|
column: 22
|
|
1130
1255
|
}
|
|
1131
1256
|
},
|
|
1132
1257
|
type: "cond-expr",
|
|
1133
1258
|
locations: [{
|
|
1134
1259
|
start: {
|
|
1135
|
-
line:
|
|
1260
|
+
line: 165,
|
|
1136
1261
|
column: 4
|
|
1137
1262
|
},
|
|
1138
1263
|
end: {
|
|
1139
|
-
line:
|
|
1264
|
+
line: 165,
|
|
1140
1265
|
column: 54
|
|
1141
1266
|
}
|
|
1142
1267
|
}, {
|
|
1143
1268
|
start: {
|
|
1144
|
-
line:
|
|
1269
|
+
line: 166,
|
|
1145
1270
|
column: 4
|
|
1146
1271
|
},
|
|
1147
1272
|
end: {
|
|
1148
|
-
line:
|
|
1273
|
+
line: 166,
|
|
1149
1274
|
column: 22
|
|
1150
1275
|
}
|
|
1151
1276
|
}],
|
|
1152
|
-
line:
|
|
1277
|
+
line: 164
|
|
1153
1278
|
}
|
|
1154
1279
|
},
|
|
1155
1280
|
s: {
|
|
@@ -1185,9 +1310,7 @@ function cov_16lcdpz3tp() {
|
|
|
1185
1310
|
"29": 0,
|
|
1186
1311
|
"30": 0,
|
|
1187
1312
|
"31": 0,
|
|
1188
|
-
"32": 0
|
|
1189
|
-
"33": 0,
|
|
1190
|
-
"34": 0
|
|
1313
|
+
"32": 0
|
|
1191
1314
|
},
|
|
1192
1315
|
f: {
|
|
1193
1316
|
"0": 0,
|
|
@@ -1205,7 +1328,7 @@ function cov_16lcdpz3tp() {
|
|
|
1205
1328
|
"0": [0, 0],
|
|
1206
1329
|
"1": [0, 0],
|
|
1207
1330
|
"2": [0, 0],
|
|
1208
|
-
"3": [0
|
|
1331
|
+
"3": [0],
|
|
1209
1332
|
"4": [0],
|
|
1210
1333
|
"5": [0, 0],
|
|
1211
1334
|
"6": [0, 0],
|
|
@@ -1217,17 +1340,20 @@ function cov_16lcdpz3tp() {
|
|
|
1217
1340
|
"12": [0, 0],
|
|
1218
1341
|
"13": [0, 0],
|
|
1219
1342
|
"14": [0, 0],
|
|
1220
|
-
"15": [0, 0]
|
|
1343
|
+
"15": [0, 0],
|
|
1344
|
+
"16": [0, 0],
|
|
1345
|
+
"17": [0, 0],
|
|
1346
|
+
"18": [0, 0],
|
|
1347
|
+
"19": [0, 0],
|
|
1348
|
+
"20": [0, 0]
|
|
1221
1349
|
},
|
|
1222
1350
|
_coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
|
|
1223
|
-
hash: "
|
|
1351
|
+
hash: "e37ec3ccafde4f581a254419294338bc76165289"
|
|
1224
1352
|
};
|
|
1225
1353
|
var coverage = global[gcv] || (global[gcv] = {});
|
|
1226
|
-
|
|
1227
1354
|
if (!coverage[path] || coverage[path].hash !== hash) {
|
|
1228
1355
|
coverage[path] = coverageData;
|
|
1229
1356
|
}
|
|
1230
|
-
|
|
1231
1357
|
var actualCoverage = coverage[path];
|
|
1232
1358
|
{
|
|
1233
1359
|
// @ts-ignore
|
|
@@ -1237,9 +1363,7 @@ function cov_16lcdpz3tp() {
|
|
|
1237
1363
|
}
|
|
1238
1364
|
return actualCoverage;
|
|
1239
1365
|
}
|
|
1240
|
-
|
|
1241
1366
|
cov_16lcdpz3tp();
|
|
1242
|
-
|
|
1243
1367
|
/**
|
|
1244
1368
|
* ADAPTER
|
|
1245
1369
|
*
|
|
@@ -1263,13 +1387,12 @@ function addPathToAdapterConfig(cliPath, repoPath, adapterNpmName) {
|
|
|
1263
1387
|
}
|
|
1264
1388
|
});
|
|
1265
1389
|
let packageJsonPath = (cov_16lcdpz3tp().s[1]++, _path.default.join(getNearestProjectRootDirectory(repoPath), 'package.json'));
|
|
1266
|
-
let packageJsonString = (cov_16lcdpz3tp().s[2]++, _fs.default.readFileSync(packageJsonPath, 'utf-8'));
|
|
1267
|
-
|
|
1390
|
+
let packageJsonString = (cov_16lcdpz3tp().s[2]++, _fs.default.readFileSync(packageJsonPath, 'utf-8'));
|
|
1391
|
+
// tries to detect the indentation and falls back to a default if it can't
|
|
1268
1392
|
let indent = (cov_16lcdpz3tp().s[3]++, (cov_16lcdpz3tp().b[0][0]++, (0, _detectIndent.default)(packageJsonString).indent) || (cov_16lcdpz3tp().b[0][1]++, ' '));
|
|
1269
1393
|
let packageJsonContent = (cov_16lcdpz3tp().s[4]++, JSON.parse(packageJsonString));
|
|
1270
1394
|
let newPackageJsonContent = (cov_16lcdpz3tp().s[5]++, '');
|
|
1271
1395
|
cov_16lcdpz3tp().s[6]++;
|
|
1272
|
-
|
|
1273
1396
|
if (_lodash.default.get(packageJsonContent, 'config.commitizen.path') !== adapterNpmName) {
|
|
1274
1397
|
cov_16lcdpz3tp().b[1][0]++;
|
|
1275
1398
|
cov_16lcdpz3tp().s[7]++;
|
|
@@ -1277,130 +1400,109 @@ function addPathToAdapterConfig(cliPath, repoPath, adapterNpmName) {
|
|
|
1277
1400
|
} else {
|
|
1278
1401
|
cov_16lcdpz3tp().b[1][1]++;
|
|
1279
1402
|
}
|
|
1280
|
-
|
|
1281
1403
|
cov_16lcdpz3tp().s[8]++;
|
|
1282
|
-
|
|
1283
1404
|
_fs.default.writeFileSync(packageJsonPath, JSON.stringify(newPackageJsonContent, null, indent) + '\n');
|
|
1284
1405
|
}
|
|
1285
|
-
/**
|
|
1286
|
-
* Generates an npm install command given a map of strings and a package name
|
|
1287
|
-
*/
|
|
1288
|
-
|
|
1289
1406
|
|
|
1290
|
-
|
|
1407
|
+
/*
|
|
1408
|
+
* Get additional options for install command
|
|
1409
|
+
*/
|
|
1410
|
+
function getInstallOptions(stringMappings) {
|
|
1291
1411
|
cov_16lcdpz3tp().f[1]++;
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
cov_16lcdpz3tp().s[10]++;
|
|
1296
|
-
|
|
1297
|
-
for (let value of stringMappings.values()) {
|
|
1298
|
-
cov_16lcdpz3tp().s[11]++;
|
|
1299
|
-
|
|
1300
|
-
if (value) {
|
|
1301
|
-
cov_16lcdpz3tp().b[2][0]++;
|
|
1302
|
-
cov_16lcdpz3tp().s[12]++;
|
|
1303
|
-
installAdapterCommand = installAdapterCommand + ' ' + value;
|
|
1304
|
-
} else {
|
|
1305
|
-
cov_16lcdpz3tp().b[2][1]++;
|
|
1306
|
-
}
|
|
1307
|
-
}
|
|
1308
|
-
|
|
1309
|
-
cov_16lcdpz3tp().s[13]++;
|
|
1310
|
-
return installAdapterCommand;
|
|
1412
|
+
cov_16lcdpz3tp().s[9]++;
|
|
1413
|
+
return Array.from(stringMappings.values()).filter(Boolean).join(" ");
|
|
1311
1414
|
}
|
|
1312
|
-
/**
|
|
1313
|
-
* Generates an yarn add command given a map of strings and a package name
|
|
1314
|
-
*/
|
|
1315
|
-
|
|
1316
1415
|
|
|
1317
|
-
|
|
1416
|
+
/*
|
|
1417
|
+
* Get specific install command for passed package manager
|
|
1418
|
+
*/
|
|
1419
|
+
function getInstallCommand(packageManager) {
|
|
1318
1420
|
cov_16lcdpz3tp().f[2]++;
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
cov_16lcdpz3tp().b[3][0]++;
|
|
1329
|
-
cov_16lcdpz3tp().s[17]++;
|
|
1330
|
-
installAdapterCommand = installAdapterCommand + ' ' + value;
|
|
1331
|
-
} else {
|
|
1332
|
-
cov_16lcdpz3tp().b[3][1]++;
|
|
1333
|
-
}
|
|
1334
|
-
}
|
|
1421
|
+
const fallbackCommand = (cov_16lcdpz3tp().s[10]++, 'install');
|
|
1422
|
+
const commandByPackageManager = (cov_16lcdpz3tp().s[11]++, {
|
|
1423
|
+
npm: 'install',
|
|
1424
|
+
yarn: 'add',
|
|
1425
|
+
pnpm: 'add'
|
|
1426
|
+
});
|
|
1427
|
+
cov_16lcdpz3tp().s[12]++;
|
|
1428
|
+
return (cov_16lcdpz3tp().b[2][0]++, commandByPackageManager[packageManager]) || (cov_16lcdpz3tp().b[2][1]++, fallbackCommand);
|
|
1429
|
+
}
|
|
1335
1430
|
|
|
1336
|
-
|
|
1337
|
-
|
|
1431
|
+
/**
|
|
1432
|
+
* Generates an npm install command given a map of strings and a package name
|
|
1433
|
+
*/
|
|
1434
|
+
function generateInstallAdapterCommand(stringMappings, adapterNpmName, packageManager = (cov_16lcdpz3tp().b[3][0]++, "npm")) {
|
|
1435
|
+
cov_16lcdpz3tp().f[3]++;
|
|
1436
|
+
cov_16lcdpz3tp().s[13]++;
|
|
1437
|
+
return `${packageManager} ${getInstallCommand(packageManager)} ${adapterNpmName} ${getInstallOptions(stringMappings)}`;
|
|
1338
1438
|
}
|
|
1439
|
+
|
|
1339
1440
|
/**
|
|
1340
1441
|
* Gets the nearest npm_modules directory
|
|
1341
1442
|
*/
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
1443
|
function getNearestNodeModulesDirectory(options) {
|
|
1345
|
-
cov_16lcdpz3tp().f[
|
|
1444
|
+
cov_16lcdpz3tp().f[4]++;
|
|
1346
1445
|
// Get the nearest node_modules directories to the current working directory
|
|
1347
|
-
let nodeModulesDirectories = (cov_16lcdpz3tp().s[
|
|
1348
|
-
|
|
1349
|
-
/* istanbul ignore else */
|
|
1446
|
+
let nodeModulesDirectories = (cov_16lcdpz3tp().s[14]++, (0, _findNodeModules.default)(options));
|
|
1350
1447
|
|
|
1351
|
-
|
|
1448
|
+
// Make sure we find a node_modules folder
|
|
1352
1449
|
|
|
1450
|
+
/* istanbul ignore else */
|
|
1451
|
+
cov_16lcdpz3tp().s[15]++;
|
|
1353
1452
|
if ((cov_16lcdpz3tp().b[5][0]++, nodeModulesDirectories) && (cov_16lcdpz3tp().b[5][1]++, nodeModulesDirectories.length > 0)) {
|
|
1354
1453
|
cov_16lcdpz3tp().b[4][0]++;
|
|
1355
|
-
cov_16lcdpz3tp().s[
|
|
1454
|
+
cov_16lcdpz3tp().s[16]++;
|
|
1356
1455
|
return nodeModulesDirectories[0];
|
|
1357
1456
|
} else {
|
|
1358
1457
|
console.error(`Error: Could not locate node_modules in your project's root directory. Did you forget to npm init or npm install?`);
|
|
1359
1458
|
}
|
|
1360
1459
|
}
|
|
1460
|
+
|
|
1361
1461
|
/**
|
|
1362
1462
|
* Gets the nearest project root directory
|
|
1363
1463
|
*/
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
1464
|
function getNearestProjectRootDirectory(repoPath, options) {
|
|
1367
|
-
cov_16lcdpz3tp().f[
|
|
1368
|
-
cov_16lcdpz3tp().s[
|
|
1465
|
+
cov_16lcdpz3tp().f[5]++;
|
|
1466
|
+
cov_16lcdpz3tp().s[17]++;
|
|
1369
1467
|
return _path.default.join(repoPath, getNearestNodeModulesDirectory(options), '/../');
|
|
1370
1468
|
}
|
|
1371
|
-
/**
|
|
1372
|
-
* Gets a map of arguments where the value is the corresponding npm strings
|
|
1373
|
-
*/
|
|
1374
1469
|
|
|
1375
|
-
|
|
1376
|
-
function getNpmInstallStringMappings(save, saveDev, saveExact, force) {
|
|
1377
|
-
cov_16lcdpz3tp().f[5]++;
|
|
1378
|
-
cov_16lcdpz3tp().s[23]++;
|
|
1379
|
-
return new Map().set('save', (cov_16lcdpz3tp().b[7][0]++, save) && (cov_16lcdpz3tp().b[7][1]++, !saveDev) ? (cov_16lcdpz3tp().b[6][0]++, '--save') : (cov_16lcdpz3tp().b[6][1]++, undefined)).set('saveDev', saveDev ? (cov_16lcdpz3tp().b[8][0]++, '--save-dev') : (cov_16lcdpz3tp().b[8][1]++, undefined)).set('saveExact', saveExact ? (cov_16lcdpz3tp().b[9][0]++, '--save-exact') : (cov_16lcdpz3tp().b[9][1]++, undefined)).set('force', force ? (cov_16lcdpz3tp().b[10][0]++, '--force') : (cov_16lcdpz3tp().b[10][1]++, undefined));
|
|
1380
|
-
}
|
|
1381
1470
|
/**
|
|
1382
|
-
* Gets a map of arguments where the value is the corresponding
|
|
1471
|
+
* Gets a map of arguments where the value is the corresponding (to passed package manager) string
|
|
1383
1472
|
*/
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1473
|
+
function getInstallStringMappings({
|
|
1474
|
+
save,
|
|
1475
|
+
dev,
|
|
1476
|
+
saveDev,
|
|
1477
|
+
exact,
|
|
1478
|
+
saveExact,
|
|
1479
|
+
force
|
|
1480
|
+
}, packageManager) {
|
|
1387
1481
|
cov_16lcdpz3tp().f[6]++;
|
|
1388
|
-
cov_16lcdpz3tp().s[
|
|
1389
|
-
|
|
1482
|
+
const npm = (cov_16lcdpz3tp().s[18]++, new Map().set('save', (cov_16lcdpz3tp().b[7][0]++, save) && (cov_16lcdpz3tp().b[7][1]++, !saveDev) ? (cov_16lcdpz3tp().b[6][0]++, '--save') : (cov_16lcdpz3tp().b[6][1]++, undefined)).set('saveDev', saveDev ? (cov_16lcdpz3tp().b[8][0]++, '--save-dev') : (cov_16lcdpz3tp().b[8][1]++, undefined)).set('saveExact', saveExact ? (cov_16lcdpz3tp().b[9][0]++, '--save-exact') : (cov_16lcdpz3tp().b[9][1]++, undefined)).set('force', force ? (cov_16lcdpz3tp().b[10][0]++, '--force') : (cov_16lcdpz3tp().b[10][1]++, undefined)));
|
|
1483
|
+
const yarn = (cov_16lcdpz3tp().s[19]++, new Map().set('dev', dev ? (cov_16lcdpz3tp().b[11][0]++, '--dev') : (cov_16lcdpz3tp().b[11][1]++, undefined)).set('exact', exact ? (cov_16lcdpz3tp().b[12][0]++, '--exact') : (cov_16lcdpz3tp().b[12][1]++, undefined)).set('force', force ? (cov_16lcdpz3tp().b[13][0]++, '--force') : (cov_16lcdpz3tp().b[13][1]++, undefined)));
|
|
1484
|
+
const pnpm = (cov_16lcdpz3tp().s[20]++, new Map().set('save', (cov_16lcdpz3tp().b[15][0]++, save) && (cov_16lcdpz3tp().b[15][1]++, !saveDev) ? (cov_16lcdpz3tp().b[14][0]++, '--save-prod') : (cov_16lcdpz3tp().b[14][1]++, undefined)).set('dev', saveDev ? (cov_16lcdpz3tp().b[16][0]++, '--save-dev') : (cov_16lcdpz3tp().b[16][1]++, undefined)).set('exact', saveExact ? (cov_16lcdpz3tp().b[17][0]++, '--save-exact') : (cov_16lcdpz3tp().b[17][1]++, undefined)));
|
|
1485
|
+
const map = (cov_16lcdpz3tp().s[21]++, {
|
|
1486
|
+
npm,
|
|
1487
|
+
yarn,
|
|
1488
|
+
pnpm
|
|
1489
|
+
});
|
|
1490
|
+
cov_16lcdpz3tp().s[22]++;
|
|
1491
|
+
return (cov_16lcdpz3tp().b[18][0]++, map[packageManager]) || (cov_16lcdpz3tp().b[18][1]++, npm);
|
|
1390
1492
|
}
|
|
1493
|
+
|
|
1391
1494
|
/**
|
|
1392
1495
|
* Gets the prompter from an adapter given an adapter path
|
|
1393
1496
|
*/
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
1497
|
function getPrompter(adapterPath) {
|
|
1397
1498
|
cov_16lcdpz3tp().f[7]++;
|
|
1398
1499
|
// Resolve the adapter path
|
|
1399
|
-
let resolvedAdapterPath = (cov_16lcdpz3tp().s[
|
|
1500
|
+
let resolvedAdapterPath = (cov_16lcdpz3tp().s[23]++, resolveAdapterPath(adapterPath));
|
|
1400
1501
|
|
|
1401
|
-
|
|
1402
|
-
|
|
1502
|
+
// Load the adapter
|
|
1503
|
+
let adapter = (cov_16lcdpz3tp().s[24]++, require(resolvedAdapterPath));
|
|
1403
1504
|
|
|
1505
|
+
/* istanbul ignore next */
|
|
1404
1506
|
if (adapter && adapter.prompter && (0, _util.isFunction)(adapter.prompter)) {
|
|
1405
1507
|
return adapter.prompter;
|
|
1406
1508
|
} else if (adapter && adapter.default && adapter.default.prompter && (0, _util.isFunction)(adapter.default.prompter)) {
|
|
@@ -1409,36 +1511,34 @@ function getPrompter(adapterPath) {
|
|
|
1409
1511
|
throw new Error(`Could not find prompter method in the provided adapter module: ${adapterPath}`);
|
|
1410
1512
|
}
|
|
1411
1513
|
}
|
|
1514
|
+
|
|
1412
1515
|
/**
|
|
1413
1516
|
* Given a resolvable module name or path, which can be a directory or file, will
|
|
1414
1517
|
* return a located adapter path or will throw.
|
|
1415
1518
|
*/
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
1519
|
function resolveAdapterPath(inboundAdapterPath) {
|
|
1419
1520
|
cov_16lcdpz3tp().f[8]++;
|
|
1420
1521
|
// Check if inboundAdapterPath is a path or node module name
|
|
1421
|
-
let parsed = (cov_16lcdpz3tp().s[
|
|
1422
|
-
let isPath = (cov_16lcdpz3tp().s[
|
|
1423
|
-
|
|
1424
|
-
let absoluteAdapterPath = (cov_16lcdpz3tp().s[29]++, isPath ? (cov_16lcdpz3tp().b[15][0]++, _path.default.resolve(getGitRootPath(), inboundAdapterPath)) : (cov_16lcdpz3tp().b[15][1]++, inboundAdapterPath));
|
|
1425
|
-
cov_16lcdpz3tp().s[30]++;
|
|
1522
|
+
let parsed = (cov_16lcdpz3tp().s[25]++, _path.default.parse(inboundAdapterPath));
|
|
1523
|
+
let isPath = (cov_16lcdpz3tp().s[26]++, (cov_16lcdpz3tp().b[19][0]++, parsed.dir.length > 0) && (cov_16lcdpz3tp().b[19][1]++, parsed.dir.charAt(0) !== "@"));
|
|
1426
1524
|
|
|
1525
|
+
// Resolve from the root of the git repo if inboundAdapterPath is a path
|
|
1526
|
+
let absoluteAdapterPath = (cov_16lcdpz3tp().s[27]++, isPath ? (cov_16lcdpz3tp().b[20][0]++, _path.default.resolve(getGitRootPath(), inboundAdapterPath)) : (cov_16lcdpz3tp().b[20][1]++, inboundAdapterPath));
|
|
1527
|
+
cov_16lcdpz3tp().s[28]++;
|
|
1427
1528
|
try {
|
|
1428
|
-
cov_16lcdpz3tp().s[
|
|
1529
|
+
cov_16lcdpz3tp().s[29]++;
|
|
1429
1530
|
// try to resolve the given path
|
|
1430
1531
|
return require.resolve(absoluteAdapterPath);
|
|
1431
1532
|
} catch (error) {
|
|
1432
|
-
cov_16lcdpz3tp().s[
|
|
1533
|
+
cov_16lcdpz3tp().s[30]++;
|
|
1433
1534
|
error.message = "Could not resolve " + absoluteAdapterPath + ". " + error.message;
|
|
1434
|
-
cov_16lcdpz3tp().s[
|
|
1535
|
+
cov_16lcdpz3tp().s[31]++;
|
|
1435
1536
|
throw error;
|
|
1436
1537
|
}
|
|
1437
1538
|
}
|
|
1438
|
-
|
|
1439
1539
|
function getGitRootPath() {
|
|
1440
1540
|
cov_16lcdpz3tp().f[9]++;
|
|
1441
|
-
cov_16lcdpz3tp().s[
|
|
1541
|
+
cov_16lcdpz3tp().s[32]++;
|
|
1442
1542
|
return _child_process.default.spawnSync('git', ['rev-parse', '--show-toplevel'], {
|
|
1443
1543
|
encoding: 'utf8'
|
|
1444
1544
|
}).stdout.trim();
|