@theia/application-package 1.67.0-next.13 → 1.67.0-next.56
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/package.json +3 -3
- package/lib/api.d.ts +0 -6
- package/lib/api.d.ts.map +0 -1
- package/lib/api.js +0 -24
- package/lib/api.js.map +0 -1
- package/lib/application-package.d.ts +0 -88
- package/lib/application-package.d.ts.map +0 -1
- package/lib/application-package.js +0 -259
- package/lib/application-package.js.map +0 -1
- package/lib/application-package.spec.d.ts +0 -2
- package/lib/application-package.spec.d.ts.map +0 -1
- package/lib/application-package.spec.js +0 -58
- package/lib/application-package.spec.js.map +0 -1
- package/lib/application-props.d.ts +0 -216
- package/lib/application-props.d.ts.map +0 -1
- package/lib/application-props.js +0 -107
- package/lib/application-props.js.map +0 -1
- package/lib/environment.d.ts +0 -40
- package/lib/environment.d.ts.map +0 -1
- package/lib/environment.js +0 -74
- package/lib/environment.js.map +0 -1
- package/lib/extension-package-collector.d.ts +0 -16
- package/lib/extension-package-collector.d.ts.map +0 -1
- package/lib/extension-package-collector.js +0 -83
- package/lib/extension-package-collector.js.map +0 -1
- package/lib/extension-package.d.ts +0 -66
- package/lib/extension-package.d.ts.map +0 -1
- package/lib/extension-package.js +0 -177
- package/lib/extension-package.js.map +0 -1
- package/lib/index.d.ts +0 -7
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -25
- package/lib/index.js.map +0 -1
- package/lib/json-file.d.ts +0 -4
- package/lib/json-file.d.ts.map +0 -1
- package/lib/json-file.js +0 -27
- package/lib/json-file.js.map +0 -1
- package/lib/npm-registry.d.ts +0 -80
- package/lib/npm-registry.d.ts.map +0 -1
- package/lib/npm-registry.js +0 -102
- package/lib/npm-registry.js.map +0 -1
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
import type { BrowserWindowConstructorOptions } from 'electron';
|
|
2
|
-
export import deepmerge = require('deepmerge');
|
|
3
|
-
export type RequiredRecursive<T> = {
|
|
4
|
-
[K in keyof T]-?: T[K] extends object ? RequiredRecursive<T[K]> : T[K];
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* Base configuration for the Theia application.
|
|
8
|
-
*/
|
|
9
|
-
export interface ApplicationConfig {
|
|
10
|
-
readonly [key: string]: any;
|
|
11
|
-
}
|
|
12
|
-
export type ElectronFrontendApplicationConfig = RequiredRecursive<ElectronFrontendApplicationConfig.Partial>;
|
|
13
|
-
export declare namespace ElectronFrontendApplicationConfig {
|
|
14
|
-
const DEFAULT: ElectronFrontendApplicationConfig;
|
|
15
|
-
interface SplashScreenOptions {
|
|
16
|
-
/**
|
|
17
|
-
* Initial width of the splash screen. Defaults to 640.
|
|
18
|
-
*/
|
|
19
|
-
width?: number;
|
|
20
|
-
/**
|
|
21
|
-
* Initial height of the splash screen. Defaults to 480.
|
|
22
|
-
*/
|
|
23
|
-
height?: number;
|
|
24
|
-
/**
|
|
25
|
-
* Minimum amount of time in milliseconds to show the splash screen before main window is shown.
|
|
26
|
-
* Defaults to 0, i.e. the splash screen will be shown until the frontend application is ready.
|
|
27
|
-
*/
|
|
28
|
-
minDuration?: number;
|
|
29
|
-
/**
|
|
30
|
-
* Maximum amount of time in milliseconds before splash screen is removed and main window is shown.
|
|
31
|
-
* Defaults to 30000.
|
|
32
|
-
*/
|
|
33
|
-
maxDuration?: number;
|
|
34
|
-
/**
|
|
35
|
-
* The content to load in the splash screen.
|
|
36
|
-
* Will be resolved from application root.
|
|
37
|
-
*
|
|
38
|
-
* Mandatory attribute.
|
|
39
|
-
*/
|
|
40
|
-
content?: string;
|
|
41
|
-
}
|
|
42
|
-
interface Partial {
|
|
43
|
-
/**
|
|
44
|
-
* Override or add properties to the electron `windowOptions`.
|
|
45
|
-
*
|
|
46
|
-
* Defaults to `{}`.
|
|
47
|
-
*/
|
|
48
|
-
readonly windowOptions?: BrowserWindowConstructorOptions;
|
|
49
|
-
/**
|
|
50
|
-
* Whether or not to show an empty Electron window as early as possible.
|
|
51
|
-
*
|
|
52
|
-
* Defaults to `true`.
|
|
53
|
-
*/
|
|
54
|
-
readonly showWindowEarly?: boolean;
|
|
55
|
-
/**
|
|
56
|
-
* Configuration options for splash screen.
|
|
57
|
-
*
|
|
58
|
-
* Defaults to `{}` which results in no splash screen being displayed.
|
|
59
|
-
*/
|
|
60
|
-
readonly splashScreenOptions?: SplashScreenOptions;
|
|
61
|
-
/**
|
|
62
|
-
* The custom uri scheme the application registers to in the operating system.
|
|
63
|
-
*/
|
|
64
|
-
readonly uriScheme: string;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
export type DefaultTheme = string | Readonly<{
|
|
68
|
-
light: string;
|
|
69
|
-
dark: string;
|
|
70
|
-
}>;
|
|
71
|
-
export declare namespace DefaultTheme {
|
|
72
|
-
function defaultForOSTheme(theme: DefaultTheme): string;
|
|
73
|
-
function defaultBackgroundColor(dark?: boolean): string;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Application configuration for the frontend. The following properties will be injected into the `index.html`.
|
|
77
|
-
*/
|
|
78
|
-
export type FrontendApplicationConfig = RequiredRecursive<FrontendApplicationConfig.Partial>;
|
|
79
|
-
export declare namespace FrontendApplicationConfig {
|
|
80
|
-
const DEFAULT: FrontendApplicationConfig;
|
|
81
|
-
interface Partial extends ApplicationConfig {
|
|
82
|
-
/**
|
|
83
|
-
* The default theme for the application.
|
|
84
|
-
*
|
|
85
|
-
* Defaults to `dark` if the OS's theme is dark. Otherwise `light`.
|
|
86
|
-
*/
|
|
87
|
-
readonly defaultTheme?: DefaultTheme;
|
|
88
|
-
/**
|
|
89
|
-
* The default icon theme for the application.
|
|
90
|
-
*
|
|
91
|
-
* Defaults to `none`.
|
|
92
|
-
*/
|
|
93
|
-
readonly defaultIconTheme?: string;
|
|
94
|
-
/**
|
|
95
|
-
* The name of the application.
|
|
96
|
-
*
|
|
97
|
-
* Defaults to `Eclipse Theia`.
|
|
98
|
-
*/
|
|
99
|
-
readonly applicationName?: string;
|
|
100
|
-
/**
|
|
101
|
-
* Electron specific configuration.
|
|
102
|
-
*
|
|
103
|
-
* Defaults to `ElectronFrontendApplicationConfig.DEFAULT`.
|
|
104
|
-
*/
|
|
105
|
-
readonly electron?: ElectronFrontendApplicationConfig.Partial;
|
|
106
|
-
/**
|
|
107
|
-
* The default locale for the application.
|
|
108
|
-
*
|
|
109
|
-
* Defaults to "".
|
|
110
|
-
*/
|
|
111
|
-
readonly defaultLocale?: string;
|
|
112
|
-
/**
|
|
113
|
-
* When `true`, the application will validate the JSON schema of the preferences on start
|
|
114
|
-
* and log warnings to the console if the schema is not valid.
|
|
115
|
-
*
|
|
116
|
-
* Defaults to `true`.
|
|
117
|
-
*/
|
|
118
|
-
readonly validatePreferencesSchema?: boolean;
|
|
119
|
-
/**
|
|
120
|
-
* When 'true', the window will reload in case the front end reconnects to a back-end,
|
|
121
|
-
* but the back end does not have a connection context for this front end anymore.
|
|
122
|
-
*/
|
|
123
|
-
readonly reloadOnReconnect?: boolean;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Application configuration for the backend.
|
|
128
|
-
*/
|
|
129
|
-
export type BackendApplicationConfig = RequiredRecursive<BackendApplicationConfig.Partial>;
|
|
130
|
-
export declare namespace BackendApplicationConfig {
|
|
131
|
-
const DEFAULT: BackendApplicationConfig;
|
|
132
|
-
interface Partial extends ApplicationConfig {
|
|
133
|
-
/**
|
|
134
|
-
* If true and in Electron mode, only one instance of the application is allowed to run at a time.
|
|
135
|
-
*
|
|
136
|
-
* Defaults to `false`.
|
|
137
|
-
*/
|
|
138
|
-
readonly singleInstance?: boolean;
|
|
139
|
-
/**
|
|
140
|
-
* The time in ms the connection context will be preserved for reconnection after a front end disconnects.
|
|
141
|
-
*/
|
|
142
|
-
readonly frontendConnectionTimeout?: number;
|
|
143
|
-
/**
|
|
144
|
-
* Configuration folder within the home user folder
|
|
145
|
-
*
|
|
146
|
-
* Defaults to `.theia`
|
|
147
|
-
*/
|
|
148
|
-
readonly configurationFolder?: string;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Configuration for the generator.
|
|
153
|
-
*/
|
|
154
|
-
export type GeneratorConfig = RequiredRecursive<GeneratorConfig.Partial>;
|
|
155
|
-
export declare namespace GeneratorConfig {
|
|
156
|
-
const DEFAULT: GeneratorConfig;
|
|
157
|
-
interface Partial {
|
|
158
|
-
/**
|
|
159
|
-
* Template to use for extra preload content markup (file path or HTML).
|
|
160
|
-
*
|
|
161
|
-
* Defaults to `''`.
|
|
162
|
-
*/
|
|
163
|
-
readonly preloadTemplate?: string;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
export interface NpmRegistryProps {
|
|
167
|
-
/**
|
|
168
|
-
* Defaults to `false`.
|
|
169
|
-
*/
|
|
170
|
-
readonly next: boolean;
|
|
171
|
-
/**
|
|
172
|
-
* Defaults to `https://registry.npmjs.org/`.
|
|
173
|
-
*/
|
|
174
|
-
readonly registry: string;
|
|
175
|
-
}
|
|
176
|
-
export declare namespace NpmRegistryProps {
|
|
177
|
-
const DEFAULT: NpmRegistryProps;
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Representation of all backend and frontend related Theia extension and application properties.
|
|
181
|
-
*/
|
|
182
|
-
export interface ApplicationProps extends NpmRegistryProps {
|
|
183
|
-
readonly [key: string]: any;
|
|
184
|
-
/**
|
|
185
|
-
* Whether the extension targets the browser or electron. Defaults to `browser`.
|
|
186
|
-
*/
|
|
187
|
-
readonly target: ApplicationProps.Target;
|
|
188
|
-
/**
|
|
189
|
-
* Frontend related properties.
|
|
190
|
-
*/
|
|
191
|
-
readonly frontend: {
|
|
192
|
-
readonly config: FrontendApplicationConfig;
|
|
193
|
-
};
|
|
194
|
-
/**
|
|
195
|
-
* Backend specific properties.
|
|
196
|
-
*/
|
|
197
|
-
readonly backend: {
|
|
198
|
-
readonly config: BackendApplicationConfig;
|
|
199
|
-
};
|
|
200
|
-
/**
|
|
201
|
-
* Generator specific properties.
|
|
202
|
-
*/
|
|
203
|
-
readonly generator: {
|
|
204
|
-
readonly config: GeneratorConfig;
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
export declare namespace ApplicationProps {
|
|
208
|
-
type Target = `${ApplicationTarget}`;
|
|
209
|
-
enum ApplicationTarget {
|
|
210
|
-
browser = "browser",
|
|
211
|
-
electron = "electron",
|
|
212
|
-
browserOnly = "browser-only"
|
|
213
|
-
}
|
|
214
|
-
const DEFAULT: ApplicationProps;
|
|
215
|
-
}
|
|
216
|
-
//# sourceMappingURL=application-props.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,iCAKrB,CAAC;IACF,UAAiB,mBAAmB;QAChC;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;QACf;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB;;;WAGG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;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AAE;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
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2018 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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.ApplicationProps = exports.NpmRegistryProps = exports.GeneratorConfig = exports.BackendApplicationConfig = exports.FrontendApplicationConfig = exports.DefaultTheme = exports.ElectronFrontendApplicationConfig = void 0;
|
|
19
|
-
exports.deepmerge = require("deepmerge");
|
|
20
|
-
var ElectronFrontendApplicationConfig;
|
|
21
|
-
(function (ElectronFrontendApplicationConfig) {
|
|
22
|
-
ElectronFrontendApplicationConfig.DEFAULT = {
|
|
23
|
-
windowOptions: {},
|
|
24
|
-
showWindowEarly: true,
|
|
25
|
-
splashScreenOptions: {},
|
|
26
|
-
uriScheme: 'theia'
|
|
27
|
-
};
|
|
28
|
-
})(ElectronFrontendApplicationConfig || (exports.ElectronFrontendApplicationConfig = ElectronFrontendApplicationConfig = {}));
|
|
29
|
-
var DefaultTheme;
|
|
30
|
-
(function (DefaultTheme) {
|
|
31
|
-
function defaultForOSTheme(theme) {
|
|
32
|
-
if (typeof theme === 'string') {
|
|
33
|
-
return theme;
|
|
34
|
-
}
|
|
35
|
-
if (typeof window !== 'undefined' &&
|
|
36
|
-
window.matchMedia &&
|
|
37
|
-
window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
|
38
|
-
return theme.dark;
|
|
39
|
-
}
|
|
40
|
-
return theme.light;
|
|
41
|
-
}
|
|
42
|
-
DefaultTheme.defaultForOSTheme = defaultForOSTheme;
|
|
43
|
-
function defaultBackgroundColor(dark) {
|
|
44
|
-
// The default light background color is based on the `colors#editor.background` value from
|
|
45
|
-
// `packages/monaco/data/monaco-themes/vscode/dark_vs.json` and the dark background comes from the `light_vs.json`.
|
|
46
|
-
return dark ? '#1E1E1E' : '#FFFFFF';
|
|
47
|
-
}
|
|
48
|
-
DefaultTheme.defaultBackgroundColor = defaultBackgroundColor;
|
|
49
|
-
})(DefaultTheme || (exports.DefaultTheme = DefaultTheme = {}));
|
|
50
|
-
var FrontendApplicationConfig;
|
|
51
|
-
(function (FrontendApplicationConfig) {
|
|
52
|
-
FrontendApplicationConfig.DEFAULT = {
|
|
53
|
-
applicationName: 'Eclipse Theia',
|
|
54
|
-
defaultTheme: { light: 'light', dark: 'dark' },
|
|
55
|
-
defaultIconTheme: 'theia-file-icons',
|
|
56
|
-
electron: ElectronFrontendApplicationConfig.DEFAULT,
|
|
57
|
-
defaultLocale: '',
|
|
58
|
-
validatePreferencesSchema: true,
|
|
59
|
-
reloadOnReconnect: false,
|
|
60
|
-
uriScheme: 'theia'
|
|
61
|
-
};
|
|
62
|
-
})(FrontendApplicationConfig || (exports.FrontendApplicationConfig = FrontendApplicationConfig = {}));
|
|
63
|
-
var BackendApplicationConfig;
|
|
64
|
-
(function (BackendApplicationConfig) {
|
|
65
|
-
BackendApplicationConfig.DEFAULT = {
|
|
66
|
-
singleInstance: true,
|
|
67
|
-
frontendConnectionTimeout: 0,
|
|
68
|
-
configurationFolder: '.theia'
|
|
69
|
-
};
|
|
70
|
-
})(BackendApplicationConfig || (exports.BackendApplicationConfig = BackendApplicationConfig = {}));
|
|
71
|
-
var GeneratorConfig;
|
|
72
|
-
(function (GeneratorConfig) {
|
|
73
|
-
GeneratorConfig.DEFAULT = {
|
|
74
|
-
preloadTemplate: ''
|
|
75
|
-
};
|
|
76
|
-
})(GeneratorConfig || (exports.GeneratorConfig = GeneratorConfig = {}));
|
|
77
|
-
var NpmRegistryProps;
|
|
78
|
-
(function (NpmRegistryProps) {
|
|
79
|
-
NpmRegistryProps.DEFAULT = {
|
|
80
|
-
next: false,
|
|
81
|
-
registry: 'https://registry.npmjs.org/'
|
|
82
|
-
};
|
|
83
|
-
})(NpmRegistryProps || (exports.NpmRegistryProps = NpmRegistryProps = {}));
|
|
84
|
-
var ApplicationProps;
|
|
85
|
-
(function (ApplicationProps) {
|
|
86
|
-
let ApplicationTarget;
|
|
87
|
-
(function (ApplicationTarget) {
|
|
88
|
-
ApplicationTarget["browser"] = "browser";
|
|
89
|
-
ApplicationTarget["electron"] = "electron";
|
|
90
|
-
ApplicationTarget["browserOnly"] = "browser-only";
|
|
91
|
-
})(ApplicationTarget = ApplicationProps.ApplicationTarget || (ApplicationProps.ApplicationTarget = {}));
|
|
92
|
-
;
|
|
93
|
-
ApplicationProps.DEFAULT = {
|
|
94
|
-
...NpmRegistryProps.DEFAULT,
|
|
95
|
-
target: 'browser',
|
|
96
|
-
backend: {
|
|
97
|
-
config: BackendApplicationConfig.DEFAULT
|
|
98
|
-
},
|
|
99
|
-
frontend: {
|
|
100
|
-
config: FrontendApplicationConfig.DEFAULT
|
|
101
|
-
},
|
|
102
|
-
generator: {
|
|
103
|
-
config: GeneratorConfig.DEFAULT
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
})(ApplicationProps || (exports.ApplicationProps = ApplicationProps = {}));
|
|
107
|
-
//# sourceMappingURL=application-props.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,mBAAmB,EAAE,EAAE;QACvB,SAAS,EAAE,OAAO;KACrB,CAAC;AAwDN,CAAC,EA9DgB,iCAAiC,iDAAjC,iCAAiC,QA8DjD;AAGD,IAAiB,YAAY,CAmB5B;AAnBD,WAAiB,YAAY;IACzB,SAAgB,iBAAiB,CAAC,KAAmB;QACjD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC5B,OAAO,KAAK,CAAC;QACjB,CAAC;QACD,IACI,OAAO,MAAM,KAAK,WAAW;YAC7B,MAAM,CAAC,UAAU;YACjB,MAAM,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAAC,OAAO,EAC3D,CAAC;YACC,OAAO,KAAK,CAAC,IAAI,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N,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/lib/environment.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The electron specific environment.
|
|
3
|
-
*/
|
|
4
|
-
declare class ElectronEnv {
|
|
5
|
-
/**
|
|
6
|
-
* Environment variable that can be accessed on the `process` to check if running in electron or not.
|
|
7
|
-
*/
|
|
8
|
-
readonly THEIA_ELECTRON_VERSION = "THEIA_ELECTRON_VERSION";
|
|
9
|
-
/**
|
|
10
|
-
* `true` if running in electron. Otherwise, `false`.
|
|
11
|
-
*
|
|
12
|
-
* Can be called from both the `main` and the render process. Also works for forked cluster workers.
|
|
13
|
-
*/
|
|
14
|
-
is(): boolean;
|
|
15
|
-
/**
|
|
16
|
-
* `true` if running in Electron in development mode. Otherwise, `false`.
|
|
17
|
-
*
|
|
18
|
-
* Cannot be used from the browser. From the browser, it is always `false`.
|
|
19
|
-
*/
|
|
20
|
-
isDevMode(): boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Creates and return with a new environment object which always contains the `ELECTRON_RUN_AS_NODE: 1` property pair.
|
|
23
|
-
* This should be used to `spawn` and `fork` a new Node.js process from the Node.js shipped with Electron. Otherwise, a new Electron
|
|
24
|
-
* process will be spawned which [has side-effects](https://github.com/eclipse-theia/theia/issues/5385).
|
|
25
|
-
*
|
|
26
|
-
* If called from the backend and the `env` argument is not defined, it falls back to `process.env` such as Node.js behaves
|
|
27
|
-
* with the [`SpawnOptions`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options).
|
|
28
|
-
* If `env` is defined, it will be shallow-copied.
|
|
29
|
-
*
|
|
30
|
-
* Calling this function from the frontend does not make any sense, hence throw an error.
|
|
31
|
-
*/
|
|
32
|
-
runAsNodeEnv(env?: any): any & {
|
|
33
|
-
ELECTRON_RUN_AS_NODE: 1;
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
declare const environment: Readonly<{
|
|
37
|
-
electron: ElectronEnv;
|
|
38
|
-
}>;
|
|
39
|
-
export { environment };
|
|
40
|
-
//# sourceMappingURL=environment.d.ts.map
|
package/lib/environment.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../src/environment.ts"],"names":[],"mappings":"AAkBA;;GAEG;AACH,cAAM,WAAW;IAEb;;OAEG;IACH,QAAQ,CAAC,sBAAsB,4BAA4B;IAE3D;;;;OAIG;IACH,EAAE,IAAI,OAAO;IAIb;;;;OAIG;IACH,SAAS,IAAI,OAAO;IAOpB;;;;;;;;;;OAUG;IAEH,YAAY,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG;QAAE,oBAAoB,EAAE,CAAC,CAAA;KAAE;CAU7D;AAGD,QAAA,MAAM,WAAW,EAAE,QAAQ,CAAC;IAAE,QAAQ,EAAE,WAAW,CAAA;CAAE,CAAgB,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
package/lib/environment.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2018 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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.environment = void 0;
|
|
19
|
-
const isElectron = require('is-electron');
|
|
20
|
-
/**
|
|
21
|
-
* The electron specific environment.
|
|
22
|
-
*/
|
|
23
|
-
class ElectronEnv {
|
|
24
|
-
constructor() {
|
|
25
|
-
/**
|
|
26
|
-
* Environment variable that can be accessed on the `process` to check if running in electron or not.
|
|
27
|
-
*/
|
|
28
|
-
this.THEIA_ELECTRON_VERSION = 'THEIA_ELECTRON_VERSION';
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* `true` if running in electron. Otherwise, `false`.
|
|
32
|
-
*
|
|
33
|
-
* Can be called from both the `main` and the render process. Also works for forked cluster workers.
|
|
34
|
-
*/
|
|
35
|
-
is() {
|
|
36
|
-
return isElectron();
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* `true` if running in Electron in development mode. Otherwise, `false`.
|
|
40
|
-
*
|
|
41
|
-
* Cannot be used from the browser. From the browser, it is always `false`.
|
|
42
|
-
*/
|
|
43
|
-
isDevMode() {
|
|
44
|
-
return this.is()
|
|
45
|
-
&& typeof process !== 'undefined'
|
|
46
|
-
// `defaultApp` does not exist on the Node.js API, but on electron (`electron.d.ts`).
|
|
47
|
-
&& (process.defaultApp || /node_modules[/\\]electron[/\\]/.test(process.execPath)); // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Creates and return with a new environment object which always contains the `ELECTRON_RUN_AS_NODE: 1` property pair.
|
|
51
|
-
* This should be used to `spawn` and `fork` a new Node.js process from the Node.js shipped with Electron. Otherwise, a new Electron
|
|
52
|
-
* process will be spawned which [has side-effects](https://github.com/eclipse-theia/theia/issues/5385).
|
|
53
|
-
*
|
|
54
|
-
* If called from the backend and the `env` argument is not defined, it falls back to `process.env` such as Node.js behaves
|
|
55
|
-
* with the [`SpawnOptions`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options).
|
|
56
|
-
* If `env` is defined, it will be shallow-copied.
|
|
57
|
-
*
|
|
58
|
-
* Calling this function from the frontend does not make any sense, hence throw an error.
|
|
59
|
-
*/
|
|
60
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
61
|
-
runAsNodeEnv(env) {
|
|
62
|
-
if (typeof process === 'undefined') {
|
|
63
|
-
throw new Error("'process' cannot be undefined.");
|
|
64
|
-
}
|
|
65
|
-
return {
|
|
66
|
-
...(env === undefined ? process.env : env),
|
|
67
|
-
ELECTRON_RUN_AS_NODE: 1
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
const electron = new ElectronEnv();
|
|
72
|
-
const environment = { electron };
|
|
73
|
-
exports.environment = environment;
|
|
74
|
-
//# sourceMappingURL=environment.js.map
|
package/lib/environment.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../src/environment.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,MAAM,UAAU,GAAkB,OAAO,CAAC,aAAa,CAAC,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW;IAAjB;QAEI;;WAEG;QACM,2BAAsB,GAAG,wBAAwB,CAAC;IA6C/D,CAAC;IA3CG;;;;OAIG;IACH,EAAE;QACE,OAAO,UAAU,EAAE,CAAC;IACxB,CAAC;IAED;;;;OAIG;IACH,SAAS;QACL,OAAO,IAAI,CAAC,EAAE,EAAE;eACT,OAAO,OAAO,KAAK,WAAW;YACjC,qFAAqF;eAClF,CAAE,OAAe,CAAC,UAAU,IAAI,gCAAgC,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,yDAAyD;IAC9J,CAAC;IAED;;;;;;;;;;OAUG;IACH,8DAA8D;IAC9D,YAAY,CAAC,GAAS;QAClB,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;QACtD,CAAC;QACD,OAAO;YACH,GAAG,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;YAC1C,oBAAoB,EAAE,CAAC;SAC1B,CAAC;IACN,CAAC;CAEJ;AAED,MAAM,QAAQ,GAAG,IAAI,WAAW,EAAE,CAAC;AACnC,MAAM,WAAW,GAAwC,EAAE,QAAQ,EAAE,CAAC;AAC7D,kCAAW"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { NodePackage, PublishedNodePackage } from './npm-registry';
|
|
2
|
-
import { ExtensionPackage, ExtensionPackageOptions } from './extension-package';
|
|
3
|
-
export declare class ExtensionPackageCollector {
|
|
4
|
-
protected readonly extensionPackageFactory: (raw: PublishedNodePackage, options?: ExtensionPackageOptions) => ExtensionPackage;
|
|
5
|
-
protected readonly resolveModule: (packagepath: string, modulePath: string) => string;
|
|
6
|
-
protected readonly sorted: ExtensionPackage[];
|
|
7
|
-
protected readonly visited: Set<string>;
|
|
8
|
-
constructor(extensionPackageFactory: (raw: PublishedNodePackage, options?: ExtensionPackageOptions) => ExtensionPackage, resolveModule: (packagepath: string, modulePath: string) => string);
|
|
9
|
-
protected root: NodePackage;
|
|
10
|
-
collect(packagePath: string, pck: NodePackage): ReadonlyArray<ExtensionPackage>;
|
|
11
|
-
protected collectPackages(packagePath: string, pck: NodePackage): void;
|
|
12
|
-
protected parent: ExtensionPackage | undefined;
|
|
13
|
-
protected collectPackagesWithParent(packagePath: string, pck: NodePackage, parent: ExtensionPackage): void;
|
|
14
|
-
protected collectPackage(parentPackagePath: string, name: string, versionRange: string, optional: boolean): void;
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=extension-package-collector.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extension-package-collector.d.ts","sourceRoot":"","sources":["../src/extension-package-collector.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAuB,MAAM,qBAAqB,CAAC;AAErG,qBAAa,yBAAyB;IAM9B,SAAS,CAAC,QAAQ,CAAC,uBAAuB,EAAE,CAAC,GAAG,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,uBAAuB,KAAK,gBAAgB;IAC9H,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,MAAM;IALzF,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,gBAAgB,EAAE,CAAM;IACnD,SAAS,CAAC,QAAQ,CAAC,OAAO,cAAqB;gBAGxB,uBAAuB,EAAE,CAAC,GAAG,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,uBAAuB,KAAK,gBAAgB,EAC3G,aAAa,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,MAAM;IAGzF,SAAS,CAAC,IAAI,EAAE,WAAW,CAAC;IAC5B,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,GAAG,aAAa,CAAC,gBAAgB,CAAC;IAM/E,SAAS,CAAC,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,GAAG,IAAI;IAUtE,SAAS,CAAC,MAAM,EAAE,gBAAgB,GAAG,SAAS,CAAC;IAC/C,SAAS,CAAC,yBAAyB,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,gBAAgB,GAAG,IAAI;IAO1G,SAAS,CAAC,cAAc,CAAC,iBAAiB,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI;CAgCnH"}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2017 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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.ExtensionPackageCollector = void 0;
|
|
19
|
-
const json_file_1 = require("./json-file");
|
|
20
|
-
const extension_package_1 = require("./extension-package");
|
|
21
|
-
class ExtensionPackageCollector {
|
|
22
|
-
constructor(extensionPackageFactory, resolveModule) {
|
|
23
|
-
this.extensionPackageFactory = extensionPackageFactory;
|
|
24
|
-
this.resolveModule = resolveModule;
|
|
25
|
-
this.sorted = [];
|
|
26
|
-
this.visited = new Set();
|
|
27
|
-
}
|
|
28
|
-
collect(packagePath, pck) {
|
|
29
|
-
this.root = pck;
|
|
30
|
-
this.collectPackages(packagePath, pck);
|
|
31
|
-
return this.sorted;
|
|
32
|
-
}
|
|
33
|
-
collectPackages(packagePath, pck) {
|
|
34
|
-
var _a, _b, _c, _d;
|
|
35
|
-
for (const [dependency, versionRange] of [
|
|
36
|
-
...Object.entries((_a = pck.dependencies) !== null && _a !== void 0 ? _a : {}),
|
|
37
|
-
...Object.entries((_b = pck.peerDependencies) !== null && _b !== void 0 ? _b : {})
|
|
38
|
-
]) {
|
|
39
|
-
const optional = ((_d = (_c = pck.peerDependenciesMeta) === null || _c === void 0 ? void 0 : _c[dependency]) === null || _d === void 0 ? void 0 : _d.optional) || false;
|
|
40
|
-
this.collectPackage(packagePath, dependency, versionRange, optional);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
collectPackagesWithParent(packagePath, pck, parent) {
|
|
44
|
-
const current = this.parent;
|
|
45
|
-
this.parent = parent;
|
|
46
|
-
this.collectPackages(packagePath, pck);
|
|
47
|
-
this.parent = current;
|
|
48
|
-
}
|
|
49
|
-
collectPackage(parentPackagePath, name, versionRange, optional) {
|
|
50
|
-
if (this.visited.has(name)) {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
this.visited.add(name);
|
|
54
|
-
let packagePath;
|
|
55
|
-
try {
|
|
56
|
-
packagePath = this.resolveModule(parentPackagePath, name);
|
|
57
|
-
}
|
|
58
|
-
catch (err) {
|
|
59
|
-
if (optional) {
|
|
60
|
-
console.log(`Could not resolve optional peer dependency '${name}'. Skipping...`);
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
console.error(err.message);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
if (!packagePath) {
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
const pck = (0, json_file_1.readJsonFile)(packagePath);
|
|
70
|
-
if (extension_package_1.RawExtensionPackage.is(pck)) {
|
|
71
|
-
const parent = this.parent;
|
|
72
|
-
const version = pck.version;
|
|
73
|
-
const transitive = !(name in this.root.dependencies);
|
|
74
|
-
pck.installed = { packagePath, version, parent, transitive };
|
|
75
|
-
pck.version = versionRange;
|
|
76
|
-
const extensionPackage = this.extensionPackageFactory(pck, { alias: name });
|
|
77
|
-
this.collectPackagesWithParent(packagePath, pck, extensionPackage);
|
|
78
|
-
this.sorted.push(extensionPackage);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
exports.ExtensionPackageCollector = ExtensionPackageCollector;
|
|
83
|
-
//# sourceMappingURL=extension-package-collector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extension-package-collector.js","sourceRoot":"","sources":["../src/extension-package-collector.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,2CAA2C;AAE3C,2DAAqG;AAErG,MAAa,yBAAyB;IAKlC,YACuB,uBAA2G,EAC3G,aAAkE;QADlE,4BAAuB,GAAvB,uBAAuB,CAAoF;QAC3G,kBAAa,GAAb,aAAa,CAAqD;QALtE,WA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ublishedNodePackage, NodePackage } from './npm-registry';
|
|
2
|
-
export interface Extension {
|
|
3
|
-
frontendPreload?: string;
|
|
4
|
-
frontendOnlyPreload?: string;
|
|
5
|
-
frontend?: string;
|
|
6
|
-
frontendOnly?: string;
|
|
7
|
-
frontendElectron?: string;
|
|
8
|
-
secondaryWindow?: string;
|
|
9
|
-
backend?: string;
|
|
10
|
-
backendElectron?: string;
|
|
11
|
-
electronMain?: string;
|
|
12
|
-
preload?: string;
|
|
13
|
-
}
|
|
14
|
-
export interface ExtensionPackageOptions {
|
|
15
|
-
/**
|
|
16
|
-
* Alias to use in place of the original package's name.
|
|
17
|
-
*/
|
|
18
|
-
alias?: string;
|
|
19
|
-
}
|
|
20
|
-
export declare class ExtensionPackage {
|
|
21
|
-
readonly raw: PublishedNodePackage & Partial<RawExtensionPackage>;
|
|
22
|
-
protected readonly registry: NpmRegistry;
|
|
23
|
-
protected _name: string;
|
|
24
|
-
constructor(raw: PublishedNodePackage & Partial<RawExtensionPackage>, registry: NpmRegistry, options?: ExtensionPackageOptions);
|
|
25
|
-
/**
|
|
26
|
-
* The name of the extension's package as defined in "dependencies" (might be aliased)
|
|
27
|
-
*/
|
|
28
|
-
get name(): string;
|
|
29
|
-
get version(): string;
|
|
30
|
-
get description(): string;
|
|
31
|
-
get theiaExtensions(): Extension[];
|
|
32
|
-
get installed(): boolean;
|
|
33
|
-
get dependent(): string | undefined;
|
|
34
|
-
get transitive(): boolean;
|
|
35
|
-
get parent(): ExtensionPackage | undefined;
|
|
36
|
-
protected view(): Promise<RawExtensionPackage.ViewState>;
|
|
37
|
-
protected readme?: string;
|
|
38
|
-
getReadme(): Promise<string>;
|
|
39
|
-
protected resolveReadme(): Promise<string>;
|
|
40
|
-
getAuthor(): string;
|
|
41
|
-
}
|
|
42
|
-
export interface RawExtensionPackage extends PublishedNodePackage {
|
|
43
|
-
installed?: RawExtensionPackage.InstalledState;
|
|
44
|
-
view?: RawExtensionPackage.ViewState;
|
|
45
|
-
theiaExtensions: Extension[];
|
|
46
|
-
}
|
|
47
|
-
export declare namespace RawExtensionPackage {
|
|
48
|
-
interface InstalledState {
|
|
49
|
-
version: string;
|
|
50
|
-
packagePath: string;
|
|
51
|
-
transitive: boolean;
|
|
52
|
-
parent?: ExtensionPackage;
|
|
53
|
-
}
|
|
54
|
-
class ViewState {
|
|
55
|
-
protected readonly registry: NpmRegistry;
|
|
56
|
-
readme?: string;
|
|
57
|
-
tags?: {
|
|
58
|
-
[tag: string]: string;
|
|
59
|
-
};
|
|
60
|
-
constructor(registry: NpmRegistry);
|
|
61
|
-
get latestVersion(): string | undefined;
|
|
62
|
-
}
|
|
63
|
-
function is(pck: NodePackage | undefined): pck is RawExtensionPackage;
|
|
64
|
-
function view(registry: NpmRegistry, name: string, version?: string): Promise<RawExtensionPackage | undefined>;
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=extension-package.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extension-package.d.ts","sourceRoot":"","sources":["../src/extension-package.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEhF,MAAM,WAAW,SAAS;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACpC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,qBAAa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