@softarc/native-federation
Advanced tools
Comparing version 2.0.9 to 2.0.10
{ | ||
"name": "@softarc/native-federation", | ||
"version": "2.0.9", | ||
"version": "2.0.10", | ||
"type": "commonjs", | ||
"license": "MIT", | ||
"dependencies": { | ||
"json5": "^2.2.0", | ||
"npmlog": "^6.0.2", | ||
"@softarc/native-federation-runtime": "2.0.9" | ||
"@softarc/native-federation-runtime": "2.0.10" | ||
}, | ||
"main": "./src/index.js" | ||
"main": "./src/index.js", | ||
"types": "./src/index.d.ts" | ||
} |
@@ -9,3 +9,3 @@ export { NormalizedFederationConfig } from './lib/config/federation-config'; | ||
export { MappedPath } from './lib/utils/mapped-paths'; | ||
export { BuildAdapter, BuildAdapterOptions, BuildResult, BuildKind, } from './lib/core/build-adapter'; | ||
export { BuildAdapter, BuildAdapterOptions, BuildResult, BuildKind, EntryPoint, } from './lib/core/build-adapter'; | ||
export { withNativeFederation } from './lib/config/with-native-federation'; | ||
@@ -12,0 +12,0 @@ export { buildForFederation } from './lib/core/build-for-federation'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getConfigContext = exports.usePackageJson = exports.useWorkspace = void 0; | ||
exports.useWorkspace = useWorkspace; | ||
exports.usePackageJson = usePackageJson; | ||
exports.getConfigContext = getConfigContext; | ||
let _context = {}; | ||
@@ -8,11 +10,8 @@ function useWorkspace(workspaceRoot) { | ||
} | ||
exports.useWorkspace = useWorkspace; | ||
function usePackageJson(packageJson) { | ||
_context = Object.assign(Object.assign({}, _context), { packageJson }); | ||
} | ||
exports.usePackageJson = usePackageJson; | ||
function getConfigContext() { | ||
return _context; | ||
} | ||
exports.getConfigContext = getConfigContext; | ||
//# sourceMappingURL=configuration-context.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.share = exports.setInferVersion = exports.shareAll = exports.findRootTsConfigJson = exports.DEFAULT_SECONARIES_SKIP_LIST = void 0; | ||
exports.DEFAULT_SECONARIES_SKIP_LIST = void 0; | ||
exports.findRootTsConfigJson = findRootTsConfigJson; | ||
exports.shareAll = shareAll; | ||
exports.setInferVersion = setInferVersion; | ||
exports.share = share; | ||
const path = require("path"); | ||
@@ -29,3 +33,2 @@ const fs = require("fs"); | ||
} | ||
exports.findRootTsConfigJson = findRootTsConfigJson; | ||
function findPackageJson(folder) { | ||
@@ -203,3 +206,2 @@ while (!fs.existsSync(path.join(folder, 'package.json')) && | ||
} | ||
exports.shareAll = shareAll; | ||
function inferProjectPath(projectPath) { | ||
@@ -220,3 +222,2 @@ if (!projectPath && (0, configuration_context_1.getConfigContext)().packageJson) { | ||
} | ||
exports.setInferVersion = setInferVersion; | ||
function share(shareObjects, projectPath = '') { | ||
@@ -260,3 +261,2 @@ projectPath = inferProjectPath(projectPath); | ||
} | ||
exports.share = share; | ||
function addSecondaries(secondaries, result) { | ||
@@ -263,0 +263,0 @@ for (const key in secondaries) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.withNativeFederation = void 0; | ||
exports.withNativeFederation = withNativeFederation; | ||
const mapped_paths_1 = require("../utils/mapped-paths"); | ||
@@ -18,3 +18,2 @@ const share_utils_1 = require("./share-utils"); | ||
} | ||
exports.withNativeFederation = withNativeFederation; | ||
function normalizeShared(config, skip) { | ||
@@ -21,0 +20,0 @@ let result = {}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getBuildAdapter = exports.setBuildAdapter = void 0; | ||
exports.setBuildAdapter = setBuildAdapter; | ||
exports.getBuildAdapter = getBuildAdapter; | ||
const tslib_1 = require("tslib"); | ||
@@ -14,7 +15,5 @@ const logger_1 = require("../utils/logger"); | ||
} | ||
exports.setBuildAdapter = setBuildAdapter; | ||
function getBuildAdapter() { | ||
return _buildAdapter; | ||
} | ||
exports.getBuildAdapter = getBuildAdapter; | ||
//# sourceMappingURL=build-adapter.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.buildForFederation = exports.defaultBuildParams = void 0; | ||
exports.defaultBuildParams = void 0; | ||
exports.buildForFederation = buildForFederation; | ||
const tslib_1 = require("tslib"); | ||
@@ -12,4 +13,4 @@ const write_import_map_1 = require("./write-import-map"); | ||
}; | ||
function buildForFederation(config, fedOptions, externals, buildParams = exports.defaultBuildParams) { | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
function buildForFederation(config_1, fedOptions_1, externals_1) { | ||
return tslib_1.__awaiter(this, arguments, void 0, function* (config, fedOptions, externals, buildParams = exports.defaultBuildParams) { | ||
let artefactInfo; | ||
@@ -37,3 +38,2 @@ if (!buildParams.skipMappingsAndExposed) { | ||
} | ||
exports.buildForFederation = buildForFederation; | ||
//# sourceMappingURL=build-for-federation.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.describeSharedMappings = exports.describeExposed = exports.bundleExposedAndMappings = void 0; | ||
exports.bundleExposedAndMappings = bundleExposedAndMappings; | ||
exports.describeExposed = describeExposed; | ||
exports.describeSharedMappings = describeSharedMappings; | ||
const tslib_1 = require("tslib"); | ||
@@ -69,3 +71,2 @@ const path_1 = tslib_1.__importDefault(require("path")); | ||
} | ||
exports.bundleExposedAndMappings = bundleExposedAndMappings; | ||
function describeExposed(config, options) { | ||
@@ -87,3 +88,2 @@ const result = []; | ||
} | ||
exports.describeExposed = describeExposed; | ||
function describeSharedMappings(config, fedOptions) { | ||
@@ -108,3 +108,2 @@ const result = []; | ||
} | ||
exports.describeSharedMappings = describeSharedMappings; | ||
//# sourceMappingURL=bundle-exposed-and-mappings.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.bundleShared = void 0; | ||
exports.bundleShared = bundleShared; | ||
const tslib_1 = require("tslib"); | ||
@@ -12,2 +12,3 @@ const path = tslib_1.__importStar(require("path")); | ||
const normalize_1 = require("../utils/normalize"); | ||
const crypto_1 = tslib_1.__importDefault(require("crypto")); | ||
function bundleShared(config, fedOptions, externals) { | ||
@@ -26,6 +27,10 @@ return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
const encName = pi.packageName.replace(/[^A-Za-z0-9]/g, '_'); | ||
const encVersion = pi.version.replace(/[^A-Za-z0-9]/g, '_'); | ||
// const encVersion = pi.version.replace(/[^A-Za-z0-9]/g, '_'); | ||
// const outName = fedOptions.dev | ||
// ? `${encName}-${encVersion}-dev.js` | ||
// : `${encName}-${encVersion}.js`; | ||
const hash = calcFileHash(pi); | ||
const outName = fedOptions.dev | ||
? `${encName}-${encVersion}-dev.js` | ||
: `${encName}-${encVersion}.js`; | ||
? `${encName}.${hash}-dev.js` | ||
: `${encName}.${hash}.js`; | ||
return { fileName: pi.entryPoint, outName }; | ||
@@ -97,3 +102,14 @@ }); | ||
} | ||
exports.bundleShared = bundleShared; | ||
function calcFileHash(pi) { | ||
const hashBase = pi.version + '_' + pi.entryPoint; | ||
const hash = crypto_1.default | ||
.createHash('sha256') | ||
.update(hashBase) | ||
.digest('base64') | ||
.replace(/\//g, '_') | ||
.replace(/\+/g, '-') | ||
.replace(/=/g, '') | ||
.substring(0, 10); | ||
return hash; | ||
} | ||
function copyFileIfExists(cachedFile, fullOutputPath) { | ||
@@ -100,0 +116,0 @@ fs.mkdirSync(path.dirname(fullOutputPath), { recursive: true }); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isInSkipList = exports.prepareSkipList = exports.PREPARED_DEFAULT_SKIP_LIST = exports.DEFAULT_SKIP_LIST = void 0; | ||
exports.PREPARED_DEFAULT_SKIP_LIST = exports.DEFAULT_SKIP_LIST = void 0; | ||
exports.prepareSkipList = prepareSkipList; | ||
exports.isInSkipList = isInSkipList; | ||
exports.DEFAULT_SKIP_LIST = [ | ||
@@ -34,3 +36,2 @@ '@softarc/native-federation-runtime', | ||
} | ||
exports.prepareSkipList = prepareSkipList; | ||
function isInSkipList(entry, skipList) { | ||
@@ -48,3 +49,2 @@ if (skipList.strings.has(entry)) { | ||
} | ||
exports.isInSkipList = isInSkipList; | ||
//# sourceMappingURL=default-skip-list.js.map |
@@ -15,4 +15,4 @@ "use strict"; | ||
function init(params) { | ||
var _a; | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
var _a; | ||
(0, build_adapter_1.setBuildAdapter)(params.adapter); | ||
@@ -28,4 +28,4 @@ fedOptions = params.options; | ||
} | ||
function build(buildParams = build_for_federation_1.defaultBuildParams) { | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
function build() { | ||
return tslib_1.__awaiter(this, arguments, void 0, function* (buildParams = build_for_federation_1.defaultBuildParams) { | ||
fedInfo = yield (0, build_for_federation_1.buildForFederation)(config, fedOptions, externals, buildParams); | ||
@@ -32,0 +32,0 @@ }); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getExternals = void 0; | ||
exports.getExternals = getExternals; | ||
// import { isInSkipList, PREPARED_DEFAULT_SKIP_LIST } from './default-skip-list'; | ||
@@ -12,3 +12,2 @@ function getExternals(config) { | ||
} | ||
exports.getExternals = getExternals; | ||
//# sourceMappingURL=get-externals.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.loadFederationConfig = void 0; | ||
exports.loadFederationConfig = loadFederationConfig; | ||
const tslib_1 = require("tslib"); | ||
@@ -17,3 +17,2 @@ const path = tslib_1.__importStar(require("path")); | ||
} | ||
exports.loadFederationConfig = loadFederationConfig; | ||
//# sourceMappingURL=load-federation-config.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.writeFederationInfo = void 0; | ||
exports.writeFederationInfo = writeFederationInfo; | ||
const tslib_1 = require("tslib"); | ||
@@ -11,3 +11,2 @@ const path = tslib_1.__importStar(require("path")); | ||
} | ||
exports.writeFederationInfo = writeFederationInfo; | ||
//# sourceMappingURL=write-federation-info.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.writeImportMap = void 0; | ||
exports.writeImportMap = writeImportMap; | ||
const tslib_1 = require("tslib"); | ||
@@ -15,3 +15,2 @@ const path = tslib_1.__importStar(require("path")); | ||
} | ||
exports.writeImportMap = writeImportMap; | ||
//# sourceMappingURL=write-import-map.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.lookupInResultMap = exports.createBuildResultMap = void 0; | ||
exports.createBuildResultMap = createBuildResultMap; | ||
exports.lookupInResultMap = lookupInResultMap; | ||
const tslib_1 = require("tslib"); | ||
@@ -22,3 +23,2 @@ const path_1 = tslib_1.__importDefault(require("path")); | ||
} | ||
exports.createBuildResultMap = createBuildResultMap; | ||
function lookupInResultMap(map, requestName) { | ||
@@ -28,3 +28,2 @@ const key = path_1.default.basename(requestName); | ||
} | ||
exports.lookupInResultMap = lookupInResultMap; | ||
//# sourceMappingURL=build-result-map.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.bundle = void 0; | ||
exports.bundle = bundle; | ||
const tslib_1 = require("tslib"); | ||
@@ -12,3 +12,2 @@ const build_adapter_1 = require("../core/build-adapter"); | ||
} | ||
exports.bundle = bundle; | ||
//# sourceMappingURL=build-utils.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.copySrcMapIfExists = void 0; | ||
exports.copySrcMapIfExists = copySrcMapIfExists; | ||
const tslib_1 = require("tslib"); | ||
@@ -13,3 +13,2 @@ const fs = tslib_1.__importStar(require("fs")); | ||
} | ||
exports.copySrcMapIfExists = copySrcMapIfExists; | ||
//# sourceMappingURL=copy-src-map-if-exists.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.hashFile = void 0; | ||
exports.hashFile = hashFile; | ||
const tslib_1 = require("tslib"); | ||
@@ -13,3 +13,2 @@ const crypto = tslib_1.__importStar(require("crypto")); | ||
} | ||
exports.hashFile = hashFile; | ||
//# sourceMappingURL=hash-file.js.map |
@@ -10,2 +10,2 @@ import { LogLevels } from 'npmlog'; | ||
}; | ||
export declare const setLogLevel: (level: LogLevels | 'debug') => void; | ||
export declare const setLogLevel: (level: LogLevels | "debug") => void; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getMappedPaths = void 0; | ||
exports.getMappedPaths = getMappedPaths; | ||
const tslib_1 = require("tslib"); | ||
@@ -37,3 +37,2 @@ const path = tslib_1.__importStar(require("path")); | ||
} | ||
exports.getMappedPaths = getMappedPaths; | ||
//# sourceMappingURL=mapped-paths.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.normalize = void 0; | ||
exports.normalize = normalize; | ||
function normalize(path, trailingSlash) { | ||
@@ -17,3 +17,2 @@ let cand = path.replace(/\\/g, '/'); | ||
} | ||
exports.normalize = normalize; | ||
//# sourceMappingURL=normalize.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports._getPackageInfo = exports.findDepPackageJson = exports.getPackageJsonFiles = exports.getVersionMaps = exports.getPackageInfo = exports.expandFolders = exports.findPackageJsonFiles = void 0; | ||
exports.findPackageJsonFiles = findPackageJsonFiles; | ||
exports.expandFolders = expandFolders; | ||
exports.getPackageInfo = getPackageInfo; | ||
exports.getVersionMaps = getVersionMaps; | ||
exports.getPackageJsonFiles = getPackageJsonFiles; | ||
exports.findDepPackageJson = findDepPackageJson; | ||
exports._getPackageInfo = _getPackageInfo; | ||
const tslib_1 = require("tslib"); | ||
@@ -15,3 +21,2 @@ const fs = tslib_1.__importStar(require("fs")); | ||
} | ||
exports.findPackageJsonFiles = findPackageJsonFiles; | ||
function expandFolders(child, parent) { | ||
@@ -36,3 +41,2 @@ const result = []; | ||
} | ||
exports.expandFolders = expandFolders; | ||
function getPackageInfo(packageName, workspaceRoot) { | ||
@@ -50,3 +54,2 @@ workspaceRoot = (0, normalize_1.normalize)(workspaceRoot, true); | ||
} | ||
exports.getPackageInfo = getPackageInfo; | ||
function getVersionMapCacheKey(project, workspace) { | ||
@@ -58,3 +61,2 @@ return `${project}**${workspace}`; | ||
} | ||
exports.getVersionMaps = getVersionMaps; | ||
function getPackageJsonFiles(project, workspace) { | ||
@@ -78,3 +80,2 @@ const cacheKey = getVersionMapCacheKey(project, workspace); | ||
} | ||
exports.getPackageJsonFiles = getPackageJsonFiles; | ||
function findDepPackageJson(packageName, projectRoot) { | ||
@@ -101,3 +102,2 @@ const mainPkgName = getPkgFolder(packageName); | ||
} | ||
exports.findDepPackageJson = findDepPackageJson; | ||
function _getPackageInfo(packageName, directory) { | ||
@@ -273,3 +273,2 @@ var _a, _b, _c, _d, _e, _f, _g; | ||
} | ||
exports._getPackageInfo = _getPackageInfo; | ||
function readJson(mainPkgJsonPath) { | ||
@@ -276,0 +275,0 @@ return JSON.parse(fs.readFileSync(mainPkgJsonPath, 'utf-8')); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
118869
1455
+ Added@softarc/native-federation-runtime@2.0.10(transitive)
- Removed@softarc/native-federation-runtime@2.0.9(transitive)