Skip to content

Commit 2afe44c

Browse files
committed
feat(nf): update schematic
1 parent 7c018b8 commit 2afe44c

File tree

10 files changed

+155
-150
lines changed

10 files changed

+155
-150
lines changed

libs/native-federation-core/src/lib/core/build-adapter.d.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import { MappedPath } from '../utils/mapped-paths';
22
export type BuildKind = 'shared-package' | 'shared-mapping' | 'exposed';
33
export interface BuildAdapterOptions {
4-
entryPoint: string;
5-
tsConfigPath?: string;
6-
external: Array<string>;
7-
outfile: string;
8-
mappedPaths: MappedPath[];
9-
packageName?: string;
10-
esm?: boolean;
11-
dev?: boolean;
12-
watch?: boolean;
13-
kind: BuildKind;
4+
entryPoint: string;
5+
tsConfigPath?: string;
6+
external: Array<string>;
7+
outfile: string;
8+
mappedPaths: MappedPath[];
9+
packageName?: string;
10+
esm?: boolean;
11+
dev?: boolean;
12+
watch?: boolean;
13+
kind: BuildKind;
1414
}
1515
export type BuildAdapter = (options: BuildAdapterOptions) => Promise<void>;
1616
export declare function setBuildAdapter(buildAdapter: BuildAdapter): void;

libs/native-federation-core/src/lib/core/build-adapter.js

Lines changed: 9 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { LogLevels } from 'npmlog';
22
export declare const logger: {
3-
error: (msg: any) => void;
4-
warn: (msg: any) => void;
5-
notice: (msg: any) => void;
6-
info: (msg: any) => void;
7-
verbose: (msg: any) => void;
8-
debug: (msg: any) => void;
3+
error: (msg: any) => void;
4+
warn: (msg: any) => void;
5+
notice: (msg: any) => void;
6+
info: (msg: any) => void;
7+
verbose: (msg: any) => void;
8+
debug: (msg: any) => void;
99
};
1010
export declare const setLogLevel: (level: LogLevels | 'debug') => void;

libs/native-federation-core/src/lib/utils/logger.js

Lines changed: 18 additions & 48 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
export interface MappedPath {
2-
key: string;
3-
path: string;
2+
key: string;
3+
path: string;
44
}
55
export interface GetMappedPathsOptions {
6-
rootTsConfigPath: string;
7-
sharedMappings?: string[];
8-
rootPath?: string;
6+
rootTsConfigPath: string;
7+
sharedMappings?: string[];
8+
rootPath?: string;
99
}
10-
export declare function getMappedPaths({
11-
rootTsConfigPath,
12-
sharedMappings,
13-
rootPath,
14-
}: GetMappedPathsOptions): Array<MappedPath>;
10+
export declare function getMappedPaths({ rootTsConfigPath, sharedMappings, rootPath, }: GetMappedPathsOptions): Array<MappedPath>;

libs/native-federation-core/src/lib/utils/mapped-paths.js

Lines changed: 34 additions & 44 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/native-federation/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"@softarc/native-federation": "1.1.1",
2020
"@softarc/native-federation-runtime": "1.1.1",
2121
"@types/browser-sync": "^2.26.3",
22+
"browser-sync": "^2.29.3",
2223
"esbuild": "^0.18.12",
2324
"mrmime": "^1.0.1",
2425
"npmlog": "^6.0.2",

libs/native-federation/src/builders/build/builder.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ export async function runBuilder(
8282
rebuildEvents.rebuildMappings.emit(),
8383
rebuildEvents.rebuildExposed.emit(),
8484
]);
85+
logger.info('Done!');
8586
reloadShell(nfOptions.shell);
8687
}, nfOptions.rebuildDelay);
8788
}

libs/native-federation/src/schematics/init/files/federation.config.js__tmpl__

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,12 @@ module.exports = withNativeFederation({
1212
...shareAll({ singleton: true, strictVersion: true, requiredVersion: 'auto' }),
1313
},
1414

15+
skip: [
16+
'rxjs/ajax',
17+
'rxjs/fetch',
18+
'rxjs/testing',
19+
'rxjs/webSocket',
20+
// Add further packages you don't need at runtime
21+
]
22+
1523
});

0 commit comments

Comments
 (0)