@artel/artc 0.6.25203 → 0.6.25205

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 CHANGED
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CommandLineCompiler
4
- } from "./chunk-LMG4DJLB.js";
5
- import "./chunk-NZKAW6PN.js";
4
+ } from "./chunk-6YRNCKCD.js";
5
+ import "./chunk-3OCJTQAS.js";
6
6
  import {
7
7
  __async
8
- } from "./chunk-62I5JMRI.js";
8
+ } from "./chunk-W5EMX6M5.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-NZKAW6PN.js";
3
+ } from "../chunk-3OCJTQAS.js";
4
4
  import {
5
5
  AccessKind,
6
6
  AccessedMethodValueParameter,
@@ -272,8 +272,8 @@ import {
272
272
  WithDiagnostics_ok,
273
273
  builtInSystemPackagesDirectory,
274
274
  builtInSystemPackagesFileSystemTree,
275
+ camelCaseToKebabCasePreservingKeyEquality,
275
276
  collectRequiredJsLibraryConfigs,
276
- convertNameToKebabCasePreservingUniversalEquality,
277
277
  createDefaultPackageConfiguration,
278
278
  createNonEmptyArray,
279
279
  createTsInteropInputsForCompilation,
@@ -330,7 +330,7 @@ import {
330
330
  visitChildrenRecursively,
331
331
  withoutQuotes,
332
332
  yieldExecution
333
- } from "../chunk-62I5JMRI.js";
333
+ } from "../chunk-W5EMX6M5.js";
334
334
  export {
335
335
  AccessKind,
336
336
  AccessedMethodValueParameter,
@@ -598,10 +598,10 @@ export {
598
598
  WithDiagnostics_ok,
599
599
  builtInSystemPackagesDirectory,
600
600
  builtInSystemPackagesFileSystemTree,
601
+ camelCaseToKebabCasePreservingKeyEquality,
601
602
  collectRequiredJsLibraryConfigs,
602
603
  PackageConfigurationEn_exports as config,
603
604
  PackageConfigurationRu_exports as configRu,
604
- convertNameToKebabCasePreservingUniversalEquality,
605
605
  createDefaultPackageConfiguration,
606
606
  createNonEmptyArray,
607
607
  createTsInteropInputsForCompilation,
@@ -6,9 +6,9 @@ import {
6
6
  PhysicalFileSystem,
7
7
  PhysicalTypeScriptLibrariesProvider,
8
8
  PrintingDiagnosticAcceptor
9
- } from "../chunk-LMG4DJLB.js";
10
- import "../chunk-NZKAW6PN.js";
11
- import "../chunk-62I5JMRI.js";
9
+ } from "../chunk-6YRNCKCD.js";
10
+ import "../chunk-3OCJTQAS.js";
11
+ import "../chunk-W5EMX6M5.js";
12
12
  export {
13
13
  CommandLineCompiler,
14
14
  FileSystemUri,
@@ -182,7 +182,7 @@ import {
182
182
  unwrapParenthesizedExpressions,
183
183
  visitChildren,
184
184
  yieldExecution
185
- } from "../chunk-62I5JMRI.js";
185
+ } from "../chunk-W5EMX6M5.js";
186
186
 
187
187
  // source/services/CustomCommand.ts
188
188
  import * as ls from "vscode-languageserver";
@@ -1263,7 +1263,7 @@ var CompletionService = class {
1263
1263
  translationKind = 1 /* Method */;
1264
1264
  hasPrecedingKeyword = true;
1265
1265
  }
1266
- if (tokenOrKeyword.isKeyword(27 /* OnCreate */) && tokenOrKeyword.parent.kind === 128 /* ConstructorTranslation */) {
1266
+ if (tokenOrKeyword.isKeyword(27 /* Creation */) && tokenOrKeyword.parent.kind === 128 /* ConstructorTranslation */) {
1267
1267
  typeTranslation = tokenOrKeyword.parent.parent.parent;
1268
1268
  translationKind = 3 /* Constructor */;
1269
1269
  hasPrecedingKeyword = true;
@@ -1437,13 +1437,13 @@ var CompletionService = class {
1437
1437
  }
1438
1438
  const kinds = /* @__PURE__ */ new Set();
1439
1439
  if (syntaxContext.isPackageMemberDeclarationListContext) {
1440
- kinds.add(16 /* Import */).add(7 /* Run */).add(27 /* OnCreate */).add(11 /* Operation */).add(15 /* Type */).add(60 /* Get */).add(61 /* Set */).add(57 /* Translations */);
1440
+ kinds.add(16 /* Import */).add(7 /* Run */).add(27 /* Creation */).add(11 /* Operation */).add(15 /* Type */).add(60 /* Get */).add(61 /* Set */).add(57 /* Translations */);
1441
1441
  }
1442
1442
  if (syntaxContext.isPackageMemberDeclarationListContext || syntaxContext.isTypeMemberDeclarationListContext) {
1443
1443
  kinds.add(32 /* Const */).add(33 /* Hidden */).add(36 /* Abstract */).add(42 /* Static */).add(37 /* Redefinable */).add(38 /* Redefined */).add(41 /* Async */).add(34 /* Observable */).add(35 /* Consistent */);
1444
1444
  }
1445
1445
  if (syntaxContext.isTypeMemberDeclarationListContext) {
1446
- kinds.add(27 /* OnCreate */).add(11 /* Operation */).add(49 /* OnDispose */).add(60 /* Get */).add(61 /* Set */);
1446
+ kinds.add(27 /* Creation */).add(11 /* Operation */).add(49 /* Destruction */).add(60 /* Get */).add(61 /* Set */);
1447
1447
  }
1448
1448
  if (syntaxContext.isStatementContext) {
1449
1449
  kinds.add(7 /* Run */).add(31 /* For */).add(22 /* While */).add(23 /* Loop */).add(14 /* Return */).add(17 /* Error */).add(25 /* Yield */).add(47 /* Await */).add(29 /* BreakLoop */).add(30 /* ContinueLoop */).add(12 /* If */).add(45 /* Switch */).add(1 /* Let */).add(32 /* Const */).add(48 /* Dispose */).add(11 /* Operation */).add(41 /* Async */).add(39 /* Transactional */).add(40 /* Unobservable */);
@@ -2014,7 +2014,7 @@ var CompletionService = class {
2014
2014
  if (!ctx.hasPrecedingKeyword) {
2015
2015
  const keywords = [
2016
2016
  11 /* Operation */,
2017
- 27 /* OnCreate */
2017
+ 27 /* Creation */
2018
2018
  ];
2019
2019
  result = result.chain(
2020
2020
  Query.from(keywords).map(
@@ -2269,22 +2269,15 @@ var CompletionItemInfoContext = class {
2269
2269
  this.locale = locale;
2270
2270
  this._singleWordKeywordValues = _singleWordKeywordValues;
2271
2271
  }
2272
- getInsertTextForName(name, excludeBackQuotes = false) {
2273
- let result = name.preferredOriginal;
2274
- if (excludeBackQuotes) {
2275
- result = this.trimTrailingBackQuotes(result);
2272
+ getInsertTextForName(name, withoutBackQuotes = false) {
2273
+ let flags = name.flags;
2274
+ if (this._singleWordKeywordValues.has(name.originalWithoutQuotes)) {
2275
+ flags |= 16 /* EscapedKeyword */;
2276
2276
  }
2277
- if (this._singleWordKeywordValues.has(result)) {
2278
- result += "`";
2277
+ if (withoutBackQuotes) {
2278
+ flags &= ~(64 /* BackingVariableName */ | 32 /* ConflictResolvingParameterName */);
2279
2279
  }
2280
- return result;
2281
- }
2282
- trimTrailingBackQuotes(name) {
2283
- let index = name.length - 1;
2284
- while (index >= 0 && name.charAt(index) === "`") {
2285
- index--;
2286
- }
2287
- return name.substring(0, index + 1);
2280
+ return name.getPreferredOriginal(flags);
2288
2281
  }
2289
2282
  };
2290
2283
  var PackageNameSegmentCompletionItemInfo = class {
@@ -2795,8 +2788,8 @@ var AliasesSourceTypeConstructorCompletionItemInfo = class {
2795
2788
  Localization.Original.ofEntity(this.constructor_)
2796
2789
  );
2797
2790
  const displayParts = this.displayService.getConstructorDeclarationDisplayParts(constructorDeclaration);
2798
- const onCreateKeyword = this.displayService.displayKeyword(27 /* OnCreate */);
2799
- return onCreateKeyword + displayParts.valueParametersStart + displayParts.valueParameters.map((p) => p.toString()).join(displayParts.valueParameterSeparator) + displayParts.valueParametersEnd;
2791
+ const creationKeyword = this.displayService.displayKeyword(27 /* Creation */);
2792
+ return creationKeyword + displayParts.valueParametersStart + displayParts.valueParameters.map((p) => p.toString()).join(displayParts.valueParameterSeparator) + displayParts.valueParametersEnd;
2800
2793
  });
2801
2794
  }
2802
2795
  getLabel() {
@@ -2809,9 +2802,9 @@ var AliasesSourceTypeConstructorCompletionItemInfo = class {
2809
2802
  return this.label;
2810
2803
  }
2811
2804
  getInsertText() {
2812
- const onCreateKeyword = this.includeOnCreateKeyword ? this.displayService.displayKeyword(27 /* OnCreate */) : "";
2805
+ const creationKeyword = this.includeOnCreateKeyword ? this.displayService.displayKeyword(27 /* Creation */) : "";
2813
2806
  const parameters = this.constructor_.getValueParameters().map((p) => this.ctx.getInsertTextForName(p.getName(), true)).join(", ");
2814
- return `${onCreateKeyword}(${parameters})`;
2807
+ return `${creationKeyword}(${parameters})`;
2815
2808
  }
2816
2809
  getSortText() {
2817
2810
  return void 0;
@@ -3421,7 +3414,7 @@ var NodeSemanticInfoService = class {
3421
3414
  return this.ofDereferenceExpressionOperator(analyzer, tokenOrKeyword.parent, options6);
3422
3415
  } else if (tokenOrKeyword.parent.kind === 94 /* AssignmentStatement */) {
3423
3416
  return this.ofAssignmentStatementOperator(analyzer, tokenOrKeyword.parent, options6);
3424
- } else if (tokenOrKeyword.isKeyword(27 /* OnCreate */) && tokenOrKeyword.parent.kind === 45 /* TypeConstructorDeclaration */) {
3417
+ } else if (tokenOrKeyword.isKeyword(27 /* Creation */) && tokenOrKeyword.parent.kind === 45 /* TypeConstructorDeclaration */) {
3425
3418
  return this.ofTypeConstructorDeclaration(analyzer, tokenOrKeyword.parent);
3426
3419
  } else if (tokenOrKeyword.isToken(13 /* Asterisk */) && tokenOrKeyword.parent.kind === 93 /* DefaultMatchExpression */) {
3427
3420
  return this.ofDefaultMatchExpression(analyzer, tokenOrKeyword.parent);
@@ -4427,10 +4420,10 @@ function getEntitySourceLocations(analyzer, entity) {
4427
4420
  range = node.name.rangeWithoutTrivia;
4428
4421
  break;
4429
4422
  case 45 /* TypeConstructorDeclaration */:
4430
- range = node.onCreateKeyword.rangeWithoutTrivia;
4423
+ range = node.creationKeyword.rangeWithoutTrivia;
4431
4424
  break;
4432
4425
  case 46 /* TypeDestructorDeclaration */:
4433
- range = node.onDisposeKeyword.rangeWithoutTrivia;
4426
+ range = node.destructionKeyword.rangeWithoutTrivia;
4434
4427
  break;
4435
4428
  case 8 /* PackageImport */:
4436
4429
  Debug.assertNotNull(node.alias);
@@ -4763,7 +4756,7 @@ var ReferencesService = class {
4763
4756
  if (node.kind === 45 /* TypeConstructorDeclaration */ && restrictions.canBeConstructorDeclaration) {
4764
4757
  const semanticInfo = NodeSemanticInfoService.ofTypeConstructorDeclaration(analyzer, node);
4765
4758
  if (this.isReferenceToDefinition(definition, semanticInfo, onlyWithSameTranslation, allowAmbiguous)) {
4766
- result.push(new Reference(sourceFile2, node.onCreateKeyword.rangeWithoutTrivia, 0 /* Read */));
4759
+ result.push(new Reference(sourceFile2, node.creationKeyword.rangeWithoutTrivia, 0 /* Read */));
4767
4760
  }
4768
4761
  }
4769
4762
  if (node.kind === 88 /* ObjectExpression */ && restrictions.canBeObjectExpression) {
@@ -5687,9 +5680,9 @@ var SourceFileItemsService = class {
5687
5680
  case 8 /* InvalidType */:
5688
5681
  return name ?? `<${LocalizationHelper.localizeKeywordAndTakeFirst(15 /* Type */, this.locale, this.dialect)}>`;
5689
5682
  case 10 /* TypeConstructor */:
5690
- return name ?? LocalizationHelper.localizeKeywordAndTakeFirst(27 /* OnCreate */, this.locale, this.dialect);
5683
+ return name ?? LocalizationHelper.localizeKeywordAndTakeFirst(27 /* Creation */, this.locale, this.dialect);
5691
5684
  case 11 /* TypeDestructor */:
5692
- return name ?? LocalizationHelper.localizeKeywordAndTakeFirst(49 /* OnDispose */, this.locale, this.dialect);
5685
+ return name ?? LocalizationHelper.localizeKeywordAndTakeFirst(49 /* Destruction */, this.locale, this.dialect);
5693
5686
  case 9 /* Variant */:
5694
5687
  return name ?? `<${LocalizationHelper.localizeKeywordAndTakeFirst(6 /* Variant */, this.locale, this.dialect)}>`;
5695
5688
  case 18 /* TypeParameter */:
@@ -6077,10 +6070,10 @@ var SemanticTokensService = class {
6077
6070
  firstChar = name.charAt(0);
6078
6071
  } else {
6079
6072
  let firstCharIndex = 0;
6080
- while (name.preferredOriginal.charAt(firstCharIndex) === "~") {
6073
+ while (name.original.charAt(firstCharIndex) === "~") {
6081
6074
  firstCharIndex++;
6082
6075
  }
6083
- firstChar = name.preferredOriginal.charAt(firstCharIndex);
6076
+ firstChar = name.original.charAt(firstCharIndex);
6084
6077
  }
6085
6078
  return firstChar.toLowerCase() !== firstChar;
6086
6079
  }
@@ -6893,7 +6886,7 @@ var SyntaxToCode = class _SyntaxToCode {
6893
6886
  writePackageConstructorDeclaration(node) {
6894
6887
  this.writeDeclarationTags(node.tagList);
6895
6888
  this.writeDeclarationModifiers(node.modifierList);
6896
- this.writeKeyword(node.onCreateKeyword);
6889
+ this.writeKeyword(node.creationKeyword);
6897
6890
  this.writeDeclarationBody(node.body);
6898
6891
  }
6899
6892
  writePackageEntryPointDeclaration(node) {
@@ -7002,7 +6995,7 @@ var SyntaxToCode = class _SyntaxToCode {
7002
6995
  writeTypeConstructorDeclaration(node) {
7003
6996
  this.writeDeclarationTags(node.tagList);
7004
6997
  this.writeDeclarationModifiers(node.modifierList);
7005
- this.writeKeyword(node.onCreateKeyword);
6998
+ this.writeKeyword(node.creationKeyword);
7006
6999
  this.writeParameterClause(node.parameterClause);
7007
7000
  if (node.body !== void 0) {
7008
7001
  this.writeDeclarationBody(node.body);
@@ -7011,7 +7004,7 @@ var SyntaxToCode = class _SyntaxToCode {
7011
7004
  writeTypeDestructorDeclaration(node) {
7012
7005
  this.writeDeclarationTags(node.tagList);
7013
7006
  this.writeDeclarationModifiers(node.modifierList);
7014
- this.writeKeyword(node.onDisposeKeyword);
7007
+ this.writeKeyword(node.destructionKeyword);
7015
7008
  this.writeParameterClause(node.parameterClause);
7016
7009
  if (node.body !== void 0) {
7017
7010
  this.writeDeclarationBody(node.body);
@@ -7434,7 +7427,7 @@ var SyntaxToCode = class _SyntaxToCode {
7434
7427
  this.writeIndexerTranslationParameterClause(node.translatedParameterClause);
7435
7428
  }
7436
7429
  writeConstructorTranslation(node) {
7437
- this.writeKeyword(node.onCreateKeyword);
7430
+ this.writeKeyword(node.creationKeyword);
7438
7431
  this.writeTranslationParameterClause(node.sourceParameterClause);
7439
7432
  this.writeWhitespace();
7440
7433
  this.writeToken(node.minusGreaterThanToken);
@@ -10279,16 +10272,16 @@ var SyntaxFactory = class {
10279
10272
  static typeConstructorDeclaration(tags, modifiers, parameters, body) {
10280
10273
  const tagList = new TagList(tags);
10281
10274
  const modifierList = new ModifierList(modifiers);
10282
- const onCreateKeyword = this.keyword(27 /* OnCreate */);
10275
+ const creationKeyword = this.keyword(27 /* Creation */);
10283
10276
  const parameterClause = this.parameterClause(parameters);
10284
- return new TypeConstructorDeclaration(tagList, modifierList, onCreateKeyword, parameterClause, body);
10277
+ return new TypeConstructorDeclaration(tagList, modifierList, creationKeyword, parameterClause, body);
10285
10278
  }
10286
10279
  static typeDestructorDeclaration(tags, modifiers, parameters, body) {
10287
10280
  const tagList = new TagList(tags);
10288
10281
  const modifierList = new ModifierList(modifiers);
10289
- const onDisposeKeyword = this.keyword(49 /* OnDispose */);
10282
+ const destructionKeyword = this.keyword(49 /* Destruction */);
10290
10283
  const parameterClause = this.parameterClause(parameters);
10291
- return new TypeDestructorDeclaration(tagList, modifierList, onDisposeKeyword, parameterClause, body);
10284
+ return new TypeDestructorDeclaration(tagList, modifierList, destructionKeyword, parameterClause, body);
10292
10285
  }
10293
10286
  static typeIndexedGetterDeclaration(tags, modifiers, parameters, typeSpecifier, body) {
10294
10287
  const tagList = new TagList(tags);
@@ -10589,12 +10582,12 @@ var SyntaxFactory = class {
10589
10582
  );
10590
10583
  }
10591
10584
  static constructorTranslation(sourceParameters, translatedParameters) {
10592
- const onCreateKeyword = this.keyword(27 /* OnCreate */);
10585
+ const creationKeyword = this.keyword(27 /* Creation */);
10593
10586
  const sourceParameterClause = this.translationParameterClause(sourceParameters);
10594
10587
  const minusGreaterThanToken = this.token(42 /* MinusGreaterThan */);
10595
10588
  const translatedParameterClause = this.translationParameterClause(translatedParameters);
10596
10589
  return new ConstructorTranslation(
10597
- onCreateKeyword,
10590
+ creationKeyword,
10598
10591
  sourceParameterClause,
10599
10592
  minusGreaterThanToken,
10600
10593
  translatedParameterClause
@@ -11077,7 +11070,7 @@ var EntityToSyntax = class {
11077
11070
  return [];
11078
11071
  }
11079
11072
  getEntityName(entity) {
11080
- return this._localizationContext?.getEntityName(entity).preferredOriginal ?? entity.getName().preferredOriginal;
11073
+ return this._localizationContext?.getEntityName(entity).original ?? entity.getName().original;
11081
11074
  }
11082
11075
  convertType(type) {
11083
11076
  switch (type.kind) {
@@ -12267,7 +12260,7 @@ var LanguageServer = class {
12267
12260
  return this.onDeleteSourceFile(params.arguments[0]);
12268
12261
  case customCommandName.getNodeRange:
12269
12262
  Debug.assert(params.arguments?.length === 1 && isGetNodeRangeParams(params.arguments[0]));
12270
- return this.onGetNodeRage(params.arguments[0], token);
12263
+ return this.onGetNodeRange(params.arguments[0], token);
12271
12264
  case customCommandName.addPropertyAssignment:
12272
12265
  Debug.assert(params.arguments?.length === 1 && isAddPropertyAssignmentParams(params.arguments[0]));
12273
12266
  return this.onAddPropertyAssignment(params.arguments[0], token);
@@ -12305,7 +12298,7 @@ var LanguageServer = class {
12305
12298
  );
12306
12299
  return ls2.TextDocumentEdit.create(textDocument, [ls2.TextEdit.replace(range, edit.text)]);
12307
12300
  }
12308
- onGetNodeRage(params, token) {
12301
+ onGetNodeRange(params, token) {
12309
12302
  return __async(this, null, function* () {
12310
12303
  const uri = URI2.parse(params.uri);
12311
12304
  const sourceFileContext = yield this.getSourceFileContext(uri, token);
@@ -10,7 +10,7 @@ import {
10
10
  WellKnownDeclarationsLoadError,
11
11
  __async,
12
12
  createTsInteropInputsForCompilation
13
- } from "./chunk-62I5JMRI.js";
13
+ } from "./chunk-W5EMX6M5.js";
14
14
 
15
15
  // source/executor/Compiler.ts
16
16
  var Compiler = class {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Compiler
3
- } from "./chunk-NZKAW6PN.js";
3
+ } from "./chunk-3OCJTQAS.js";
4
4
  import {
5
5
  ArtelVersion,
6
6
  Cached,
@@ -14,7 +14,7 @@ import {
14
14
  __async,
15
15
  performanceMeasurementStageNames,
16
16
  performanceMeasurementStages
17
- } from "./chunk-62I5JMRI.js";
17
+ } from "./chunk-W5EMX6M5.js";
18
18
 
19
19
  // source/executor/FileSystemUri.ts
20
20
  import { platform } from "os";