@eclipse-glsp/server 1.1.0-next.e49c816.56 → 1.1.0-next.f0fc2cf.63

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.
Files changed (43) hide show
  1. package/lib/common/di/diagram-module.d.ts +3 -0
  2. package/lib/common/di/diagram-module.d.ts.map +1 -1
  3. package/lib/common/di/diagram-module.js +14 -5
  4. package/lib/common/di/diagram-module.js.map +1 -1
  5. package/lib/common/features/model/model-submission-handler.d.ts +2 -0
  6. package/lib/common/features/model/model-submission-handler.d.ts.map +1 -1
  7. package/lib/common/features/model/model-submission-handler.js +10 -0
  8. package/lib/common/features/model/model-submission-handler.js.map +1 -1
  9. package/lib/common/features/model/request-model-action-handler.d.ts +5 -6
  10. package/lib/common/features/model/request-model-action-handler.d.ts.map +1 -1
  11. package/lib/common/features/model/request-model-action-handler.js +34 -12
  12. package/lib/common/features/model/request-model-action-handler.js.map +1 -1
  13. package/lib/common/features/progress/progress-service.d.ts +44 -0
  14. package/lib/common/features/progress/progress-service.d.ts.map +1 -0
  15. package/lib/common/features/progress/progress-service.js +50 -0
  16. package/lib/common/features/progress/progress-service.js.map +1 -0
  17. package/lib/common/features/validation/model-validator.d.ts +47 -2
  18. package/lib/common/features/validation/model-validator.d.ts.map +1 -1
  19. package/lib/common/features/validation/model-validator.js +79 -1
  20. package/lib/common/features/validation/model-validator.js.map +1 -1
  21. package/lib/common/features/validation/request-markers-handler.d.ts +15 -0
  22. package/lib/common/features/validation/request-markers-handler.d.ts.map +1 -1
  23. package/lib/common/features/validation/request-markers-handler.js +3 -9
  24. package/lib/common/features/validation/request-markers-handler.js.map +1 -1
  25. package/lib/common/utils/client-options-util.d.ts +3 -0
  26. package/lib/common/utils/client-options-util.d.ts.map +1 -1
  27. package/lib/common/utils/client-options-util.js +5 -15
  28. package/lib/common/utils/client-options-util.js.map +1 -1
  29. package/lib/node/abstract-json-model-storage.d.ts.map +1 -1
  30. package/lib/node/abstract-json-model-storage.js +8 -2
  31. package/lib/node/abstract-json-model-storage.js.map +1 -1
  32. package/lib/node/launch/cli-parser.js +1 -1
  33. package/lib/node/launch/cli-parser.js.map +1 -1
  34. package/package.json +3 -4
  35. package/src/common/di/diagram-module.ts +20 -7
  36. package/src/common/features/model/model-submission-handler.ts +12 -0
  37. package/src/common/features/model/request-model-action-handler.ts +36 -16
  38. package/src/common/features/progress/progress-service.ts +74 -0
  39. package/src/common/features/validation/model-validator.ts +75 -3
  40. package/src/common/features/validation/request-markers-handler.ts +4 -10
  41. package/src/common/utils/client-options-util.ts +8 -0
  42. package/src/node/abstract-json-model-storage.ts +8 -2
  43. package/src/node/launch/cli-parser.ts +1 -1
@@ -13,10 +13,18 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
+ import { Args } from '@eclipse-glsp/protocol';
17
+ import { ArgsUtil } from './args-util';
18
+
16
19
  export class ClientOptionsUtil {
17
20
  private static FILE_PREFIX = 'file://';
21
+ public static IS_RECONNECTING = 'isReconnecting';
18
22
 
19
23
  public static adaptUri(uri: string): string {
20
24
  return uri.replace(this.FILE_PREFIX, '');
21
25
  }
26
+
27
+ public static isReconnecting(options?: Args): boolean {
28
+ return ArgsUtil.getBoolean(options, ClientOptionsUtil.IS_RECONNECTING);
29
+ }
22
30
  }
@@ -14,8 +14,9 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
  import { MaybePromise, RequestModelAction, SaveModelAction, TypeGuard } from '@eclipse-glsp/protocol';
17
- import * as fs from 'fs-extra';
17
+ import * as fs from 'fs';
18
18
  import { inject, injectable } from 'inversify';
19
+ import * as os from 'os';
19
20
  import { fileURLToPath } from 'url';
20
21
  import { ModelState, SOURCE_URI_ARG } from '../common/features/model/model-state';
21
22
  import { SourceModelStorage } from '../common/features/model/source-model-storage';
@@ -91,7 +92,12 @@ export abstract class AbstractJsonModelStorage implements SourceModelStorage {
91
92
  }
92
93
 
93
94
  protected toPath(sourceUri: string): string {
94
- return sourceUri.startsWith('file://') ? fileURLToPath(sourceUri) : sourceUri;
95
+ let path = sourceUri.startsWith('file://') ? fileURLToPath(sourceUri) : sourceUri;
96
+ if (os.platform() === 'win32') {
97
+ // Remove the leading slash if it exists (Windows paths don't have it)
98
+ path = path.replace(/^\//, '');
99
+ }
100
+ return path;
95
101
  }
96
102
 
97
103
  protected getFileUri(action: SaveModelAction): string {
@@ -14,7 +14,7 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
  import * as cmd from 'commander';
17
- import * as fs from 'fs-extra';
17
+ import * as fs from 'fs';
18
18
  import * as path from 'path';
19
19
  import { LogLevel, LoggerConfigOptions, asLogLevel } from '../../common/utils/logger';
20
20