@internal
(mappings: Mappings)
| 367 | |
| 368 | /** @internal */ |
| 369 | _generateMappings(mappings: Mappings): string[] { |
| 370 | const sourceIndex = 0 |
| 371 | const names = Object.keys(this.storedNames) |
| 372 | const locate = getLocator(this.original) |
| 373 | |
| 374 | if (this.intro) { |
| 375 | mappings.advance(this.intro) |
| 376 | } |
| 377 | |
| 378 | this.firstChunk.eachNext((chunk) => { |
| 379 | const loc = locate(chunk.start) |
| 380 | |
| 381 | if (chunk.intro.length) |
| 382 | mappings.advance(chunk.intro) |
| 383 | |
| 384 | if (chunk.edited) { |
| 385 | mappings.addEdit( |
| 386 | sourceIndex, |
| 387 | chunk.content, |
| 388 | loc, |
| 389 | chunk.storeName ? names.indexOf(chunk.original) : -1, |
| 390 | ) |
| 391 | } |
| 392 | else { |
| 393 | mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations) |
| 394 | } |
| 395 | |
| 396 | if (chunk.outro.length) |
| 397 | mappings.advance(chunk.outro) |
| 398 | }) |
| 399 | |
| 400 | if (this.outro) { |
| 401 | mappings.advance(this.outro) |
| 402 | } |
| 403 | |
| 404 | return names |
| 405 | } |
| 406 | |
| 407 | /** @internal */ |
| 408 | _mapProperties(options: SourceMapOptions, names: string[]): Omit<DecodedSourceMap, 'mappings' | 'rangeMappings'> { |
no test coverage detected