@ms-cloudpack/config
Advanced tools
Comparing version 0.9.1 to 0.10.0
import { getPackageSettings } from './getPackageSettings.js'; | ||
import { getExportsMap } from '@ms-cloudpack/package-utilities'; | ||
/** | ||
@@ -7,3 +8,3 @@ * Creates a transform to be registered with a PackageDefinitions registry for applying overrides to from the config | ||
export function createPackageOverrideTransform(config) { | ||
return (packageDefinition) => { | ||
return async (packageDefinition, packagePath, packages) => { | ||
const { name = '', version = '' } = packageDefinition; | ||
@@ -14,12 +15,9 @@ const { userPackageSettings, generatedPackageSettings } = getPackageSettings({ name, version, config }); | ||
} | ||
const result = { ...packageDefinition }; | ||
// If we have a custom exports map for the package, apply it. | ||
if (userPackageSettings?.exports) { | ||
result.exports = userPackageSettings.exports; | ||
} | ||
const result = { | ||
...packageDefinition, | ||
exports: userPackageSettings?.exports || (await getExportsMap({ packagePath, disableTransforms: true }, { packages })), | ||
}; | ||
// If we have generated overrides, apply them. | ||
if (generatedPackageSettings?.exports) { | ||
result.exports = result.exports | ||
? [result.exports, generatedPackageSettings.exports] | ||
: generatedPackageSettings.exports; | ||
result.exports = [result.exports, generatedPackageSettings.exports]; | ||
} | ||
@@ -26,0 +24,0 @@ // If we have included dependencies, add them. |
@@ -30,3 +30,8 @@ import type { DevServer } from './DevServer.js'; | ||
packageSettings?: PackageSettings[]; | ||
/** | ||
* An optional list of commands (followed by a string array of args for that command) | ||
* to be executed prior to Cloudpack bundle | ||
*/ | ||
dependsOn?: [string, string[]][]; | ||
} | ||
//# sourceMappingURL=UserConfig.d.ts.map |
{ | ||
"name": "@ms-cloudpack/config", | ||
"version": "0.9.1", | ||
"version": "0.10.0", | ||
"description": "Configuration handling for cloudpack.", | ||
@@ -16,6 +16,6 @@ "license": "MIT", | ||
"dependencies": { | ||
"@ms-cloudpack/bundler-types": "^0.16.0", | ||
"@ms-cloudpack/create-express-app": "^1.3.8", | ||
"@ms-cloudpack/bundler-types": "^0.17.0", | ||
"@ms-cloudpack/create-express-app": "^1.3.9", | ||
"@ms-cloudpack/json-utilities": "^0.0.7", | ||
"@ms-cloudpack/package-utilities": "^5.0.2", | ||
"@ms-cloudpack/package-utilities": "^5.1.0", | ||
"semver": "^7.3.7" | ||
@@ -22,0 +22,0 @@ }, |
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
72878
621
+ Added@ms-cloudpack/bundler-types@0.17.0(transitive)
- Removed@ms-cloudpack/bundler-types@0.16.0(transitive)