format: prettify entire project

This commit is contained in:
Rim
2025-04-02 06:50:39 -04:00
parent 86f0782a98
commit 7ccc0be712
1711 changed files with 755867 additions and 235931 deletions

View File

@ -1,11 +1,11 @@
"use strict";
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.default = void 0;
var _genMapping = require("@jridgewell/gen-mapping");
var _genMapping = require('@jridgewell/gen-mapping');
class SourceMap {
constructor(opts, code) {
@ -17,17 +17,24 @@ class SourceMap {
this._lastGenLine = 0;
this._lastSourceLine = 0;
this._lastSourceColumn = 0;
const map = this._map = new _genMapping.GenMapping({
sourceRoot: opts.sourceRoot
});
this._sourceFileName = (_opts$sourceFileName = opts.sourceFileName) == null ? void 0 : _opts$sourceFileName.replace(/\\/g, "/");
const map = (this._map = new _genMapping.GenMapping({
sourceRoot: opts.sourceRoot,
}));
this._sourceFileName =
(_opts$sourceFileName = opts.sourceFileName) == null ?
void 0
: _opts$sourceFileName.replace(/\\/g, '/');
this._rawMappings = undefined;
if (typeof code === "string") {
if (typeof code === 'string') {
(0, _genMapping.setSourceContent)(map, this._sourceFileName, code);
} else if (typeof code === "object") {
Object.keys(code).forEach(sourceFileName => {
(0, _genMapping.setSourceContent)(map, sourceFileName.replace(/\\/g, "/"), code[sourceFileName]);
} else if (typeof code === 'object') {
Object.keys(code).forEach((sourceFileName) => {
(0, _genMapping.setSourceContent)(
map,
sourceFileName.replace(/\\/g, '/'),
code[sourceFileName]
);
});
}
}
@ -41,7 +48,10 @@ class SourceMap {
}
getRawMappings() {
return this._rawMappings || (this._rawMappings = (0, _genMapping.allMappings)(this._map));
return (
this._rawMappings ||
(this._rawMappings = (0, _genMapping.allMappings)(this._map))
);
}
mark(generated, line, column, identifierName, filename) {
@ -49,14 +59,20 @@ class SourceMap {
(0, _genMapping.maybeAddMapping)(this._map, {
name: identifierName,
generated,
source: line == null ? undefined : (filename == null ? void 0 : filename.replace(/\\/g, "/")) || this._sourceFileName,
original: line == null ? undefined : {
line: line,
column: column
}
source:
line == null ? undefined : (
(filename == null ? void 0 : filename.replace(/\\/g, '/')) ||
this._sourceFileName
),
original:
line == null ? undefined : (
{
line: line,
column: column,
}
),
});
}
}
exports.default = SourceMap;
exports.default = SourceMap;