@artel/artc 0.6.25277 → 0.6.25279
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/build/Cli.js +3 -3
- package/build/api/Api.js +14 -20
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +609 -565
- package/build/{chunk-QK3TWMY2.js → chunk-65GDIOT3.js} +20 -24
- package/build/{chunk-DKZTCPRN.js → chunk-C4HHHOM5.js} +15 -15
- package/build/{chunk-EVYL6VFM.js → chunk-HPU7DXMO.js} +2235 -1500
- package/build/types/analysis/AccessedFunction.d.ts +3 -3
- package/build/types/analysis/AnalyzedTextTranslationPackage.d.ts +2 -2
- package/build/types/analysis/AnalyzedTranslationPackage.d.ts +11 -8
- package/build/types/analysis/Analyzer.d.ts +23 -19
- package/build/types/analysis/DeclarationsUsageCounter.d.ts +2 -2
- package/build/types/analysis/{DiagnosticCollector.d.ts → SourceFileAnalyzer.d.ts} +4 -5
- package/build/types/analysis/SourcePackageDependencyGraph.d.ts +2 -2
- package/build/types/analysis/SubstitutedFunction.d.ts +3 -3
- package/build/types/analysis/TranslatedEntityNameConflictsValidator.d.ts +28 -0
- package/build/types/analysis/Translation.d.ts +1 -2
- package/build/types/analysis/UserDefinableBinaryOperatorResolver.d.ts +1 -1
- package/build/types/analysis/UserDefinableUnaryOperatorResolver.d.ts +1 -1
- package/build/types/analysis/index.d.ts +1 -1
- package/build/types/analysis/semantic-context/Declarations.d.ts +3 -3
- package/build/types/analysis/semantic-context/SemanticContextBase.d.ts +2 -2
- package/build/types/api/Api.d.ts +1 -1
- package/build/types/api/ApiServices.d.ts +1 -1
- package/build/types/common/TaskController.d.ts +14 -0
- package/build/types/common/TreeTraversal.d.ts +10 -9
- package/build/types/common/index.d.ts +1 -5
- package/build/types/diagnostic/DiagnosticCode.d.ts +5 -1
- package/build/types/{common → diagnostic}/WithDiagnostics.d.ts +1 -1
- package/build/types/emitter/Emitter.d.ts +3 -3
- package/build/types/emitter/EmitterContext.d.ts +1 -1
- package/build/types/emitter/EntityMap.d.ts +1 -1
- package/build/types/entities/Entity.d.ts +3 -1
- package/build/types/entities/EntityNaming.d.ts +2 -0
- package/build/types/entities/interfaces/FunctionEntity.d.ts +19 -6
- package/build/types/entities/interfaces/TypeParameterEntity.d.ts +2 -2
- package/build/types/entities/intrinsic/IntrinsicFunctionEntity.d.ts +3 -1
- package/build/types/entities/source/SourceFunctionEntity.d.ts +86 -5
- package/build/types/entities/source/SourceVariableEntity.d.ts +3 -1
- package/build/types/entities/translated/TranslatedAliasTypeEntity.d.ts +0 -1
- package/build/types/entities/translated/TranslatedConstructorEntity.d.ts +1 -1
- package/build/types/entities/translated/TranslatedFunctionEntity.d.ts +29 -14
- package/build/types/entities/translated/TranslatedFunctionTypeEntity.d.ts +0 -1
- package/build/types/entities/translated/TranslatedIndexerEntity.d.ts +19 -9
- package/build/types/entities/translated/TranslatedOperatorEntity.d.ts +21 -10
- package/build/types/entities/translated/TranslatedPackageEntity.d.ts +0 -2
- package/build/types/entities/translated/TranslatedStructuredTypeEntity.d.ts +0 -1
- package/build/types/entities/translated/TranslatedVariantTypeEntity.d.ts +0 -1
- package/build/types/executor/Compiler.d.ts +6 -6
- package/build/types/executor/NodeCompiler.d.ts +6 -6
- package/build/types/project/CompilationLoader.d.ts +5 -5
- package/build/types/project/FileSystemTree.d.ts +1 -1
- package/build/types/project/PackageContentCreator.d.ts +2 -1
- package/build/types/services/{CustomCommand.d.ts → CustomRequests.d.ts} +20 -51
- package/build/types/services/DefinitionService.d.ts +2 -2
- package/build/types/services/DeleteBlockFromScriptService.d.ts +6 -0
- package/build/types/services/DisplayService.d.ts +22 -7
- package/build/types/services/DocumentHighlightsService.d.ts +2 -2
- package/build/types/services/LanguageServer.d.ts +4 -3
- package/build/types/services/NodeSemanticInfo.d.ts +1 -6
- package/build/types/services/ReferencesService.d.ts +3 -3
- package/build/types/services/RenameService.d.ts +2 -2
- package/build/types/services/SemanticTokensService.d.ts +4 -4
- package/build/types/services/source-generation/SourceGenerationService.d.ts +6 -5
- package/build/types/services/workspace/CompilationController.d.ts +7 -5
- package/build/types/services/workspace/FileSystemTreeProviderBasedOnWatchedFileSystem.d.ts +2 -2
- package/build/types/services/workspace/ManuallyUpdatedFileSystemTreeProvider.d.ts +2 -2
- package/build/types/services/workspace/Workspace.d.ts +3 -5
- package/build/types/services/workspace/WorkspaceFiles.d.ts +3 -3
- package/build/types/ts-interop/Entities.d.ts +3 -0
- package/package.json +1 -1
- package/build/types/common/Delayed.d.ts +0 -7
- package/build/types/common/ThrottledCancellationToken.d.ts +0 -17
- package/build/types/common/YieldExecution.d.ts +0 -1
- /package/build/types/{common → analysis}/TreeQuery.d.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Compiler
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-C4HHHOM5.js";
|
|
4
4
|
import {
|
|
5
5
|
ArtelVersion,
|
|
6
6
|
Cached,
|
|
@@ -10,11 +10,12 @@ import {
|
|
|
10
10
|
DirectoryEntry,
|
|
11
11
|
PerformanceMeasurement,
|
|
12
12
|
Query,
|
|
13
|
+
TaskController,
|
|
13
14
|
Uri,
|
|
14
15
|
__async,
|
|
15
16
|
performanceMeasurementStageNames,
|
|
16
17
|
performanceMeasurementStages
|
|
17
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-HPU7DXMO.js";
|
|
18
19
|
|
|
19
20
|
// source/executor/FileSystemUri.ts
|
|
20
21
|
import { platform } from "os";
|
|
@@ -225,7 +226,7 @@ var NodeCompiler = class {
|
|
|
225
226
|
return new PhysicalTypeScriptLibrariesProvider(standardLibraryUri);
|
|
226
227
|
});
|
|
227
228
|
}
|
|
228
|
-
static loadCompilation(projectPath, tsLibrariesProvider, diagnostics,
|
|
229
|
+
static loadCompilation(projectPath, tsLibrariesProvider, diagnostics, taskController, options) {
|
|
229
230
|
return __async(this, null, function* () {
|
|
230
231
|
const projectUri = FileSystemUri.pathToUri(projectPath);
|
|
231
232
|
const loadCompilationOptions = {
|
|
@@ -239,22 +240,22 @@ var NodeCompiler = class {
|
|
|
239
240
|
this.fileSystem,
|
|
240
241
|
tsLibrariesProvider,
|
|
241
242
|
diagnostics,
|
|
242
|
-
|
|
243
|
-
|
|
243
|
+
taskController,
|
|
244
|
+
loadCompilationOptions
|
|
244
245
|
);
|
|
245
246
|
});
|
|
246
247
|
}
|
|
247
|
-
static createAnalyzer(compilation, tsLibrariesProvider, diagnostics,
|
|
248
|
+
static createAnalyzer(compilation, tsLibrariesProvider, diagnostics, taskController) {
|
|
248
249
|
return __async(this, null, function* () {
|
|
249
|
-
return yield Compiler.createAnalyzer(compilation, tsLibrariesProvider, diagnostics,
|
|
250
|
+
return yield Compiler.createAnalyzer(compilation, tsLibrariesProvider, diagnostics, taskController);
|
|
250
251
|
});
|
|
251
252
|
}
|
|
252
|
-
static analyze(analyzer, diagnostics,
|
|
253
|
+
static analyze(analyzer, diagnostics, taskController) {
|
|
253
254
|
return __async(this, null, function* () {
|
|
254
|
-
return yield Compiler.analyze(analyzer, diagnostics,
|
|
255
|
+
return yield Compiler.analyze(analyzer, diagnostics, taskController);
|
|
255
256
|
});
|
|
256
257
|
}
|
|
257
|
-
static emit(analyzer, outputPath, diagnostics,
|
|
258
|
+
static emit(analyzer, outputPath, diagnostics, taskController, emitOptions) {
|
|
258
259
|
return __async(this, null, function* () {
|
|
259
260
|
const outputUri = FileSystemUri.pathToUri(outputPath);
|
|
260
261
|
const launchUri = yield Compiler.emit(
|
|
@@ -262,8 +263,8 @@ var NodeCompiler = class {
|
|
|
262
263
|
outputUri,
|
|
263
264
|
this.fileSystem,
|
|
264
265
|
diagnostics,
|
|
265
|
-
|
|
266
|
-
|
|
266
|
+
taskController,
|
|
267
|
+
emitOptions
|
|
267
268
|
);
|
|
268
269
|
if (launchUri === void 0) {
|
|
269
270
|
return void 0;
|
|
@@ -286,8 +287,8 @@ var NodeCompiler = class {
|
|
|
286
287
|
task.projectPath,
|
|
287
288
|
typeScriptLibrariesProvider,
|
|
288
289
|
task.diagnostics,
|
|
289
|
-
task.
|
|
290
|
-
task.
|
|
290
|
+
task.controller,
|
|
291
|
+
task.loadCompilationOptions
|
|
291
292
|
);
|
|
292
293
|
if (compilation === void 0) {
|
|
293
294
|
return void 0;
|
|
@@ -296,22 +297,16 @@ var NodeCompiler = class {
|
|
|
296
297
|
compilation,
|
|
297
298
|
typeScriptLibrariesProvider,
|
|
298
299
|
task.diagnostics,
|
|
299
|
-
task.
|
|
300
|
+
task.controller
|
|
300
301
|
);
|
|
301
302
|
if (analyzer === void 0) {
|
|
302
303
|
return void 0;
|
|
303
304
|
}
|
|
304
|
-
const analyzed = yield this.analyze(analyzer, task.diagnostics, task.
|
|
305
|
+
const analyzed = yield this.analyze(analyzer, task.diagnostics, task.controller);
|
|
305
306
|
if (!analyzed) {
|
|
306
307
|
return void 0;
|
|
307
308
|
}
|
|
308
|
-
const launchPath = yield this.emit(
|
|
309
|
-
analyzer,
|
|
310
|
-
task.outputPath,
|
|
311
|
-
task.diagnostics,
|
|
312
|
-
task.emitOptions,
|
|
313
|
-
task.cancellationToken
|
|
314
|
-
);
|
|
309
|
+
const launchPath = yield this.emit(analyzer, task.outputPath, task.diagnostics, task.controller, task.emitOptions);
|
|
315
310
|
return launchPath;
|
|
316
311
|
});
|
|
317
312
|
}
|
|
@@ -403,7 +398,8 @@ var CommandLineCompiler = class {
|
|
|
403
398
|
mode: "linked" /* Linked */,
|
|
404
399
|
includeSourcesContent: false
|
|
405
400
|
}
|
|
406
|
-
}
|
|
401
|
+
},
|
|
402
|
+
controller: new TaskController(-1)
|
|
407
403
|
};
|
|
408
404
|
const launchPath = yield NodeCompiler.compile(compilerTask);
|
|
409
405
|
if (launchPath === void 0) {
|
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
CompilationLoader,
|
|
4
4
|
DefaultNamesOfDirectoriesToIgnore,
|
|
5
5
|
Diagnostic,
|
|
6
|
-
DiagnosticCollector,
|
|
7
6
|
DiagnosticData,
|
|
8
7
|
Emitter,
|
|
8
|
+
SourceFileAnalyzer,
|
|
9
9
|
SourcePackageDependencyGraph,
|
|
10
10
|
WellKnownDeclarationsLoadError,
|
|
11
11
|
__async,
|
|
12
12
|
createTsInteropInputsForCompilation
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-HPU7DXMO.js";
|
|
14
14
|
|
|
15
15
|
// source/executor/Compiler.ts
|
|
16
16
|
var Compiler = class {
|
|
17
|
-
static loadCompilation(projectUri, sourcesProvider, tsLibrariesProvider, diagnostics,
|
|
17
|
+
static loadCompilation(projectUri, sourcesProvider, tsLibrariesProvider, diagnostics, taskController, options) {
|
|
18
18
|
return __async(this, null, function* () {
|
|
19
19
|
const loaderOptions = {
|
|
20
20
|
treatRootAsPackageIfConfigIsMissing: true,
|
|
@@ -25,16 +25,16 @@ var Compiler = class {
|
|
|
25
25
|
const { loadResult } = yield CompilationLoader.loadUsingSourcesProvider(
|
|
26
26
|
projectUri,
|
|
27
27
|
sourcesProvider,
|
|
28
|
+
taskController,
|
|
28
29
|
loaderOptions,
|
|
29
30
|
diagnostics,
|
|
30
31
|
options?.workspaceUri,
|
|
31
|
-
DefaultNamesOfDirectoriesToIgnore
|
|
32
|
-
cancellationToken
|
|
32
|
+
DefaultNamesOfDirectoriesToIgnore
|
|
33
33
|
);
|
|
34
34
|
return loadResult.compilation;
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
-
static createAnalyzer(compilation, tsLibrariesProvider, diagnostics,
|
|
37
|
+
static createAnalyzer(compilation, tsLibrariesProvider, diagnostics, _taskController) {
|
|
38
38
|
return __async(this, null, function* () {
|
|
39
39
|
const tsInteropInputs = createTsInteropInputsForCompilation(compilation, tsLibrariesProvider);
|
|
40
40
|
try {
|
|
@@ -48,15 +48,15 @@ var Compiler = class {
|
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
static analyze(analyzer, diagnostics,
|
|
51
|
+
static analyze(analyzer, diagnostics, taskController) {
|
|
52
52
|
return __async(this, null, function* () {
|
|
53
53
|
let hasErrorsPreventingCompilation = false;
|
|
54
54
|
const sourcePackageGraph = new SourcePackageDependencyGraph(analyzer);
|
|
55
|
-
const packages = Array.from(sourcePackageGraph.
|
|
55
|
+
const packages = Array.from(sourcePackageGraph.packagesForTargetPlatform(0 /* JavaScript */));
|
|
56
56
|
for (const pkg of packages) {
|
|
57
57
|
for (const sourceFile of pkg.sourceFiles) {
|
|
58
|
-
const
|
|
59
|
-
const fileDiagnostics = yield
|
|
58
|
+
const sourceFileAnalyzer = new SourceFileAnalyzer(analyzer, sourceFile);
|
|
59
|
+
const fileDiagnostics = yield sourceFileAnalyzer.analyze(taskController);
|
|
60
60
|
for (const diagnostic of fileDiagnostics) {
|
|
61
61
|
diagnostics?.addDiagnostic(diagnostic);
|
|
62
62
|
hasErrorsPreventingCompilation ||= pkg.kind === "program" && fileDiagnostics.some((d) => d.data.kind === 0 /* Error */);
|
|
@@ -66,21 +66,21 @@ var Compiler = class {
|
|
|
66
66
|
return !hasErrorsPreventingCompilation;
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
static emit(analyzer, outputUri, outputAcceptor,
|
|
69
|
+
static emit(analyzer, outputUri, outputAcceptor, diagnostics, taskController, emitOptions) {
|
|
70
70
|
return __async(this, null, function* () {
|
|
71
71
|
if (analyzer.compilation.mainPackage === void 0) {
|
|
72
|
-
|
|
72
|
+
diagnostics?.addDiagnostic(new Diagnostic(DiagnosticData.withCode(
|
|
73
73
|
403 /* ProgramWithoutMainPackageCannotBeCompiled */
|
|
74
74
|
), void 0));
|
|
75
75
|
return void 0;
|
|
76
76
|
}
|
|
77
77
|
const emitter = new Emitter(analyzer, emitOptions);
|
|
78
|
-
yield emitter.emitToFileSystem(outputUri, outputAcceptor,
|
|
78
|
+
yield emitter.emitToFileSystem(outputUri, outputAcceptor, taskController);
|
|
79
79
|
const launchUri = outputUri.append(Emitter.LaunchFileName);
|
|
80
80
|
return launchUri;
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
|
-
static emitToString(analyzer, _diagnostics,
|
|
83
|
+
static emitToString(analyzer, _diagnostics, taskController, emitOptions) {
|
|
84
84
|
return __async(this, null, function* () {
|
|
85
85
|
if (analyzer.compilation.mainPackage === void 0) {
|
|
86
86
|
_diagnostics?.addDiagnostic(new Diagnostic(DiagnosticData.withCode(
|
|
@@ -89,7 +89,7 @@ var Compiler = class {
|
|
|
89
89
|
return "";
|
|
90
90
|
}
|
|
91
91
|
const emitter = new Emitter(analyzer, emitOptions);
|
|
92
|
-
const result = yield emitter.emitToString(
|
|
92
|
+
const result = yield emitter.emitToString(taskController);
|
|
93
93
|
return result;
|
|
94
94
|
});
|
|
95
95
|
}
|