@angular-architects/native-federation-v4 21.1.6 → 21.1.8

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 (55) hide show
  1. package/collection.json +5 -0
  2. package/migration-collection.json +6 -0
  3. package/package.json +11 -3
  4. package/src/builders/build/builder.d.ts.map +1 -1
  5. package/src/builders/build/builder.js +112 -95
  6. package/src/builders/build/schema.d.ts +3 -4
  7. package/src/builders/build/schema.json +8 -26
  8. package/src/builders/build/setup-builder-env-variables.js +3 -1
  9. package/src/config/angular-skip-list.d.ts +3 -0
  10. package/src/config/angular-skip-list.d.ts.map +1 -0
  11. package/src/config/angular-skip-list.js +13 -0
  12. package/src/config/share-utils.d.ts +9 -0
  13. package/src/config/share-utils.d.ts.map +1 -0
  14. package/src/config/share-utils.js +32 -0
  15. package/src/config.d.ts +2 -2
  16. package/src/config.d.ts.map +1 -1
  17. package/src/config.js +2 -2
  18. package/src/schematics/init/files/federation.config.js__tmpl__ +19 -7
  19. package/src/schematics/init/schema.d.ts +0 -1
  20. package/src/schematics/init/schema.json +2 -6
  21. package/src/schematics/init/schematic.d.ts.map +1 -1
  22. package/src/schematics/init/schematic.js +50 -25
  23. package/src/schematics/update-v4/schema.d.ts +4 -0
  24. package/src/schematics/update-v4/schema.json +23 -0
  25. package/src/schematics/update-v4/schematic.d.ts +4 -0
  26. package/src/schematics/update-v4/schematic.d.ts.map +1 -0
  27. package/src/schematics/update-v4/schematic.js +225 -0
  28. package/src/utils/angular-bundler.d.ts +7 -0
  29. package/src/utils/angular-bundler.d.ts.map +1 -0
  30. package/src/utils/angular-bundler.js +120 -0
  31. package/src/utils/angular-esbuild-adapter.d.ts +8 -3
  32. package/src/utils/angular-esbuild-adapter.d.ts.map +1 -1
  33. package/src/utils/angular-esbuild-adapter.js +63 -245
  34. package/src/utils/angular-locales.d.ts.map +1 -1
  35. package/src/utils/create-federation-tsconfig.d.ts +6 -0
  36. package/src/utils/create-federation-tsconfig.d.ts.map +1 -0
  37. package/src/utils/create-federation-tsconfig.js +49 -0
  38. package/src/utils/get-fallback-platform.d.ts +3 -0
  39. package/src/utils/get-fallback-platform.d.ts.map +1 -0
  40. package/src/utils/get-fallback-platform.js +13 -0
  41. package/src/utils/node-modules-bundler.d.ts +7 -0
  42. package/src/utils/node-modules-bundler.d.ts.map +1 -0
  43. package/src/utils/node-modules-bundler.js +109 -0
  44. package/src/utils/normalize-context-options.d.ts +23 -0
  45. package/src/utils/normalize-context-options.d.ts.map +1 -0
  46. package/src/utils/normalize-context-options.js +18 -0
  47. package/src/utils/shared-mappings-plugin.d.ts +2 -2
  48. package/src/utils/shared-mappings-plugin.d.ts.map +1 -1
  49. package/src/utils/shared-mappings-plugin.js +4 -4
  50. package/src/utils/create-compiler-options.d.ts +0 -6
  51. package/src/utils/create-compiler-options.d.ts.map +0 -1
  52. package/src/utils/create-compiler-options.js +0 -41
  53. package/src/utils/mem-resuts.d.ts +0 -29
  54. package/src/utils/mem-resuts.d.ts.map +0 -1
  55. package/src/utils/mem-resuts.js +0 -50
