@theia/application-manager 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 (45) hide show
  1. package/README.md +25 -25
  2. package/lib/application-package-manager.d.ts +45 -39
  3. package/lib/application-package-manager.d.ts.map +1 -1
  4. package/lib/application-package-manager.js +225 -207
  5. package/lib/application-package-manager.js.map +1 -1
  6. package/lib/application-process.d.ts +19 -19
  7. package/lib/application-process.js +72 -72
  8. package/lib/expose-loader.d.ts +8 -8
  9. package/lib/expose-loader.js +69 -69
  10. package/lib/generator/abstract-generator.d.ts +17 -16
  11. package/lib/generator/abstract-generator.d.ts.map +1 -1
  12. package/lib/generator/abstract-generator.js +57 -54
  13. package/lib/generator/abstract-generator.js.map +1 -1
  14. package/lib/generator/backend-generator.d.ts +7 -7
  15. package/lib/generator/backend-generator.d.ts.map +1 -1
  16. package/lib/generator/backend-generator.js +196 -192
  17. package/lib/generator/backend-generator.js.map +1 -1
  18. package/lib/generator/frontend-generator.d.ts +13 -13
  19. package/lib/generator/frontend-generator.d.ts.map +1 -1
  20. package/lib/generator/frontend-generator.js +221 -205
  21. package/lib/generator/frontend-generator.js.map +1 -1
  22. package/lib/generator/index.d.ts +3 -3
  23. package/lib/generator/index.js +30 -30
  24. package/lib/generator/webpack-generator.d.ts +12 -12
  25. package/lib/generator/webpack-generator.d.ts.map +1 -1
  26. package/lib/generator/webpack-generator.js +506 -500
  27. package/lib/generator/webpack-generator.js.map +1 -1
  28. package/lib/index.d.ts +3 -3
  29. package/lib/index.js +30 -30
  30. package/lib/package.spec.js +25 -25
  31. package/lib/rebuild.d.ts +24 -24
  32. package/lib/rebuild.d.ts.map +1 -1
  33. package/lib/rebuild.js +309 -309
  34. package/package.json +7 -6
  35. package/src/application-package-manager.ts +263 -241
  36. package/src/application-process.ts +80 -80
  37. package/src/expose-loader.ts +80 -80
  38. package/src/generator/abstract-generator.ts +69 -65
  39. package/src/generator/backend-generator.ts +198 -194
  40. package/src/generator/frontend-generator.ts +231 -215
  41. package/src/generator/index.ts +19 -19
  42. package/src/generator/webpack-generator.ts +514 -508
  43. package/src/index.ts +19 -19
  44. package/src/package.spec.ts +28 -28
  45. package/src/rebuild.ts +345 -345
