forcedotcom / isvte-sfdx-plugin

BSD 3-Clause "New" or "Revised" License
42 stars 8 forks source link

Allow to run isvte:mdscan from a SFDX Project folder + package.xml #4

Closed nvuillam closed 4 years ago

nvuillam commented 4 years ago

Please tell if you need any update in the PR content :)

Example log:

$ C:/Work/git/isvte-sfdx-plugin/bin/run isvte:mdscan -d ./force-app/main/default -p ./../../Config/packageXml/package_DevRoot_Managed.xml
Initialize filtering of ./tmp/mdapi ,using ./../../Config/packageXml/package_DevRoot_Managed.xml , into ./tmp/mdapiFiltered
Total                          [████████████████████████████████████████] 100% | 3/3 | Completed in 0:19
Initialize                     [████████████████████████████████████████] 100% | 1/1 | Completed in 0:01
Filter metadatas by type       [████████████████████████████████████████] 100% | 28/28 | Completed in 0:12
Copy impacted objects          [████████████████████████████████████████] 100% | 66/66 | Completed in 0:06

{"metadataTypes":{"ApexClass":{"nbCopied":610},"ApexComponent":{"nbCopied":2},"ApexPage":{"nbCopied":46},"ApexTrigger":{"nbCopied":22},"AuraDefinitionBundle":{"nbCopied":366},"ContentAsset":{"nbCopied":6},"CustomApplication":{"nbCopied":2},"CustomField":{"nbCopied":0},"CustomLabel":{"nbCopied":0},"CustomMetadata":{"nbCopied":55},"CustomObject":{"nbCopied":0},"CustomObjectTranslation":{"nbCopied":76},"CustomTab":{"nbCopied":36},"Document":{"nbCopied":4},"EmailTemplate":{"nbCopied":6},"GlobalValueSet":{"nbCopied":19},"GlobalValueSetTranslation":{"nbCopied":35},"HomePageLayout":{"nbCopied":1},"Layout":{"nbCopied":39},"ListView":{"nbCopied":0},"PermissionSet":{"nbCopied":6},"QuickAction":{"nbCopied":3},"RecordType":{"nbCopied":0},"StandardValueSet":{"nbCopied":3},"StandardValueSetTranslation":{"nbCopied":1},"StaticResource":{"nbCopied":80},"Translations":{"nbCopied":5},"Workflow":{"nbCopied":24}},"objects":["Account".....],"objectsTranslations":["Account-fr"....]}
=== Inventory of Package:
METADATA TYPE                                   COUNT
──────────────────────────────────────────────  ─────
Permission Sets                                 6
Custom Profiles                                 0
Custom Metadata                                 56
Feature Parameters (Boolean)                    0
Feature Parameters (Date)                       0
Feature Parameters (Integer)                    0
Custom Settings                                 0
Custom Labels                                   0
Tabs                                            36
Flows                                           0
Apex Classes                                    305
  With Future Methods                           7
  With Aura Enabled Methods                     81
  With Invocable Methods or Variables           0
  Batch Apex                                    2
  Apex REST                                     1
  SOAP Web Services                             0
  Schedulable Apex                              4
Apex Triggers                                   11
  Async Triggers                                0
  Triggers on User                              1
......
Custom Reports                                  0
Custom Report Types                             0
Custom Apps                                     2
  Lighting Applications                         0
   Lighting Consoles                            0
  Classic Applications                          0
   Classic Consoles                             0
Connected Apps                                  0
In-App Prompts                                  0
Static Resources                                40
Sharing Rules                                   0
Validation Rules                                0
Custom Objects                                  62
  Big Objects                                   0
  External Objects                              0
Custom Fields                                   689
  Total Fields on Standard Objects              170
   Fields on Account                            82
.......
  Total Fields on Custom Objects                519
   Fields on Benefit__c                         15
.......
Platform Events                                 0
Territory Management                            0
Territory Management 2.0                        0
Visualforce Pages                               23
Aura Web Components                             366
Lightning Web Components                        0
Einstein Analytics Applications                 0
Einstein Analytics Dashboards                   0
Einstein Analytics Dataflows                    0
Einstein Analytics Datasets                     0
Einstein Analytics Lenses                       0
Einstein Analytics Template Bundles             0
Einstein Analytics Dashboards                   0
Person Accounts Enabled?                        0
Record Types                                    37

=== Best Practices and Feature Recommendations:
Take Advantage of Flows:
Flows are a powerful tool to enable forms based workflows and process automation to your users. See this webinar for more information. 
URL:https://partners.salesforce.com/0693A000007S2Dq

