@softarc/native-federation-esbuild 3.5.5 → 4.0.0-RC9
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 +29 -10
- package/src/domain.d.ts +2 -0
- package/src/domain.d.ts.map +1 -0
- package/src/domain.js +1 -0
- package/src/index.d.ts +3 -1
- package/src/index.d.ts.map +1 -0
- package/src/index.js +2 -5
- package/src/lib/core/esbuild-adapter.d.ts +4 -0
- package/src/lib/core/esbuild-adapter.d.ts.map +1 -0
- package/src/lib/core/esbuild-adapter.js +68 -0
- package/src/lib/domain/adapter-config.contract.d.ts +13 -0
- package/src/lib/domain/adapter-config.contract.d.ts.map +1 -0
- package/src/lib/domain/adapter-config.contract.js +1 -0
- package/src/lib/{collect-exports.d.ts → utils/collect-exports.d.ts} +1 -0
- package/src/lib/utils/collect-exports.d.ts.map +1 -0
- package/src/lib/{collect-exports.js → utils/collect-exports.js} +4 -9
- package/src/lib/utils/index.d.ts +6 -0
- package/src/lib/utils/index.d.ts.map +1 -0
- package/src/lib/utils/index.js +5 -0
- package/src/lib/utils/node-modules-bundler.d.ts +5 -0
- package/src/lib/utils/node-modules-bundler.d.ts.map +1 -0
- package/src/lib/utils/node-modules-bundler.js +56 -0
- package/src/lib/utils/react-replacements.d.ts +3 -0
- package/src/lib/utils/react-replacements.d.ts.map +1 -0
- package/src/lib/{react-replacements.js → utils/react-replacements.js} +1 -5
- package/src/lib/utils/source-code-bundler.d.ts +5 -0
- package/src/lib/utils/source-code-bundler.d.ts.map +1 -0
- package/src/lib/utils/source-code-bundler.js +25 -0
- package/src/lib/utils/write-result.d.ts +3 -0
- package/src/lib/utils/write-result.d.ts.map +1 -0
- package/src/lib/utils/write-result.js +13 -0
- package/LICENSE +0 -8
- package/README.md +0 -3
- package/src/index.js.map +0 -1
- package/src/lib/adapter.d.ts +0 -16
- package/src/lib/adapter.js +0 -148
- package/src/lib/adapter.js.map +0 -1
- package/src/lib/collect-exports.js.map +0 -1
- package/src/lib/react-replacements.d.ts +0 -2
- package/src/lib/react-replacements.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,17 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softarc/native-federation-esbuild",
|
|
3
|
-
"version": "
|
|
4
|
-
"type": "
|
|
3
|
+
"version": "4.0.0-RC9",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"license": "MIT",
|
|
5
6
|
"dependencies": {
|
|
6
|
-
"@
|
|
7
|
-
"
|
|
8
|
-
"@
|
|
9
|
-
"rollup": "^4.52.0",
|
|
10
|
-
"rollup-plugin-node-externals": "^8.1.1",
|
|
11
|
-
"esbuild": "^0.27.1",
|
|
12
|
-
"signale": "^1.4.0",
|
|
13
|
-
"acorn": "^8.8.1"
|
|
7
|
+
"@chialab/esbuild-plugin-commonjs": "^0.19.1",
|
|
8
|
+
"acorn": "^8.16.0",
|
|
9
|
+
"@softarc/native-federation": "4.0.0-RC9"
|
|
14
10
|
},
|
|
11
|
+
"homepage": "https://github.com/native-federation/esbuild-adapter",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/native-federation/esbuild-adapter"
|
|
15
|
+
},
|
|
16
|
+
"exports": {
|
|
17
|
+
"./package.json": "./package.json",
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./src/index.d.ts",
|
|
20
|
+
"import": "./src/index.js",
|
|
21
|
+
"default": "./src/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./config": {
|
|
24
|
+
"types": "./src/config.d.ts",
|
|
25
|
+
"import": "./src/config.js",
|
|
26
|
+
"default": "./src/config.js"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"src",
|
|
31
|
+
"!**/*.tsbuildinfo"
|
|
32
|
+
],
|
|
15
33
|
"types": "./src/index.d.ts",
|
|
34
|
+
"module": "./src/index.js",
|
|
16
35
|
"main": "./src/index.js"
|
|
17
36
|
}
|
package/src/domain.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domain.d.ts","sourceRoot":"","sources":["../../src/domain.ts"],"names":[],"mappings":"AAAA,cAAc,yCAAyC,CAAC"}
|
package/src/domain.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './lib/domain/adapter-config.contract.js';
|
package/src/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,aAAa,CAAC"}
|
package/src/index.js
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./lib/adapter"), exports);
|
|
5
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export * from './lib/core/esbuild-adapter.js';
|
|
2
|
+
export * from './domain.js';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NFBuildAdapter } from '@softarc/native-federation/domain';
|
|
2
|
+
import type { EsBuildAdapterConfig } from '../domain/adapter-config.contract.js';
|
|
3
|
+
export declare function createEsBuildAdapter(config: EsBuildAdapterConfig): NFBuildAdapter;
|
|
4
|
+
//# sourceMappingURL=esbuild-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"esbuild-adapter.d.ts","sourceRoot":"","sources":["../../../../src/lib/core/esbuild-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EAIf,MAAM,mCAAmC,CAAC;AAG3C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAKjF,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,oBAAoB,GAAG,cAAc,CAyGjF"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { AbortedError } from '@softarc/native-federation/internal';
|
|
2
|
+
import * as esbuild from 'esbuild';
|
|
3
|
+
import { writeResult } from '../utils/write-result.js';
|
|
4
|
+
import { createSourceCodeEsbuildContext } from '../utils/source-code-bundler.js';
|
|
5
|
+
import { createNodeModulesEsbuildContext } from '../utils/node-modules-bundler.js';
|
|
6
|
+
export function createEsBuildAdapter(config) {
|
|
7
|
+
if (!config.compensateExports) {
|
|
8
|
+
config.compensateExports = [new RegExp('/react/')];
|
|
9
|
+
}
|
|
10
|
+
const bundleContextCache = new Map();
|
|
11
|
+
const dispose = async (name) => {
|
|
12
|
+
if (name) {
|
|
13
|
+
if (!bundleContextCache.has(name)) {
|
|
14
|
+
throw new Error(`Could not dispose of non-existing build '${name}'`);
|
|
15
|
+
}
|
|
16
|
+
const entry = bundleContextCache.get(name);
|
|
17
|
+
await entry.ctx.dispose();
|
|
18
|
+
bundleContextCache.delete(name);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
// Dispose all contexts
|
|
22
|
+
const disposals = [];
|
|
23
|
+
for (const [, entry] of bundleContextCache) {
|
|
24
|
+
disposals.push(entry.ctx.dispose());
|
|
25
|
+
}
|
|
26
|
+
bundleContextCache.clear();
|
|
27
|
+
await Promise.all(disposals);
|
|
28
|
+
await esbuild.stop();
|
|
29
|
+
};
|
|
30
|
+
const setup = async (name, options) => {
|
|
31
|
+
const { entryPoints, external, outdir, hash, dev = false, platform = 'browser', tsConfigPath, isMappingOrExposed, } = options;
|
|
32
|
+
if (bundleContextCache.has(name)) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const esbuildPlatform = platform === 'node' ? 'node' : 'browser';
|
|
36
|
+
const ctx = isMappingOrExposed
|
|
37
|
+
? await createSourceCodeEsbuildContext(entryPoints, external, outdir, config, dev, hash, esbuildPlatform, tsConfigPath)
|
|
38
|
+
: await createNodeModulesEsbuildContext(entryPoints, external, outdir, config, dev, hash, esbuildPlatform);
|
|
39
|
+
bundleContextCache.set(name, {
|
|
40
|
+
ctx,
|
|
41
|
+
outdir,
|
|
42
|
+
dev,
|
|
43
|
+
name,
|
|
44
|
+
isMappingOrExposed,
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
const build = async (name, opts = {}) => {
|
|
48
|
+
const bundleContext = bundleContextCache.get(name);
|
|
49
|
+
if (!bundleContext) {
|
|
50
|
+
throw new Error(`No context found for build "${name}". Call setup() first.`);
|
|
51
|
+
}
|
|
52
|
+
if (opts?.signal?.aborted) {
|
|
53
|
+
throw new AbortedError('[build] Aborted before rebuild');
|
|
54
|
+
}
|
|
55
|
+
try {
|
|
56
|
+
const result = await bundleContext.ctx.rebuild();
|
|
57
|
+
const writtenFiles = writeResult(result, bundleContext.outdir);
|
|
58
|
+
return writtenFiles.map(fileName => ({ fileName }));
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
if (opts?.signal?.aborted && error instanceof Error && error.message.includes('canceled')) {
|
|
62
|
+
throw new AbortedError('[build] ESBuild rebuild was canceled.');
|
|
63
|
+
}
|
|
64
|
+
throw error;
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
return { setup, build, dispose };
|
|
68
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type * as esbuild from 'esbuild';
|
|
2
|
+
export type ReplacementConfig = {
|
|
3
|
+
file: string;
|
|
4
|
+
};
|
|
5
|
+
export interface EsBuildAdapterConfig {
|
|
6
|
+
plugins: esbuild.Plugin[];
|
|
7
|
+
fileReplacements?: Record<string, string | ReplacementConfig>;
|
|
8
|
+
compensateExports?: RegExp[];
|
|
9
|
+
loader?: {
|
|
10
|
+
[ext: string]: esbuild.Loader;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=adapter-config.contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter-config.contract.d.ts","sourceRoot":"","sources":["../../../../src/lib/domain/adapter-config.contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,OAAO,MAAM,SAAS,CAAC;AACxC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,iBAAiB,CAAC,CAAC;IAC9D,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,MAAM,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAA;KAAE,CAAC;CAC5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collect-exports.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/collect-exports.ts"],"names":[],"mappings":"AAQA,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM;;;;;EAoD1C"}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const fs = tslib_1.__importStar(require("fs"));
|
|
6
|
-
const acorn_1 = require("acorn");
|
|
7
|
-
function collectExports(path) {
|
|
1
|
+
import * as fs from 'fs';
|
|
2
|
+
import { parse } from 'acorn';
|
|
3
|
+
export function collectExports(path) {
|
|
8
4
|
const src = fs.readFileSync(path, 'utf8');
|
|
9
|
-
const parseTree =
|
|
5
|
+
const parseTree = parse(src, {
|
|
10
6
|
ecmaVersion: 'latest',
|
|
11
7
|
allowHashBang: true,
|
|
12
8
|
sourceType: 'module',
|
|
@@ -67,4 +63,3 @@ function isDefaultExport(exportSpecifier) {
|
|
|
67
63
|
return (exportSpecifier.exported?.type === 'Identifier' &&
|
|
68
64
|
exportSpecifier.exported?.name === 'default');
|
|
69
65
|
}
|
|
70
|
-
//# sourceMappingURL=collect-exports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as esbuild from 'esbuild';
|
|
2
|
+
import type { EntryPoint } from '@softarc/native-federation/domain';
|
|
3
|
+
import type { EsBuildAdapterConfig } from '../domain/adapter-config.contract.js';
|
|
4
|
+
export declare function createNodeModulesEsbuildContext(entryPoints: EntryPoint[], external: string[], outdir: string, config: EsBuildAdapterConfig, dev: boolean, hash: boolean, platform: 'browser' | 'node'): Promise<esbuild.BuildContext>;
|
|
5
|
+
//# sourceMappingURL=node-modules-bundler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-modules-bundler.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/node-modules-bundler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAqB,MAAM,sCAAsC,CAAC;AAEpG,wBAAsB,+BAA+B,CACnD,WAAW,EAAE,UAAU,EAAE,EACzB,QAAQ,EAAE,MAAM,EAAE,EAClB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,oBAAoB,EAC5B,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE,SAAS,GAAG,MAAM,GAC3B,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,CAmC/B"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as esbuild from 'esbuild';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
export async function createNodeModulesEsbuildContext(entryPoints, external, outdir, config, dev, hash, platform) {
|
|
4
|
+
const env = dev ? 'development' : 'production';
|
|
5
|
+
// Apply file replacements to entry points
|
|
6
|
+
if (config.fileReplacements) {
|
|
7
|
+
const normalizedReplacements = normalize(config.fileReplacements);
|
|
8
|
+
for (const entryPoint of entryPoints) {
|
|
9
|
+
entryPoint.fileName = replaceEntryPoint(entryPoint.fileName, normalizedReplacements);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
const commonjsPluginModule = await import('@chialab/esbuild-plugin-commonjs');
|
|
13
|
+
const commonjsPlugin = commonjsPluginModule.default;
|
|
14
|
+
return esbuild.context({
|
|
15
|
+
entryPoints: entryPoints.map((ep) => ({
|
|
16
|
+
in: ep.fileName,
|
|
17
|
+
out: path.parse(ep.outName).name,
|
|
18
|
+
})),
|
|
19
|
+
write: false,
|
|
20
|
+
outdir,
|
|
21
|
+
entryNames: hash ? '[name]-[hash]' : '[name]',
|
|
22
|
+
external,
|
|
23
|
+
bundle: true,
|
|
24
|
+
sourcemap: dev,
|
|
25
|
+
minify: !dev,
|
|
26
|
+
format: 'esm',
|
|
27
|
+
splitting: false, // Todo: support splitting
|
|
28
|
+
platform,
|
|
29
|
+
plugins: [commonjsPlugin()],
|
|
30
|
+
define: {
|
|
31
|
+
'process.env.NODE_ENV': `"${env}"`,
|
|
32
|
+
},
|
|
33
|
+
resolveExtensions: ['.mjs', '.js', '.cjs'],
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function normalize(config) {
|
|
37
|
+
const result = {};
|
|
38
|
+
for (const key in config) {
|
|
39
|
+
if (typeof config[key] === 'string') {
|
|
40
|
+
result[key] = {
|
|
41
|
+
file: config[key],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
result[key] = config[key];
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return result;
|
|
49
|
+
}
|
|
50
|
+
function replaceEntryPoint(entryPoint, fileReplacements) {
|
|
51
|
+
entryPoint = entryPoint.replace(/\\/g, '/');
|
|
52
|
+
for (const key in fileReplacements) {
|
|
53
|
+
entryPoint = entryPoint.replace(new RegExp(`${key}$`), fileReplacements[key].file);
|
|
54
|
+
}
|
|
55
|
+
return entryPoint;
|
|
56
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-replacements.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/react-replacements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAE9E,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CA6B/E,CAAC"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.reactReplacements = void 0;
|
|
4
|
-
exports.reactReplacements = {
|
|
1
|
+
export const reactReplacements = {
|
|
5
2
|
dev: {
|
|
6
3
|
'node_modules/react/index.js': {
|
|
7
4
|
file: 'node_modules/react/cjs/react.development.js',
|
|
@@ -31,4 +28,3 @@ exports.reactReplacements = {
|
|
|
31
28
|
},
|
|
32
29
|
},
|
|
33
30
|
};
|
|
34
|
-
//# sourceMappingURL=react-replacements.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as esbuild from 'esbuild';
|
|
2
|
+
import type { EntryPoint } from '@softarc/native-federation/domain';
|
|
3
|
+
import type { EsBuildAdapterConfig } from '../domain/adapter-config.contract.js';
|
|
4
|
+
export declare function createSourceCodeEsbuildContext(entryPoints: EntryPoint[], external: string[], outdir: string, config: EsBuildAdapterConfig, dev: boolean, hash: boolean, platform: 'browser' | 'node', tsConfigPath?: string): Promise<esbuild.BuildContext>;
|
|
5
|
+
//# sourceMappingURL=source-code-bundler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-code-bundler.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/source-code-bundler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAEjF,wBAAsB,8BAA8B,CAClD,WAAW,EAAE,UAAU,EAAE,EACzB,QAAQ,EAAE,MAAM,EAAE,EAClB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,oBAAoB,EAC5B,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE,SAAS,GAAG,MAAM,EAC5B,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,CAsB/B"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as esbuild from 'esbuild';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
export async function createSourceCodeEsbuildContext(entryPoints, external, outdir, config, dev, hash, platform, tsConfigPath) {
|
|
4
|
+
return esbuild.context({
|
|
5
|
+
entryPoints: entryPoints.map((ep) => ({
|
|
6
|
+
in: ep.fileName,
|
|
7
|
+
out: path.parse(ep.outName).name,
|
|
8
|
+
})),
|
|
9
|
+
write: false,
|
|
10
|
+
outdir,
|
|
11
|
+
entryNames: hash ? '[name]-[hash]' : '[name]',
|
|
12
|
+
external,
|
|
13
|
+
loader: config.loader,
|
|
14
|
+
bundle: true,
|
|
15
|
+
sourcemap: dev,
|
|
16
|
+
minify: !dev,
|
|
17
|
+
format: 'esm',
|
|
18
|
+
splitting: false, // Todo: support splitting
|
|
19
|
+
target: ['esnext'],
|
|
20
|
+
platform,
|
|
21
|
+
tsconfig: tsConfigPath,
|
|
22
|
+
plugins: [...config.plugins],
|
|
23
|
+
resolveExtensions: ['.ts', '.tsx', '.mjs', '.js', '.cjs'],
|
|
24
|
+
});
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write-result.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/write-result.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,OAAO,MAAM,SAAS,CAAC;AAExC,wBAAgB,WAAW,CACzB,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,CAAC,EACjD,MAAM,EAAE,MAAM,GACb,MAAM,EAAE,CAWV"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as fs from 'fs';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
export function writeResult(result, outdir) {
|
|
4
|
+
const outputFiles = result.outputFiles || [];
|
|
5
|
+
const writtenFiles = [];
|
|
6
|
+
for (const outFile of outputFiles) {
|
|
7
|
+
const fileName = path.basename(outFile.path);
|
|
8
|
+
const filePath = path.join(outdir, fileName);
|
|
9
|
+
fs.writeFileSync(filePath, outFile.contents);
|
|
10
|
+
writtenFiles.push(filePath);
|
|
11
|
+
}
|
|
12
|
+
return writtenFiles;
|
|
13
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
Copyright 2021 Softarc Consulting GmbH
|
|
2
|
-
|
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
-
|
|
5
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
-
|
|
7
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
8
|
-
|
package/README.md
DELETED
package/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/native-federation-esbuild/src/index.ts"],"names":[],"mappings":";;;AAAA,wDAA8B"}
|
package/src/lib/adapter.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { BuildAdapter, BuildAdapterOptions, BuildResult } from '@softarc/native-federation/build';
|
|
2
|
-
import * as esbuild from 'esbuild';
|
|
3
|
-
export declare const esBuildAdapter: BuildAdapter;
|
|
4
|
-
export type ReplacementConfig = {
|
|
5
|
-
file: string;
|
|
6
|
-
};
|
|
7
|
-
export interface EsBuildAdapterConfig {
|
|
8
|
-
plugins: esbuild.Plugin[];
|
|
9
|
-
fileReplacements?: Record<string, string | ReplacementConfig>;
|
|
10
|
-
skipRollup?: boolean;
|
|
11
|
-
compensateExports?: RegExp[];
|
|
12
|
-
loader?: {
|
|
13
|
-
[ext: string]: esbuild.Loader;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
export declare function createEsBuildAdapter(config: EsBuildAdapterConfig): (options: BuildAdapterOptions) => Promise<BuildResult[]>;
|
package/src/lib/adapter.js
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.esBuildAdapter = void 0;
|
|
4
|
-
exports.createEsBuildAdapter = createEsBuildAdapter;
|
|
5
|
-
const tslib_1 = require("tslib");
|
|
6
|
-
const esbuild = tslib_1.__importStar(require("esbuild"));
|
|
7
|
-
const rollup_1 = require("rollup");
|
|
8
|
-
const plugin_node_resolve_1 = tslib_1.__importDefault(require("@rollup/plugin-node-resolve"));
|
|
9
|
-
const rollup_plugin_node_externals_1 = require("rollup-plugin-node-externals");
|
|
10
|
-
const fs = tslib_1.__importStar(require("fs"));
|
|
11
|
-
const path_1 = tslib_1.__importDefault(require("path"));
|
|
12
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
13
|
-
const commonjs = require('@rollup/plugin-commonjs');
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
15
|
-
const replace = require('@rollup/plugin-replace');
|
|
16
|
-
exports.esBuildAdapter = createEsBuildAdapter({
|
|
17
|
-
plugins: [],
|
|
18
|
-
});
|
|
19
|
-
function createEsBuildAdapter(config) {
|
|
20
|
-
if (!config.compensateExports) {
|
|
21
|
-
config.compensateExports = [new RegExp('/react/')];
|
|
22
|
-
}
|
|
23
|
-
return async (options) => {
|
|
24
|
-
const { entryPoints, external, outdir, hash } = options;
|
|
25
|
-
// TODO: Do we need to prepare packages anymore as esbuild has evolved?
|
|
26
|
-
for (const entryPoint of entryPoints) {
|
|
27
|
-
const isPkg = entryPoint.fileName.includes('node_modules');
|
|
28
|
-
const pkgName = isPkg ? inferPkgName(entryPoint.fileName) : '';
|
|
29
|
-
const tmpFolder = `node_modules/.tmp/${pkgName}`;
|
|
30
|
-
if (isPkg) {
|
|
31
|
-
await prepareNodePackage(entryPoint.fileName, external, tmpFolder, config, !!options.dev);
|
|
32
|
-
entryPoint.fileName = tmpFolder;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
const ctx = await esbuild.context({
|
|
36
|
-
entryPoints: entryPoints.map((ep) => ({
|
|
37
|
-
in: ep.fileName,
|
|
38
|
-
out: path_1.default.parse(ep.outName).name,
|
|
39
|
-
})),
|
|
40
|
-
write: false,
|
|
41
|
-
outdir,
|
|
42
|
-
entryNames: hash ? '[name]-[hash]' : '[name]',
|
|
43
|
-
external,
|
|
44
|
-
loader: config.loader,
|
|
45
|
-
bundle: true,
|
|
46
|
-
sourcemap: options.dev,
|
|
47
|
-
minify: !options.dev,
|
|
48
|
-
format: 'esm',
|
|
49
|
-
target: ['esnext'],
|
|
50
|
-
plugins: [...config.plugins],
|
|
51
|
-
});
|
|
52
|
-
const result = await ctx.rebuild();
|
|
53
|
-
const writtenFiles = writeResult(result, outdir);
|
|
54
|
-
ctx.dispose();
|
|
55
|
-
return writtenFiles.map((fileName) => ({ fileName }));
|
|
56
|
-
// const normEntryPoint = entryPoint.replace(/\\/g, '/');
|
|
57
|
-
// if (
|
|
58
|
-
// isPkg &&
|
|
59
|
-
// config?.compensateExports?.find((regExp) => regExp.exec(normEntryPoint))
|
|
60
|
-
// ) {
|
|
61
|
-
// logger.verbose('compensate exports for ' + tmpFolder);
|
|
62
|
-
// compensateExports(tmpFolder, outfile);
|
|
63
|
-
// }
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
function writeResult(result, outdir) {
|
|
67
|
-
const outputFiles = result.outputFiles || [];
|
|
68
|
-
const writtenFiles = [];
|
|
69
|
-
for (const outFile of outputFiles) {
|
|
70
|
-
const fileName = path_1.default.basename(outFile.path);
|
|
71
|
-
const filePath = path_1.default.join(outdir, fileName);
|
|
72
|
-
fs.writeFileSync(filePath, outFile.contents);
|
|
73
|
-
writtenFiles.push(filePath);
|
|
74
|
-
}
|
|
75
|
-
return writtenFiles;
|
|
76
|
-
}
|
|
77
|
-
// TODO: Unused, to delete?
|
|
78
|
-
// function compensateExports(entryPoint: string, outfile?: string): void {
|
|
79
|
-
// const inExports = collectExports(entryPoint);
|
|
80
|
-
// const outExports = outfile ? collectExports(outfile) : inExports;
|
|
81
|
-
//
|
|
82
|
-
// if (!outExports.hasDefaultExport || outExports.hasFurtherExports) {
|
|
83
|
-
// return;
|
|
84
|
-
// }
|
|
85
|
-
// const defaultName = outExports.defaultExportName;
|
|
86
|
-
//
|
|
87
|
-
// let exports = '/*Try to compensate missing exports*/\n\n';
|
|
88
|
-
// for (const exp of inExports.exports) {
|
|
89
|
-
// exports += `let ${exp}$softarc = ${defaultName}.${exp};\n`;
|
|
90
|
-
// exports += `export { ${exp}$softarc as ${exp} };\n`;
|
|
91
|
-
// }
|
|
92
|
-
//
|
|
93
|
-
// const target = outfile ?? entryPoint;
|
|
94
|
-
// fs.appendFileSync(target, exports, 'utf-8');
|
|
95
|
-
// }
|
|
96
|
-
async function prepareNodePackage(entryPoint, external, tmpFolder, config, dev) {
|
|
97
|
-
if (config.fileReplacements) {
|
|
98
|
-
entryPoint = replaceEntryPoint(entryPoint, normalize(config.fileReplacements));
|
|
99
|
-
}
|
|
100
|
-
const env = dev ? 'development' : 'production';
|
|
101
|
-
const result = await (0, rollup_1.rollup)({
|
|
102
|
-
input: entryPoint,
|
|
103
|
-
plugins: [
|
|
104
|
-
commonjs(),
|
|
105
|
-
(0, rollup_plugin_node_externals_1.nodeExternals)({ include: external }),
|
|
106
|
-
(0, plugin_node_resolve_1.default)(),
|
|
107
|
-
replace({
|
|
108
|
-
preventAssignment: true,
|
|
109
|
-
values: {
|
|
110
|
-
'process.env.NODE_ENV': `"${env}"`,
|
|
111
|
-
},
|
|
112
|
-
}),
|
|
113
|
-
],
|
|
114
|
-
});
|
|
115
|
-
await result.write({
|
|
116
|
-
format: 'esm',
|
|
117
|
-
file: tmpFolder,
|
|
118
|
-
sourcemap: dev,
|
|
119
|
-
exports: 'named',
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
function inferPkgName(entryPoint) {
|
|
123
|
-
return entryPoint
|
|
124
|
-
.replace(/.*?node_modules/g, '')
|
|
125
|
-
.replace(/[^A-Za-z0-9.]/g, '_');
|
|
126
|
-
}
|
|
127
|
-
function normalize(config) {
|
|
128
|
-
const result = {};
|
|
129
|
-
for (const key in config) {
|
|
130
|
-
if (typeof config[key] === 'string') {
|
|
131
|
-
result[key] = {
|
|
132
|
-
file: config[key],
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
else {
|
|
136
|
-
result[key] = config[key];
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
return result;
|
|
140
|
-
}
|
|
141
|
-
function replaceEntryPoint(entryPoint, fileReplacements) {
|
|
142
|
-
entryPoint = entryPoint.replace(/\\/g, '/');
|
|
143
|
-
for (const key in fileReplacements) {
|
|
144
|
-
entryPoint = entryPoint.replace(new RegExp(`${key}$`), fileReplacements[key].file);
|
|
145
|
-
}
|
|
146
|
-
return entryPoint;
|
|
147
|
-
}
|
|
148
|
-
//# sourceMappingURL=adapter.js.map
|
package/src/lib/adapter.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../../../../libs/native-federation-esbuild/src/lib/adapter.ts"],"names":[],"mappings":";;;AAkCA,oDA4DC;;AAzFD,yDAAmC;AACnC,mCAAgC;AAChC,8FAAkD;AAClD,+EAA6D;AAC7D,+CAAyB;AACzB,wDAAwB;AAExB,8DAA8D;AAC9D,MAAM,QAAQ,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;AAEpD,8DAA8D;AAC9D,MAAM,OAAO,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AAErC,QAAA,cAAc,GAAiB,oBAAoB,CAAC;IAC/D,OAAO,EAAE,EAAE;CACZ,CAAC,CAAC;AAcH,SAAgB,oBAAoB,CAAC,MAA4B;IAC/D,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE,CAAC;QAC9B,MAAM,CAAC,iBAAiB,GAAG,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IACrD,CAAC;IAED,OAAO,KAAK,EAAE,OAA4B,EAA0B,EAAE;QACpE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;QAExD,uEAAuE;QAEvE,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;YACrC,MAAM,KAAK,GAAG,UAAU,CAAC,QAA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AS,iBAAiB,CACxB,UAAkB,EAClB,gBAAmD;IAEnD,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAE5C,KAAK,MAAM,GAAG,IAAI,gBAAgB,EAAE,CAAC;QACnC,UAAU,GAAG,UAAU,CAAC,OAAO,CAC7B,IAAI,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC,EACrB,gBAAgB,CAAC,GAAG,CAAC,CAAC,IAAI,CAC3B,CAAC;IACJ,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"collect-exports.js","sourceRoot":"","sources":["../../../../../libs/native-federation-esbuild/src/lib/collect-exports.ts"],"names":[],"mappings":";;AAQA,wCAoDC;;AA5DD,+CAAyB;AACzB,iCAA8B;AAO9B,SAAgB,cAAc,CAAC,IAAY;IACzC,MAAM,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAE1C,MAAM,SAAS,GAAG,IAAA,aAAK,EAAC,GAAG,EAAE;QAC3B,WAAW,EAAE,QAAQ;QACrB,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,QAAQ;KACrB,CAAC,CAAC;IAEH,IAAI,gBAAgB,GAAG,KAAK,CAAC;IAC7B,IAAI,iBAAiB,GAAG,KAAK,CAAC;IAC9B,IAAI,iBAAiB,GAAG,EAAE,CAAC;IAC3B,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;IAElC,QAAQ,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,EAAE;QAC3B,IACE,IAAI,CAAC,IAAI,KAAK,sBAAsB;YACpC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,KAAK,SAAS,CAAC,KAAK;UAC5C,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;YACtC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;IAC5C,OAAO,CACL,eAAe,CAAC,QAAQ,EAAE,IAAI,KAAK,YAAY;QAC/C,eAAe,CAAC,QAAQ,EAAE,IAAI,KAAK,SAAS,CAC7C,CAAC;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react-replacements.js","sourceRoot":"","sources":["../../../../../libs/native-federation-esbuild/src/lib/react-replacements.ts"],"names":[],"mappings":";;;AAEa,QAAA,iBAAiB,GAG1B;IACF,GAAG,EAAE;QACH,6BAA6B,EAAE;YAC7B,IAAI,EAAE,6CAA6C;SACpD;QACD,uCAAuC,EAAE;YACvC,IAAI,EAAE,6DAA6D;SACpE;QACD,mCAAmC,EAAE;YACnC,IAAI,EAAE,yDAAyD;SAChE;QACD,iCAAiC,EAAE;YACjC,IAAI,EAAE,qDAAqD;SAC5D;KACF;IACD,IAAI,EAAE;QACJ,6BAA6B,EAAE;YAC7B,IAAI,EAAE,gDAAgD;SACvD;QACD,uCAAuC,EAAE;YACvC,IAAI,EAAE,gEAAgE;SACvE;QACD,mCAAmC,EAAE;YACnC,IAAI,EAAE,4DAA4D;SACnE;QACD,iCAAiC,EAAE;YACjC,IAAI,EAAE,wDAAwD;SAC/D;KACF;CACF,CAAC"}
|