@artel/artc 0.8.26001 → 0.9.26002

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 (29) hide show
  1. package/build/Cli.js +3 -3
  2. package/build/api/Api.js +2 -2
  3. package/build/api/ApiNodeJS.js +3 -3
  4. package/build/api/ApiServices.js +44 -58
  5. package/build/{chunk-6XVQ7FTB.js → chunk-6SZZ3VZ6.js} +2 -2
  6. package/build/{chunk-55LNCV63.js → chunk-LGYFTSDE.js} +478 -529
  7. package/build/{chunk-PUDLDJ7V.js → chunk-QHIZWFJU.js} +1 -1
  8. package/build/types/analysis/a/Analyzer.d.ts +6 -6
  9. package/build/types/analysis/m/Analyzer.d.ts +6 -6
  10. package/build/types/emitter/EmitterContext.d.ts +4 -4
  11. package/build/types/emitter/IrBuilderM.d.ts +1 -1
  12. package/build/types/entities/interfaces/StructuredTypeEntity.d.ts +1 -1
  13. package/build/types/entities/source/a/SourceStructuredTypeEntity.d.ts +5 -5
  14. package/build/types/entities/source/m/SourceStructuredTypeEntity.d.ts +6 -6
  15. package/build/types/entities/translated/TranslatedStructuredTypeEntity.d.ts +4 -4
  16. package/build/types/services/m/NodeSemanticInfo.d.ts +1 -1
  17. package/build/types/ts-interop/TypeEntities.d.ts +5 -5
  18. package/build/types/types/AliasType.d.ts +2 -4
  19. package/build/types/types/FunctionType.d.ts +2 -4
  20. package/build/types/types/IntersectionType.d.ts +2 -2
  21. package/build/types/types/ParameterType.d.ts +2 -3
  22. package/build/types/types/ReducedType.d.ts +2 -4
  23. package/build/types/types/StructuredType.d.ts +3 -5
  24. package/build/types/types/SubstitutionStubType.d.ts +2 -2
  25. package/build/types/types/Type.d.ts +2 -2
  26. package/build/types/types/UnionType.d.ts +2 -2
  27. package/build/types/types/UnresolvedType.d.ts +2 -2
  28. package/build/types/types/VariantType.d.ts +2 -4
  29. package/package.json +2 -2
package/build/Cli.js CHANGED
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CommandLineCompiler
4
- } from "./chunk-6XVQ7FTB.js";
5
- import "./chunk-PUDLDJ7V.js";
4
+ } from "./chunk-6SZZ3VZ6.js";
5
+ import "./chunk-QHIZWFJU.js";
6
6
  import {
7
7
  __async
8
- } from "./chunk-55LNCV63.js";
8
+ } from "./chunk-LGYFTSDE.js";
9
9
 
10
10
  // source/Cli.ts
11
11
  function main() {
package/build/api/Api.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Compiler
3
- } from "../chunk-PUDLDJ7V.js";
3
+ } from "../chunk-QHIZWFJU.js";
4
4
  import {
5
5
  AccessKind,
6
6
  AccessedFunction_entity,
@@ -312,7 +312,7 @@ import {
312
312
  withoutQuotes,
313
313
  withoutTemplateQuotes,
314
314
  yieldTask
315
- } from "../chunk-55LNCV63.js";
315
+ } from "../chunk-LGYFTSDE.js";
316
316
  export {
317
317
  AccessKind,
318
318
  AccessedFunction_entity,
@@ -6,9 +6,9 @@ import {
6
6
  PhysicalFileSystem,
7
7
  PhysicalTypeScriptLibrariesProvider,
8
8
  PrintingDiagnosticAcceptor
9
- } from "../chunk-6XVQ7FTB.js";
10
- import "../chunk-PUDLDJ7V.js";
11
- import "../chunk-55LNCV63.js";
9
+ } from "../chunk-6SZZ3VZ6.js";
10
+ import "../chunk-QHIZWFJU.js";
11
+ import "../chunk-LGYFTSDE.js";
12
12
  export {
13
13
  CommandLineCompiler,
14
14
  FileSystemUri,
@@ -132,7 +132,7 @@ import {
132
132
  traverseTreeAsync,
133
133
  traverseTreeAsync2,
134
134
  yieldTask
135
- } from "../chunk-55LNCV63.js";
135
+ } from "../chunk-LGYFTSDE.js";
136
136
 
137
137
  // source/services/common/Types.ts
