@salesforce/source-deploy-retrieve 5.0.0-orb.2 → 5.0.2
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/CHANGELOG.md +186 -101
- package/LICENSE.txt +12 -0
- package/README.md +2 -2
- package/lib/src/client/deployStrategies/auraDeploy.d.ts +2 -2
- package/lib/src/client/deployStrategies/auraDeploy.js +99 -109
- package/lib/src/client/deployStrategies/auraDeploy.js.map +1 -1
- package/lib/src/client/deployStrategies/baseDeploy.d.ts +1 -1
- package/lib/src/client/deployStrategies/baseDeploy.js +37 -38
- package/lib/src/client/deployStrategies/baseDeploy.js.map +1 -1
- package/lib/src/client/deployStrategies/containerDeploy.d.ts +2 -2
- package/lib/src/client/deployStrategies/containerDeploy.js +58 -73
- package/lib/src/client/deployStrategies/containerDeploy.js.map +1 -1
- package/lib/src/client/deployStrategies/index.js +4 -3
- package/lib/src/client/deployStrategies/index.js.map +1 -1
- package/lib/src/client/deployStrategies/lwcDeploy.d.ts +2 -2
- package/lib/src/client/deployStrategies/lwcDeploy.js +98 -109
- package/lib/src/client/deployStrategies/lwcDeploy.js.map +1 -1
- package/lib/src/client/diagnosticUtil.d.ts +1 -1
- package/lib/src/client/diagnosticUtil.js +11 -11
- package/lib/src/client/diagnosticUtil.js.map +1 -1
- package/lib/src/client/index.d.ts +1 -1
- package/lib/src/client/index.js +1 -1
- package/lib/src/client/index.js.map +1 -1
- package/lib/src/client/metadataApiDeploy.d.ts +4 -4
- package/lib/src/client/metadataApiDeploy.js +57 -73
- package/lib/src/client/metadataApiDeploy.js.map +1 -1
- package/lib/src/client/metadataApiRetrieve.d.ts +10 -3
- package/lib/src/client/metadataApiRetrieve.js +102 -111
- package/lib/src/client/metadataApiRetrieve.js.map +1 -1
- package/lib/src/client/metadataTransfer.d.ts +2 -2
- package/lib/src/client/metadataTransfer.js +102 -118
- package/lib/src/client/metadataTransfer.js.map +1 -1
- package/lib/src/client/retrieveUtil.d.ts +1 -1
- package/lib/src/client/retrieveUtil.js +17 -17
- package/lib/src/client/retrieveUtil.js.map +1 -1
- package/lib/src/client/toolingApi.d.ts +2 -2
- package/lib/src/client/toolingApi.js +71 -94
- package/lib/src/client/toolingApi.js.map +1 -1
- package/lib/src/client/types.js +1 -14
- package/lib/src/client/types.js.map +1 -1
- package/lib/src/collections/componentSet.d.ts +16 -10
- package/lib/src/collections/componentSet.js +160 -114
- package/lib/src/collections/componentSet.js.map +1 -1
- package/lib/src/collections/index.js +1 -0
- package/lib/src/collections/index.js.map +1 -1
- package/lib/src/collections/lazyCollection.js +5 -1
- package/lib/src/collections/lazyCollection.js.map +1 -1
- package/lib/src/collections/types.d.ts +8 -0
- package/lib/src/common/constants.js +1 -1
- package/lib/src/common/constants.js.map +1 -1
- package/lib/src/common/index.d.ts +1 -1
- package/lib/src/common/index.js +1 -0
- package/lib/src/common/index.js.map +1 -1
- package/lib/src/convert/convertContext.d.ts +9 -10
- package/lib/src/convert/convertContext.js +165 -173
- package/lib/src/convert/convertContext.js.map +1 -1
- package/lib/src/convert/index.js +1 -0
- package/lib/src/convert/index.js.map +1 -1
- package/lib/src/convert/metadataConverter.d.ts +3 -18
- package/lib/src/convert/metadataConverter.js +112 -110
- package/lib/src/convert/metadataConverter.js.map +1 -1
- package/lib/src/convert/streams.d.ts +4 -4
- package/lib/src/convert/streams.js +111 -147
- package/lib/src/convert/streams.js.map +1 -1
- package/lib/src/convert/transformers/baseMetadataTransformer.js.map +1 -1
- package/lib/src/convert/transformers/decomposedMetadataTransformer.d.ts +2 -2
- package/lib/src/convert/transformers/decomposedMetadataTransformer.js +124 -149
- package/lib/src/convert/transformers/decomposedMetadataTransformer.js.map +1 -1
- package/lib/src/convert/transformers/defaultMetadataTransformer.d.ts +1 -1
- package/lib/src/convert/transformers/defaultMetadataTransformer.js +11 -23
- package/lib/src/convert/transformers/defaultMetadataTransformer.js.map +1 -1
- package/lib/src/convert/transformers/index.js +1 -0
- package/lib/src/convert/transformers/index.js.map +1 -1
- package/lib/src/convert/transformers/metadataTransformerFactory.js +1 -1
- package/lib/src/convert/transformers/metadataTransformerFactory.js.map +1 -1
- package/lib/src/convert/transformers/nonDecomposedMetadataTransformer.d.ts +1 -1
- package/lib/src/convert/transformers/nonDecomposedMetadataTransformer.js +18 -29
- package/lib/src/convert/transformers/nonDecomposedMetadataTransformer.js.map +1 -1
- package/lib/src/convert/transformers/staticResourceMetadataTransformer.d.ts +1 -1
- package/lib/src/convert/transformers/staticResourceMetadataTransformer.js +78 -135
- package/lib/src/convert/transformers/staticResourceMetadataTransformer.js.map +1 -1
- package/lib/src/convert/types.d.ts +1 -1
- package/lib/src/errors/index.js.map +1 -1
- package/lib/src/i18n/i18n.js +3 -2
- package/lib/src/i18n/i18n.js.map +1 -1
- package/lib/src/i18n/index.js +3 -4
- package/lib/src/i18n/index.js.map +1 -1
- package/lib/src/i18n/localization.js +4 -4
- package/lib/src/i18n/localization.js.map +1 -1
- package/lib/src/index.js +1 -4
- package/lib/src/index.js.map +1 -1
- package/lib/src/registry/index.js +1 -4
- package/lib/src/registry/index.js.map +1 -1
- package/lib/src/registry/{registry.json → metadataRegistry.json} +376 -20
- package/lib/src/registry/nonSupportedTypes.d.ts +11 -0
- package/lib/src/registry/nonSupportedTypes.js +53 -0
- package/lib/src/registry/nonSupportedTypes.js.map +1 -0
- package/lib/src/registry/registry.d.ts +357 -1
- package/lib/src/registry/registry.js +2 -2
- package/lib/src/registry/registry.js.map +1 -1
- package/lib/src/registry/registryAccess.d.ts +12 -0
- package/lib/src/registry/registryAccess.js +25 -2
- package/lib/src/registry/registryAccess.js.map +1 -1
- package/lib/src/registry/types.d.ts +47 -0
- package/lib/src/registry/types.js +0 -35
- package/lib/src/registry/types.js.map +1 -1
- package/lib/src/resolve/adapters/baseSourceAdapter.d.ts +3 -2
- package/lib/src/resolve/adapters/baseSourceAdapter.js +55 -19
- package/lib/src/resolve/adapters/baseSourceAdapter.js.map +1 -1
- package/lib/src/resolve/adapters/bundleSourceAdapter.d.ts +1 -1
- package/lib/src/resolve/adapters/bundleSourceAdapter.js +0 -6
- package/lib/src/resolve/adapters/bundleSourceAdapter.js.map +1 -1
- package/lib/src/resolve/adapters/decomposedSourceAdapter.d.ts +1 -1
- package/lib/src/resolve/adapters/decomposedSourceAdapter.js +8 -14
- package/lib/src/resolve/adapters/decomposedSourceAdapter.js.map +1 -1
- package/lib/src/resolve/adapters/defaultSourceAdapter.d.ts +1 -1
- package/lib/src/resolve/adapters/defaultSourceAdapter.js +0 -6
- package/lib/src/resolve/adapters/defaultSourceAdapter.js.map +1 -1
- package/lib/src/resolve/adapters/index.js +1 -0
- package/lib/src/resolve/adapters/index.js.map +1 -1
- package/lib/src/resolve/adapters/matchingContentSourceAdapter.d.ts +1 -1
- package/lib/src/resolve/adapters/matchingContentSourceAdapter.js +2 -2
- package/lib/src/resolve/adapters/matchingContentSourceAdapter.js.map +1 -1
- package/lib/src/resolve/adapters/mixedContentSourceAdapter.d.ts +1 -1
- package/lib/src/resolve/adapters/mixedContentSourceAdapter.js +6 -6
- package/lib/src/resolve/adapters/mixedContentSourceAdapter.js.map +1 -1
- package/lib/src/resolve/adapters/sourceAdapterFactory.js +2 -2
- package/lib/src/resolve/adapters/sourceAdapterFactory.js.map +1 -1
- package/lib/src/resolve/forceIgnore.d.ts +0 -5
- package/lib/src/resolve/forceIgnore.js +14 -100
- package/lib/src/resolve/forceIgnore.js.map +1 -1
- package/lib/src/resolve/index.d.ts +1 -1
- package/lib/src/resolve/index.js +1 -0
- package/lib/src/resolve/index.js.map +1 -1
- package/lib/src/resolve/manifestResolver.d.ts +1 -0
- package/lib/src/resolve/manifestResolver.js +42 -31
- package/lib/src/resolve/manifestResolver.js.map +1 -1
- package/lib/src/resolve/metadataResolver.d.ts +12 -7
- package/lib/src/resolve/metadataResolver.js +39 -19
- package/lib/src/resolve/metadataResolver.js.map +1 -1
- package/lib/src/resolve/sourceComponent.d.ts +46 -7
- package/lib/src/resolve/sourceComponent.js +126 -65
- package/lib/src/resolve/sourceComponent.js.map +1 -1
- package/lib/src/resolve/treeContainers.d.ts +1 -1
- package/lib/src/resolve/treeContainers.js +21 -32
- package/lib/src/resolve/treeContainers.js.map +1 -1
- package/lib/src/resolve/types.d.ts +2 -2
- package/lib/src/utils/collections.js +1 -1
- package/lib/src/utils/collections.js.map +1 -1
- package/lib/src/utils/fileSystemHandler.js +1 -1
- package/lib/src/utils/fileSystemHandler.js.map +1 -1
- package/lib/src/utils/index.d.ts +1 -1
- package/lib/src/utils/index.js +2 -0
- package/lib/src/utils/index.js.map +1 -1
- package/lib/src/utils/metadata.js +1 -3
- package/lib/src/utils/metadata.js.map +1 -1
- package/lib/src/utils/path.d.ts +26 -1
- package/lib/src/utils/path.js +40 -5
- package/lib/src/utils/path.js.map +1 -1
- package/package.json +44 -35
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.searchUp = exports.createFiles = exports.ensureFileExists = exports.ensureDirectoryExists = void 0;
|
|
10
|
-
const fs = require("fs");
|
|
11
10
|
const path = require("path");
|
|
11
|
+
const fs = require("graceful-fs");
|
|
12
12
|
function ensureDirectoryExists(filePath) {
|
|
13
13
|
if (fs.existsSync(filePath)) {
|
|
14
14
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileSystemHandler.js","sourceRoot":"","sources":["../../../src/utils/fileSystemHandler.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"fileSystemHandler.js","sourceRoot":"","sources":["../../../src/utils/fileSystemHandler.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,6BAA6B;AAC7B,kCAAkC;AAGlC,SAAgB,qBAAqB,CAAC,QAAgB;IACpD,IAAI,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;QAC3B,OAAO;KACR;IACD,qBAAqB,CAAC,IAAI,CAAC,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
|
|
2
2
|
export { generateMetaXML, generateMetaXMLPath, trimMetaXmlSuffix } from './metadata';
|
|
3
|
-
export { extName, baseName, parseMetadataXml, parentName, trimUntil } from './path';
|
|
3
|
+
export { extName, baseName, parseMetadataXml, parentName, trimUntil, parseNestedFullName } from './path';
|
|
4
4
|
export { normalizeToArray, deepFreeze } from './collections';
|
package/lib/src/utils/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deepFreeze = exports.normalizeToArray = exports.parseNestedFullName = exports.trimUntil = exports.parentName = exports.parseMetadataXml = exports.baseName = exports.extName = exports.trimMetaXmlSuffix = exports.generateMetaXMLPath = exports.generateMetaXML = exports.createFiles = void 0;
|
|
3
4
|
/*
|
|
4
5
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
5
6
|
* All rights reserved.
|
|
@@ -18,6 +19,7 @@ Object.defineProperty(exports, "baseName", { enumerable: true, get: function ()
|
|
|
18
19
|
Object.defineProperty(exports, "parseMetadataXml", { enumerable: true, get: function () { return path_1.parseMetadataXml; } });
|
|
19
20
|
Object.defineProperty(exports, "parentName", { enumerable: true, get: function () { return path_1.parentName; } });
|
|
20
21
|
Object.defineProperty(exports, "trimUntil", { enumerable: true, get: function () { return path_1.trimUntil; } });
|
|
22
|
+
Object.defineProperty(exports, "parseNestedFullName", { enumerable: true, get: function () { return path_1.parseNestedFullName; } });
|
|
21
23
|
var collections_1 = require("./collections");
|
|
22
24
|
Object.defineProperty(exports, "normalizeToArray", { enumerable: true, get: function () { return collections_1.normalizeToArray; } });
|
|
23
25
|
Object.defineProperty(exports, "deepFreeze", { enumerable: true, get: function () { return collections_1.deepFreeze; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,yDAAkD;AAAzC,gHAAA,WAAW,OAAA;AACpB,uCAAqF;AAA5E,2GAAA,eAAe,OAAA;AAAE,+GAAA,mBAAmB,OAAA;AAAE,6GAAA,iBAAiB,OAAA;AAChE,+BAAyG;AAAhG,+FAAA,OAAO,OAAA;AAAE,gGAAA,QAAQ,OAAA;AAAE,wGAAA,gBAAgB,OAAA;AAAE,kGAAA,UAAU,OAAA;AAAE,iGAAA,SAAS,OAAA;AAAE,2GAAA,mBAAmB,OAAA;AACxF,6CAA6D;AAApD,+GAAA,gBAAgB,OAAA;AAAE,yGAAA,UAAU,OAAA"}
|
|
@@ -24,9 +24,7 @@ function generateMetaXMLPath(sourcePath) {
|
|
|
24
24
|
}
|
|
25
25
|
exports.generateMetaXMLPath = generateMetaXMLPath;
|
|
26
26
|
function trimMetaXmlSuffix(sourcePath) {
|
|
27
|
-
return sourcePath.endsWith(common_1.META_XML_SUFFIX)
|
|
28
|
-
? sourcePath.replace(common_1.META_XML_SUFFIX, '')
|
|
29
|
-
: sourcePath;
|
|
27
|
+
return sourcePath.endsWith(common_1.META_XML_SUFFIX) ? sourcePath.replace(common_1.META_XML_SUFFIX, '') : sourcePath;
|
|
30
28
|
}
|
|
31
29
|
exports.trimMetaXmlSuffix = trimMetaXmlSuffix;
|
|
32
30
|
//# sourceMappingURL=metadata.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../../src/utils/metadata.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,sCAA4C;AAE5C,SAAgB,eAAe,CAAC,QAAgB,EAAE,UAAkB,EAAE,MAAc;IAClF,IAAI,cAAc,GAAG,0CAA0C,CAAC;IAChE,cAAc,IAAI,IAAI,QAAQ,qDAAqD,CAAC;IACpF,cAAc,IAAI,iBAAiB,UAAU,mBAAmB,CAAC;IACjE,IAAI,MAAM,EAAE;QACV,cA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CAAC;AACrG,CAAC;AAFD,8CAEC"}
|
package/lib/src/utils/path.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { Optional } from '@salesforce/ts-types';
|
|
1
2
|
import { SourcePath } from '../common';
|
|
2
3
|
import { MetadataXml } from '../resolve';
|
|
3
4
|
/**
|
|
4
5
|
* Get the file or directory name at the end of a path. Different from `path.basename`
|
|
5
6
|
* in that it strips anything after the first '.' in the name.
|
|
7
|
+
*
|
|
6
8
|
* @param fsPath The path to evaluate
|
|
7
9
|
*/
|
|
8
10
|
export declare function baseName(fsPath: SourcePath): string;
|
|
@@ -10,17 +12,20 @@ export declare function baseName(fsPath: SourcePath): string;
|
|
|
10
12
|
* Get the name of file path extension. Different from path.extname in that it
|
|
11
13
|
* does not include the '.' in the extension name. Returns an empty string if
|
|
12
14
|
* there is no extension.
|
|
15
|
+
*
|
|
13
16
|
* @param fsPath The path to evaluate
|
|
14
17
|
*/
|
|
15
18
|
export declare function extName(fsPath: SourcePath): string;
|
|
16
19
|
/**
|
|
17
20
|
* Get the name of the parent to the last portion of a path
|
|
21
|
+
*
|
|
18
22
|
* @param fsPath The path to evaluate
|
|
19
23
|
*/
|
|
20
24
|
export declare function parentName(fsPath: SourcePath): string;
|
|
21
25
|
/**
|
|
22
26
|
* Trim a path up until and including the given part. Returns `fsPath`
|
|
23
27
|
* if the path `part` was not found.
|
|
28
|
+
*
|
|
24
29
|
* @param fsPath Path to trim
|
|
25
30
|
* @param part Path part to trim up until
|
|
26
31
|
*/
|
|
@@ -32,4 +37,24 @@ export declare function trimUntil(fsPath: SourcePath, part: string): string;
|
|
|
32
37
|
* @param fsPath - File path to parse
|
|
33
38
|
* @returns MetadataXml info or undefined
|
|
34
39
|
*/
|
|
35
|
-
export declare function parseMetadataXml(fsPath: string): MetadataXml
|
|
40
|
+
export declare function parseMetadataXml(fsPath: string): Optional<MetadataXml>;
|
|
41
|
+
/**
|
|
42
|
+
* Returns the fullName for a nested metadata source file. This is for metadata
|
|
43
|
+
* types that can be nested more than 1 level such as report and reportFolder,
|
|
44
|
+
* dashboard and dashboardFolder, etc. It uses the directory name for the metadata type
|
|
45
|
+
* as the starting point (non-inclusively) to parse the fullName.
|
|
46
|
+
*
|
|
47
|
+
* Examples:
|
|
48
|
+
* (source format path)
|
|
49
|
+
* fsPath: force-app/main/default/reports/foo/bar/My_Report.report-meta.xml
|
|
50
|
+
* returns: foo/bar/My_Report
|
|
51
|
+
*
|
|
52
|
+
* (mdapi format path)
|
|
53
|
+
* fsPath: unpackaged/reports/foo/bar-meta.xml
|
|
54
|
+
* returns: foo/bar
|
|
55
|
+
*
|
|
56
|
+
* @param fsPath - File path to parse
|
|
57
|
+
* @param directoryName - name of directory to use as a parsing index
|
|
58
|
+
* @returns the FullName
|
|
59
|
+
*/
|
|
60
|
+
export declare function parseNestedFullName(fsPath: string, directoryName: string): Optional<string>;
|
package/lib/src/utils/path.js
CHANGED
|
@@ -6,39 +6,43 @@
|
|
|
6
6
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.parseMetadataXml = exports.trimUntil = exports.parentName = exports.extName = exports.baseName = void 0;
|
|
9
|
+
exports.parseNestedFullName = exports.parseMetadataXml = exports.trimUntil = exports.parentName = exports.extName = exports.baseName = void 0;
|
|
10
10
|
const path_1 = require("path");
|
|
11
11
|
/**
|
|
12
12
|
* Get the file or directory name at the end of a path. Different from `path.basename`
|
|
13
13
|
* in that it strips anything after the first '.' in the name.
|
|
14
|
+
*
|
|
14
15
|
* @param fsPath The path to evaluate
|
|
15
16
|
*/
|
|
16
17
|
function baseName(fsPath) {
|
|
17
|
-
return path_1.basename(fsPath).split('.')[0];
|
|
18
|
+
return (0, path_1.basename)(fsPath).split('.')[0];
|
|
18
19
|
}
|
|
19
20
|
exports.baseName = baseName;
|
|
20
21
|
/**
|
|
21
22
|
* Get the name of file path extension. Different from path.extname in that it
|
|
22
23
|
* does not include the '.' in the extension name. Returns an empty string if
|
|
23
24
|
* there is no extension.
|
|
25
|
+
*
|
|
24
26
|
* @param fsPath The path to evaluate
|
|
25
27
|
*/
|
|
26
28
|
function extName(fsPath) {
|
|
27
|
-
const split = path_1.extname(fsPath).split('.');
|
|
29
|
+
const split = (0, path_1.extname)(fsPath).split('.');
|
|
28
30
|
return split.length > 1 ? split[1] : split[0];
|
|
29
31
|
}
|
|
30
32
|
exports.extName = extName;
|
|
31
33
|
/**
|
|
32
34
|
* Get the name of the parent to the last portion of a path
|
|
35
|
+
*
|
|
33
36
|
* @param fsPath The path to evaluate
|
|
34
37
|
*/
|
|
35
38
|
function parentName(fsPath) {
|
|
36
|
-
return path_1.basename(path_1.dirname(fsPath));
|
|
39
|
+
return (0, path_1.basename)((0, path_1.dirname)(fsPath));
|
|
37
40
|
}
|
|
38
41
|
exports.parentName = parentName;
|
|
39
42
|
/**
|
|
40
43
|
* Trim a path up until and including the given part. Returns `fsPath`
|
|
41
44
|
* if the path `part` was not found.
|
|
45
|
+
*
|
|
42
46
|
* @param fsPath Path to trim
|
|
43
47
|
* @param part Path part to trim up until
|
|
44
48
|
*/
|
|
@@ -59,10 +63,41 @@ exports.trimUntil = trimUntil;
|
|
|
59
63
|
* @returns MetadataXml info or undefined
|
|
60
64
|
*/
|
|
61
65
|
function parseMetadataXml(fsPath) {
|
|
62
|
-
const match =
|
|
66
|
+
const match = new RegExp(/(.+)\.(.+)-meta\.xml/).exec((0, path_1.basename)(fsPath));
|
|
63
67
|
if (match) {
|
|
64
68
|
return { fullName: match[1], suffix: match[2], path: fsPath };
|
|
65
69
|
}
|
|
66
70
|
}
|
|
67
71
|
exports.parseMetadataXml = parseMetadataXml;
|
|
72
|
+
/**
|
|
73
|
+
* Returns the fullName for a nested metadata source file. This is for metadata
|
|
74
|
+
* types that can be nested more than 1 level such as report and reportFolder,
|
|
75
|
+
* dashboard and dashboardFolder, etc. It uses the directory name for the metadata type
|
|
76
|
+
* as the starting point (non-inclusively) to parse the fullName.
|
|
77
|
+
*
|
|
78
|
+
* Examples:
|
|
79
|
+
* (source format path)
|
|
80
|
+
* fsPath: force-app/main/default/reports/foo/bar/My_Report.report-meta.xml
|
|
81
|
+
* returns: foo/bar/My_Report
|
|
82
|
+
*
|
|
83
|
+
* (mdapi format path)
|
|
84
|
+
* fsPath: unpackaged/reports/foo/bar-meta.xml
|
|
85
|
+
* returns: foo/bar
|
|
86
|
+
*
|
|
87
|
+
* @param fsPath - File path to parse
|
|
88
|
+
* @param directoryName - name of directory to use as a parsing index
|
|
89
|
+
* @returns the FullName
|
|
90
|
+
*/
|
|
91
|
+
function parseNestedFullName(fsPath, directoryName) {
|
|
92
|
+
const pathSplits = fsPath.split(path_1.sep);
|
|
93
|
+
// Exit if the directoryName is not included in the file path.
|
|
94
|
+
if (!pathSplits.includes(directoryName)) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
const pathPrefix = pathSplits.slice(pathSplits.lastIndexOf(directoryName) + 1);
|
|
98
|
+
const fileName = pathSplits.pop().replace('-meta.xml', '').split('.')[0];
|
|
99
|
+
pathPrefix[pathPrefix.length - 1] = fileName;
|
|
100
|
+
return pathPrefix.join('/');
|
|
101
|
+
}
|
|
102
|
+
exports.parseNestedFullName = parseNestedFullName;
|
|
68
103
|
//# sourceMappingURL=path.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path.js","sourceRoot":"","sources":["../../../src/utils/path.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,+BAAuD;
|
|
1
|
+
{"version":3,"file":"path.js","sourceRoot":"","sources":["../../../src/utils/path.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,+BAAuD;AAKvD;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,MAAkB;IACzC,OAAO,IAAA,eAAQ,EAAC,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,C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ACH,CAAC;AALD,4CAKC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,SAAgB,mBAAmB,CAAC,MAAc,EAAE,aAAqB;IACvE,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,UAAG,CAAC,CAAC;IACrC,8DAA8D;IAC9D,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE;QACvC,OAAO;KACR;IACD,MAAM,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/E,MAAM,QAAQ,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACzE,UAAU,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IAC7C,OAAO,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC9B,CAAC;AAVD,kDAUC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/source-deploy-retrieve",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"description": "JavaScript library to run Salesforce metadata deploys and retrieves",
|
|
5
5
|
"main": "lib/src/index.js",
|
|
6
6
|
"author": "Salesforce",
|
|
@@ -24,79 +24,88 @@
|
|
|
24
24
|
"lib/src"
|
|
25
25
|
],
|
|
26
26
|
"engines": {
|
|
27
|
-
"node": ">=12.
|
|
27
|
+
"node": ">=12.0.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@salesforce/core": "2.
|
|
30
|
+
"@salesforce/core": "2.28.0",
|
|
31
31
|
"@salesforce/kit": "^1.5.0",
|
|
32
32
|
"@salesforce/ts-types": "^1.4.2",
|
|
33
33
|
"archiver": "^5.3.0",
|
|
34
34
|
"fast-xml-parser": "^3.17.4",
|
|
35
|
-
"
|
|
35
|
+
"graceful-fs": "^4.2.8",
|
|
36
36
|
"ignore": "^5.1.8",
|
|
37
37
|
"mime": "2.4.6",
|
|
38
38
|
"unzipper": "0.10.11",
|
|
39
39
|
"xmldom-sfdx-encoding": "^0.1.29"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@
|
|
43
|
-
"@
|
|
44
|
-
"@salesforce/
|
|
42
|
+
"@salesforce/dev-config": "^2.1.2",
|
|
43
|
+
"@salesforce/dev-scripts": "^0.9.18",
|
|
44
|
+
"@salesforce/prettier-config": "^0.0.2",
|
|
45
45
|
"@salesforce/ts-sinon": "^1.1.2",
|
|
46
46
|
"@types/archiver": "^5.1.1",
|
|
47
|
-
"@types/chai": "^4",
|
|
48
47
|
"@types/deep-equal-in-any-order": "^1.0.1",
|
|
49
48
|
"@types/mime": "2.0.3",
|
|
50
49
|
"@types/mkdirp": "0.5.2",
|
|
51
|
-
"@types/
|
|
52
|
-
"@types/node": "^12.11.0",
|
|
53
|
-
"@types/sinon": "^7.5.2",
|
|
50
|
+
"@types/shelljs": "^0.8.9",
|
|
54
51
|
"@types/unzipper": "^0.10.3",
|
|
55
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
56
|
-
"@typescript-eslint/parser": "^
|
|
57
|
-
"chai": "^4",
|
|
52
|
+
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
|
53
|
+
"@typescript-eslint/parser": "^4.33.0",
|
|
54
|
+
"chai": "^4.2.0",
|
|
58
55
|
"commitizen": "^3.0.5",
|
|
59
56
|
"cz-conventional-changelog": "^2.1.0",
|
|
60
57
|
"deep-equal-in-any-order": "^1.1.4",
|
|
61
58
|
"deepmerge": "^4.2.2",
|
|
62
|
-
"eslint": "^
|
|
59
|
+
"eslint": "^7.32.0",
|
|
63
60
|
"eslint-config-prettier": "^6.11.0",
|
|
64
|
-
"eslint-
|
|
65
|
-
"eslint-
|
|
66
|
-
"eslint-
|
|
67
|
-
"
|
|
61
|
+
"eslint-config-salesforce": "^0.1.6",
|
|
62
|
+
"eslint-config-salesforce-license": "^0.1.6",
|
|
63
|
+
"eslint-config-salesforce-typescript": "^0.2.8",
|
|
64
|
+
"eslint-plugin-header": "^3.1.1",
|
|
65
|
+
"eslint-plugin-import": "^2.24.2",
|
|
66
|
+
"eslint-plugin-jsdoc": "^35.1.3",
|
|
67
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
68
|
+
"got": "^11.8.2",
|
|
69
|
+
"husky": "^4.3.8",
|
|
68
70
|
"lint-staged": "^10.2.11",
|
|
69
|
-
"mocha": "^
|
|
71
|
+
"mocha": "^8.4.0",
|
|
70
72
|
"mocha-junit-reporter": "^1.23.3",
|
|
71
|
-
"nyc": "^
|
|
72
|
-
"prettier": "2.0.5",
|
|
73
|
+
"nyc": "^15.1.0",
|
|
74
|
+
"prettier": "^2.0.5",
|
|
75
|
+
"pretty-quick": "^3.1.0",
|
|
73
76
|
"shelljs": "0.8.4",
|
|
74
77
|
"shx": "^0.3.2",
|
|
75
|
-
"sinon": "
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"typescript": "3.9.7"
|
|
78
|
+
"sinon": "10.0.0",
|
|
79
|
+
"ts-node": "^10.3.0",
|
|
80
|
+
"typescript": "^4.1.3"
|
|
79
81
|
},
|
|
80
82
|
"scripts": {
|
|
81
|
-
"build": "
|
|
83
|
+
"build": "sf-build",
|
|
82
84
|
"ci-docs": "yarn sf-ci-docs",
|
|
83
|
-
"
|
|
85
|
+
"clean": "sf-clean",
|
|
86
|
+
"clean-all": "sf-clean all",
|
|
84
87
|
"commit": "git-cz",
|
|
88
|
+
"commit-init": "commitizen init cz-conventional-changelog --save-dev --save-exact --force",
|
|
89
|
+
"compile": "sf-compile",
|
|
90
|
+
"coverage": "nyc report --reporter=lcov",
|
|
85
91
|
"docs": "sf-docs",
|
|
86
|
-
"format": "
|
|
87
|
-
"lint": "
|
|
92
|
+
"format": "sf-format",
|
|
93
|
+
"lint": "sf-lint",
|
|
88
94
|
"local:install": "./scripts/localInstall.js install",
|
|
89
95
|
"local:link": "./scripts/localInstall.js link",
|
|
90
96
|
"local:unlink": "./scripts/localInstall.js unlink",
|
|
97
|
+
"prepack": "sf-prepack",
|
|
98
|
+
"pretest": "sf-compile-test",
|
|
91
99
|
"repl": "node --inspect ./scripts/repl.js",
|
|
92
|
-
"test": "
|
|
93
|
-
"
|
|
94
|
-
"update-registry": "node
|
|
100
|
+
"test": "sf-test",
|
|
101
|
+
"test:registry": "nyc mocha ./test/registry/registryCompleteness.test.ts",
|
|
102
|
+
"update-registry": "npx ts-node scripts/update-registry/update2.ts"
|
|
95
103
|
},
|
|
96
104
|
"husky": {
|
|
97
105
|
"hooks": {
|
|
98
|
-
"pre-commit": "
|
|
99
|
-
"commit-msg": "
|
|
106
|
+
"pre-commit": "sf-husky-pre-commit",
|
|
107
|
+
"commit-msg": "sf-husky-commit-msg",
|
|
108
|
+
"pre-push": "sf-husky-pre-push"
|
|
100
109
|
}
|
|
101
110
|
},
|
|
102
111
|
"lint-staged": {
|