@artel/artc 0.6.26023 → 0.6.26024
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 +2 -2
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +19 -32
- package/build/{chunk-IMUSLOYE.js → chunk-SVBA2GB7.js} +2 -2
- package/build/{chunk-HAB6M5SG.js → chunk-W2Y4H3RW.js} +1 -1
- package/build/{chunk-RQOGIK5O.js → chunk-W3GP7NSM.js} +182 -313
- package/build/types/analysis/SpecialNameKey.d.ts +19 -19
- package/build/types/common/Name.d.ts +14 -30
- package/build/types/diagnostic/DiagnosticCode.d.ts +5 -9
- package/build/types/entities/EntityNaming.d.ts +2 -2
- package/build/types/tree/a/TokenFlags.d.ts +6 -8
- package/build/types/types/TypeFactory.d.ts +1 -1
- 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-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-SVBA2GB7.js";
|
|
5
|
+
import "./chunk-W2Y4H3RW.js";
|
|
6
6
|
import {
|
|
7
7
|
__async
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-W3GP7NSM.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-
|
|
3
|
+
} from "../chunk-W2Y4H3RW.js";
|
|
4
4
|
import {
|
|
5
5
|
AccessKind,
|
|
6
6
|
AccessedFunction_entity,
|
|
@@ -297,7 +297,7 @@ import {
|
|
|
297
297
|
withoutQuotes,
|
|
298
298
|
withoutTemplateQuotes,
|
|
299
299
|
yieldTask
|
|
300
|
-
} from "../chunk-
|
|
300
|
+
} from "../chunk-W3GP7NSM.js";
|
|
301
301
|
export {
|
|
302
302
|
AccessKind,
|
|
303
303
|
AccessedFunction_entity,
|
package/build/api/ApiNodeJS.js
CHANGED
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
PhysicalFileSystem,
|
|
7
7
|
PhysicalTypeScriptLibrariesProvider,
|
|
8
8
|
PrintingDiagnosticAcceptor
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-SVBA2GB7.js";
|
|
10
|
+
import "../chunk-W2Y4H3RW.js";
|
|
11
|
+
import "../chunk-W3GP7NSM.js";
|
|
12
12
|
export {
|
|
13
13
|
CommandLineCompiler,
|
|
14
14
|
FileSystemUri,
|
package/build/api/ApiServices.js
CHANGED
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
sortModifiers,
|
|
110
110
|
traverseTreeAsync,
|
|
111
111
|
yieldTask
|
|
112
|
-
} from "../chunk-
|
|
112
|
+
} from "../chunk-W3GP7NSM.js";
|
|
113
113
|
|
|
114
114
|
// source/services/CustomRequests.ts
|
|
115
115
|
import * as ls from "vscode-languageserver";
|
|
@@ -654,14 +654,13 @@ var TranslationsGenerator = class _TranslationsGenerator {
|
|
|
654
654
|
const nameText = this.getNameText(p.getName());
|
|
655
655
|
let flags = 0 /* None */;
|
|
656
656
|
if (p.isObjectParameter()) {
|
|
657
|
-
flags |=
|
|
657
|
+
flags |= 512 /* ObjectParameterName */;
|
|
658
658
|
}
|
|
659
659
|
return SyntaxFactory.identifier(nameText, flags);
|
|
660
660
|
});
|
|
661
661
|
}
|
|
662
662
|
getNameText(name) {
|
|
663
|
-
|
|
664
|
-
return name.getPreferredUnescapedOriginal(flags);
|
|
663
|
+
return name.getPreferredUnescapedOriginal();
|
|
665
664
|
}
|
|
666
665
|
// TODO: Работать с синтаксическим деревом и использовать Trivia для добавления перевода строки. Требуется доработка
|
|
667
666
|
// SyntaxToCode и возможность добавлять Trivia в узлы, создаваемые через SyntaxFactory.
|
|
@@ -1001,7 +1000,7 @@ var SimplifiedArgumentToParameterMatcher = class {
|
|
|
1001
1000
|
const argument = arguments_[i];
|
|
1002
1001
|
if (argument.name !== void 0) {
|
|
1003
1002
|
const name = Name.parse(argument.name);
|
|
1004
|
-
const parameter = parameters.find((p) => p.getName().considerEqual(name
|
|
1003
|
+
const parameter = parameters.find((p) => p.getName().considerEqual(name));
|
|
1005
1004
|
if (parameter !== void 0) {
|
|
1006
1005
|
parameterByArgumentIndex[i] = parameter;
|
|
1007
1006
|
unmatchedParameters.splice(unmatchedParameters.indexOf(parameter), 1);
|
|
@@ -2398,22 +2397,10 @@ var CompletionItemInfoContext = class {
|
|
|
2398
2397
|
this.locale = locale;
|
|
2399
2398
|
this.singleWordKeywordValues = singleWordKeywordValues;
|
|
2400
2399
|
}
|
|
2401
|
-
getInsertTextForName(name
|
|
2402
|
-
|
|
2403
|
-
const
|
|
2404
|
-
const
|
|
2405
|
-
if ((flags & 4 /* RequiresQuotes */) === 0 && this.singleWordKeywordValues.has(nameWithoutBackQuotes)) {
|
|
2406
|
-
flags |= 4 /* RequiresQuotes */;
|
|
2407
|
-
}
|
|
2408
|
-
if (withoutBackQuotes) {
|
|
2409
|
-
flags &= ~(16 /* BackingVariableName */ | 8 /* ConflictResolvingParameterName */);
|
|
2410
|
-
}
|
|
2411
|
-
let result;
|
|
2412
|
-
if (flags === flagsForNameWithoutBackQuotes) {
|
|
2413
|
-
result = nameWithoutBackQuotes;
|
|
2414
|
-
} else {
|
|
2415
|
-
result = name.getPreferredUnescapedOriginal(flags);
|
|
2416
|
-
}
|
|
2400
|
+
getInsertTextForName(name) {
|
|
2401
|
+
const nameWithoutBackQuotes = name.getPreferredUnescapedOriginal();
|
|
2402
|
+
const requiresQuotes = (name.flags & 4 /* RequiresQuotes */) === 0 && this.singleWordKeywordValues.has(nameWithoutBackQuotes);
|
|
2403
|
+
const result = name.getPreferredUnescapedOriginal(requiresQuotes);
|
|
2417
2404
|
return result;
|
|
2418
2405
|
}
|
|
2419
2406
|
};
|
|
@@ -2783,9 +2770,9 @@ var TranslationsSourceOrdinaryFunctionOrOperatorCompletionItemInfo = class {
|
|
|
2783
2770
|
}
|
|
2784
2771
|
getInsertText() {
|
|
2785
2772
|
const keywordWithWhitespace = this.includeFunctionKeyword ? `${this.ctx.displayService.a.displayKeyword(16 /* Function */)} ` : "";
|
|
2786
|
-
const typeParameters = this.func.getTypeParameters().map((p) => this.ctx.getInsertTextForName(p.getName()
|
|
2773
|
+
const typeParameters = this.func.getTypeParameters().map((p) => this.ctx.getInsertTextForName(p.getName())).join(", ");
|
|
2787
2774
|
const typeParametersWithAngles = typeParameters.length > 0 ? `<${typeParameters}>` : "";
|
|
2788
|
-
const parameters = this.func.getParameters().map((p) => this.ctx.getInsertTextForName(p.getName()
|
|
2775
|
+
const parameters = this.func.getParameters().map((p) => this.ctx.getInsertTextForName(p.getName())).join(", ");
|
|
2789
2776
|
return `${keywordWithWhitespace}${this.ctx.getInsertTextForName(this.func.getName())}${typeParametersWithAngles}(${parameters})`;
|
|
2790
2777
|
}
|
|
2791
2778
|
getSortText() {
|
|
@@ -2835,13 +2822,13 @@ var TranslationsSourcePackageTypeCompletionItemInfo = class {
|
|
|
2835
2822
|
}
|
|
2836
2823
|
getInsertText() {
|
|
2837
2824
|
const keywordWithWhitespace = this.includeTypeKeyword ? `${this.ctx.displayService.a.displayKeyword(20 /* Type */)} ` : "";
|
|
2838
|
-
const typeParameters = this.typeEntity.getTypeParameters().map((p) => this.ctx.getInsertTextForName(p.getName()
|
|
2825
|
+
const typeParameters = this.typeEntity.getTypeParameters().map((p) => this.ctx.getInsertTextForName(p.getName())).join(", ");
|
|
2839
2826
|
const typeParametersWithAngles = typeParameters.length > 0 ? `<${typeParameters}>` : "";
|
|
2840
2827
|
let result = `${keywordWithWhitespace}${this.ctx.getInsertTextForName(this.typeEntity.getName())}${typeParametersWithAngles}`;
|
|
2841
2828
|
if (this.typeEntity.typeEntityKind === 4 /* Alias */) {
|
|
2842
2829
|
const aliasedType = this.typeEntity.getAliasedType().cycleFree;
|
|
2843
2830
|
if (aliasedType.kind === "function") {
|
|
2844
|
-
const parameters = aliasedType.getEntity().getParameters().map((p) => this.ctx.getInsertTextForName(p.getName()
|
|
2831
|
+
const parameters = aliasedType.getEntity().getParameters().map((p) => this.ctx.getInsertTextForName(p.getName())).join(", ");
|
|
2845
2832
|
result = `${result}(${parameters})`;
|
|
2846
2833
|
}
|
|
2847
2834
|
}
|
|
@@ -2874,7 +2861,7 @@ var TranslationsSourceIndexerCompletionItemInfo = class {
|
|
|
2874
2861
|
return this.label;
|
|
2875
2862
|
}
|
|
2876
2863
|
getInsertText() {
|
|
2877
|
-
const parameters = this.indexer.getParameters().map((p) => this.ctx.getInsertTextForName(p.getName()
|
|
2864
|
+
const parameters = this.indexer.getParameters().map((p) => this.ctx.getInsertTextForName(p.getName())).join(", ");
|
|
2878
2865
|
return `[${parameters}]`;
|
|
2879
2866
|
}
|
|
2880
2867
|
getSortText() {
|
|
@@ -2911,7 +2898,7 @@ var TranslationsSourceConstructorCompletionItemInfo = class {
|
|
|
2911
2898
|
}
|
|
2912
2899
|
getInsertText() {
|
|
2913
2900
|
const creationKeyword = this.includeOnCreateKeyword ? this.ctx.displayService.a.displayKeyword(35 /* Creation */) : "";
|
|
2914
|
-
const parameters = this.constructor_.getParameters().map((p) => this.ctx.getInsertTextForName(p.getName()
|
|
2901
|
+
const parameters = this.constructor_.getParameters().map((p) => this.ctx.getInsertTextForName(p.getName())).join(", ");
|
|
2915
2902
|
return `${creationKeyword}(${parameters})`;
|
|
2916
2903
|
}
|
|
2917
2904
|
getSortText() {
|
|
@@ -5190,7 +5177,7 @@ var EvaluatableExpressionServiceA = class {
|
|
|
5190
5177
|
entity = meaning.suitableOrSingleFunction?.getEntity();
|
|
5191
5178
|
break;
|
|
5192
5179
|
}
|
|
5193
|
-
originalName = entity?.getOriginalEntity().getName().
|
|
5180
|
+
originalName = entity?.getOriginalEntity().getName().key;
|
|
5194
5181
|
} else if (node.parent.kind === 86 /* IdentifierExpression */) {
|
|
5195
5182
|
const meaning = analyzer.resolveIdentifierExpression(node.parent);
|
|
5196
5183
|
let entity;
|
|
@@ -5202,7 +5189,7 @@ var EvaluatableExpressionServiceA = class {
|
|
|
5202
5189
|
entity = meaning.suitableOrSingleFunction?.getEntity();
|
|
5203
5190
|
break;
|
|
5204
5191
|
}
|
|
5205
|
-
originalName = entity?.getOriginalEntity().getName().
|
|
5192
|
+
originalName = entity?.getOriginalEntity().getName().key;
|
|
5206
5193
|
}
|
|
5207
5194
|
result = originalName ?? kebabCaseToCamelCase(node.value);
|
|
5208
5195
|
} else if (node.kind === 0 /* Token */) {
|
|
@@ -6356,10 +6343,10 @@ var SelectionRangeServiceA = class {
|
|
|
6356
6343
|
if (child.kind === 0 /* Token */ && (child.tokenKind === 5 /* TextLiteral */ || child.tokenKind === 6 /* TextTemplateHead */ || child.tokenKind === 7 /* TextTemplatePart */ || child.tokenKind === 8 /* TextTemplateTail */)) {
|
|
6357
6344
|
let textContentStart = child.rangeWithoutTrivia.start + 1;
|
|
6358
6345
|
let textContentEnd = child.rangeWithoutTrivia.end - 1;
|
|
6359
|
-
if ((child.flags &
|
|
6346
|
+
if ((child.flags & 128 /* StartsWithTilde */) !== 0) {
|
|
6360
6347
|
textContentStart += 1;
|
|
6361
6348
|
}
|
|
6362
|
-
if ((child.flags &
|
|
6349
|
+
if ((child.flags & 256 /* EndsWithTilde */) !== 0) {
|
|
6363
6350
|
textContentEnd -= 1;
|
|
6364
6351
|
}
|
|
6365
6352
|
if (offset >= textContentStart && offset < textContentEnd) {
|
|
@@ -10185,7 +10172,7 @@ var EntityToSyntax = class {
|
|
|
10185
10172
|
const name = this.getEntityName(entity);
|
|
10186
10173
|
let nameTokenFlags = 0 /* None */;
|
|
10187
10174
|
if (entity.isObjectParameter()) {
|
|
10188
|
-
nameTokenFlags |=
|
|
10175
|
+
nameTokenFlags |= 512 /* ObjectParameterName */;
|
|
10189
10176
|
}
|
|
10190
10177
|
const nameIdentifier = SyntaxFactory.identifier(name, nameTokenFlags);
|
|
10191
10178
|
const type = this.convertType(entity.getType());
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Compiler
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-W2Y4H3RW.js";
|
|
4
4
|
import {
|
|
5
5
|
ArtelVersion,
|
|
6
6
|
Cached,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
__async,
|
|
16
16
|
performanceMeasurementStageNames,
|
|
17
17
|
performanceMeasurementStages
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-W3GP7NSM.js";
|
|
19
19
|
|
|
20
20
|
// source/executor/FileSystemUri.ts
|
|
21
21
|
import { platform } from "os";
|