@artel/artc 0.9.26064-pre-release → 0.9.26066-pre-release

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.
Files changed (32) hide show
  1. package/build/Cli.js +3 -3
  2. package/build/api/Api.js +6 -2
  3. package/build/api/ApiNodeJS.js +3 -3
  4. package/build/api/ApiServices.js +10 -10
  5. package/build/{chunk-YP6HREWC.js → chunk-JEQWWCOZ.js} +14 -1
  6. package/build/{chunk-UNEFYP4Q.js → chunk-NBUVBUHG.js} +2 -2
  7. package/build/{chunk-BXB62BAN.js → chunk-WF2QIUKD.js} +337 -201
  8. package/build/types/analysis/Analyzer.d.ts +3 -2
  9. package/build/types/analysis/a/ResolvedNameTranslationPackage.d.ts +2 -2
  10. package/build/types/analysis/m/ResolvedNameTranslationPackage.d.ts +2 -2
  11. package/build/types/common/PackageName.d.ts +10 -0
  12. package/build/types/common/index.d.ts +1 -0
  13. package/build/types/emitter/Emitter.d.ts +17 -1
  14. package/build/types/emitter/Entities.d.ts +4 -2
  15. package/build/types/emitter/IrFactory.d.ts +4 -4
  16. package/build/types/emitter/IrToJs.d.ts +2 -0
  17. package/build/types/emitter/ir/Nodes.d.ts +4 -2
  18. package/build/types/entities/interfaces/PackageEntity.d.ts +2 -2
  19. package/build/types/entities/source/a/SourcePackageEntity.d.ts +2 -2
  20. package/build/types/entities/source/m/SourcePackageEntity.d.ts +2 -2
  21. package/build/types/entities/translated/TranslatedPackageEntity.d.ts +2 -2
  22. package/build/types/entities/translated/source/a/SourceTranslatedPackageEntity.d.ts +1 -1
  23. package/build/types/entities/translated/source/m/SourceTranslatedPackageEntity.d.ts +1 -1
  24. package/build/types/executor/Compiler.d.ts +2 -1
  25. package/build/types/project/Compilation.d.ts +2 -2
  26. package/build/types/project/SourcePackage.d.ts +1 -9
  27. package/build/types/project/configuration/ConfigurationConverter.d.ts +1 -3
  28. package/build/types/tree/m/Nodes.d.ts +20 -20
  29. package/build/types/ts-interop/Entities.d.ts +2 -2
  30. package/build/types/ts-interop/TsInteropContext.d.ts +2 -2
  31. package/build/types/ts-interop/Utils.d.ts +2 -1
  32. package/package.json +1 -1
package/build/Cli.js CHANGED
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CommandLineCompiler
4
- } from "./chunk-UNEFYP4Q.js";
5
- import "./chunk-YP6HREWC.js";
4
+ } from "./chunk-NBUVBUHG.js";
5
+ import "./chunk-JEQWWCOZ.js";
6
6
  import {
7
7
  __async
8
- } from "./chunk-BXB62BAN.js";
8
+ } from "./chunk-WF2QIUKD.js";
9
9
 
10
10
  // source/Cli.ts