138
138
  import * as ls from "vscode-languageserver";
@@ -1834,7 +1834,7 @@ var CompletionServiceA = class {
1834
1834
  return result;
1835
1835
  }
1836
1836
  prioritizeItemsFromUnionType(items, type) {
1837
- const constituentTypeEntities = Query.from(type.unaliasedFlattenedTypes).mapAndFilter((t) => t.getEntity()?.getOriginalEntity()).uniqueToSet();
1837
+ const constituentTypeEntities = Query.from(type.unaliasedFlattenedTypes).mapAndFilter((t) => t.entity?.getOriginalEntity()).uniqueToSet();
1838
1838
  for (const item of items) {
1839
1839
  if (item.kind === "named-type" && constituentTypeEntities.has(item.entity.getOriginalEntity())) {
1840
1840
  item.prefix = "*";
@@ -2616,9 +2616,8 @@ var NamedTypeCompletionItemInfo = class {
2616
2616
  return 16 /* Variant */;
2617
2617
  case 2 /* Parameter */:
2618
2618
  return 17 /* TypeParameter */;
2619
- case 1 /* Structured */: {
2620
- const structuredTypeKind = this.entity.getStructuredTypeKind();
2621
- switch (structuredTypeKind) {
2619
+ case 1 /* Structured */:
2620
+ switch (this.entity.structuredTypeKind) {
2622
2621
  case 0 /* Class */:
2623
2622
  return 13 /* Class */;
2624
2623
  case 1 /* Structure */:
@@ -2626,9 +2625,8 @@ var NamedTypeCompletionItemInfo = class {
2626
2625
  case 2 /* Aspect */:
2627
2626
  return 15 /* Aspect */;
2628
2627
  default:
2629
- Debug.never(structuredTypeKind);
2628
+ Debug.never(this.entity.structuredTypeKind);
2630
2629
  }
2631
- }
2632
2630
  case 4 /* Alias */:
2633
2631
  return 18 /* AliasType */;
2634
2632
  case 5 /* Reduced */:
@@ -2821,9 +2819,8 @@ var TranslationsSourcePackageTypeCompletionItemInfo = class {
2821
2819
  switch (this.typeEntity.typeEntityKind) {
2822
2820
  case 3 /* Variant */:
2823
2821
  return 16 /* Variant */;
2824
- case 1 /* Structured */: {
2825
- const structuredTypeKind = this.typeEntity.getStructuredTypeKind();
2826
- switch (structuredTypeKind) {
2822
+ case 1 /* Structured */:
2823
+ switch (this.typeEntity.structuredTypeKind) {
2827
2824
  case 0 /* Class */:
2828
2825
  return 13 /* Class */;
2829
2826
  case 1 /* Structure */:
@@ -2831,9 +2828,8 @@ var TranslationsSourcePackageTypeCompletionItemInfo = class {
2831
2828
  case 2 /* Aspect */:
2832
2829
  return 15 /* Aspect */;
2833
2830
  default:
2834
- Debug.never(structuredTypeKind);
2831
+ Debug.never(this.typeEntity.structuredTypeKind);
2835
2832
  }
2836
- }
2837
2833
  case 4 /* Alias */:
2838
2834
  return 18 /* AliasType */;
2839
2835
  case 5 /* Reduced */:
@@ -2853,7 +2849,7 @@ var TranslationsSourcePackageTypeCompletionItemInfo = class {
2853
2849
  if (this.typeEntity.typeEntityKind === 4 /* Alias */) {
2854
2850
  const aliasedType = this.typeEntity.getAliasedType().cycleFree;
2855
2851
  if (aliasedType.kind === "function") {
2856
- const parameters = aliasedType.getEntity().getParameters().map((p) => this.ctx.getInsertTextForName(p.getName())).join(", ");
2852
+ const parameters = aliasedType.entity.getParameters().map((p) => this.ctx.getInsertTextForName(p.getName())).join(", ");
2857
2853
  result = `${result}(${parameters})`;
2858
2854
  }
2859
2855
  }
@@ -3973,9 +3969,8 @@ var NodeSemanticInfoServiceA = class {
3973
3969
  case "package-type-access":
3974
3970
  if (meaning.suitableTypes.length > 0) {
3975
3971
  const targets = meaning.suitableTypes.map((c) => {
3976
- const entity = c.getEntity();
3977
- if (entity !== void 0) {
3978
- return new EntityReferenceTarget(entity, 0 /* Get */);
3972
+ if (c.entity !== void 0) {
3973
+ return new EntityReferenceTarget(c.entity, 0 /* Get */);
3979
3974
  } else {
3980
3975
  return void 0;
3981
3976
  }
@@ -4180,9 +4175,8 @@ var NodeSemanticInfoServiceA = class {
4180
4175
  case "type-access":
4181
4176
  if (meaning.suitableTypes.length > 0) {
4182
4177
  const targets = meaning.suitableTypes.map((c) => {
4183
- const entity = c.getEntity();
4184
- if (entity !== void 0) {
4185
- return new EntityReferenceTarget(entity, 0 /* Get */);
4178
+ if (c.entity !== void 0) {
4179
+ return new EntityReferenceTarget(c.entity, 0 /* Get */);
4186
4180
  } else {
4187
4181
  return void 0;
4188
4182
  }
@@ -5127,7 +5121,7 @@ var DefinitionService = class {
5127
5121
  }
5128
5122
  return void 0;
5129
5123
  case "type-context": {
5130
- const entity = target.type.getEntity();
5124
+ const entity = target.type.entity;
5131
5125
  if (entity !== void 0) {
5132
5126
  return getEntitySourceLocations(analyzer, entity);
5133
5127
  }
@@ -5156,7 +5150,7 @@ var DefinitionService = class {
5156
5150
  case "package-name-tree-node":
5157
5151
  return target.node.package;
5158
5152
  case "type-context":
5159
- return target.type.getEntity();
5153
+ return target.type.entity;
5160
5154
  case "type-indexer":
5161
5155
  return target.indexer.getEntity();
5162
5156
  default:
@@ -5234,11 +5228,11 @@ var DefinitionService = class {
5234
5228
  }
5235
5229
  const result = new Array();
5236
5230
  for (const type2 of types) {
5237
- const entity = type2.getEntity();
5231
+ const entity = type2.entity;
5238
5232
  if (entity !== void 0) {
5239
5233
  result.push(entity);
5240
5234
  if (isNamedTypeEntity(entity)) {
5241
- const substitutions = type2.getSubstitutions();
5235
+ const substitutions = type2.substitutions;
5242
5236
  if (substitutions.size > 0) {
5243
5237
  const typesOfTypeArgument = Query.from(substitutions.getTypes()).flatMap((t) => this.getEntitiesThatMakeUpTheType(t)).toArray();
5244
5238
  result.push(...typesOfTypeArgument);
@@ -5643,9 +5637,8 @@ var ReferencesSearchUtils = class {
5643
5637
  case "match-result-value-parameter":
5644
5638
  return new DefinitionInfo(t.parameter.entity, 0 /* Read */);
5645
5639
  case "type-context": {
5646
- const entity = t.type.getEntity();
5647
- if (entity !== void 0) {
5648
- return new DefinitionInfo(entity, 0 /* Read */);
5640
+ if (t.type.entity !== void 0) {
5641
+ return new DefinitionInfo(t.type.entity, 0 /* Read */);
5649
5642
  }
5650
5643
  return void 0;
5651
5644
  }
@@ -6030,9 +6023,8 @@ var NodeSemanticInfoServiceM = class {
6030
6023
  case "package-type-access":
6031
6024
  if (meaning.suitableTypes.length > 0) {
6032
6025
  const targets = meaning.suitableTypes.map((c) => {
6033
- const entity = c.getEntity();
6034
- if (entity !== void 0) {
6035
- return new EntityReferenceTarget(entity, 0 /* Get */);
6026
+ if (c.entity !== void 0) {
6027
+ return new EntityReferenceTarget(c.entity, 0 /* Get */);
6036
6028
  } else {
6037
6029
  return void 0;
6038
6030
  }
@@ -6289,9 +6281,8 @@ var NodeSemanticInfoServiceM = class {
6289
6281
  case "type-access":
6290
6282
  if (meaning.suitableTypes.length > 0) {
6291
6283
  const targets = meaning.suitableTypes.map((c) => {
6292
- const entity = c.getEntity();
6293
- if (entity !== void 0) {
6294
- return new EntityReferenceTarget(entity, 0 /* Get */);
6284
+ if (c.entity !== void 0) {
6285
+ return new EntityReferenceTarget(c.entity, 0 /* Get */);
6295
6286
  } else {
6296
6287
  return void 0;
6297
6288
  }
@@ -11357,8 +11348,7 @@ var EntityToSyntax = class {
11357
11348
  baseTypes.push(...baseAspectTypes.map((t) => this.convertType(t)).filter((t) => t.kind === 10 /* NamedTypeSpecifier */));
11358
11349
  }
11359
11350
  const members = this.convertTypeEntityMembers(entity.getMembers());
11360
- const structuredTypeKind = entity.getStructuredTypeKind();
11361
- switch (structuredTypeKind) {
11351
+ switch (entity.structuredTypeKind) {
11362
11352
  case 0 /* Class */:
11363
11353
  return SyntaxFactory.packageClassDeclaration(tags, modifiers, name, typeParameters, baseTypes, members);
11364
11354
  case 1 /* Structure */:
@@ -11366,7 +11356,7 @@ var EntityToSyntax = class {
11366
11356
  case 2 /* Aspect */:
11367
11357
  return SyntaxFactory.packageAspectDeclaration(tags, modifiers, name, typeParameters, baseTypes, members);
11368
11358
  default:
11369
- Debug.never(structuredTypeKind);
11359
+ Debug.never(entity.structuredTypeKind);
11370
11360
  }
11371
11361
  }
11372
11362
  convertPackageStructuredTypeModifiers(entity) {
@@ -11869,42 +11859,42 @@ var EntityToSyntax = class {
11869
11859
  }
11870
11860
  }
11871
11861
  convertStructuredType(type) {
11872
- const entity = type.getEntity();
11862
+ const entity = type.entity;
11873
11863
  if (entity.subkind === "package" || entity.subkind === "local") {
11874
11864
  const name = this.getEntityName(entity);
11875
- return this.createNamedTypeSpecifier(name, type.getSubstitutions());
11865
+ return this.createNamedTypeSpecifier(name, type.substitutions);
11876
11866
  } else {
11877
11867
  const declaration = this.convertAnonymousStructuredType(entity);
11878
11868
  return SyntaxFactory.anonymousTypeSpecifier(declaration);
11879
11869
  }
11880
11870
  }
11881
11871
  convertVariantType(type) {
11882
- const entity = type.getEntity();
11872
+ const entity = type.entity;
11883
11873
  if (entity.subkind === "package") {
11884
11874
  const name = this.getEntityName(entity);
11885
- return this.createNamedTypeSpecifier(name, type.getSubstitutions());
11875
+ return this.createNamedTypeSpecifier(name, type.substitutions);
11886
11876
  } else {
11887
11877
  return SyntaxFactory.anonymousTypeSpecifier(SyntaxFactory.anonymousClassDeclaration(void 0, []));
11888
11878
  }
11889
11879
  }
11890
11880
  convertFunctionType(type) {
11891
- const entity = type.getEntity();
11881
+ const entity = type.entity;
11892
11882
  const parameters = this.convertParameters(entity.getParameters());
11893
11883
  const returnType = this.convertTypeIfNotNullType(entity.getReturnType());
11894
11884
  const declaration = SyntaxFactory.anonymousFunctionTypeDeclaration(entity.isAsync(), parameters, returnType);
11895
11885
  return SyntaxFactory.anonymousTypeSpecifier(declaration);
11896
11886
  }
11897
11887
  convertAliasType(type) {
11898
- const name = this.getEntityName(type.getEntity());
11899
- return this.createNamedTypeSpecifier(name, type.getSubstitutions());
11888
+ const name = this.getEntityName(type.entity);
11889
+ return this.createNamedTypeSpecifier(name, type.substitutions);
11900
11890
  }
11901
11891
  convertReducedType(type) {
11902
- const name = this.getEntityName(type.getEntity());
11903
- return this.createNamedTypeSpecifier(name, type.getSubstitutions());
11892
+ const name = this.getEntityName(type.entity);
11893
+ return this.createNamedTypeSpecifier(name, type.substitutions);
11904
11894
  }
11905
11895
  convertParameterType(type) {
11906
- const name = this.getEntityName(type.getEntity());
11907
- return this.createNamedTypeSpecifier(name, type.getSubstitutions());
11896
+ const name = this.getEntityName(type.entity);
11897
+ return this.createNamedTypeSpecifier(name, type.substitutions);
11908
11898
  }
11909
11899
  convertUnionType(type) {
11910
11900
  if (type.originalTypes.length === 2) {
@@ -14326,7 +14316,7 @@ var CompletionServiceM = class {
14326
14316
  return result;
14327
14317
  }
14328
14318
  prioritizeItemsFromUnionType(items, type) {
14329
- const constituentTypeEntities = Query.from(type.unaliasedFlattenedTypes).mapAndFilter((t) => t.getEntity()?.getOriginalEntity()).uniqueToSet();
14319
+ const constituentTypeEntities = Query.from(type.unaliasedFlattenedTypes).mapAndFilter((t) => t.entity?.getOriginalEntity()).uniqueToSet();
14330
14320
  for (const item of items) {
14331
14321
  if (item.kind === "named-type" && constituentTypeEntities.has(item.entity.getOriginalEntity())) {
14332
14322
  item.prefix = "*";
@@ -15129,9 +15119,8 @@ var NamedTypeCompletionItemInfo2 = class {
15129
15119
  return 16 /* Variant */;
15130
15120
  case 2 /* Parameter */:
15131
15121
  return 17 /* TypeParameter */;
15132
- case 1 /* Structured */: {
15133
- const structuredTypeKind = this.entity.getStructuredTypeKind();
15134
- switch (structuredTypeKind) {
15122
+ case 1 /* Structured */:
15123
+ switch (this.entity.structuredTypeKind) {
15135
15124
  case 0 /* Class */:
15136
15125
  return 13 /* Class */;
15137
15126
  case 1 /* Structure */:
@@ -15139,9 +15128,8 @@ var NamedTypeCompletionItemInfo2 = class {
15139
15128
  case 2 /* Aspect */:
15140
15129
  return 15 /* Aspect */;
15141
15130
  default:
15142
- Debug.never(structuredTypeKind);
15131
+ Debug.never(this.entity.structuredTypeKind);
15143
15132
  }
15144
- }
15145
15133
  case 4 /* Alias */:
15146
15134
  return 18 /* AliasType */;
15147
15135
  case 5 /* Reduced */:
@@ -15352,9 +15340,8 @@ var TranslationsSourcePackageTypeCompletionItemInfo2 = class {
15352
15340
  switch (this.typeEntity.typeEntityKind) {
15353
15341
  case 3 /* Variant */:
15354
15342
  return 16 /* Variant */;
15355
- case 1 /* Structured */: {
15356
- const structuredTypeKind = this.typeEntity.getStructuredTypeKind();
15357
- switch (structuredTypeKind) {
15343
+ case 1 /* Structured */:
15344
+ switch (this.typeEntity.structuredTypeKind) {
15358
15345
  case 0 /* Class */:
15359
15346
  return 13 /* Class */;
15360
15347
  case 1 /* Structure */:
@@ -15362,9 +15349,8 @@ var TranslationsSourcePackageTypeCompletionItemInfo2 = class {
15362
15349
  case 2 /* Aspect */:
15363
15350
  return 15 /* Aspect */;
15364
15351
  default:
15365
- Debug.never(structuredTypeKind);
15352
+ Debug.never(this.typeEntity.structuredTypeKind);
15366
15353
  }
15367
- }
15368
15354
  case 4 /* Alias */:
15369
15355
  return 18 /* AliasType */;
15370
15356
  case 5 /* Reduced */:
@@ -15384,7 +15370,7 @@ var TranslationsSourcePackageTypeCompletionItemInfo2 = class {
15384
15370
  if (this.typeEntity.typeEntityKind === 4 /* Alias */) {
15385
15371
  const aliasedType = this.typeEntity.getAliasedType().cycleFree;
15386
15372
  if (aliasedType.kind === "function") {
15387
- const parameters = aliasedType.getEntity().getParameters().map((p) => this.ctx.getInsertTextForName(p.getName())).join(", ");
15373
+ const parameters = aliasedType.entity.getParameters().map((p) => this.ctx.getInsertTextForName(p.getName())).join(", ");
15388
15374
  result = `${result}(${parameters})`;
15389
15375
  }
15390
15376
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Compiler
3
- } from "./chunk-PUDLDJ7V.js";
3
+ } from "./chunk-QHIZWFJU.js";
4
4
  import {
5
5
  ArtelVersion,
6
6
  Cached,
@@ -16,7 +16,7 @@ import {
16
16
  __async,
17
17
  performanceMeasurementStageNames,
18
18
  performanceMeasurementStages
19
- } from "./chunk-55LNCV63.js";
19
+ } from "./chunk-LGYFTSDE.js";
20
20
 
21
21
  // source/executor/FileSystemUri.ts
22
22
  import { platform } from "os";