@artel/artc 0.9.26042 → 0.9.26045-pre-release

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-GNNHIEAK.js";
5
- import "./chunk-MCDBPZTR.js";
4
+ } from "./chunk-FG2UDYWX.js";
5
+ import "./chunk-2VMQWZJQ.js";
6
6
  import {
7
7
  __async
8
- } from "./chunk-OE7B3OYN.js";
8
+ } from "./chunk-7IM7PHXU.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-MCDBPZTR.js";
3
+ } from "../chunk-2VMQWZJQ.js";
4
4
  import {
5
5
  AccessKind,
6
6
  AccessedFunction_entity,
@@ -311,7 +311,7 @@ import {
311
311
  withoutQuotes,
312
312
  withoutTemplateQuotes,
313
313
  yieldTask
314
- } from "../chunk-OE7B3OYN.js";
314
+ } from "../chunk-7IM7PHXU.js";
315
315
  export {
316
316
  AccessKind,
317
317
  AccessedFunction_entity,
@@ -6,9 +6,9 @@ import {
6
6
  PhysicalFileSystem,
7
7
  PhysicalTypeScriptLibrariesProvider,
8
8
  PrintingDiagnosticAcceptor
9
- } from "../chunk-GNNHIEAK.js";
10
- import "../chunk-MCDBPZTR.js";
11
- import "../chunk-OE7B3OYN.js";
9
+ } from "../chunk-FG2UDYWX.js";
10
+ import "../chunk-2VMQWZJQ.js";
11
+ import "../chunk-7IM7PHXU.js";
12
12
  export {
13
13
  CommandLineCompiler,
14
14
  FileSystemUri,
@@ -142,7 +142,7 @@ import {
142
142
  traverseTreeAsync,
143
143
  traverseTreeAsync2,
144
144
  yieldTask
145
- } from "../chunk-OE7B3OYN.js";
145
+ } from "../chunk-7IM7PHXU.js";
146
146
 
147
147
  // source/services/common/Types.ts
148
148
  import * as ls from "vscode-languageserver";
@@ -12352,14 +12352,7 @@ __decorateClass([
12352
12352
  ], TaskQueue.prototype, "executeTask", 1);
12353
12353
 
12354
12354
  // source/services/workspace/ManuallyUpdatedFileSystemTreeProvider.ts
