@salesforce/packaging 3.0.9 → 3.0.10
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.
|
@@ -8,8 +8,9 @@ exports.PackageProfileApi = void 0;
|
|
|
8
8
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
9
|
*/
|
|
10
10
|
const path = require("node:path");
|
|
11
|
+
const os = require("node:os");
|
|
11
12
|
const fs = require("node:fs");
|
|
12
|
-
const
|
|
13
|
+
const globby = require("globby");
|
|
13
14
|
const core_1 = require("@salesforce/core");
|
|
14
15
|
const kit_1 = require("@salesforce/kit");
|
|
15
16
|
const profileRewriter_1 = require("./profileRewriter");
|
|
@@ -85,12 +86,14 @@ class PackageProfileApi extends kit_1.AsyncCreatable {
|
|
|
85
86
|
}
|
|
86
87
|
// Look for profiles in all package directories
|
|
87
88
|
findAllProfiles(excludedDirectories = []) {
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
.
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
.
|
|
89
|
+
const ignore = excludedDirectories.map((dir) => `**/${dir.split(path.sep).join(path.posix.sep)}/**`);
|
|
90
|
+
const patterns = this.project
|
|
91
|
+
.getUniquePackageDirectories()
|
|
92
|
+
.map((pDir) => pDir.fullPath)
|
|
93
|
+
.map((fullDir) => os.type() === 'Windows_NT'
|
|
94
|
+
? path.posix.join(...fullDir.split(path.sep), '**', '*.profile-meta.xml')
|
|
95
|
+
: path.join(fullDir, '**', '*.profile-meta.xml'));
|
|
96
|
+
return globby.sync(patterns, { ignore });
|
|
94
97
|
}
|
|
95
98
|
getProfilesWithNamesAndPaths(excludedDirectories) {
|
|
96
99
|
return this.findAllProfiles(excludedDirectories)
|