Skip to content

Commit 7a715d1

Browse files
authored
Overhauled JavaScript stack trace parsing (#727)
* Updated logger LWC to leverage stacktrace.js library for parsing JS stack traces. It handles parsing JS stack traces from different browsers into a consistent format * Updated logEntryBuilder.js to pretty-print a stringified object containing the log entry's timestamp, component name, function name, and metadata type. Previously, it printed the object itself, which always showed up as a Proxy - to see the Proxy's data, you'd have to then use JSON.parse(), and then still look through the (unparsed) stack trace to figure out the origin of the log entry. Now having Nebula Logger print the origin details is more useful for everyone * Removed all Apex code that attempted to parse JavaScript stack traces (most of which was in LoggerStackTrace.cls) - JS stack traces are now fully parsed by the logger LWC, in a new loggerStackTrace.js file that internally uses the library stacktrace.js * Fixed a NullPointerException issue in ComponentLogger that happened when a component error is provided, but the type on the error is null * Updated & expanded recipes metadata so that the 3 demo components can be easily tested in scratch orgs in several targets (like lightning__AppPage, lightning__FlowScreen, and lightning__RecordPage) * Rebuilt current LWR Experience Cloud site + added new Aura framework Experience site so that the 3 demo components can be easily tested in scratch orgs Experience Cloud sites
1 parent 91f2eb2 commit 7a715d1

File tree

119 files changed

+3970
-834
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+3970
-834
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,12 @@ jobs:
224224
- name: 'Create Experience Cloud Scratch Org'
225225
run: npx sf org create scratch --no-namespace --duration-days 1 --definition-file ./config/scratch-orgs/experience-cloud-scratch-def.json --wait 20 --set-default --json
226226

227-
- name: 'Deploy Test Experience Site Metadata'
228-
run: npm run experience:deploy
229-
230227
- name: 'Deploy Source to Scratch Org'
231228
run: npx sf project deploy start --source-dir ./nebula-logger/
232229

230+
- name: 'Deploy Test Experience Site Metadata'
231+
run: npm run experience:deploy
232+
233233
- name: 'Assign Logger Admin Permission Set'
234234
run: npm run permset:assign:admin
235235

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55

66
The most robust logger for Salesforce. Works with Apex, Lightning Components, Flow, Process Builder & Integrations. Designed for Salesforce admins, developers & architects.
77

8-
## Unlocked Package - v4.13.16
8+
## Unlocked Package - v4.13.17
99

10-
[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oFjQAI)
11-
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oFjQAI)
10+
[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oPCQAY)
11+
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oPCQAY)
1212
[![View Documentation](./images/btn-view-documentation.png)](https://jongpie.github.io/NebulaLogger/)
1313

14-
`sf package install --wait 20 --security-type AdminsOnly --package 04t5Y0000015oFjQAI`
14+
`sf package install --wait 20 --security-type AdminsOnly --package 04t5Y0000015oPCQAY`
1515

16-
`sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y0000015oFjQAI`
16+
`sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y0000015oPCQAY`
1717

1818
---
1919

@@ -143,7 +143,7 @@ For lightning component developers, the `logger` LWC provides very similar funct
143143
// For LWC, import logger's createLogger() function into your component
144144
import { createLogger } from 'c/logger';
145145

146-
export default class LoggerLWCDemo extends LightningElement {
146+
export default class LoggerLWCImportDemo extends LightningElement {
147147
logger;
148148

149149
async connectedCallback() {
@@ -402,7 +402,7 @@ For lightning component developers, the `logger` LWC provides very similar funct
402402
// For LWC, import logger's createLogger() function into your component
403403
import { createLogger } from 'c/logger';
404404

405-
export default class LoggerLWCDemo extends LightningElement {
405+
export default class LoggerLWCImportDemo extends LightningElement {
406406
logger;
407407

408408
async connectedCallback() {
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<ExperienceBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3+
<label>Logger Test Aura Site</label>
4+
<type>ChatterNetworkPicasso</type>
5+
<urlPathPrefix>loggeraura/s</urlPathPrefix>
6+
</ExperienceBundle>
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"definitionName": "starter:branding-starter",
3+
"id": "32fb18b0-3fa3-46ed-aa7b-261e945d9fa5",
4+
"label": "Build Your Own",
5+
"type": "brandingSet",
6+
"values": {
7+
"ActionColor": "#2574A9",
8+
"BorderColor": "#D4D4D4",
9+
"CardBackgroundColor": "rgba(255, 255, 255, 0)",
10+
"CompanyLogo": "",
11+
"DetailTextColor": "#696969",
12+
"ErrorFontColor": "#ff9e9e",
13+
"HeaderFonts": "Montserrat",
14+
"LinkColor": "#2574A9",
15+
"LoginBackgroundColor": "#F4F4F4",
16+
"LoginBackgroundImage": "../../../../sfsites/picasso/core/external/salesforceIdentity/images/background.jpg?v=1",
17+
"OverlayTextColor": "#FFFFFF",
18+
"PrimaryFont": "Lato",
19+
"TextColor": "#333",
20+
"TextTransformStyle": "uppercase",
21+
"_ActionColorDarker": "#135F90",
22+
"_ActionColorTrans": "rgba(25, 124, 190, 0.9)",
23+
"_BackgroundColor1": "rgb(235, 235, 235)",
24+
"_BackgroundColor2": "rgb(194, 194, 194)",
25+
"_BackgroundColor3": "rgb(133, 133, 133)",
26+
"_DxpPageBackgroundColor": "#FFFFFF",
27+
"_HoverColor": "rgba(25, 124, 190, 0.05)",
28+
"_LinkColorDarker": "#135F90",
29+
"_NeutralColor": "#ecebea",
30+
"_NeutralColor1": "rgb(217, 215, 213)",
31+
"_NeutralColor2": "rgb(178, 174, 170)",
32+
"_NeutralColor3": "rgb(118, 113, 107)",
33+
"_NeutralForegroundColor": "#000",
34+
"_NeutralForegroundColor1": "#000",
35+
"_NeutralForegroundColor2": "#000",
36+
"_NeutralForegroundColor3": "#fff",
37+
"_OverlayTextColorShadow": "#000000",
38+
"_PrimaryAccentColor1": "rgb(30, 93, 136)",
39+
"_PrimaryAccentColor2": "rgb(15, 47, 69)",
40+
"_PrimaryAccentColor3": "rgb(0, 0, 0)",
41+
"_PrimaryAccentForegroundColor1": "rgb(255, 255, 255)",
42+
"_PrimaryAccentForegroundColor2": "rgb(255, 255, 255)",
43+
"_PrimaryAccentForegroundColor3": "rgb(255, 255, 255)",
44+
"_TextColor1": "rgb(31, 31, 31)",
45+
"_TextColor2": "rgb(0, 0, 0)",
46+
"_TextColor3": "rgb(0, 0, 0)",
47+
"_brandNavigationBarBackgroundColor": "rgb(115,115,115)",
48+
"_brandNavigationItemBackgroundColorHover": "rgba(0,0,0,.2)",
49+
"_brandNavigationItemDividerColor": "rgba(255, 255, 255, 0.2)",
50+
"brandNavigationBackgroundColor": "rgb(128,128,128)",
51+
"brandNavigationBarBackgroundColor": "rgb(115,115,115)",
52+
"brandNavigationColorText": "#FFFFFF"
53+
}
54+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"defaultCode": "en_US",
3+
"defaultLabel": "English (US)",
4+
"id": "113a3d3d-113e-4ed6-9779-e3ee9ce3472a",
5+
"type": "languageContainer"
6+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"forgotPasswordRouteId": "79d4a46b-c6e8-434f-8d4f-be5170499597",
3+
"isAvailableToGuests": true,
4+
"isFilteredComponentsView": false,
5+
"isProgressiveRenderingEnabled": false,
6+
"loginAppPageId": "afe8e8b5-77c5-4b64-a762-574353caf1f1",
7+
"mainAppPageId": "8c9b08ff-a4e8-4d39-ae07-80b736990fa2",
8+
"preferredDomain": "none",
9+
"selfRegistrationRouteId": "39373ed6-24db-4a58-bfc9-4da93e02d324",
10+
"type": "site"
11+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"cmsSettings": {},
3+
"id": "afe8e8b5-77c5-4b64-a762-574353caf1f1",
4+
"label": "login",
5+
"templateName": "Login Template",
6+
"type": "appPage"
7+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"cmsSettings": {},
3+
"currentThemeId": "7eb75af3-aff9-43ed-9631-c394f6d7b9b8",
4+
"headMarkup": null,
5+
"id": "8c9b08ff-a4e8-4d39-ae07-80b736990fa2",
6+
"isLockerServiceEnabled": true,
7+
"isRelaxedCSPLevel": false,
8+
"label": "main",
9+
"templateName": "Starter Template",
10+
"type": "appPage"
11+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"id": "cde68d04-30b0-4d1f-a92d-12cd0626ef46",
3+
"mobilePublisherAppUpdateConfig": {
4+
"forceAppUpdate": false,
5+
"enableAppUpdate": false,
6+
"minVersion": {
7+
"ios": {
8+
"version": "10.0",
9+
"url": "https://apps.apple.com/us"
10+
},
11+
"android": {
12+
"version": "10.1",
13+
"url": "https://play.google.com/store"
14+
}
15+
}
16+
},
17+
"nativeMobileNavConfig": {
18+
"showBackButton": true,
19+
"showHamburgerMenuWithBackButton": false
20+
},
21+
"nativeTabMenu": {
22+
"branding": {
23+
"iconTintColorUnselected": "#C9C5C5",
24+
"barTintColor": "#FFFFFF"
25+
},
26+
"menuItems": [
27+
{
28+
"name": "Home",
29+
"targetUrl": "/",
30+
"iconAsset": "slds-icon:home"
31+
}
32+
]
33+
},
34+
"showHamburgerMenu": true,
35+
"type": "nativeConfig"
36+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"activeViewId": "16a1e5ac-541d-418d-b395-6377509c8b73",
3+
"appPageId": "afe8e8b5-77c5-4b64-a762-574353caf1f1",
4+
"configurationTags": [],
5+
"devName": "Check_Password",
6+
"id": "46a1e3b7-83cd-4a17-8d28-82a45e3ef691",
7+
"label": "Check Password",
8+
"routeType": "check-password",
9+
"type": "route",
10+
"urlPrefix": "CheckPasswordResetEmail"
11+
}

0 commit comments

Comments
 (0)