@@ -1,41 +0,0 @@
1
- // Taken from https://github.com/angular/angular-cli/blob/main/packages/angular/build/src/tools/esbuild/compiler-plugin-options.ts
2
- // Currently, this type cannot be accessed from the outside
3
- export function createCompilerPluginOptions(options, target, sourceFileCache) {
4
- const { workspaceRoot, optimizationOptions, sourcemapOptions, tsconfig, outputNames, fileReplacements, externalDependencies, preserveSymlinks, stylePreprocessorOptions, advancedOptimizations, inlineStyleLanguage, jit, cacheOptions, tailwindConfiguration, postcssConfiguration, publicPath, } = options;
5
- return {
6
- // JS/TS options
7
- pluginOptions: {
8
- sourcemap: !!sourcemapOptions.scripts && (sourcemapOptions.hidden ? 'external' : true),
9
- thirdPartySourcemaps: sourcemapOptions.vendor,
10
- tsconfig,
11
- jit,
12
- advancedOptimizations,
13
- fileReplacements,
14
- sourceFileCache,
15
- loadResultCache: sourceFileCache?.loadResultCache,
16
- incremental: !!options.watch,
17
- },
18
- // Component stylesheet options
19
- styleOptions: {
20
- workspaceRoot,
21
- inlineFonts: !!optimizationOptions.fonts.inline,
22
- optimization: !!optimizationOptions.styles.minify,
23
- sourcemap:
24
- // Hidden component stylesheet sourcemaps are inaccessible which is effectively
25
- // the same as being disabled. Disabling has the advantage of avoiding the overhead
26
- // of sourcemap processing.
27
- sourcemapOptions.styles && !sourcemapOptions.hidden ? 'linked' : false,
28
- outputNames,
29
- includePaths: stylePreprocessorOptions?.includePaths,
30
- sass: stylePreprocessorOptions?.sass,
31
- externalDependencies,
32
- target,
33
- inlineStyleLanguage,
34
- preserveSymlinks,
35
- tailwindConfiguration,
36
- postcssConfiguration,
37
- cacheOptions,
38
- publicPath,
39
- },
40
- };
41
- }
@@ -1,29 +0,0 @@
1
- import type { 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(): string;
10
- constructor(outputFile: OutputFile, fullOutDir?: string | undefined);
11
- get(): Uint8Array;
12
- }
13
- export interface NgCliAssetFile {
14
- source: string;
15
- destination: string;
16
- }
17
- export declare class NgCliAssetResult implements BuildResult {
18
- get fileName(): string;
19
- private file;
20
- constructor(assetFile: NgCliAssetFile);
21
- get(): Buffer;
22
- }
23
- export declare class MemResults {
24
- private map;
25
- add(result: BuildResult[]): void;
26
- get(fileName: string): BuildResult | undefined;
27
- getFileNames(): string[];
28
- }
29
- //# sourceMappingURL=mem-resuts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mem-resuts.d.ts","sourceRoot":"","sources":["../../../src/utils/mem-resuts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAI1C,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,IAAI,UAAU,GAAG,MAAM,CAAC;CAC5B;AAED,qBAAa,aAAc,YAAW,WAAW;IASnC,OAAO,CAAC,UAAU;IAAc,OAAO,CAAC,UAAU,CAAC;IAR/D,IAAI,QAAQ,WAMX;gBAEmB,UAAU,EAAE,UAAU,EAAU,UAAU,CAAC,EAAE,MAAM,YAAA;IAEvE,GAAG,IAAI,UAAU;CAGlB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,qBAAa,gBAAiB,YAAW,WAAW;IAClD,IAAW,QAAQ,IAAI,MAAM,CAE5B;IAED,OAAO,CAAC,IAAI,CAAiB;gBAEjB,SAAS,EAAE,cAAc;IAIrC,GAAG,IAAI,MAAM;CAGd;AAED,qBAAa,UAAU;IACrB,OAAO,CAAC,GAAG,CAAkC;IAEtC,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI;IAMhC,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;IAI9C,YAAY,IAAI,MAAM,EAAE;CAGhC"}
@@ -1,50 +0,0 @@
1
- import * as fs from 'fs';
2
- import * as path from 'path';
3
- export class EsBuildResult {
4
- outputFile;
5
- fullOutDir;
6
- get fileName() {
7
- if (this.fullOutDir) {
8
- return unify(path.relative(this.fullOutDir, this.outputFile.path));
9
- }
10
- else {
11
- return unify(this.outputFile.path);
12
- }
13
- }
14
- constructor(outputFile, fullOutDir) {
15
- this.outputFile = outputFile;
16
- this.fullOutDir = fullOutDir;
17
- }
18
- get() {
19
- return this.outputFile.contents;
20
- }
21
- }
22
- export class NgCliAssetResult {
23
- get fileName() {
24
- return unify(this.file.destination);
25
- }
26
- file;
27
- constructor(assetFile) {
28
- this.file = assetFile;
29
- }
30
- get() {
31
- return fs.readFileSync(this.file.source);
32
- }
33
- }
34
- export class MemResults {
35
- map = new Map();
36
- add(result) {
37
- for (const file of result) {
38
- this.map.set(file.fileName, file);
39
- }
40
- }
41
- get(fileName) {
42
- return this.map.get(fileName);
43
- }
44
- getFileNames() {
45
- return [...this.map.keys()];
46
- }
47
- }
48
- function unify(path) {
49
- return path?.replace(/\\/g, '/');
50
- }