@artel/artc 0.6.25207 → 0.6.25209
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 +36 -20
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +9923 -9250
- package/build/{chunk-FYWHIGGV.js → chunk-4EDLYSNW.js} +11 -8
- package/build/{chunk-F6DF37J3.js → chunk-5SWGY25I.js} +39172 -46399
- package/build/{chunk-OORYH37I.js → chunk-GKEW2LBL.js} +27 -14
- package/build/types/analysis/AnalyzedTranslationPackage.d.ts +14 -10
- package/build/types/analysis/Analyzer.d.ts +27 -11
- package/build/types/analysis/AutotypeCallExpressionMeaning.d.ts +17 -1
- package/build/types/analysis/BaseExpressionMeaning.d.ts +17 -1
- package/build/types/analysis/CallExpressionMeaning.d.ts +17 -1
- package/build/types/analysis/DereferenceExpressionMeaning.d.ts +6 -1
- package/build/types/analysis/DereferencedVariableAccess.d.ts +14 -0
- package/build/types/analysis/DiagnosticCollector.d.ts +3 -0
- package/build/types/analysis/IdentifierExpressionMeaning.d.ts +2 -5
- package/build/types/analysis/IndexedAccess.d.ts +14 -0
- package/build/types/analysis/IndexedAccessExpressionMeaning.d.ts +6 -3
- package/build/types/analysis/ObjectExpressionMeaning.d.ts +19 -3
- package/build/types/analysis/PropertyAccessExpressionMeaning.d.ts +2 -4
- package/build/types/analysis/SemanticContext.d.ts +4 -4
- package/build/types/analysis/VariableAccess.d.ts +6 -2
- package/build/types/analysis/WellKnownDeclarations.d.ts +1 -0
- package/build/types/analysis/index.d.ts +4 -2
- package/build/types/api/Api.d.ts +2 -2
- package/build/types/common/AccessKind.d.ts +2 -1
- package/build/types/common/Constants.d.ts +1 -1
- package/build/types/common/JavaScriptIdentifier.d.ts +6 -0
- package/build/types/common/Logger.d.ts +1 -0
- package/build/types/common/Name.d.ts +18 -21
- package/build/types/common/Query.d.ts +6 -1
- package/build/types/common/TreeQuery.d.ts +0 -2
- package/build/types/common/index.d.ts +2 -1
- package/build/types/emitter/Emitter.d.ts +50 -16
- package/build/types/emitter/EmitterContext.d.ts +42 -337
- package/build/types/emitter/EmitterGeneratedDeclarationKind.d.ts +55 -17
- package/build/types/emitter/Entities.d.ts +144 -0
- package/build/types/emitter/EntityMap.d.ts +45 -0
- package/build/types/emitter/ExpressionTransformationResult.d.ts +1 -1
- package/build/types/emitter/GeneralLowering.d.ts +4 -68
- package/build/types/emitter/Internal.d.ts +0 -1
- package/build/types/emitter/IrBuilder.d.ts +27 -17
- package/build/types/emitter/IrToJs.d.ts +17 -11
- package/build/types/emitter/StatementTransformationResult.d.ts +5 -2
- package/build/types/emitter/Transformer.d.ts +21 -93
- package/build/types/emitter/ir/AccessedEntities.d.ts +5 -11
- package/build/types/emitter/ir/ComputedAccess.d.ts +19 -0
- package/build/types/emitter/ir/LoweringState.d.ts +25 -0
- package/build/types/emitter/ir/Nodes.d.ts +531 -1109
- package/build/types/emitter/ir/index.d.ts +3 -1
- package/build/types/emitter/ir/types.d.ts +6 -7
- package/build/types/entities/BinaryOperatorEntity.d.ts +3 -0
- package/build/types/entities/ConstructorEntity.d.ts +17 -21
- package/build/types/entities/PackageMembers.d.ts +2 -2
- package/build/types/entities/TypeEntityMembers.d.ts +2 -2
- package/build/types/entities/UnaryOperatorEntity.d.ts +3 -0
- package/build/types/entities/Variants.d.ts +2 -2
- package/build/types/entities/index.d.ts +4 -2
- package/build/types/executor/Compiler.d.ts +6 -1
- package/build/types/executor/NodeCompiler.d.ts +7 -3
- package/build/types/parser/Scanner.d.ts +1 -0
- package/build/types/project/CompilationLoader.d.ts +17 -22
- package/build/types/project/PackageContent.d.ts +16 -0
- package/build/types/project/PackageContentCreator.d.ts +3 -0
- package/build/types/project/SourceFile.d.ts +1 -1
- package/build/types/project/SourcePackage.d.ts +3 -3
- package/build/types/project/configuration/ConfigurationConverter.d.ts +2 -3
- package/build/types/project/configuration/ConfigurationTranslator.d.ts +23 -0
- package/build/types/project/configuration/PackageConfigurationInterpreter.d.ts +1 -27
- package/build/types/project/index.d.ts +3 -1
- package/build/types/services/AddPropertyAssignmentService.d.ts +2 -2
- package/build/types/services/CodeActionsService.d.ts +22 -0
- package/build/types/services/DefinitionService.d.ts +2 -2
- package/build/types/services/LanguageServer.d.ts +11 -2
- package/build/types/services/NodeSemanticInfo.d.ts +13 -7
- package/build/types/services/ReferencesService.d.ts +1 -3
- package/build/types/services/TranslationsGenerationService.d.ts +7 -0
- package/build/types/services/Types.d.ts +10 -0
- package/build/types/services/source-generation/SourceGenerationService.d.ts +6 -4
- package/build/types/services/workspace/CompilationController.d.ts +4 -3
- package/build/types/services/workspace/FileSystemTreeProviderBasedOnWatchedFileSystem.d.ts +5 -2
- package/build/types/services/workspace/ManuallyUpdatedFileSystemTreeProvider.d.ts +1 -1
- package/build/types/services/workspace/Workspace.d.ts +6 -2
- package/build/types/services/workspace/WorkspaceFiles.d.ts +2 -2
- package/build/types/tree/KeywordKind.d.ts +47 -46
- package/build/types/tree/green/SyntaxToCode.d.ts +4 -3
- package/build/types/ts-interop/TsInteropContext.d.ts +2 -2
- package/build/types/ts-interop/TsPackageMembersCreator.d.ts +3 -3
- package/build/types/ts-interop/Utils.d.ts +39 -33
- package/package.json +6 -6
- package/build/types/analysis/IndexerAccess.d.ts +0 -10
- package/build/types/emitter/EmitterPackage.d.ts +0 -60
- package/build/types/emitter/EntityNameProviders.d.ts +0 -33
- package/build/types/generated/BuiltInSystemPackages.d.ts +0 -3
- package/build/types/old/Executor.d.ts +0 -14
- package/build/types/old/JavaScriptEmittingVisitor.d.ts +0 -1
- package/build/types/old/NzonParser.d.ts +0 -1
- package/build/types/old/NzonScanner.d.ts +0 -1
- package/build/types/old/NzonSyntax.d.ts +0 -1
- package/build/types/old/RemoteWorkspaceFileSystem.d.ts +0 -1
- /package/build/types/{old/JavaScriptEmitter.d.ts → emitter/EmitterContextOld.d.ts} +0 -0
@@ -3,7 +3,7 @@ import { MatchResultValueParameter } from '../analysis/CallArgumentToParameterMa
|
|
3
3
|
import { Translation, WithLocalization } from '../analysis/Localization.js';
|
4
4
|
import { TypeIndexedAccessorDeclaration } from '../analysis/NodeTypeUtils.js';
|
5
5
|
import { Analyzer } from '../analysis/index.js';
|
6
|
-
import { ReadonlyNonEmptyArray } from '../common/index.js';
|
6
|
+
import { AccessKind, ReadonlyNonEmptyArray } from '../common/index.js';
|
7
7
|
import { AliasTypeEntity, Entity, MethodEntity, MethodTypeEntity, PackageAliasEntity, PackageEntity, StructuredTypeEntity, TypeParameterEntity, VariableEntity, VariantEntity, VariantTypeEntity } from '../entities/index.js';
|
8
8
|
import * as tree from '../tree/index.js';
|
9
9
|
import * as types from '../types/index.js';
|
@@ -55,19 +55,22 @@ export declare class ReferenceNodeSemanticInfo {
|
|
55
55
|
export type ReferenceTarget = EntityReferenceTarget | TypeVariableReferenceTarget | TypeValueParameterReferenceTarget | TypeConstructorReferenceTarget | TypeUnaryOperatorReferenceTarget | TypeBinaryOperatorReferenceTarget | TypeDereferenceOperatorReferenceTarget | AccessedMethodReferenceTarget | TypeIndexerReferenceTarget | MatchResultValueParameterReferenceTarget | PackageReferenceTarget | TypeContextReferenceTarget;
|
56
56
|
export declare class EntityReferenceTarget {
|
57
57
|
readonly entity: ReferencedEntity;
|
58
|
+
readonly accessKind: AccessKind;
|
58
59
|
readonly kind = "entity";
|
59
|
-
constructor(entity: ReferencedEntity);
|
60
|
+
constructor(entity: ReferencedEntity, accessKind: AccessKind);
|
60
61
|
}
|
61
62
|
export type ReferencedEntity = VariableEntity | VariantEntity | VariantTypeEntity | MethodEntity | TypeParameterEntity | MethodTypeEntity | StructuredTypeEntity | PackageAliasEntity | AliasTypeEntity;
|
62
63
|
export declare class TypeVariableReferenceTarget {
|
63
64
|
readonly variable: types.Variable;
|
65
|
+
readonly accessKind: AccessKind;
|
64
66
|
readonly kind = "type-variable";
|
65
|
-
constructor(variable: types.Variable);
|
67
|
+
constructor(variable: types.Variable, accessKind: AccessKind);
|
66
68
|
}
|
67
69
|
export declare class TypeValueParameterReferenceTarget {
|
68
70
|
readonly parameter: types.ValueParameter;
|
71
|
+
readonly accessKind: AccessKind;
|
69
72
|
readonly kind = "type-value-parameter";
|
70
|
-
constructor(parameter: types.ValueParameter);
|
73
|
+
constructor(parameter: types.ValueParameter, accessKind: AccessKind);
|
71
74
|
}
|
72
75
|
export declare class TypeConstructorReferenceTarget {
|
73
76
|
readonly constructor_: types.Constructor;
|
@@ -86,8 +89,9 @@ export declare class TypeBinaryOperatorReferenceTarget {
|
|
86
89
|
}
|
87
90
|
export declare class TypeDereferenceOperatorReferenceTarget {
|
88
91
|
readonly operator: types.DereferenceOperator;
|
92
|
+
readonly accessKind: AccessKind;
|
89
93
|
readonly kind = "type-dereference-operator";
|
90
|
-
constructor(operator: types.DereferenceOperator);
|
94
|
+
constructor(operator: types.DereferenceOperator, accessKind: AccessKind);
|
91
95
|
}
|
92
96
|
export declare class AccessedMethodReferenceTarget {
|
93
97
|
readonly method: AccessedMethod;
|
@@ -96,8 +100,9 @@ export declare class AccessedMethodReferenceTarget {
|
|
96
100
|
}
|
97
101
|
export declare class MatchResultValueParameterReferenceTarget {
|
98
102
|
readonly parameter: MatchResultValueParameter;
|
103
|
+
readonly accessKind: AccessKind;
|
99
104
|
readonly kind = "match-result-value-parameter";
|
100
|
-
constructor(parameter: MatchResultValueParameter);
|
105
|
+
constructor(parameter: MatchResultValueParameter, accessKind: AccessKind);
|
101
106
|
}
|
102
107
|
export declare class PackageReferenceTarget {
|
103
108
|
readonly package_: PackageEntity;
|
@@ -112,8 +117,9 @@ export declare class TypeContextReferenceTarget {
|
|
112
117
|
}
|
113
118
|
export declare class TypeIndexerReferenceTarget {
|
114
119
|
readonly indexer: types.Indexer;
|
120
|
+
readonly accessKind: AccessKind;
|
115
121
|
readonly kind = "type-indexer";
|
116
|
-
constructor(indexer: types.Indexer);
|
122
|
+
constructor(indexer: types.Indexer, accessKind: AccessKind);
|
117
123
|
}
|
118
124
|
export declare class NameTranslationNodeSemanticInfo {
|
119
125
|
readonly targets: ReadonlyNonEmptyArray<TranslationTargetEntity>;
|
@@ -7,9 +7,7 @@ export declare class ReferencesService {
|
|
7
7
|
private getDefinitionAndReferenceInfoAtOffset;
|
8
8
|
private getDefinitionFromNodeSemanticInfo;
|
9
9
|
private getReferenceRestrictions;
|
10
|
-
private
|
11
|
-
private determineReferenceKind;
|
12
|
-
private accessKindToReferenceKind;
|
10
|
+
private ifReferenceToDefinitionThenKind;
|
13
11
|
private isEntityWithRegularName;
|
14
12
|
}
|
15
13
|
export declare class Reference {
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { Analyzer } from '../analysis/Analyzer.js';
|
2
|
+
import { SourceFile } from '../project/SourceFile.js';
|
3
|
+
import { SourceFileEdit } from './Types.js';
|
4
|
+
export declare class TranslationsGenerationService {
|
5
|
+
generateMissingTranslations(analyzer: Analyzer, sourceFile: SourceFile, offset: number, onlyTypeMembers: boolean): SourceFileEdit[] | undefined;
|
6
|
+
isOffsetAtTranslationsContainingPartiallyTranslatedTypes(analyzer: Analyzer, sourceFile: SourceFile, offset: number): boolean;
|
7
|
+
}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import * as ls from 'vscode-languageserver';
|
1
2
|
import { Range, Uri } from '../common/index.js';
|
2
3
|
import { SourceFile } from '../project/index.js';
|
3
4
|
export type RangeLocation = {
|
@@ -13,7 +14,16 @@ export type CompletionItemData = {
|
|
13
14
|
cacheId: number;
|
14
15
|
indexInCache: number;
|
15
16
|
};
|
17
|
+
export type CodeActionData = {
|
18
|
+
name: string;
|
19
|
+
location: {
|
20
|
+
uri: ls.DocumentUri;
|
21
|
+
position: ls.Position;
|
22
|
+
};
|
23
|
+
data: any;
|
24
|
+
};
|
16
25
|
export declare function isCompletionItemData(value: unknown): value is CompletionItemData;
|
26
|
+
export declare function isCodeActionData(value: unknown): value is CodeActionData;
|
17
27
|
export declare class SourceFileEdit {
|
18
28
|
readonly sourceFile: SourceFile;
|
19
29
|
readonly range: Range;
|
@@ -1,18 +1,20 @@
|
|
1
1
|
import { ObservableObject } from 'reactronic';
|
2
|
-
import { Analyzer
|
2
|
+
import { Analyzer } from '../../analysis/Analyzer.js';
|
3
3
|
import { LocalizationContext } from '../../analysis/LocalizationContext.js';
|
4
|
+
import { CancellationToken } from '../../common/index.js';
|
4
5
|
import { Entity } from '../../entities/index.js';
|
6
|
+
import { PackageContent } from '../../project/PackageContent.js';
|
5
7
|
import { TypeScriptLibrariesProvider } from '../../ts-interop/TsLibrariesProvider.js';
|
6
8
|
import { SourceLocation } from '../Types.js';
|
7
9
|
import { CompilationController, ReadonlyClientTrackedSourceFiles } from '../workspace/index.js';
|
8
10
|
export declare class SourceGenerationService extends ObservableObject {
|
9
11
|
private readonly _trackedSourceFiles;
|
10
12
|
private readonly _tsLibrariesProvider;
|
11
|
-
private readonly
|
13
|
+
private readonly _standardPackageContentsProviders;
|
12
14
|
private readonly _generatedPackageStates;
|
13
15
|
get compilationControllers(): readonly CompilationController[];
|
14
|
-
constructor(_trackedSourceFiles: ReadonlyClientTrackedSourceFiles, _tsLibrariesProvider: TypeScriptLibrariesProvider,
|
15
|
-
getDefinitionInGeneratedCode(analyzer: Analyzer, entity: Entity, localizationContext: LocalizationContext | undefined): Promise<SourceLocation[] | undefined>;
|
16
|
+
constructor(_trackedSourceFiles: ReadonlyClientTrackedSourceFiles, _tsLibrariesProvider: TypeScriptLibrariesProvider, _standardPackageContentsProviders: (cancellationToken: CancellationToken | undefined) => Promise<readonly PackageContent[] | undefined>);
|
17
|
+
getDefinitionInGeneratedCode(analyzer: Analyzer, entity: Entity, localizationContext: LocalizationContext | undefined, cancellationToken: CancellationToken | undefined): Promise<SourceLocation[] | undefined>;
|
16
18
|
entityDefinitionRequiresSourceGeneration(entity: Entity): boolean;
|
17
19
|
protected onOpenedSourceFilesChanged(): void;
|
18
20
|
private getOrGeneratePackageSource;
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import { Indicator, ObservableObject } from 'reactronic';
|
2
|
-
import { Analyzer
|
2
|
+
import { Analyzer } from '../../analysis/index.js';
|
3
3
|
import { CancellationToken, Uri } from '../../common/index.js';
|
4
4
|
import { Diagnostic } from '../../diagnostic/Diagnostic.js';
|
5
5
|
import { ConvertedConfiguration, ProgramPackageConfiguration, SourceFile, fsTree } from '../../project/index.js';
|
6
|
+
import { PackageContent } from '../../project/PackageContent.js';
|
6
7
|
import { TypeScriptLibrariesProvider } from '../../ts-interop/TsLibrariesProvider.js';
|
7
8
|
import { ReadonlyClientTrackedSourceFiles } from './ClientTrackedSourceFiles.js';
|
8
9
|
export declare class CompilationController extends ObservableObject {
|
@@ -24,7 +25,6 @@ export declare class CompilationController extends ObservableObject {
|
|
24
25
|
private _tsInteropInputs;
|
25
26
|
private _tsProgramLoaderInputs;
|
26
27
|
private _state;
|
27
|
-
private _builtInSystemPackagesConfigurations;
|
28
28
|
private _configurationsOfPackagesOutsideProject;
|
29
29
|
get uri(): Uri;
|
30
30
|
get mainCompilationState(): ReadonlyCompilationState | undefined;
|
@@ -52,7 +52,6 @@ export interface CompilationControllerConfig {
|
|
52
52
|
readonly rootDirectory: fsTree.Directory;
|
53
53
|
readonly fileSystemTree: fsTree.ReadonlyFileSystemTree;
|
54
54
|
readonly tsLibrariesProvider: TypeScriptLibrariesProvider;
|
55
|
-
readonly configurationPackagesTsInteropInputs: TsInteropInputs;
|
56
55
|
readonly trackedSourceFiles: ReadonlyClientTrackedSourceFiles;
|
57
56
|
readonly diagnosticsCollectedInBackgroundHandler?: DiagnosticsCollectedInBackgroundHandler;
|
58
57
|
readonly rawPackageConfigurationsChangedHandler?: RawPackageConfigurationsChangedHandler;
|
@@ -60,6 +59,8 @@ export interface CompilationControllerConfig {
|
|
60
59
|
readonly getTreatRootAsPackageIfConfigIsMissing?: () => boolean;
|
61
60
|
readonly standardPackagesUri?: Uri;
|
62
61
|
readonly showErrorMessage?: (message: string) => Promise<void>;
|
62
|
+
readonly builtInStandardPackagesUri?: Uri;
|
63
|
+
readonly additionalPackageContents?: readonly PackageContent[];
|
63
64
|
}
|
64
65
|
export declare enum CompilationControllerState {
|
65
66
|
Created = 0,
|
@@ -12,6 +12,7 @@ export declare class FileSystemTreeProviderBasedOnWatchedFileSystem extends Obse
|
|
12
12
|
private readonly _listener;
|
13
13
|
private _workspaceFolderUris;
|
14
14
|
private _trackedSourceFiles;
|
15
|
+
private _isInitialized;
|
15
16
|
private _lastCheckedWorkspaceFolderUris;
|
16
17
|
/**
|
17
18
|
* Очередь используется для обработки запросов, изменяющих дерево файловой системы.
|
@@ -19,15 +20,17 @@ export declare class FileSystemTreeProviderBasedOnWatchedFileSystem extends Obse
|
|
19
20
|
*/
|
20
21
|
private readonly _taskQueue;
|
21
22
|
private readonly _namesOfDirectoriesToIgnore;
|
23
|
+
private readonly _additionalUrisOfDirectoriesToLoad;
|
22
24
|
private readonly _lastCheckedTrackedSourceFileInfoVersionByUri;
|
23
25
|
private readonly _loadedDirectoryUris;
|
24
|
-
constructor(fileSystem: WorkspaceFileSystem, notificationsPublisher: FileSystemUpdateNotificationsPublisher, namesOfDirectoriesToIgnore?: string[]);
|
26
|
+
constructor(fileSystem: WorkspaceFileSystem, notificationsPublisher: FileSystemUpdateNotificationsPublisher, namesOfDirectoriesToIgnore?: string[], additionalUrisOfDirectoriesToLoad?: readonly Uri[]);
|
25
27
|
initialize(workspaceFolderUris: ObservableArray<Uri>, trackedSourceFiles: ReadonlyClientTrackedSourceFiles): void;
|
26
|
-
waitLoaded(cancellationToken: CancellationToken): Promise<void>;
|
28
|
+
waitLoaded(cancellationToken: CancellationToken | undefined): Promise<void>;
|
27
29
|
dispose(): void;
|
28
30
|
protected onTrackedSourceFilesUpdated(): void;
|
29
31
|
protected onWorkspaceFolderUrisUpdated(): void;
|
30
32
|
protected updateLoadedWorkspaceFolders(): void;
|
33
|
+
protected loadAdditionalDirectories(): void;
|
31
34
|
private onFileSystemUpdated;
|
32
35
|
private addWorkspaceFoldersWorker;
|
33
36
|
private removeWorkspaceFoldersWorker;
|
@@ -12,7 +12,7 @@ export declare class ManuallyUpdatedFileSystemTreeProvider extends ObservableObj
|
|
12
12
|
private readonly _lastCheckedTrackedSourceFileInfoByUri;
|
13
13
|
private readonly _manuallyCreatedSourceFileTextByUri;
|
14
14
|
initialize(workspaceFolderUris: ObservableArray<Uri>, trackedSourceFiles: ReadonlyClientTrackedSourceFiles): void;
|
15
|
-
waitLoaded(_cancellationToken: CancellationToken): Promise<void>;
|
15
|
+
waitLoaded(_cancellationToken: CancellationToken | undefined): Promise<void>;
|
16
16
|
dispose(): void;
|
17
17
|
createOrUpdateSourceFile(uri: Uri, text: string): void;
|
18
18
|
deleteSourceFile(uri: Uri): void;
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import { ObservableMap, ObservableObject } from 'reactronic';
|
2
|
-
import { Analyzer
|
2
|
+
import { Analyzer } from '../../analysis/index.js';
|
3
3
|
import { CancellationToken, Uri } from '../../common/index.js';
|
4
4
|
import * as fsTree from '../../project/FileSystemTree.js';
|
5
5
|
import { SourceFile, SourcePackage } from '../../project/index.js';
|
6
|
+
import { PackageContent } from '../../project/PackageContent.js';
|
6
7
|
import { TypeScriptLibrariesProvider } from '../../ts-interop/TsLibrariesProvider.js';
|
7
8
|
import { ReadonlyClientTrackedSourceFiles } from './ClientTrackedSourceFiles.js';
|
8
9
|
import { CompilationController, DiagnosticsCollectedInBackgroundHandler, RawPackageConfigurationsChangedHandler } from './CompilationController.js';
|
@@ -14,12 +15,12 @@ export declare class Workspace extends ObservableObject {
|
|
14
15
|
private readonly _controllersWithOpenedFiles;
|
15
16
|
private _atLeastOneFileOfCompilationHasBeenOpened;
|
16
17
|
private readonly _files;
|
18
|
+
private _standardPackageContents;
|
17
19
|
get compilationControllers(): readonly CompilationController[];
|
18
20
|
get trackedSourceFiles(): ReadonlyClientTrackedSourceFiles;
|
19
21
|
get loadedWorkspaceFolderByUri(): ObservableMap<string, fsTree.Directory>;
|
20
22
|
get workspaceFolderUris(): readonly Uri[];
|
21
23
|
private get compilationControllerByUri();
|
22
|
-
get configurationPackagesTsInteropInputs(): TsInteropInputs;
|
23
24
|
private constructor();
|
24
25
|
static create(config: WorkspaceConfig): Promise<Workspace>;
|
25
26
|
addWorkspaceFolders(uris: readonly Uri[]): void;
|
@@ -31,6 +32,7 @@ export declare class Workspace extends ObservableObject {
|
|
31
32
|
notifySavedTextDocument(uri: Uri): void;
|
32
33
|
notifyClosedTextDocument(uri: Uri): void;
|
33
34
|
waitLoadedAndGetWorkspaceElementInfo(uri: Uri, cancellationToken: CancellationToken): Promise<WorkspaceElementInfo | undefined>;
|
35
|
+
getStandardPackageContents(cancellationToken: CancellationToken | undefined): Promise<readonly PackageContent[] | undefined>;
|
34
36
|
dispose(): void;
|
35
37
|
protected updateCompilationControllers(): void;
|
36
38
|
protected processControllersWithUnprocessedConfigs(): Promise<void>;
|
@@ -57,4 +59,6 @@ export interface WorkspaceConfig {
|
|
57
59
|
readonly namesOfDirectoriesToIgnore?: readonly string[];
|
58
60
|
readonly standardPackagesUri?: Uri;
|
59
61
|
readonly showErrorMessage?: (message: string) => Promise<void>;
|
62
|
+
readonly builtInStandardPackagesUri?: Uri;
|
63
|
+
readonly additionalPackageContents?: readonly PackageContent[];
|
60
64
|
}
|
@@ -19,7 +19,7 @@ export declare class WorkspaceFiles extends ObservableObject {
|
|
19
19
|
updateTrackedSourceFile(uri: Uri, textOrEditor: string | ((text: string) => string), version: number): void;
|
20
20
|
notifyTrackedSourceFileSaved(uri: Uri): void;
|
21
21
|
stopTrackingSourceFile(uri: Uri): void;
|
22
|
-
waitLoaded(cancellationToken: CancellationToken): Promise<void>;
|
22
|
+
waitLoaded(cancellationToken: CancellationToken | undefined): Promise<void>;
|
23
23
|
dispose(): void;
|
24
24
|
protected updateWorkspaceFolderWithArtelProjectByUri(): void;
|
25
25
|
}
|
@@ -30,6 +30,6 @@ export interface FileSystemTreeProvider {
|
|
30
30
|
* Должен быть вызван до вызова всех остальных методов.
|
31
31
|
*/
|
32
32
|
initialize(workspaceFolderUris: ObservableArray<Uri>, trackedSourceFiles: ReadonlyClientTrackedSourceFiles): void;
|
33
|
-
waitLoaded(cancellationToken: CancellationToken): Promise<void>;
|
33
|
+
waitLoaded(cancellationToken: CancellationToken | undefined): Promise<void>;
|
34
34
|
dispose(): void;
|
35
35
|
}
|
@@ -15,50 +15,51 @@ export declare enum KeywordKind {
|
|
15
15
|
Is = 13,
|
16
16
|
Return = 14,
|
17
17
|
Type = 15,
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
18
|
+
Basic = 16,
|
19
|
+
Import = 17,
|
20
|
+
Error = 18,
|
21
|
+
Finally = 19,
|
22
|
+
And = 20,
|
23
|
+
Or = 21,
|
24
|
+
Xor = 22,
|
25
|
+
While = 23,
|
26
|
+
Loop = 24,
|
27
|
+
RepeatWhile = 25,
|
28
|
+
Yield = 26,
|
29
|
+
When = 27,
|
30
|
+
Creation = 28,
|
31
|
+
OnError = 29,
|
32
|
+
BreakLoop = 30,
|
33
|
+
ContinueLoop = 31,
|
34
|
+
For = 32,
|
35
|
+
Const = 33,
|
36
|
+
Hidden = 34,
|
37
|
+
Observable = 35,
|
38
|
+
Consistent = 36,
|
39
|
+
Abstract = 37,
|
40
|
+
Redefinable = 38,
|
41
|
+
Redefined = 39,
|
42
|
+
Transactional = 40,
|
43
|
+
Unobservable = 41,
|
44
|
+
Async = 42,
|
45
|
+
Static = 43,
|
46
|
+
As = 44,
|
47
|
+
Not = 45,
|
48
|
+
Switch = 46,
|
49
|
+
Case = 47,
|
50
|
+
Await = 48,
|
51
|
+
Dispose = 49,
|
52
|
+
Destruction = 50,
|
53
|
+
InHierarchy = 51,
|
54
|
+
InFile = 52,
|
55
|
+
InPackage = 53,
|
56
|
+
InType = 54,
|
57
|
+
Yes = 55,
|
58
|
+
No = 56,
|
59
|
+
Reference = 57,
|
60
|
+
Translations = 58,
|
61
|
+
Base = 59,
|
62
|
+
None = 60,
|
63
|
+
Get = 61,
|
64
|
+
Set = 62
|
64
65
|
}
|
@@ -63,9 +63,9 @@ export declare class SyntaxToCode {
|
|
63
63
|
private writeTypeSpecifier;
|
64
64
|
private writeNamedTypeSpecifier;
|
65
65
|
private writeAnonymousTypeSpecifier;
|
66
|
-
writeAnonymousMethodTypeDeclaration
|
67
|
-
writeAnonymousStructuredTypeDeclaration
|
68
|
-
writeAnonymousVariantTypeDeclaration
|
66
|
+
private writeAnonymousMethodTypeDeclaration;
|
67
|
+
private writeAnonymousStructuredTypeDeclaration;
|
68
|
+
private writeAnonymousVariantTypeDeclaration;
|
69
69
|
private writeUnionTypeSpecifier;
|
70
70
|
private writeParenthesizedTypeSpecifier;
|
71
71
|
private writeNullableTypeSpecifier;
|
@@ -111,6 +111,7 @@ export declare class SyntaxToCode {
|
|
111
111
|
export interface SyntaxToCodeOptions {
|
112
112
|
newLine?: '\n' | '\r\n';
|
113
113
|
indentationStep?: string;
|
114
|
+
initialIndentation?: string;
|
114
115
|
keywordsLocale?: PackageLocale;
|
115
116
|
keywordsDialect?: PackageDialect;
|
116
117
|
}
|
@@ -1,17 +1,17 @@
|
|
1
1
|
import ts from 'typescript';
|
2
2
|
import { Analyzer } from '../analysis/index.js';
|
3
|
+
import { Tag } from '../analysis/Tags.js';
|
3
4
|
import { Name, PackageLocale } from '../common/index.js';
|
4
5
|
import { EntityHidingLevel, EntityKind, InterfacePackageEntityInfo, TypeEntity, TypeEntityWithMembers } from '../entities/index.js';
|
5
6
|
import { PackageEntity, PackageEntityDefinition } from '../entities/PackageEntity.js';
|
6
7
|
import { OriginalPackageMembers } from '../entities/PackageMembers.js';
|
8
|
+
import { JavaScriptImplementationConfig, PackageName, PlatformKind, ProgramPackage } from '../project/index.js';
|
7
9
|
import * as types from '../types/index.js';
|
8
10
|
import { SourcePackageLoadedFromDtsEntity, TsPackageEntity } from './Entities.js';
|
9
11
|
import { TsPackageContents } from './TsPackageContents.js';
|
10
12
|
import { TsPackageMembersCreationResult } from './TsPackageMembersCreator.js';
|
11
13
|
import { TsTypeMembersCreationResult } from './TsTypeMembersCreator.js';
|
12
14
|
import { RequiredJsLibraryConfig } from './Utils.js';
|
13
|
-
import { Tag } from '../analysis/Tags.js';
|
14
|
-
import { JavaScriptImplementationConfig, PackageName, PlatformKind, ProgramPackage } from '../project/index.js';
|
15
15
|
export declare class TsInteropContext {
|
16
16
|
readonly analyzer: Analyzer;
|
17
17
|
readonly tsProgramState: TsProgramState;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import ts from 'typescript';
|
2
2
|
import { OriginalPackageMembers } from '../entities/PackageMembers.js';
|
3
|
-
import {
|
3
|
+
import { NamedPackageMemberEntity, PackageEntity, TypeEntity } from '../entities/index.js';
|
4
4
|
import { SourcePackage } from '../project/index.js';
|
5
5
|
import * as tree from '../tree/index.js';
|
6
6
|
import { TsInteropContext } from './TsInteropContext.js';
|
@@ -64,6 +64,6 @@ export type NamedPackageMemberDeclaration = tree.PackageAliasTypeDeclaration | t
|
|
64
64
|
export declare class TsPackageMembersCreationResult {
|
65
65
|
readonly members: OriginalPackageMembers;
|
66
66
|
readonly typeEntityBySymbol: ReadonlyMap<ts.Symbol, TypeEntity>;
|
67
|
-
readonly packageMemberEntityByNode: ReadonlyMap<tree.Node,
|
68
|
-
constructor(members: OriginalPackageMembers, typeEntityBySymbol: ReadonlyMap<ts.Symbol, TypeEntity>, packageMemberEntityByNode: ReadonlyMap<tree.Node,
|
67
|
+
readonly packageMemberEntityByNode: ReadonlyMap<tree.Node, NamedPackageMemberEntity>;
|
68
|
+
constructor(members: OriginalPackageMembers, typeEntityBySymbol: ReadonlyMap<ts.Symbol, TypeEntity>, packageMemberEntityByNode: ReadonlyMap<tree.Node, NamedPackageMemberEntity>);
|
69
69
|
}
|
@@ -1,43 +1,49 @@
|
|
1
1
|
import { TsInteropInputs } from '../analysis/index.js';
|
2
|
-
import { Compilation, JavaScriptImplementationConfig,
|
2
|
+
import { Compilation, JavaScriptImplementationConfig, PackageName, ProgramPackage } from '../project/index.js';
|
3
3
|
import { TypeScriptLibrariesProvider } from './TsLibrariesProvider.js';
|
4
4
|
export declare function createTsInteropInputsForCompilation(compilation: Compilation, librariesProvider: TypeScriptLibrariesProvider): TsInteropInputs;
|
5
5
|
export declare function collectRequiredJsLibraryConfigs(compilation: Compilation): RequiredJsLibraryConfigs;
|
6
6
|
export declare class RequiredJsLibraryConfigs {
|
7
7
|
readonly values: readonly RequiredJsLibraryConfig[];
|
8
|
-
|
9
|
-
|
8
|
+
/**
|
9
|
+
* Конфигурации владельцев пространств имён и вложенных модулей, для которых не должны создаваться самостоятельные
|
10
|
+
* пакеты Артель.
|
11
|
+
*/
|
12
|
+
readonly namespaceOrSubModuleOwnersNotMappedToArtelPackages: readonly JavaScriptImplementationConfig.NamespaceOfSubModuleOwner[];
|
13
|
+
constructor(values: readonly RequiredJsLibraryConfig[],
|
14
|
+
/**
|
15
|
+
* Конфигурации владельцев пространств имён и вложенных модулей, для которых не должны создаваться самостоятельные
|
16
|
+
* пакеты Артель.
|
17
|
+
*/
|
18
|
+
namespaceOrSubModuleOwnersNotMappedToArtelPackages: readonly JavaScriptImplementationConfig.NamespaceOfSubModuleOwner[]);
|
10
19
|
getStandardLibraryFileNames(): string[];
|
11
|
-
|
12
|
-
|
20
|
+
getNamesOfNpmPackagesLoadedFromDts(): string[];
|
21
|
+
getNamesOfModulesLoadedFromDts(): string[];
|
13
22
|
}
|
14
|
-
export
|
15
|
-
|
16
|
-
export class ExternalImplementation implements IRequiredJsLibraryConfig {
|
17
|
-
readonly pkg: ProgramPackage;
|
18
|
-
readonly value: JavaScriptInterfacePackageImplementationConfig;
|
19
|
-
readonly kind = "external-implementation";
|
20
|
-
get implementationConfig(): JavaScriptImplementationConfig;
|
21
|
-
get loadFromDts(): boolean;
|
22
|
-
constructor(pkg: ProgramPackage, value: JavaScriptInterfacePackageImplementationConfig);
|
23
|
-
}
|
24
|
-
export class PackageFromDts {
|
25
|
-
readonly value: PackageFromDtsConfig;
|
26
|
-
readonly kind = "package-from-dts";
|
27
|
-
get implementationConfig(): JavaScriptImplementationConfig;
|
28
|
-
get loadFromDts(): boolean;
|
29
|
-
constructor(value: PackageFromDtsConfig);
|
30
|
-
}
|
31
|
-
interface IRequiredJsLibraryConfig {
|
32
|
-
implementationConfig: JavaScriptImplementationConfig;
|
33
|
-
loadFromDts: boolean;
|
34
|
-
}
|
35
|
-
export {};
|
36
|
-
}
|
37
|
-
export declare class JsModuleConfig {
|
38
|
-
readonly name: string;
|
39
|
-
readonly format: JavaScriptModuleFormat;
|
40
|
-
readonly packageName: string;
|
23
|
+
export declare class RequiredJsLibraryConfig {
|
24
|
+
readonly implementationConfig: JavaScriptImplementationConfig;
|
41
25
|
readonly loadFromDts: boolean;
|
42
|
-
|
26
|
+
/**
|
27
|
+
* Определяет, должен ли быть создан пакет Артель на основе этой библиотеки.
|
28
|
+
*/
|
29
|
+
readonly ifRepresentsArtelPackageThenInfo: JsLibraryRepresentingArtelPackageInfo | undefined;
|
30
|
+
constructor(implementationConfig: JavaScriptImplementationConfig, loadFromDts: boolean,
|
31
|
+
/**
|
32
|
+
* Определяет, должен ли быть создан пакет Артель на основе этой библиотеки.
|
33
|
+
*/
|
34
|
+
ifRepresentsArtelPackageThenInfo: JsLibraryRepresentingArtelPackageInfo | undefined);
|
35
|
+
}
|
36
|
+
export declare class JsLibraryRepresentingArtelPackageInfo {
|
37
|
+
readonly artelPackageName: PackageName;
|
38
|
+
/**
|
39
|
+
* Если конфигурация указана в качестве внешней реализации какого-либо пакета Артель
|
40
|
+
* (`TargetPlatformConfig.interfacePackageImplementation`), в этом поле будет находиться соответствующий пакет.
|
41
|
+
*/
|
42
|
+
readonly isExternalImplementationThenPackage: ProgramPackage | undefined;
|
43
|
+
constructor(artelPackageName: PackageName,
|
44
|
+
/**
|
45
|
+
* Если конфигурация указана в качестве внешней реализации какого-либо пакета Артель
|
46
|
+
* (`TargetPlatformConfig.interfacePackageImplementation`), в этом поле будет находиться соответствующий пакет.
|
47
|
+
*/
|
48
|
+
isExternalImplementationThenPackage: ProgramPackage | undefined);
|
43
49
|
}
|
package/package.json
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
{
|
2
2
|
"name": "@artel/artc",
|
3
|
-
"version": "0.6.
|
3
|
+
"version": "0.6.25209",
|
4
4
|
"description": "Артель Компилятор | Artel Compiler",
|
5
5
|
"author": "Nezaboodka Team <contact@nezaboodka.com>",
|
6
|
-
"license": "
|
6
|
+
"license": "LGPL-3.0-or-later",
|
7
7
|
"type": "module",
|
8
8
|
"files": [
|
9
9
|
"build/**/*.*js",
|
@@ -57,8 +57,8 @@
|
|
57
57
|
"test": "npm run before-build --prefix ../.. && node --experimental-vm-modules ../../node_modules/jest/bin/jest.js",
|
58
58
|
"lint:check": "eslint source test",
|
59
59
|
"lint:fix": "eslint --fix source test",
|
60
|
-
"generate-files": "
|
61
|
-
"generate-files:force": "
|
60
|
+
"generate-files": "",
|
61
|
+
"generate-files:force": "",
|
62
62
|
"compile": "npm run generate-files && tsc --build .",
|
63
63
|
"bundle:debug": "npm run compile && node ./scripts/bundle.js --debug && npm run copy-global-storage",
|
64
64
|
"bundle:release": "npm run compile && node ./scripts/bundle.js && npm run copy-global-storage",
|
@@ -67,7 +67,7 @@
|
|
67
67
|
"copy-global-storage": "node ../vscode-extension/scripts/copy-global-storage.js projects/compiler/СистемныеПакеты",
|
68
68
|
"install-global": "npm run prepare-for-publish && npm i -g .",
|
69
69
|
"generate-tree": "npm run bundle:debug && node build/Cli.js build ../tree-generator/ ../tree-generator/build --workspace ../.. --standard-packages ../СтандартныеПакеты && node ../tree-generator/build/launch.mjs ../compiler/source/tree",
|
70
|
-
"generate-
|
71
|
-
"
|
70
|
+
"generate-configuration-json-schemas": "node ./scripts/generateConfigurationJsonSchemas.mjs",
|
71
|
+
"create-minimal-required-standard-package-contents-json": "esbuild ./scripts/createMinimalStandardPackageContentsJson.ts --bundle --outfile=../../build/scripts/createMinimalStandardPackageContentsJson.mjs --format=esm --platform=node --packages=external --supported:async-await=false && node ../../build/scripts/createMinimalStandardPackageContentsJson.mjs"
|
72
72
|
}
|
73
73
|
}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { AccessKind } from '../common/index.js';
|
2
|
-
import { IndexerEntity, GetterEntity, SetterEntity } from '../entities/index.js';
|
3
|
-
export type IndexerAccess = {
|
4
|
-
kind: AccessKind.Get;
|
5
|
-
accessorEntity: GetterEntity | undefined;
|
6
|
-
} | {
|
7
|
-
kind: AccessKind.Set;
|
8
|
-
accessorEntity: SetterEntity | undefined;
|
9
|
-
};
|
10
|
-
export declare function create(indexerEntity: IndexerEntity, accessKind: AccessKind): IndexerAccess;
|
@@ -1,60 +0,0 @@
|
|
1
|
-
import { PackageLocale, Uri } from '../common/index.js';
|
2
|
-
import { ProgramPackage, SourcePackage } from '../project/index.js';
|
3
|
-
import { EmitterContext, UniqueEntityNames } from './EmitterContext.js';
|
4
|
-
import { RegisteredEntityNames } from './EntityNameProviders.js';
|
5
|
-
import * as ir from './ir/index.js';
|
6
|
-
export interface EmitterPackage {
|
7
|
-
getDefinition(): EmitterPackageDefinition;
|
8
|
-
getLoweredIr(): ir.SourceFile;
|
9
|
-
getMemberNames(): UniqueEntityNames;
|
10
|
-
getRegisteredEntityNames(): RegisteredEntityNames;
|
11
|
-
getPackageEntryPointMethods(): readonly ir.PackageMethodDeclaration[];
|
12
|
-
getPackageConstructorMethods(): readonly ir.PackageMethodDeclaration[];
|
13
|
-
getLocale(): PackageLocale;
|
14
|
-
}
|
15
|
-
export type EmitterPackageDefinition = EmitterPackageDefinition_source | EmitterPackageDefinition_intrinsic;
|
16
|
-
declare class EmitterPackageDefinition_source {
|
17
|
-
readonly pkg: SourcePackage;
|
18
|
-
readonly kind = "source";
|
19
|
-
constructor(pkg: SourcePackage);
|
20
|
-
}
|
21
|
-
declare class EmitterPackageDefinition_intrinsic {
|
22
|
-
readonly outputUri: Uri;
|
23
|
-
readonly isLaunch: boolean;
|
24
|
-
readonly kind = "intrinsic";
|
25
|
-
constructor(outputUri: Uri, isLaunch: boolean);
|
26
|
-
}
|
27
|
-
export declare class SourceEmitterPackage implements EmitterPackage {
|
28
|
-
private readonly _generalLoweringResult;
|
29
|
-
private readonly _memberNames;
|
30
|
-
private readonly _ectx;
|
31
|
-
private readonly _package;
|
32
|
-
constructor(ectx: EmitterContext, package_: ProgramPackage);
|
33
|
-
getDefinition(): EmitterPackageDefinition_source;
|
34
|
-
getLoweredIr(): ir.SourceFile;
|
35
|
-
getMemberNames(): UniqueEntityNames;
|
36
|
-
getRegisteredEntityNames(): RegisteredEntityNames;
|
37
|
-
getPackageConstructorMethods(): readonly ir.PackageMethodDeclaration[];
|
38
|
-
getPackageEntryPointMethods(): readonly ir.PackageMethodDeclaration[];
|
39
|
-
getLocale(): PackageLocale;
|
40
|
-
private getGeneralLoweringResult;
|
41
|
-
}
|
42
|
-
export declare class IntrinsicEmitterPackage implements EmitterPackage {
|
43
|
-
private readonly _outputUri;
|
44
|
-
private readonly _isLaunch;
|
45
|
-
private readonly _loweredIr;
|
46
|
-
private readonly _memberNames;
|
47
|
-
private readonly _registeredEntityNames;
|
48
|
-
private readonly _packageEntryPointMethods;
|
49
|
-
private readonly _packageConstructorMethods;
|
50
|
-
private readonly _locale;
|
51
|
-
constructor(_outputUri: Uri, _isLaunch: boolean, _loweredIr: ir.SourceFile, _memberNames: UniqueEntityNames, _registeredEntityNames: RegisteredEntityNames, _packageEntryPointMethods: readonly ir.PackageMethodDeclaration[], _packageConstructorMethods: readonly ir.PackageMethodDeclaration[], _locale: PackageLocale);
|
52
|
-
getDefinition(): EmitterPackageDefinition;
|
53
|
-
getLoweredIr(): ir.SourceFile;
|
54
|
-
getMemberNames(): UniqueEntityNames;
|
55
|
-
getRegisteredEntityNames(): RegisteredEntityNames;
|
56
|
-
getPackageEntryPointMethods(): readonly ir.PackageMethodDeclaration[];
|
57
|
-
getPackageConstructorMethods(): readonly ir.PackageMethodDeclaration[];
|
58
|
-
getLocale(): PackageLocale;
|
59
|
-
}
|
60
|
-
export {};
|