@theia/mini-browser 1.45.0 → 1.46.0-next.72

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 (63) hide show
  1. package/README.md +45 -45
  2. package/lib/browser/environment/mini-browser-environment-module.d.ts +3 -3
  3. package/lib/browser/environment/mini-browser-environment-module.js +24 -24
  4. package/lib/browser/environment/mini-browser-environment.d.ts +25 -25
  5. package/lib/browser/environment/mini-browser-environment.js +95 -95
  6. package/lib/browser/environment/mini-browser-environment.js.map +1 -1
  7. package/lib/browser/location-mapper-service.d.ts +58 -58
  8. package/lib/browser/location-mapper-service.js +140 -140
  9. package/lib/browser/mini-browser-content-style.d.ts +17 -17
  10. package/lib/browser/mini-browser-content-style.js +36 -36
  11. package/lib/browser/mini-browser-content.d.ts +177 -177
  12. package/lib/browser/mini-browser-content.js +554 -554
  13. package/lib/browser/mini-browser-frontend-module.d.ts +4 -4
  14. package/lib/browser/mini-browser-frontend-module.js +70 -70
  15. package/lib/browser/mini-browser-frontend-security-warnings.d.ts +11 -11
  16. package/lib/browser/mini-browser-frontend-security-warnings.js +73 -73
  17. package/lib/browser/mini-browser-open-handler.d.ts +76 -76
  18. package/lib/browser/mini-browser-open-handler.js +292 -292
  19. package/lib/browser/mini-browser.d.ts +25 -25
  20. package/lib/browser/mini-browser.js +118 -118
  21. package/lib/common/mini-browser-endpoint.d.ts +12 -12
  22. package/lib/common/mini-browser-endpoint.js +31 -31
  23. package/lib/common/mini-browser-service.d.ts +14 -14
  24. package/lib/common/mini-browser-service.js +20 -20
  25. package/lib/electron-browser/environment/electron-mini-browser-environment-module.d.ts +3 -3
  26. package/lib/electron-browser/environment/electron-mini-browser-environment-module.js +25 -25
  27. package/lib/electron-browser/environment/electron-mini-browser-environment.d.ts +9 -9
  28. package/lib/electron-browser/environment/electron-mini-browser-environment.js +60 -60
  29. package/lib/electron-main/mini-browser-electron-main-contribution.d.ts +12 -12
  30. package/lib/electron-main/mini-browser-electron-main-contribution.js +54 -54
  31. package/lib/node/mini-browser-backend-module.d.ts +3 -3
  32. package/lib/node/mini-browser-backend-module.js +41 -41
  33. package/lib/node/mini-browser-backend-security-warnings.d.ts +5 -5
  34. package/lib/node/mini-browser-backend-security-warnings.js +51 -51
  35. package/lib/node/mini-browser-endpoint.d.ts +97 -97
  36. package/lib/node/mini-browser-endpoint.js +268 -268
  37. package/lib/node/mini-browser-endpoint.js.map +1 -1
  38. package/lib/node/mini-browser-ws-validator.d.ts +12 -12
  39. package/lib/node/mini-browser-ws-validator.js +69 -69
  40. package/lib/package.spec.js +18 -18
  41. package/package.json +5 -6
  42. package/src/browser/environment/mini-browser-environment-module.ts +24 -24
  43. package/src/browser/environment/mini-browser-environment.ts +87 -87
  44. package/src/browser/location-mapper-service.ts +150 -150
  45. package/src/browser/mini-browser-content-style.ts +32 -32
  46. package/src/browser/mini-browser-content.ts +630 -630
  47. package/src/browser/mini-browser-frontend-module.ts +86 -86
  48. package/src/browser/mini-browser-frontend-security-warnings.ts +59 -59
  49. package/src/browser/mini-browser-open-handler.ts +312 -312
  50. package/src/browser/mini-browser.ts +110 -110
  51. package/src/browser/pdfobject.d.ts +99 -99
  52. package/src/browser/style/index.css +157 -157
  53. package/src/browser/style/mini-browser.svg +17 -17
  54. package/src/common/mini-browser-endpoint.ts +28 -28
  55. package/src/common/mini-browser-service.ts +29 -29
  56. package/src/electron-browser/environment/electron-mini-browser-environment-module.ts +25 -25
  57. package/src/electron-browser/environment/electron-mini-browser-environment.ts +53 -53
  58. package/src/electron-main/mini-browser-electron-main-contribution.ts +42 -42
  59. package/src/node/mini-browser-backend-module.ts +41 -41
  60. package/src/node/mini-browser-backend-security-warnings.ts +45 -45
  61. package/src/node/mini-browser-endpoint.ts +315 -315
  62. package/src/node/mini-browser-ws-validator.ts +56 -56
  63. package/src/package.spec.ts +21 -21