@@ -1,206 +1,222 @@
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.FrontendGenerator = void 0;
19
- /* eslint-disable @typescript-eslint/indent */
20
- const os_1 = require("os");
21
- const abstract_generator_1 = require("./abstract-generator");
22
- const fs_1 = require("fs");
23
- class FrontendGenerator extends abstract_generator_1.AbstractGenerator {
24
- async generate(options) {
25
- await this.write(this.pck.frontend('index.html'), this.compileIndexHtml(this.pck.targetFrontendModules));
26
- await this.write(this.pck.frontend('index.js'), this.compileIndexJs(this.pck.targetFrontendModules, this.pck.frontendPreloadModules));
27
- await this.write(this.pck.frontend('secondary-window.html'), this.compileSecondaryWindowHtml());
28
- await this.write(this.pck.frontend('secondary-index.js'), this.compileSecondaryIndexJs(this.pck.secondaryWindowModules));
29
- if (this.pck.isElectron()) {
30
- await this.write(this.pck.frontend('preload.js'), this.compilePreloadJs());
31
- }
32
- }
33
- compileIndexPreload(frontendModules) {
34
- const template = this.pck.props.generator.config.preloadTemplate;
35
- if (!template) {
36
- return '';
37
- }
38
- // Support path to html file
39
- if ((0, fs_1.existsSync)(template)) {
40
- return (0, fs_1.readFileSync)(template).toString();
41
- }
42
- return template;
43
- }
44
- compileIndexHtml(frontendModules) {
45
- return `<!DOCTYPE html>
46
- <html lang="en">
47
-
48
- <head>${this.compileIndexHead(frontendModules)}
49
- </head>
50
-
51
- <body>
52
- <div class="theia-preload">${this.compileIndexPreload(frontendModules)}</div>
53
- <script type="text/javascript" src="./bundle.js" charset="utf-8"></script>
54
- </body>
55
-
56
- </html>`;
57
- }
58
- compileIndexHead(frontendModules) {
59
- return `
60
- <meta charset="UTF-8">
61
- <meta name="viewport" content="width=device-width, initial-scale=1">
62
- <meta name="apple-mobile-web-app-capable" content="yes">
63
- <title>${this.pck.props.frontend.config.applicationName}</title>`;
64
- }
65
- compileIndexJs(frontendModules, frontendPreloadModules) {
66
- return `\
67
- // @ts-check
68
- ${this.ifBrowser("require('es6-promise/auto');")}
69
- require('reflect-metadata');
70
- require('setimmediate');
71
- const { Container } = require('inversify');
72
- const { FrontendApplicationConfigProvider } = require('@theia/core/lib/browser/frontend-application-config-provider');
73
-
74
- FrontendApplicationConfigProvider.set(${this.prettyStringify(this.pck.props.frontend.config)});
75
-
76
- ${this.ifMonaco(() => `
77
- self.MonacoEnvironment = {
78
- getWorkerUrl: function (moduleId, label) {
79
- return './editor.worker.js';
80
- }
81
- }`)}
82
-
83
- function load(container, jsModule) {
84
- return Promise.resolve(jsModule)
85
- .then(containerModule => container.load(containerModule.default));
86
- }
87
-
88
- async function preload(container) {
89
- try {
90
- ${Array.from(frontendPreloadModules.values(), jsModulePath => `\
91
- await load(container, ${this.importOrRequire()}('${jsModulePath}'));`).join(os_1.EOL)}
92
- const { Preloader } = require('@theia/core/lib/browser/preload/preloader');
93
- const preloader = container.get(Preloader);
94
- await preloader.initialize();
95
- } catch (reason) {
96
- console.error('Failed to run preload scripts.');
97
- if (reason) {
98
- console.error(reason);
99
- }
100
- }
101
- }
102
-
103
- module.exports = (async () => {
104
- const { messagingFrontendModule } = require('@theia/core/lib/${this.pck.isBrowser()
105
- ? 'browser/messaging/messaging-frontend-module'
106
- : 'electron-browser/messaging/electron-messaging-frontend-module'}');
107
- const container = new Container();
108
- container.load(messagingFrontendModule);
109
- await preload(container);
110
- const { FrontendApplication } = require('@theia/core/lib/browser');
111
- const { frontendApplicationModule } = require('@theia/core/lib/browser/frontend-application-module');
112
- const { loggerFrontendModule } = require('@theia/core/lib/browser/logger-frontend-module');
113
-
114
- container.load(frontendApplicationModule);
115
- container.load(loggerFrontendModule);
116
-
117
- try {
118
- ${Array.from(frontendModules.values(), jsModulePath => `\
119
- await load(container, ${this.importOrRequire()}('${jsModulePath}'));`).join(os_1.EOL)}
120
- await start();
121
- } catch (reason) {
122
- console.error('Failed to start the frontend application.');
123
- if (reason) {
124
- console.error(reason);
125
- }
126
- }
127
-
128
- function start() {
129
- (window['theia'] = window['theia'] || {}).container = container;
130
- return container.get(FrontendApplication).start();
131
- }
132
- })();
133
- `;
134
- }
135
- importOrRequire() {
136
- return this.options.mode !== 'production' ? 'import' : 'require';
137
- }
138
- /** HTML for secondary windows that contain an extracted widget. */
139
- compileSecondaryWindowHtml() {
140
- return `<!DOCTYPE html>
141
- <html lang="en">
142
-
143
- <head>
144
- <meta charset="UTF-8">
145
- <title>Theia Secondary Window</title>
146
- <style>
147
- html, body {
148
- overflow: hidden;
149
- -ms-overflow-style: none;
150
- }
151
-
152
- body {
153
- margin: 0;
154
- }
155
-
156
- html,
157
- head,
158
- body,
159
- .secondary-widget-root,
160
- #widget-host {
161
- width: 100% !important;
162
- height: 100% !important;
163
- }
164
- </style>
165
- <link rel="stylesheet" href="./secondary-window.css">
166
- <script>
167
- window.addEventListener('message', e => {
168
- // Only process messages from Theia main window
169
- if (e.source === window.opener) {
170
- // Delegate message to iframe
171
- document.getElementsByTagName('iframe').item(0).contentWindow.postMessage({ ...e.data }, '*');
172
- }
173
- });
174
- </script>
175
- </head>
176
-
177
- <body>
178
- <div id="widget-host"></div>
179
- </body>
180
-
181
- </html>`;
182
- }
183
- compileSecondaryIndexJs(secondaryWindowModules) {
184
- return `\
185
- // @ts-check
186
- require('reflect-metadata');
187
- const { Container } = require('inversify');
188
-
189
- module.exports = Promise.resolve().then(() => {
190
- const { frontendApplicationModule } = require('@theia/core/lib/browser/frontend-application-module');
191
- const container = new Container();
192
- container.load(frontendApplicationModule);
193
- ${Array.from(secondaryWindowModules.values(), jsModulePath => `\
194
- container.load(require('${jsModulePath}').default);`).join(os_1.EOL)}
195
- });
196
- `;
197
- }
198
- compilePreloadJs() {
199
- return `\
200
- // @ts-check
201
- ${Array.from(this.pck.preloadModules.values(), path => `require('${path}').preload();`).join(os_1.EOL)}
202
- `;
203
- }
204
- }
205
- exports.FrontendGenerator = FrontendGenerator;
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.FrontendGenerator = void 0;
19
+ /* eslint-disable @typescript-eslint/indent */
20
+ const os_1 = require("os");
21
+ const abstract_generator_1 = require("./abstract-generator");
22
+ const fs_1 = require("fs");
23
+ class FrontendGenerator extends abstract_generator_1.AbstractGenerator {
24
+ async generate(options) {
25
+ await this.write(this.pck.frontend('index.html'), this.compileIndexHtml(this.pck.targetFrontendModules));
26
+ await this.write(this.pck.frontend('index.js'), this.compileIndexJs(this.pck.targetFrontendModules, this.pck.targetFrontendPreloadModules));
27
+ await this.write(this.pck.frontend('secondary-window.html'), this.compileSecondaryWindowHtml());
28
+ await this.write(this.pck.frontend('secondary-index.js'), this.compileSecondaryIndexJs(this.pck.secondaryWindowModules));
29
+ if (this.pck.isElectron()) {
30
+ await this.write(this.pck.frontend('preload.js'), this.compilePreloadJs());
31
+ }
32
+ }
33
+ compileIndexPreload(frontendModules) {
34
+ const template = this.pck.props.generator.config.preloadTemplate;
35
+ if (!template) {
36
+ return '';
37
+ }
38
+ // Support path to html file
39
+ if ((0, fs_1.existsSync)(template)) {
40
+ return (0, fs_1.readFileSync)(template).toString();
41
+ }
42
+ return template;
43
+ }
44
+ compileIndexHtml(frontendModules) {
45
+ return `<!DOCTYPE html>
46
+ <html lang="en">
47
+
48
+ <head>${this.compileIndexHead(frontendModules)}
49
+ </head>
50
+
51
+ <body>
52
+ <div class="theia-preload">${this.compileIndexPreload(frontendModules)}</div>
53
+ <script type="text/javascript" src="./bundle.js" charset="utf-8"></script>
54
+ </body>
55
+
56
+ </html>`;
57
+ }
58
+ compileIndexHead(frontendModules) {
59
+ return `
60
+ <meta charset="UTF-8">
61
+ <meta name="viewport" content="width=device-width, initial-scale=1">
62
+ <meta name="apple-mobile-web-app-capable" content="yes">
63
+ <title>${this.pck.props.frontend.config.applicationName}</title>`;
64
+ }
65
+ compileIndexJs(frontendModules, frontendPreloadModules) {
66
+ return `\
67
+ // @ts-check
68
+ ${this.ifBrowser("require('es6-promise/auto');")}
69
+ require('reflect-metadata');
70
+ require('setimmediate');
71
+ const { Container } = require('inversify');
72
+ const { FrontendApplicationConfigProvider } = require('@theia/core/lib/browser/frontend-application-config-provider');
73
+
74
+ FrontendApplicationConfigProvider.set(${this.prettyStringify(this.pck.props.frontend.config)});
75
+
76
+ ${this.ifMonaco(() => `
77
+ self.MonacoEnvironment = {
78
+ getWorkerUrl: function (moduleId, label) {
79
+ return './editor.worker.js';
80
+ }
81
+ }`)}
82
+
83
+ function load(container, jsModule) {
84
+ return Promise.resolve(jsModule)
85
+ .then(containerModule => container.load(containerModule.default));
86
+ }
87
+
88
+ async function preload(container) {
89
+ try {
90
+ ${Array.from(frontendPreloadModules.values(), jsModulePath => `\
91
+ await load(container, ${this.importOrRequire()}('${jsModulePath}'));`).join(os_1.EOL)}
92
+ const { Preloader } = require('@theia/core/lib/browser/preload/preloader');
93
+ const preloader = container.get(Preloader);
94
+ await preloader.initialize();
95
+ } catch (reason) {
96
+ console.error('Failed to run preload scripts.');
97
+ if (reason) {
98
+ console.error(reason);
99
+ }
100
+ }
101
+ }
102
+
103
+ module.exports = (async () => {
104
+ const { messagingFrontendModule } = require('@theia/core/lib/${this.pck.isBrowser()
105
+ ? 'browser/messaging/messaging-frontend-module'
106
+ : 'electron-browser/messaging/electron-messaging-frontend-module'}');
107
+ const container = new Container();
108
+ container.load(messagingFrontendModule);
109
+ ${this.ifBrowserOnly(`const { messagingFrontendOnlyModule } = require('@theia/core/lib/browser-only/messaging/messaging-frontend-only-module');
110
+ container.load(messagingFrontendOnlyModule);`)}
111
+
112
+ await preload(container);
113
+
114
+ ${this.ifMonaco(() => `
115
+ const { MonacoInit } = require('@theia/monaco/lib/browser/monaco-init');
116
+ `)};
117
+
118
+ const { FrontendApplication } = require('@theia/core/lib/browser');
119
+ const { frontendApplicationModule } = require('@theia/core/lib/browser/frontend-application-module');
120
+ const { loggerFrontendModule } = require('@theia/core/lib/browser/logger-frontend-module');
121
+
122
+ container.load(frontendApplicationModule);
123
+ ${this.pck.ifBrowserOnly(`const { frontendOnlyApplicationModule } = require('@theia/core/lib/browser-only/frontend-only-application-module');
124
+ container.load(frontendOnlyApplicationModule);`)}
125
+
126
+ container.load(loggerFrontendModule);
127
+ ${this.ifBrowserOnly(`const { loggerFrontendOnlyModule } = require('@theia/core/lib/browser-only/logger-frontend-only-module');
128
+ container.load(loggerFrontendOnlyModule);`)}
129
+
130
+ try {
131
+ ${Array.from(frontendModules.values(), jsModulePath => `\
132
+ await load(container, ${this.importOrRequire()}('${jsModulePath}'));`).join(os_1.EOL)}
133
+ ${this.ifMonaco(() => `
134
+ MonacoInit.init(container);
135
+ `)};
136
+ await start();
137
+ } catch (reason) {
138
+ console.error('Failed to start the frontend application.');
139
+ if (reason) {
140
+ console.error(reason);
141
+ }
142
+ }
143
+
144
+ function start() {
145
+ (window['theia'] = window['theia'] || {}).container = container;
146
+ return container.get(FrontendApplication).start();
147
+ }
148
+ })();
149
+ `;
150
+ }
151
+ importOrRequire() {
152
+ return this.options.mode !== 'production' ? 'import' : 'require';
153
+ }
154
+ /** HTML for secondary windows that contain an extracted widget. */
155
+ compileSecondaryWindowHtml() {
156
+ return `<!DOCTYPE html>
157
+ <html lang="en">
158
+
159
+ <head>
160
+ <meta charset="UTF-8">
161
+ <title>Theia Secondary Window</title>
162
+ <style>
163
+ html, body {
164
+ overflow: hidden;
165
+ -ms-overflow-style: none;
166
+ }
167
+
168
+ body {
169
+ margin: 0;
170
+ }
171
+
172
+ html,
173
+ head,
174
+ body,
175
+ .secondary-widget-root,
176
+ #widget-host {
177
+ width: 100% !important;
178
+ height: 100% !important;
179
+ }
180
+ </style>
181
+ <link rel="stylesheet" href="./secondary-window.css">
182
+ <script>
183
+ window.addEventListener('message', e => {
184
+ // Only process messages from Theia main window
185
+ if (e.source === window.opener) {
186
+ // Delegate message to iframe
187
+ document.getElementsByTagName('iframe').item(0).contentWindow.postMessage({ ...e.data }, '*');
188
+ }
189
+ });
190
+ </script>
191
+ </head>
192
+
193
+ <body>
194
+ <div id="widget-host"></div>
195
+ </body>
196
+
197
+ </html>`;
198
+ }
199
+ compileSecondaryIndexJs(secondaryWindowModules) {
200
+ return `\
201
+ // @ts-check
202
+ require('reflect-metadata');
203
+ const { Container } = require('inversify');
204
+
205
+ module.exports = Promise.resolve().then(() => {
206
+ const { frontendApplicationModule } = require('@theia/core/lib/browser/frontend-application-module');
207
+ const container = new Container();
208
+ container.load(frontendApplicationModule);
209
+ ${Array.from(secondaryWindowModules.values(), jsModulePath => `\
210
+ container.load(require('${jsModulePath}').default);`).join(os_1.EOL)}
211
+ });
212
+ `;
213
+ }
214
+ compilePreloadJs() {
215
+ return `\
216
+ // @ts-check
217
+ ${Array.from(this.pck.preloadModules.values(), path => `require('${path}').preload();`).join(os_1.EOL)}
218
+ `;
219
+ }
220
+ }
221
+ exports.FrontendGenerator = FrontendGenerator;
206
222
  //# sourceMappingURL=frontend-generator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"frontend-generator.js","sourceRoot":"","sources":["../../src/generator/frontend-generator.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,8CAA8C;AAE9C,2BAAyB;AACzB,6DAA2E;AAC3E,2BAA8C;AAE9C,MAAa,iBAAkB,SAAQ,sCAAiB;IAEpD,KAAK,CAAC,QAAQ,CAAC,OAA0B;QACrC,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC,CAAC;QACzG,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,qBAAqB,EAAE,IAAI,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC,CAAC;QACtI,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,uBAAuB,CAAC,EAAE,IAAI,CAAC,0BAA0B,EAAE,CAAC,CAAC;QAChG,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,oBAAoB,C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@@ -1,4 +1,4 @@
