@theia/application-package 1.53.0-next.4 → 1.53.0-next.55
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/README.md +25 -25
- package/lib/api.d.ts +1 -1
- package/lib/api.js +1 -1
- package/lib/application-props.d.ts +4 -0
- package/lib/application-props.d.ts.map +1 -1
- package/lib/application-props.js +4 -2
- package/lib/application-props.js.map +1 -1
- package/package.json +4 -4
- package/src/api.ts +21 -21
- package/src/application-package.spec.ts +62 -62
- package/src/application-package.ts +334 -334
- package/src/application-props.ts +306 -299
- package/src/environment.ts +76 -76
- package/src/extension-package-collector.ts +83 -83
- package/src/extension-package.ts +223 -223
- package/src/index.ts +22 -22
- package/src/json-file.ts +25 -25
- package/src/npm-registry.ts +161 -161
package/README.md
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
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 - APPLICATION-PACKAGE</h2>
|
|
8
|
-
|
|
9
|
-
<hr />
|
|
10
|
-
|
|
11
|
-
</div>
|
|
12
|
-
|
|
13
|
-
## Additional Information
|
|
14
|
-
|
|
15
|
-
- [Theia - GitHub](https://github.com/eclipse-theia/theia)
|
|
16
|
-
- [Theia - Website](https://theia-ide.org/)
|
|
17
|
-
|
|
18
|
-
## License
|
|
19
|
-
|
|
20
|
-
- [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
|
|
21
|
-
- [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
|
|
22
|
-
|
|
23
|
-
## Trademark
|
|
24
|
-
"Theia" is a trademark of the Eclipse Foundation
|
|
25
|
-
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 - APPLICATION-PACKAGE</h2>
|
|
8
|
+
|
|
9
|
+
<hr />
|
|
10
|
+
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
## Additional Information
|
|
14
|
+
|
|
15
|
+
- [Theia - GitHub](https://github.com/eclipse-theia/theia)
|
|
16
|
+
- [Theia - Website](https://theia-ide.org/)
|
|
17
|
+
|
|
18
|
+
## License
|
|
19
|
+
|
|
20
|
+
- [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
|
|
21
|
+
- [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
|
|
22
|
+
|
|
23
|
+
## Trademark
|
|
24
|
+
"Theia" is a trademark of the Eclipse Foundation
|
|
25
|
+
https://www.eclipse.org/theia
|
package/lib/api.d.ts
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* The default supported API version the framework supports.
|
|
3
3
|
* The version should be in the format `x.y.z`.
|
|
4
4
|
*/
|
|
5
|
-
export declare const DEFAULT_SUPPORTED_API_VERSION = "1.
|
|
5
|
+
export declare const DEFAULT_SUPPORTED_API_VERSION = "1.92.2";
|
|
6
6
|
//# sourceMappingURL=api.d.ts.map
|
package/lib/api.js
CHANGED
|
@@ -20,5 +20,5 @@ exports.DEFAULT_SUPPORTED_API_VERSION = void 0;
|
|
|
20
20
|
* The default supported API version the framework supports.
|
|
21
21
|
* The version should be in the format `x.y.z`.
|
|
22
22
|
*/
|
|
23
|
-
exports.DEFAULT_SUPPORTED_API_VERSION = '1.
|
|
23
|
+
exports.DEFAULT_SUPPORTED_API_VERSION = '1.92.2';
|
|
24
24
|
//# sourceMappingURL=api.js.map
|
|
@@ -58,6 +58,10 @@ export declare namespace ElectronFrontendApplicationConfig {
|
|
|
58
58
|
* Defaults to `{}` which results in no splash screen being displayed.
|
|
59
59
|
*/
|
|
60
60
|
readonly splashScreenOptions?: SplashScreenOptions;
|
|
61
|
+
/**
|
|
62
|
+
* The custom uri scheme the application registers to in the operating system.
|
|
63
|
+
*/
|
|
64
|
+
readonly uriScheme: string;
|
|
61
65
|
}
|
|
62
66
|
}
|
|
63
67
|
export type DefaultTheme = string | Readonly<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-props.d.ts","sourceRoot":"","sources":["../src/application-props.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,UAAU,CAAC;AAChE,MAAM,QAAQ,SAAS,GAAG,QAAQ,WAAW,CAAC,CAAC;AAE/C,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI;KAC9B,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACzE,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAE9B,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CAC/B;AAED,MAAM,MAAM,iCAAiC,GAAG,iBAAiB,CAAC,iCAAiC,CAAC,OAAO,CAAC,CAAC;AAC7G,yBAAiB,iCAAiC,CAAC;IACxC,MAAM,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"application-props.d.ts","sourceRoot":"","sources":["../src/application-props.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,UAAU,CAAC;AAChE,MAAM,QAAQ,SAAS,GAAG,QAAQ,WAAW,CAAC,CAAC;AAE/C,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI;KAC9B,C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;QAEpB;;;;WAIG;QACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;KACrC;CACJ;AAED,MAAM,WAAW,gBAAgB;IAE7B;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAE7B;AACD,yBAAiB,gBAAgB,CAAC;IACvB,MAAM,OAAO,EAAE,gBAGrB,CAAC;CACL;AAED;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;IAGtD,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC;IAEzC;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE;QACf,QAAQ,CAAC,MAAM,EAAE,yBAAyB,CAAA;KAC7C,CAAC;IAEF;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE;QACd,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAA;KAC5C,CAAC;IAEF;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE;QAChB,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAA;KACnC,CAAC;CACL;AACD,yBAAiB,gBAAgB,CAAC;IAC9B,KAAY,MAAM,GAAG,GAAG,iBAAiB,EAAE,CAAC;IAC5C,KAAY,iBAAiB;QACzB,OAAO,YAAY;QACnB,QAAQ,aAAa;QACrB,WAAW,iBAAiB;KAC/B;IACM,MAAM,OAAO,EAAE,gBAYrB,CAAC;CAEL"}
|
package/lib/application-props.js
CHANGED
|
@@ -22,7 +22,8 @@ var ElectronFrontendApplicationConfig;
|
|
|
22
22
|
ElectronFrontendApplicationConfig.DEFAULT = {
|
|
23
23
|
windowOptions: {},
|
|
24
24
|
showWindowEarly: true,
|
|
25
|
-
splashScreenOptions: {}
|
|
25
|
+
splashScreenOptions: {},
|
|
26
|
+
uriScheme: 'theia'
|
|
26
27
|
};
|
|
27
28
|
})(ElectronFrontendApplicationConfig || (exports.ElectronFrontendApplicationConfig = ElectronFrontendApplicationConfig = {}));
|
|
28
29
|
var DefaultTheme;
|
|
@@ -55,7 +56,8 @@ var FrontendApplicationConfig;
|
|
|
55
56
|
electron: ElectronFrontendApplicationConfig.DEFAULT,
|
|
56
57
|
defaultLocale: '',
|
|
57
58
|
validatePreferencesSchema: true,
|
|
58
|
-
reloadOnReconnect: false
|
|
59
|
+
reloadOnReconnect: false,
|
|
60
|
+
uriScheme: 'theia'
|
|
59
61
|
};
|
|
60
62
|
})(FrontendApplicationConfig || (exports.FrontendApplicationConfig = FrontendApplicationConfig = {}));
|
|
61
63
|
var BackendApplicationConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-props.js","sourceRoot":"","sources":["../src/application-props.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;;;AAGhF,yCAA+C;AAe/C,IAAiB,iCAAiC,
|
|
1
|
+
{"version":3,"file":"application-props.js","sourceRoot":"","sources":["../src/application-props.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;;;AAGhF,yCAA+C;AAe/C,IAAiB,iCAAiC,CA8DjD;AA9DD,WAAiB,iCAAiC;IACjC,yCAAO,GAAsC;QACtD,aAAa,EAAE,EAAE;QACjB,eAAe,EAAE,IAAI;QACrB,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,GAA6B;QAC7C,cAAc,EAAE,IAAI;QACpB,yBAAyB,EAAE,CAAC;KAC/B,CAAC;AAeN,CAAC,EAnBgB,wBAAwB,wCAAxB,wBAAwB,QAmBxC;AAMD,IAAiB,eAAe,CAa/B;AAbD,WAAiB,eAAe;IACf,uBAAO,GAAoB;QACpC,eAAe,EAAE,EAAE;KACtB,CAAC;AAUN,CAAC,EAbgB,eAAe,+BAAf,eAAe,QAa/B;AAeD,IAAiB,gBAAgB,CAKhC;AALD,WAAiB,gBAAgB;IAChB,wBAAO,GAAqB;QACrC,IAAI,EAAE,KAAK;QACX,QAAQ,EAAE,6BAA6B;KAC1C,CAAC;AACN,CAAC,EALgB,gBAAgB,gCAAhB,gBAAgB,QAKhC;AAoCD,IAAiB,gBAAgB,CAqBhC;AArBD,WAAiB,gBAAgB;IAE7B,IAAY,iBAIX;IAJD,WAAY,iBAAiB;QACzB,wCAAmB,CAAA;QACnB,0CAAqB,CAAA;QACrB,iDAA4B,CAAA;IAChC,CAAC,EAJW,iBAAiB,GAAjB,kCAAiB,KAAjB,kCAAiB,QAI5B;IAAA,CAAC;IACW,wBAAO,GAAqB;QACrC,GAAG,gBAAgB,CAAC,OAAO;QAC3B,MAAM,EAAE,SAAS;QACjB,OAAO,EAAE;YACL,MAAM,EAAE,wBAAwB,CAAC,OAAO;SAC3C;QACD,QAAQ,EAAE;YACN,MAAM,EAAE,yBAAyB,CAAC,OAAO;SAC5C;QACD,SAAS,EAAE;YACP,MAAM,EAAE,eAAe,CAAC,OAAO;SAClC;KACJ,CAAC;AAEN,CAAC,EArBgB,gBAAgB,gCAAhB,gBAAgB,QAqBhC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/application-package",
|
|
3
|
-
"version": "1.53.0-next.
|
|
3
|
+
"version": "1.53.0-next.55+d1a989a68c",
|
|
4
4
|
"description": "Theia application package API.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"watch": "theiaext watch"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@theia/request": "1.53.0-next.
|
|
32
|
+
"@theia/request": "1.53.0-next.55+d1a989a68c",
|
|
33
33
|
"@types/fs-extra": "^4.0.2",
|
|
34
34
|
"@types/semver": "^7.5.0",
|
|
35
35
|
"@types/write-json-file": "^2.2.1",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"write-json-file": "^2.2.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@theia/ext-scripts": "1.
|
|
46
|
+
"@theia/ext-scripts": "1.53.0"
|
|
47
47
|
},
|
|
48
48
|
"nyc": {
|
|
49
49
|
"extends": "../../configs/nyc.json"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "d1a989a68c1b5ec1f9098e9126653c6346844769"
|
|
52
52
|
}
|
package/src/api.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
// *****************************************************************************
|
|
2
|
-
// Copyright (C) 2021 Ericsson 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
|
-
/**
|
|
18
|
-
* The default supported API version the framework supports.
|
|
19
|
-
* The version should be in the format `x.y.z`.
|
|
20
|
-
*/
|
|
21
|
-
export const DEFAULT_SUPPORTED_API_VERSION = '1.
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2021 Ericsson 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
|
+
/**
|
|
18
|
+
* The default supported API version the framework supports.
|
|
19
|
+
* The version should be in the format `x.y.z`.
|
|
20
|
+
*/
|
|
21
|
+
export const DEFAULT_SUPPORTED_API_VERSION = '1.92.2';
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
// *****************************************************************************
|
|
2
|
-
// Copyright (C) 2020 Maksim Ryzhikov 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 * as assert from 'assert';
|
|
18
|
-
import * as temp from 'temp';
|
|
19
|
-
import * as fs from 'fs-extra';
|
|
20
|
-
import * as path from 'path';
|
|
21
|
-
import { ApplicationPackage } from './application-package';
|
|
22
|
-
import { ApplicationProps } from './application-props';
|
|
23
|
-
import * as sinon from 'sinon';
|
|
24
|
-
|
|
25
|
-
const track = temp.track();
|
|
26
|
-
const sandbox = sinon.createSandbox();
|
|
27
|
-
|
|
28
|
-
describe('application-package', function (): void {
|
|
29
|
-
after((): void => {
|
|
30
|
-
sandbox.restore();
|
|
31
|
-
track.cleanupSync();
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
it('should print warning if user set unknown target in package.json and use browser as a default value', function (): void {
|
|
35
|
-
const warn = sandbox.stub(console, 'warn');
|
|
36
|
-
const root = createProjectWithTarget('foo');
|
|
37
|
-
const applicationPackage = new ApplicationPackage({ projectPath: root });
|
|
38
|
-
assert.deepStrictEqual(applicationPackage.target, ApplicationProps.ApplicationTarget.browser);
|
|
39
|
-
assert.deepStrictEqual(warn.called, true);
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
it('should set target from package.json', function (): void {
|
|
43
|
-
const target = 'electron';
|
|
44
|
-
const root = createProjectWithTarget(target);
|
|
45
|
-
const applicationPackage = new ApplicationPackage({ projectPath: root });
|
|
46
|
-
assert.deepStrictEqual(applicationPackage.target, target);
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
it('should prefer target from passed options over target from package.json', function (): void {
|
|
50
|
-
const pckTarget = 'electron';
|
|
51
|
-
const optTarget = 'browser';
|
|
52
|
-
const root = createProjectWithTarget(pckTarget);
|
|
53
|
-
const applicationPackage = new ApplicationPackage({ projectPath: root, appTarget: optTarget });
|
|
54
|
-
assert.deepStrictEqual(applicationPackage.target, optTarget);
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
function createProjectWithTarget(target: string): string {
|
|
58
|
-
const root = track.mkdirSync('foo-project');
|
|
59
|
-
fs.writeFileSync(path.join(root, 'package.json'), `{"theia": {"target": "${target}"}}`);
|
|
60
|
-
return root;
|
|
61
|
-
}
|
|
62
|
-
});
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2020 Maksim Ryzhikov 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 * as assert from 'assert';
|
|
18
|
+
import * as temp from 'temp';
|
|
19
|
+
import * as fs from 'fs-extra';
|
|
20
|
+
import * as path from 'path';
|
|
21
|
+
import { ApplicationPackage } from './application-package';
|
|
22
|
+
import { ApplicationProps } from './application-props';
|
|
23
|
+
import * as sinon from 'sinon';
|
|
24
|
+
|
|
25
|
+
const track = temp.track();
|
|
26
|
+
const sandbox = sinon.createSandbox();
|
|
27
|
+
|
|
28
|
+
describe('application-package', function (): void {
|
|
29
|
+
after((): void => {
|
|
30
|
+
sandbox.restore();
|
|
31
|
+
track.cleanupSync();
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it('should print warning if user set unknown target in package.json and use browser as a default value', function (): void {
|
|
35
|
+
const warn = sandbox.stub(console, 'warn');
|
|
36
|
+
const root = createProjectWithTarget('foo');
|
|
37
|
+
const applicationPackage = new ApplicationPackage({ projectPath: root });
|
|
38
|
+
assert.deepStrictEqual(applicationPackage.target, ApplicationProps.ApplicationTarget.browser);
|
|
39
|
+
assert.deepStrictEqual(warn.called, true);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it('should set target from package.json', function (): void {
|
|
43
|
+
const target = 'electron';
|
|
44
|
+
const root = createProjectWithTarget(target);
|
|
45
|
+
const applicationPackage = new ApplicationPackage({ projectPath: root });
|
|
46
|
+
assert.deepStrictEqual(applicationPackage.target, target);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('should prefer target from passed options over target from package.json', function (): void {
|
|
50
|
+
const pckTarget = 'electron';
|
|
51
|
+
const optTarget = 'browser';
|
|
52
|
+
const root = createProjectWithTarget(pckTarget);
|
|
53
|
+
const applicationPackage = new ApplicationPackage({ projectPath: root, appTarget: optTarget });
|
|
54
|
+
assert.deepStrictEqual(applicationPackage.target, optTarget);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
function createProjectWithTarget(target: string): string {
|
|
58
|
+
const root = track.mkdirSync('foo-project');
|
|
59
|
+
fs.writeFileSync(path.join(root, 'package.json'), `{"theia": {"target": "${target}"}}`);
|
|
60
|
+
return root;
|
|
61
|
+
}
|
|
62
|
+
});
|