@ripple-ts/language-server 0.3.57 → 0.3.59
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/language-server.js
CHANGED
|
@@ -20365,28 +20365,7 @@ var TSRXVirtualCode = class {
|
|
|
20365
20365
|
} catch (e) {
|
|
20366
20366
|
const error = e;
|
|
20367
20367
|
logError$3("Ripple compilation failed for", this.fileName, ":", error);
|
|
20368
|
-
if (process.env.TSRX_TSC === "true")
|
|
20369
|
-
logTSRXErrors(this.fileName, [error]);
|
|
20370
|
-
const fallback = getFallbackGeneratedCode(this.tsrx, newCode, this.fileName);
|
|
20371
|
-
if (fallback !== void 0) {
|
|
20372
|
-
logTSRXErrors(this.fileName, fallback.errors);
|
|
20373
|
-
transpiled = {
|
|
20374
|
-
code: fallback.code,
|
|
20375
|
-
mappings: [{
|
|
20376
|
-
sourceOffsets: [0],
|
|
20377
|
-
generatedOffsets: [0],
|
|
20378
|
-
lengths: [newCode.length],
|
|
20379
|
-
generatedLengths: [fallback.code.length],
|
|
20380
|
-
data: {
|
|
20381
|
-
verification: false,
|
|
20382
|
-
customData: {}
|
|
20383
|
-
}
|
|
20384
|
-
}],
|
|
20385
|
-
errors: fallback.errors,
|
|
20386
|
-
cssMappings: []
|
|
20387
|
-
};
|
|
20388
|
-
}
|
|
20389
|
-
}
|
|
20368
|
+
if (process.env.TSRX_TSC === "true") logTSRXErrors(this.fileName, [error]);
|
|
20390
20369
|
error.type = "fatal";
|
|
20391
20370
|
this.fatalErrors.push(error);
|
|
20392
20371
|
}
|
|
@@ -20516,24 +20495,6 @@ function logTSRXErrors(file_name, errors) {
|
|
|
20516
20495
|
}
|
|
20517
20496
|
}
|
|
20518
20497
|
/**
|
|
20519
|
-
* @param {TSRXCompilerModule} tsrx
|
|
20520
|
-
* @param {string} source
|
|
20521
|
-
* @param {string} file_name
|
|
20522
|
-
* @returns {{ code: string, errors: TSRXCompileError[] } | undefined}
|
|
20523
|
-
*/
|
|
20524
|
-
function getFallbackGeneratedCode(tsrx, source, file_name) {
|
|
20525
|
-
if (typeof tsrx.compile !== "function") return;
|
|
20526
|
-
try {
|
|
20527
|
-
const result = tsrx.compile(source, file_name, { loose: true });
|
|
20528
|
-
if (typeof result?.code === "string") return {
|
|
20529
|
-
code: result.code,
|
|
20530
|
-
errors: result?.errors ?? []
|
|
20531
|
-
};
|
|
20532
|
-
} catch (error) {
|
|
20533
|
-
logError$3("Fallback compilation failed for", file_name, ":", error);
|
|
20534
|
-
}
|
|
20535
|
-
}
|
|
20536
|
-
/**
|
|
20537
20498
|
* Extract CSS content from <style>...</style> tags in source code
|
|
20538
20499
|
* @param {string} code - The source code to extract CSS from
|
|
20539
20500
|
* @returns {VirtualCode[]} Array of embedded CSS virtual codes
|
|
@@ -21927,4 +21888,4 @@ Object.defineProperty(exports, 'createRippleLanguageServer', {
|
|
|
21927
21888
|
return createRippleLanguageServer;
|
|
21928
21889
|
}
|
|
21929
21890
|
});
|
|
21930
|
-
//# sourceMappingURL=server-
|
|
21891
|
+
//# sourceMappingURL=server-BNcMp4pJ.js.map
|