Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved Testability of Queries #813

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
a0fb8fe
Changed the pipeline to use the base scratch org for codecov.io integ…
jongpie Dec 4, 2024
84770b1
Added a new class LoggerConfigurationSelector to centralize accessing…
jongpie Dec 4, 2024
f662490
Tweaked how records are queried & converted to the inner classes in L…
jongpie Dec 4, 2024
d3a94da
Added some sample CMDT records to extra-tests so that the pipeline ca…
jongpie Dec 4, 2024
70c0b8c
Bumped package version number, name, and description
jongpie Dec 4, 2024
b09e82f
Upgraded several dev dependencies in package.json
jongpie Dec 4, 2024
4024c2b
Regenerated updated docs files for Apex & LWC
jongpie Dec 4, 2024
b1d2f14
Scope creep: added access for the Visualforce page LogMassDelete to t…
jongpie Dec 4, 2024
6a5e21d
Fixed some old references to old constructors that have been removed …
jongpie Dec 4, 2024
9efe787
Updated build.yml to use --concise flag when validating the core meta…
jongpie Dec 4, 2024
dd92549
Fixed some test failures in the async-failure & big-object plugins an…
jongpie Dec 4, 2024
7ea0096
Made additional improvements to the tests for LoggerEngineDataSelecto…
jongpie Dec 10, 2024
0da80f8
Updated package.json + build.yml to auto-generate a package.xml manif…
jongpie Dec 19, 2024
54b1719
Downbumped the ubuntu image used in build.yml to (hopefully) resolve …
jongpie Dec 19, 2024
a5e9db1
[WIP] Fixed the name of some npm scripts that are referenced in build…
jongpie Dec 19, 2024
51e8ff2
[WIP] Fixed a few more small issues in build.yml
jongpie Dec 19, 2024
215cdec
Created new core unlocked package version
actions-user Dec 20, 2024
7b16039
Generated updated package.xml manifest file for core unlocked package…
actions-user Dec 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@ coverage:
status:
project:
default:
target: 90
target: 90%
threshold: 2%
if_ci_failed: success
Apex:
target: 90%
flags:
- Apex
# LWC code coverage needs to be improved overall,
# but for now, the threshold is lowered in Codecov.io
LWC:
target: 85%
flags:
- LWC
patch: off
ignore:
- 'config/experience-cloud/**/*'
Expand Down
206 changes: 144 additions & 62 deletions .github/workflows/build.yml

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run husky:pre-commit
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

The most robust observability solution for Salesforce experts. Built 100% natively on the platform, and designed to work seamlessly with Apex, Lightning Components, Flow, OmniStudio, and integrations.

## Unlocked Package - v4.15.2
## Unlocked Package - v4.15.3