package/README.md CHANGED
@@ -1,45 +1,45 @@
1
- <div align='center'>
2
-
3
- <br />
4
-
5
- <img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
6
-
7
- <h2>ECLIPSE THEIA - MINI-BROWSER EXTENSION</h2>
8
-
9
- <hr />
10
-
11
- </div>
12
-
13
- ## Description
14
-
15
- The `@theia/mini-browser` extension provides a browser widget with the corresponding backend endpoints.
16
-
17
- ## Environment Variables
18
-
19
- - `THEIA_MINI_BROWSER_HOST_PATTERN`
20
-
21
- A string pattern possibly containing `{{uuid}}` and `{{hostname}}` which will be replaced. This is the host for which the `mini-browser` will serve.
22
- It is a good practice to host the `mini-browser` handlers on a sub-domain as it is more secure.
23
- Defaults to `{{uuid}}.mini-browser.{{hostname}}`.
24
-
25
- ## Security Warnings
26
-
27
- - Potentially Insecure Host Pattern
28
-
29
- When you change the host pattern via the `THEIA_MINI_BROWSER_HOST_PATTERN` environment variable warnings will be emitted both from the frontend and from the backend.
30
- You can disable those warnings by setting `warnOnPotentiallyInsecureHostPattern: false` in the appropriate application configurations in your application's `package.json`.
31
-
32
- ## Additional Information
33
-
34
- - [API documentation for `@theia/mini-browser`](https://eclipse-theia.github.io/theia/docs/next/modules/mini_browser.html)
35
- - [Theia - GitHub](https://github.com/eclipse-theia/theia)
36
- - [Theia - Website](https://theia-ide.org/)
37
-
38
- ## License
39
-
40
- - [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
41
- - [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
42
-
43
- ## Trademark
44
- "Theia" is a trademark of the Eclipse Foundation
45
- https://www.eclipse.org/theia
1
+ <div align='center'>
2
+
3
+ <br />
4
+
5
+ <img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
6
+
7
+ <h2>ECLIPSE THEIA - MINI-BROWSER EXTENSION</h2>
8
+
9
+ <hr />
10
+
11
+ </div>
12
+
13
+ ## Description
14
+
15
+ The `@theia/mini-browser` extension provides a browser widget with the corresponding backend endpoints.
16
+
17
+ ## Environment Variables
18
+
19
+ - `THEIA_MINI_BROWSER_HOST_PATTERN`
20
+
21
+ A string pattern possibly containing `{{uuid}}` and `{{hostname}}` which will be replaced. This is the host for which the `mini-browser` will serve.
22
+ It is a good practice to host the `mini-browser` handlers on a sub-domain as it is more secure.
23
+ Defaults to `{{uuid}}.mini-browser.{{hostname}}`.
24
+
25
+ ## Security Warnings
26
+
27
+ - Potentially Insecure Host Pattern
28
+
29
+ When you change the host pattern via the `THEIA_MINI_BROWSER_HOST_PATTERN` environment variable warnings will be emitted both from the frontend and from the backend.
30
+ You can disable those warnings by setting `warnOnPotentiallyInsecureHostPattern: false` in the appropriate application configurations in your application's `package.json`.
31
+
32
+ ## Additional Information
33
+
34
+ - [API documentation for `@theia/mini-browser`](https://eclipse-theia.github.io/theia/docs/next/modules/mini_browser.html)
35
+ - [Theia - GitHub](https://github.com/eclipse-theia/theia)
36
+ - [Theia - Website](https://theia-ide.org/)
37
+
38
+ ## License
39
+
40
+ - [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
41
+ - [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
42
+
43
+ ## Trademark
44
+ "Theia" is a trademark of the Eclipse Foundation
45
+ https://www.eclipse.org/theia
@@ -1,4 +1,4 @@
1
- import { ContainerModule } from '@theia/core/shared/inversify';
2
- declare const _default: ContainerModule;
3
- export default _default;
1
+ import { ContainerModule } from '@theia/core/shared/inversify';
2
+ declare const _default: ContainerModule;
3
+ export default _default;
4
4
  //# sourceMappingURL=mini-browser-environment-module.d.ts.map
@@ -1,25 +1,25 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2020 Ericsson 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
- Object.defineProperty(exports, "__esModule", { value: true });
18
- const browser_1 = require("@theia/core/lib/browser");
19
- const inversify_1 = require("@theia/core/shared/inversify");
20
- const mini_browser_environment_1 = require("./mini-browser-environment");
21
- exports.default = new inversify_1.ContainerModule(bind => {
22
- bind(mini_browser_environment_1.MiniBrowserEnvironment).toSelf().inSingletonScope();
23
- bind(browser_1.FrontendApplicationContribution).toService(mini_browser_environment_1.MiniBrowserEnvironment);
24
- });
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2020 Ericsson 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
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ const browser_1 = require("@theia/core/lib/browser");
19
+ const inversify_1 = require("@theia/core/shared/inversify");
20
+ const mini_browser_environment_1 = require("./mini-browser-environment");
21
+ exports.default = new inversify_1.ContainerModule(bind => {
22
+ bind(mini_browser_environment_1.MiniBrowserEnvironment).toSelf().inSingletonScope();
23
+ bind(browser_1.FrontendApplicationContribution).toService(mini_browser_environment_1.MiniBrowserEnvironment);
24
+ });
25
25
  //# sourceMappingURL=mini-browser-environment-module.js.map
@@ -1,26 +1,26 @@
1
- import { Endpoint, FrontendApplicationContribution } from '@theia/core/lib/browser';
2
- import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
3
- /**
4
- * Fetch values from the backend's environment and caches them locally.
5
- * Helps with deploying various mini-browser endpoints.
6
- */
7
- export declare class MiniBrowserEnvironment implements FrontendApplicationContribution {
8
- protected _hostPatternPromise: Promise<string>;
9
- protected _hostPattern?: string;
10
- protected environment: EnvVariablesServer;
11
- protected init(): void;
12
- get hostPatternPromise(): Promise<string>;
13
- get hostPattern(): string | undefined;
14
- onStart(): Promise<void>;
15
- /**
16
- * Throws if `hostPatternPromise` is not yet resolved.
17
- */
18
- getEndpoint(uuid: string, hostname?: string): Endpoint;
19
- /**
20
- * Throws if `hostPatternPromise` is not yet resolved.
21
- */
22
- getRandomEndpoint(): Endpoint;
23
- protected getHostPattern(): Promise<string>;
24
- protected getDefaultHostname(): string;
25
- }
1
+ import { Endpoint, FrontendApplicationContribution } from '@theia/core/lib/browser';
2
+ import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
3
+ /**
4
+ * Fetch values from the backend's environment and caches them locally.
5
+ * Helps with deploying various mini-browser endpoints.
6
+ */
7
+ export declare class MiniBrowserEnvironment implements FrontendApplicationContribution {
8
+ protected _hostPatternPromise: Promise<string>;
9
+ protected _hostPattern?: string;
10
+ protected environment: EnvVariablesServer;
11
+ protected init(): void;
12
+ get hostPatternPromise(): Promise<string>;
13
+ get hostPattern(): string | undefined;
14
+ onStart(): Promise<void>;
15
+ /**
16
+ * Throws if `hostPatternPromise` is not yet resolved.
17
+ */
18
+ getEndpoint(uuid: string, hostname?: string): Endpoint;
19
+ /**
20
+ * Throws if `hostPatternPromise` is not yet resolved.
21
+ */
22
+ getRandomEndpoint(): Endpoint;
23
+ protected getHostPattern(): Promise<string>;
24
+ protected getDefaultHostname(): string;
25
+ }
26
26
  //# sourceMappingURL=mini-browser-environment.d.ts.map
@@ -1,96 +1,96 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2020 Ericsson 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 __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
- Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.MiniBrowserEnvironment = void 0;
28
- const browser_1 = require("@theia/core/lib/browser");
29
- const env_variables_1 = require("@theia/core/lib/common/env-variables");
30
- const environment_1 = require("@theia/core/shared/@theia/application-package/lib/environment");
31
- const inversify_1 = require("@theia/core/shared/inversify");
32
- const uuid_1 = require("uuid");
33
- const mini_browser_endpoint_1 = require("../../common/mini-browser-endpoint");
34
- /**
35
- * Fetch values from the backend's environment and caches them locally.
36
- * Helps with deploying various mini-browser endpoints.
37
- */
38
- let MiniBrowserEnvironment = class MiniBrowserEnvironment {
39
- init() {
40
- this._hostPatternPromise = this.getHostPattern()
41
- .then(pattern => this._hostPattern = pattern);
42
- }
43
- get hostPatternPromise() {
44
- return this._hostPatternPromise;
45
- }
46
- get hostPattern() {
47
- return this._hostPattern;
48
- }
49
- async onStart() {
50
- await this._hostPatternPromise;
51
- }
52
- /**
53
- * Throws if `hostPatternPromise` is not yet resolved.
54
- */
55
- getEndpoint(uuid, hostname) {
56
- if (this._hostPattern === undefined) {
57
- throw new Error('MiniBrowserEnvironment is not finished initializing');
58
- }
59
- return new browser_1.Endpoint({
60
- path: mini_browser_endpoint_1.MiniBrowserEndpoint.PATH,
61
- host: this._hostPattern
62
- .replace('{{uuid}}', uuid)
63
- .replace('{{hostname}}', hostname || this.getDefaultHostname()),
64
- });
65
- }
66
- /**
67
- * Throws if `hostPatternPromise` is not yet resolved.
68
- */
69
- getRandomEndpoint() {
70
- return this.getEndpoint((0, uuid_1.v4)());
71
- }
72
- async getHostPattern() {
73
- return environment_1.environment.electron.is()
74
- ? mini_browser_endpoint_1.MiniBrowserEndpoint.HOST_PATTERN_DEFAULT
75
- : this.environment.getValue(mini_browser_endpoint_1.MiniBrowserEndpoint.HOST_PATTERN_ENV)
76
- .then(envVar => (envVar === null || envVar === void 0 ? void 0 : envVar.value) || mini_browser_endpoint_1.MiniBrowserEndpoint.HOST_PATTERN_DEFAULT);
77
- }
78
- getDefaultHostname() {
79
- return self.location.host;
80
- }
81
- };
82
- __decorate([
83
- (0, inversify_1.inject)(env_variables_1.EnvVariablesServer),
84
- __metadata("design:type", Object)
85
- ], MiniBrowserEnvironment.prototype, "environment", void 0);
86
- __decorate([
87
- (0, inversify_1.postConstruct)(),
88
- __metadata("design:type", Function),
89
- __metadata("design:paramtypes", []),
90
- __metadata("design:returntype", void 0)
91
- ], MiniBrowserEnvironment.prototype, "init", null);
92
- MiniBrowserEnvironment = __decorate([
93
- (0, inversify_1.injectable)()
94
- ], MiniBrowserEnvironment);
95
- exports.MiniBrowserEnvironment = MiniBrowserEnvironment;
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2020 Ericsson 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 __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
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.MiniBrowserEnvironment = void 0;
28
+ const browser_1 = require("@theia/core/lib/browser");
29
+ const env_variables_1 = require("@theia/core/lib/common/env-variables");
30
+ const environment_1 = require("@theia/core/shared/@theia/application-package/lib/environment");
31
+ const inversify_1 = require("@theia/core/shared/inversify");
32
+ const uuid_1 = require("@theia/core/lib/common/uuid");
33
+ const mini_browser_endpoint_1 = require("../../common/mini-browser-endpoint");
34
+ /**
35
+ * Fetch values from the backend's environment and caches them locally.
36
+ * Helps with deploying various mini-browser endpoints.
37
+ */
38
+ let MiniBrowserEnvironment = class MiniBrowserEnvironment {
39
+ init() {
40
+ this._hostPatternPromise = this.getHostPattern()
41
+ .then(pattern => this._hostPattern = pattern);
42
+ }
43
+ get hostPatternPromise() {
44
+ return this._hostPatternPromise;
45
+ }
46
+ get hostPattern() {
47
+ return this._hostPattern;
48
+ }
49
+ async onStart() {
50
+ await this._hostPatternPromise;
51
+ }
52
+ /**
53
+ * Throws if `hostPatternPromise` is not yet resolved.
54
+ */
55
+ getEndpoint(uuid, hostname) {
56
+ if (this._hostPattern === undefined) {
57
+ throw new Error('MiniBrowserEnvironment is not finished initializing');
58
+ }
59
+ return new browser_1.Endpoint({
60
+ path: mini_browser_endpoint_1.MiniBrowserEndpoint.PATH,
61
+ host: this._hostPattern
62
+ .replace('{{uuid}}', uuid)
63
+ .replace('{{hostname}}', hostname || this.getDefaultHostname()),
64
+ });
65
+ }
66
+ /**
67
+ * Throws if `hostPatternPromise` is not yet resolved.
68
+ */
69
+ getRandomEndpoint() {
70
+ return this.getEndpoint((0, uuid_1.generateUuid)());
71
+ }
72
+ async getHostPattern() {
73
+ return environment_1.environment.electron.is()
74
+ ? mini_browser_endpoint_1.MiniBrowserEndpoint.HOST_PATTERN_DEFAULT
75
+ : this.environment.getValue(mini_browser_endpoint_1.MiniBrowserEndpoint.HOST_PATTERN_ENV)
76
+ .then(envVar => (envVar === null || envVar === void 0 ? void 0 : envVar.value) || mini_browser_endpoint_1.MiniBrowserEndpoint.HOST_PATTERN_DEFAULT);
77
+ }
78
+ getDefaultHostname() {
79
+ return self.location.host;
80
+ }
81
+ };
82
+ __decorate([
83
+ (0, inversify_1.inject)(env_variables_1.EnvVariablesServer),
84
+ __metadata("design:type", Object)
85
+ ], MiniBrowserEnvironment.prototype, "environment", void 0);
86
+ __decorate([
87
+ (0, inversify_1.postConstruct)(),
88
+ __metadata("design:type", Function),
89
+ __metadata("design:paramtypes", []),
90
+ __metadata("design:returntype", void 0)
91
+ ], MiniBrowserEnvironment.prototype, "init", null);
92
+ MiniBrowserEnvironment = __decorate([
93
+ (0, inversify_1.injectable)()
94
+ ], MiniBrowserEnvironment);
95
+ exports.MiniBrowserEnvironment = MiniBrowserEnvironment;
96
96
  //# sourceMappingURL=mini-browser-environment.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mini-browser-environment.js","sourceRoot":"","sources":["../../../src/browser/environment/mini-browser-environment.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,0CAA0C;AAC1C,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,qDAAoF;AACpF,wEAA0E;AAC1E,+FAA4F;AAC5F,4DAAiF;AACjF,+BAA0B;AAC1B,8EAAyE;AAEzE;;;GAGG;AAEH,IAAa,sBAAsB,GAAnC,MAAa,sBAAsB;IASrB,IAAI;QACV,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,cAAc,EAAE;aAC3C,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,CAAC;IACtD,CAAC;IAED,IAAI,kBAAkB;QAClB,OAAO,IAAI,CAAC,mBAAmB,CAAC;IACpC,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,KAAK,CAAC,OAAO;QACT,MAAM,IAAI,CAAC,mBAAmB,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,WAAW,CAAC,IAAY,EAAE,QAAiB;QACvC,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,EAAE;YACjC,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;SAC1E;QACD,OAAO,IAAI,kBAAQ,CAAC;YAChB,IAAI,EAAE,2CAAmB,CAAC,IAAI;YAC9B,IAAI,EAAE,IAAI,CAAC,YAAY;iBAClB,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC;iBACzB,OAAO,CAAC,cAAc,EAAE,QAAQ,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;SACtE,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACH,iBAAiB;QACb,OAAO,IAAI,CAAC,WAAW,CAAC,IAAA,SAAE,GAAE,CAAC,CAAC;IAClC,CAAC;IAES,KAAK,CAAC,cAAc;QAC1B,OAAO,yBAAW,CAAC,QAAQ,CAAC,EAAE,EAAE;YAC5B,CAAC,CAAC,2CAAmB,CAAC,oBAAoB;YAC1C,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,2CAAmB,CAAC,gBAAgB,CAAC;iBAC5D,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,KAAI,2CAAmB,CAAC,oBAAoB,CAAC,CAAC;IACvF,CAAC;IAES,kBAAkB;QACxB,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC9B,CAAC;CACJ,CAAA;AApDG;IADC,IAAA,kBAAM,EAAC,kCAAkB,CAAC;;2DACe;AAG1C;IADC,IAAA,yBAAa,GAAE;;;;kDAIf;AAZQ,sBAAsB;IADlC,IAAA,sBAAU,GAAE;GACA,sBAAsB,CA0DlC;AA1DY,wDAAsB"}
1
+ {"version":3,"file":"mini-browser-environment.js","sourceRoot":"","sources":["../../../src/browser/environment/mini-browser-environment.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,0CAA0C;AAC1C,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,qDAAoF;AACpF,wEAA0E;AAC1E,+FAA4F;AAC5F,4DAAiF;AACjF,sDAA2D;AAC3D,8EAAyE;AAEzE;;;GAGG;AAEH,IAAa,sBAAsB,GAAnC,MAAa,sBAAsB;IASrB,IAAI;QACV,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,cAAc,EAAE;aAC3C,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,CAAC;IACtD,CAAC;IAED,IAAI,kBAAkB;QAClB,OAAO,IAAI,CAAC,mBAAmB,CAAC;IACpC,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,KAAK,CAAC,OAAO;QACT,MAAM,IAAI,CAAC,mBAAmB,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,WAAW,CAAC,IAAY,EAAE,QAAiB;QACvC,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,EAAE;YACjC,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;SAC1E;QACD,OAAO,IAAI,kBAAQ,CAAC;YAChB,IAAI,EAAE,2CAAmB,CAAC,IAAI;YAC9B,IAAI,EAAE,IAAI,CAAC,YAAY;iBAClB,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC;iBACzB,OAAO,CAAC,cAAc,EAAE,QAAQ,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;SACtE,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACH,iBAAiB;QACb,OAAO,IAAI,CAAC,WAAW,CAAC,IAAA,mBAAY,GAAE,CAAC,CAAC;IAC5C,CAAC;IAES,KAAK,CAAC,cAAc;QAC1B,OAAO,yBAAW,CAAC,QAAQ,CAAC,EAAE,EAAE;YAC5B,CAAC,CAAC,2CAAmB,CAAC,oBAAoB;YAC1C,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,2CAAmB,CAAC,gBAAgB,CAAC;iBAC5D,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,KAAI,2CAAmB,CAAC,oBAAoB,CAAC,CAAC;IACvF,CAAC;IAES,kBAAkB;QACxB,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC9B,CAAC;CACJ,CAAA;AApDG;IADC,IAAA,kBAAM,EAAC,kCAAkB,CAAC;;2DACe;AAG1C;IADC,IAAA,yBAAa,GAAE;;;;kDAIf;AAZQ,sBAAsB;IADlC,IAAA,sBAAU,GAAE;GACA,sBAAsB,CA0DlC;AA1DY,wDAAsB"}
@@ -1,59 +1,59 @@
1
- import { MaybePromise } from '@theia/core/lib/common/types';
2
- import { ContributionProvider } from '@theia/core/lib/common/contribution-provider';
3
- import { MiniBrowserEnvironment } from './environment/mini-browser-environment';
4
- /**
5
- * Contribution for the `LocationMapperService`.
6
- */
7
- export declare const LocationMapper: unique symbol;
8
- export interface LocationMapper {
9
- /**
10
- * Should return with a positive number if the current contribution can handle the given location.
11
- * The number indicates the priority of the location mapper. If it is not a positive number, it means, the
12
- * contribution cannot handle the location.
13
- */
14
- canHandle(location: string): MaybePromise<number>;
15
- /**
16
- * Maps the given location.
17
- */
18
- map(location: string): MaybePromise<string>;
19
- }
20
- /**
21
- * Location mapper service.
22
- */
23
- export declare class LocationMapperService {
24
- protected readonly contributions: ContributionProvider<LocationMapper>;
25
- map(location: string): Promise<string>;
26
- protected defaultMapper(): (location: string) => MaybePromise<string>;
27
- protected prioritize(location: string): Promise<LocationMapper[]>;
28
- protected getContributions(): LocationMapper[];
29
- }
30
- /**
31
- * HTTP location mapper.
32
- */
33
- export declare class HttpLocationMapper implements LocationMapper {
34
- canHandle(location: string): MaybePromise<number>;
35
- map(location: string): MaybePromise<string>;
36
- }
37
- /**
38
- * HTTPS location mapper.
39
- */
40
- export declare class HttpsLocationMapper implements LocationMapper {
41
- canHandle(location: string): MaybePromise<number>;
42
- map(location: string): MaybePromise<string>;
43
- }
44
- /**
45
- * Location mapper for locations without a scheme.
46
- */
47
- export declare class LocationWithoutSchemeMapper implements LocationMapper {
48
- canHandle(location: string): MaybePromise<number>;
49
- map(location: string): MaybePromise<string>;
50
- }
51
- /**
52
- * `file` URI location mapper.
53
- */
54
- export declare class FileLocationMapper implements LocationMapper {
55
- protected miniBrowserEnvironment: MiniBrowserEnvironment;
56
- canHandle(location: string): MaybePromise<number>;
57
- map(location: string): Promise<string>;
58
- }
1
+ import { MaybePromise } from '@theia/core/lib/common/types';
2
+ import { ContributionProvider } from '@theia/core/lib/common/contribution-provider';
3
+ import { MiniBrowserEnvironment } from './environment/mini-browser-environment';
4
+ /**
5
+ * Contribution for the `LocationMapperService`.
6
+ */
7
+ export declare const LocationMapper: unique symbol;
8
+ export interface LocationMapper {
9
+ /**
10
+ * Should return with a positive number if the current contribution can handle the given location.
11
+ * The number indicates the priority of the location mapper. If it is not a positive number, it means, the
12
+ * contribution cannot handle the location.
13
+ */
14
+ canHandle(location: string): MaybePromise<number>;
15
+ /**
16
+ * Maps the given location.
17
+ */
18
+ map(location: string): MaybePromise<string>;
19
+ }
20
+ /**
21
+ * Location mapper service.
22
+ */
23
+ export declare class LocationMapperService {
24
+ protected readonly contributions: ContributionProvider<LocationMapper>;
25
+ map(location: string): Promise<string>;
26
+ protected defaultMapper(): (location: string) => MaybePromise<string>;
27
+ protected prioritize(location: string): Promise<LocationMapper[]>;
28
+ protected getContributions(): LocationMapper[];
29
+ }
30
+ /**
31
+ * HTTP location mapper.
32
+ */
33
+ export declare class HttpLocationMapper implements LocationMapper {
34
+ canHandle(location: string): MaybePromise<number>;
35
+ map(location: string): MaybePromise<string>;
36
+ }
37
+ /**
38
+ * HTTPS location mapper.
39
+ */
40
+ export declare class HttpsLocationMapper implements LocationMapper {
41
+ canHandle(location: string): MaybePromise<number>;
42
+ map(location: string): MaybePromise<string>;
43
+ }
44
+ /**
45
+ * Location mapper for locations without a scheme.
46
+ */
47
+ export declare class LocationWithoutSchemeMapper implements LocationMapper {
48
+ canHandle(location: string): MaybePromise<number>;
49
+ map(location: string): MaybePromise<string>;
50
+ }
51
+ /**
52
+ * `file` URI location mapper.
53
+ */
54
+ export declare class FileLocationMapper implements LocationMapper {
55
+ protected miniBrowserEnvironment: MiniBrowserEnvironment;
56
+ canHandle(location: string): MaybePromise<number>;
57
+ map(location: string): Promise<string>;
58
+ }
59
59
  //# sourceMappingURL=location-mapper-service.d.ts.map