1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | Object.defineProperty(exports, "__esModule", { value: true });
|
18 | exports.OSPreloadContribution = void 0;
|
19 | const tslib_1 = require("tslib");
|
20 | const inversify_1 = require("inversify");
|
21 | const common_1 = require("../../common");
|
22 | let OSPreloadContribution = class OSPreloadContribution {
|
23 | async initialize() {
|
24 | const osType = await this.osBackendProvider.getBackendOS();
|
25 | const isWindows = osType === 'Windows';
|
26 | const isOSX = osType === 'OSX';
|
27 | common_1.OS.backend.isOSX = isOSX;
|
28 | common_1.OS.backend.isWindows = isWindows;
|
29 | common_1.OS.backend.type = () => osType;
|
30 | common_1.OS.backend.EOL = isWindows ? '\r\n' : '\n';
|
31 | }
|
32 | };
|
33 | (0, tslib_1.__decorate)([
|
34 | (0, inversify_1.inject)(common_1.OSBackendProvider),
|
35 | (0, tslib_1.__metadata)("design:type", Object)
|
36 | ], OSPreloadContribution.prototype, "osBackendProvider", void 0);
|
37 | OSPreloadContribution = (0, tslib_1.__decorate)([
|
38 | (0, inversify_1.injectable)()
|
39 | ], OSPreloadContribution);
|
40 | exports.OSPreloadContribution = OSPreloadContribution;
|
41 |
|
\ | No newline at end of file |