forked from forcedotcom/source-deploy-retrieve
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnonSupportedTypes.ts
89 lines (77 loc) · 2.76 KB
/
nonSupportedTypes.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*
* Copyright (c) 2021, salesforce.com, inc.
* All rights reserved.
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import { CoverageObjectType } from './types';
/**
* when checking for completeness or building registries
* this is the list of features that are not available,
* typically because the devhub doesn't support them, so we can't use metadataDescribe
*
* */
export const features = [
// ERROR running force:org:create: * is not a valid Features value.
'SERVICECATALOG',
'DYNAMICATTRIBUTES',
'CONTRACTMGMT',
'CUSTOMIZABLENAMEDCREDENTIALS',
'INDUSTRIESMFGPROGRAMPILOT',
'HEALTHCLOUDHPIBETA',
'MANAGETIMELINE',
'HEALTHCLOUDBETA',
'EMBEDDEDSERVICEMESSAGING',
'UNIFIEDHEALTHSCORING',
'EINSTEINDOCREADER',
'ACCOUNTINGSUBLEDGERACCESS',
'INSURANCECALCULATIONUSER',
'SCFUELTYPEPILOTFEATURE',
'B2CEREPRICINGKILLSWITCH',
'USERACCESSPOLICIESFORPILOTVISIBILITY',
'BOTBLOCKS',
'INDUSTRIESINTERACTIONCALCULATION',
'BUSINESSRULESENGINE',
'PARDOTADVANCED', // org:create throws a C-9999 when this is not excluded
];
export const settings = [
'botSettings', // have not successfully deployed this because of licensing errors when deploying settings
];
export const metadataTypes = [
// things that don't show up in describe so far
'PicklistValue', // only existed in v37, so it's hard to describe!
// two children of GlobalValueSet
'CustomValue',
'StandardValue',
// the following are not describable based on their features/settings, see git blame for last time checked
'DiscoveryStory',
'EmployeeDataSyncProfile',
'RelatedRecordAssocCriteria',
'ScoreRange',
'WorkflowFlowAction',
// the metadata coverage report seems to be missing a setting:
// A scratch org was created with username [email protected], but the settings failed to deploy due to: enableInsights
'ReferencedDashboard',
'WaveAnalyticAssetCollection',
// spins up fine with feature B2CLOYALTYMANAGEMENT, not in describe
'ExpressionSetObjectAlias',
// requires no features, but not in describe
'ExternalDataSrcDescriptor',
// spun up with COMMONPRM, not in describe
'PortalDelegablePermissionSet',
// spun up with CUSTOMERDATAPLATFORM, not in describe
'ExternalDataTranField',
'ExternalDataTranObject',
];
export const hasUnsupportedFeatures = (type: CoverageObjectType): boolean => {
if (!type.orgShapes?.developer) {
return true;
}
if (
type.orgShapes.developer.features?.length &&
features.some((feature) => type.orgShapes?.developer.features.includes(feature))
) {
return true;
}
return type.orgShapes?.developer.settings && settings.some((setting) => type.orgShapes?.developer.settings[setting]);
};