@artel/artc 0.6.25237 → 0.6.25239

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-EKYI2NSW.js";
5
- import "./chunk-VCUYTN3R.js";
4
+ } from "./chunk-UOGTFZ6X.js";
5
+ import "./chunk-TPCKKHPK.js";
6
6
  import {
7
7
  __async
8
- } from "./chunk-PDVQZURU.js";
8
+ } from "./chunk-3VRPBHJN.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-VCUYTN3R.js";
3
+ } from "../chunk-TPCKKHPK.js";
4
4
  import {
5
5
  AccessKind,
6
6
  AccessedFunctionValueParameter,
@@ -208,6 +208,8 @@ import {
208
208
  TargetPlatformConfig,
209
209
  TargetTypeHint,
210
210
  TextFile,
211
+ TextTranslationPackage,
212
+ TextTranslationPackageConfiguration,
211
213
  ThrottledCancellationToken,
212
214
  Token2 as Token,
213
215
  TokenKind,
@@ -320,7 +322,7 @@ import {
320
322
  withoutQuotes,
321
323
  withoutTemplateQuotes,
322
324
  yieldExecution
323
- } from "../chunk-PDVQZURU.js";
325
+ } from "../chunk-3VRPBHJN.js";
324
326
  export {
325
327
  AccessKind,
326
328
  AccessedFunctionValueParameter,
@@ -526,6 +528,8 @@ export {
526
528
  TargetPlatformConfig,
527
529
  TargetTypeHint,
528
530
  TextFile,
531
+ TextTranslationPackage,
532
+ TextTranslationPackageConfiguration,
529
533
  ThrottledCancellationToken,
530
534
  Token,
531
535
  TranslatedNamedPackageMember,
@@ -6,9 +6,9 @@ import {
6
6
  PhysicalFileSystem,
7
7
  PhysicalTypeScriptLibrariesProvider,
8
8
  PrintingDiagnosticAcceptor
9
- } from "../chunk-EKYI2NSW.js";
10
- import "../chunk-VCUYTN3R.js";
11
- import "../chunk-PDVQZURU.js";
9
+ } from "../chunk-UOGTFZ6X.js";
10
+ import "../chunk-TPCKKHPK.js";
11
+ import "../chunk-3VRPBHJN.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-PDVQZURU.js";
185
+ } from "../chunk-3VRPBHJN.js";
186
186
 
187
187
  // source/services/CustomCommand.ts
188
188
  import * as ls from "vscode-languageserver";
@@ -387,8 +387,8 @@ function isSubprogramDeclaration(node) {
387
387
  case 53 /* FieldGetterDeclaration */:
388
388
  case 54 /* FieldSetterDeclaration */:
389
389
  case 56 /* NestedFunctionDeclaration */:
390
- case 65 /* FunctionBlockLiteral */:
391
- case 72 /* FunctionLiteral */:
390
+ case 66 /* FunctionBlockLiteral */:
391
+ case 65 /* FunctionLiteral */:
392
392
  return true;
393
393
  default:
394
394
  Debug.typeIsAssignableTo();
@@ -2076,14 +2076,14 @@ var SyntaxToCode = class _SyntaxToCode {
2076
2076
  [62 /* AssumptionExpression */]: this.prototype.writeNodeDefault,
2077
2077
  [63 /* AsExpression */]: this.prototype.writeNodeDefault,
2078
2078
  [64 /* BinaryExpression */]: this.prototype.writeNodeDefault,
2079
- [65 /* FunctionBlockLiteral */]: this.prototype.writeNodeDefault,
2080
- [66 /* ArgumentList */]: this.prototype.writeNodeDefault,
2081
- [67 /* CallExpression */]: this.prototype.writeNodeDefault,
2082
- [68 /* AutotypeCallExpression */]: this.prototype.writeNodeDefault,
2083
- [69 /* IndexedAccessExpression */]: this.prototype.writeNodeDefault,
2084
- [70 /* InvalidExpression */]: this.prototype.writeNodeDefault,
2085
- [71 /* IsExpression */]: this.prototype.writeNodeDefault,
2086
- [72 /* FunctionLiteral */]: this.prototype.writeNodeDefault,
2079
+ [66 /* FunctionBlockLiteral */]: this.prototype.writeNodeDefault,
2080
+ [67 /* ArgumentList */]: this.prototype.writeNodeDefault,
2081
+ [68 /* CallExpression */]: this.prototype.writeNodeDefault,
2082
+ [69 /* AutotypeCallExpression */]: this.prototype.writeNodeDefault,
2083
+ [70 /* IndexedAccessExpression */]: this.prototype.writeNodeDefault,
2084
+ [71 /* InvalidExpression */]: this.prototype.writeNodeDefault,
2085
+ [72 /* IsExpression */]: this.prototype.writeNodeDefault,
2086
+ [65 /* FunctionLiteral */]: this.prototype.writeNodeDefault,
2087
2087
  [73 /* ParenthesizedExpression */]: this.prototype.writeNodeDefault,
2088
2088
  [74 /* ConditionalExpression */]: this.prototype.writeNodeDefault,
2089
2089
  [75 /* PrefixUnaryExpression */]: this.prototype.writeNodeDefault,
@@ -2825,11 +2825,11 @@ var ValueArgumentFactory = class _ValueArgumentFactory {
2825
2825
  var SignatureForNode = class _SignatureForNode {
2826
2826
  static getSignaturesForNode(analyzer, node) {
2827
2827
  switch (node.kind) {
2828
- case 67 /* CallExpression */:
2828
+ case 68 /* CallExpression */:
2829
2829
  return _SignatureForNode.getSignaturesForCallExpression(analyzer, node);
2830
- case 68 /* AutotypeCallExpression */:
2830
+ case 69 /* AutotypeCallExpression */:
2831
2831
  return _SignatureForNode.getSignaturesForAutotypeCallExpression(analyzer, node);
2832
- case 69 /* IndexedAccessExpression */:
2832
+ case 70 /* IndexedAccessExpression */:
2833
2833
  return _SignatureForNode.getSignaturesForIndexedAccessExpression(analyzer, node);
2834
2834
  case 147 /* Tag */:
2835
2835
  return _SignatureForNode.getSignaturesForTag(analyzer, node);
@@ -2969,7 +2969,7 @@ var SimplifiedOverloadResolver = class _SimplifiedOverloadResolver {
2969
2969
  result = false;
2970
2970
  break;
2971
2971
  }
2972
- if (argument.expression === void 0 || argument.expression.kind === 70 /* InvalidExpression */) {
2972
+ if (argument.expression === void 0 || argument.expression.kind === 71 /* InvalidExpression */) {
2973
2973
  continue;
2974
2974
  }
2975
2975
  const targetParameterType = targetParameter.getType();
@@ -3273,7 +3273,7 @@ var CompletionService = class {
3273
3273
  );
3274
3274
  if (segmentIndex < resolutionResult.resolvedQualifiers.length) {
3275
3275
  let completionInIsOrAsExpressionInfo;
3276
- if (namedTypeSpecifier.parent.kind === 71 /* IsExpression */ || namedTypeSpecifier.parent.kind === 63 /* AsExpression */) {
3276
+ if (namedTypeSpecifier.parent.kind === 72 /* IsExpression */ || namedTypeSpecifier.parent.kind === 63 /* AsExpression */) {
3277
3277
  completionInIsOrAsExpressionInfo = {
3278
3278
  expressionType: this._analyzer.type.ofExpression(namedTypeSpecifier.parent.expression)
3279
3279
  };
@@ -3345,7 +3345,7 @@ var CompletionService = class {
3345
3345
  }
3346
3346
  if (syntaxContext.isUnqualifiedTypeContext !== void 0) {
3347
3347
  let completionInIsOrAsExpressionInfo;
3348
- if (tokenOrKeyword.parent.kind === 71 /* IsExpression */ || tokenOrKeyword.parent.kind === 63 /* AsExpression */) {
3348
+ if (tokenOrKeyword.parent.kind === 72 /* IsExpression */ || tokenOrKeyword.parent.kind === 63 /* AsExpression */) {
3349
3349
  completionInIsOrAsExpressionInfo = {
3350
3350
  expressionType: this._analyzer.type.ofExpression(tokenOrKeyword.parent.expression)
3351
3351
  };
@@ -3494,11 +3494,11 @@ var CompletionService = class {
3494
3494
  let signatures;
3495
3495
  let valueArguments;
3496
3496
  switch (role.argumentList.parent.kind) {
3497
- case 67 /* CallExpression */:
3497
+ case 68 /* CallExpression */:
3498
3498
  signatures = SignatureForNode.getSignaturesForCallExpression(this._analyzer, role.argumentList.parent);
3499
3499
  valueArguments = ValueArgumentFactory.createValueArgumentsOfCallExpression(role.argumentList.parent);
3500
3500
  break;
3501
- case 68 /* AutotypeCallExpression */:
3501
+ case 69 /* AutotypeCallExpression */:
3502
3502
  signatures = SignatureForNode.getSignaturesForAutotypeCallExpression(this._analyzer, role.argumentList.parent);
3503
3503
  valueArguments = ValueArgumentFactory.createValueArgumentsOfAutotypeCallExpression(
3504
3504
  role.argumentList.parent
@@ -3508,7 +3508,7 @@ var CompletionService = class {
3508
3508
  signatures = SignatureForNode.getSignaturesForTag(this._analyzer, role.argumentList.parent);
3509
3509
  valueArguments = ValueArgumentFactory.createValueArgumentsOfTag(role.argumentList.parent);
3510
3510
  break;
3511
- case 69 /* IndexedAccessExpression */:
3511
+ case 70 /* IndexedAccessExpression */:
3512
3512
  signatures = SignatureForNode.getSignaturesForIndexedAccessExpression(
3513
3513
  this._analyzer,
3514
3514
  role.argumentList.parent
@@ -3705,7 +3705,7 @@ var CompletionService = class {
3705
3705
  if (syntaxContext.isUnqualifiedTypeContext?.allowsAnonymousTypes === true) {
3706
3706
  kinds.add(5 /* PlainObject */).add(4 /* Object */).add(6 /* Variant */).add(3 /* Aspect */).add(12 /* Function */).add(40 /* Async */);
3707
3707
  }
3708
- if (positionDescription.kind === "after-token-or-keyword" && positionDescription.tokenOrKeyword.isKeyword(40 /* Async */) && (positionDescription.tokenOrKeyword.parent.kind === 56 /* NestedFunctionDeclaration */ || positionDescription.tokenOrKeyword.parent.kind === 72 /* FunctionLiteral */ || positionDescription.tokenOrKeyword.parent.kind === 27 /* FunctionTypeDeclarationBody */)) {
3708
+ if (positionDescription.kind === "after-token-or-keyword" && positionDescription.tokenOrKeyword.isKeyword(40 /* Async */) && (positionDescription.tokenOrKeyword.parent.kind === 56 /* NestedFunctionDeclaration */ || positionDescription.tokenOrKeyword.parent.kind === 65 /* FunctionLiteral */ || positionDescription.tokenOrKeyword.parent.kind === 27 /* FunctionTypeDeclarationBody */)) {
3709
3709
  kinds.add(12 /* Function */);
3710
3710
  }
3711
3711
  return Query.from(kinds.values()).map(
@@ -4413,7 +4413,7 @@ function getRightmostChildExcludingValidEmptyNodes(node) {
4413
4413
  }
4414
4414
  function isInvalidNode(node) {
4415
4415
  switch (node.kind) {
4416
- case 70 /* InvalidExpression */:
4416
+ case 71 /* InvalidExpression */:
4417
4417
  case 41 /* InvalidPackageMemberDeclaration */:
4418
4418
  case 111 /* InvalidStatement */:
4419
4419
  case 55 /* InvalidTypeMemberDeclaration */:
@@ -5359,11 +5359,11 @@ var SyntaxContextFactory = class {
5359
5359
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.expression);
5360
5360
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5361
5361
  }
5362
- if (tokenOrKeyword.parent.kind === 67 /* CallExpression */) {
5362
+ if (tokenOrKeyword.parent.kind === 68 /* CallExpression */) {
5363
5363
  const expressionRole = new ExpressionRole_argument(tokenOrKeyword.parent.argumentList, 0);
5364
5364
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5365
5365
  }
5366
- if (tokenOrKeyword.parent.kind === 68 /* AutotypeCallExpression */) {
5366
+ if (tokenOrKeyword.parent.kind === 69 /* AutotypeCallExpression */) {
5367
5367
  const expressionRole = new ExpressionRole_argument(tokenOrKeyword.parent.argumentList, 0);
5368
5368
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5369
5369
  }
@@ -5379,7 +5379,7 @@ var SyntaxContextFactory = class {
5379
5379
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5380
5380
  }
5381
5381
  }
5382
- if (tokenOrKeyword.isToken(46 /* OpenSquareBracket */) && tokenOrKeyword.parent.kind === 69 /* IndexedAccessExpression */) {
5382
+ if (tokenOrKeyword.isToken(46 /* OpenSquareBracket */) && tokenOrKeyword.parent.kind === 70 /* IndexedAccessExpression */) {
5383
5383
  const expressionRole = new ExpressionRole_argument(tokenOrKeyword.parent.argumentList, 0);
5384
5384
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5385
5385
  }
@@ -5388,7 +5388,7 @@ var SyntaxContextFactory = class {
5388
5388
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5389
5389
  }
5390
5390
  if (tokenOrKeyword.isToken(25 /* Comma */)) {
5391
- if (tokenOrKeyword.parent.kind === 66 /* ArgumentList */) {
5391
+ if (tokenOrKeyword.parent.kind === 67 /* ArgumentList */) {
5392
5392
  const argumentList = tokenOrKeyword.parent;
5393
5393
  let index = 0;
5394
5394
  for (const element of argumentList.elements) {
@@ -5605,7 +5605,7 @@ var SyntaxContextFactory = class {
5605
5605
  if (tokenOrKeyword.isToken(58 /* Equals */) && tokenOrKeyword.parent.kind === 20 /* PackageAliasTypeDeclaration */) {
5606
5606
  return { allowsAnonymousTypes: false };
5607
5607
  }
5608
- if (tokenOrKeyword.isKeyword(14 /* Is */) && tokenOrKeyword.parent.kind === 71 /* IsExpression */) {
5608
+ if (tokenOrKeyword.isKeyword(14 /* Is */) && tokenOrKeyword.parent.kind === 72 /* IsExpression */) {
5609
5609
  return { allowsAnonymousTypes: true };
5610
5610
  }
5611
5611
  if (tokenOrKeyword.isKeyword(42 /* As */) && tokenOrKeyword.parent.kind === 63 /* AsExpression */) {
@@ -5803,7 +5803,7 @@ var NodeSemanticInfoService = class {
5803
5803
  static ofTokenOrKeyword(analyzer, tokenOrKeyword, options6) {
5804
5804
  if (isIdentifier(tokenOrKeyword.value)) {
5805
5805
  return this.ofNonKeywordIdentifier(analyzer, tokenOrKeyword.value, options6);
5806
- } else if (tokenOrKeyword.isKeyword(2 /* Autotype */) && tokenOrKeyword.parent.kind === 68 /* AutotypeCallExpression */) {
5806
+ } else if (tokenOrKeyword.isKeyword(2 /* Autotype */) && tokenOrKeyword.parent.kind === 69 /* AutotypeCallExpression */) {
5807
5807
  return this.ofAutotypeCallExpression(analyzer, tokenOrKeyword.parent, options6);
5808
5808
  } else if (tokenOrKeyword.parent.kind === 75 /* PrefixUnaryExpression */) {
5809
5809
  return this.ofPrefixUnaryExpressionOperator(analyzer, tokenOrKeyword.parent, options6);
@@ -5825,7 +5825,7 @@ var NodeSemanticInfoService = class {
5825
5825
  return this.ofBaseExpression(analyzer, tokenOrKeyword.parent, options6);
5826
5826
  } else if ((tokenOrKeyword.isToken(46 /* OpenSquareBracket */) || tokenOrKeyword.isToken(23 /* CloseSquareBracket */)) && tokenOrKeyword.parent.kind === 47 /* IndexParameterClause */) {
5827
5827
  return this.ofIndexedElementAccessorDeclaration(analyzer, tokenOrKeyword.parent.parent);
5828
- } else if ((tokenOrKeyword.isToken(46 /* OpenSquareBracket */) || tokenOrKeyword.isToken(23 /* CloseSquareBracket */)) && tokenOrKeyword.parent.kind === 69 /* IndexedAccessExpression */) {
5828
+ } else if ((tokenOrKeyword.isToken(46 /* OpenSquareBracket */) || tokenOrKeyword.isToken(23 /* CloseSquareBracket */)) && tokenOrKeyword.parent.kind === 70 /* IndexedAccessExpression */) {
5829
5829
  return this.ofIndexedAccessExpressionOperator(analyzer, tokenOrKeyword.parent, options6);
5830
5830
  }
5831
5831
  return void 0;
@@ -6689,11 +6689,11 @@ var NodeSemanticInfoService = class {
6689
6689
  }
6690
6690
  const parent = getParentSkippingParenthesizedExpressions(typeAccessExpression);
6691
6691
  let parentCallExpression;
6692
- if (parent.kind === 67 /* CallExpression */) {
6692
+ if (parent.kind === 68 /* CallExpression */) {
6693
6693
  parentCallExpression = parent;
6694
6694
  } else if (parent.kind === 87 /* GenericSpecializationExpression */) {
6695
6695
  const grandParent = getParentSkippingParenthesizedExpressions(parent);
6696
- if (grandParent.kind === 67 /* CallExpression */) {
6696
+ if (grandParent.kind === 68 /* CallExpression */) {
6697
6697
  parentCallExpression = grandParent;
6698
6698
  }
6699
6699
  }
@@ -7237,10 +7237,10 @@ var DefinitionService = class {
7237
7237
  case 51 /* OperatorDeclaration */:
7238
7238
  range = node.name.rangeWithoutTrivia;
7239
7239
  break;
7240
- case 65 /* FunctionBlockLiteral */:
7240
+ case 66 /* FunctionBlockLiteral */:
7241
7241
  range = node.block.openBraceToken.rangeWithoutTrivia;
7242
7242
  break;
7243
- case 72 /* FunctionLiteral */: {
7243
+ case 65 /* FunctionLiteral */: {
7244
7244
  const rangeStart = node.functionKeyword.rangeWithoutTrivia.start;
7245
7245
  const rangeEnd = node.parameterClause.rangeWithoutTrivia.end;
7246
7246
  range = new Range(rangeStart, rangeEnd);
@@ -7316,7 +7316,7 @@ var ReferencesService = class {
7316
7316
  }
7317
7317
  }
7318
7318
  if (!options6.onlyNamed) {
7319
- if (node.kind === 68 /* AutotypeCallExpression */ && restrictions.canBeAutotypeCall) {
7319
+ if (node.kind === 69 /* AutotypeCallExpression */ && restrictions.canBeAutotypeCall) {
7320
7320
  const semanticInfo = NodeSemanticInfoService.ofAutotypeCallExpression(analyzer, node, semanticInfoOptions);
7321
7321
  const referenceKind = this.ifReferenceToDefinitionThenKind(
7322
7322
  definition,
@@ -7452,7 +7452,7 @@ var ReferencesService = class {
7452
7452
  result.push(new Reference(sourceFile2, node.parameterClause.rangeWithoutTrivia, referenceKind));
7453
7453
  }
7454
7454
  }
7455
- if (node.kind === 69 /* IndexedAccessExpression */ && restrictions.canBeIndexer) {
7455
+ if (node.kind === 70 /* IndexedAccessExpression */ && restrictions.canBeIndexer) {
7456
7456
  const semanticInfo = NodeSemanticInfoService.ofIndexedAccessExpressionOperator(
7457
7457
  analyzer,
7458
7458
  node,
@@ -9298,7 +9298,7 @@ var ValueParametersSignatureHelpProvider = class {
9298
9298
  let node = token.parent;
9299
9299
  while (node !== void 0) {
9300
9300
  switch (node.kind) {
9301
- case 67 /* CallExpression */: {
9301
+ case 68 /* CallExpression */: {
9302
9302
  if (this._offset >= node.openParenthesisToken.rangeWithoutTrivia.end && (node.closeParenthesisToken.rangeWithoutTrivia.isEmpty || this._offset <= node.closeParenthesisToken.rangeWithoutTrivia.start)) {
9303
9303
  const valueArguments = ValueArgumentFactory.createValueArgumentsOfCallExpression(node);
9304
9304
  const argumentIndex = this.getArgumentIndexInList(node.argumentList.elements, this._offset);
@@ -9306,7 +9306,7 @@ var ValueParametersSignatureHelpProvider = class {
9306
9306
  }
9307
9307
  break;
9308
9308
  }
9309
- case 68 /* AutotypeCallExpression */: {
9309
+ case 69 /* AutotypeCallExpression */: {
9310
9310
  if (this._offset >= node.openParenthesisToken.rangeWithoutTrivia.end && (node.closeParenthesisToken.rangeWithoutTrivia.isEmpty || this._offset <= node.closeParenthesisToken.rangeWithoutTrivia.start)) {
9311
9311
  const valueArguments = ValueArgumentFactory.createValueArgumentsOfAutotypeCallExpression(node);
9312
9312
  const argumentIndex = this.getArgumentIndexInList(node.argumentList.elements, this._offset);
@@ -9314,7 +9314,7 @@ var ValueParametersSignatureHelpProvider = class {
9314
9314
  }
9315
9315
  break;
9316
9316
  }
9317
- case 69 /* IndexedAccessExpression */: {
9317
+ case 70 /* IndexedAccessExpression */: {
9318
9318
  if (this._offset >= node.openSquareBracketToken.rangeWithoutTrivia.end && (node.closeSquareBracketToken.rangeWithoutTrivia.isEmpty || this._offset <= node.closeSquareBracketToken.rangeWithoutTrivia.start)) {
9319
9319
  const valueArguments = ValueArgumentFactory.createValueArgumentsOfIndexedAccessExpression(node);
9320
9320
  const argumentIndex = this.getArgumentIndexInList(node.argumentList.elements, this._offset);