@ms-cloudpack/config 0.34.2 → 0.35.1
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.
|
@@ -40,13 +40,13 @@ export declare const builtInSettings: {
|
|
|
40
40
|
readonly bundlerOptions?: {
|
|
41
41
|
readonly [x: string]: unknown;
|
|
42
42
|
} | undefined;
|
|
43
|
-
readonly inputPaths?: readonly string[] | undefined;
|
|
44
43
|
readonly inlinedDependencies?: readonly string[] | undefined;
|
|
45
44
|
readonly unsafeCjsExportNames?: {
|
|
46
45
|
readonly [x: string]: readonly string[];
|
|
47
46
|
} | undefined;
|
|
48
47
|
readonly bundler?: string | undefined;
|
|
49
48
|
readonly bundlerType?: string | undefined;
|
|
49
|
+
readonly inputPaths?: readonly string[] | undefined;
|
|
50
50
|
readonly ignoredBundlerWarnings?: readonly string[] | undefined;
|
|
51
51
|
readonly bundlerCapabilities?: {
|
|
52
52
|
readonly [x: string]: boolean | object;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mergePackageSettings.d.ts","sourceRoot":"","sources":["../../src/packageSettings/mergePackageSettings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"mergePackageSettings.d.ts","sourceRoot":"","sources":["../../src/packageSettings/mergePackageSettings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAI5F;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,SAAS,OAAO,CAAC,eAAe,GAAG,wBAAwB,CAAC,EACxG,QAAQ,EAAE,SAAS,EAAE,GACpB,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAgC1B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { mergeObjects, mergeArrayDefaults } from '@ms-cloudpack/package-utilities';
|
|
2
|
-
|
|
2
|
+
import { sourceFilesGlobs } from '@ms-cloudpack/path-utilities';
|
|
3
3
|
/**
|
|
4
4
|
* Merges package settings together.
|
|
5
5
|
*
|
|
@@ -29,11 +29,11 @@ export function mergePackageSettings(settings) {
|
|
|
29
29
|
}
|
|
30
30
|
return acc;
|
|
31
31
|
},
|
|
32
|
-
inputPaths: (acc = [], curr = []) => {
|
|
33
|
-
return [...acc, ...mergeArrayDefaults(curr, defaultInputPaths)];
|
|
34
|
-
},
|
|
35
32
|
},
|
|
36
33
|
});
|
|
34
|
+
if (result.inputPaths?.length) {
|
|
35
|
+
result.inputPaths = mergeArrayDefaults(Array.from(new Set(result.inputPaths)), sourceFilesGlobs);
|
|
36
|
+
}
|
|
37
37
|
delete result.match;
|
|
38
38
|
return result;
|
|
39
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mergePackageSettings.js","sourceRoot":"","sources":["../../src/packageSettings/mergePackageSettings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"mergePackageSettings.js","sourceRoot":"","sources":["../../src/packageSettings/mergePackageSettings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAClC,QAAqB;IAErB,mFAAmF;IACnF,qEAAqE;IACrE,MAAM,MAAM,GAAG,YAAY,CAAC,QAAsC,EAAE;QAClE,4FAA4F;QAC5F,aAAa,EAAE,CAAC,sBAAsB,EAAE,gBAAgB,EAAE,OAAO,CAAC;QAClE,WAAW,EAAE;YACX,OAAO,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;gBACrB,6EAA6E;gBAC7E,IAAI,CAAC,GAAG,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;oBAC1B,8EAA8E;oBAC9E,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;gBAChD,CAAC;gBAED,IAAI,IAAI,EAAE,CAAC;oBACT,uEAAuE;oBACvE,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;oBACpD,uBAAuB;oBACvB,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBACrD,CAAC;gBAED,OAAO,GAAG,CAAC;YACb,CAAC;SACF;KACF,CAAC,CAAC;IAEH,IAAI,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC;QAC9B,MAAM,CAAC,UAAU,GAAG,kBAAkB,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC;IACnG,CAAC;IAED,OAAO,MAAM,CAAC,KAAK,CAAC;IACpB,OAAO,MAAmB,CAAC;AAC7B,CAAC","sourcesContent":["import type { GeneratedPackageSettings, PackageSettings } from '@ms-cloudpack/common-types';\nimport { mergeObjects, mergeArrayDefaults } from '@ms-cloudpack/package-utilities';\nimport { sourceFilesGlobs } from '@ms-cloudpack/path-utilities';\n\n/**\n * Merges package settings together.\n *\n * TODO: This \"merges\" exports maps by concatenating them in an array, which is not correct per the\n * spec in Node. However, merging them properly is much more difficult to implement (depends on the\n * conditions that will be applied at the time the map is used), so more thought would be required\n * for how to handle multiple exports maps properly.\n */\nexport function mergePackageSettings<TSettings extends Partial<PackageSettings | GeneratedPackageSettings>>(\n settings: TSettings[],\n): Omit<TSettings, 'match'> {\n // Use PackageSettings as the type while merging so that the key-based typings work\n // (if the key is not present in generated settings, it does nothing)\n const result = mergeObjects(settings as Partial<PackageSettings>[], {\n // match is deleted after merging, so it is best to overwrite it to avoid merging conflicts.\n overwriteKeys: ['ignoreMissingExports', 'bundlerOptions', 'match'],\n customMerge: {\n exports: (acc, curr) => {\n // Use the current setting if it's explicitly null or was previously not set.\n if (!acc || curr === null) {\n // Make a copy if it's an array, so later additions don't affect the original.\n return Array.isArray(curr) ? [...curr] : curr;\n }\n\n if (curr) {\n // If we have previous exports but it's not an array, make it an array.\n acc = acc ? (Array.isArray(acc) ? acc : [acc]) : [];\n // Add the new exports.\n acc.push(...(Array.isArray(curr) ? curr : [curr]));\n }\n\n return acc;\n },\n },\n });\n\n if (result.inputPaths?.length) {\n result.inputPaths = mergeArrayDefaults(Array.from(new Set(result.inputPaths)), sourceFilesGlobs);\n }\n\n delete result.match;\n return result as TSettings;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.1",
|
|
4
4
|
"description": "Configuration handling for cloudpack.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"@ms-cloudpack/common-types": "^0.24.16",
|
|
18
18
|
"@ms-cloudpack/environment": "^0.1.1",
|
|
19
19
|
"@ms-cloudpack/json-utilities": "^0.1.10",
|
|
20
|
-
"@ms-cloudpack/package-utilities": "^12.3.
|
|
20
|
+
"@ms-cloudpack/package-utilities": "^12.3.4",
|
|
21
21
|
"@ms-cloudpack/path-string-parsing": "^1.2.7",
|
|
22
|
-
"@ms-cloudpack/path-utilities": "^3.
|
|
22
|
+
"@ms-cloudpack/path-utilities": "^3.1.1",
|
|
23
23
|
"semver": "^7.6.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|