11
11
  function main() {
package/build/api/Api.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Compiler,
3
3
  DiagnosticFormatter
4
- } from "../chunk-YP6HREWC.js";
4
+ } from "../chunk-JEQWWCOZ.js";
5
5
  import {
6
6
  AccessKind,
7
7
  AccessedFunction_entity,
@@ -80,6 +80,8 @@ import {
80
80
  DirectoryEntry,
81
81
  DisplayableArray,
82
82
  DisplayableOrPrimitive,
83
+ EmitToMemoryPackage,
84
+ EmitToMemoryResult,
83
85
  Emitter,
84
86
  EmitterPackage,
85
87
  EndKeywordPart,
@@ -324,7 +326,7 @@ import {
324
326
  withoutQuotes,
325
327
  withoutTemplateQuotes,
326
328
  yieldTask
327
- } from "../chunk-BXB62BAN.js";
329
+ } from "../chunk-WF2QIUKD.js";
328
330
  export {
329
331
  AccessKind,
330
332
  AccessedFunction_entity,
@@ -405,6 +407,8 @@ export {
405
407
  DirectoryEntry,
406
408
  DisplayableArray,
407
409
  DisplayableOrPrimitive,
410
+ EmitToMemoryPackage,
411
+ EmitToMemoryResult,
408
412
  Emitter,
409
413
  EmitterPackage,
410
414
  EndKeywordPart,
@@ -6,9 +6,9 @@ import {
6
6
  PhysicalFileSystem,
7
7
  PhysicalTypeScriptLibrariesProvider,
8
8
  PrintingDiagnosticAcceptor
9
- } from "../chunk-UNEFYP4Q.js";
10
- import "../chunk-YP6HREWC.js";
11
- import "../chunk-BXB62BAN.js";
9
+ } from "../chunk-NBUVBUHG.js";
10
+ import "../chunk-JEQWWCOZ.js";
11
+ import "../chunk-WF2QIUKD.js";
12
12
  export {
13
13
  CommandLineCompiler,
14
14
  FileSystemUri,
@@ -150,7 +150,7 @@ import {
150
150
  traverseTreeAsync,
151
151
  traverseTreeAsync2,
152
152
  yieldTask
153
- } from "../chunk-BXB62BAN.js";
153
+ } from "../chunk-WF2QIUKD.js";
154
154
 
155
155
  // source/services/common/Types.ts
156
156
  import * as ls from "vscode-languageserver";
@@ -14664,16 +14664,16 @@ var TranslationsGenerator3 = class _TranslationsGenerator {
14664
14664
  editText += newLine;
14665
14665
  }
14666
14666
  } else {
14667
- Debug.assert(translationsDeclaration.endKeyword !== void 0);
14667
+ Debug.assert(translationsDeclaration.endClause !== void 0);
14668
14668
  const translationsKeywordLine = this.sourceFile.getPositionAt(translationsDeclaration.translationsKeyword.rangeWithoutTrivia.start).line;
14669
- const endKeywordLine = this.sourceFile.getPositionAt(translationsDeclaration.endKeyword.rangeWithoutTrivia.start).line;
14669
+ const endKeywordLine = this.sourceFile.getPositionAt(translationsDeclaration.endClause.rangeWithoutTrivia.start).line;
14670
14670
  if (translationsKeywordLine === endKeywordLine) {
14671
14671
  editText = newLine + code + newLine;
14672
14672
  const lastWhitespaceTrivia = translationsDeclaration.translationsKeyword.findRightmostToken()?.selectTrailingTrivia(() => true).at(-1);
14673
14673
  if (lastWhitespaceTrivia?.kind === 0 /* Whitespace */) {
14674
14674
  editRange = lastWhitespaceTrivia.range;
14675
14675
  } else {
14676
- editRange = Range.empty(translationsDeclaration.endKeyword.rangeWithoutTrivia.start);
14676
+ editRange = Range.empty(translationsDeclaration.endClause.rangeWithoutTrivia.start);
14677
14677
  }
14678
14678
  } else {
14679
14679
  editText = translationsDeclaration.translationList.translationDeclarations.count() > 0 ? newLine + code + newLine : newLine + code;
@@ -14816,12 +14816,12 @@ var TranslationsGenerator4 = class _TranslationsGenerator {
14816
14816
  editText += newLine;
14817
14817
  }
14818
14818
  } else {
14819
- Debug.assert(translationsDeclaration.endKeyword !== void 0);
14819
+ Debug.assert(translationsDeclaration.endClause !== void 0);
14820
14820
  const translationsKeywordLine = this.sourceFile.getPositionAt(translationsDeclaration.translationsKeyword.rangeWithoutTrivia.start).line;
14821
- const endKeywordLine = this.sourceFile.getPositionAt(translationsDeclaration.endKeyword.rangeWithoutTrivia.start).line;
14821
+ const endKeywordLine = this.sourceFile.getPositionAt(translationsDeclaration.endClause.rangeWithoutTrivia.start).line;
14822
14822
  if (translationsKeywordLine === endKeywordLine) {
14823
14823
  editText = newLine + memberTranslationsCode + newLine;
14824
- editRange = Range.empty(translationsDeclaration.endKeyword.rangeWithoutTrivia.start);
14824
+ editRange = Range.empty(translationsDeclaration.endClause.rangeWithoutTrivia.start);
14825
14825
  } else {
14826
14826
  editText = this.hasAtLeastOneTranslatedPackageMember() ? newLine + memberTranslationsCode + newLine : newLine + memberTranslationsCode;
14827
14827
  editRange = Range.empty(translationsDeclaration.translationsKeyword.rangeWithoutTrivia.end);
@@ -14892,15 +14892,15 @@ var TranslationsGenerator4 = class _TranslationsGenerator {
14892
14892
  editText += newLine;
14893
14893
  }
14894
14894
  } else {
14895
- Debug.assert(typeTranslation.endKeyword !== void 0);
14895
+ Debug.assert(typeTranslation.endClause !== void 0);
14896
14896
  const typeKeywordLine = this.sourceFile.getPositionAt(typeTranslation.typeKeyword.rangeWithoutTrivia.start).line;
14897
- const endKeywordLine = this.sourceFile.getPositionAt(typeTranslation.endKeyword.rangeWithoutTrivia.start).line;
14897
+ const endKeywordLine = this.sourceFile.getPositionAt(typeTranslation.endClause.rangeWithoutTrivia.start).line;
14898
14898
  const endKeywordIndentation = " ".repeat(
14899
14899
  this.sourceFile.getPositionAt(typeTranslation.rangeWithoutTrivia.start).character
14900
14900
  );
14901
14901
  if (typeKeywordLine === endKeywordLine) {
14902
14902
  editText = newLine + memberTranslationsCode + newLine + endKeywordIndentation;
14903
- editRange = Range.empty(typeTranslation.endKeyword.rangeWithoutTrivia.start);
14903
+ editRange = Range.empty(typeTranslation.endClause.rangeWithoutTrivia.start);
14904
14904
  } else {
14905
14905
  editText = this.hasAtLeastOneTranslatedTypeMember(entity) ? newLine + memberTranslationsCode + newLine + endKeywordIndentation : newLine + memberTranslationsCode + endKeywordIndentation;
14906
14906
  editRange = Range.empty((typeTranslation.translatedTypeParameterClause ?? typeTranslation.translatedName).rangeWithoutTrivia.end);
@@ -11,7 +11,7 @@ import {
11
11
  WellKnownDeclarationsLoadError,
12
12
  __async,
13
13
  createTsInteropInputsForCompilation
14
- } from "./chunk-BXB62BAN.js";
14
+ } from "./chunk-WF2QIUKD.js";
15
15
 
16
16
  // source/diagnostic/DiagnosticFormatter.ts
17
17
  var DiagnosticFormatter = class _DiagnosticFormatter {
@@ -217,6 +217,19 @@ var Compiler = class {
217
217
  return launchUri;
218
218
  });
219
219
  }
220
+ static emitToMemory(analyzer, outputUri, diagnostics, taskController, emitOptions) {
221
+ return __async(this, null, function* () {
222
+ if (analyzer.compilation.mainPackage === void 0) {
223
+ diagnostics?.addDiagnostic(analyzer.createDiagnostic(
224
+ 3002 /* ProgramWithoutMainPackageCannotBeCompiled */,
225
+ void 0
226
+ ));
227
+ return void 0;
228
+ }
229
+ const emitter = new Emitter(analyzer, emitOptions);
230
+ return yield emitter.emitToMemory(outputUri, taskController);
231
+ });
232
+ }
220
233
  static emitToString(analyzer, _diagnostics, taskController, emitOptions) {
221
234
  return __async(this, null, function* () {
222
235
  if (analyzer.compilation.mainPackage === void 0) {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Compiler,
3
3
  DiagnosticFormatter
4
- } from "./chunk-YP6HREWC.js";
4
+ } from "./chunk-JEQWWCOZ.js";
5
5
  import {
6
6
  ArtelVersion,
7
7
  Cached,
@@ -16,7 +16,7 @@ import {
16
16
  __async,
17
17
  performanceMeasurementStageNames,
18
18
  performanceMeasurementStages
19
- } from "./chunk-BXB62BAN.js";
19
+ } from "./chunk-WF2QIUKD.js";
20
20
 
21
21
  // source/executor/FileSystemUri.ts
22
22
  import { platform } from "os";