@angular-architects/native-federation 18.2.0 → 18.2.2
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/config.js +5 -0
- package/config.js.map +1 -0
- package/package.json +4 -3
- package/src/builders/build/builder.d.ts +5 -0
- package/src/builders/build/builder.js +255 -0
- package/src/builders/build/builder.js.map +1 -0
- package/src/config.d.ts +2 -0
- package/src/config.js +10 -0
- package/src/config.js.map +1 -0
- package/src/executors/build/executor.d.ts +4 -0
- package/src/executors/build/executor.js +13 -0
- package/src/executors/build/executor.js.map +1 -0
- package/src/generators/native-federation/generator.d.ts +3 -0
- package/src/generators/native-federation/generator.js +44 -0
- package/src/generators/native-federation/generator.js.map +1 -0
- package/src/index.js +1 -0
- package/src/index.js.map +1 -0
- package/src/patch-angular-build.d.ts +1 -0
- package/src/patch-angular-build.js +7 -0
- package/src/patch-angular-build.js.map +1 -0
- package/src/plugin/dev-externals-mixin.d.ts +1 -0
- package/src/plugin/dev-externals-mixin.js +30 -0
- package/src/plugin/dev-externals-mixin.js.map +1 -0
- package/src/plugin/externals-skip-list.d.ts +2 -0
- package/src/plugin/externals-skip-list.js +9 -0
- package/src/plugin/externals-skip-list.js.map +1 -0
- package/src/plugin/index.d.ts +2 -0
- package/src/plugin/index.js +107 -0
- package/src/plugin/index.js.map +1 -0
- package/src/schematics/appbuilder/schematic.d.ts +4 -0
- package/src/schematics/appbuilder/schematic.js +95 -0
- package/src/schematics/appbuilder/schematic.js.map +1 -0
- package/src/schematics/init/schematic.d.ts +6 -0
- package/src/schematics/init/schematic.js +316 -0
- package/src/schematics/init/schematic.js.map +1 -0
- package/src/schematics/remove/schematic.d.ts +4 -0
- package/src/schematics/remove/schematic.js +119 -0
- package/src/schematics/remove/schematic.js.map +1 -0
- package/src/schematics/update18/schematic.d.ts +2 -0
- package/src/schematics/update18/schematic.js +14 -0
- package/src/schematics/update18/schematic.js.map +1 -0
- package/src/utils/angular-esbuild-adapter.d.ts +9 -0
- package/src/utils/angular-esbuild-adapter.js +274 -0
- package/src/utils/angular-esbuild-adapter.js.map +1 -0
- package/src/utils/create-compiler-options.d.ts +4 -0
- package/src/utils/create-compiler-options.js +45 -0
- package/src/utils/create-compiler-options.js.map +1 -0
- package/src/utils/dev-server.d.ts +7 -0
- package/src/utils/dev-server.js +94 -0
- package/src/utils/dev-server.js.map +1 -0
- package/src/utils/event-sorce.d.ts +9 -0
- package/src/utils/event-sorce.js +20 -0
- package/src/utils/event-sorce.js.map +1 -0
- package/src/utils/mem-resuts.d.ts +29 -0
- package/src/utils/mem-resuts.js +58 -0
- package/src/utils/mem-resuts.js.map +1 -0
- package/src/utils/patch-angular-build.d.ts +3 -0
- package/src/utils/patch-angular-build.js +36 -0
- package/src/utils/patch-angular-build.js.map +1 -0
- package/src/utils/rebuild-events.d.ts +7 -0
- package/src/utils/rebuild-events.js +11 -0
- package/src/utils/rebuild-events.js.map +1 -0
- package/src/utils/shared-mappings-plugin.d.ts +3 -0
- package/src/utils/shared-mappings-plugin.js +31 -0
- package/src/utils/shared-mappings-plugin.js.map +1 -0
- package/src/utils/updateIndexHtml.d.ts +4 -0
- package/src/utils/updateIndexHtml.js +34 -0
- package/src/utils/updateIndexHtml.js.map +1 -0
- package/.eslintrc.json +0 -25
- package/docs/migrate.md +0 -173
- package/docs/share-faq.md +0 -57
- package/docs/update18.md +0 -19
- package/example.png +0 -0
- package/jest.config.ts +0 -11
- package/post-build.js +0 -10
- package/project.json +0 -80
- package/src/builders/build/builder.ts +0 -370
- package/src/config.ts +0 -6
- package/src/executors/build/executor.spec.ts +0 -11
- package/src/executors/build/executor.ts +0 -12
- package/src/generators/native-federation/generator.spec.ts +0 -20
- package/src/generators/native-federation/generator.ts +0 -76
- package/src/patch-angular-build.ts +0 -8
- package/src/plugin/dev-externals-mixin.ts +0 -34
- package/src/plugin/externals-skip-list.ts +0 -5
- package/src/plugin/index.ts +0 -123
- package/src/schematics/appbuilder/schematic.ts +0 -148
- package/src/schematics/init/schematic.ts +0 -463
- package/src/schematics/remove/schematic.ts +0 -179
- package/src/schematics/update18/schematic.ts +0 -10
- package/src/utils/angular-esbuild-adapter.ts +0 -438
- package/src/utils/create-compiler-options.ts +0 -68
- package/src/utils/dev-server.ts +0 -117
- package/src/utils/event-sorce.ts +0 -18
- package/src/utils/mem-resuts.ts +0 -67
- package/src/utils/patch-angular-build.ts +0 -47
- package/src/utils/rebuild-events.ts +0 -9
- package/src/utils/shared-mappings-plugin.ts +0 -35
- package/src/utils/updateIndexHtml.ts +0 -55
- package/tsconfig.json +0 -23
- package/tsconfig.lib.json +0 -11
- package/tsconfig.spec.json +0 -15
- /package/{config.ts → config.d.ts} +0 -0
- /package/src/{index.ts → index.d.ts} +0 -0
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setMemResultHandler = setMemResultHandler;
|
|
4
|
+
exports.createAngularBuildAdapter = createAngularBuildAdapter;
|
|
5
|
+
exports.loadEsmModule = loadEsmModule;
|
|
6
|
+
const tslib_1 = require("tslib");
|
|
7
|
+
const build_1 = require("@softarc/native-federation/build");
|
|
8
|
+
const esbuild = tslib_1.__importStar(require("esbuild"));
|
|
9
|
+
const private_1 = require("@angular/build/private");
|
|
10
|
+
const create_compiler_options_1 = require("./create-compiler-options");
|
|
11
|
+
const tailwind_1 = require("@angular-devkit/build-angular/src/utils/tailwind");
|
|
12
|
+
const utils_1 = require("@angular-devkit/build-angular/src/utils");
|
|
13
|
+
const node_module_1 = require("node:module");
|
|
14
|
+
const fs = tslib_1.__importStar(require("fs"));
|
|
15
|
+
const path = tslib_1.__importStar(require("path"));
|
|
16
|
+
const shared_mappings_plugin_1 = require("./shared-mappings-plugin");
|
|
17
|
+
const core_1 = require("@babel/core");
|
|
18
|
+
const rebuild_events_1 = require("./rebuild-events");
|
|
19
|
+
const json5_1 = tslib_1.__importDefault(require("json5"));
|
|
20
|
+
let _memResultHandler;
|
|
21
|
+
function setMemResultHandler(handler) {
|
|
22
|
+
_memResultHandler = handler;
|
|
23
|
+
}
|
|
24
|
+
function createAngularBuildAdapter(builderOptions, context, rebuildRequested = new rebuild_events_1.RebuildHubs()) {
|
|
25
|
+
return (options) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
const { entryPoints, tsConfigPath, external, outdir, mappedPaths, kind, watch, dev, hash, } = options;
|
|
27
|
+
const files = yield runEsbuild(builderOptions, context, entryPoints, external, outdir, tsConfigPath, mappedPaths, watch, rebuildRequested, dev, kind, hash);
|
|
28
|
+
if (kind === 'shared-package') {
|
|
29
|
+
const scriptFiles = files.filter((f) => f.endsWith('.js') || f.endsWith('.mjs'));
|
|
30
|
+
for (const file of scriptFiles) {
|
|
31
|
+
link(file, dev);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return files.map((fileName) => ({ fileName }));
|
|
35
|
+
// TODO: Do we still need rollup as esbuilt evolved?
|
|
36
|
+
// if (kind === 'shared-package') {
|
|
37
|
+
// await runRollup(entryPoint, external, outfile);
|
|
38
|
+
// } else {
|
|
39
|
+
// if (
|
|
40
|
+
// dev &&
|
|
41
|
+
// kind === 'shared-package' &&
|
|
42
|
+
// entryPoint.match(fesmFolderRegExp)
|
|
43
|
+
// ) {
|
|
44
|
+
// fs.copyFileSync(entryPoint, outfile);
|
|
45
|
+
// } else {
|
|
46
|
+
// await runEsbuild(
|
|
47
|
+
// builderOptions,
|
|
48
|
+
// context,
|
|
49
|
+
// entryPoint,
|
|
50
|
+
// external,
|
|
51
|
+
// outfile,
|
|
52
|
+
// tsConfigPath,
|
|
53
|
+
// mappedPaths,
|
|
54
|
+
// watch,
|
|
55
|
+
// rebuildRequested,
|
|
56
|
+
// dev,
|
|
57
|
+
// kind
|
|
58
|
+
// );
|
|
59
|
+
// }
|
|
60
|
+
// if (kind === 'shared-package' && fs.existsSync(outfile)) {
|
|
61
|
+
// await link(outfile, dev);
|
|
62
|
+
// }
|
|
63
|
+
// }
|
|
64
|
+
});
|
|
65
|
+
function link(outfile, dev) {
|
|
66
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
const code = fs.readFileSync(outfile, 'utf-8');
|
|
68
|
+
try {
|
|
69
|
+
const linkerEsm = yield loadEsmModule('@angular/compiler-cli/linker/babel');
|
|
70
|
+
const linker = linkerEsm.default;
|
|
71
|
+
const result = yield (0, core_1.transformAsync)(code, {
|
|
72
|
+
filename: outfile,
|
|
73
|
+
// inputSourceMap: (useInputSourcemap ? undefined : false) as undefined,
|
|
74
|
+
// sourceMaps: pluginOptions.sourcemap ? 'inline' : false,
|
|
75
|
+
compact: !dev,
|
|
76
|
+
configFile: false,
|
|
77
|
+
babelrc: false,
|
|
78
|
+
minified: !dev,
|
|
79
|
+
browserslistConfigFile: false,
|
|
80
|
+
plugins: [linker],
|
|
81
|
+
});
|
|
82
|
+
fs.writeFileSync(outfile, result.code, 'utf-8');
|
|
83
|
+
}
|
|
84
|
+
catch (e) {
|
|
85
|
+
build_1.logger.error('error linking');
|
|
86
|
+
if (fs.existsSync(`${outfile}.error`)) {
|
|
87
|
+
fs.unlinkSync(`${outfile}.error`);
|
|
88
|
+
}
|
|
89
|
+
fs.renameSync(outfile, `${outfile}.error`);
|
|
90
|
+
throw e;
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
function runEsbuild(builderOptions_1, context_1, entryPoints_1, external_1, outdir_1, tsConfigPath_1, mappedPaths_1, watch_1) {
|
|
96
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (builderOptions, context, entryPoints, external, outdir, tsConfigPath, mappedPaths, watch, rebuildRequested = new rebuild_events_1.RebuildHubs(), dev, kind, hash = false, plugins = null, absWorkingDir = undefined, logLevel = 'warning') {
|
|
97
|
+
const projectRoot = path.dirname(tsConfigPath);
|
|
98
|
+
const browsers = (0, private_1.getSupportedBrowsers)(projectRoot, context.logger);
|
|
99
|
+
const target = (0, private_1.transformSupportedBrowsersToTargets)(browsers);
|
|
100
|
+
const workspaceRoot = context.workspaceRoot;
|
|
101
|
+
const optimizationOptions = (0, utils_1.normalizeOptimization)(builderOptions.optimization);
|
|
102
|
+
const sourcemapOptions = (0, utils_1.normalizeSourceMaps)(builderOptions.sourceMap);
|
|
103
|
+
const tailwindConfigurationPath = yield (0, tailwind_1.findTailwindConfigurationFile)(workspaceRoot, projectRoot);
|
|
104
|
+
const fullProjectRoot = path.join(workspaceRoot, projectRoot);
|
|
105
|
+
const resolver = (0, node_module_1.createRequire)(fullProjectRoot + '/');
|
|
106
|
+
const tailwindConfiguration = tailwindConfigurationPath
|
|
107
|
+
? {
|
|
108
|
+
file: tailwindConfigurationPath,
|
|
109
|
+
package: resolver.resolve('tailwindcss'),
|
|
110
|
+
}
|
|
111
|
+
: undefined;
|
|
112
|
+
const outputNames = {
|
|
113
|
+
bundles: '[name]',
|
|
114
|
+
media: 'media/[name]',
|
|
115
|
+
};
|
|
116
|
+
let fileReplacements;
|
|
117
|
+
if (builderOptions.fileReplacements) {
|
|
118
|
+
for (const replacement of builderOptions.fileReplacements) {
|
|
119
|
+
fileReplacements !== null && fileReplacements !== void 0 ? fileReplacements : (fileReplacements = {});
|
|
120
|
+
fileReplacements[path.join(workspaceRoot, replacement.replace)] =
|
|
121
|
+
path.join(workspaceRoot, replacement.with);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
tsConfigPath = createTsConfigForFederation(workspaceRoot, tsConfigPath, entryPoints);
|
|
125
|
+
const pluginOptions = (0, create_compiler_options_1.createCompilerPluginOptions)({
|
|
126
|
+
workspaceRoot,
|
|
127
|
+
optimizationOptions,
|
|
128
|
+
sourcemapOptions,
|
|
129
|
+
tsconfig: tsConfigPath,
|
|
130
|
+
outputNames,
|
|
131
|
+
fileReplacements,
|
|
132
|
+
externalDependencies: external,
|
|
133
|
+
preserveSymlinks: builderOptions.preserveSymlinks,
|
|
134
|
+
stylePreprocessorOptions: builderOptions.stylePreprocessorOptions,
|
|
135
|
+
advancedOptimizations: !dev,
|
|
136
|
+
inlineStyleLanguage: builderOptions.inlineStyleLanguage,
|
|
137
|
+
jit: false,
|
|
138
|
+
tailwindConfiguration,
|
|
139
|
+
}, target, undefined);
|
|
140
|
+
pluginOptions.styleOptions.externalDependencies = [];
|
|
141
|
+
const config = {
|
|
142
|
+
entryPoints: entryPoints.map((ep) => ({
|
|
143
|
+
in: ep.fileName,
|
|
144
|
+
out: path.parse(ep.outName).name,
|
|
145
|
+
})),
|
|
146
|
+
outdir,
|
|
147
|
+
entryNames: hash ? '[name]-[hash]' : '[name]',
|
|
148
|
+
write: false,
|
|
149
|
+
absWorkingDir,
|
|
150
|
+
external,
|
|
151
|
+
logLevel,
|
|
152
|
+
bundle: true,
|
|
153
|
+
sourcemap: dev,
|
|
154
|
+
minify: !dev,
|
|
155
|
+
supported: {
|
|
156
|
+
'async-await': false,
|
|
157
|
+
'object-rest-spread': false,
|
|
158
|
+
},
|
|
159
|
+
splitting: kind === 'mapping-or-exposed',
|
|
160
|
+
platform: 'browser',
|
|
161
|
+
format: 'esm',
|
|
162
|
+
target: ['esnext'],
|
|
163
|
+
logLimit: kind === 'shared-package' ? 1 : 0,
|
|
164
|
+
plugins: plugins || [
|
|
165
|
+
(0, private_1.createCompilerPlugin)(pluginOptions.pluginOptions, pluginOptions.styleOptions
|
|
166
|
+
// TODO: Once available, use helper functions
|
|
167
|
+
// for creating these config objects:
|
|
168
|
+
// @angular_devkit/build_angular/src/tools/esbuild/compiler-plugin-options.ts
|
|
169
|
+
// {
|
|
170
|
+
// jit: false,
|
|
171
|
+
// sourcemap: dev,
|
|
172
|
+
// tsconfig: tsConfigPath,
|
|
173
|
+
// advancedOptimizations: !dev,
|
|
174
|
+
// thirdPartySourcemaps: false,
|
|
175
|
+
// },
|
|
176
|
+
// {
|
|
177
|
+
// optimization: !dev,
|
|
178
|
+
// sourcemap: dev ? 'inline' : false,
|
|
179
|
+
// workspaceRoot: __dirname,
|
|
180
|
+
// inlineStyleLanguage: builderOptions.inlineStyleLanguage,
|
|
181
|
+
// // browsers: browsers,
|
|
182
|
+
// target: target,
|
|
183
|
+
// }
|
|
184
|
+
),
|
|
185
|
+
...(mappedPaths && mappedPaths.length > 0
|
|
186
|
+
? [(0, shared_mappings_plugin_1.createSharedMappingsPlugin)(mappedPaths)]
|
|
187
|
+
: []),
|
|
188
|
+
],
|
|
189
|
+
define: Object.assign(Object.assign({}, (!dev ? { ngDevMode: 'false' } : {})), { ngJitMode: 'false' }),
|
|
190
|
+
};
|
|
191
|
+
const ctx = yield esbuild.context(config);
|
|
192
|
+
const result = yield ctx.rebuild();
|
|
193
|
+
const memOnly = dev && kind === 'mapping-or-exposed' && !!_memResultHandler;
|
|
194
|
+
const writtenFiles = writeResult(result, outdir, memOnly);
|
|
195
|
+
if (watch) {
|
|
196
|
+
registerForRebuilds(kind, rebuildRequested, ctx, entryPoints, outdir, hash, memOnly);
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
ctx.dispose();
|
|
200
|
+
}
|
|
201
|
+
// cleanUpTsConfigForFederation(tsConfigPath);
|
|
202
|
+
return writtenFiles;
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
// function cleanUpTsConfigForFederation(tsConfigPath: string) {
|
|
206
|
+
// if (tsConfigPath.includes('.federation.')) {
|
|
207
|
+
// fs.unlinkSync(tsConfigPath);
|
|
208
|
+
// }
|
|
209
|
+
// }
|
|
210
|
+
function createTsConfigForFederation(workspaceRoot, tsConfigPath, entryPoints) {
|
|
211
|
+
const fullTsConfigPath = path.join(workspaceRoot, tsConfigPath);
|
|
212
|
+
const tsconfigDir = path.dirname(fullTsConfigPath);
|
|
213
|
+
const filtered = entryPoints
|
|
214
|
+
.filter((ep) => !ep.fileName.includes('/node_modules/') && !ep.fileName.startsWith('.'))
|
|
215
|
+
.map((ep) => path.relative(tsconfigDir, ep.fileName).replace(/\\\\/g, '/'));
|
|
216
|
+
const tsconfigAsString = fs.readFileSync(fullTsConfigPath, 'utf-8');
|
|
217
|
+
// const tsconfigWithoutComments = tsconfigAsString.replace(
|
|
218
|
+
// /\/\*.+?\*\/|\/\/.*(?=[\n\r])/g,
|
|
219
|
+
// ''
|
|
220
|
+
// );
|
|
221
|
+
const tsconfig = json5_1.default.parse(tsconfigAsString);
|
|
222
|
+
if (!tsconfig.include) {
|
|
223
|
+
tsconfig.include = [];
|
|
224
|
+
}
|
|
225
|
+
for (const ep of filtered) {
|
|
226
|
+
if (!tsconfig.include.includes(ep)) {
|
|
227
|
+
tsconfig.include.push(ep);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
const content = json5_1.default.stringify(tsconfig, null, 2);
|
|
231
|
+
const tsconfigFedPath = path.join(tsconfigDir, 'tsconfig.federation.json');
|
|
232
|
+
if (!doesFileExist(tsconfigFedPath, content)) {
|
|
233
|
+
fs.writeFileSync(tsconfigFedPath, JSON.stringify(tsconfig, null, 2));
|
|
234
|
+
}
|
|
235
|
+
tsConfigPath = tsconfigFedPath;
|
|
236
|
+
return tsConfigPath;
|
|
237
|
+
}
|
|
238
|
+
function doesFileExist(path, content) {
|
|
239
|
+
if (!fs.existsSync(path)) {
|
|
240
|
+
return false;
|
|
241
|
+
}
|
|
242
|
+
const currentContent = fs.readFileSync(path, 'utf-8');
|
|
243
|
+
return currentContent === content;
|
|
244
|
+
}
|
|
245
|
+
function writeResult(result, outdir, memOnly) {
|
|
246
|
+
const writtenFiles = [];
|
|
247
|
+
if (memOnly) {
|
|
248
|
+
_memResultHandler(result.outputFiles, outdir);
|
|
249
|
+
}
|
|
250
|
+
for (const outFile of result.outputFiles) {
|
|
251
|
+
const fileName = path.basename(outFile.path);
|
|
252
|
+
const filePath = path.join(outdir, fileName);
|
|
253
|
+
if (!memOnly) {
|
|
254
|
+
fs.writeFileSync(filePath, outFile.text);
|
|
255
|
+
}
|
|
256
|
+
writtenFiles.push(filePath);
|
|
257
|
+
}
|
|
258
|
+
if (!memOnly) {
|
|
259
|
+
// for (const asset of result.outputFiles)
|
|
260
|
+
}
|
|
261
|
+
return writtenFiles;
|
|
262
|
+
}
|
|
263
|
+
function registerForRebuilds(kind, rebuildRequested, ctx, entryPoints, outdir, hash, memOnly) {
|
|
264
|
+
if (kind !== 'shared-package') {
|
|
265
|
+
rebuildRequested.rebuild.register(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
266
|
+
const result = yield ctx.rebuild();
|
|
267
|
+
writeResult(result, outdir, memOnly);
|
|
268
|
+
}));
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
function loadEsmModule(modulePath) {
|
|
272
|
+
return new Function('modulePath', `return import(modulePath);`)(modulePath);
|
|
273
|
+
}
|
|
274
|
+
//# sourceMappingURL=angular-esbuild-adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"angular-esbuild-adapter.js","sourceRoot":"","sources":["../../../../../libs/native-federation/src/utils/angular-esbuild-adapter.ts"],"names":[],"mappings":";;AAkDA,kDAEC;AAED,8DA8GC;AAiRD,sCAIC;;AAzbD,4DAI0C;AAE1C,yDAAmC;AAEnC,oDAIgC;AAEhC,uEAAwE;AAExE,+EAAiG;AAEjG,mEAGiD;AACjD,6CAA4C;AAI5C,+CAAyB;AACzB,mDAA6B;AAC7B,qEAAsE;AAEtE,sCAAyD;AAOzD,qDAA8D;AAE9D,0DAA0B;AAS1B,IAAI,iBAAmC,CAAC;AAExC,SAAgB,mBAAmB,CAAC,OAAyB;IAC3D,iBAAiB,GAAG,OAAO,CAAC;AAC9B,CAAC;AAED,SAAgB,yBAAyB,CACvC,cAAyC,EACzC,OAAuB,EACvB,mBAAkC,IAAI,4BAAW,EAAE;IAEnD,OAAO,CAAO,OAAO,EAAE,EAAE;QACvB,MAAM,EACJ,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,WAAW,EACX,IAAI,EACJ,KAAK,EACL,GAAG,EACH,IAAI,GACL,GAAG,OAAO,CAA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C;QACD,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC9B,CAAC;IAED,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,0CAA0C;IAC5C,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,mBAAmB,CAC1B,IAAe,EACf,gBAA+B,EAC/B,GAA+C,EAC/C,WAAyB,EACzB,MAAc,EACd,IAAa,EACb,OAAgB;IAEhB,IAAI,IAAI,KAAK,gBAAgB,EAAE,CAAC;QAC9B,gBAAgB,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAS,EAAE;YAC3C,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,OAAO,EAAE,CAAC;YACnC,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QACvC,CAAC,CAAA,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AAED,SAAgB,aAAa,CAAI,UAAwB;IACvD,OAAO,IAAI,QAAQ,CAAC,YAAY,EAAE,4BAA4B,CAAC,CAC7D,UAAU,CACG,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Taken from https://github.com/angular/angular-cli/blob/main/packages/angular/build/src/tools/esbuild/compiler-plugin-options.ts
|
|
3
|
+
// Currently, this type cannot be accessed from the outside
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.createCompilerPluginOptions = createCompilerPluginOptions;
|
|
6
|
+
function createCompilerPluginOptions(options, target, sourceFileCache) {
|
|
7
|
+
const { workspaceRoot, optimizationOptions, sourcemapOptions, tsconfig, outputNames, fileReplacements, externalDependencies, preserveSymlinks, stylePreprocessorOptions, advancedOptimizations, inlineStyleLanguage, jit, cacheOptions, tailwindConfiguration, postcssConfiguration, publicPath, } = options;
|
|
8
|
+
return {
|
|
9
|
+
// JS/TS options
|
|
10
|
+
pluginOptions: {
|
|
11
|
+
sourcemap: !!sourcemapOptions.scripts &&
|
|
12
|
+
(sourcemapOptions.hidden ? 'external' : true),
|
|
13
|
+
thirdPartySourcemaps: sourcemapOptions.vendor,
|
|
14
|
+
tsconfig,
|
|
15
|
+
jit,
|
|
16
|
+
advancedOptimizations,
|
|
17
|
+
fileReplacements,
|
|
18
|
+
sourceFileCache,
|
|
19
|
+
loadResultCache: sourceFileCache === null || sourceFileCache === void 0 ? void 0 : sourceFileCache.loadResultCache,
|
|
20
|
+
incremental: !!options.watch,
|
|
21
|
+
},
|
|
22
|
+
// Component stylesheet options
|
|
23
|
+
styleOptions: {
|
|
24
|
+
workspaceRoot,
|
|
25
|
+
inlineFonts: !!optimizationOptions.fonts.inline,
|
|
26
|
+
optimization: !!optimizationOptions.styles.minify,
|
|
27
|
+
sourcemap:
|
|
28
|
+
// Hidden component stylesheet sourcemaps are inaccessible which is effectively
|
|
29
|
+
// the same as being disabled. Disabling has the advantage of avoiding the overhead
|
|
30
|
+
// of sourcemap processing.
|
|
31
|
+
sourcemapOptions.styles && !sourcemapOptions.hidden ? 'linked' : false,
|
|
32
|
+
outputNames,
|
|
33
|
+
includePaths: stylePreprocessorOptions === null || stylePreprocessorOptions === void 0 ? void 0 : stylePreprocessorOptions.includePaths,
|
|
34
|
+
externalDependencies,
|
|
35
|
+
target,
|
|
36
|
+
inlineStyleLanguage,
|
|
37
|
+
preserveSymlinks,
|
|
38
|
+
tailwindConfiguration,
|
|
39
|
+
postcssConfiguration,
|
|
40
|
+
cacheOptions,
|
|
41
|
+
publicPath,
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=create-compiler-options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-compiler-options.js","sourceRoot":"","sources":["../../../../../libs/native-federation/src/utils/create-compiler-options.ts"],"names":[],"mappings":";AAAA,kIAAkI;AAClI,2DAA2D;;AAE3D,kEAgEC;AAhED,SAAgB,2BAA2B,CACzC,OAAY,EACZ,MAAgB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,0 +1,7 @@
|
|
|
1
|
+
import { NfBuilderSchema } from '../builders/build/schema';
|
|
2
|
+
import { MemResults } from './mem-resuts';
|
|
3
|
+
export declare function startServer(options: NfBuilderSchema, path: string, memResults: MemResults): void;
|
|
4
|
+
export declare function setError(error: string): void;
|
|
5
|
+
export declare function notifyServer(message: string): void;
|
|
6
|
+
export declare function reloadBrowser(): void;
|
|
7
|
+
export declare function reloadShell(shellProjectName: string): void;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.startServer = startServer;
|
|
4
|
+
exports.setError = setError;
|
|
5
|
+
exports.notifyServer = notifyServer;
|
|
6
|
+
exports.reloadBrowser = reloadBrowser;
|
|
7
|
+
exports.reloadShell = reloadShell;
|
|
8
|
+
const tslib_1 = require("tslib");
|
|
9
|
+
const browserSync = tslib_1.__importStar(require("browser-sync"));
|
|
10
|
+
const path_1 = require("path");
|
|
11
|
+
const mrmime_1 = require("mrmime");
|
|
12
|
+
const updateIndexHtml_1 = require("./updateIndexHtml");
|
|
13
|
+
let server;
|
|
14
|
+
function startServer(options, path, memResults) {
|
|
15
|
+
const projectName = options.target.split(':')[0];
|
|
16
|
+
server = browserSync.create(projectName);
|
|
17
|
+
server.init({
|
|
18
|
+
port: options.port || 4200,
|
|
19
|
+
cors: true,
|
|
20
|
+
server: path,
|
|
21
|
+
notify: false,
|
|
22
|
+
single: true,
|
|
23
|
+
ui: false,
|
|
24
|
+
open: options.open,
|
|
25
|
+
middleware: [
|
|
26
|
+
function (req, res, next) {
|
|
27
|
+
const temp = req.url.startsWith('/') ? req.url.substring(1) : req.url;
|
|
28
|
+
const key = temp.indexOf('?') > -1 ? temp.substring(0, temp.indexOf('?')) : temp;
|
|
29
|
+
const result = memResults.get(key);
|
|
30
|
+
if (result) {
|
|
31
|
+
const mimeType = (0, mrmime_1.lookup)((0, path_1.extname)(key)) || 'text/javascript';
|
|
32
|
+
const body = getBody(result, memResults, options);
|
|
33
|
+
res.writeHead(200, {
|
|
34
|
+
'Content-Type': mimeType,
|
|
35
|
+
});
|
|
36
|
+
res.end(body);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
next();
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
let buildError = '';
|
|
46
|
+
function setError(error) {
|
|
47
|
+
buildError = error;
|
|
48
|
+
}
|
|
49
|
+
function notifyServer(message) {
|
|
50
|
+
server.notify(message);
|
|
51
|
+
}
|
|
52
|
+
function reloadBrowser() {
|
|
53
|
+
if (!server) {
|
|
54
|
+
throw new Error('server is not started');
|
|
55
|
+
}
|
|
56
|
+
server.reload();
|
|
57
|
+
}
|
|
58
|
+
function reloadShell(shellProjectName) {
|
|
59
|
+
if (!server) {
|
|
60
|
+
throw new Error('server is not started');
|
|
61
|
+
}
|
|
62
|
+
if (!shellProjectName) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
if (browserSync.has(shellProjectName)) {
|
|
66
|
+
const shellServer = browserSync.get(shellProjectName);
|
|
67
|
+
shellServer.reload();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function modifyIndexHtml(content, fileNames, nfOptions) {
|
|
71
|
+
if (buildError) {
|
|
72
|
+
const errorHtml = `
|
|
73
|
+
<div style="position: absolute; filter: opacity(80%); top:0; bottom:0; left:0; right:0; padding:20px; background-color:black; color:white; ">
|
|
74
|
+
<h2>${buildError}</h2>
|
|
75
|
+
</div>
|
|
76
|
+
`;
|
|
77
|
+
content = errorHtml + content;
|
|
78
|
+
}
|
|
79
|
+
const mainName = fileNames.find((f) => f.startsWith('main.') && f.endsWith('.js'));
|
|
80
|
+
const polyfillsName = fileNames.find((f) => f.startsWith('polyfills.') && f.endsWith('.js'));
|
|
81
|
+
const index = (0, updateIndexHtml_1.updateScriptTags)(content, mainName, polyfillsName, nfOptions);
|
|
82
|
+
return index;
|
|
83
|
+
}
|
|
84
|
+
function getBody(result, memResults, nfOptions) {
|
|
85
|
+
const body = result.get();
|
|
86
|
+
if (result.fileName === 'index.html') {
|
|
87
|
+
const content = new TextDecoder().decode(body);
|
|
88
|
+
return modifyIndexHtml(content, memResults.getFileNames(), nfOptions);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
return body;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=dev-server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev-server.js","sourceRoot":"","sources":["../../../../../libs/native-federation/src/utils/dev-server.ts"],"names":[],"mappings":";;AASA,kCAsCC;AAID,4BAEC;AAED,oCAEC;AAED,sCAKC;AAED,kCAWC;;AA7ED,kEAA4C;AAG5C,+BAA+B;AAC/B,mCAAgC;AAChC,uDAAqD;AAErD,IAAI,MAAuC,CAAC;AAE5C,SAAgB,WAAW,CACzB,OAAwB,EACxB,IAAY,EACZ,UAAsB;IAEtB,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAEjD,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAEzC,MAAM,CAAC,IAAI,CAAC;QACV,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,IAAI;QAC1B,IAAI,EAAE,IAAI;QACV,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,KAAK;QACb,MAAM,EAAE,IAAI;QACZ,EAAE,EAAE,KAAK;QACT,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,UAAU,EAAE;YACV,UAAU,GAAG,EAAE,GAAG,EAAE,IAAI;gBACtB,MAAM,IAAI,GAAG,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAA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YAAY,EAAE,EAAE,SAAS,CAAC,CAAC;IACxE,CAAC;SAAM,CAAC;QACN,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type EventHandler = () => Promise<void>;
|
|
2
|
+
export interface EventSource {
|
|
3
|
+
register(handler: EventHandler): void;
|
|
4
|
+
}
|
|
5
|
+
export declare class EventHub implements EventSource {
|
|
6
|
+
private handlers;
|
|
7
|
+
register(handler: EventHandler): void;
|
|
8
|
+
emit(): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventHub = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
class EventHub {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.handlers = [];
|
|
8
|
+
}
|
|
9
|
+
register(handler) {
|
|
10
|
+
this.handlers.push(handler);
|
|
11
|
+
}
|
|
12
|
+
emit() {
|
|
13
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
14
|
+
const promises = this.handlers.map((h) => h());
|
|
15
|
+
yield Promise.all(promises);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.EventHub = EventHub;
|
|
20
|
+
//# sourceMappingURL=event-sorce.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-sorce.js","sourceRoot":"","sources":["../../../../../libs/native-federation/src/utils/event-sorce.ts"],"names":[],"mappings":";;;;AAMA,MAAa,QAAQ;IAArB;QACU,aAAQ,GAAmB,EAAE,CAAC;IAUxC,CAAC;IARC,QAAQ,CAAC,OAAqB;QAC5B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;IAEK,IAAI;;YACR,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;YAC/C,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC9B,CAAC;KAAA;CACF;AAXD,4BAWC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { OutputFile } from 'esbuild';
|
|
2
|
+
export interface BuildResult {
|
|
3
|
+
fileName: string;
|
|
4
|
+
get(): Uint8Array | Buffer;
|
|
5
|
+
}
|
|
6
|
+
export declare class EsBuildResult implements BuildResult {
|
|
7
|
+
private outputFile;
|
|
8
|
+
private fullOutDir?;
|
|
9
|
+
get fileName(): any;
|
|
10
|
+
constructor(outputFile: OutputFile, fullOutDir?: string);
|
|
11
|
+
get(): Uint8Array;
|
|
12
|
+
}
|
|
13
|
+
export interface NgCliAssetFile {
|
|
14
|
+
source: string;
|
|
15
|
+
destination: string;
|
|
16
|
+
}
|
|
17
|
+
export declare class NgCliAssetResult implements BuildResult {
|
|
18
|
+
private assetFile;
|
|
19
|
+
get fileName(): string;
|
|
20
|
+
private file;
|
|
21
|
+
constructor(assetFile: NgCliAssetFile);
|
|
22
|
+
get(): Buffer;
|
|
23
|
+
}
|
|
24
|
+
export declare class MemResults {
|
|
25
|
+
private map;
|
|
26
|
+
add(result: BuildResult[]): void;
|
|
27
|
+
get(fileName: string): BuildResult | undefined;
|
|
28
|
+
getFileNames(): string[];
|
|
29
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MemResults = exports.NgCliAssetResult = exports.EsBuildResult = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs = tslib_1.__importStar(require("fs"));
|
|
6
|
+
const path = tslib_1.__importStar(require("path"));
|
|
7
|
+
class EsBuildResult {
|
|
8
|
+
get fileName() {
|
|
9
|
+
if (this.fullOutDir) {
|
|
10
|
+
return unify(path.relative(this.fullOutDir, this.outputFile.path));
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
return unify(this.outputFile.path);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
constructor(outputFile, fullOutDir) {
|
|
17
|
+
this.outputFile = outputFile;
|
|
18
|
+
this.fullOutDir = fullOutDir;
|
|
19
|
+
}
|
|
20
|
+
get() {
|
|
21
|
+
return this.outputFile.contents;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.EsBuildResult = EsBuildResult;
|
|
25
|
+
class NgCliAssetResult {
|
|
26
|
+
get fileName() {
|
|
27
|
+
return unify(this.file.destination);
|
|
28
|
+
}
|
|
29
|
+
constructor(assetFile) {
|
|
30
|
+
this.assetFile = assetFile;
|
|
31
|
+
this.file = assetFile;
|
|
32
|
+
}
|
|
33
|
+
get() {
|
|
34
|
+
return fs.readFileSync(this.file.source);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.NgCliAssetResult = NgCliAssetResult;
|
|
38
|
+
class MemResults {
|
|
39
|
+
constructor() {
|
|
40
|
+
this.map = new Map();
|
|
41
|
+
}
|
|
42
|
+
add(result) {
|
|
43
|
+
for (const file of result) {
|
|
44
|
+
this.map.set(file.fileName, file);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
get(fileName) {
|
|
48
|
+
return this.map.get(fileName);
|
|
49
|
+
}
|
|
50
|
+
getFileNames() {
|
|
51
|
+
return [...this.map.keys()];
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.MemResults = MemResults;
|
|
55
|
+
function unify(path) {
|
|
56
|
+
return path === null || path === void 0 ? void 0 : path.replace(/\\/g, '/');
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=mem-resuts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mem-resuts.js","sourceRoot":"","sources":["../../../../../libs/native-federation/src/utils/mem-resuts.ts"],"names":[],"mappings":";;;;AACA,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AC;IAChC,CAAC;IAEM,YAAY;QACjB,OAAO,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;IAC9B,CAAC;CACF;AAhBD,gCAgBC;AAED,SAAS,KAAK,CAAC,IAAI;IACjB,OAAO,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.privateEntrySrc = void 0;
|
|
4
|
+
exports.patchAngularBuildPackageJson = patchAngularBuildPackageJson;
|
|
5
|
+
exports.patchAngularBuild = patchAngularBuild;
|
|
6
|
+
const tslib_1 = require("tslib");
|
|
7
|
+
const path = tslib_1.__importStar(require("path"));
|
|
8
|
+
const fs = tslib_1.__importStar(require("fs"));
|
|
9
|
+
exports.privateEntrySrc = `
|
|
10
|
+
exports = require('./src/private.js');
|
|
11
|
+
`;
|
|
12
|
+
function patchAngularBuildPackageJson(packageJson) {
|
|
13
|
+
const exportsMap = packageJson['exports'];
|
|
14
|
+
if (!exportsMap) {
|
|
15
|
+
console.log('No need to patch @angular/build/package.json');
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
packageJson['_exports'] = exportsMap;
|
|
19
|
+
delete packageJson['exports'];
|
|
20
|
+
packageJson['types'] = './src/index.d.ts';
|
|
21
|
+
packageJson['main'] = './src/index.js';
|
|
22
|
+
packageJson['module'] = './src/index.js';
|
|
23
|
+
}
|
|
24
|
+
function patchAngularBuild(workspaceRoot) {
|
|
25
|
+
const packagePath = path.join(workspaceRoot, 'node_modules/@angular/build/package.json');
|
|
26
|
+
const privatePath = path.join(workspaceRoot, 'node_modules/@angular/build/private.js');
|
|
27
|
+
if (!fs.existsSync(packagePath)) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const packageJson = JSON.parse(fs.readFileSync(packagePath, 'utf-8'));
|
|
31
|
+
patchAngularBuildPackageJson(packageJson);
|
|
32
|
+
fs.writeFileSync(packagePath, JSON.stringify(packageJson, null, 2));
|
|
33
|
+
fs.writeFileSync(privatePath, exports.privateEntrySrc);
|
|
34
|
+
console.log('@angular/build/package.json patched');
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=patch-angular-build.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patch-angular-build.js","sourceRoot":"","sources":["../../../../../libs/native-federation/src/utils/patch-angular-build.ts"],"names":[],"mappings":";;;AAOA,oEAcC;AAED,8CAuBC;;AA9CD,mDAA6B;AAC7B,+CAAyB;AAEZ,QAAA,eAAe,GAAG;;CAE9B,CAAC;AAEF,SAAgB,4BAA4B,CAAC,WAAoB;IAC/D,MAAM,UAAU,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;IAE1C,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,CAAC,GAAG,CAAC,8CAA8C,CAAC,CAAC;QAC5D,OAAO;IACT,CAAC;IAED,WAAW,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC;IACrC,OAAO,WAAW,CAAC,SAAS,CAAC,CAAC;IAE9B,WAAW,CAAC,OAAO,CAAC,GAAG,kBAAkB,CAAC;IAC1C,WAAW,CAAC,MAAM,CAAC,GAAG,gBAAgB,CAAC;IACvC,WAAW,CAAC,QAAQ,CAAC,GAAG,gBAAgB,CAAC;AAC3C,CAAC;AAED,SAAgB,iBAAiB,CAAC,aAAqB;IACrD,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAC3B,aAAa,EACb,0CAA0C,CAC3C,CAAC;IAEF,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAC3B,aAAa,EACb,wCAAwC,CACzC,CAAC;IAEF,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;QAChC,OAAO;IACT,CAAC;IAED,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;IAEtE,4BAA4B,CAAC,WAAW,CAAC,CAAC;IAE1C,EAAE,CAAC,aAAa,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IACpE,EAAE,CAAC,aAAa,CAAC,WAAW,EAAE,uBAAe,CAAC,CAAC;IAE/C,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RebuildHubs = void 0;
|
|
4
|
+
const event_sorce_1 = require("./event-sorce");
|
|
5
|
+
class RebuildHubs {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.rebuild = new event_sorce_1.EventHub();
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.RebuildHubs = RebuildHubs;
|
|
11
|
+
//# sourceMappingURL=rebuild-events.js.map
|