12355
- import {
12356
- RxMap as RxMap3,
12357
- RxObject as RxObject4,
12358
- options as options3,
12359
- reaction as reaction3,
12360
- signal as signal4,
12361
- disposeRxObject as disposeRxObject4
12362
- } from "reactronic";
12355
+ import { RxMap as RxMap3, RxObject as RxObject4, disposeRxObject as disposeRxObject4, options as options3, reaction as reaction3, signal as signal4 } from "reactronic";
12363
12356
  var ManuallyUpdatedFileSystemTreeProvider = class extends RxObject4 {
12364
12357
  constructor() {
12365
12358
  super(...arguments);
@@ -12441,8 +12434,8 @@ var ManuallyUpdatedFileSystemTreeProvider = class extends RxObject4 {
12441
12434
  if (this.workspaceFolderUris === void 0) {
12442
12435
  return;
12443
12436
  }
12444
- this.fileSystemTree.createdDirectoriesVersion;
12445
- this.fileSystemTree.deletedDirectoriesVersion;
12437
+ this.fileSystemTree.createdEntriesVersion;
12438
+ this.fileSystemTree.deletedEntriesVersion;
12446
12439
  for (const workspaceFolderUri of this.workspaceFolderUris) {
12447
12440
  if (!this.loadedWorkspaceFolderByUri.has(workspaceFolderUri.toString())) {
12448
12441
  const directory = this.fileSystemTree.getDirectory(workspaceFolderUri);
@@ -12675,6 +12668,7 @@ var _Workspace = class _Workspace extends RxObject6 {
12675
12668
  fileSystemTreeProvider: config.fileSystemTreeProvider,
12676
12669
  tsLibrariesProvider: config.tsLibrariesProvider,
12677
12670
  diagnosticsCollectedInBackgroundHandler: config.diagnosticsCollectedInBackgroundHandler,
12671
+ clearDiagnosticsHandler: config.clearDiagnosticsHandler,
12678
12672
  rawPackageConfigurationsChangedHandler: config.rawPackageConfigurationsChangedHandler,
12679
12673
  initiallyOpenedFileUris: config.initiallyOpenedFileUris,
12680
12674
  // configurationPackagesTsInteropInputs,
@@ -12848,6 +12842,35 @@ var _Workspace = class _Workspace extends RxObject6 {
12848
12842
  }
12849
12843
  });
12850
12844
  }
12845
+ clearDiagnosticsForDeletedFiles() {
12846
+ return __async(this, null, function* () {
12847
+ const fileSystemTree = this.files.fileSystemTree;
12848
+ fileSystemTree.createdEntriesVersion;
12849
+ fileSystemTree.deletedEntriesVersion;
12850
+ const sourceFileUris = /* @__PURE__ */ new Map();
12851
+ for (const workspaceFolderUri of this.workspaceFolderUris) {
12852
+ const directory = fileSystemTree.getDirectory(workspaceFolderUri);
12853
+ if (directory !== void 0) {
12854
+ for (const child of directory.getFlatChildren()) {
12855
+ if (child.kind === "file") {
12856
+ sourceFileUris.set(child.uri.toString(), child.uri);
12857
+ }
12858
+ }
12859
+ }
12860
+ }
12861
+ if (this.sourceFileUris !== void 0) {
12862
+ const handler = this.config.clearDiagnosticsHandler;
12863
+ if (handler !== void 0) {
12864
+ for (const [uriText, uri] of this.sourceFileUris) {
12865
+ if (!sourceFileUris.has(uriText)) {
12866
+ yield Transaction3.outside(() => handler(uri));
12867
+ }
12868
+ }
12869
+ }
12870
+ }
12871
+ this.sourceFileUris = sourceFileUris;
12872
+ });
12873
+ }
12851
12874
  deleteCompilationController(controller) {
12852
12875
  const index = this.compilationControllers_.indexOf(controller);
12853
12876
  Debug.assert(index >= 0, `\u041A\u043E\u043D\u0442\u0440\u043E\u043B\u043B\u0435\u0440 ${controller.uri} \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D \u0432 \u0441\u043F\u0438\u0441\u043A\u0435.`);
@@ -12906,6 +12929,9 @@ __decorateClass([
12906
12929
  __decorateClass([
12907
12930
  signal6(false)
12908
12931
  ], _Workspace.prototype, "tsInteropInputsCache", 2);
12932
+ __decorateClass([
12933
+ signal6(false)
12934
+ ], _Workspace.prototype, "sourceFileUris", 2);
12909
12935
  __decorateClass([
12910
12936
  cache
12911
12937
  ], _Workspace.prototype, "compilationControllerByUri", 1);
@@ -12927,6 +12953,10 @@ __decorateClass([
12927
12953
  reaction5,
12928
12954
  options5({ reentrance: Reentrance2.cancelPrevious })
12929
12955
  ], _Workspace.prototype, "updateControllersWithOpenedFiles", 1);
12956
+ __decorateClass([
12957
+ reaction5,
12958
+ options5({ reentrance: Reentrance2.cancelPrevious })
12959
+ ], _Workspace.prototype, "clearDiagnosticsForDeletedFiles", 1);
12930
12960
  var Workspace = _Workspace;
12931
12961
 
12932
12962
  // source/services/common/source-generation/SourceGenerationService.ts
@@ -18784,6 +18814,7 @@ var _LanguageServer = class _LanguageServer {
18784
18814
  fileSystemTreeProvider,
18785
18815
  tsLibrariesProvider: this.config.tsLibrariesProvider,
18786
18816
  diagnosticsCollectedInBackgroundHandler: this.reportDiagnostics.bind(this),
18817
+ clearDiagnosticsHandler: this.clearDiagnostics.bind(this),
18787
18818
  rawPackageConfigurationsChangedHandler: this.onRawPackageConfigurationsChanged.bind(this),
18788
18819
  initiallyOpenedFileUris: params.initializationOptions?.initiallyOpenedFileUris?.map((u) => this.convertVscodeUriToUri(URI.parse(u))),
18789
18820
  standardPackagesUri: params.initializationOptions?.standardPackagesUri !== void 0 ? this.convertVscodeUriToUri(URI.parse(params.initializationOptions.standardPackagesUri)) : void 0,
@@ -18972,7 +19003,7 @@ var _LanguageServer = class _LanguageServer {
18972
19003
  return __async(this, null, function* () {
18973
19004
  const vscodeUri = URI.parse(params.textDocument.uri);
18974
19005
  if (vscodeUri.scheme === GeneratedSourceFileScheme) {
18975
- return void 0;
19006
+ return { kind: "full", items: [] };
18976
19007
  }
18977
19008
  const sourceFileContext = yield this.getSourceFileContext(vscodeUri, taskController);
18978
19009
  let result = { kind: "full", items: [] };
@@ -10,7 +10,7 @@ import {
10
10
  WellKnownDeclarationsLoadError,
11
11
  __async,
12
12
  createTsInteropInputsForCompilation
13
- } from "./chunk-OE7B3OYN.js";
13
+ } from "./chunk-7IM7PHXU.js";
14
14
 
15
15
  // source/executor/Compiler.ts
16
16
  var Compiler = class {
@@ -780,7 +780,7 @@ var UniqueWithComparatorQuery = class extends Query {
780
780
  };
781
781
 
782
782
  // source/common/Constants.ts
783
- var ArtelVersion = true ? "0.9.26042" : "";
783
+ var ArtelVersion = true ? "0.9.26045-pre-release" : "";
784
784
  var ArtelSourceFileExtensions = [".\u0430\u0440\u0442", ".\u0430\u0440\u0442\u0435\u043B\u044C", ".art", ".artel", ".\u0430\u0440\u0442\u043C", ".\u0430\u0440\u0442\u0435\u043B\u044C\u043C", ".artm", ".artelm"];
785
785
  var ArtelSourceFileExtensionSet = new Set(ArtelSourceFileExtensions);
786
786
  var ArtelSourceAndConfigurationFileExtensionSet = new Set(ArtelSourceFileExtensionSet).add(".json");
@@ -38901,25 +38901,25 @@ var FileSystemTree_exports = {};
38901
38901
  __export(FileSystemTree_exports, {
38902
38902
  FileSystemTree: () => FileSystemTree
38903
38903
  });
38904
- import { transaction, disposeRxObject, signal, RxObject } from "reactronic";
38904
+ import { disposeRxObject, RxObject, signal, transaction } from "reactronic";
38905
38905
  var FileSystemTree = class extends RxObject {
38906
38906
  constructor(handleInconsistentRequestsWithoutErrors = false, deleteEmptyDirectories = false) {
38907
38907
  super();
38908
38908
  this.rootsByScheme = /* @__PURE__ */ new Map();
38909
38909
  this.version_ = 0;
38910
- this.createdDirectoriesVersion_ = 0;
38911
- this.deletedDirectoriesVersion_ = 0;
38910
+ this.createdEntriesVersion_ = 0;
38911
+ this.deletedEntriesVersion_ = 0;
38912
38912
  this.handleInconsistentRequestsWithoutErrors = handleInconsistentRequestsWithoutErrors;
38913
38913
  this.deleteEmptyDirectories = deleteEmptyDirectories;
38914
38914
  }
38915
38915
  get version() {
38916
38916
  return this.version_;
38917
38917
  }
38918
- get createdDirectoriesVersion() {
38919
- return this.createdDirectoriesVersion_;
38918
+ get createdEntriesVersion() {
38919
+ return this.createdEntriesVersion_;
38920
38920
  }
38921
- get deletedDirectoriesVersion() {
38922
- return this.deletedDirectoriesVersion_;
38921
+ get deletedEntriesVersion() {
38922
+ return this.deletedEntriesVersion_;
38923
38923
  }
38924
38924
  addFile(uri, text) {
38925
38925
  const directoryUri = uri.parentUri();
@@ -38964,7 +38964,7 @@ var FileSystemTree = class extends RxObject {
38964
38964
  fileOrDirectory.parent?.deleteChild(fileOrDirectory.name);
38965
38965
  fileOrDirectory.dispose();
38966
38966
  this.version_++;
38967
- this.deletedDirectoriesVersion_++;
38967
+ this.deletedEntriesVersion_++;
38968
38968
  }
38969
38969
  }
38970
38970
  }
@@ -39028,7 +39028,7 @@ var FileSystemTree = class extends RxObject {
39028
39028
  directory = new DirectoryInternal(rootUri, "", void 0);
39029
39029
  rootByAuthority.set(uri.authority, directory);
39030
39030
  this.version_++;
39031
- this.createdDirectoriesVersion_++;
39031
+ this.createdEntriesVersion_++;
39032
39032
  }
39033
39033
  let parentDirectory = directory;
39034
39034
  for (const segment of uri.segments) {
@@ -39048,7 +39048,7 @@ var FileSystemTree = class extends RxObject {
39048
39048
  const directory = new DirectoryInternal(childUri, name, parent);
39049
39049
  parent.addChild(directory);
39050
39050
  this.version_++;
39051
- this.createdDirectoriesVersion_++;
39051
+ this.createdEntriesVersion_++;
39052
39052
  return directory;
39053
39053
  } else {
39054
39054
  throw new Error(`\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u0441\u043E\u0437\u0434\u0430\u0442\u044C \u0434\u043E\u0447\u0435\u0440\u043D\u044E\u044E \u043F\u0430\u043F\u043A\u0443 ${name} (\u0440\u043E\u0434\u0438\u0442\u0435\u043B\u044C ${parent.uri}), \u043F\u043E\u0441\u043A\u043E\u043B\u044C\u043A\u0443 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0444\u0430\u0439\u043B \u0441 \u0442\u0430\u043A\u0438\u043C \u0438\u043C\u0435\u043D\u0435\u043C.`);
@@ -39060,7 +39060,7 @@ var FileSystemTree = class extends RxObject {
39060
39060
  const directory = new DirectoryInternal(childUri, name, parent);
39061
39061
  parent.addChild(directory);
39062
39062
  this.version_++;
39063
- this.createdDirectoriesVersion_++;
39063
+ this.createdEntriesVersion_++;
39064
39064
  return directory;
39065
39065
  }
39066
39066
  }
@@ -39075,6 +39075,7 @@ var FileSystemTree = class extends RxObject {
39075
39075
  const file2 = new FileInternal(childUri, name, "", parent);
39076
39076
  parent.addChild(file2);
39077
39077
  this.version_++;
39078
+ this.createdEntriesVersion_++;
39078
39079
  return file2;
39079
39080
  } else {
39080
39081
  throw new Error(`\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u0441\u043E\u0437\u0434\u0430\u0442\u044C \u0444\u0430\u0439\u043B ${name} (\u0440\u043E\u0434\u0438\u0442\u0435\u043B\u044C ${parent.uri}), \u043F\u043E\u0441\u043A\u043E\u043B\u044C\u043A\u0443 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043F\u0430\u043F\u043A\u0430 \u0441 \u0442\u0430\u043A\u0438\u043C \u0438\u043C\u0435\u043D\u0435\u043C.`);
@@ -39086,6 +39087,7 @@ var FileSystemTree = class extends RxObject {
39086
39087
  const file2 = new FileInternal(childUri, name, "", parent);
39087
39088
  parent.addChild(file2);
39088
39089
  this.version_++;
39090
+ this.createdEntriesVersion_++;
39089
39091
  return file2;
39090
39092
  }
39091
39093
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Compiler
3
- } from "./chunk-MCDBPZTR.js";
3
+ } from "./chunk-2VMQWZJQ.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-OE7B3OYN.js";
19
+ } from "./chunk-7IM7PHXU.js";
20
20
 
21
21
  // source/executor/FileSystemUri.ts
22
22
  import { platform } from "os";
@@ -5,11 +5,11 @@ export declare class FileSystemTree extends RxObject implements ReadonlyFileSyst
5
5
  private readonly deleteEmptyDirectories;
6
6
  private readonly rootsByScheme;
7
7
  private version_;
8
- private createdDirectoriesVersion_;
9
- private deletedDirectoriesVersion_;
8
+ private createdEntriesVersion_;
9
+ private deletedEntriesVersion_;
10
10
  get version(): number;
11
- get createdDirectoriesVersion(): number;
12
- get deletedDirectoriesVersion(): number;
11
+ get createdEntriesVersion(): number;
12
+ get deletedEntriesVersion(): number;
13
13
  constructor(handleInconsistentRequestsWithoutErrors?: boolean, deleteEmptyDirectories?: boolean);
14
14
  addFile(uri: Uri, text: string): File;
15
15
  addDirectory(uri: Uri): Directory;
@@ -27,8 +27,8 @@ export declare class FileSystemTree extends RxObject implements ReadonlyFileSyst
27
27
  }
28
28
  export interface ReadonlyFileSystemTree {
29
29
  get version(): number;
30
- get createdDirectoriesVersion(): number;
31
- get deletedDirectoriesVersion(): number;
30
+ get createdEntriesVersion(): number;
31
+ get deletedEntriesVersion(): number;
32
32
  getDirectory(uri: Uri): Directory | undefined;
33
33
  getFile(uri: Uri): File | undefined;
34
34
  getFileOrDirectory(uri: Uri): FileOrDirectory | undefined;
@@ -1,9 +1,9 @@
1
1
  import { RxArray, RxMap, RxObject } from 'reactronic';
2
+ import { TaskController } from '../../common/TaskController.js';
2
3
  import { Uri } from '../../common/Uri.js';
3
4
  import * as fsTree from '../../project/FileSystemTree.js';
4
5
  import { ReadonlyClientTrackedSourceFiles } from './ClientTrackedSourceFiles.js';
5
6
  import { FileSystemTreeProvider } from './WorkspaceFiles.js';
6
- import { TaskController } from '../../common/TaskController.js';
7
7
  export declare class ManuallyUpdatedFileSystemTreeProvider extends RxObject implements FileSystemTreeProvider {
8
8
  readonly fileSystemTree: fsTree.FileSystemTree;
9
9
  readonly loadedWorkspaceFolderByUri: RxMap<string, fsTree.Directory>;
@@ -17,6 +17,7 @@ export declare class Workspace extends RxObject {
17
17
  private readonly files;
18
18
  private readonly standardPackageContents;
19
19
  private readonly tsInteropInputsCache;
20
+ private sourceFileUris;
20
21
  get compilationControllers(): readonly CompilationController[];
21
22
  get trackedSourceFiles(): ReadonlyClientTrackedSourceFiles;
22
23
  get loadedWorkspaceFolderByUri(): RxMap<string, fsTree.Directory>;
@@ -39,6 +40,7 @@ export declare class Workspace extends RxObject {
39
40
  protected processControllersWithUnprocessedConfigs(): Promise<void>;
40
41
  protected updateIsDiagnosticsCollectionInBackgroundEnabled(): void;
41
42
  protected updateControllersWithOpenedFiles(): Promise<void>;
43
+ protected clearDiagnosticsForDeletedFiles(): Promise<void>;
42
44
  private deleteCompilationController;
43
45
  private createCompilationController;
44
46
  private getControllerToLoad;
@@ -49,10 +51,12 @@ export interface WorkspaceElementInfo {
49
51
  package?: SourcePackage;
50
52
  sourceFile?: SourceFile;
51
53
  }
54
+ export type ClearDiagnosticsHandler = (uri: Uri) => Promise<void>;
52
55
  export interface WorkspaceConfig {
53
56
  readonly fileSystemTreeProvider: FileSystemTreeProvider;
54
57
  readonly tsLibrariesProvider: TypeScriptLibrariesProvider;
55
58
  readonly diagnosticsCollectedInBackgroundHandler?: DiagnosticsCollectedInBackgroundHandler;
59
+ readonly clearDiagnosticsHandler?: ClearDiagnosticsHandler;
56
60
  readonly rawPackageConfigurationsChangedHandler?: RawPackageConfigurationsChangedHandler;
57
61
  readonly initiallyOpenedFileUris?: readonly Uri[];
58
62
  readonly namesOfDirectoriesToIgnore?: readonly string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artel/artc",
3
- "version": "0.9.26042",
3
+ "version": "0.9.26045-pre-release",
4
4
  "description": "Артель Компилятор | Artel Compiler",
5
5
  "author": "Nezaboodka Team <contact@nezaboodka.com>",
6
6
  "license": "Apache-2.0",
@@ -47,8 +47,8 @@
47
47
  "reactronic": "^0.96.26029",
48
48
  "typescript": "5.9.3",
49
49
  "vscode-json-languageservice": "5.4.2",
50
- "vscode-languageserver": "9.0.1",
51
- "vscode-languageserver-textdocument": "1.0.11",
50
+ "vscode-languageserver": "10.1.0",
51
+ "vscode-languageserver-textdocument": "1.0.12",
52
52
  "vscode-uri": "3.0.8"
53
53
  },
54
54
  "devDependencies": {