From 1ae9283d6ce604a73e1c91ec564e5bf7fa2c5cbd Mon Sep 17 00:00:00 2001 From: Jonathan Gillespie Date: Sat, 14 Sep 2024 16:45:58 -0400 Subject: [PATCH] [WIP] --- README.md | 4 +- ...emo_OSHelloworld_English_1.os-meta.xml.xml | 92 ------------------- ...ardHelloworld_Demo_Template_1.ouc-meta.xml | 12 --- ...iStudioRecipesAdmin.permissionset-meta.xml | 10 ++ .../main/logger-engine/classes/Logger.cls | 2 +- .../lwc/logger/logEntryBuilder.js | 2 +- package.json | 2 +- sfdx-project.json | 6 +- 8 files changed, 18 insertions(+), 112 deletions(-) delete mode 100644 config/scratch-orgs/omnistudio/omniScripts/demo_OSHelloworld_English_1.os-meta.xml.xml delete mode 100644 config/scratch-orgs/omnistudio/omniUiCard/demoFlexCardHelloworld_Demo_Template_1.ouc-meta.xml create mode 100644 config/scratch-orgs/omnistudio/permissionsets/LoggerOmniStudioRecipesAdmin.permissionset-meta.xml diff --git a/README.md b/README.md index 5f9170d0d..a406ec163 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ The most robust observability solution for Salesforce experts. Built 100% natively on the platform, and designed to work seamlessly with Apex, Lightning Components, Flow, Process Builder & integrations. -## Unlocked Package - v4.14.9 +## Unlocked Package - v4.14.10 [![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oSQQAY) [![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oSQQAY) @@ -31,7 +31,7 @@ The most robust observability solution for Salesforce experts. Built 100% native ## Features -1. Easily add log entries via Apex, Lightning Components (lightning web components (LWCs) & aura components), Flow & Process Builder to generate 1 consolidated, unified log +1. A unified logging tool that supports easily adding log entries via Apex, Lightning Components (lightning web components (LWCs) & aura components), Flow & Process Builder, and OmniStudio's OmniScripts 2. Manage & report on logging data using the `Log__c` and `LogEntry__c` objects 3. Leverage `LogEntryEvent__e` platform events for real-time monitoring & integrations 4. Enable logging and set the logging level for different users & profiles using `LoggerSettings__c` custom hierarchy setting diff --git a/config/scratch-orgs/omnistudio/omniScripts/demo_OSHelloworld_English_1.os-meta.xml.xml b/config/scratch-orgs/omnistudio/omniScripts/demo_OSHelloworld_English_1.os-meta.xml.xml deleted file mode 100644 index 7f2590f5f..000000000 --- a/config/scratch-orgs/omnistudio/omniScripts/demo_OSHelloworld_English_1.os-meta.xml.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - Simple Hello World OS - {"ElementTypeToHTMLTemplateList":[]} - false - false - false - false - false - true - English - demoOS - - - true - false - 1.0 - HelloWorldFlexCard - 0.0 - { - "controlWidth" : 12, - "label" : "Hello World Flex Card", - "show" : null, - "conditionType" : "Hide if False", - "hide" : false, - "lwcName" : "cfDemoFlexCardHelloworld", - "bStandalone" : false, - "customAttributes" : [ ] -} - 0.0 - Custom Lightning Web Component - - true - false - 0.0 - Step1 - 0.0 - { - "label" : "Step 1", - "validationRequired" : true, - "previousLabel" : "Previous", - "previousWidth" : 3, - "nextLabel" : "Next", - "nextWidth" : 3, - "cancelLabel" : "Cancel", - "cancelMessage" : "Are you sure?", - "saveLabel" : "Save for later", - "saveMessage" : "Are you sure you want to save it for later?", - "completeLabel" : "Complete", - "completeMessage" : "Are you sure you want to complete the script?", - "instruction" : "", - "showPersistentComponent" : [ true, false ], - "remoteClass" : "", - "remoteMethod" : "", - "remoteTimeout" : 30000, - "remoteOptions" : { }, - "knowledgeOptions" : { - "language" : "English", - "publishStatus" : "Online", - "keyword" : "", - "dataCategoryCriteria" : "", - "remoteTimeout" : 30000, - "typeFilter" : "" - }, - "show" : null, - "conditionType" : "Hide if False", - "HTMLTemplateId" : "", - "instructionKey" : "", - "chartLabel" : null, - "allowSaveForLater" : true, - "errorMessage" : { - "custom" : [ ], - "default" : null - }, - "wpm" : false, - "ssm" : false, - "message" : { }, - "pubsub" : false, - "businessCategory" : "", - "businessEvent" : "" -} - 0.0 - Step - - OmniScript - {"persistentComponent":[{"render":false,"label":"","remoteClass":"","remoteMethod":"","remoteTimeout":30000,"remoteOptions":{"preTransformBundle":"","postTransformBundle":""},"preTransformBundle":"","postTransformBundle":"","sendJSONPath":"","sendJSONNode":"","responseJSONPath":"","responseJSONNode":"","id":"vlcCart","itemsKey":"cartItems","modalConfigurationSetting":{"modalHTMLTemplateId":"vlcProductConfig.html","modalController":"ModalProductCtrl","modalSize":"lg"}},{"render":false,"dispOutsideOmni":false,"label":"","remoteClass":"","remoteMethod":"","remoteTimeout":30000,"remoteOptions":{"preTransformBundle":"","postTransformBundle":""},"preTransformBundle":"","postTransformBundle":"","id":"vlcKnowledge","itemsKey":"knowledgeItems","modalConfigurationSetting":{"modalHTMLTemplateId":"","modalController":"","modalSize":"lg"}}],"allowSaveForLater":true,"saveNameTemplate":null,"saveExpireInDays":null,"saveForLaterRedirectPageName":"sflRedirect","saveForLaterRedirectTemplateUrl":"vlcSaveForLaterAcknowledge.html","saveContentEncoded":false,"saveObjectId":"%ContextId%","saveURLPatterns":{},"autoSaveOnStepNext":false,"elementTypeToHTMLTemplateMapping":{},"seedDataJSON":{},"trackingCustomData":{},"enableKnowledge":false,"bLK":false,"lkObjName":null,"knowledgeArticleTypeQueryFieldsMap":{},"timeTracking":false,"hideStepChart":false,"mergeSavedData":false,"visualforcePagesAvailableInPreview":{},"cancelType":"SObject","allowCancel":true,"cancelSource":"%ContextId%","cancelRedirectPageName":"OmniScriptCancelled","cancelRedirectTemplateUrl":"vlcCancelled.html","consoleTabLabel":"New","wpm":false,"ssm":false,"message":{},"pubsub":false,"autoFocus":false,"currencyCode":"","showInputWidth":false,"rtpSeed":false,"consoleTabTitle":null,"consoleTabIcon":"custom:custom18","errorMessage":{"custom":[]},"stylesheet":{"newport":"","lightning":"","newportRtl":"","lightningRtl":""},"stepChartPlacement":"right","disableUnloadWarn":true,"scrollBehavior":"auto","currentLanguage":"en_US"} - OSHelloworld - demo - demo_OSHelloworld_English_1 - 1.0 - 5727931e-6ffe-ad70-57b5-831d608cf7d1 - diff --git a/config/scratch-orgs/omnistudio/omniUiCard/demoFlexCardHelloworld_Demo_Template_1.ouc-meta.xml b/config/scratch-orgs/omnistudio/omniUiCard/demoFlexCardHelloworld_Demo_Template_1.ouc-meta.xml deleted file mode 100644 index 691a06b39..000000000 --- a/config/scratch-orgs/omnistudio/omniUiCard/demoFlexCardHelloworld_Demo_Template_1.ouc-meta.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - Demo_Template - {"type":"IntegrationProcedures","value":{"dsDelay":"","resultVar":"[\"drHelloworld\"]","ipMethod":"demo_IPHelloworld","vlocityAsync":false},"orderBy":{"name":"","isReverse":""},"contextVariables":[]} - Simple Hello World Flex Card - true - demoFlexCardHelloworld - Parent - {"states":[{"fields":[],"conditions":{"id":"state-condition-object","isParent":true,"group":[]},"definedActions":{"actions":[]},"name":"Active","isSmartAction":false,"smartAction":{},"styleObject":{"padding":[{"type":"around","size":"x-small"}],"margin":[{"type":"bottom","size":"x-small"}],"container":{"class":"slds-card"},"size":{"isResponsive":false,"default":"12"},"sizeClass":"slds-size_12-of-12","class":"slds-card slds-p-around_x-small slds-m-bottom_x-small"},"components":{"layer-0":{"children":[{"name":"Instance","element":"outputField","size":{"isResponsive":false,"default":"12"},"stateIndex":0,"class":"slds-col ","property":{"placeholder":"output","record":"{record}","fieldName":"Instance","label":"Salesforce Instance Name","card":"{card}","type":"text"},"type":"field","styleObject":{"sizeClass":"slds-size_12-of-12"},"elementLabel":"Instance-0"},{"name":"OrgName","element":"outputField","size":{"isResponsive":false,"default":"12"},"stateIndex":0,"class":"slds-col ","property":{"placeholder":"output","record":"{record}","fieldName":"OrgName","label":"Salesforce Org Name","card":"{card}","type":"text"},"type":"field","styleObject":{"sizeClass":"slds-size_12-of-12"},"elementLabel":"OrgName-1"},{"name":"OrgId","element":"outputField","size":{"isResponsive":false,"default":"12"},"stateIndex":0,"class":"slds-col ","property":{"placeholder":"output","record":"{record}","fieldName":"OrgId","label":"Organization Id","card":"{card}","type":"text"},"type":"field","styleObject":{"sizeClass":"slds-size_12-of-12"},"elementLabel":"OrgId-2"}]}},"childCards":[],"actions":[],"omniscripts":[],"documents":[]}],"dataSource":{"type":"IntegrationProcedures","value":{"dsDelay":"","resultVar":"[\"drHelloworld\"]","ipMethod":"demo_IPHelloworld","vlocityAsync":false},"orderBy":{"name":"","isReverse":""},"contextVariables":[]},"title":"demoFlexCardHelloworld","enableLwc":true,"isFlex":true,"theme":"slds","selectableMode":"Multi","xmlObject":{"targetConfigs":"PHRhcmdldENvbmZpZyB0YXJnZXRzPSJsaWdodG5pbmdfX0FwcFBhZ2UiPgogICAgICAgICAgICAgICAgICAgICAgPHByb3BlcnR5IG5hbWU9ImRlYnVnIiB0eXBlPSJCb29sZWFuIi8+CiAgICAgICAgICAgICAgICAgICAgICA8cHJvcGVydHkgbmFtZT0icmVjb3JkSWQiIHR5cGU9IlN0cmluZyIvPgogICAgICAgICAgICAgICAgICA8L3RhcmdldENvbmZpZz4KICAgICAgICAgICAgICAgICAgPHRhcmdldENvbmZpZyB0YXJnZXRzPSJsaWdodG5pbmdfX1JlY29yZFBhZ2UiPgogICAgICAgICAgICAgICAgICAgICAgPHByb3BlcnR5IG5hbWU9ImRlYnVnIiB0eXBlPSJCb29sZWFuIi8+CiAgICAgICAgICAgICAgICAgIDwvdGFyZ2V0Q29uZmlnPg==","targets":{"target":["lightning__RecordPage","lightning__AppPage","lightning__HomePage"]}},"xmlJson":[{"@attributes":{"targets":"lightning__AppPage"},"property":[{"@attributes":{"name":"debug","type":"Boolean"}},{"@attributes":{"name":"recordId","type":"String"}}]},{"@attributes":{"targets":"lightning__RecordPage"},"property":[{"@attributes":{"name":"debug","type":"Boolean"}}]}],"lwc":{"DeveloperName":"cfDemoFlexCardHelloworld_1_Demo_Template","Id":"0Rb8a000000xKTYCA2","MasterLabel":"cfDemoFlexCardHelloworld_1_Demo_Template","NamespacePrefix":"c","ManageableState":"unmanaged"},"osSupport":true} - {"drHelloworld":{"OrgName":"IDO_Template","Instance":"CS6","OrgId":"00DN0000000c2mZMAQ"}} - 1 - diff --git a/config/scratch-orgs/omnistudio/permissionsets/LoggerOmniStudioRecipesAdmin.permissionset-meta.xml b/config/scratch-orgs/omnistudio/permissionsets/LoggerOmniStudioRecipesAdmin.permissionset-meta.xml new file mode 100644 index 000000000..ec9244ae4 --- /dev/null +++ b/config/scratch-orgs/omnistudio/permissionsets/LoggerOmniStudioRecipesAdmin.permissionset-meta.xml @@ -0,0 +1,10 @@ + + + false + + Salesforce + + Logger_OmniStudio_Demo + Visible + + diff --git a/nebula-logger/core/main/logger-engine/classes/Logger.cls b/nebula-logger/core/main/logger-engine/classes/Logger.cls index 733e1a5c4..08e5e0fce 100644 --- a/nebula-logger/core/main/logger-engine/classes/Logger.cls +++ b/nebula-logger/core/main/logger-engine/classes/Logger.cls @@ -15,7 +15,7 @@ global with sharing class Logger { // There's no reliable way to get the version number dynamically in Apex @TestVisible - private static final String CURRENT_VERSION_NUMBER = 'v4.14.9'; + private static final String CURRENT_VERSION_NUMBER = 'v4.14.10'; private static final System.LoggingLevel FALLBACK_LOGGING_LEVEL = System.LoggingLevel.DEBUG; private static final List LOG_ENTRIES_BUFFER = new List(); private static final String MISSING_SCENARIO_ERROR_MESSAGE = 'No logger scenario specified. A scenario is required for logging in this org.'; diff --git a/nebula-logger/core/main/logger-engine/lwc/logger/logEntryBuilder.js b/nebula-logger/core/main/logger-engine/lwc/logger/logEntryBuilder.js index b1f63fab2..1150bda94 100644 --- a/nebula-logger/core/main/logger-engine/lwc/logger/logEntryBuilder.js +++ b/nebula-logger/core/main/logger-engine/lwc/logger/logEntryBuilder.js @@ -6,7 +6,7 @@ import FORM_FACTOR from '@salesforce/client/formFactor'; import { log as lightningLog } from 'lightning/logger'; import { LoggerStackTrace } from './loggerStackTrace'; -const CURRENT_VERSION_NUMBER = 'v4.14.9'; +const CURRENT_VERSION_NUMBER = 'v4.14.10'; const LOGGING_LEVEL_EMOJIS = { ERROR: '⛔', diff --git a/package.json b/package.json index d364d579d..4aaf72cdf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nebula-logger", - "version": "4.14.9", + "version": "4.14.10", "description": "The most robust logger for Salesforce. Works with Apex, Lightning Components, Flow, Process Builder & Integrations. Designed for Salesforce admins, developers & architects.", "author": "Jonathan Gillespie", "license": "MIT", diff --git a/sfdx-project.json b/sfdx-project.json index e95d68990..e4054e4e7 100644 --- a/sfdx-project.json +++ b/sfdx-project.json @@ -9,9 +9,9 @@ "path": "./nebula-logger/core", "definitionFile": "./config/scratch-orgs/base-scratch-def.json", "scopeProfiles": true, - "versionNumber": "4.14.9.NEXT", - "versionName": "Bugfix: Apex Code Snippets Auto-Truncated", - "versionDescription": "Updated LogEntryHandler to automatically truncate the code snippets stored in OriginSourceSnippet__c and ExceptionSourceSnippet__c", + "versionNumber": "4.14.10.NEXT", + "versionName": "New CallableLogger Apex class", + "versionDescription": "Added a new CallableLogger class that provides support for both OmniStudio logging, as well as the ability to loosely-couple/depend on Nebula Logger in Apex", "releaseNotesUrl": "https://github.com/jongpie/NebulaLogger/releases", "unpackagedMetadata": { "path": "./nebula-logger/extra-tests"