@theia/remote 1.45.0 → 1.46.0-next.241

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 (142) hide show
  1. package/README.md +1 -1
  2. package/lib/electron-browser/local-backend-services.d.ts +11 -0
  3. package/lib/electron-browser/local-backend-services.d.ts.map +1 -0
  4. package/lib/electron-browser/local-backend-services.js +37 -0
  5. package/lib/electron-browser/local-backend-services.js.map +1 -0
  6. package/lib/electron-browser/port-forwarding/port-forwading-contribution.d.ts +6 -0
  7. package/lib/electron-browser/port-forwarding/port-forwading-contribution.d.ts.map +1 -0
  8. package/lib/electron-browser/port-forwarding/port-forwading-contribution.js +40 -0
  9. package/lib/electron-browser/port-forwarding/port-forwading-contribution.js.map +1 -0
  10. package/lib/electron-browser/port-forwarding/port-forwarding-service.d.ts +20 -0
  11. package/lib/electron-browser/port-forwarding/port-forwarding-service.d.ts.map +1 -0
  12. package/lib/electron-browser/port-forwarding/port-forwarding-service.js +89 -0
  13. package/lib/electron-browser/port-forwarding/port-forwarding-service.js.map +1 -0
  14. package/lib/electron-browser/port-forwarding/port-forwarding-widget.d.ts +17 -0
  15. package/lib/electron-browser/port-forwarding/port-forwarding-widget.d.ts.map +1 -0
  16. package/lib/electron-browser/port-forwarding/port-forwarding-widget.js +125 -0
  17. package/lib/electron-browser/port-forwarding/port-forwarding-widget.js.map +1 -0
  18. package/lib/electron-browser/remote-electron-file-dialog-service.js +5 -13
  19. package/lib/electron-browser/remote-electron-file-dialog-service.js.map +1 -1
  20. package/lib/electron-browser/remote-frontend-contribution.d.ts +1 -1
  21. package/lib/electron-browser/remote-frontend-contribution.d.ts.map +1 -1
  22. package/lib/electron-browser/remote-frontend-contribution.js +27 -33
  23. package/lib/electron-browser/remote-frontend-contribution.js.map +1 -1
  24. package/lib/electron-browser/remote-frontend-module.d.ts +1 -0
  25. package/lib/electron-browser/remote-frontend-module.d.ts.map +1 -1
  26. package/lib/electron-browser/remote-frontend-module.js +29 -2
  27. package/lib/electron-browser/remote-frontend-module.js.map +1 -1
  28. package/lib/electron-browser/remote-preferences.d.ts +1 -1
  29. package/lib/electron-browser/remote-preferences.d.ts.map +1 -1
  30. package/lib/electron-browser/remote-registry-contribution.d.ts +1 -1
  31. package/lib/electron-browser/remote-registry-contribution.d.ts.map +1 -1
  32. package/lib/electron-browser/remote-registry-contribution.js +11 -16
  33. package/lib/electron-browser/remote-registry-contribution.js.map +1 -1
  34. package/lib/electron-browser/remote-service.js +3 -8
  35. package/lib/electron-browser/remote-service.js.map +1 -1
  36. package/lib/electron-browser/remote-ssh-contribution.js +12 -20
  37. package/lib/electron-browser/remote-ssh-contribution.js.map +1 -1
  38. package/lib/electron-browser/remote-user-storage-provider.d.ts +21 -0
  39. package/lib/electron-browser/remote-user-storage-provider.d.ts.map +1 -0
  40. package/lib/electron-browser/remote-user-storage-provider.js +75 -0
  41. package/lib/electron-browser/remote-user-storage-provider.js.map +1 -0
  42. package/lib/electron-common/remote-port-forwarding-provider.d.ts +12 -0
  43. package/lib/electron-common/remote-port-forwarding-provider.d.ts.map +1 -0
  44. package/lib/electron-common/remote-port-forwarding-provider.js +21 -0
  45. package/lib/electron-common/remote-port-forwarding-provider.js.map +1 -0
  46. package/lib/electron-common/remote-status-service.d.ts +2 -1
  47. package/lib/electron-common/remote-status-service.d.ts.map +1 -1
  48. package/lib/electron-node/backend-remote-service-impl.d.ts +1 -1
  49. package/lib/electron-node/backend-remote-service-impl.d.ts.map +1 -1
  50. package/lib/electron-node/backend-remote-service-impl.js +4 -9
  51. package/lib/electron-node/backend-remote-service-impl.js.map +1 -1
  52. package/lib/electron-node/remote-backend-module.d.ts.map +1 -1
  53. package/lib/electron-node/remote-backend-module.js +10 -4
  54. package/lib/electron-node/remote-backend-module.js.map +1 -1
  55. package/lib/electron-node/remote-connection-service.d.ts +2 -2
  56. package/lib/electron-node/remote-connection-service.d.ts.map +1 -1
  57. package/lib/electron-node/remote-connection-service.js +17 -19
  58. package/lib/electron-node/remote-connection-service.js.map +1 -1
  59. package/lib/electron-node/remote-connection-socket-provider.js +3 -8
  60. package/lib/electron-node/remote-connection-socket-provider.js.map +1 -1
  61. package/lib/electron-node/remote-port-forwarding-provider.d.ts +19 -0
  62. package/lib/electron-node/remote-port-forwarding-provider.d.ts.map +1 -0
  63. package/lib/electron-node/remote-port-forwarding-provider.js +59 -0
  64. package/lib/electron-node/remote-port-forwarding-provider.js.map +1 -0
  65. package/lib/electron-node/remote-proxy-server-provider.js +3 -8
  66. package/lib/electron-node/remote-proxy-server-provider.js.map +1 -1
  67. package/lib/electron-node/remote-status-service.d.ts +1 -0
  68. package/lib/electron-node/remote-status-service.d.ts.map +1 -1
  69. package/lib/electron-node/remote-status-service.js +11 -13
  70. package/lib/electron-node/remote-status-service.js.map +1 -1
  71. package/lib/electron-node/remote-types.d.ts +21 -8
  72. package/lib/electron-node/remote-types.d.ts.map +1 -1
  73. package/lib/electron-node/setup/app-native-dependency-contribution.d.ts +1 -1
  74. package/lib/electron-node/setup/app-native-dependency-contribution.d.ts.map +1 -1
  75. package/lib/electron-node/setup/app-native-dependency-contribution.js +3 -8
  76. package/lib/electron-node/setup/app-native-dependency-contribution.js.map +1 -1
  77. package/lib/electron-node/setup/main-copy-contribution.d.ts +1 -1
  78. package/lib/electron-node/setup/main-copy-contribution.d.ts.map +1 -1
  79. package/lib/electron-node/setup/main-copy-contribution.js +3 -8
  80. package/lib/electron-node/setup/main-copy-contribution.js.map +1 -1
  81. package/lib/electron-node/setup/remote-copy-contribution.d.ts +3 -19
  82. package/lib/electron-node/setup/remote-copy-contribution.d.ts.map +1 -1
  83. package/lib/electron-node/setup/remote-copy-contribution.js +20 -25
  84. package/lib/electron-node/setup/remote-copy-contribution.js.map +1 -1
  85. package/lib/electron-node/setup/remote-copy-service.d.ts +5 -3
  86. package/lib/electron-node/setup/remote-copy-service.d.ts.map +1 -1
  87. package/lib/electron-node/setup/remote-copy-service.js +14 -21
  88. package/lib/electron-node/setup/remote-copy-service.js.map +1 -1
  89. package/lib/electron-node/setup/remote-native-dependency-contribution.d.ts +2 -2
  90. package/lib/electron-node/setup/remote-native-dependency-contribution.d.ts.map +1 -1
  91. package/lib/electron-node/setup/remote-native-dependency-contribution.js +2 -2
  92. package/lib/electron-node/setup/remote-native-dependency-contribution.js.map +1 -1
  93. package/lib/electron-node/setup/remote-native-dependency-service.d.ts +1 -1
  94. package/lib/electron-node/setup/remote-native-dependency-service.d.ts.map +1 -1
  95. package/lib/electron-node/setup/remote-native-dependency-service.js +7 -15
  96. package/lib/electron-node/setup/remote-native-dependency-service.js.map +1 -1
  97. package/lib/electron-node/setup/remote-node-setup-service.d.ts +1 -1
  98. package/lib/electron-node/setup/remote-node-setup-service.d.ts.map +1 -1
  99. package/lib/electron-node/setup/remote-node-setup-service.js +7 -15
  100. package/lib/electron-node/setup/remote-node-setup-service.js.map +1 -1
  101. package/lib/electron-node/setup/remote-setup-script-service.d.ts +1 -1
  102. package/lib/electron-node/setup/remote-setup-script-service.d.ts.map +1 -1
  103. package/lib/electron-node/setup/remote-setup-script-service.js +11 -19
  104. package/lib/electron-node/setup/remote-setup-script-service.js.map +1 -1
  105. package/lib/electron-node/setup/remote-setup-service.d.ts +9 -2
  106. package/lib/electron-node/setup/remote-setup-service.d.ts.map +1 -1
  107. package/lib/electron-node/setup/remote-setup-service.js +39 -23
  108. package/lib/electron-node/setup/remote-setup-service.js.map +1 -1
  109. package/lib/electron-node/ssh/remote-ssh-connection-provider.d.ts +1 -1
  110. package/lib/electron-node/ssh/remote-ssh-connection-provider.d.ts.map +1 -1
  111. package/lib/electron-node/ssh/remote-ssh-connection-provider.js +28 -34
  112. package/lib/electron-node/ssh/remote-ssh-connection-provider.js.map +1 -1
  113. package/lib/electron-node/ssh/ssh-identity-file-collector.js +3 -8
  114. package/lib/electron-node/ssh/ssh-identity-file-collector.js.map +1 -1
  115. package/package.json +11 -10
  116. package/src/electron-browser/local-backend-services.ts +31 -0
  117. package/src/electron-browser/port-forwarding/port-forwading-contribution.ts +33 -0
  118. package/src/electron-browser/port-forwarding/port-forwarding-service.ts +93 -0
  119. package/src/electron-browser/port-forwarding/port-forwarding-widget.tsx +140 -0
  120. package/src/electron-browser/remote-frontend-contribution.ts +9 -7
  121. package/src/electron-browser/remote-frontend-module.ts +39 -3
  122. package/src/electron-browser/remote-registry-contribution.ts +9 -6
  123. package/src/electron-browser/remote-user-storage-provider.ts +64 -0
  124. package/src/electron-browser/style/port-forwarding-widget.css +44 -0
  125. package/src/electron-common/remote-port-forwarding-provider.ts +30 -0
  126. package/src/electron-common/remote-status-service.ts +3 -1
  127. package/src/electron-node/backend-remote-service-impl.ts +1 -1
  128. package/src/electron-node/remote-backend-module.ts +10 -3
  129. package/src/electron-node/remote-connection-service.ts +9 -4
  130. package/src/electron-node/remote-port-forwarding-provider.ts +66 -0
  131. package/src/electron-node/remote-status-service.ts +7 -0
  132. package/src/electron-node/remote-types.ts +20 -7
  133. package/src/electron-node/setup/app-native-dependency-contribution.ts +1 -1
  134. package/src/electron-node/setup/main-copy-contribution.ts +1 -1
  135. package/src/electron-node/setup/remote-copy-contribution.ts +14 -30
  136. package/src/electron-node/setup/remote-copy-service.ts +6 -4
  137. package/src/electron-node/setup/remote-native-dependency-contribution.ts +1 -1
  138. package/src/electron-node/setup/remote-native-dependency-service.ts +1 -1
  139. package/src/electron-node/setup/remote-node-setup-service.ts +1 -1
  140. package/src/electron-node/setup/remote-setup-script-service.ts +1 -1
  141. package/src/electron-node/setup/remote-setup-service.ts +31 -6
  142. package/src/electron-node/ssh/remote-ssh-connection-provider.ts +10 -8
