@ms-cloudpack/config 0.38.19 → 0.38.21
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/lib/getConfigPath.js +1 -1
- package/lib/getConfigPath.js.map +1 -1
- package/package.json +4 -4
package/lib/getConfigPath.js
CHANGED
|
@@ -7,7 +7,7 @@ import { appConfigFileName, appConfigFileNamesJS, generatedConfigFileName } from
|
|
|
7
7
|
*/
|
|
8
8
|
export function getConfigPath(cwd, customConfigFileName) {
|
|
9
9
|
if (customConfigFileName) {
|
|
10
|
-
const customConfigPath = path.
|
|
10
|
+
const customConfigPath = path.resolve(cwd, customConfigFileName);
|
|
11
11
|
return {
|
|
12
12
|
defaultAppConfigPath: customConfigPath,
|
|
13
13
|
appConfigPaths: [customConfigPath],
|
package/lib/getConfigPath.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getConfigPath.js","sourceRoot":"","sources":["../src/getConfigPath.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAElG;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAC3B,GAAW,EACX,oBAA6B;IAQ7B,IAAI,oBAAoB,EAAE,CAAC;QACzB,MAAM,gBAAgB,GAAG,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"getConfigPath.js","sourceRoot":"","sources":["../src/getConfigPath.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAElG;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAC3B,GAAW,EACX,oBAA6B;IAQ7B,IAAI,oBAAoB,EAAE,CAAC;QACzB,MAAM,gBAAgB,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,oBAAoB,CAAC,CAAC;QACjE,OAAO;YACL,oBAAoB,EAAE,gBAAgB;YACtC,cAAc,EAAE,CAAC,gBAAgB,CAAC;YAClC,mBAAmB,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,uBAAuB,CAAC;SAC7D,CAAC;IACJ,CAAC;IAED,MAAM,oBAAoB,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC;IAC/D,OAAO;QACL,oBAAoB;QACpB,cAAc,EAAE,CAAC,oBAAoB,EAAE,GAAG,oBAAoB,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;QAC3G,mBAAmB,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,uBAAuB,CAAC;KAC7D,CAAC;AACJ,CAAC","sourcesContent":["import path from 'path';\nimport { appConfigFileName, appConfigFileNamesJS, generatedConfigFileName } from './constants.js';\n\n/**\n * Get config paths for the app at `cwd`.\n * @param cwd - base path of the config file\n * @param customConfigFileName - optional custom config file name to use instead of defaults\n */\nexport function getConfigPath(\n cwd: string,\n customConfigFileName?: string,\n): {\n /** Default JSON app config path */\n defaultAppConfigPath: string;\n /** All app config paths including JSON and JS */\n appConfigPaths: string[];\n generatedConfigPath: string;\n} {\n if (customConfigFileName) {\n const customConfigPath = path.resolve(cwd, customConfigFileName);\n return {\n defaultAppConfigPath: customConfigPath,\n appConfigPaths: [customConfigPath],\n generatedConfigPath: path.join(cwd, generatedConfigFileName),\n };\n }\n\n const defaultAppConfigPath = path.join(cwd, appConfigFileName);\n return {\n defaultAppConfigPath,\n appConfigPaths: [defaultAppConfigPath, ...appConfigFileNamesJS.map((fileName) => path.join(cwd, fileName))],\n generatedConfigPath: path.join(cwd, generatedConfigFileName),\n };\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/config",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.21",
|
|
4
4
|
"description": "Configuration handling for Cloudpack",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
"test": "cloudpack-scripts test"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@ms-cloudpack/common-types": "^0.33.
|
|
27
|
+
"@ms-cloudpack/common-types": "^0.33.1",
|
|
28
28
|
"@ms-cloudpack/environment": "^0.1.1",
|
|
29
29
|
"@ms-cloudpack/json-utilities": "^0.1.11",
|
|
30
|
-
"@ms-cloudpack/package-utilities": "^13.2.
|
|
30
|
+
"@ms-cloudpack/package-utilities": "^13.2.5",
|
|
31
31
|
"@ms-cloudpack/path-string-parsing": "^1.2.7",
|
|
32
|
-
"@ms-cloudpack/path-utilities": "^3.2.
|
|
32
|
+
"@ms-cloudpack/path-utilities": "^3.2.2",
|
|
33
33
|
"semver": "^7.6.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|