1
- export * from './webpack-generator';
2
- export * from './frontend-generator';
3
- export * from './backend-generator';
1
+ export * from './webpack-generator';
2
+ export * from './frontend-generator';
3
+ export * from './backend-generator';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1,31 +1,31 @@
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
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
- if (k2 === undefined) k2 = k;
19
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
20
- }) : (function(o, m, k, k2) {
21
- if (k2 === undefined) k2 = k;
22
- o[k2] = m[k];
23
- }));
24
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
25
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
26
- };
27
- Object.defineProperty(exports, "__esModule", { value: true });
28
- __exportStar(require("./webpack-generator"), exports);
29
- __exportStar(require("./frontend-generator"), exports);
30
- __exportStar(require("./backend-generator"), exports);
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
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
25
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
26
+ };
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ __exportStar(require("./webpack-generator"), exports);
29
+ __exportStar(require("./frontend-generator"), exports);
30
+ __exportStar(require("./backend-generator"), exports);
31
31
  //# sourceMappingURL=index.js.map
@@ -1,13 +1,13 @@
1
- import { AbstractGenerator } from './abstract-generator';
2
- export declare class WebpackGenerator extends AbstractGenerator {
3
- generate(): Promise<void>;
4
- protected shouldGenerateUserWebpackConfig(): Promise<boolean>;
5
- get configPath(): string;
6
- get genConfigPath(): string;
7
- get genNodeConfigPath(): string;
8
- protected resolve(moduleName: string, path: string): string;
9
- protected compileWebpackConfig(): string;
10
- protected compileUserWebpackConfig(): string;
11
- protected compileNodeWebpackConfig(): string;
12
- }
1
+ import { AbstractGenerator } from './abstract-generator';
2
+ export declare class WebpackGenerator extends AbstractGenerator {
3
+ generate(): Promise<void>;
4
+ protected shouldGenerateUserWebpackConfig(): Promise<boolean>;
5
+ get configPath(): string;
6
+ get genConfigPath(): string;
7
+ get genNodeConfigPath(): string;
8
+ protected resolve(moduleName: string, path: string): string;
9
+ protected compileWebpackConfig(): string;
10
+ protected compileUserWebpackConfig(): string;
11
+ protected compileNodeWebpackConfig(): string;
12
+ }
13
13
  //# sourceMappingURL=webpack-generator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"webpack-generator.d.ts","sourceRoot":"","sources":["../../src/generator/webpack-generator.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,qBAAa,gBAAiB,SAAQ,iBAAiB;IAE7C,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;cAQf,+BAA+B,IAAI,OAAO,CAAC,OAAO,CAAC;IAQnE,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED,IAAI,aAAa,IAAI,MAAM,CAE1B;IAED,IAAI,iBAAiB,IAAI,MAAM,CAE9B;IAED,SAAS,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IAI3D,SAAS,CAAC,oBAAoB,IAAI,MAAM;IAiRxC,SAAS,CAAC,wBAAwB,IAAI,MAAM;IAwB5C,SAAS,CAAC,wBAAwB,IAAI,MAAM;CA4J/C"}
1
+ {"version":3,"file":"webpack-generator.d.ts","sourceRoot":"","sources":["../../src/generator/webpack-generator.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,qBAAa,gBAAiB,SAAQ,iBAAiB;IAE7C,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;cAUf,+BAA+B,IAAI,OAAO,CAAC,OAAO,CAAC;IAQnE,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED,IAAI,aAAa,IAAI,MAAM,CAE1B;IAED,IAAI,iBAAiB,IAAI,MAAM,CAE9B;IAED,SAAS,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IAI3D,SAAS,CAAC,oBAAoB,IAAI,MAAM;IAiRxC,SAAS,CAAC,wBAAwB,IAAI,MAAM;IAyB5C,SAAS,CAAC,wBAAwB,IAAI,MAAM;CA+J/C"}