MCPcopy Create free account
hub / github.com/Rich-Harris/magic-string / generateDecodedMap

Method generateDecodedMap

src/Bundle.ts:276–285  ·  view source on GitHub ↗

* Generates a sourcemap object with raw mappings in array form, rather than encoded as a string. * Takes the same options as `generateMap`.

(options: BundleSourceMapOptions = {})

Source from the content-addressed store, hash-verified

274 * Takes the same options as `generateMap`.
275 */
276 generateDecodedMap(options: BundleSourceMapOptions = {}): DecodedSourceMapOrMissingContent {
277 const mappings = new Mappings(options.hires)
278 const { names, x_google_ignoreList } = this._generateMappings(mappings)
279
280 return {
281 ...this._mapProperties(options, names, x_google_ignoreList),
282 mappings: mappings.raw,
283 rangeMappings: mappings.rawRangeMappings,
284 }
285 }
286
287 /**
288 * Generates a version 3 sourcemap covering every source that has a `filename`.

Callers 6

overwrite.test.tsFile · 0.45
trim.test.tsFile · 0.45
flattenFunction · 0.45
addSource.test.tsFile · 0.45

Calls 2

_generateMappingsMethod · 0.95
_mapPropertiesMethod · 0.95

Tested by 1

flattenFunction · 0.36