[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oifQAA)
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oifQAA)
[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015ok2QAA)
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015ok2QAA)
[![View Documentation](./images/btn-view-documentation.png)](https://github.com/jongpie/NebulaLogger/wiki)

`sf package install --wait 20 --security-type AdminsOnly --package 04t5Y0000015oifQAA`
`sf package install --wait 20 --security-type AdminsOnly --package 04t5Y0000015ok2QAA`

---

Expand Down
2 changes: 1 addition & 1 deletion config/linters/lint-staged.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
'sfdx-project.json': () => {
return `npm run package:version:number:fix`;
},
'*.{apex,cls,cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml}': filenames => filenames.map(filename => `prettier --write '${filename}'`),
'*.{apex,cls,cmp,component,css,html,js,json,md,page,trigger,yaml,yml}': filenames => filenames.map(filename => `prettier --write '${filename}'`),
'**/lwc/**': filenames => {
return [`eslint --config ./config/linters/.eslintrc.json ${filenames.join(' ')} --fix`];
// FIXME this command should only run tests for the changed LWCs (instead of running tests for all LWCs)
Expand Down
2 changes: 1 addition & 1 deletion docs/apex/Configuration/LoggerCache.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ layout: default

## LoggerCache class

Class used to cache query results returned by the selector classes
Class used to cache query results & data used in other parts of Nebula Logger

---

Expand Down
139 changes: 139 additions & 0 deletions docs/apex/Configuration/LoggerConfigurationSelector.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
---
layout: default
---

## LoggerConfigurationSelector class

Selector class used for all queries that are specific to the configuration layer.

---

### Methods

#### `getInstance()` → `LoggerConfigurationSelector`

The instance of `LoggerConfigurationSelector` used for any querying specific to the configuration layer

##### Return

**Type**

LoggerConfigurationSelector

**Description**

The singleton instance of `LoggerConfigurationSelector`

#### `getLogEntryDataMaskRules()` → `List<LogEntryDataMaskRule_t>`

Returns the `LogEntryDataMaskRule_t` records in the org.

##### Return

**Type**

List&lt;LogEntryDataMaskRule_t&gt;

**Description**

`List&lt;LogEntryDataMaskRule_t&gt;` containing records in the org

#### `getLogEntryTagRules()` → `List<LogEntryTagRule_t>`

Returns the enabled `LogEntryTagRule_t` records in the org, including the field `SObjectField__r.QualifiedApiName` that cannot be accessed via `LogEntryTagRule_t.getAll()`. The value of `SObjectField__c` is automatically set to the value of `SObjectField__r.QualifiedApiName`

##### Return

**Type**

List&lt;LogEntryTagRule_t&gt;

**Description**

`List&lt;LogEntryTagRule_t&gt;` containing enabled records in the org

#### `getLogStatuses()` → `List<LogStatus_t>`

Returns the `LogStatus_t` records in the org.

##### Return

**Type**

List&lt;LogStatus_t&gt;

**Description**

`List&lt;LogStatus_t&gt;` containing records in the org

#### `getLoggerFieldMappings()` → `List<LoggerFieldMapping_t>`

Returns the enabled `LoggerFieldMapping_t` records in the org.

##### Return

**Type**

List&lt;LoggerFieldMapping_t&gt;

**Description**

`List&lt;LoggerFieldMapping_t&gt;` containing enabled records in the org

#### `getLoggerParameters()` → `Map<String, LoggerParameter_t>`

Returns the `LoggerParameter_t` records in the org.

##### Return

**Type**

Map&lt;String, LoggerParameter_t&gt;

**Description**

`List&lt;LoggerParameter_t&gt;` containing records in the org

#### `getLoggerPlugins()` → `List<LoggerPlugin_t>`

Returns the `LoggerPlugin_t` records in the org.

##### Return

**Type**

List&lt;LoggerPlugin_t&gt;

**Description**

`List&lt;LoggerPlugin_t&gt;` containing records in the org

#### `getLoggerSObjectHandlers()` → `List<LoggerSObjectHandler_t>`

Returns the `LoggerSObjectHandler_t` records in the org.

##### Return

**Type**

List&lt;LoggerSObjectHandler_t&gt;

**Description**

`List&lt;LoggerSObjectHandler_t&gt;` containing records in the org

#### `getLoggerScenarioRules()` → `List<LoggerScenarioRule_t>`

Returns the `LoggerScenarioRule_t` records in the org.

##### Return

**Type**

List&lt;LoggerScenarioRule_t&gt;

**Description**

`List&lt;LoggerScenarioRule_t&gt;` containing records in the org

---
4 changes: 2 additions & 2 deletions docs/apex/Logger-Engine/LogEntryEventBuilder.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ Sets the log entry event&apos;s database operation result fields
##### Parameters

| Param | Description |
|-------------------------|---------------------------------------------------------|
| ----------------------- | ------------------------------------------------------- |
| `emptyRecycleBinResult` | The instance of `Database.EmptyRecycleBinResult` to log |

##### Return
Expand Down Expand Up @@ -307,7 +307,7 @@ Sets the log entry event&apos;s database operation result fields
##### Parameters

| Param | Description |
|--------------------------|------------------------------------------------------|
| ------------------------ | ---------------------------------------------------- |
| `emptyRecycleBinResults` | The list of `Database.EmptyRecycleBinResult`s to log |

##### Return
Expand Down
Loading