Follow best practices for Batch Apex:
For more information on Batch Apex Design patterns and how best to package Batch Apex, see this webinar.
URL:https://partners.salesforce.com/0693A000006aF9G

Take Advantage of In-App Prompts:
For more information about how to use In-App Prompts to keep your users informed, see this blog.
URL:https://medium.com/inside-the-salesforce-ecosystem/in-app-prompts-for-isvs-e9b013969016

Take Advantage of Platform Cache:
Use Platform Cache to improve the performance of your application.
URL:https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_cache_namespace_overview.htm

Be aware of limits on Custom Fields on Activity:
Please be aware that there is a hard limit of 100 fields on the Activity object including all managed and unmanaged fields. Your package will not install if this raises the number of fields on the Activity object past this threshold in your subscriber's org.

Learn about migrating from Aura Web Components to Lightning Web Components:
Lightning Web Components are the new Salesforce standard for Lightning Components featuring easier devlopment, better performance and standards compliance. For a decision matrix on whether you should be considering migrating to LWC see this blog.
URL:https://medium.com/inside-the-salesforce-ecosystem/lightning-web-components-an-isv-partner-digest-59d9191f3248

=== Quality Rules:
Custom Objects should have a description:
It is a best practice that Custom Objects have a description.
xxxxxxxxxx

=== Partner Alerts:
Sign up here to be notified of all Partner Alerts: 
URL:https://partners.salesforce.com/partnerAlert?id=a033A00000FtFWqQAN

@AuraEnabled Methods:
New Permissions Required to Access Apex Classes containing @AuraEnabled methods.
URL:https://partners.salesforce.com/partnerAlert?id=a033A00000Fvo12QAB
Components: AuraEnabledCalls

Aura Components in UI Namespace Retiring in Summer '21:
In Summer '21, Lightning Base Components in the ui namespace will be retired.
URL:https://partners.salesforce.com/partnerAlert?id=a033A00000GXNKsQAP
Components: forgotPassword, loginForm

Custom Metadata:
New Permissions Required for Direct Read Access to Custom Metadata Types.
URL:https://partners.salesforce.com/partnerAlert?id=a033A00000GimUSQAZ
Components: CustomMetadata

Change to Record Type Access:
There have been changes to Record Type access in permission sets within Managed Packages for Winter '20 in response to a Known Issue. Subscribers may need to upgrade your package to see this fix.
URL:https://partners.salesforce.com/partnerAlert?id=a033A00000GSdBoQAL
Components: RecordType

=== Installation Warnings:
Package cannot be installed in Essentials due to:
  Record Types count (37) is greater than the edition limit (0)

Package cannot be installed in Group Edition due to:
  Record Types count (37) is greater than the edition limit (0)

=== Technology Adoption:

Which platform technology does your application use as its primary data store?

   Custom Objects: Found

Which other platform technologies does your application use to process and store data?

   Custom Objects: Found
   Big Objects: Not Found
   Platform Events: Not Found
   Change Data Capture: Not Found

Which user interface technologies does your application use to deliver the end-user experience?

   Lightning Web Components: Not Found
   Aura Lightning Components: Found
   Visualforce Pages: Found

Which technologies does your app use for application processing and security?

   Process Builder: Not Found
   Screen Flows: Not Found
   Autolaunched Flows: Not Found
   Apex: Found
   Platform Cache: Not Found
nvuillam commented 4 years ago

5 feb... if you reject this PR, plz just say so :)

jhaydraude commented 4 years ago

@nvuillam sorry for the delay. We had been working on some fundamental changes to the way rules are processed before addressing this PR.

I have now added these changes in the https://github.com/forcedotcom/isvte-sfdx-plugin/tree/sfdxessentials branch.

Before I merge into master, is it possible to remove this debug message?

{"metadataTypes":{"Flow":{"nbCopied":2},"Layout":{"nbCopied":3},"CustomField":{"nbCopied":0},"CustomObject":{"nbCopied":0},"PermissionSet":{"nbCopied":1},"Profile":{"nbCopied":4}},"objects":["Activity","CustomObj__c"],"objectsTranslations":[]}

nvuillam commented 4 years ago

I'll manage conflicts and remove the debug line tomorrow :) ( maybe you prefer I display them as "human" text ? )

nvuillam commented 4 years ago

@jhaydraude this is done , please let me know if it's ok for you :)