@ms-cloudpack/config
Advanced tools
Comparing version 0.20.18 to 0.21.0
@@ -9,2 +9,12 @@ export function compareSettings(a, b) { | ||
const isBString = typeof bMatch === 'string'; | ||
// Handle empty matches. | ||
if (!aMatch) { | ||
if (!bMatch) { | ||
return 0; | ||
} | ||
return -1; | ||
} | ||
if (!bMatch) { | ||
return 1; | ||
} | ||
// Place string matches at the beginning of the list. | ||
@@ -11,0 +21,0 @@ if (isAString && isBString) { |
import { PackageDefinitions } from '@ms-cloudpack/package-utilities'; | ||
import { createPackageOverrideTransform } from './createPackageOverrideTransform.js'; | ||
import { createPackageDefaultExportsMapTransform } from './createPackageDefaultExportsMapTransform.js'; | ||
import { createPackageSettingsTransform } from './createPackageSettingsTransform.js'; | ||
/** | ||
@@ -11,6 +10,5 @@ * Given a Cloudpack config, create a package definitions cache with transforms resulting from settings defined | ||
const packages = new PackageDefinitions(undefined, config); | ||
packages.registerTransform((newConfig) => createPackageOverrideTransform(newConfig)); | ||
packages.registerTransform((newConfig) => createPackageDefaultExportsMapTransform(newConfig)); | ||
packages.registerTransform((newConfig) => createPackageSettingsTransform(newConfig)); | ||
return packages; | ||
} | ||
//# sourceMappingURL=createPackageDefinitions.js.map |
@@ -19,3 +19,3 @@ import { getPackageSettings } from './getPackageSettings.js'; | ||
let { generatedPackageSettings } = getPackageSettings({ | ||
config: { generated: { packageSettings } }, | ||
config: { mode: 'library', generated: { packageSettings } }, | ||
name, | ||
@@ -22,0 +22,0 @@ version, |
@@ -34,3 +34,6 @@ import { satisfies } from 'semver'; | ||
let matchName, matchVersion; | ||
if (typeof match === 'string') { | ||
if (!match) { | ||
return true; | ||
} | ||
else if (typeof match === 'string') { | ||
matchName = match; | ||
@@ -37,0 +40,0 @@ } |
@@ -1,6 +0,6 @@ | ||
import type { CloudpackConfig } from '@ms-cloudpack/common-types'; | ||
import type { BundleMode, CloudpackConfig } from '@ms-cloudpack/common-types'; | ||
/** | ||
* Reads the config file asynchronously (and merges generated config into the result.) | ||
*/ | ||
export declare function readConfig(appPath: string): Promise<CloudpackConfig>; | ||
export declare function readConfig(appPath: string, mode?: BundleMode): Promise<CloudpackConfig>; | ||
//# sourceMappingURL=readConfig.d.ts.map |
@@ -7,5 +7,6 @@ import { processConfig } from './processConfig.js'; | ||
*/ | ||
export async function readConfig(appPath) { | ||
export async function readConfig(appPath, mode = 'library') { | ||
const [AppConfig, generatedConfig] = await Promise.all([readAppConfig(appPath), readGeneratedConfig(appPath)]); | ||
const config = { | ||
mode, | ||
generated: generatedConfig, | ||
@@ -12,0 +13,0 @@ ...AppConfig, |
{ | ||
"name": "@ms-cloudpack/config", | ||
"version": "0.20.18", | ||
"version": "0.21.0", | ||
"description": "Configuration handling for cloudpack.", | ||
@@ -17,5 +17,5 @@ "license": "MIT", | ||
"dependencies": { | ||
"@ms-cloudpack/common-types": "^0.7.2", | ||
"@ms-cloudpack/common-types": "^0.8.0", | ||
"@ms-cloudpack/json-utilities": "^0.1.4", | ||
"@ms-cloudpack/package-utilities": "^7.5.4", | ||
"@ms-cloudpack/package-utilities": "^7.6.0", | ||
"import-meta-resolve": "^4.0.0", | ||
@@ -22,0 +22,0 @@ "merge": "^2.1.1", |
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
89991
734
95
+ Added@ms-cloudpack/common-types@0.8.2(transitive)
- Removed@ms-cloudpack/common-types@0.7.2(transitive)