@diffci.com/diffci 0.3.64 → 0.3.66
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/dist-client/src/client/isolated-worktree.d.ts +16 -0
- package/dist-client/src/client/isolated-worktree.js +67 -1
- package/dist-client/src/client/mcp.js +14 -0
- package/dist-client/src/client/telemetry.d.ts +1 -1
- package/dist-client/src/client/telemetry.js +2 -1
- package/dist-client/src/client/usage-signal.d.ts +10 -2
- package/dist-client/src/client/usage-signal.js +11 -0
- package/node_modules/@babel/helper-string-parser/lib/index.js +15 -6
- package/node_modules/@babel/helper-string-parser/lib/index.js.map +1 -1
- package/node_modules/@babel/helper-string-parser/package.json +1 -1
- package/node_modules/@babel/parser/lib/index.js +326 -93
- package/node_modules/@babel/parser/lib/index.js.map +1 -1
- package/node_modules/@babel/parser/package.json +3 -3
- package/node_modules/@babel/parser/typings/babel-parser.d.ts +23 -25
- package/node_modules/@babel/types/lib/ast-types/generated/index.js.map +1 -1
- package/node_modules/@babel/types/lib/clone/cloneNode.js.map +1 -1
- package/node_modules/@babel/types/lib/definitions/core.js +4 -0
- package/node_modules/@babel/types/lib/definitions/core.js.map +1 -1
- package/node_modules/@babel/types/lib/index-legacy.d.ts +1 -0
- package/node_modules/@babel/types/lib/index.d.ts +5 -5
- package/node_modules/@babel/types/lib/index.js.flow +1 -0
- package/node_modules/@babel/types/lib/validators/is.js.map +1 -1
- package/node_modules/@babel/types/lib/validators/isSpecifierDefault.js +5 -1
- package/node_modules/@babel/types/lib/validators/isSpecifierDefault.js.map +1 -1
- package/node_modules/@babel/types/package.json +4 -4
- package/node_modules/@diffci.com/core/README.md +1 -1
- package/node_modules/@diffci.com/core/dist/git/git-diff.js +7 -4
- package/node_modules/@diffci.com/core/dist/git/git-diff.js.map +1 -1
- package/node_modules/@diffci.com/core/dist/git/types.d.ts +4 -0
- package/node_modules/@diffci.com/core/dist/repo/adapters/maven.js +16 -10
- package/node_modules/@diffci.com/core/dist/repo/adapters/maven.js.map +1 -1
- package/node_modules/@diffci.com/core/dist/repo/graph.js +8 -3
- package/node_modules/@diffci.com/core/dist/repo/graph.js.map +1 -1
- package/node_modules/@diffci.com/core/dist/repo/impact.js +4 -1
- package/node_modules/@diffci.com/core/dist/repo/impact.js.map +1 -1
- package/node_modules/@diffci.com/core/dist/repo/npm-lockfile.d.ts +11 -0
- package/node_modules/@diffci.com/core/dist/repo/npm-lockfile.js +45 -0
- package/node_modules/@diffci.com/core/dist/repo/npm-lockfile.js.map +1 -1
- package/node_modules/@diffci.com/core/package.json +1 -1
- package/node_modules/@diffci.com/core/src/git/git-diff.ts +6 -4
- package/node_modules/@diffci.com/core/src/git/types.ts +4 -0
- package/node_modules/@diffci.com/core/src/repo/adapters/maven.ts +16 -9
- package/node_modules/@diffci.com/core/src/repo/graph.ts +8 -3
- package/node_modules/@diffci.com/core/src/repo/impact.ts +4 -1
- package/node_modules/@diffci.com/core/src/repo/npm-lockfile.ts +39 -0
- package/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +115 -71
- package/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +2 -2
- package/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js +115 -71
- package/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map +2 -2
- package/node_modules/@jridgewell/sourcemap-codec/package.json +2 -1
- package/node_modules/@jridgewell/sourcemap-codec/src/range-mappings.ts +47 -0
- package/node_modules/@jridgewell/sourcemap-codec/src/scopes.ts +66 -46
- package/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts +27 -11
- package/node_modules/@jridgewell/sourcemap-codec/src/vlq.ts +13 -17
- package/node_modules/@jridgewell/sourcemap-codec/types/range-mappings.d.cts +5 -0
- package/node_modules/@jridgewell/sourcemap-codec/types/range-mappings.d.cts.map +1 -0
- package/node_modules/@jridgewell/sourcemap-codec/types/range-mappings.d.mts +5 -0
- package/node_modules/@jridgewell/sourcemap-codec/types/range-mappings.d.mts.map +1 -0
- package/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts.map +1 -1
- package/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts.map +1 -1
- package/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts +2 -0
- package/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts.map +1 -1
- package/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts +2 -0
- package/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts.map +1 -1
- package/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts +4 -2
- package/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts.map +1 -1
- package/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts +4 -2
- package/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts.map +1 -1
- package/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js +6 -2
- package/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6 -2
- package/node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js +6 -2
- package/node_modules/@vue/compiler-core/package.json +4 -4
- package/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.js +8 -8
- package/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +8 -8
- package/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.js +14 -14
- package/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js +2 -2
- package/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js +1 -1
- package/node_modules/@vue/compiler-dom/dist/compiler-dom.global.js +14 -14
- package/node_modules/@vue/compiler-dom/dist/compiler-dom.global.prod.js +2 -2
- package/node_modules/@vue/compiler-dom/package.json +3 -3
- package/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js +1847 -1370
- package/node_modules/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js +6462 -6187
- package/node_modules/@vue/compiler-sfc/package.json +11 -11
- package/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +32 -9
- package/node_modules/@vue/compiler-ssr/package.json +3 -3
- package/node_modules/@vue/shared/dist/shared.cjs.js +11 -15
- package/node_modules/@vue/shared/dist/shared.cjs.prod.js +11 -15
- package/node_modules/@vue/shared/dist/shared.esm-bundler.js +11 -15
- package/node_modules/@vue/shared/package.json +1 -1
- package/node_modules/postcss/lib/css-syntax-error.js +6 -4
- package/node_modules/postcss/lib/declaration.d.ts +2 -2
- package/node_modules/postcss/lib/map-generator.js +12 -2
- package/node_modules/postcss/lib/processor.js +1 -1
- package/node_modules/postcss/lib/tokenize.js +6 -13
- package/node_modules/postcss/package.json +1 -1
- package/node_modules/source-map-js/README.md +192 -176
- package/node_modules/source-map-js/lib/array-set.js +5 -3
- package/node_modules/source-map-js/lib/base64-vlq.js +5 -9
- package/node_modules/source-map-js/lib/base64.js +13 -12
- package/node_modules/source-map-js/lib/binary-search.js +10 -6
- package/node_modules/source-map-js/lib/mapping-list.js +12 -7
- package/node_modules/source-map-js/lib/quick-sort.js +93 -23
- package/node_modules/source-map-js/lib/source-map-consumer.js +272 -194
- package/node_modules/source-map-js/lib/source-map-generator.js +146 -106
- package/node_modules/source-map-js/lib/source-node.js +144 -118
- package/node_modules/source-map-js/lib/util.js +56 -37
- package/node_modules/source-map-js/package.json +14 -7
- package/node_modules/source-map-js/source-map.d.ts +177 -63
- package/node_modules/source-map-js/source-map.js +4 -2
- package/package.json +3 -3
|
@@ -18,7 +18,7 @@ var NEWLINE_CODE = 10;
|
|
|
18
18
|
// Private symbol for identifying `SourceNode`s when multiple versions of
|
|
19
19
|
// the source-map library are loaded. This MUST NOT CHANGE across
|
|
20
20
|
// versions!
|
|
21
|
-
var isSourceNode =
|
|
21
|
+
var isSourceNode = '$$$isSourceNode$$$';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* SourceNodes provide a way to abstract over interpolating/concatenating
|
|
@@ -52,7 +52,11 @@ function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
|
|
|
52
52
|
* SourceMapConsumer should be relative to.
|
|
53
53
|
*/
|
|
54
54
|
SourceNode.fromStringWithSourceMap =
|
|
55
|
-
function SourceNode_fromStringWithSourceMap(
|
|
55
|
+
function SourceNode_fromStringWithSourceMap(
|
|
56
|
+
aGeneratedCode,
|
|
57
|
+
aSourceMapConsumer,
|
|
58
|
+
aRelativePath
|
|
59
|
+
) {
|
|
56
60
|
// The SourceNode we want to fill with the generated code
|
|
57
61
|
// and the SourceMap
|
|
58
62
|
var node = new SourceNode();
|
|
@@ -63,20 +67,22 @@ SourceNode.fromStringWithSourceMap =
|
|
|
63
67
|
// Processed fragments are accessed by calling `shiftNextLine`.
|
|
64
68
|
var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
|
|
65
69
|
var remainingLinesIndex = 0;
|
|
66
|
-
var shiftNextLine = function() {
|
|
70
|
+
var shiftNextLine = function () {
|
|
67
71
|
var lineContents = getNextLine();
|
|
68
72
|
// The last line of a file might not have a newline.
|
|
69
|
-
var newLine = getNextLine() ||
|
|
73
|
+
var newLine = getNextLine() || '';
|
|
70
74
|
return lineContents + newLine;
|
|
71
75
|
|
|
72
76
|
function getNextLine() {
|
|
73
|
-
return remainingLinesIndex < remainingLines.length
|
|
74
|
-
|
|
77
|
+
return remainingLinesIndex < remainingLines.length
|
|
78
|
+
? remainingLines[remainingLinesIndex++]
|
|
79
|
+
: undefined;
|
|
75
80
|
}
|
|
76
81
|
};
|
|
77
82
|
|
|
78
83
|
// We need to remember the position of "remainingLines"
|
|
79
|
-
var lastGeneratedLine = 1,
|
|
84
|
+
var lastGeneratedLine = 1,
|
|
85
|
+
lastGeneratedColumn = 0;
|
|
80
86
|
|
|
81
87
|
// The generate SourceNodes we need a code range.
|
|
82
88
|
// To extract it current and last mapping is used.
|
|
@@ -98,10 +104,13 @@ SourceNode.fromStringWithSourceMap =
|
|
|
98
104
|
// Associate the code between "lastGeneratedColumn" and
|
|
99
105
|
// "mapping.generatedColumn" with "lastMapping"
|
|
100
106
|
var nextLine = remainingLines[remainingLinesIndex] || '';
|
|
101
|
-
var code = nextLine.substr(
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
107
|
+
var code = nextLine.substr(
|
|
108
|
+
0,
|
|
109
|
+
mapping.generatedColumn - lastGeneratedColumn
|
|
110
|
+
);
|
|
111
|
+
remainingLines[remainingLinesIndex] = nextLine.substr(
|
|
112
|
+
mapping.generatedColumn - lastGeneratedColumn
|
|
113
|
+
);
|
|
105
114
|
lastGeneratedColumn = mapping.generatedColumn;
|
|
106
115
|
addMappingWithCode(lastMapping, code);
|
|
107
116
|
// No more remaining code, continue
|
|
@@ -126,7 +135,9 @@ SourceNode.fromStringWithSourceMap =
|
|
|
126
135
|
if (lastGeneratedColumn < mapping.generatedColumn) {
|
|
127
136
|
var nextLine = remainingLines[remainingLinesIndex] || '';
|
|
128
137
|
node.add(nextLine.substr(0, mapping.generatedColumn));
|
|
129
|
-
remainingLines[remainingLinesIndex] = nextLine.substr(
|
|
138
|
+
remainingLines[remainingLinesIndex] = nextLine.substr(
|
|
139
|
+
mapping.generatedColumn
|
|
140
|
+
);
|
|
130
141
|
lastGeneratedColumn = mapping.generatedColumn;
|
|
131
142
|
}
|
|
132
143
|
lastMapping = mapping;
|
|
@@ -138,7 +149,7 @@ SourceNode.fromStringWithSourceMap =
|
|
|
138
149
|
addMappingWithCode(lastMapping, shiftNextLine());
|
|
139
150
|
}
|
|
140
151
|
// and add the remaining lines without any mapping
|
|
141
|
-
node.add(remainingLines.splice(remainingLinesIndex).join(
|
|
152
|
+
node.add(remainingLines.splice(remainingLinesIndex).join(''));
|
|
142
153
|
}
|
|
143
154
|
|
|
144
155
|
// Copy sourcesContent into SourceNode
|
|
@@ -161,11 +172,15 @@ SourceNode.fromStringWithSourceMap =
|
|
|
161
172
|
var source = aRelativePath
|
|
162
173
|
? util.join(aRelativePath, mapping.source)
|
|
163
174
|
: mapping.source;
|
|
164
|
-
node.add(
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
175
|
+
node.add(
|
|
176
|
+
new SourceNode(
|
|
177
|
+
mapping.originalLine,
|
|
178
|
+
mapping.originalColumn,
|
|
179
|
+
source,
|
|
180
|
+
code,
|
|
181
|
+
mapping.name
|
|
182
|
+
)
|
|
183
|
+
);
|
|
169
184
|
}
|
|
170
185
|
}
|
|
171
186
|
};
|
|
@@ -181,15 +196,14 @@ SourceNode.prototype.add = function SourceNode_add(aChunk) {
|
|
|
181
196
|
aChunk.forEach(function (chunk) {
|
|
182
197
|
this.add(chunk);
|
|
183
198
|
}, this);
|
|
184
|
-
}
|
|
185
|
-
else if (aChunk[isSourceNode] || typeof aChunk === "string") {
|
|
199
|
+
} else if (aChunk[isSourceNode] || typeof aChunk === 'string') {
|
|
186
200
|
if (aChunk) {
|
|
187
201
|
this.children.push(aChunk);
|
|
188
202
|
}
|
|
189
|
-
}
|
|
190
|
-
else {
|
|
203
|
+
} else {
|
|
191
204
|
throw new TypeError(
|
|
192
|
-
|
|
205
|
+
'Expected a SourceNode, string, or an array of SourceNodes and strings. Got ' +
|
|
206
|
+
aChunk
|
|
193
207
|
);
|
|
194
208
|
}
|
|
195
209
|
return this;
|
|
@@ -203,16 +217,15 @@ SourceNode.prototype.add = function SourceNode_add(aChunk) {
|
|
|
203
217
|
*/
|
|
204
218
|
SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
|
|
205
219
|
if (Array.isArray(aChunk)) {
|
|
206
|
-
for (var i = aChunk.length-1; i >= 0; i--) {
|
|
220
|
+
for (var i = aChunk.length - 1; i >= 0; i--) {
|
|
207
221
|
this.prepend(aChunk[i]);
|
|
208
222
|
}
|
|
209
|
-
}
|
|
210
|
-
else if (aChunk[isSourceNode] || typeof aChunk === "string") {
|
|
223
|
+
} else if (aChunk[isSourceNode] || typeof aChunk === 'string') {
|
|
211
224
|
this.children.unshift(aChunk);
|
|
212
|
-
}
|
|
213
|
-
else {
|
|
225
|
+
} else {
|
|
214
226
|
throw new TypeError(
|
|
215
|
-
|
|
227
|
+
'Expected a SourceNode, string, or an array of SourceNodes and strings. Got ' +
|
|
228
|
+
aChunk
|
|
216
229
|
);
|
|
217
230
|
}
|
|
218
231
|
return this;
|
|
@@ -231,13 +244,14 @@ SourceNode.prototype.walk = function SourceNode_walk(aFn) {
|
|
|
231
244
|
chunk = this.children[i];
|
|
232
245
|
if (chunk[isSourceNode]) {
|
|
233
246
|
chunk.walk(aFn);
|
|
234
|
-
}
|
|
235
|
-
else {
|
|
247
|
+
} else {
|
|
236
248
|
if (chunk !== '') {
|
|
237
|
-
aFn(chunk, {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
249
|
+
aFn(chunk, {
|
|
250
|
+
source: this.source,
|
|
251
|
+
line: this.line,
|
|
252
|
+
column: this.column,
|
|
253
|
+
name: this.name,
|
|
254
|
+
});
|
|
241
255
|
}
|
|
242
256
|
}
|
|
243
257
|
}
|
|
@@ -255,7 +269,7 @@ SourceNode.prototype.join = function SourceNode_join(aSep) {
|
|
|
255
269
|
var len = this.children.length;
|
|
256
270
|
if (len > 0) {
|
|
257
271
|
newChildren = [];
|
|
258
|
-
for (i = 0; i < len-1; i++) {
|
|
272
|
+
for (i = 0; i < len - 1; i++) {
|
|
259
273
|
newChildren.push(this.children[i]);
|
|
260
274
|
newChildren.push(aSep);
|
|
261
275
|
}
|
|
@@ -272,15 +286,20 @@ SourceNode.prototype.join = function SourceNode_join(aSep) {
|
|
|
272
286
|
* @param aPattern The pattern to replace.
|
|
273
287
|
* @param aReplacement The thing to replace the pattern with.
|
|
274
288
|
*/
|
|
275
|
-
SourceNode.prototype.replaceRight = function SourceNode_replaceRight(
|
|
289
|
+
SourceNode.prototype.replaceRight = function SourceNode_replaceRight(
|
|
290
|
+
aPattern,
|
|
291
|
+
aReplacement
|
|
292
|
+
) {
|
|
276
293
|
var lastChild = this.children[this.children.length - 1];
|
|
277
|
-
|
|
294
|
+
// Without children, lastChild is undefined and the final branch applies.
|
|
295
|
+
if (lastChild && lastChild[isSourceNode]) {
|
|
278
296
|
lastChild.replaceRight(aPattern, aReplacement);
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
297
|
+
} else if (typeof lastChild === 'string') {
|
|
298
|
+
this.children[this.children.length - 1] = lastChild.replace(
|
|
299
|
+
aPattern,
|
|
300
|
+
aReplacement
|
|
301
|
+
);
|
|
302
|
+
} else {
|
|
284
303
|
this.children.push(''.replace(aPattern, aReplacement));
|
|
285
304
|
}
|
|
286
305
|
return this;
|
|
@@ -293,10 +312,12 @@ SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, a
|
|
|
293
312
|
* @param aSourceFile The filename of the source file
|
|
294
313
|
* @param aSourceContent The content of the source file
|
|
295
314
|
*/
|
|
296
|
-
SourceNode.prototype.setSourceContent =
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
315
|
+
SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(
|
|
316
|
+
aSourceFile,
|
|
317
|
+
aSourceContent
|
|
318
|
+
) {
|
|
319
|
+
this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
|
|
320
|
+
};
|
|
300
321
|
|
|
301
322
|
/**
|
|
302
323
|
* Walk over the tree of SourceNodes. The walking function is called for each
|
|
@@ -323,7 +344,7 @@ SourceNode.prototype.walkSourceContents =
|
|
|
323
344
|
* and concatenates all the various snippets together to one string.
|
|
324
345
|
*/
|
|
325
346
|
SourceNode.prototype.toString = function SourceNode_toString() {
|
|
326
|
-
var str =
|
|
347
|
+
var str = '';
|
|
327
348
|
this.walk(function (chunk) {
|
|
328
349
|
str += chunk;
|
|
329
350
|
});
|
|
@@ -334,87 +355,92 @@ SourceNode.prototype.toString = function SourceNode_toString() {
|
|
|
334
355
|
* Returns the string representation of this source node along with a source
|
|
335
356
|
* map.
|
|
336
357
|
*/
|
|
337
|
-
SourceNode.prototype.toStringWithSourceMap =
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
original
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
},
|
|
364
|
-
generated: {
|
|
365
|
-
line: generated.line,
|
|
366
|
-
column: generated.column
|
|
367
|
-
},
|
|
368
|
-
name: original.name
|
|
369
|
-
});
|
|
370
|
-
}
|
|
371
|
-
lastOriginalSource = original.source;
|
|
372
|
-
lastOriginalLine = original.line;
|
|
373
|
-
lastOriginalColumn = original.column;
|
|
374
|
-
lastOriginalName = original.name;
|
|
375
|
-
sourceMappingActive = true;
|
|
376
|
-
} else if (sourceMappingActive) {
|
|
377
|
-
map.addMapping({
|
|
378
|
-
generated: {
|
|
379
|
-
line: generated.line,
|
|
380
|
-
column: generated.column
|
|
381
|
-
}
|
|
382
|
-
});
|
|
383
|
-
lastOriginalSource = null;
|
|
384
|
-
sourceMappingActive = false;
|
|
385
|
-
}
|
|
386
|
-
for (var idx = 0, length = chunk.length; idx < length; idx++) {
|
|
387
|
-
if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
|
|
388
|
-
generated.line++;
|
|
389
|
-
generated.column = 0;
|
|
390
|
-
// Mappings end at eol
|
|
391
|
-
if (idx + 1 === length) {
|
|
392
|
-
lastOriginalSource = null;
|
|
393
|
-
sourceMappingActive = false;
|
|
394
|
-
} else if (sourceMappingActive) {
|
|
358
|
+
SourceNode.prototype.toStringWithSourceMap =
|
|
359
|
+
function SourceNode_toStringWithSourceMap(aArgs) {
|
|
360
|
+
var generated = {
|
|
361
|
+
code: '',
|
|
362
|
+
line: 1,
|
|
363
|
+
column: 0,
|
|
364
|
+
};
|
|
365
|
+
var map = new SourceMapGenerator(aArgs);
|
|
366
|
+
var sourceMappingActive = false;
|
|
367
|
+
var lastOriginalSource = null;
|
|
368
|
+
var lastOriginalLine = null;
|
|
369
|
+
var lastOriginalColumn = null;
|
|
370
|
+
var lastOriginalName = null;
|
|
371
|
+
this.walk(function (chunk, original) {
|
|
372
|
+
generated.code += chunk;
|
|
373
|
+
if (
|
|
374
|
+
original.source !== null &&
|
|
375
|
+
original.line !== null &&
|
|
376
|
+
original.column !== null
|
|
377
|
+
) {
|
|
378
|
+
if (
|
|
379
|
+
lastOriginalSource !== original.source ||
|
|
380
|
+
lastOriginalLine !== original.line ||
|
|
381
|
+
lastOriginalColumn !== original.column ||
|
|
382
|
+
lastOriginalName !== original.name
|
|
383
|
+
) {
|
|
395
384
|
map.addMapping({
|
|
396
385
|
source: original.source,
|
|
397
386
|
original: {
|
|
398
387
|
line: original.line,
|
|
399
|
-
column: original.column
|
|
388
|
+
column: original.column,
|
|
400
389
|
},
|
|
401
390
|
generated: {
|
|
402
391
|
line: generated.line,
|
|
403
|
-
column: generated.column
|
|
392
|
+
column: generated.column,
|
|
404
393
|
},
|
|
405
|
-
name: original.name
|
|
394
|
+
name: original.name,
|
|
406
395
|
});
|
|
407
396
|
}
|
|
408
|
-
|
|
409
|
-
|
|
397
|
+
lastOriginalSource = original.source;
|
|
398
|
+
lastOriginalLine = original.line;
|
|
399
|
+
lastOriginalColumn = original.column;
|
|
400
|
+
lastOriginalName = original.name;
|
|
401
|
+
sourceMappingActive = true;
|
|
402
|
+
} else if (sourceMappingActive) {
|
|
403
|
+
map.addMapping({
|
|
404
|
+
generated: {
|
|
405
|
+
line: generated.line,
|
|
406
|
+
column: generated.column,
|
|
407
|
+
},
|
|
408
|
+
});
|
|
409
|
+
lastOriginalSource = null;
|
|
410
|
+
sourceMappingActive = false;
|
|
410
411
|
}
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
412
|
+
for (var idx = 0, length = chunk.length; idx < length; idx++) {
|
|
413
|
+
if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
|
|
414
|
+
generated.line++;
|
|
415
|
+
generated.column = 0;
|
|
416
|
+
// Mappings end at eol
|
|
417
|
+
if (idx + 1 === length) {
|
|
418
|
+
lastOriginalSource = null;
|
|
419
|
+
sourceMappingActive = false;
|
|
420
|
+
} else if (sourceMappingActive) {
|
|
421
|
+
map.addMapping({
|
|
422
|
+
source: original.source,
|
|
423
|
+
original: {
|
|
424
|
+
line: original.line,
|
|
425
|
+
column: original.column,
|
|
426
|
+
},
|
|
427
|
+
generated: {
|
|
428
|
+
line: generated.line,
|
|
429
|
+
column: generated.column,
|
|
430
|
+
},
|
|
431
|
+
name: original.name,
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
} else {
|
|
435
|
+
generated.column++;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
});
|
|
439
|
+
this.walkSourceContents(function (sourceFile, sourceContent) {
|
|
440
|
+
map.setSourceContent(sourceFile, sourceContent);
|
|
441
|
+
});
|
|
416
442
|
|
|
417
|
-
|
|
418
|
-
};
|
|
443
|
+
return { code: generated.code, map: map };
|
|
444
|
+
};
|
|
419
445
|
|
|
420
446
|
exports.SourceNode = SourceNode;
|
|
@@ -26,7 +26,8 @@ function getArg(aArgs, aName, aDefaultValue) {
|
|
|
26
26
|
}
|
|
27
27
|
exports.getArg = getArg;
|
|
28
28
|
|
|
29
|
-
var urlRegexp =
|
|
29
|
+
var urlRegexp =
|
|
30
|
+
/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
|
|
30
31
|
var dataUrlRegexp = /^data:.+\,.+$/;
|
|
31
32
|
|
|
32
33
|
function urlParse(aUrl) {
|
|
@@ -39,7 +40,7 @@ function urlParse(aUrl) {
|
|
|
39
40
|
auth: match[2],
|
|
40
41
|
host: match[3],
|
|
41
42
|
port: match[4],
|
|
42
|
-
path: match[5]
|
|
43
|
+
path: match[5],
|
|
43
44
|
};
|
|
44
45
|
}
|
|
45
46
|
exports.urlParse = urlParse;
|
|
@@ -57,7 +58,7 @@ function urlGenerate(aParsedUrl) {
|
|
|
57
58
|
url += aParsedUrl.host;
|
|
58
59
|
}
|
|
59
60
|
if (aParsedUrl.port) {
|
|
60
|
-
url +=
|
|
61
|
+
url += ':' + aParsedUrl.port;
|
|
61
62
|
}
|
|
62
63
|
if (aParsedUrl.path) {
|
|
63
64
|
url += aParsedUrl.path;
|
|
@@ -78,7 +79,7 @@ var MAX_CACHED_INPUTS = 32;
|
|
|
78
79
|
function lruMemoize(f) {
|
|
79
80
|
var cache = [];
|
|
80
81
|
|
|
81
|
-
return function(input) {
|
|
82
|
+
return function (input) {
|
|
82
83
|
for (var i = 0; i < cache.length; i++) {
|
|
83
84
|
if (cache[i].input === input) {
|
|
84
85
|
var temp = cache[0];
|
|
@@ -131,13 +132,13 @@ var normalize = lruMemoize(function normalize(aPath) {
|
|
|
131
132
|
var i = 0;
|
|
132
133
|
while (true) {
|
|
133
134
|
start = i;
|
|
134
|
-
i = path.indexOf(
|
|
135
|
+
i = path.indexOf('/', start);
|
|
135
136
|
if (i === -1) {
|
|
136
137
|
parts.push(path.slice(start));
|
|
137
138
|
break;
|
|
138
139
|
} else {
|
|
139
140
|
parts.push(path.slice(start, i));
|
|
140
|
-
while (i < path.length && path[i] ===
|
|
141
|
+
while (i < path.length && path[i] === '/') {
|
|
141
142
|
i++;
|
|
142
143
|
}
|
|
143
144
|
}
|
|
@@ -193,11 +194,11 @@ exports.normalize = normalize;
|
|
|
193
194
|
* - Joining for example 'http://' and 'www.example.com' is also supported.
|
|
194
195
|
*/
|
|
195
196
|
function join(aRoot, aPath) {
|
|
196
|
-
if (aRoot ===
|
|
197
|
-
aRoot =
|
|
197
|
+
if (aRoot === '') {
|
|
198
|
+
aRoot = '.';
|
|
198
199
|
}
|
|
199
|
-
if (aPath ===
|
|
200
|
-
aPath =
|
|
200
|
+
if (aPath === '') {
|
|
201
|
+
aPath = '.';
|
|
201
202
|
}
|
|
202
203
|
var aPathUrl = urlParse(aPath);
|
|
203
204
|
var aRootUrl = urlParse(aRoot);
|
|
@@ -223,9 +224,10 @@ function join(aRoot, aPath) {
|
|
|
223
224
|
return urlGenerate(aRootUrl);
|
|
224
225
|
}
|
|
225
226
|
|
|
226
|
-
var joined =
|
|
227
|
-
|
|
228
|
-
|
|
227
|
+
var joined =
|
|
228
|
+
aPath.charAt(0) === '/'
|
|
229
|
+
? aPath
|
|
230
|
+
: normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
|
|
229
231
|
|
|
230
232
|
if (aRootUrl) {
|
|
231
233
|
aRootUrl.path = joined;
|
|
@@ -246,8 +248,8 @@ exports.isAbsolute = function (aPath) {
|
|
|
246
248
|
* @param aPath The path or URL to be made relative to aRoot.
|
|
247
249
|
*/
|
|
248
250
|
function relative(aRoot, aPath) {
|
|
249
|
-
if (aRoot ===
|
|
250
|
-
aRoot =
|
|
251
|
+
if (aRoot === '') {
|
|
252
|
+
aRoot = '.';
|
|
251
253
|
}
|
|
252
254
|
|
|
253
255
|
aRoot = aRoot.replace(/\/$/, '');
|
|
@@ -258,7 +260,7 @@ function relative(aRoot, aPath) {
|
|
|
258
260
|
// a prefix that fits, or we run out of components to remove.
|
|
259
261
|
var level = 0;
|
|
260
262
|
while (aPath.indexOf(aRoot + '/') !== 0) {
|
|
261
|
-
var index = aRoot.lastIndexOf(
|
|
263
|
+
var index = aRoot.lastIndexOf('/');
|
|
262
264
|
if (index < 0) {
|
|
263
265
|
return aPath;
|
|
264
266
|
}
|
|
@@ -275,16 +277,16 @@ function relative(aRoot, aPath) {
|
|
|
275
277
|
}
|
|
276
278
|
|
|
277
279
|
// Make sure we add a "../" for each component we removed from the root.
|
|
278
|
-
return Array(level + 1).join(
|
|
280
|
+
return Array(level + 1).join('../') + aPath.substr(aRoot.length + 1);
|
|
279
281
|
}
|
|
280
282
|
exports.relative = relative;
|
|
281
283
|
|
|
282
284
|
var supportsNullProto = (function () {
|
|
283
285
|
var obj = Object.create(null);
|
|
284
286
|
return !('__proto__' in obj);
|
|
285
|
-
}()
|
|
287
|
+
})();
|
|
286
288
|
|
|
287
|
-
function identity
|
|
289
|
+
function identity(s) {
|
|
288
290
|
return s;
|
|
289
291
|
}
|
|
290
292
|
|
|
@@ -326,15 +328,17 @@ function isProtoString(s) {
|
|
|
326
328
|
return false;
|
|
327
329
|
}
|
|
328
330
|
|
|
329
|
-
if (
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
331
|
+
if (
|
|
332
|
+
s.charCodeAt(length - 1) !== 95 /* '_' */ ||
|
|
333
|
+
s.charCodeAt(length - 2) !== 95 /* '_' */ ||
|
|
334
|
+
s.charCodeAt(length - 3) !== 111 /* 'o' */ ||
|
|
335
|
+
s.charCodeAt(length - 4) !== 116 /* 't' */ ||
|
|
336
|
+
s.charCodeAt(length - 5) !== 111 /* 'o' */ ||
|
|
337
|
+
s.charCodeAt(length - 6) !== 114 /* 'r' */ ||
|
|
338
|
+
s.charCodeAt(length - 7) !== 112 /* 'p' */ ||
|
|
339
|
+
s.charCodeAt(length - 8) !== 95 /* '_' */ ||
|
|
340
|
+
s.charCodeAt(length - 9) !== 95 /* '_' */
|
|
341
|
+
) {
|
|
338
342
|
return false;
|
|
339
343
|
}
|
|
340
344
|
|
|
@@ -385,8 +389,12 @@ function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
|
|
|
385
389
|
}
|
|
386
390
|
exports.compareByOriginalPositions = compareByOriginalPositions;
|
|
387
391
|
|
|
388
|
-
function compareByOriginalPositionsNoSource(
|
|
389
|
-
|
|
392
|
+
function compareByOriginalPositionsNoSource(
|
|
393
|
+
mappingA,
|
|
394
|
+
mappingB,
|
|
395
|
+
onlyCompareOriginal
|
|
396
|
+
) {
|
|
397
|
+
var cmp;
|
|
390
398
|
|
|
391
399
|
cmp = mappingA.originalLine - mappingB.originalLine;
|
|
392
400
|
if (cmp !== 0) {
|
|
@@ -421,7 +429,11 @@ exports.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource;
|
|
|
421
429
|
* source/name/original line and column the same. Useful when searching for a
|
|
422
430
|
* mapping with a stubbed out mapping.
|
|
423
431
|
*/
|
|
424
|
-
function compareByGeneratedPositionsDeflated(
|
|
432
|
+
function compareByGeneratedPositionsDeflated(
|
|
433
|
+
mappingA,
|
|
434
|
+
mappingB,
|
|
435
|
+
onlyCompareGenerated
|
|
436
|
+
) {
|
|
425
437
|
var cmp = mappingA.generatedLine - mappingB.generatedLine;
|
|
426
438
|
if (cmp !== 0) {
|
|
427
439
|
return cmp;
|
|
@@ -449,9 +461,14 @@ function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGene
|
|
|
449
461
|
|
|
450
462
|
return strcmp(mappingA.name, mappingB.name);
|
|
451
463
|
}
|
|
452
|
-
exports.compareByGeneratedPositionsDeflated =
|
|
453
|
-
|
|
454
|
-
|
|
464
|
+
exports.compareByGeneratedPositionsDeflated =
|
|
465
|
+
compareByGeneratedPositionsDeflated;
|
|
466
|
+
|
|
467
|
+
function compareByGeneratedPositionsDeflatedNoLine(
|
|
468
|
+
mappingA,
|
|
469
|
+
mappingB,
|
|
470
|
+
onlyCompareGenerated
|
|
471
|
+
) {
|
|
455
472
|
var cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
|
456
473
|
if (cmp !== 0 || onlyCompareGenerated) {
|
|
457
474
|
return cmp;
|
|
@@ -474,7 +491,8 @@ function compareByGeneratedPositionsDeflatedNoLine(mappingA, mappingB, onlyCompa
|
|
|
474
491
|
|
|
475
492
|
return strcmp(mappingA.name, mappingB.name);
|
|
476
493
|
}
|
|
477
|
-
exports.compareByGeneratedPositionsDeflatedNoLine =
|
|
494
|
+
exports.compareByGeneratedPositionsDeflatedNoLine =
|
|
495
|
+
compareByGeneratedPositionsDeflatedNoLine;
|
|
478
496
|
|
|
479
497
|
function strcmp(aStr1, aStr2) {
|
|
480
498
|
if (aStr1 === aStr2) {
|
|
@@ -528,7 +546,8 @@ function compareByGeneratedPositionsInflated(mappingA, mappingB) {
|
|
|
528
546
|
|
|
529
547
|
return strcmp(mappingA.name, mappingB.name);
|
|
530
548
|
}
|
|
531
|
-
exports.compareByGeneratedPositionsInflated =
|
|
549
|
+
exports.compareByGeneratedPositionsInflated =
|
|
550
|
+
compareByGeneratedPositionsInflated;
|
|
532
551
|
|
|
533
552
|
/**
|
|
534
553
|
* Strip any JSON XSSI avoidance prefix from the string (as documented
|
|
@@ -577,7 +596,7 @@ function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
|
|
|
577
596
|
if (sourceMapURL) {
|
|
578
597
|
var parsed = urlParse(sourceMapURL);
|
|
579
598
|
if (!parsed) {
|
|
580
|
-
throw new Error(
|
|
599
|
+
throw new Error('sourceMapURL could not be parsed');
|
|
581
600
|
}
|
|
582
601
|
if (parsed.path) {
|
|
583
602
|
// Strip the last path component, but keep the "/".
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "source-map-js",
|
|
3
3
|
"description": "Generates and consumes source maps",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.4",
|
|
5
5
|
"homepage": "https://github.com/7rulnik/source-map-js",
|
|
6
6
|
"author": "Valentin 7rulnik Semirulnik <v7rulnik@gmail.com>",
|
|
7
7
|
"contributors": [
|
|
@@ -51,21 +51,28 @@
|
|
|
51
51
|
"lib/"
|
|
52
52
|
],
|
|
53
53
|
"engines": {
|
|
54
|
-
"node": ">=0.
|
|
54
|
+
"node": ">=6.0.0"
|
|
55
55
|
},
|
|
56
56
|
"license": "BSD-3-Clause",
|
|
57
57
|
"scripts": {
|
|
58
|
-
"test": "
|
|
59
|
-
"
|
|
60
|
-
"
|
|
58
|
+
"test": "node --test --test-reporter=spec 'test/test-*.js'",
|
|
59
|
+
"test:coverage": "node --experimental-config-file=node.config.json --test --test-reporter=spec --experimental-test-coverage 'test/test-*.js'",
|
|
60
|
+
"format": "prettier --write .",
|
|
61
|
+
"format:check": "prettier --check .",
|
|
62
|
+
"toc": "doctoc --title '## Table of Contents' README.md && prettier --write README.md"
|
|
61
63
|
},
|
|
62
64
|
"devDependencies": {
|
|
63
65
|
"clean-publish": "^3.1.0",
|
|
64
66
|
"doctoc": "^0.15.0",
|
|
65
|
-
"
|
|
67
|
+
"prettier": "3.10.1"
|
|
68
|
+
},
|
|
69
|
+
"prettier": {
|
|
70
|
+
"singleQuote": true,
|
|
71
|
+
"trailingComma": "es5"
|
|
66
72
|
},
|
|
67
73
|
"clean-publish": {
|
|
68
74
|
"cleanDocs": true
|
|
69
75
|
},
|
|
70
|
-
"typings": "source-map.d.ts"
|
|
76
|
+
"typings": "source-map.d.ts",
|
|
77
|
+
"packageManager": "pnpm@12.21.0"
|
|
71
78
|
}
|