@ms-cloudpack/config
Advanced tools
Comparing version 0.19.8 to 0.20.0
@@ -1,3 +0,3 @@ | ||
import type { UserConfig } from '@ms-cloudpack/common-types'; | ||
export declare const configTemplate: UserConfig; | ||
import type { AppConfig } from '@ms-cloudpack/common-types'; | ||
export declare const configTemplate: AppConfig; | ||
//# sourceMappingURL=configTemplate.d.ts.map |
@@ -1,3 +0,3 @@ | ||
export declare const userConfigFileName = "cloudpack.config.json"; | ||
export declare const appConfigFileName = "cloudpack.config.json"; | ||
export declare const generatedConfigFileName = "cloudpack.generated.json"; | ||
//# sourceMappingURL=constants.d.ts.map |
@@ -1,3 +0,3 @@ | ||
export const userConfigFileName = 'cloudpack.config.json'; | ||
export const appConfigFileName = 'cloudpack.config.json'; | ||
export const generatedConfigFileName = 'cloudpack.generated.json'; | ||
//# sourceMappingURL=constants.js.map |
@@ -6,5 +6,5 @@ /** | ||
export declare function getConfigPath(cwd: string): { | ||
userConfigPath: string; | ||
appConfigPath: string; | ||
generatedConfigPath: string; | ||
}; | ||
//# sourceMappingURL=getConfigPath.d.ts.map |
import path from 'path'; | ||
import { userConfigFileName, generatedConfigFileName } from './constants.js'; | ||
import { appConfigFileName, generatedConfigFileName } from './constants.js'; | ||
/** | ||
@@ -9,3 +9,3 @@ * @param cwd - base path of the config file | ||
return { | ||
userConfigPath: path.join(cwd, userConfigFileName), | ||
appConfigPath: path.join(cwd, appConfigFileName), | ||
generatedConfigPath: path.join(cwd, generatedConfigFileName), | ||
@@ -12,0 +12,0 @@ }; |
export { configTemplate } from './configTemplate.js'; | ||
export { generatedConfigFileName, userConfigFileName } from './constants.js'; | ||
export { generatedConfigFileName, appConfigFileName } from './constants.js'; | ||
export { createPackageDefinitions } from './createPackageDefinitions.js'; | ||
@@ -8,5 +8,5 @@ export { getConfigPath } from './getConfigPath.js'; | ||
export { readGeneratedConfig } from './readGeneratedConfig.js'; | ||
export { readUserConfig } from './readUserConfig.js'; | ||
export { readAppConfig } from './readAppConfig.js'; | ||
export { writeGeneratedConfig } from './writeGeneratedConfig.js'; | ||
export { writeUserConfig } from './writeUserConfig.js'; | ||
export { writeAppConfig } from './writeAppConfig.js'; | ||
//# sourceMappingURL=index.d.ts.map |
export { configTemplate } from './configTemplate.js'; | ||
export { generatedConfigFileName, userConfigFileName } from './constants.js'; | ||
export { generatedConfigFileName, appConfigFileName } from './constants.js'; | ||
export { createPackageDefinitions } from './createPackageDefinitions.js'; | ||
@@ -8,5 +8,5 @@ export { getConfigPath } from './getConfigPath.js'; | ||
export { readGeneratedConfig } from './readGeneratedConfig.js'; | ||
export { readUserConfig } from './readUserConfig.js'; | ||
export { readAppConfig } from './readAppConfig.js'; | ||
export { writeGeneratedConfig } from './writeGeneratedConfig.js'; | ||
export { writeUserConfig } from './writeUserConfig.js'; | ||
export { writeAppConfig } from './writeAppConfig.js'; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import type { UserConfig } from '@ms-cloudpack/common-types'; | ||
import type { AppConfig } from '@ms-cloudpack/common-types'; | ||
/** | ||
@@ -6,5 +6,5 @@ * Merge the configs. Later parent configs override earlier ones. | ||
export declare function mergeParentConfig(params: { | ||
userConfig: UserConfig; | ||
parentConfigs: UserConfig[]; | ||
}): UserConfig; | ||
AppConfig: AppConfig; | ||
parentConfigs: AppConfig[]; | ||
}): AppConfig; | ||
//# sourceMappingURL=mergeParentConfig.d.ts.map |
@@ -6,3 +6,3 @@ import { recursive as recursiveMerge } from 'merge'; | ||
export function mergeParentConfig(params) { | ||
const configs = [...params.parentConfigs, params.userConfig]; | ||
const configs = [...params.parentConfigs, params.AppConfig]; | ||
// NOTE: This must merge into an empty object to avoid modifying the originals | ||
@@ -9,0 +9,0 @@ const result = recursiveMerge({}, ...configs); |
import { processConfig } from './processConfig.js'; | ||
import { readUserConfig } from './readUserConfig.js'; | ||
import { readAppConfig } from './readAppConfig.js'; | ||
import { readGeneratedConfig } from './readGeneratedConfig.js'; | ||
@@ -8,6 +8,6 @@ /** | ||
export async function readConfig(appPath) { | ||
const [userConfig, generatedConfig] = await Promise.all([readUserConfig(appPath), readGeneratedConfig(appPath)]); | ||
const [AppConfig, generatedConfig] = await Promise.all([readAppConfig(appPath), readGeneratedConfig(appPath)]); | ||
const config = { | ||
generated: generatedConfig, | ||
...userConfig, | ||
...AppConfig, | ||
}; | ||
@@ -14,0 +14,0 @@ processConfig(config.generated); |
/** unpkg URL for the GeneratedConfig JSON schema */ | ||
export declare const generatedUserConfigSchemaUrl = "https://unpkg.com/@ms-cloudpack/common-types/schema/GeneratedConfig.json"; | ||
/** unpkg URL for the UserConfig JSON schema */ | ||
export declare const userConfigSchemaUrl = "https://unpkg.com/@ms-cloudpack/common-types/schema/UserConfig.json"; | ||
export declare const generatedAppConfigSchemaUrl = "https://unpkg.com/@ms-cloudpack/common-types/schema/GeneratedConfig.json"; | ||
/** unpkg URL for the AppConfig JSON schema */ | ||
export declare const appConfigSchemaUrl = "https://unpkg.com/@ms-cloudpack/common-types/schema/AppConfig.json"; | ||
//# sourceMappingURL=schemaUrls.d.ts.map |
const schemaPrefix = 'https://unpkg.com/@ms-cloudpack/common-types/schema'; | ||
/** unpkg URL for the GeneratedConfig JSON schema */ | ||
export const generatedUserConfigSchemaUrl = `${schemaPrefix}/GeneratedConfig.json`; | ||
/** unpkg URL for the UserConfig JSON schema */ | ||
export const userConfigSchemaUrl = `${schemaPrefix}/UserConfig.json`; | ||
export const generatedAppConfigSchemaUrl = `${schemaPrefix}/GeneratedConfig.json`; | ||
/** unpkg URL for the AppConfig JSON schema */ | ||
export const appConfigSchemaUrl = `${schemaPrefix}/AppConfig.json`; | ||
//# sourceMappingURL=schemaUrls.js.map |
@@ -5,3 +5,3 @@ import { writeJson } from '@ms-cloudpack/json-utilities'; | ||
import { compareOverrides } from './compareOverrides.js'; | ||
import { generatedUserConfigSchemaUrl } from './schemaUrls.js'; | ||
import { generatedAppConfigSchemaUrl } from './schemaUrls.js'; | ||
/** | ||
@@ -18,3 +18,3 @@ * Writes generated config. This is used for `init` to provide package overrides needed. | ||
return writeJson(generatedConfigPath, { | ||
$schema: generatedUserConfigSchemaUrl, | ||
$schema: generatedAppConfigSchemaUrl, | ||
...rest, | ||
@@ -21,0 +21,0 @@ packageSettings: sortedSettings, |
{ | ||
"name": "@ms-cloudpack/config", | ||
"version": "0.19.8", | ||
"version": "0.20.0", | ||
"description": "Configuration handling for cloudpack.", | ||
@@ -17,5 +17,5 @@ "license": "MIT", | ||
"dependencies": { | ||
"@ms-cloudpack/common-types": "^0.3.0", | ||
"@ms-cloudpack/common-types": "^0.4.0", | ||
"@ms-cloudpack/json-utilities": "^0.1.4", | ||
"@ms-cloudpack/package-utilities": "^7.3.0", | ||
"@ms-cloudpack/package-utilities": "^7.3.1", | ||
"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
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
72461
+ Added@ms-cloudpack/common-types@0.4.0(transitive)
- Removed@ms-cloudpack/common-types@0.3.0(transitive)