@@ -14,21 +14,13 @@
14
14
  //
15
15
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
16
  // *****************************************************************************
17
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
- return c > 3 && r && Object.defineProperty(target, key, r), r;
22
- };
23
- var __metadata = (this && this.__metadata) || function (k, v) {
24
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
- };
26
17
  Object.defineProperty(exports, "__esModule", { value: true });
27
18
  exports.RemoteConnectionService = void 0;
19
+ const tslib_1 = require("tslib");
28
20
  const inversify_1 = require("@theia/core/shared/inversify");
29
21
  const core_1 = require("@theia/core");
30
22
  const remote_copy_service_1 = require("./setup/remote-copy-service");
31
- const remote_native_dependency_service_1 = require("./setup/remote-native-dependency-service");
23
+ const remote_setup_service_1 = require("./setup/remote-setup-service");
32
24
  let RemoteConnectionService = class RemoteConnectionService {
33
25
  constructor() {
34
26
  this.connections = new Map();
@@ -47,20 +39,26 @@ let RemoteConnectionService = class RemoteConnectionService {
47
39
  }
48
40
  onStop() {
49
41
  for (const connection of this.connections.values()) {
50
- connection.dispose();
42
+ if (connection.disposeSync) {
43
+ connection.disposeSync();
44
+ }
45
+ else {
46
+ connection.dispose();
47
+ }
48
+ ;
51
49
  }
52
50
  }
53
51
  };
54
- __decorate([
52
+ exports.RemoteConnectionService = RemoteConnectionService;
53
+ tslib_1.__decorate([
55
54
  (0, inversify_1.inject)(remote_copy_service_1.RemoteCopyService),
56
- __metadata("design:type", remote_copy_service_1.RemoteCopyService)
55
+ tslib_1.__metadata("design:type", remote_copy_service_1.RemoteCopyService)
57
56
  ], RemoteConnectionService.prototype, "copyService", void 0);
58
- __decorate([
59
- (0, inversify_1.inject)(remote_native_dependency_service_1.RemoteNativeDependencyService),
60
- __metadata("design:type", remote_native_dependency_service_1.RemoteNativeDependencyService)
61
- ], RemoteConnectionService.prototype, "nativeDependencyService", void 0);
62
- RemoteConnectionService = __decorate([
57
+ tslib_1.__decorate([
58
+ (0, inversify_1.inject)(remote_setup_service_1.RemoteSetupService),
59
+ tslib_1.__metadata("design:type", remote_setup_service_1.RemoteSetupService)
60
+ ], RemoteConnectionService.prototype, "remoteSetupService", void 0);
61
+ exports.RemoteConnectionService = RemoteConnectionService = tslib_1.__decorate([
63
62
  (0, inversify_1.injectable)()
64
63
  ], RemoteConnectionService);
65
- exports.RemoteConnectionService = RemoteConnectionService;
66
64
  //# sourceMappingURL=remote-connection-service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"remote-connection-service.js","sourceRoot":"","sources":["../../src/electron-node/remote-connection-service.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;;;;;;;;;AAEhF,4DAAkE;AAElE,sCAAyC;AACzC,qEAAgE;AAChE,+FAAyF;AAIzF,IAAa,uBAAuB,GAApC,MAAa,uBAAuB;IAApC;QAQuB,gBAAW,GAAG,IAAI,GAAG,EAA4B,CAAC;IAsBzE,CAAC;IApBG,aAAa,CAAC,EAAU;QACpB,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACpC,CAAC;IAED,qBAAqB,CAAC,IAAY;QAC9B,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,KAAK,IAAI,CAAC,CAAC;IACnG,CAAC;IAED,QAAQ,CAAC,UAA4B;QACjC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;QAChD,OAAO,iBAAU,CAAC,MAAM,CAAC,GAAG,EAAE;YAC1B,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;IACP,CAAC;IAED,MAAM;QACF,KAAK,MAAM,UAAU,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE;YAChD,UAAU,CAAC,OAAO,EAAE,CAAC;SACxB;IACL,CAAC;CACJ,CAAA;AA3BG;IADC,IAAA,kBAAM,EAAC,uCAAiB,CAAC;8BACM,uCAAiB;4DAAC;AAGlD;IADC,IAAA,kBAAM,EAAC,gEAA6B,CAAC;8BACM,gEAA6B;wEAAC;AANjE,uBAAuB;IADnC,IAAA,sBAAU,GAAE;GACA,uBAAuB,CA8BnC;AA9BY,0DAAuB"}
1
+ {"version":3,"file":"remote-connection-service.js","sourceRoot":"","sources":["../../src/electron-node/remote-connection-service.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,4DAAkE;AAElE,sCAAyC;AACzC,qEAAgE;AAEhE,uEAAkE;AAG3D,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAA7B;QASgB,gBAAW,GAAG,IAAI,GAAG,EAA4B,CAAC;IA0BzE,CAAC;IAxBG,aAAa,CAAC,EAAU;QACpB,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACpC,CAAC;IAED,qBAAqB,CAAC,IAAY;QAC9B,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,KAAK,IAAI,CAAC,CAAC;IACnG,CAAC;IAED,QAAQ,CAAC,UAA4B;QACjC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;QAChD,OAAO,iBAAU,CAAC,MAAM,CAAC,GAAG,EAAE;YAC1B,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;IACP,CAAC;IAED,MAAM;QACF,KAAK,MAAM,UAAU,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC;YACjD,IAAI,UAAU,CAAC,WAAW,EAAE,CAAC;gBACzB,UAAU,CAAC,WAAW,EAAE,CAAC;YAC7B,CAAC;iBAAM,CAAC;gBACJ,UAAU,CAAC,OAAO,EAAE,CAAC;YACzB,CAAC;YAAA,CAAC;QACN,CAAC;IACL,CAAC;CACJ,CAAA;AAnCY,0DAAuB;AAGb;IADlB,IAAA,kBAAM,EAAC,uCAAiB,CAAC;sCACM,uCAAiB;4DAAC;AAI/B;IADlB,IAAA,kBAAM,EAAC,yCAAkB,CAAC;sCACY,yCAAkB;mEAAC;kCAPjD,uBAAuB;IADnC,IAAA,sBAAU,GAAE;GACA,uBAAuB,CAmCnC"}
@@ -14,14 +14,9 @@
14
14
  //
15
15
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
16
  // *****************************************************************************
17
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
- return c > 3 && r && Object.defineProperty(target, key, r), r;
22
- };
23
17
  Object.defineProperty(exports, "__esModule", { value: true });
24
18
  exports.RemoteConnectionSocketProvider = void 0;
19
+ const tslib_1 = require("tslib");
25
20
  const inversify_1 = require("@theia/core/shared/inversify");
26
21
  const socket_io_client_1 = require("socket.io-client");
27
22
  let RemoteConnectionSocketProvider = class RemoteConnectionSocketProvider {
@@ -31,8 +26,8 @@ let RemoteConnectionSocketProvider = class RemoteConnectionSocketProvider {
31
26
  return socket;
32
27
  }
33
28
  };
34
- RemoteConnectionSocketProvider = __decorate([
29
+ exports.RemoteConnectionSocketProvider = RemoteConnectionSocketProvider;
30
+ exports.RemoteConnectionSocketProvider = RemoteConnectionSocketProvider = tslib_1.__decorate([
35
31
  (0, inversify_1.injectable)()
36
32
  ], RemoteConnectionSocketProvider);
37
- exports.RemoteConnectionSocketProvider = RemoteConnectionSocketProvider;
38
33
  //# sourceMappingURL=remote-connection-socket-provider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"remote-connection-socket-provider.js","sourceRoot":"","sources":["../../src/electron-node/remote-connection-socket-provider.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;;;;;;AAEhF,4DAA0D;AAC1D,uDAA8C;AAQ9C,IAAa,8BAA8B,GAA3C,MAAa,8BAA8B;IAEvC,cAAc,CAAC,OAAyC;QACpD,MAAM,MAAM,GAAG,IAAA,qBAAE,EAAC,kBAAkB,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;QACnE,MAAM,CAAC,OAAO,EAAE,CAAC;QACjB,OAAO,MAAM,CAAC;IAClB,CAAC;CAEJ,CAAA;AARY,8BAA8B;IAD1C,IAAA,sBAAU,GAAE;GACA,8BAA8B,CAQ1C;AARY,wEAA8B"}
1
+ {"version":3,"file":"remote-connection-socket-provider.js","sourceRoot":"","sources":["../../src/electron-node/remote-connection-socket-provider.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,4DAA0D;AAC1D,uDAA8C;AAQvC,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IAEvC,cAAc,CAAC,OAAyC;QACpD,MAAM,MAAM,GAAG,IAAA,qBAAE,EAAC,kBAAkB,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;QACnE,MAAM,CAAC,OAAO,EAAE,CAAC;QACjB,OAAO,MAAM,CAAC;IAClB,CAAC;CAEJ,CAAA;AARY,wEAA8B;yCAA9B,8BAA8B;IAD1C,IAAA,sBAAU,GAAE;GACA,8BAA8B,CAQ1C"}
@@ -0,0 +1,19 @@
1
+ /// <reference types="node" />
2
+ import { ForwardedPort, RemotePortForwardingProvider } from '../electron-common/remote-port-forwarding-provider';
3
+ import { Server } from 'net';
4
+ import { RemoteConnectionService } from './remote-connection-service';
5
+ import { RemoteConnection } from './remote-types';
6
+ interface ForwardInfo {
7
+ connection: RemoteConnection;
8
+ port: ForwardedPort;
9
+ server: Server;
10
+ }
11
+ export declare class RemotePortForwardingProviderImpl implements RemotePortForwardingProvider {
12
+ protected readonly connectionService: RemoteConnectionService;
13
+ protected static forwardedPorts: ForwardInfo[];
14
+ forwardPort(connectionPort: number, portToForward: ForwardedPort): Promise<void>;
15
+ portRemoved(forwardedPort: ForwardedPort): Promise<void>;
16
+ getForwardedPorts(): Promise<ForwardedPort[]>;
17
+ }
18
+ export {};
19
+ //# sourceMappingURL=remote-port-forwarding-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote-port-forwarding-provider.d.ts","sourceRoot":"","sources":["../../src/electron-node/remote-port-forwarding-provider.ts"],"names":[],"mappings":";AAiBA,OAAO,EAAE,aAAa,EAAE,4BAA4B,EAAE,MAAM,oDAAoD,CAAC;AACjH,OAAO,EAAgB,MAAM,EAAE,MAAM,KAAK,CAAC;AAC3C,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,UAAU,WAAW;IACjB,UAAU,EAAE,gBAAgB,CAAA;IAC5B,IAAI,EAAE,aAAa,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;CACjB;AAED,qBACa,gCAAiC,YAAW,4BAA4B;IAGjF,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,uBAAuB,CAAC;IAE9D,SAAS,CAAC,MAAM,CAAC,cAAc,EAAE,WAAW,EAAE,CAAM;IAE9C,WAAW,CAAC,cAAc,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBhF,WAAW,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAQxD,iBAAiB,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;CAItD"}
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2024 TypeFox and others.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ var RemotePortForwardingProviderImpl_1;
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.RemotePortForwardingProviderImpl = void 0;
20
+ const tslib_1 = require("tslib");
21
+ const inversify_1 = require("@theia/core/shared/inversify");
22
+ const net_1 = require("net");
23
+ const remote_connection_service_1 = require("./remote-connection-service");
24
+ let RemotePortForwardingProviderImpl = RemotePortForwardingProviderImpl_1 = class RemotePortForwardingProviderImpl {
25
+ async forwardPort(connectionPort, portToForward) {
26
+ const currentConnection = this.connectionService.getConnectionFromPort(connectionPort);
27
+ if (!currentConnection) {
28
+ throw new Error(`No connection found for port ${connectionPort}`);
29
+ }
30
+ const server = (0, net_1.createServer)(socket => {
31
+ currentConnection === null || currentConnection === void 0 ? void 0 : currentConnection.forwardOut(socket, portToForward.port);
32
+ }).listen(portToForward.port, portToForward.address);
33
+ currentConnection.onDidDisconnect(() => {
34
+ this.portRemoved(portToForward);
35
+ });
36
+ RemotePortForwardingProviderImpl_1.forwardedPorts.push({ connection: currentConnection, port: portToForward, server });
37
+ }
38
+ async portRemoved(forwardedPort) {
39
+ const forwardInfo = RemotePortForwardingProviderImpl_1.forwardedPorts.find(info => info.port.port === forwardedPort.port);
40
+ if (forwardInfo) {
41
+ forwardInfo.server.close();
42
+ RemotePortForwardingProviderImpl_1.forwardedPorts.splice(RemotePortForwardingProviderImpl_1.forwardedPorts.indexOf(forwardInfo), 1);
43
+ }
44
+ }
45
+ async getForwardedPorts() {
46
+ return Array.from(RemotePortForwardingProviderImpl_1.forwardedPorts)
47
+ .map(forwardInfo => ({ ...forwardInfo.port, editing: false }));
48
+ }
49
+ };
50
+ exports.RemotePortForwardingProviderImpl = RemotePortForwardingProviderImpl;
51
+ RemotePortForwardingProviderImpl.forwardedPorts = [];
52
+ tslib_1.__decorate([
53
+ (0, inversify_1.inject)(remote_connection_service_1.RemoteConnectionService),
54
+ tslib_1.__metadata("design:type", remote_connection_service_1.RemoteConnectionService)
55
+ ], RemotePortForwardingProviderImpl.prototype, "connectionService", void 0);
56
+ exports.RemotePortForwardingProviderImpl = RemotePortForwardingProviderImpl = RemotePortForwardingProviderImpl_1 = tslib_1.__decorate([
57
+ (0, inversify_1.injectable)()
58
+ ], RemotePortForwardingProviderImpl);
59
+ //# sourceMappingURL=remote-port-forwarding-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote-port-forwarding-provider.js","sourceRoot":"","sources":["../../src/electron-node/remote-port-forwarding-provider.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;;AAEhF,4DAAkE;AAElE,6BAA2C;AAC3C,2EAAsE;AAU/D,IAAM,gCAAgC,wCAAtC,MAAM,gCAAgC;IAOzC,KAAK,CAAC,WAAW,CAAC,cAAsB,EAAE,aAA4B;QAClE,MAAM,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC,qBAAqB,CAAC,cAAc,CAAC,CAAC;QACvF,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,gCAAgC,cAAc,EAAE,CAAC,CAAC;QACtE,CAAC;QAED,MAAM,MAAM,GAAG,IAAA,kBAAY,EAAC,MAAM,CAAC,EAAE;YACjC,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,UAAU,CAAC,MAAM,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;QAC9D,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;QAErD,iBAAiB,CAAC,eAAe,CAAC,GAAG,EAAE;YACnC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;QAEH,kCAAgC,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,iBAAiB,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC,CAAC;IACzH,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,aAA4B;QAC1C,MAAM,WAAW,GAAG,kCAAgC,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,aAAa,CAAC,IAAI,CAAC,CAAC;QACxH,IAAI,WAAW,EAAE,CAAC;YACd,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;YAC3B,kCAAgC,CAAC,cAAc,CAAC,MAAM,CAAC,kCAAgC,CAAC,cAAc,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC;QACpI,CAAC;IACL,CAAC;IAED,KAAK,CAAC,iBAAiB;QACnB,OAAO,KAAK,CAAC,IAAI,CAAC,kCAAgC,CAAC,cAAc,CAAC;aAC7D,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IACvE,CAAC;;AAnCQ,4EAAgC;AAKxB,+CAAc,GAAkB,EAAE,AAApB,CAAqB;AAFjC;IADlB,IAAA,kBAAM,EAAC,mDAAuB,CAAC;sCACM,mDAAuB;2EAAC;2CAHrD,gCAAgC;IAD5C,IAAA,sBAAU,GAAE;GACA,gCAAgC,CAoC5C"}
@@ -14,14 +14,9 @@
14
14
  //
15
15
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
16
  // *****************************************************************************
17
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
- return c > 3 && r && Object.defineProperty(target, key, r), r;
22
- };
23
17
  Object.defineProperty(exports, "__esModule", { value: true });
24
18
  exports.RemoteProxyServerProvider = void 0;
19
+ const tslib_1 = require("tslib");
25
20
  const promise_util_1 = require("@theia/core/lib/common/promise-util");
26
21
  const inversify_1 = require("@theia/core/shared/inversify");
27
22
  const net = require("net");
@@ -37,8 +32,8 @@ let RemoteProxyServerProvider = class RemoteProxyServerProvider {
37
32
  return proxy;
38
33
  }
39
34
  };
40
- RemoteProxyServerProvider = __decorate([
35
+ exports.RemoteProxyServerProvider = RemoteProxyServerProvider;
36
+ exports.RemoteProxyServerProvider = RemoteProxyServerProvider = tslib_1.__decorate([
41
37
  (0, inversify_1.injectable)()
42
38
  ], RemoteProxyServerProvider);
43
- exports.RemoteProxyServerProvider = RemoteProxyServerProvider;
44
39
  //# sourceMappingURL=remote-proxy-server-provider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"remote-proxy-server-provider.js","sourceRoot":"","sources":["../../src/electron-node/remote-proxy-server-provider.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;;;;;;AAEhF,sEAA+D;AAC/D,4DAA0D;AAC1D,2BAA2B;AAG3B,IAAa,yBAAyB,GAAtC,MAAa,yBAAyB;IAElC,KAAK,CAAC,cAAc,CAAC,QAAuC;QACxD,MAAM,QAAQ,GAAG,IAAI,uBAAQ,EAAE,CAAC;QAEhC,MAAM,KAAK,GAAG,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE;YACpC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,MAAM,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE;YACd,QAAQ,CAAC,OAAO,EAAE,CAAC;QACvB,CAAC,CAAC,CAAC;QAEH,MAAM,QAAQ,CAAC,OAAO,CAAC;QACvB,OAAO,KAAK,CAAC;IACjB,CAAC;CAEJ,CAAA;AAfY,yBAAyB;IADrC,IAAA,sBAAU,GAAE;GACA,yBAAyB,CAerC;AAfY,8DAAyB"}
1
+ {"version":3,"file":"remote-proxy-server-provider.js","sourceRoot":"","sources":["../../src/electron-node/remote-proxy-server-provider.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,sEAA+D;AAC/D,4DAA0D;AAC1D,2BAA2B;AAGpB,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IAElC,KAAK,CAAC,cAAc,CAAC,QAAuC;QACxD,MAAM,QAAQ,GAAG,IAAI,uBAAQ,EAAE,CAAC;QAEhC,MAAM,KAAK,GAAG,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE;YACpC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,MAAM,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE;YACd,QAAQ,CAAC,OAAO,EAAE,CAAC;QACvB,CAAC,CAAC,CAAC;QAEH,MAAM,QAAQ,CAAC,OAAO,CAAC;QACvB,OAAO,KAAK,CAAC;IACjB,CAAC;CAEJ,CAAA;AAfY,8DAAyB;oCAAzB,yBAAyB;IADrC,IAAA,sBAAU,GAAE;GACA,yBAAyB,CAerC"}
@@ -3,5 +3,6 @@ import { RemoteConnectionService } from './remote-connection-service';
3
3
  export declare class RemoteStatusServiceImpl implements RemoteStatusService {
4
4
  protected remoteConnectionService: RemoteConnectionService;
5
5
  getStatus(localPort: number): Promise<RemoteStatus>;
6
+ connectionClosed(localPort: number): Promise<void>;
6
7
  }
7
8
  //# sourceMappingURL=remote-status-service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"remote-status-service.d.ts","sourceRoot":"","sources":["../../src/electron-node/remote-status-service.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC7F,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,qBACa,uBAAwB,YAAW,mBAAmB;IAG/D,SAAS,CAAC,uBAAuB,EAAE,uBAAuB,CAAC;IAErD,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;CAc5D"}
1
+ {"version":3,"file":"remote-status-service.d.ts","sourceRoot":"","sources":["../../src/electron-node/remote-status-service.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC7F,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,qBACa,uBAAwB,YAAW,mBAAmB;IAG/D,SAAS,CAAC,uBAAuB,EAAE,uBAAuB,CAAC;IAErD,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAenD,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAM3D"}
@@ -14,17 +14,9 @@
14
14
  //
15
15
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
16
  // *****************************************************************************
17
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
- return c > 3 && r && Object.defineProperty(target, key, r), r;
22
- };
23
- var __metadata = (this && this.__metadata) || function (k, v) {
24
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
- };
26
17
  Object.defineProperty(exports, "__esModule", { value: true });
27
18
  exports.RemoteStatusServiceImpl = void 0;
19
+ const tslib_1 = require("tslib");
28
20
  const inversify_1 = require("@theia/core/shared/inversify");
29
21
  const remote_connection_service_1 = require("./remote-connection-service");
30
22
  let RemoteStatusServiceImpl = class RemoteStatusServiceImpl {
@@ -43,13 +35,19 @@ let RemoteStatusServiceImpl = class RemoteStatusServiceImpl {
43
35
  };
44
36
  }
45
37
  }
38
+ async connectionClosed(localPort) {
39
+ const connection = this.remoteConnectionService.getConnectionFromPort(localPort);
40
+ if (connection) {
41
+ connection.dispose();
42
+ }
43
+ }
46
44
  };
47
- __decorate([
45
+ exports.RemoteStatusServiceImpl = RemoteStatusServiceImpl;
46
+ tslib_1.__decorate([
48
47
  (0, inversify_1.inject)(remote_connection_service_1.RemoteConnectionService),
49
- __metadata("design:type", remote_connection_service_1.RemoteConnectionService)
48
+ tslib_1.__metadata("design:type", remote_connection_service_1.RemoteConnectionService)
50
49
  ], RemoteStatusServiceImpl.prototype, "remoteConnectionService", void 0);
51
- RemoteStatusServiceImpl = __decorate([
50
+ exports.RemoteStatusServiceImpl = RemoteStatusServiceImpl = tslib_1.__decorate([
52
51
  (0, inversify_1.injectable)()
53
52
  ], RemoteStatusServiceImpl);
54
- exports.RemoteStatusServiceImpl = RemoteStatusServiceImpl;
55
53
  //# sourceMappingURL=remote-status-service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"remote-status-service.js","sourceRoot":"","sources":["../../src/electron-node/remote-status-service.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;;;;;;;;;AAEhF,4DAAkE;AAElE,2EAAsE;AAGtE,IAAa,uBAAuB,GAApC,MAAa,uBAAuB;IAKhC,KAAK,CAAC,SAAS,CAAC,SAAiB;QAC7B,MAAM,UAAU,GAAG,IAAI,CAAC,uBAAuB,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC;QACjF,IAAI,UAAU,EAAE;YACZ,OAAO;gBACH,KAAK,EAAE,IAAI;gBACX,IAAI,EAAE,UAAU,CAAC,IAAI;gBACrB,IAAI,EAAE,UAAU,CAAC,IAAI;aACxB,CAAC;SACL;aAAM;YACH,OAAO;gBACH,KAAK,EAAE,KAAK;aACf,CAAC;SACL;IACL,CAAC;CACJ,CAAA;AAhBG;IADC,IAAA,kBAAM,EAAC,mDAAuB,CAAC;8BACG,mDAAuB;wEAAC;AAHlD,uBAAuB;IADnC,IAAA,sBAAU,GAAE;GACA,uBAAuB,CAmBnC;AAnBY,0DAAuB"}
1
+ {"version":3,"file":"remote-status-service.js","sourceRoot":"","sources":["../../src/electron-node/remote-status-service.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,4DAAkE;AAElE,2EAAsE;AAG/D,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAKhC,KAAK,CAAC,SAAS,CAAC,SAAiB;QAC7B,MAAM,UAAU,GAAG,IAAI,CAAC,uBAAuB,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC;QACjF,IAAI,UAAU,EAAE,CAAC;YACb,OAAO;gBACH,KAAK,EAAE,IAAI;gBACX,IAAI,EAAE,UAAU,CAAC,IAAI;gBACrB,IAAI,EAAE,UAAU,CAAC,IAAI;aACxB,CAAC;QACN,CAAC;aAAM,CAAC;YACJ,OAAO;gBACH,KAAK,EAAE,KAAK;aACf,CAAC;QACN,CAAC;IACL,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,SAAiB;QACpC,MAAM,UAAU,GAAG,IAAI,CAAC,uBAAuB,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC;QACjF,IAAI,UAAU,EAAE,CAAC;YACb,UAAU,CAAC,OAAO,EAAE,CAAC;QACzB,CAAC;IACL,CAAC;CACJ,CAAA;AA1BY,0DAAuB;AAGtB;IADT,IAAA,kBAAM,EAAC,mDAAuB,CAAC;sCACG,mDAAuB;wEAAC;kCAHlD,uBAAuB;IADnC,IAAA,sBAAU,GAAE;GACA,uBAAuB,CA0BnC"}
@@ -1,11 +1,10 @@
1
1
  /// <reference types="node" />
2
- import { Disposable, Event, OS } from '@theia/core';
2
+ /// <reference types="node" />
3
+ /// <reference types="node" />
4
+ /// <reference types="node" />
5
+ import { Disposable, Event } from '@theia/core';
3
6
  import * as net from 'net';
4
- export interface RemotePlatform {
5
- os: OS.Type;
6
- arch: string;
7
- }
8
- export declare type RemoteStatusReport = (message: string) => void;
7
+ export type RemoteStatusReport = (message: string) => void;
9
8
  export interface ExpressLayer {
10
9
  name: string;
11
10
  regexp: RegExp;
@@ -19,7 +18,7 @@ export interface RemoteExecResult {
19
18
  stdout: string;
20
19
  stderr: string;
21
20
  }
22
- export declare type RemoteExecTester = (stdout: string, stderr: string) => boolean;
21
+ export type RemoteExecTester = (stdout: string, stderr: string) => boolean;
23
22
  export interface RemoteConnection extends Disposable {
24
23
  id: string;
25
24
  name: string;
@@ -27,9 +26,23 @@ export interface RemoteConnection extends Disposable {
27
26
  localPort: number;
28
27
  remotePort: number;
29
28
  onDidDisconnect: Event<void>;
30
- forwardOut(socket: net.Socket): void;
29
+ forwardOut(socket: net.Socket, port?: number): void;
30
+ /**
31
+ * execute a single command on the remote machine
32
+ */
31
33
  exec(cmd: string, args?: string[], options?: RemoteExecOptions): Promise<RemoteExecResult>;
34
+ /**
35
+ * execute a command on the remote machine and wait for a specific output
36
+ * @param tester function which returns true if the output is as expected
37
+ */
32
38
  execPartial(cmd: string, tester: RemoteExecTester, args?: string[], options?: RemoteExecOptions): Promise<RemoteExecResult>;
39
+ /**
40
+ * copy files from local to remote
41
+ */
33
42
  copy(localPath: string | Buffer | NodeJS.ReadableStream, remotePath: string): Promise<void>;
43
+ /**
44
+ * used for disposing when theia is shutting down
45
+ */
46
+ disposeSync?(): void;
34
47
  }
35
48
  //# sourceMappingURL=remote-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"remote-types.d.ts","sourceRoot":"","sources":["../../src/electron-node/remote-types.ts"],"names":[],"mappings":";AAgBA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAE3B,MAAM,WAAW,cAAc;IAC3B,EAAE,EAAE,EAAE,CAAC,IAAI,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACf;AAED,oBAAY,kBAAkB,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;AAE3D,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,QAAQ,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA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,MAAM,CAAC,cAAc,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5F;;OAEG;IACH,WAAW,CAAC,IAAI,IAAI,CAAC;CACxB"}
@@ -1,5 +1,5 @@
1
1
  import { RemoteNativeDependencyContribution, DownloadOptions, DependencyDownload } from './remote-native-dependency-contribution';
2
- import { RemotePlatform } from '../remote-types';
2
+ import { RemotePlatform } from '@theia/core/lib/node/remote/remote-cli-contribution';
3
3
  export declare class AppNativeDependencyContribution implements RemoteNativeDependencyContribution {
4
4
  appDownloadUrlBase: string;
5
5
  protected getDefaultURLForFile(remotePlatform: RemotePlatform, theiaVersion: string): string;
@@ -1 +1 @@
1
- {"version":3,"file":"app-native-dependency-contribution.d.ts","sourceRoot":"","sources":["../../../src/electron-node/setup/app-native-dependency-contribution.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,kCAAkC,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAClI,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGjD,qBACa,+BAAgC,YAAW,kCAAkC;IAEtF,kBAAkB,SAA8D;IAEhF,SAAS,CAAC,oBAAoB,CAAC,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM;IAetF,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAMxE"}
1
+ {"version":3,"file":"app-native-dependency-contribution.d.ts","sourceRoot":"","sources":["../../../src/electron-node/setup/app-native-dependency-contribution.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,kCAAkC,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAClI,OAAO,EAAE,cAAc,EAAE,MAAM,qDAAqD,CAAC;AAGrF,qBACa,+BAAgC,YAAW,kCAAkC;IAEtF,kBAAkB,SAA8D;IAEhF,SAAS,CAAC,oBAAoB,CAAC,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM;IAetF,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAMxE"}
@@ -14,14 +14,9 @@
14
14
  //
15
15
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
16
  // *****************************************************************************
17
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
- return c > 3 && r && Object.defineProperty(target, key, r), r;
22
- };
23
17
  Object.defineProperty(exports, "__esModule", { value: true });
24
18
  exports.AppNativeDependencyContribution = void 0;
19
+ const tslib_1 = require("tslib");
25
20
  const inversify_1 = require("@theia/core/shared/inversify");
26
21
  const core_1 = require("@theia/core");
27
22
  let AppNativeDependencyContribution = class AppNativeDependencyContribution {
@@ -51,8 +46,8 @@ let AppNativeDependencyContribution = class AppNativeDependencyContribution {
51
46
  };
52
47
  }
53
48
  };
54
- AppNativeDependencyContribution = __decorate([
49
+ exports.AppNativeDependencyContribution = AppNativeDependencyContribution;
50
+ exports.AppNativeDependencyContribution = AppNativeDependencyContribution = tslib_1.__decorate([
55
51
  (0, inversify_1.injectable)()
56
52
  ], AppNativeDependencyContribution);
57
- exports.AppNativeDependencyContribution = AppNativeDependencyContribution;
58
53
  //# sourceMappingURL=app-native-dependency-contribution.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"app-native-dependency-contribution.js","sourceRoot":"","sources":["../../../src/electron-node/setup/app-native-dependency-contribution.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC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;IACN,CAAC;CACJ,CAAA;AAzBY,0EAA+B;0CAA/B,+BAA+B;IAD3C,IAAA,sBAAU,GAAE;GACA,+BAA+B,CAyB3C"}
@@ -1,4 +1,4 @@
1
- import { RemoteCopyContribution, RemoteCopyRegistry } from './remote-copy-contribution';
1
+ import { RemoteCopyContribution, RemoteCopyRegistry } from '@theia/core/lib/node/remote/remote-copy-contribution';
2
2
  export declare class MainCopyContribution implements RemoteCopyContribution {
3
3
  copy(registry: RemoteCopyRegistry): Promise<void>;
4
4
  }
@@ -1 +1 @@
1
- {"version":3,"file":"main-copy-contribution.d.ts","sourceRoot":"","sources":["../../../src/electron-node/setup/main-copy-contribution.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAExF,qBACa,oBAAqB,YAAW,sBAAsB;IACzD,IAAI,CAAC,QAAQ,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;CAM1D"}
1
+ {"version":3,"file":"main-copy-contribution.d.ts","sourceRoot":"","sources":["../../../src/electron-node/setup/main-copy-contribution.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AAElH,qBACa,oBAAqB,YAAW,sBAAsB;IACzD,IAAI,CAAC,QAAQ,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;CAM1D"}
@@ -14,14 +14,9 @@
14
14
  //
15
15
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
16
  // *****************************************************************************
17
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
- return c > 3 && r && Object.defineProperty(target, key, r), r;
22
- };
23
17
  Object.defineProperty(exports, "__esModule", { value: true });
24
18
  exports.MainCopyContribution = void 0;
19
+ const tslib_1 = require("tslib");
25
20
  const inversify_1 = require("@theia/core/shared/inversify");
26
21
  let MainCopyContribution = class MainCopyContribution {
27
22
  async copy(registry) {
@@ -31,8 +26,8 @@ let MainCopyContribution = class MainCopyContribution {
31
26
  await registry.directory('lib/webview');
32
27
  }
33
28
  };
34
- MainCopyContribution = __decorate([
29
+ exports.MainCopyContribution = MainCopyContribution;
30
+ exports.MainCopyContribution = MainCopyContribution = tslib_1.__decorate([
35
31
  (0, inversify_1.injectable)()
36
32
  ], MainCopyContribution);
37
- exports.MainCopyContribution = MainCopyContribution;
38
33
  //# sourceMappingURL=main-copy-contribution.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"main-copy-contribution.js","sourceRoot":"","sources":["../../../src/electron-node/setup/main-copy-contribution.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;;;;;;AAEhF,4DAA0D;AAI1D,IAAa,oBAAoB,GAAjC,MAAa,oBAAoB;IAC7B,KAAK,CAAC,IAAI,CAAC,QAA4B;QACnC,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC9B,MAAM,QAAQ,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QAC3C,MAAM,QAAQ,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;QACzC,MAAM,QAAQ,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;IAC5C,CAAC;CACJ,CAAA;AAPY,oBAAoB;IADhC,IAAA,sBAAU,GAAE;GACA,oBAAoB,CAOhC;AAPY,oDAAoB"}
1
+ {"version":3,"file":"main-copy-contribution.js","sourceRoot":"","sources":["../../../src/electron-node/setup/main-copy-contribution.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,4DAA0D;AAInD,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC7B,KAAK,CAAC,IAAI,CAAC,QAA4B;QACnC,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC9B,MAAM,QAAQ,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QAC3C,MAAM,QAAQ,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;QACzC,MAAM,QAAQ,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;IAC5C,CAAC;CACJ,CAAA;AAPY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,sBAAU,GAAE;GACA,oBAAoB,CAOhC"}
@@ -1,27 +1,11 @@
1
1
  import { ApplicationPackage } from '@theia/core/shared/@theia/application-package';
2
- import { MaybePromise } from '@theia/core';
3
- export declare const RemoteCopyContribution: unique symbol;
4
- export interface RemoteCopyContribution {
5
- copy(registry: RemoteCopyRegistry): MaybePromise<void>;
6
- }
7
- export interface RemoteCopyOptions {
8
- /**
9
- * The mode that the file should be set to once copied to the remote.
10
- *
11
- * Only relevant for POSIX-like systems
12
- */
13
- mode?: number;
14
- }
15
- export interface RemoteFile {
16
- path: string;
17
- target: string;
18
- options?: RemoteCopyOptions;
19
- }
20
- export declare class RemoteCopyRegistry {
2
+ import { RemoteCopyRegistry, RemoteFile, RemoteCopyOptions } from '@theia/core/lib/node/remote/remote-copy-contribution';
3
+ export declare class RemoteCopyRegistryImpl implements RemoteCopyRegistry {
21
4
  protected readonly applicationPackage: ApplicationPackage;
22
5
  protected readonly files: RemoteFile[];
23
6
  getFiles(): RemoteFile[];
24
7
  glob(pattern: string, target?: string): Promise<void>;
8
+ doGlob(pattern: string, cwd: string, target?: string): Promise<void>;
25
9
  file(file: string, target?: string, options?: RemoteCopyOptions): void;
26
10
  directory(dir: string, target?: string): Promise<void>;
27
11
  protected withTarget(file: string, target?: string): string;
@@ -1 +1 @@
1
- {"version":3,"file":"remote-copy-contribution.d.ts","sourceRoot":"","sources":["../../../src/electron-node/setup/remote-copy-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AAKnF,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI3C,eAAO,MAAM,sBAAsB,eAAmC,CAAC;AAEvE,MAAM,WAAW,sBAAsB;IACnC,IAAI,CAAC,QAAQ,EAAE,kBAAkB,GAAG,YAAY,CAAC,IAAI,CAAC,CAAA;CACzD;AAED,MAAM,WAAW,iBAAiB;IAC9B;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC/B;AAED,qBACa,kBAAkB;IAG3B,SAAS,CAAC,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAE1D,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,UAAU,EAAE,CAAM;IAE5C,QAAQ,IAAI,UAAU,EAAE;IAIlB,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAe3D,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,IAAI;IAShE,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI5D,SAAS,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM;CAG9D"}
1
+ {"version":3,"file":"remote-copy-contribution.d.ts","sourceRoot":"","sources":["../../../src/electron-node/setup/remote-copy-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AAEnF,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,sDAAsD,CAAC;AAOzH,qBACa,sBAAuB,YAAW,kBAAkB;IAG7D,SAAS,CAAC,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAE1D,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,UAAU,EAAE,CAAM;IAE5C,QAAQ,IAAI,UAAU,EAAE;IAIlB,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIrD,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAY1E,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,IAAI;IAShE,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ5D,SAAS,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM;CAG9D"}
@@ -14,25 +14,16 @@
14
14
  //
15
15
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
16
  // *****************************************************************************
17
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
- return c > 3 && r && Object.defineProperty(target, key, r), r;
22
- };
23
- var __metadata = (this && this.__metadata) || function (k, v) {
24
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
- };
26
17
  Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.RemoteCopyRegistry = exports.RemoteCopyContribution = void 0;
18
+ exports.RemoteCopyRegistryImpl = void 0;
19
+ const tslib_1 = require("tslib");
28
20
  const application_package_1 = require("@theia/core/shared/@theia/application-package");
29
21
  const inversify_1 = require("@theia/core/shared/inversify");
30
22
  const glob_1 = require("glob");
31
23
  const util_1 = require("util");
32
24
  const path = require("path");
33
25
  const promiseGlob = (0, util_1.promisify)(glob_1.glob);
34
- exports.RemoteCopyContribution = Symbol('RemoteCopyContribution');
35
- let RemoteCopyRegistry = class RemoteCopyRegistry {
26
+ let RemoteCopyRegistryImpl = class RemoteCopyRegistryImpl {
36
27
  constructor() {
37
28
  this.files = [];
38
29
  }
@@ -40,15 +31,15 @@ let RemoteCopyRegistry = class RemoteCopyRegistry {
40
31
  return this.files.slice();
41
32
  }
42
33
  async glob(pattern, target) {
34
+ return this.doGlob(pattern, this.applicationPackage.projectPath, target);
35
+ }
36
+ async doGlob(pattern, cwd, target) {
43
37
  const projectPath = this.applicationPackage.projectPath;
44
- const globResult = await promiseGlob(pattern, {
45
- cwd: projectPath
46
- });
47
- const relativeFiles = globResult.map(file => path.relative(projectPath, file));
48
- for (const file of relativeFiles) {
38
+ const globResult = await promiseGlob(pattern, { cwd, nodir: true });
39
+ for (const file of globResult) {
49
40
  const targetFile = this.withTarget(file, target);
50
41
  this.files.push({
51
- path: file,
42
+ path: path.relative(projectPath, path.resolve(cwd, file)),
52
43
  target: targetFile
53
44
  });
54
45
  }
@@ -62,18 +53,22 @@ let RemoteCopyRegistry = class RemoteCopyRegistry {
62
53
  });
63
54
  }
64
55
  async directory(dir, target) {
65
- return this.glob(dir + '/**', target);
56
+ let absoluteDir = dir;
57
+ if (!path.isAbsolute(absoluteDir)) {
58
+ absoluteDir = path.join(this.applicationPackage.projectPath, dir);
59
+ }
60
+ return this.doGlob('**/*', absoluteDir, target !== null && target !== void 0 ? target : dir);
66
61
  }
67
62
  withTarget(file, target) {
68
63
  return target ? path.join(target, file) : file;
69
64
  }
70
65
  };
71
- __decorate([
66
+ exports.RemoteCopyRegistryImpl = RemoteCopyRegistryImpl;
67
+ tslib_1.__decorate([
72
68
  (0, inversify_1.inject)(application_package_1.ApplicationPackage),
73
- __metadata("design:type", application_package_1.ApplicationPackage)
74
- ], RemoteCopyRegistry.prototype, "applicationPackage", void 0);
75
- RemoteCopyRegistry = __decorate([
69
+ tslib_1.__metadata("design:type", application_package_1.ApplicationPackage)
70
+ ], RemoteCopyRegistryImpl.prototype, "applicationPackage", void 0);
71
+ exports.RemoteCopyRegistryImpl = RemoteCopyRegistryImpl = tslib_1.__decorate([
76
72
  (0, inversify_1.injectable)()
77
- ], RemoteCopyRegistry);
78
- exports.RemoteCopyRegistry = RemoteCopyRegistry;
73
+ ], RemoteCopyRegistryImpl);
79
74
  //# sourceMappingURL=remote-copy-contribution.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"remote-copy-contribution.js","sourceRoot":"","sources":["../../../src/electron-node/setup/remote-copy-contribution.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE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CAAC,KAAK,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,UAAU;YAClB,OAAO;SACV,CAAC,CAAC;IACP,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,GAAW,EAAE,MAAe;QACxC,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,KAAK,EAAE,MAAM,CAAC,CAAC;IAC1C,CAAC;IAES,UAAU,CAAC,IAAY,EAAE,MAAe;QAC9C,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACnD,CAAC;CACJ,CAAA;AAvCG;IADC,IAAA,kBAAM,EAAC,wCAAkB,CAAC;8BACY,wCAAkB;8DAAC;AAHjD,kBAAkB;IAD9B,IAAA,sBAAU,GAAE;GACA,kBAAkB,CA0C9B;AA1CY,gDAAkB"}
1
+ {"version":3,"file":"remote-copy-contribution.js","sourceRoot":"","sources":["../../../src/electron-node/setup/remote-copy-contribution.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,uFAAmF;AACnF,4DAAkE;AAElE,+BAA4C;AAC5C,+BAAiC;AACjC,6BAA6B;AAE7B,MAAM,WAAW,GAAG,IAAA,gBAAS,EAAC,WAAY,CAAC,CAAC;AAGrC,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAA5B;QAKgB,UAAK,GAAiB,EAAE,CAAC;IA0ChD,CAAC;IAxCG,QAAQ;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,O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AAO,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,GAAG,CAAC,CAAC;IAC3D,CAAC;IAES,UAAU,CAAC,IAAY,EAAE,MAAe;QAC9C,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACnD,CAAC;CACJ,CAAA;AA/CY,wDAAsB;AAGZ;IADlB,IAAA,kBAAM,EAAC,wCAAkB,CAAC;sCACY,wCAAkB;kEAAC;iCAHjD,sBAAsB;IADlC,IAAA,sBAAU,GAAE;GACA,sBAAsB,CA+ClC"}
@@ -1,11 +1,13 @@
1
1
  import { ApplicationPackage } from '@theia/core/shared/@theia/application-package';
2
- import { RemoteConnection, RemotePlatform } from '../remote-types';
2
+ import { RemoteConnection } from '../remote-types';
3
+ import { RemotePlatform } from '@theia/core/lib/node/remote/remote-cli-contribution';
3
4
  import { RemoteNativeDependencyService } from './remote-native-dependency-service';
4
5
  import { ContributionProvider } from '@theia/core';
5
- import { RemoteCopyContribution, RemoteCopyRegistry, RemoteFile } from './remote-copy-contribution';
6
+ import { RemoteCopyRegistryImpl } from './remote-copy-contribution';
7
+ import { RemoteCopyContribution, RemoteFile } from '@theia/core/lib/node/remote/remote-copy-contribution';
6
8
  export declare class RemoteCopyService {
7
9
  protected readonly applicationPackage: ApplicationPackage;
8
- protected readonly copyRegistry: RemoteCopyRegistry;
10
+ protected readonly copyRegistry: RemoteCopyRegistryImpl;
9
11
  protected readonly nativeDependencyService: RemoteNativeDependencyService;
10
12
  protected readonly copyContributions: ContributionProvider<RemoteCopyContribution>;
11
13
  protected initialized: boolean;