@salesforce/source-deploy-retrieve 9.8.0 → 9.8.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/lib/src/client/diagnosticUtil.js +3 -3
- package/lib/src/client/diagnosticUtil.js.map +1 -1
- package/lib/src/client/metadataApiDeploy.js +9 -9
- package/lib/src/client/metadataApiDeploy.js.map +1 -1
- package/lib/src/client/metadataApiRetrieve.js +1 -1
- package/lib/src/client/metadataApiRetrieve.js.map +1 -1
- package/lib/src/client/metadataTransfer.js +4 -4
- package/lib/src/client/metadataTransfer.js.map +1 -1
- package/lib/src/client/types.js +2 -2
- package/lib/src/client/types.js.map +1 -1
- package/lib/src/collections/componentSet.js.map +1 -1
- package/lib/src/collections/componentSetBuilder.js +1 -1
- package/lib/src/collections/componentSetBuilder.js.map +1 -1
- package/lib/src/collections/types.js +1 -1
- package/lib/src/collections/types.js.map +1 -1
- package/lib/src/common/constants.js +2 -2
- package/lib/src/common/constants.js.map +1 -1
- package/lib/src/convert/convertContext.js +4 -4
- package/lib/src/convert/convertContext.js.map +1 -1
- package/lib/src/convert/metadataConverter.js +11 -11
- package/lib/src/convert/metadataConverter.js.map +1 -1
- package/lib/src/convert/replacements.d.ts +1 -1
- package/lib/src/convert/replacements.js +6 -6
- package/lib/src/convert/replacements.js.map +1 -1
- package/lib/src/convert/streams.d.ts +1 -1
- package/lib/src/convert/streams.js +10 -13
- package/lib/src/convert/streams.js.map +1 -1
- package/lib/src/convert/transformers/decomposedMetadataTransformer.js +11 -3
- package/lib/src/convert/transformers/decomposedMetadataTransformer.js.map +1 -1
- package/lib/src/convert/transformers/defaultMetadataTransformer.js +3 -3
- package/lib/src/convert/transformers/defaultMetadataTransformer.js.map +1 -1
- package/lib/src/convert/transformers/staticResourceMetadataTransformer.js +14 -14
- package/lib/src/convert/transformers/staticResourceMetadataTransformer.js.map +1 -1
- package/lib/src/convert/types.d.ts +1 -1
- package/lib/src/registry/metadataRegistry.json +102 -1
- package/lib/src/registry/nonSupportedTypes.js +0 -3
- package/lib/src/registry/nonSupportedTypes.js.map +1 -1
- package/lib/src/resolve/adapters/baseSourceAdapter.js +10 -10
- package/lib/src/resolve/adapters/baseSourceAdapter.js.map +1 -1
- package/lib/src/resolve/adapters/decomposedSourceAdapter.js.map +1 -1
- package/lib/src/resolve/adapters/digitalExperienceSourceAdapter.js +9 -9
- package/lib/src/resolve/adapters/digitalExperienceSourceAdapter.js.map +1 -1
- package/lib/src/resolve/adapters/mixedContentSourceAdapter.js +10 -10
- package/lib/src/resolve/adapters/mixedContentSourceAdapter.js.map +1 -1
- package/lib/src/resolve/forceIgnore.js +5 -5
- package/lib/src/resolve/forceIgnore.js.map +1 -1
- package/lib/src/resolve/metadataResolver.js +11 -11
- package/lib/src/resolve/metadataResolver.js.map +1 -1
- package/lib/src/resolve/sourceComponent.js +6 -6
- package/lib/src/resolve/sourceComponent.js.map +1 -1
- package/lib/src/resolve/treeContainers.d.ts +1 -1
- package/lib/src/resolve/treeContainers.js +18 -18
- package/lib/src/resolve/treeContainers.js.map +1 -1
- package/lib/src/utils/filePathGenerator.js +21 -21
- package/lib/src/utils/filePathGenerator.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/path.js +8 -8
- package/lib/src/utils/path.js.map +1 -1
- package/package.json +8 -28
|
@@ -130,6 +130,17 @@
|
|
|
130
130
|
"adapter": "matchingContentFile"
|
|
131
131
|
}
|
|
132
132
|
},
|
|
133
|
+
"discoverystory": {
|
|
134
|
+
"id": "discoverystory",
|
|
135
|
+
"name": "DiscoveryStory",
|
|
136
|
+
"suffix": "story",
|
|
137
|
+
"directoryName": "discovery",
|
|
138
|
+
"inFolder": false,
|
|
139
|
+
"strictDirectoryName": false,
|
|
140
|
+
"strategies": {
|
|
141
|
+
"adapter": "matchingContentFile"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
133
144
|
"experiencebundle": {
|
|
134
145
|
"id": "experiencebundle",
|
|
135
146
|
"name": "ExperienceBundle",
|
|
@@ -2872,6 +2883,13 @@
|
|
|
2872
2883
|
"directoryName": "documentGenerationSettings",
|
|
2873
2884
|
"inFolder": false
|
|
2874
2885
|
},
|
|
2886
|
+
"carebenefitverifysettings": {
|
|
2887
|
+
"id": "carebenefitverifysettings",
|
|
2888
|
+
"name": "CareBenefitVerifySettings",
|
|
2889
|
+
"suffix": "careBenefitVerifySettings",
|
|
2890
|
+
"directoryName": "careBenefitVerifySettings",
|
|
2891
|
+
"inFolder": false
|
|
2892
|
+
},
|
|
2875
2893
|
"uiobjectrelationconfig": {
|
|
2876
2894
|
"id": "uiobjectrelationconfig",
|
|
2877
2895
|
"name": "UIObjectRelationConfig",
|
|
@@ -3562,6 +3580,78 @@
|
|
|
3562
3580
|
"directoryName": "eventRelays",
|
|
3563
3581
|
"inFolder": false,
|
|
3564
3582
|
"strictDirectoryName": false
|
|
3583
|
+
},
|
|
3584
|
+
"careproviderafflroleconfig": {
|
|
3585
|
+
"id": "careproviderafflroleconfig",
|
|
3586
|
+
"name": "CareProviderAfflRoleConfig",
|
|
3587
|
+
"suffix": "careProviderAfflRoleConfig",
|
|
3588
|
+
"directoryName": "careProviderAfflRoleConfigs",
|
|
3589
|
+
"inFolder": false,
|
|
3590
|
+
"strictDirectoryName": false
|
|
3591
|
+
},
|
|
3592
|
+
"contextdefinition": {
|
|
3593
|
+
"id": "contextdefinition",
|
|
3594
|
+
"name": "ContextDefinition",
|
|
3595
|
+
"suffix": "contextDefinition",
|
|
3596
|
+
"directoryName": "contextDefinitions",
|
|
3597
|
+
"inFolder": false,
|
|
3598
|
+
"strictDirectoryName": false
|
|
3599
|
+
},
|
|
3600
|
+
"documentcategory": {
|
|
3601
|
+
"id": "documentcategory",
|
|
3602
|
+
"name": "DocumentCategory",
|
|
3603
|
+
"suffix": "documentCategory",
|
|
3604
|
+
"directoryName": "documentCategory",
|
|
3605
|
+
"inFolder": false,
|
|
3606
|
+
"strictDirectoryName": false
|
|
3607
|
+
},
|
|
3608
|
+
"documentcategorydocumenttype": {
|
|
3609
|
+
"id": "documentcategorydocumenttype",
|
|
3610
|
+
"name": "DocumentCategoryDocumentType",
|
|
3611
|
+
"suffix": "documentCategoryDocumentType",
|
|
3612
|
+
"directoryName": "documentCategoryDocumentTypes",
|
|
3613
|
+
"inFolder": false,
|
|
3614
|
+
"strictDirectoryName": false
|
|
3615
|
+
},
|
|
3616
|
+
"expressionsetmessagetoken": {
|
|
3617
|
+
"id": "expressionsetmessagetoken",
|
|
3618
|
+
"name": "ExpressionSetMessageToken",
|
|
3619
|
+
"suffix": "expressionSetMessageToken",
|
|
3620
|
+
"directoryName": "expressionSetMessageToken",
|
|
3621
|
+
"inFolder": false,
|
|
3622
|
+
"strictDirectoryName": false
|
|
3623
|
+
},
|
|
3624
|
+
"recordaggregationdefinition": {
|
|
3625
|
+
"id": "recordaggregationdefinition",
|
|
3626
|
+
"name": "RecordAggregationDefinition",
|
|
3627
|
+
"suffix": "RecordAggregationDefinition",
|
|
3628
|
+
"directoryName": "RecordAggregationDefinitions",
|
|
3629
|
+
"inFolder": false,
|
|
3630
|
+
"strictDirectoryName": false
|
|
3631
|
+
},
|
|
3632
|
+
"webstorebundle": {
|
|
3633
|
+
"id": "webstorebundle",
|
|
3634
|
+
"name": "WebStoreBundle",
|
|
3635
|
+
"suffix": "webStoreBundle",
|
|
3636
|
+
"directoryName": "webStoreBundles",
|
|
3637
|
+
"inFolder": false,
|
|
3638
|
+
"strictDirectoryName": false
|
|
3639
|
+
},
|
|
3640
|
+
"externalaimodel": {
|
|
3641
|
+
"id": "externalaimodel",
|
|
3642
|
+
"name": "ExternalAIModel",
|
|
3643
|
+
"suffix": "externalAIModel",
|
|
3644
|
+
"directoryName": "externalAIModels",
|
|
3645
|
+
"inFolder": false,
|
|
3646
|
+
"strictDirectoryName": false
|
|
3647
|
+
},
|
|
3648
|
+
"registeredexternalservice": {
|
|
3649
|
+
"id": "registeredexternalservice",
|
|
3650
|
+
"name": "RegisteredExternalService",
|
|
3651
|
+
"suffix": "registeredExternalService",
|
|
3652
|
+
"directoryName": "registeredExternalServices",
|
|
3653
|
+
"inFolder": false,
|
|
3654
|
+
"strictDirectoryName": false
|
|
3565
3655
|
}
|
|
3566
3656
|
},
|
|
3567
3657
|
"suffixes": {
|
|
@@ -3608,6 +3698,7 @@
|
|
|
3608
3698
|
"labels": "customlabels",
|
|
3609
3699
|
"navigationMenu": "navigationmenu",
|
|
3610
3700
|
"scf": "scontrol",
|
|
3701
|
+
"story": "discoverystory",
|
|
3611
3702
|
"crt": "certificate",
|
|
3612
3703
|
"messageChannel": "lightningmessagechannel",
|
|
3613
3704
|
"component": "apexcomponent",
|
|
@@ -3876,6 +3967,7 @@
|
|
|
3876
3967
|
"advAcctForecastPeriodGroup": "advacctforecastperiodgroup",
|
|
3877
3968
|
"advAccountForecastSet": "advaccountforecastset",
|
|
3878
3969
|
"documentGenerationSetting": "documentgenerationsetting",
|
|
3970
|
+
"careBenefitVerifySettings": "carebenefitverifysettings",
|
|
3879
3971
|
"uiObjectRelationConfig": "uiobjectrelationconfig",
|
|
3880
3972
|
"careRequestConfiguration": "carerequestconfiguration",
|
|
3881
3973
|
"mlRecommendation": "mlrecommendationdefinition",
|
|
@@ -3953,7 +4045,16 @@
|
|
|
3953
4045
|
"SearchCriteriaConfigurationSetting": "searchcriteriaconfiguration",
|
|
3954
4046
|
"fundraisingConfig": "fundraisingconfig",
|
|
3955
4047
|
"pricingRecipe": "pricingrecipe",
|
|
3956
|
-
"eventRelay": "eventrelayconfig"
|
|
4048
|
+
"eventRelay": "eventrelayconfig",
|
|
4049
|
+
"careProviderAfflRoleConfig": "careproviderafflroleconfig",
|
|
4050
|
+
"contextDefinition": "contextdefinition",
|
|
4051
|
+
"documentCategory": "documentcategory",
|
|
4052
|
+
"documentCategoryDocumentType": "documentcategorydocumenttype",
|
|
4053
|
+
"expressionSetMessageToken": "expressionsetmessagetoken",
|
|
4054
|
+
"RecordAggregationDefinition": "recordaggregationdefinition",
|
|
4055
|
+
"webStoreBundle": "webstorebundle",
|
|
4056
|
+
"externalAIModel": "externalaimodel",
|
|
4057
|
+
"registeredExternalService": "registeredexternalservice"
|
|
3957
4058
|
},
|
|
3958
4059
|
"strictDirectoryNames": {
|
|
3959
4060
|
"experiences": "experiencebundle",
|
|
@@ -46,7 +46,6 @@ exports.metadataTypes = [
|
|
|
46
46
|
'CustomValue',
|
|
47
47
|
'StandardValue',
|
|
48
48
|
// the following are not describable based on their features/settings, see git blame for last time checked
|
|
49
|
-
'DiscoveryStory',
|
|
50
49
|
'EmployeeDataSyncProfile',
|
|
51
50
|
'RelatedRecordAssocCriteria',
|
|
52
51
|
'ScoreRange',
|
|
@@ -64,8 +63,6 @@ exports.metadataTypes = [
|
|
|
64
63
|
// spun up with CUSTOMERDATAPLATFORM, not in describe
|
|
65
64
|
'ExternalDataTranField',
|
|
66
65
|
'ExternalDataTranObject',
|
|
67
|
-
// spun up with HIGHSCALEORDERS, not in describe
|
|
68
|
-
'RegisteredExternalService',
|
|
69
66
|
// spun up org with ASSESSMENTS, not in describe
|
|
70
67
|
'AssessmentConfiguration',
|
|
71
68
|
// spun up org with INDUSTRIESEPCNEXTPILOT, not in describe
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nonSupportedTypes.js","sourceRoot":"","sources":["../../../src/registry/nonSupportedTypes.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAIH;;;;;KAKK;AACQ,QAAA,QAAQ,GAAG;IACtB,mEAAmE;IACnE,gBAAgB;IAChB,mBAAmB;IACnB,cAAc;IACd,8BAA8B;IAC9B,2BAA2B;IAC3B,oBAAoB;IACpB,gBAAgB;IAChB,iBAAiB;IACjB,sBAAsB;IACtB,mBAAmB;IACnB,2BAA2B;IAC3B,0BAA0B;IAC1B,wBAAwB;IACxB,yBAAyB;IACzB,sCAAsC;IACtC,WAAW;IACX,kCAAkC;IAClC,qBAAqB;IACrB,aAAa;IACb,gBAAgB,EAAE,uDAAuD;CAC1E,CAAC;AAEW,QAAA,QAAQ,GAAG;IACtB,aAAa,EAAE,0FAA0F;CAC1G,CAAC;AACW,QAAA,aAAa,GAAG;IAC3B,+CAA+C;IAC/C,eAAe;IACf,iCAAiC;IACjC,aAAa;IACb,eAAe;IAEf,0GAA0G;IAC1G,
|
|
1
|
+
{"version":3,"file":"nonSupportedTypes.js","sourceRoot":"","sources":["../../../src/registry/nonSupportedTypes.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAIH;;;;;KAKK;AACQ,QAAA,QAAQ,GAAG;IACtB,mEAAmE;IACnE,gBAAgB;IAChB,mBAAmB;IACnB,cAAc;IACd,8BAA8B;IAC9B,2BAA2B;IAC3B,oBAAoB;IACpB,gBAAgB;IAChB,iBAAiB;IACjB,sBAAsB;IACtB,mBAAmB;IACnB,2BAA2B;IAC3B,0BAA0B;IAC1B,wBAAwB;IACxB,yBAAyB;IACzB,sCAAsC;IACtC,WAAW;IACX,kCAAkC;IAClC,qBAAqB;IACrB,aAAa;IACb,gBAAgB,EAAE,uDAAuD;CAC1E,CAAC;AAEW,QAAA,QAAQ,GAAG;IACtB,aAAa,EAAE,0FAA0F;CAC1G,CAAC;AACW,QAAA,aAAa,GAAG;IAC3B,+CAA+C;IAC/C,eAAe;IACf,iCAAiC;IACjC,aAAa;IACb,eAAe;IAEf,0GAA0G;IAC1G,yBAAyB;IACzB,4BAA4B;IAC5B,YAAY;IACZ,oBAAoB;IAEpB,8DAA8D;IAC9D,kIAAkI;IAClI,qBAAqB;IACrB,6BAA6B;IAE7B,mEAAmE;IACnE,0BAA0B;IAE1B,4CAA4C;IAC5C,2BAA2B;IAE3B,0CAA0C;IAC1C,8BAA8B;IAE9B,qDAAqD;IACrD,uBAAuB;IACvB,wBAAwB;IAExB,gDAAgD;IAChD,yBAAyB;IAEzB,2DAA2D;IAC3D,0BAA0B;IAC1B,6BAA6B;IAC7B,0BAA0B;IAE1B,sDAAsD;IACtD,yBAAyB;IACzB,qBAAqB;CACtB,CAAC;AAEK,MAAM,sBAAsB,GAAG,CAAC,IAAwB,EAAW,EAAE;IAC1E,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE;QAC9B,OAAO,IAAI,CAAC;KACb;IAED,IACE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,MAAM;QACzC,gBAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,EACjF;QACA,OAAO,IAAI,CAAC;KACb;IACD,OAAO,CACL,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,QAAQ,CAAC;QAC3C,gBAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAC1E,CAAC;AACJ,CAAC,CAAC;AAfW,QAAA,sBAAsB,0BAejC"}
|
|
@@ -7,7 +7,7 @@ exports.BaseSourceAdapter = void 0;
|
|
|
7
7
|
* Licensed under the BSD 3-Clause license.
|
|
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
|
-
const
|
|
10
|
+
const node_path_1 = require("node:path");
|
|
11
11
|
const core_1 = require("@salesforce/core");
|
|
12
12
|
const ts_types_1 = require("@salesforce/ts-types");
|
|
13
13
|
const utils_1 = require("../../utils");
|
|
@@ -70,9 +70,9 @@ class BaseSourceAdapter {
|
|
|
70
70
|
if (metaXml) {
|
|
71
71
|
let isRootMetadataXml = false;
|
|
72
72
|
if (this.type.strictDirectoryName) {
|
|
73
|
-
const parentPath = (0,
|
|
74
|
-
const typeDirName = (0,
|
|
75
|
-
const nameMatchesParent = (0,
|
|
73
|
+
const parentPath = (0, node_path_1.dirname)(path);
|
|
74
|
+
const typeDirName = (0, node_path_1.basename)(this.type.inFolder ? (0, node_path_1.dirname)(parentPath) : parentPath);
|
|
75
|
+
const nameMatchesParent = (0, node_path_1.basename)(parentPath) === metaXml.fullName;
|
|
76
76
|
const inTypeDir = typeDirName === this.type.directoryName;
|
|
77
77
|
// if the parent folder name matches the fullName OR parent folder name is
|
|
78
78
|
// metadata type's directory name, it's a root metadata xml.
|
|
@@ -114,8 +114,8 @@ class BaseSourceAdapter {
|
|
|
114
114
|
return { fullName, suffix: this.type.suffix, path };
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
const parentPath = (0,
|
|
118
|
-
const parts = parentPath.split(
|
|
117
|
+
const parentPath = (0, node_path_1.dirname)(path);
|
|
118
|
+
const parts = parentPath.split(node_path_1.sep);
|
|
119
119
|
const typeFolderIndex = parts.lastIndexOf(this.type.directoryName);
|
|
120
120
|
// nestedTypes (ex: territory2) have a folderType equal to their type but are themselves
|
|
121
121
|
// in a folder per metadata item, with child folders for rules/territories
|
|
@@ -123,7 +123,7 @@ class BaseSourceAdapter {
|
|
|
123
123
|
if (typeFolderIndex !== allowedIndex) {
|
|
124
124
|
return undefined;
|
|
125
125
|
}
|
|
126
|
-
const match = new RegExp(/(.+)\.(.+)/).exec((0,
|
|
126
|
+
const match = new RegExp(/(.+)\.(.+)/).exec((0, node_path_1.basename)(path));
|
|
127
127
|
if (match && this.type.suffix === match[2]) {
|
|
128
128
|
return { fullName: match[1], suffix: match[2], path };
|
|
129
129
|
}
|
|
@@ -143,7 +143,7 @@ class BaseSourceAdapter {
|
|
|
143
143
|
const grandparentType = this.registry.getTypeByName(folderType);
|
|
144
144
|
// type is nested inside another type (ex: Territory2Model). So the names are modelName.ruleName or modelName.territoryName
|
|
145
145
|
if (grandparentType.folderType && grandparentType.folderType !== this.type.id) {
|
|
146
|
-
const splits = rootMetadata.path.split(
|
|
146
|
+
const splits = rootMetadata.path.split(node_path_1.sep);
|
|
147
147
|
return `${splits[splits.indexOf(grandparentType.directoryName) + 1]}.${rootMetadata.fullName}`;
|
|
148
148
|
}
|
|
149
149
|
// this is the top level of nested types (ex: in a Territory2Model, the Territory2Model)
|
|
@@ -155,8 +155,8 @@ class BaseSourceAdapter {
|
|
|
155
155
|
}
|
|
156
156
|
exports.BaseSourceAdapter = BaseSourceAdapter;
|
|
157
157
|
const parseAsFolderMetadataXml = (fsPath) => {
|
|
158
|
-
const match = new RegExp(/(.+)-meta\.xml$/).exec((0,
|
|
159
|
-
const parts = fsPath.split(
|
|
158
|
+
const match = new RegExp(/(.+)-meta\.xml$/).exec((0, node_path_1.basename)(fsPath));
|
|
159
|
+
const parts = fsPath.split(node_path_1.sep);
|
|
160
160
|
if (match && !match[1].includes('.') && parts.length > 1) {
|
|
161
161
|
return { fullName: match[1], suffix: undefined, path: fsPath };
|
|
162
162
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseSourceAdapter.js","sourceRoot":"","sources":["../../../../src/resolve/adapters/baseSourceAdapter.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH
|
|
1
|
+
{"version":3,"file":"baseSourceAdapter.js","sourceRoot":"","sources":["../../../../src/resolve/adapters/baseSourceAdapter.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,yCAAmD;AACnD,2CAAqD;AACrD,mDAAoD;AAEpD,uCAAoE;AACpE,gDAA6C;AAC7C,sDAAuE;AACvE,wDAAqD;AAErD,6CAA8D;AAG9D,MAAM,QAAQ,OAAG,eAAQ,CAAc,oCAAoC,EAAE,KAAK,s4JAAC,CAAC;AAEpF,MAAsB,iBAAiB;IAarC,YACE,IAAkB,EAClB,QAAQ,GAAG,IAAI,yBAAc,EAAE,EAC/B,cAA2B,IAAI,yBAAW,EAAE,EAC5C,OAAsB,IAAI,oCAAmB,EAAE;QAXjD;;;WAGG;QACO,cAAS,GAAG,KAAK,CAAC;QAClB,wBAAmB,GAAG,IAAI,CAAC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IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACjF,CAAC;CAqBF;AAhMD,8CAgMC;AAED,MAAM,wBAAwB,GAAG,CAAC,MAAkB,EAA2B,EAAE;IAC/E,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,IAAA,oBAAQ,EAAC,MAAM,CAAC,CAAC,CAAC;IACnE,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,eAAG,CAAC,CAAC;IAChC,IAAI,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;QACxD,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;KAChE;AACH,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decomposedSourceAdapter.js","sourceRoot":"","sources":["../../../../src/resolve/adapters/decomposedSourceAdapter.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,2CAAqD;AAErD,wDAAqD;AACrD,uCAAqE;AAErE,2EAAwE;AAGxE,MAAM,QAAQ,OAAG,eAAQ,CAAc,oCAAoC,EAAE,KAAK,s4JAAC,CAAC;AAEpF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAa,uBAAwB,SAAQ,qDAAyB;IAAtE;;QACY,cAAS,GAAG,IAAI,CAAC;QACjB,wBAAmB,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"decomposedSourceAdapter.js","sourceRoot":"","sources":["../../../../src/resolve/adapters/decomposedSourceAdapter.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,2CAAqD;AAErD,wDAAqD;AACrD,uCAAqE;AAErE,2EAAwE;AAGxE,MAAM,QAAQ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EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAC7E,oBAAoB,CACrB,CAAC;aACH;YACD,IAAI,SAAS,EAAE;gBACb,SAAS,CAAC,OAAO,GAAG,aAAa,CAAC;aACnC;SACF;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAtFD,0DAsFC"}
|
|
@@ -7,7 +7,7 @@ exports.DigitalExperienceSourceAdapter = void 0;
|
|
|
7
7
|
* Licensed under the BSD 3-Clause license.
|
|
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
|
-
const
|
|
10
|
+
const node_path_1 = require("node:path");
|
|
11
11
|
const core_1 = require("@salesforce/core");
|
|
12
12
|
const common_1 = require("../../common");
|
|
13
13
|
const __1 = require("..");
|
|
@@ -63,14 +63,14 @@ class DigitalExperienceSourceAdapter extends bundleSourceAdapter_1.BundleSourceA
|
|
|
63
63
|
if (!this.type.metaFileSuffix) {
|
|
64
64
|
throw messages.createError('missingMetaFileSuffix', [this.type.name]);
|
|
65
65
|
}
|
|
66
|
-
return (0,
|
|
66
|
+
return (0, node_path_1.join)((0, node_path_1.dirname)(trigger), this.type.metaFileSuffix);
|
|
67
67
|
}
|
|
68
68
|
trimPathToContent(path) {
|
|
69
69
|
if (this.isBundleType()) {
|
|
70
70
|
return path;
|
|
71
71
|
}
|
|
72
|
-
const pathToContent = (0,
|
|
73
|
-
const parts = pathToContent.split(
|
|
72
|
+
const pathToContent = (0, node_path_1.dirname)(path);
|
|
73
|
+
const parts = pathToContent.split(node_path_1.sep);
|
|
74
74
|
/* Handle mobile or tablet variants.Eg- digitalExperiences/site/lwr11/sfdc_cms__view/home/mobile/mobile.json
|
|
75
75
|
Go back to one level in that case
|
|
76
76
|
Bundle hierarchy baseType/spaceApiName/contentType/contentApiName/variantFolders/file */
|
|
@@ -79,7 +79,7 @@ class DigitalExperienceSourceAdapter extends bundleSourceAdapter_1.BundleSourceA
|
|
|
79
79
|
const depth = parts.length - digitalExperiencesIndex - 1;
|
|
80
80
|
if (depth === digitalExperienceBundleWithVariantsDepth) {
|
|
81
81
|
parts.pop();
|
|
82
|
-
return parts.join(
|
|
82
|
+
return parts.join(node_path_1.sep);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
return pathToContent;
|
|
@@ -121,20 +121,20 @@ class DigitalExperienceSourceAdapter extends bundleSourceAdapter_1.BundleSourceA
|
|
|
121
121
|
}
|
|
122
122
|
getBundleName(contentPath) {
|
|
123
123
|
const bundlePath = this.getBundleMetadataXmlPath(contentPath);
|
|
124
|
-
return `${(0, utils_1.parentName)((0,
|
|
124
|
+
return `${(0, utils_1.parentName)((0, node_path_1.dirname)(bundlePath))}/${(0, utils_1.parentName)(bundlePath)}`;
|
|
125
125
|
}
|
|
126
126
|
getBundleMetadataXmlPath(path) {
|
|
127
127
|
if (this.isBundleType() && path.endsWith(common_1.META_XML_SUFFIX)) {
|
|
128
128
|
// if this is the bundle type and it ends with -meta.xml, then this is the bundle metadata xml path
|
|
129
129
|
return path;
|
|
130
130
|
}
|
|
131
|
-
const pathParts = path.split(
|
|
131
|
+
const pathParts = path.split(node_path_1.sep);
|
|
132
132
|
const typeFolderIndex = pathParts.lastIndexOf(this.type.directoryName);
|
|
133
133
|
// 3 because we want 'digitaExperiences' directory, 'baseType' directory and 'bundleName' directory
|
|
134
|
-
const basePath = pathParts.slice(0, typeFolderIndex + 3).join(
|
|
134
|
+
const basePath = pathParts.slice(0, typeFolderIndex + 3).join(node_path_1.sep);
|
|
135
135
|
const bundleFileName = pathParts[typeFolderIndex + 2];
|
|
136
136
|
const suffix = this.isBundleType() ? this.type.suffix : this.registry.getParentType(this.type.id)?.suffix;
|
|
137
|
-
return `${basePath}${
|
|
137
|
+
return `${basePath}${node_path_1.sep}${bundleFileName}.${suffix}${common_1.META_XML_SUFFIX}`;
|
|
138
138
|
}
|
|
139
139
|
isBundleType() {
|
|
140
140
|
return this.type.id === 'digitalexperiencebundle';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"digitalExperienceSourceAdapter.js","sourceRoot":"","sources":["../../../../src/resolve/adapters/digitalExperienceSourceAdapter.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH
|
|
1
|
+
{"version":3,"file":"digitalExperienceSourceAdapter.js","sourceRoot":"","sources":["../../../../src/resolve/adapters/digitalExperienceSourceAdapter.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,yCAA+C;AAC/C,2CAA4C;AAC5C,yCAA+C;AAC/C,0BAAqC;AAErC,uCAAmD;AAEnD,+DAA4D;AAG5D,MAAM,QAAQ,OAAG,eAAQ,CAAc,oCAAoC,EAAE,KAAK,s4JAAC,CAAC;AACpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAa,8BAA+B,SAAQ,yCAAmB;IAC3D,sBAAsB,CAAC,OAAe;QAC9C,IAAI,IAAI,CAAC,YAAY,EAAE,EAAE;YACvB,OAAO,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC;SAC/C;QACD,wDAAwD;QACxD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;YAC7B,MAAM,QAAQ,CAAC,WAAW,CAAC,uBAAuB,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;SACvE;QACD,OAAO,IAAA,gBAAI,EAAC,IAAA,mBAAO,EAAC,OAAO,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAC1D,CAAC;IAES,iBAAiB,CAAC,IAAY;QACtC,IAAI,IAAI,CAAC,YAAY,EAAE,EAAE;YACvB,OAAO,IAAI,CAAC;SACb;QACD,MAAM,aAAa,GAAG,IAAA,mBAAO,EAAC,IAAI,CAAC,CAAC;QACpC,MAAM,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC,eAAG,CAAC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ACnE,MAAM,cAAc,GAAG,SAAS,CAAC,eAAe,GAAG,CAAC,CAAC,CAAC;QACtD,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;QAC1G,OAAO,GAAG,QAAQ,GAAG,eAAG,GAAG,cAAc,IAAI,MAAM,GAAG,wBAAe,EAAE,CAAC;IAC1E,CAAC;IAEO,YAAY;QAClB,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,yBAAyB,CAAC;IACpD,CAAC;CACF;AAnGD,wEAmGC;AAED;;;GAGG;AACH,MAAM,qBAAqB,GAAG,CAAC,WAAmB,EAAU,EAAE,CAAC,GAAG,IAAA,kBAAU,EAAC,WAAW,CAAC,IAAI,IAAA,gBAAQ,EAAC,WAAW,CAAC,EAAE,CAAC;AAErH,wFAAwF;AACxF,MAAM,wCAAwC,GAAG,CAAC,CAAC"}
|
|
@@ -7,9 +7,9 @@ exports.MixedContentSourceAdapter = void 0;
|
|
|
7
7
|
* Licensed under the BSD 3-Clause license.
|
|
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
|
-
const
|
|
10
|
+
const node_path_1 = require("node:path");
|
|
11
11
|
const core_1 = require("@salesforce/core");
|
|
12
|
-
const
|
|
12
|
+
const path_1 = require("../../utils/path");
|
|
13
13
|
const sourceComponent_1 = require("../sourceComponent");
|
|
14
14
|
const baseSourceAdapter_1 = require("./baseSourceAdapter");
|
|
15
15
|
const messages = new core_1.Messages('@salesforce/source-deploy-retrieve', 'sdr', new Map([["md_request_fail", "Metadata API request failed: %s"], ["error_convert_invalid_format", "Invalid conversion format '%s'"], ["error_could_not_infer_type", "%s: Could not infer a metadata type"], ["error_unexpected_child_type", "Unexpected child metadata [%s] found for parent type [%s]"], ["noParent", "Could not find parent type for %s (%s)"], ["error_expected_source_files", "%s: Expected source files for type '%s'"], ["error_failed_convert", "Component conversion failed: %s"], ["error_merge_metadata_target_unsupported", "Merge convert for metadata target format currently unsupported"], ["error_missing_adapter", "Missing adapter '%s' for metadata type '%s'"], ["error_missing_transformer", "Missing transformer '%s' for metadata type '%s'"], ["error_missing_type_definition", "Missing metadata type definition in registry for id '%s'."], ["error_missing_child_type_definition", "Type %s does not have a child type definition %s."], ["noChildTypes", "No child types found in registry for %s (reading %s at %s)"], ["error_no_metadata_xml_ignore", "Metadata xml file %s is forceignored but is required for %s."], ["noSourceIgnore", "%s metadata types require source files, but %s is forceignored."], ["noSourceIgnore.actions", "- Metadata types with content are composed of two files: a content file (ie MyApexClass.cls) and a -meta.xml file (i.e MyApexClass.cls-meta.xml). You must include both files in your .forceignore file. Or try appending \u201C\\*\u201D to your existing .forceignore entry.\n\nSee <https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm> for examples"], ["error_path_not_found", "%s: File or folder not found"], ["noContentFound", "SourceComponent %s (metadata type = %s) is missing its content file."], ["noContentFound.actions", ["Ensure the content file exists in the expected location.", "If the content file is in your .forceignore file, ensure the meta-xml file is also ignored to completely exclude it."]], ["error_parsing_xml", "SourceComponent %s (metadata type = %s) does not have an associated metadata xml to parse"], ["error_expected_file_path", "%s: path is to a directory, expected a file"], ["error_expected_directory_path", "%s: path is to a file, expected a directory"], ["error_directory_not_found_or_not_directory", "%s: path is not a directory"], ["error_no_directory_stream", "%s doesn't support readable streams on directories."], ["error_no_source_to_deploy", "No source-backed components present in the package."], ["error_no_components_to_retrieve", "No components in the package to retrieve."], ["error_static_resource_expected_archive_type", "A StaticResource directory must have a content type of application/zip or application/jar - found %s for %s."], ["error_static_resource_missing_resource_file", "A StaticResource must have an associated .resource file, missing %s.resource-meta.xml"], ["error_no_job_id", "The %s operation is missing a job ID. Initialize an operation with an ID, or start a new job."], ["invalid_xml_parsing", "error parsing %s due to:\\n message: %s\\n line: %s\\n code: %s"], ["zipBufferError", "Zip buffer was not created during conversion"], ["undefinedComponentSet", "Unable to construct a componentSet. Check the logs for more information."], ["replacementsFileNotRead", "The file \"%s\" specified in the \"replacements\" property of sfdx-project.json could not be read."], ["unsupportedBundleType", "Unsupported Bundle Type: %s"], ["filePathGeneratorNoTypeSupport", "Type not supported for filepath generation: %s"], ["missingFolderType", "The registry has %s as is inFolder but it does not have a folderType"], ["tooManyFiles", "Multiple files found for path: %s."], ["cantGetName", "Unable to calculate fullName from path: %s (%s)"], ["missingMetaFileSuffix", "The metadata registry is configured incorrectly for %s. Expected a metaFileSuffix."], ["uniqueIdElementNotInRegistry", "No uniqueIdElement found in registry for %s (reading %s at %s)."], ["uniqueIdElementNotInChild", "The uniqueIdElement %s was not found the child (reading %s at %s)."], ["suggest_type_header", "A metadata type lookup for \"%s\" found the following close matches:"], ["suggest_type_did_you_mean", "-- Did you mean \".%s%s\" instead for the \"%s\" metadata type?"], ["suggest_type_more_suggestions", "Additional suggestions:\nConfirm the file name, extension, and directory names are correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"]]));
|
|
@@ -45,14 +45,14 @@ class MixedContentSourceAdapter extends baseSourceAdapter_1.BaseSourceAdapter {
|
|
|
45
45
|
getRootMetadataXmlPath(trigger) {
|
|
46
46
|
if (this.ownFolder) {
|
|
47
47
|
const componentRoot = this.trimPathToContent(trigger);
|
|
48
|
-
return this.tree.find('metadataXml', (0,
|
|
48
|
+
return this.tree.find('metadataXml', (0, node_path_1.basename)(componentRoot), componentRoot);
|
|
49
49
|
}
|
|
50
50
|
return this.findMetadataFromContent(trigger);
|
|
51
51
|
}
|
|
52
52
|
populate(trigger, component) {
|
|
53
53
|
const trimmedPath = this.trimPathToContent(trigger);
|
|
54
54
|
const contentPath = trimmedPath === component?.xml
|
|
55
|
-
? this.tree.find('content', (0,
|
|
55
|
+
? this.tree.find('content', (0, path_1.baseName)(trimmedPath), (0, node_path_1.dirname)(trimmedPath))
|
|
56
56
|
: trimmedPath;
|
|
57
57
|
// Content path might be undefined for staticResource where all files are ignored and only the xml is included.
|
|
58
58
|
// Note that if contentPath is a directory that is not ignored, but all the files within it are
|
|
@@ -65,10 +65,10 @@ class MixedContentSourceAdapter extends baseSourceAdapter_1.BaseSourceAdapter {
|
|
|
65
65
|
}
|
|
66
66
|
else {
|
|
67
67
|
component = new sourceComponent_1.SourceComponent({
|
|
68
|
-
name: (0,
|
|
68
|
+
name: (0, path_1.baseName)(contentPath),
|
|
69
69
|
type: this.type,
|
|
70
70
|
content: contentPath,
|
|
71
|
-
xml: this.type.metaFileSuffix && (0,
|
|
71
|
+
xml: this.type.metaFileSuffix && (0, node_path_1.join)(contentPath, this.type.metaFileSuffix),
|
|
72
72
|
}, this.tree, this.forceIgnore);
|
|
73
73
|
}
|
|
74
74
|
return component;
|
|
@@ -82,10 +82,10 @@ class MixedContentSourceAdapter extends baseSourceAdapter_1.BaseSourceAdapter {
|
|
|
82
82
|
* @param type MetadataType to determine content for
|
|
83
83
|
*/
|
|
84
84
|
trimPathToContent(path) {
|
|
85
|
-
const pathParts = path.split(
|
|
85
|
+
const pathParts = path.split(node_path_1.sep);
|
|
86
86
|
const typeFolderIndex = pathParts.lastIndexOf(this.type.directoryName);
|
|
87
87
|
const offset = this.type.inFolder ? 3 : 2;
|
|
88
|
-
return pathParts.slice(0, typeFolderIndex + offset).join(
|
|
88
|
+
return pathParts.slice(0, typeFolderIndex + offset).join(node_path_1.sep);
|
|
89
89
|
}
|
|
90
90
|
/**
|
|
91
91
|
* A utility for finding a component's root metadata xml from a path to a component's
|
|
@@ -98,8 +98,8 @@ class MixedContentSourceAdapter extends baseSourceAdapter_1.BaseSourceAdapter {
|
|
|
98
98
|
*/
|
|
99
99
|
findMetadataFromContent(path) {
|
|
100
100
|
const rootContentPath = this.trimPathToContent(path);
|
|
101
|
-
const rootTypeDirectory = (0,
|
|
102
|
-
const contentFullName = (0,
|
|
101
|
+
const rootTypeDirectory = (0, node_path_1.dirname)(rootContentPath);
|
|
102
|
+
const contentFullName = (0, path_1.baseName)(rootContentPath);
|
|
103
103
|
return this.tree.find('metadataXml', contentFullName, rootTypeDirectory);
|
|
104
104
|
}
|
|
105
105
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mixedContentSourceAdapter.js","sourceRoot":"","sources":["../../../../src/resolve/adapters/mixedContentSourceAdapter.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH
|
|
1
|
+
{"version":3,"file":"mixedContentSourceAdapter.js","sourceRoot":"","sources":["../../../../src/resolve/adapters/mixedContentSourceAdapter.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,yCAAyD;AACzD,2CAAqD;AACrD,2CAA4C;AAE5C,wDAAqD;AACrD,2DAAwD;AAGxD,MAAM,QAAQ,OAAG,eAAQ,CAAc,oCAAoC,EAAE,KAAK,s4JAAC,CAAC;AACpF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAa,yBAA0B,SAAQ,qCAAiB;IAC9D;;;OAGG;IACO,sBAAsB,CAAC,OAAmB;QAClD,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,MAAM,aAAa,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;YACtD,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,IAAA,oBAAQ,EAAC,aAAa,CAAC,EAAE,aAAa,CAAC,CAAC;SAC9E;QACD,OAAO,IAAI,CAAC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AAC,CAAC;QAClC,MAAM,eAAe,GAAG,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1C,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,eAAe,GAAG,MAAM,CAAC,CAAC,IAAI,CAAC,eAAG,CAAC,CAAC;IAChE,CAAC;IAED;;;;;;;;OAQG;IACK,uBAAuB,CAAC,IAAgB;QAC9C,MAAM,eAAe,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;QACrD,MAAM,iBAAiB,GAAG,IAAA,mBAAO,EAAC,eAAe,CAAC,CAAC;QACnD,MAAM,eAAe,GAAG,IAAA,eAAQ,EAAC,eAAe,CAAC,CAAC;QAClD,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,eAAe,EAAE,iBAAiB,CAAC,CAAC;IAC3E,CAAC;CACF;AA9ED,8DA8EC"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.ForceIgnore = void 0;
|
|
10
|
-
const
|
|
10
|
+
const node_path_1 = require("node:path");
|
|
11
11
|
const index_1 = require("ignore/index");
|
|
12
12
|
const graceful_fs_1 = require("graceful-fs");
|
|
13
13
|
const core_1 = require("@salesforce/core");
|
|
@@ -29,7 +29,7 @@ class ForceIgnore {
|
|
|
29
29
|
}
|
|
30
30
|
// add the default ignore paths, and then parse the .forceignore file
|
|
31
31
|
this.parser = (0, index_1.default)().add(`${contents}\n${this.DEFAULT_IGNORE.join('\n')}`);
|
|
32
|
-
this.forceIgnoreDirectory = (0,
|
|
32
|
+
this.forceIgnoreDirectory = (0, node_path_1.dirname)(forceIgnorePath);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
catch (e) {
|
|
@@ -47,7 +47,7 @@ class ForceIgnore {
|
|
|
47
47
|
let potentialForceIgnorePath = '';
|
|
48
48
|
const projectConfigPath = (0, fileSystemHandler_1.searchUp)(seed, ForceIgnore.FILE_NAME);
|
|
49
49
|
if (projectConfigPath) {
|
|
50
|
-
potentialForceIgnorePath = (0,
|
|
50
|
+
potentialForceIgnorePath = (0, node_path_1.join)((0, node_path_1.dirname)(projectConfigPath), ForceIgnore.FILE_NAME);
|
|
51
51
|
}
|
|
52
52
|
return new ForceIgnore(potentialForceIgnorePath);
|
|
53
53
|
}
|
|
@@ -55,7 +55,7 @@ class ForceIgnore {
|
|
|
55
55
|
if (!this.parser || !this.forceIgnoreDirectory)
|
|
56
56
|
return false;
|
|
57
57
|
try {
|
|
58
|
-
return this.parser.ignores((0,
|
|
58
|
+
return this.parser.ignores((0, node_path_1.relative)(this.forceIgnoreDirectory, fsPath));
|
|
59
59
|
}
|
|
60
60
|
catch (e) {
|
|
61
61
|
return false;
|
|
@@ -65,7 +65,7 @@ class ForceIgnore {
|
|
|
65
65
|
if (!this.parser || !this.forceIgnoreDirectory)
|
|
66
66
|
return true;
|
|
67
67
|
try {
|
|
68
|
-
return !this.parser.ignores((0,
|
|
68
|
+
return !this.parser.ignores((0, node_path_1.relative)(this.forceIgnoreDirectory, fsPath));
|
|
69
69
|
}
|
|
70
70
|
catch (e) {
|
|
71
71
|
return true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forceIgnore.js","sourceRoot":"","sources":["../../../src/resolve/forceIgnore.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH
|
|
1
|
+
{"version":3,"file":"forceIgnore.js","sourceRoot":"","sources":["../../../src/resolve/forceIgnore.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,yCAAoD;AACpD,wCAA8C;AAC9C,6CAA2C;AAC3C,2CAA6C;AAE7C,kEAAsD;AAEtD,MAAa,WAAW;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,CAAC;IACnD,CAAC;IAEM,MAAM,CAAC,MAAkB;QAC9B,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,oBAAoB;YAAE,OAAO,KAAK,CAAC;QAC7D,IAAI;YACF,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAA,oBAAQ,EAAC,IAAI,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC,CAAC;SACzE;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,KAAK,CAAC;SACd;IACH,CAAC;IAEM,OAAO,CAAC,MAAkB;QAC/B,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,oBAAoB;YAAE,OAAO,IAAI,CAAC;QAC5D,IAAI;YACF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAA,oBAAQ,EAAC,IAAI,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC,CAAC;SAC1E;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,IAAI,CAAC;SACb;IACH,CAAC;;AAhEH,kCAiEC;AAhEwB,qBAAS,GAAG,cAAc,AAAjB,CAAkB"}
|
|
@@ -7,7 +7,7 @@ exports.MetadataResolver = void 0;
|
|
|
7
7
|
* Licensed under the BSD 3-Clause license.
|
|
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
|
-
const
|
|
10
|
+
const node_path_1 = require("node:path");
|
|
11
11
|
const core_1 = require("@salesforce/core");
|
|
12
12
|
const utils_1 = require("../utils");
|
|
13
13
|
const registry_1 = require("../registry");
|
|
@@ -64,7 +64,7 @@ class MetadataResolver {
|
|
|
64
64
|
return components;
|
|
65
65
|
}
|
|
66
66
|
for (const file of this.tree.readDirectory(dir)) {
|
|
67
|
-
const fsPath = (0,
|
|
67
|
+
const fsPath = (0, node_path_1.join)(dir, file);
|
|
68
68
|
if (ignore.has(fsPath)) {
|
|
69
69
|
continue;
|
|
70
70
|
}
|
|
@@ -96,7 +96,7 @@ class MetadataResolver {
|
|
|
96
96
|
}
|
|
97
97
|
// don't traverse further if not in a root type directory. performance optimization
|
|
98
98
|
// for mixed content types and ensures we don't add duplicates of the component.
|
|
99
|
-
const typeDir = (0,
|
|
99
|
+
const typeDir = (0, node_path_1.basename)((0, node_path_1.dirname)(component.type.inFolder ? (0, node_path_1.dirname)(fsPath) : fsPath));
|
|
100
100
|
if (component.type.strictDirectoryName && typeDir !== component.type.directoryName) {
|
|
101
101
|
return components;
|
|
102
102
|
}
|
|
@@ -155,7 +155,7 @@ class MetadataResolver {
|
|
|
155
155
|
throw new core_1.SfError(messages.getMessage('error_could_not_infer_type', [fsPath]), 'TypeInferenceError', actions);
|
|
156
156
|
}
|
|
157
157
|
resolveTypeFromStrictFolder(fsPath) {
|
|
158
|
-
const pathParts = fsPath.split(
|
|
158
|
+
const pathParts = fsPath.split(node_path_1.sep);
|
|
159
159
|
// first, filter out types that don't appear in the path
|
|
160
160
|
// then iterate using for/of to allow for early break
|
|
161
161
|
return this.registry
|
|
@@ -230,7 +230,7 @@ class MetadataResolver {
|
|
|
230
230
|
const metaSuffix = parsedMetaXml?.suffix;
|
|
231
231
|
// Finds close matches for meta suffixes
|
|
232
232
|
// Examples: https://regex101.com/r/vbRjwy/1
|
|
233
|
-
const closeMetaSuffix = new RegExp(/.+\.([^.-]+)(?:-.*)?\.xml/).exec((0,
|
|
233
|
+
const closeMetaSuffix = new RegExp(/.+\.([^.-]+)(?:-.*)?\.xml/).exec((0, node_path_1.basename)(fsPath));
|
|
234
234
|
let guesses;
|
|
235
235
|
if (metaSuffix) {
|
|
236
236
|
guesses = this.registry.guessTypeBySuffix(metaSuffix);
|
|
@@ -244,7 +244,7 @@ class MetadataResolver {
|
|
|
244
244
|
// If guesses were found, format an array of strings to be passed to SfError's actions
|
|
245
245
|
return guesses && guesses.length > 0
|
|
246
246
|
? [
|
|
247
|
-
messages.getMessage('suggest_type_header', [(0,
|
|
247
|
+
messages.getMessage('suggest_type_header', [(0, node_path_1.basename)(fsPath)]),
|
|
248
248
|
...guesses.map((guess) => messages.getMessage('suggest_type_did_you_mean', [
|
|
249
249
|
guess.suffixGuess,
|
|
250
250
|
metaSuffix || closeMetaSuffix ? '-meta.xml' : '',
|
|
@@ -269,7 +269,7 @@ class MetadataResolver {
|
|
|
269
269
|
const type = this.resolveType(dirPath);
|
|
270
270
|
if (type) {
|
|
271
271
|
const { directoryName, inFolder } = type;
|
|
272
|
-
const parts = dirPath.split(
|
|
272
|
+
const parts = dirPath.split(node_path_1.sep);
|
|
273
273
|
const folderOffset = inFolder ? 2 : 1;
|
|
274
274
|
const typeDirectoryIndex = parts.lastIndexOf(directoryName);
|
|
275
275
|
if (typeDirectoryIndex === -1 ||
|
|
@@ -311,15 +311,15 @@ class MetadataResolver {
|
|
|
311
311
|
*/
|
|
312
312
|
parseAsFolderMetadataXml(fsPath) {
|
|
313
313
|
let folderName;
|
|
314
|
-
const match = new RegExp(/(.+)-meta\.xml/).exec((0,
|
|
314
|
+
const match = new RegExp(/(.+)-meta\.xml/).exec((0, node_path_1.basename)(fsPath));
|
|
315
315
|
if (match && !match[1].includes('.')) {
|
|
316
|
-
const parts = fsPath.split(
|
|
316
|
+
const parts = fsPath.split(node_path_1.sep);
|
|
317
317
|
if (parts.length > 1) {
|
|
318
318
|
const folderContentTypesDirs = this.getFolderContentTypeDirNames();
|
|
319
319
|
// check if the path contains a folder content name as a directory
|
|
320
320
|
// e.g., `/reports/` and if it does return that folder name.
|
|
321
321
|
folderContentTypesDirs.some((dirName) => {
|
|
322
|
-
if (fsPath.includes(`${
|
|
322
|
+
if (fsPath.includes(`${node_path_1.sep}${dirName}${node_path_1.sep}`)) {
|
|
323
323
|
folderName = dirName;
|
|
324
324
|
}
|
|
325
325
|
});
|
|
@@ -336,7 +336,7 @@ class MetadataResolver {
|
|
|
336
336
|
}
|
|
337
337
|
return ['DigitalExperience', 'ExperiencePropertyTypeBundle']
|
|
338
338
|
.map((type) => this.registry.getTypeByName(type))
|
|
339
|
-
.find((type) => fsPath.split(
|
|
339
|
+
.find((type) => fsPath.split(node_path_1.sep).includes(type.directoryName))?.name;
|
|
340
340
|
}
|
|
341
341
|
isMetadata(fsPath) {
|
|
342
342
|
return (!!(0, utils_1.parseMetadataXml)(fsPath) ||
|