@theia/remote 1.71.0-next.6 → 1.71.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.
- package/lib/electron-node/setup/app-native-dependency-contribution.d.ts +20 -0
- package/lib/electron-node/setup/app-native-dependency-contribution.d.ts.map +1 -1
- package/lib/electron-node/setup/app-native-dependency-contribution.js +35 -5
- package/lib/electron-node/setup/app-native-dependency-contribution.js.map +1 -1
- package/lib/electron-node/setup/app-native-dependency-contribution.spec.d.ts +2 -0
- package/lib/electron-node/setup/app-native-dependency-contribution.spec.d.ts.map +1 -0
- package/lib/electron-node/setup/app-native-dependency-contribution.spec.js +50 -0
- package/lib/electron-node/setup/app-native-dependency-contribution.spec.js.map +1 -0
- package/package.json +15 -15
- package/src/electron-node/setup/app-native-dependency-contribution.spec.ts +55 -0
- package/src/electron-node/setup/app-native-dependency-contribution.ts +39 -4
|
@@ -1,8 +1,28 @@
|
|
|
1
1
|
import { RemoteNativeDependencyContribution, DownloadOptions, DependencyDownload } from './remote-native-dependency-contribution';
|
|
2
2
|
import { RemotePlatform } from '@theia/core/lib/node/remote/remote-cli-contribution';
|
|
3
|
+
/**
|
|
4
|
+
* GitHub release tag used for rolling pre-release publications of native
|
|
5
|
+
* dependencies for next-channel Theia versions (e.g. `1.71.0-next.28+sha`).
|
|
6
|
+
* Stable versions resolve to a `v<version>` tag instead.
|
|
7
|
+
*/
|
|
8
|
+
export declare const NEXT_RELEASE_TAG = "next";
|
|
3
9
|
export declare class AppNativeDependencyContribution implements RemoteNativeDependencyContribution {
|
|
4
10
|
appDownloadUrlBase: string;
|
|
5
11
|
protected getDefaultURLForFile(remotePlatform: RemotePlatform, theiaVersion: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Returns the GitHub release tag from which to download the native dependencies.
|
|
14
|
+
* Next-channel versions (containing `-next.`) resolve to the rolling `next`
|
|
15
|
+
* pre-release; stable versions resolve to `v<theiaVersion>`.
|
|
16
|
+
*/
|
|
17
|
+
protected getReleaseTag(theiaVersion: string): string;
|
|
18
|
+
protected getAssetName(remotePlatform: RemotePlatform): string;
|
|
19
|
+
/**
|
|
20
|
+
* Validates that native dependencies are actually published for the given
|
|
21
|
+
* remote platform. The set of supported (os, arch) pairs mirrors the set
|
|
22
|
+
* accepted by `RemoteNodeSetupService.validatePlatform`, minus combinations
|
|
23
|
+
* for which we don't yet build native-dependency zips in CI.
|
|
24
|
+
*/
|
|
25
|
+
protected validatePlatform(remotePlatform: RemotePlatform): void;
|
|
6
26
|
download(options: DownloadOptions): Promise<DependencyDownload>;
|
|
7
27
|
}
|
|
8
28
|
//# sourceMappingURL=app-native-dependency-contribution.d.ts.map
|
|
@@ -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,qDAAqD,CAAC;AAGrF,qBACa,+BAAgC,YAAW,kCAAkC;IAEtF,kBAAkB,SAA8D;IAEhF,SAAS,CAAC,oBAAoB,CAAC,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM;
|
|
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;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,SAAS,CAAC;AAEvC,qBACa,+BAAgC,YAAW,kCAAkC;IAEtF,kBAAkB,SAA8D;IAEhF,SAAS,CAAC,oBAAoB,CAAC,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM;IAK5F;;;;OAIG;IACH,SAAS,CAAC,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM;IAIrD,SAAS,CAAC,YAAY,CAAC,cAAc,EAAE,cAAc,GAAG,MAAM;IAY9D;;;;;OAKG;IACH,SAAS,CAAC,gBAAgB,CAAC,cAAc,EAAE,cAAc,GAAG,IAAI;IAW1D,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAMxE"}
|
|
@@ -15,18 +15,33 @@
|
|
|
15
15
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
16
|
// *****************************************************************************
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.AppNativeDependencyContribution = void 0;
|
|
18
|
+
exports.AppNativeDependencyContribution = exports.NEXT_RELEASE_TAG = void 0;
|
|
19
19
|
const tslib_1 = require("tslib");
|
|
20
20
|
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
21
|
const core_1 = require("@theia/core");
|
|
22
|
+
/**
|
|
23
|
+
* GitHub release tag used for rolling pre-release publications of native
|
|
24
|
+
* dependencies for next-channel Theia versions (e.g. `1.71.0-next.28+sha`).
|
|
25
|
+
* Stable versions resolve to a `v<version>` tag instead.
|
|
26
|
+
*/
|
|
27
|
+
exports.NEXT_RELEASE_TAG = 'next';
|
|
22
28
|
let AppNativeDependencyContribution = class AppNativeDependencyContribution {
|
|
23
29
|
constructor() {
|
|
24
30
|
this.appDownloadUrlBase = 'https://github.com/eclipse-theia/theia/releases/download';
|
|
25
31
|
}
|
|
26
32
|
getDefaultURLForFile(remotePlatform, theiaVersion) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
33
|
+
this.validatePlatform(remotePlatform);
|
|
34
|
+
return `${this.appDownloadUrlBase}/${this.getReleaseTag(theiaVersion)}/${this.getAssetName(remotePlatform)}`;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Returns the GitHub release tag from which to download the native dependencies.
|
|
38
|
+
* Next-channel versions (containing `-next.`) resolve to the rolling `next`
|
|
39
|
+
* pre-release; stable versions resolve to `v<theiaVersion>`.
|
|
40
|
+
*/
|
|
41
|
+
getReleaseTag(theiaVersion) {
|
|
42
|
+
return /-next\./.test(theiaVersion) ? exports.NEXT_RELEASE_TAG : `v${theiaVersion}`;
|
|
43
|
+
}
|
|
44
|
+
getAssetName(remotePlatform) {
|
|
30
45
|
let platform;
|
|
31
46
|
if (remotePlatform.os === core_1.OS.Type.Windows) {
|
|
32
47
|
platform = 'win32';
|
|
@@ -37,7 +52,22 @@ let AppNativeDependencyContribution = class AppNativeDependencyContribution {
|
|
|
37
52
|
else {
|
|
38
53
|
platform = 'linux';
|
|
39
54
|
}
|
|
40
|
-
return
|
|
55
|
+
return `native-dependencies-${platform}-${remotePlatform.arch}.zip`;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Validates that native dependencies are actually published for the given
|
|
59
|
+
* remote platform. The set of supported (os, arch) pairs mirrors the set
|
|
60
|
+
* accepted by `RemoteNodeSetupService.validatePlatform`, minus combinations
|
|
61
|
+
* for which we don't yet build native-dependency zips in CI.
|
|
62
|
+
*/
|
|
63
|
+
validatePlatform(remotePlatform) {
|
|
64
|
+
const { os, arch } = remotePlatform;
|
|
65
|
+
const supported = (os === core_1.OS.Type.Windows && arch === 'x64') ||
|
|
66
|
+
(os === core_1.OS.Type.Linux && arch === 'x64') ||
|
|
67
|
+
(os === core_1.OS.Type.OSX && (arch === 'x64' || arch === 'arm64'));
|
|
68
|
+
if (!supported) {
|
|
69
|
+
throw new Error(`No prebuilt native dependencies are published for '${os}-${arch}'.`);
|
|
70
|
+
}
|
|
41
71
|
}
|
|
42
72
|
async download(options) {
|
|
43
73
|
return {
|
|
@@ -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;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,4DAA0D;AAG1D,sCAAiC;
|
|
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;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,4DAA0D;AAG1D,sCAAiC;AAEjC;;;;GAIG;AACU,QAAA,gBAAgB,GAAG,MAAM,CAAC;AAGhC,IAAM,+BAA+B,GAArC,MAAM,+BAA+B;IAArC;QAEH,uBAAkB,GAAG,0DAA0D,CAAC;IAmDpF,CAAC;IAjDa,oBAAoB,CAAC,cAA8B,EAAE,YAAoB;QAC/E,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;QACtC,OAAO,GAAG,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,cAAc,CAAC,EAAE,CAAC;IACjH,CAAC;IAED;;;;OAIG;IACO,aAAa,CAAC,YAAoB;QACxC,OAAO,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,wBAAgB,CAAC,CAAC,CAAC,IAAI,YAAY,EAAE,CAAC;IAChF,CAAC;IAES,YAAY,CAAC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,IAAA,sBAAU,GAAE;GACA,+BAA+B,CAqD3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-native-dependency-contribution.spec.d.ts","sourceRoot":"","sources":["../../../src/electron-node/setup/app-native-dependency-contribution.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2026 EclipseSource 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 chai_1 = require("chai");
|
|
19
|
+
const core_1 = require("@theia/core");
|
|
20
|
+
const app_native_dependency_contribution_1 = require("./app-native-dependency-contribution");
|
|
21
|
+
class TestableAppNativeDependencyContribution extends app_native_dependency_contribution_1.AppNativeDependencyContribution {
|
|
22
|
+
publicGetDefaultURLForFile(remotePlatform, theiaVersion) {
|
|
23
|
+
return this.getDefaultURLForFile(remotePlatform, theiaVersion);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
describe('AppNativeDependencyContribution', () => {
|
|
27
|
+
const contribution = new TestableAppNativeDependencyContribution();
|
|
28
|
+
const base = 'https://github.com/eclipse-theia/theia/releases/download';
|
|
29
|
+
it('builds stable URLs for linux-x64', () => {
|
|
30
|
+
const url = contribution.publicGetDefaultURLForFile({ os: core_1.OS.Type.Linux, arch: 'x64' }, '1.70.2');
|
|
31
|
+
(0, chai_1.expect)(url).to.equal(`${base}/v1.70.2/native-dependencies-linux-x64.zip`);
|
|
32
|
+
});
|
|
33
|
+
it('builds stable URLs for both Mac variants', () => {
|
|
34
|
+
const arm = contribution.publicGetDefaultURLForFile({ os: core_1.OS.Type.OSX, arch: 'arm64' }, '1.70.2');
|
|
35
|
+
(0, chai_1.expect)(arm).to.equal(`${base}/v1.70.2/native-dependencies-darwin-arm64.zip`);
|
|
36
|
+
const x64 = contribution.publicGetDefaultURLForFile({ os: core_1.OS.Type.OSX, arch: 'x64' }, '1.70.2');
|
|
37
|
+
(0, chai_1.expect)(x64).to.equal(`${base}/v1.70.2/native-dependencies-darwin-x64.zip`);
|
|
38
|
+
});
|
|
39
|
+
it('routes -next. versions to the rolling `next` tag', () => {
|
|
40
|
+
const url = contribution.publicGetDefaultURLForFile({ os: core_1.OS.Type.Linux, arch: 'x64' }, '1.71.0-next.28+df29ab0fb');
|
|
41
|
+
(0, chai_1.expect)(url).to.equal(`${base}/next/native-dependencies-linux-x64.zip`);
|
|
42
|
+
});
|
|
43
|
+
it('throws a clear error for unsupported (os, arch) combinations', () => {
|
|
44
|
+
(0, chai_1.expect)(() => contribution.publicGetDefaultURLForFile({ os: core_1.OS.Type.Linux, arch: 'arm64' }, '1.70.2'))
|
|
45
|
+
.to.throw(/No prebuilt native dependencies are published/);
|
|
46
|
+
(0, chai_1.expect)(() => contribution.publicGetDefaultURLForFile({ os: core_1.OS.Type.Windows, arch: 'arm64' }, '1.70.2'))
|
|
47
|
+
.to.throw(/No prebuilt native dependencies are published/);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=app-native-dependency-contribution.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-native-dependency-contribution.spec.js","sourceRoot":"","sources":["../../../src/elect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": "1.71.0-next.
|
|
3
|
+
"version": "1.71.0-next.72+95c8dba0e",
|
|
4
4
|
"description": "Theia - Remote",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@theia/core": "1.71.0-next.
|
|
7
|
-
"@theia/filesystem": "1.71.0-next.
|
|
8
|
-
"@theia/userstorage": "1.71.0-next.
|
|
9
|
-
"@theia/variable-resolver": "1.71.0-next.
|
|
10
|
-
"@theia/workspace": "1.71.0-next.
|
|
11
|
-
"archiver": "^5.3.
|
|
6
|
+
"@theia/core": "1.71.0-next.72+95c8dba0e",
|
|
7
|
+
"@theia/filesystem": "1.71.0-next.72+95c8dba0e",
|
|
8
|
+
"@theia/userstorage": "1.71.0-next.72+95c8dba0e",
|
|
9
|
+
"@theia/variable-resolver": "1.71.0-next.72+95c8dba0e",
|
|
10
|
+
"@theia/workspace": "1.71.0-next.72+95c8dba0e",
|
|
11
|
+
"archiver": "^5.3.2",
|
|
12
12
|
"decompress": "^4.2.1",
|
|
13
|
-
"decompress-tar": "^4.
|
|
14
|
-
"decompress-targz": "^4.
|
|
13
|
+
"decompress-tar": "^4.1.1",
|
|
14
|
+
"decompress-targz": "^4.1.1",
|
|
15
15
|
"decompress-unzip": "^4.0.1",
|
|
16
|
-
"express-http-proxy": "^2.1.
|
|
16
|
+
"express-http-proxy": "^2.1.2",
|
|
17
17
|
"glob": "^8.1.0",
|
|
18
|
-
"socket.io": "^4.
|
|
19
|
-
"socket.io-client": "^4.
|
|
20
|
-
"ssh-config": "~5.0.
|
|
21
|
-
"ssh2": "^1.
|
|
18
|
+
"socket.io": "^4.8.3",
|
|
19
|
+
"socket.io-client": "^4.8.3",
|
|
20
|
+
"ssh-config": "~5.0.4",
|
|
21
|
+
"ssh2": "^1.17.0",
|
|
22
22
|
"ssh2-sftp-client": "^9.1.0",
|
|
23
23
|
"tslib": "^2.6.2"
|
|
24
24
|
},
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"nyc": {
|
|
68
68
|
"extends": "../../configs/nyc.json"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "95c8dba0ee6349c6be262ac2cf383909a3b62761"
|
|
71
71
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2026 EclipseSource and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
import { expect } from 'chai';
|
|
18
|
+
import { OS } from '@theia/core';
|
|
19
|
+
import { RemotePlatform } from '@theia/core/lib/node/remote/remote-cli-contribution';
|
|
20
|
+
import { AppNativeDependencyContribution } from './app-native-dependency-contribution';
|
|
21
|
+
|
|
22
|
+
class TestableAppNativeDependencyContribution extends AppNativeDependencyContribution {
|
|
23
|
+
publicGetDefaultURLForFile(remotePlatform: RemotePlatform, theiaVersion: string): string {
|
|
24
|
+
return this.getDefaultURLForFile(remotePlatform, theiaVersion);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
describe('AppNativeDependencyContribution', () => {
|
|
29
|
+
const contribution = new TestableAppNativeDependencyContribution();
|
|
30
|
+
const base = 'https://github.com/eclipse-theia/theia/releases/download';
|
|
31
|
+
|
|
32
|
+
it('builds stable URLs for linux-x64', () => {
|
|
33
|
+
const url = contribution.publicGetDefaultURLForFile({ os: OS.Type.Linux, arch: 'x64' }, '1.70.2');
|
|
34
|
+
expect(url).to.equal(`${base}/v1.70.2/native-dependencies-linux-x64.zip`);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it('builds stable URLs for both Mac variants', () => {
|
|
38
|
+
const arm = contribution.publicGetDefaultURLForFile({ os: OS.Type.OSX, arch: 'arm64' }, '1.70.2');
|
|
39
|
+
expect(arm).to.equal(`${base}/v1.70.2/native-dependencies-darwin-arm64.zip`);
|
|
40
|
+
const x64 = contribution.publicGetDefaultURLForFile({ os: OS.Type.OSX, arch: 'x64' }, '1.70.2');
|
|
41
|
+
expect(x64).to.equal(`${base}/v1.70.2/native-dependencies-darwin-x64.zip`);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it('routes -next. versions to the rolling `next` tag', () => {
|
|
45
|
+
const url = contribution.publicGetDefaultURLForFile({ os: OS.Type.Linux, arch: 'x64' }, '1.71.0-next.28+df29ab0fb');
|
|
46
|
+
expect(url).to.equal(`${base}/next/native-dependencies-linux-x64.zip`);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('throws a clear error for unsupported (os, arch) combinations', () => {
|
|
50
|
+
expect(() => contribution.publicGetDefaultURLForFile({ os: OS.Type.Linux, arch: 'arm64' }, '1.70.2'))
|
|
51
|
+
.to.throw(/No prebuilt native dependencies are published/);
|
|
52
|
+
expect(() => contribution.publicGetDefaultURLForFile({ os: OS.Type.Windows, arch: 'arm64' }, '1.70.2'))
|
|
53
|
+
.to.throw(/No prebuilt native dependencies are published/);
|
|
54
|
+
});
|
|
55
|
+
});
|
|
@@ -19,15 +19,33 @@ import { RemoteNativeDependencyContribution, DownloadOptions, DependencyDownload
|
|
|
19
19
|
import { RemotePlatform } from '@theia/core/lib/node/remote/remote-cli-contribution';
|
|
20
20
|
import { OS } from '@theia/core';
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* GitHub release tag used for rolling pre-release publications of native
|
|
24
|
+
* dependencies for next-channel Theia versions (e.g. `1.71.0-next.28+sha`).
|
|
25
|
+
* Stable versions resolve to a `v<version>` tag instead.
|
|
26
|
+
*/
|
|
27
|
+
export const NEXT_RELEASE_TAG = 'next';
|
|
28
|
+
|
|
22
29
|
@injectable()
|
|
23
30
|
export class AppNativeDependencyContribution implements RemoteNativeDependencyContribution {
|
|
24
31
|
|
|
25
32
|
appDownloadUrlBase = 'https://github.com/eclipse-theia/theia/releases/download';
|
|
26
33
|
|
|
27
34
|
protected getDefaultURLForFile(remotePlatform: RemotePlatform, theiaVersion: string): string {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
35
|
+
this.validatePlatform(remotePlatform);
|
|
36
|
+
return `${this.appDownloadUrlBase}/${this.getReleaseTag(theiaVersion)}/${this.getAssetName(remotePlatform)}`;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Returns the GitHub release tag from which to download the native dependencies.
|
|
41
|
+
* Next-channel versions (containing `-next.`) resolve to the rolling `next`
|
|
42
|
+
* pre-release; stable versions resolve to `v<theiaVersion>`.
|
|
43
|
+
*/
|
|
44
|
+
protected getReleaseTag(theiaVersion: string): string {
|
|
45
|
+
return /-next\./.test(theiaVersion) ? NEXT_RELEASE_TAG : `v${theiaVersion}`;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
protected getAssetName(remotePlatform: RemotePlatform): string {
|
|
31
49
|
let platform: string;
|
|
32
50
|
if (remotePlatform.os === OS.Type.Windows) {
|
|
33
51
|
platform = 'win32';
|
|
@@ -36,7 +54,24 @@ export class AppNativeDependencyContribution implements RemoteNativeDependencyCo
|
|
|
36
54
|
} else {
|
|
37
55
|
platform = 'linux';
|
|
38
56
|
}
|
|
39
|
-
return
|
|
57
|
+
return `native-dependencies-${platform}-${remotePlatform.arch}.zip`;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Validates that native dependencies are actually published for the given
|
|
62
|
+
* remote platform. The set of supported (os, arch) pairs mirrors the set
|
|
63
|
+
* accepted by `RemoteNodeSetupService.validatePlatform`, minus combinations
|
|
64
|
+
* for which we don't yet build native-dependency zips in CI.
|
|
65
|
+
*/
|
|
66
|
+
protected validatePlatform(remotePlatform: RemotePlatform): void {
|
|
67
|
+
const { os, arch } = remotePlatform;
|
|
68
|
+
const supported =
|
|
69
|
+
(os === OS.Type.Windows && arch === 'x64') ||
|
|
70
|
+
(os === OS.Type.Linux && arch === 'x64') ||
|
|
71
|
+
(os === OS.Type.OSX && (arch === 'x64' || arch === 'arm64'));
|
|
72
|
+
if (!supported) {
|
|
73
|
+
throw new Error(`No prebuilt native dependencies are published for '${os}-${arch}'.`);
|
|
74
|
+
}
|
|
40
75
|
}
|
|
41
76
|
|
|
42
77
|
async download(options: DownloadOptions): Promise<DependencyDownload> {
|