diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 92c0956aeba..37b5aa8842a 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -1,10 +1,9 @@
---
name: Bug report
about: Create a report to help us improve
-title: ''
-labels: ''
-assignees: ''
-
+title: ""
+labels: ""
+assignees: ""
---
**Describe the bug**
@@ -15,6 +14,7 @@ assignees: ''
(Please provide a public github repo with a full SFDX project that demonstrates the problem. If the repro case can be followed with a single example Apex class against a scratch org with just the fflib-apex-common and fflib-apex-mocks project deployed into it, you don't need to provide a github repo)
Steps to reproduce the behavior:
+
1. Create a scratch org as follows....
2. Run the following Anonymous Apex....
3. See error
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
index bbcbbe7d615..2bc5d5f7118 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
-title: ''
-labels: ''
-assignees: ''
-
+title: ""
+labels: ""
+assignees: ""
---
**Is your feature request related to a problem? Please describe.**
diff --git a/.github/workflows/deploy.and.test.yml b/.github/workflows/deploy.and.test.yml
index 9d38071182f..28772324297 100644
--- a/.github/workflows/deploy.and.test.yml
+++ b/.github/workflows/deploy.and.test.yml
@@ -4,10 +4,9 @@ on:
push:
pull_request_target:
workflow_dispatch:
-
+
jobs:
build:
-
runs-on: ubuntu-latest
steps:
@@ -26,7 +25,7 @@ jobs:
- name: Create the scratch org
run: sf org create scratch --definition-file config/project-scratch-def.json --set-default --duration-days 1 --no-track-source --alias fflibapexcommon
# - name: Install required dependency frameworks
- # run: sf shane github src install --convert --githubuser apex-enterprise-patterns --repo fflib-apex-mocks --path sfdx-source/apex-mocks
+ # run: sf shane github src install --convert --githubuser apex-enterprise-patterns --repo fflib-apex-mocks --path sfdx-source/apex-mocks
- name: Clone fflib-apex-mocks repo
run: mkdir temp && git clone https://github.com/apex-enterprise-patterns/fflib-apex-mocks.git "temp/fflib-apex-mocks"
- name: Deploy and compile the fflib-apex-mocks codebase
diff --git a/.github/workflows/manage.sf.api.versions.yml b/.github/workflows/manage.sf.api.versions.yml
index 6900179c01d..7dd73eb21f4 100644
--- a/.github/workflows/manage.sf.api.versions.yml
+++ b/.github/workflows/manage.sf.api.versions.yml
@@ -3,7 +3,7 @@ on:
workflow_dispatch:
inputs:
api-version:
- description: 'api version in the format XX e.g 58'
+ description: "api version in the format XX e.g 58"
required: true
type: string
jobs:
@@ -16,7 +16,7 @@ jobs:
api-version: ${{inputs.api-version}}
- uses: peter-evans/create-pull-request@v5
with:
- title: 'Bump API Versions to ${{inputs.api-version}}.0'
- body: 'Automatically bumped by GitHub Actions '
- branch: 'devops/bump-api-versions-v${{inputs.api-version}}.0'
- commit-message: 'chore: bump api to v${{inputs.api-version}}.0'
+ title: "Bump API Versions to ${{inputs.api-version}}.0"
+ body: "Automatically bumped by GitHub Actions "
+ branch: "devops/bump-api-versions-v${{inputs.api-version}}.0"
+ commit-message: "chore: bump api to v${{inputs.api-version}}.0"
diff --git a/.gitignore b/.gitignore
index 02ee6d0afa9..a29cffd45fe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -43,9 +43,7 @@ sfdx-source/untracked/
.execanon
# NPM Related
-package.json
/node_modules
-package-lock.json
sfdx-source/group*
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 00000000000..483a9c42c3c
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1 @@
+package-lock.json
\ No newline at end of file
diff --git a/.prettierrc.json b/.prettierrc.json
new file mode 100644
index 00000000000..2be76c6dd4b
--- /dev/null
+++ b/.prettierrc.json
@@ -0,0 +1,48 @@
+{
+ "plugins": ["@prettier/plugin-xml", "prettier-plugin-apex"],
+ "overrides": [
+ {
+ "files": "*.xml",
+ "options": {
+ "xmlSelfClosingSpace": false,
+ "bracketSameLine": true,
+ "printWidth": 99999,
+ "tabWidth": 4,
+ "xmlWhitespaceSensitivity": "ignore",
+ "singleAttributePerLine": false
+ }
+ },
+ {
+ "files": "*{labels,validationRule,globalValueSet,field,md,flexipage}-meta.xml",
+ "options": {
+ "xmlSelfClosingSpace": false,
+ "bracketSameLine": true,
+ "printWidth": 99999,
+ "tabWidth": 4,
+ "xmlWhitespaceSensitivity": "preserve",
+ "singleAttributePerLine": false
+ }
+ },
+ {
+ "files": "*.{cmp,page,component,design,evt,auradoc}",
+ "options": {
+ "parser": "html"
+ }
+ },
+ {
+ "files": "*.js",
+ "options": {
+ "arrowParens": "always",
+ "bracketSpacing": true
+ }
+ },
+ {
+ "files": "**/aura/**/*.js",
+ "options": {
+ "arrowParens": "always",
+ "bracketSpacing": true,
+ "quoteProps": "preserve"
+ }
+ }
+ ]
+}
diff --git a/README.md b/README.md
index 9646996bc2c..4c02e1c0e35 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,7 @@
-FFLib Apex Common
-=================
+# FFLib Apex Common

-
**Dependencies:** Must deploy [ApexMocks](https://github.com/apex-enterprise-patterns/fflib-apex-mocks) before deploying this library
@@ -11,30 +9,26 @@ FFLib Apex Common
src="https://raw.githubusercontent.com/afawcett/githubsfdeploy/master/src/main/webapp/resources/img/deploy.png">
-Updates
-=======
+# Updates
- **December 2022**, **IMPORTANT CHANGE** - Support for native Apex User Mode was added to the library (see [discussion](https://github.com/apex-enterprise-patterns/fflib-apex-common/discussions/419)). For new projects, the old `enforceCRUD` and `enforceFLS` flags on `fflib_SObjectSelector` should be considered deprecated and the constructors that take `dataAccess` arguments should be used instead. Additionally, the introduction of `fflib_SObjectUnitOfWork.UserModeDML` provides an `IDML` implementation that supports `USER_MODE` or `SYSTEM_MODE`. `fflib_SObjectUnitOfWork.SimpleDML` (the default `IDML` implementation) should be considered deprecated. There are measurable performance benefits to using `SYSTEM_MODE` and `USER_MODE` (Apex CPU usage reduction). Additionally, the use of explicit `USER_MODE` and `SYSTEM_MODE` overrides the `with sharing` and `without sharing` class declaration and makes the expected behavior of DML and SOQL easier to understand.
- **April 2021**, **IMPORTANT CHANGE**, the fflib_SObjectDomain has been split into a domain (fflib_IDomain) and triggerhandler (fflib_ISObjectDomain). This change can impact existing projects, please review [this page](docs/202105-new-domain-structure.md) for more details.
-- **April 2020**, **IMPORTANT CHANGE**, the directory format of this project repo was converted to [Salesforce DX Source Format](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_source_file_format.htm). While the GIT commit history was maintained, it is not visible on GitHub. If you need to see the history, either clone the repo and execute `git log --follow` from the command line or refer to this [tag](https://github.com/apex-enterprise-patterns/fflib-apex-common/tree/metadata-format-prior-to-dx-source-format-conversion) of the codebase prior to conversion.
+- **April 2020**, **IMPORTANT CHANGE**, the directory format of this project repo was converted to [Salesforce DX Source Format](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_source_file_format.htm). While the GIT commit history was maintained, it is not visible on GitHub. If you need to see the history, either clone the repo and execute `git log --follow` from the command line or refer to this [tag](https://github.com/apex-enterprise-patterns/fflib-apex-common/tree/metadata-format-prior-to-dx-source-format-conversion) of the codebase prior to conversion.
- **September 2014**, **IMPORTANT CHANGE**, changes applied to support Dreamforce 2014 advanced presentation, library now provides Application factories for major layers and support for ApexMocks. More details to follow! As a result [ApexMocks](https://github.com/apex-enterprise-patterns/fflib-apex-mocks) must be deployed to the org before deploying this library. The sample application [here](https://github.com/apex-enterprise-patterns/fflib-apex-common-samplecode) has also been updated to demonstrate the new features!
-- **July 2014**, **IMPORTANT CHANGE**, prior **23rd July 2014**, both the ``fflib_SObjectDomain.onValidate()`` and ``fflib_SObjectDomain.onValidate(Map existingRecords)`` methods where called during an on **after update** trigger event. From this point on the ``onValidate()`` method will only be called during on **after insert**. If you still require the orignal behaviour add the line ``Configuration.enableOldOnUpdateValidateBehaviour();`` into your constructor.
+- **July 2014**, **IMPORTANT CHANGE**, prior **23rd July 2014**, both the `fflib_SObjectDomain.onValidate()` and `fflib_SObjectDomain.onValidate(Map existingRecords)` methods where called during an on **after update** trigger event. From this point on the `onValidate()` method will only be called during on **after insert**. If you still require the orignal behaviour add the line `Configuration.enableOldOnUpdateValidateBehaviour();` into your constructor.
- **June 2014**, New classes providing utilities to support security and dynamic queries, in addition to improvements to existing Apex Enterprise Pattern base classes. Read more [here](http://andyinthecloud.com/2014/06/28/financialforce-apex-common-updates/).
-This Library
-============
+# This Library
Is derived from the **Dreamforce 2012** presentation on [Apex Enterprise Patterns](https://github.com/financialforcedev/df12-apex-enterprise-patterns) and progresses the patterns further with a more general ongoing home for them. It also adds some form of namespace qualification from the previous version. So that classes are grouped together more easily in the IDE's and packages. Below you can find comprehensive articles and videos on the use of these patterns. There is also a **working sample application** illustrating the patterns [here](https://github.com/apex-enterprise-patterns/fflib-apex-common-samplecode).

-Application Enterprise Patterns on Force.com
-============================================
+# Application Enterprise Patterns on Force.com
Design patterns are an invaluable tool for developers and architects looking to build enterprise solutions. Here are presented some tried and tested enterprise application engineering patterns that have been used in other platforms and languages. We will discuss and illustrate how patterns such as Data Mapper, Service Layer, Unit of Work and of course Model View Controller can be applied to Force.com. Applying these patterns can help manage governed resources (such as DML) better, encourage better separation-of-concerns in your logic and enforce Force.com coding best practices.
-Documentation
--------------
+## Documentation
- [Apex Sharing and applying to Apex Enterprise Patterns](http://andyinthecloud.com/2016/01/10/apex-sharing-and-applying-to-apex-enterprise-patterns/)
- [Tips for Migrating to Apex Enterprise Patterns](http://andyinthecloud.com/2015/09/30/tips-for-migrating-to-apex-enterprise-patterns/)
@@ -45,14 +39,16 @@ Documentation
- [Apex Enterprise Patterns - Service Layer](http://wiki.developerforce.com/page/Apex_Enterprise_Patterns_-_Service_Layer)
- [Apex Enterprise Patterns - Domain Layer](http://wiki.developerforce.com/page/Apex_Enterprise_Patterns_-_Domain_Layer)
- [Apex Enterprise Patterns - Selector Layer](https://github.com/financialforcedev/df12-apex-enterprise-patterns#data-mapper-selector)
-- View slides for the **Dreamforce 2013** session [here](https://docs.google.com/file/d/0B6brfGow3cD8RVVYc1dCX2s0S1E/edit)
+- View slides for the **Dreamforce 2013** session [here](https://docs.google.com/file/d/0B6brfGow3cD8RVVYc1dCX2s0S1E/edit)
- View slides for the **Dreamforce 2015** session [here](http://www.slideshare.net/andyinthecloud/building-strong-foundations-apex-enterprise-patterns)
**Related Webinars**
+
- [Advanced Apex Enterprise Patterns](https://www.youtube.com/watch?v=BLXp0ZP0cF0)
- [Apex Hours (August 2020): Apex Enterprise Patterns](https://www.apexhours.com/apex-enterprise-patterns/)
**Related Book**
+
- [Salesforce Platform Enterprise Architecture, 4th Edition, by Andrew Fawcett](https://www.amazon.com/Salesforce-Platform-Enterprise-Architecture-applications-ebook/dp/B0BD8TBT75/)
**Other Related Blogs**
@@ -60,4 +56,3 @@ Documentation
- [Preview of Advanced Apex Patterns Session (Application Factory and ApexMocks Features)](http://andyinthecloud.com/2014/08/26/preview-of-advanced-apex-enterprise-patterns-session/)
- [Unit Testing with the Domain Layer](http://andyinthecloud.com/2014/03/23/unit-testing-with-the-domain-layer/)
- [FinancialForce Apex Common Updates](http://andyinthecloud.com/2014/06/28/financialforce-apex-common-updates/)
-
diff --git a/config/multicurrency-scratch-def.json b/config/multicurrency-scratch-def.json
index 13823162894..d7d262ef671 100644
--- a/config/multicurrency-scratch-def.json
+++ b/config/multicurrency-scratch-def.json
@@ -1,15 +1,13 @@
{
- "orgName": "apex-common",
- "edition": "Developer",
- "features": [
- "MultiCurrency"
- ],
- "settings": {
- "currencySettings":{
- "enableMultiCurrency": true
- },
- "lightningExperienceSettings": {
- "enableS1DesktopEnabled": true
- }
+ "orgName": "apex-common",
+ "edition": "Developer",
+ "features": ["MultiCurrency"],
+ "settings": {
+ "currencySettings": {
+ "enableMultiCurrency": true
+ },
+ "lightningExperienceSettings": {
+ "enableS1DesktopEnabled": true
}
+ }
}
diff --git a/config/project-scratch-def.json b/config/project-scratch-def.json
index 020b6b8e0a4..00ec40e9f62 100644
--- a/config/project-scratch-def.json
+++ b/config/project-scratch-def.json
@@ -1,9 +1,9 @@
{
- "orgName": "apex-common",
- "edition": "Developer",
- "settings": {
- "lightningExperienceSettings": {
- "enableS1DesktopEnabled": true
- }
+ "orgName": "apex-common",
+ "edition": "Developer",
+ "settings": {
+ "lightningExperienceSettings": {
+ "enableS1DesktopEnabled": true
}
+ }
}
diff --git a/docs/202105-new-domain-structure.md b/docs/202105-new-domain-structure.md
index 26310757d5c..f57427a1534 100644
--- a/docs/202105-new-domain-structure.md
+++ b/docs/202105-new-domain-structure.md
@@ -1,57 +1,64 @@
# New domain structure
-The new domain structure allows more flexibility of the object type a domain can contain.
-This allows for the creation of compound-domains and domains of data-classes.
-
-It also splits the functionality into a Domain Model [as described by Martin Fowler](https://www.martinfowler.com/eaaCatalog/domainModel.html) and a separate trigger handler.
-This helps to structure the code better and makes it more clear which Apex code should be in the domain and which in the trigger handler.
+The new domain structure allows more flexibility of the object type a domain can contain.
+This allows for the creation of compound-domains and domains of data-classes.
+It also splits the functionality into a Domain Model [as described by Martin Fowler](https://www.martinfowler.com/eaaCatalog/domainModel.html) and a separate trigger handler.
+This helps to structure the code better and makes it more clear which Apex code should be in the domain and which in the trigger handler.
## Previous interface and implementation structure
-| Interfaces | Implementation | Description |
-|:---|:---|:---|
-| fflib_ISObjectDomain | fflib_SObjectDomain | Used as Domain and trigger handler
+| Interfaces | Implementation | Description |
+| :------------------- | :------------------ | :--------------------------------- |
+| fflib_ISObjectDomain | fflib_SObjectDomain | Used as Domain and trigger handler |
## New interface and implementation structure
-| Interfaces | Implementation | Description |
-|:---|:---|:---|
-| fflib_IDomain | | Generic identifier for domains
-| fflib_IObjects | fflib_Objects | Domains constructed with Objects, e.g. data-classes
-| fflib_ISObjects | fflib_SObjects | Domain containing SObjectTypes, e.g. Accounts, Contacts
-| fflib_ISObjectDomain | fflib_SObjectDomain | Used for trigger handlers and for legacy domains
-
-See [this PR](https://github.com/apex-enterprise-patterns/fflib-apex-common/pull/300) for a detailed overview
+
+| Interfaces | Implementation | Description |
+| :------------------- | :------------------ | :------------------------------------------------------ |
+| fflib_IDomain | | Generic identifier for domains |
+| fflib_IObjects | fflib_Objects | Domains constructed with Objects, e.g. data-classes |
+| fflib_ISObjects | fflib_SObjects | Domain containing SObjectTypes, e.g. Accounts, Contacts |
+| fflib_ISObjectDomain | fflib_SObjectDomain | Used for trigger handlers and for legacy domains |
+
+See [this PR](https://github.com/apex-enterprise-patterns/fflib-apex-common/pull/300) for a detailed overview
of all the code changes which were part of this change.
The [fflib-apex-common-samplecode](https://github.com/apex-enterprise-patterns/fflib-apex-common-samplecode)
-also includes examples on how to structure the change into the
+also includes examples on how to structure the change into the
[new domain](https://github.com/apex-enterprise-patterns/fflib-apex-common-samplecode/blob/master/sfdx-source/apex-common-samplecode/main/classes/domains/Accounts.cls)
and [trigger handler](https://github.com/apex-enterprise-patterns/fflib-apex-common-samplecode/blob/master/sfdx-source/apex-common-samplecode/main/classes/triggerHandlers/OpportunitiesTriggerHandler.cls)
## Known issues and how to resolve them
-
### _Issue:_ Ambiguous method signature: void setMock(MyDomainClass)
-This happens when you try to mock an old domain class which is extended from fflib_SObjectDomain.
+
+This happens when you try to mock an old domain class which is extended from fflib_SObjectDomain.
+
```apex
Application.Domain.setMock(mockAssetsDomain); // <<== generates Ambiguous method signature: void setMock
```
+
The issue can be resolved by casting the mock implementation to fflib_ISObjectDomain:
-> Application.Domain.setMock( **(fflib_ISObjectDomain)** mockAssetsDomain);
-[See this issue report for more information](https://github.com/apex-enterprise-patterns/fflib-apex-common/issues/347)
+> Application.Domain.setMock( **(fflib_ISObjectDomain)** mockAssetsDomain);
+[See this issue report for more information](https://github.com/apex-enterprise-patterns/fflib-apex-common/issues/347)
### _Issue:_ Illegal assignment from fflib_Domain to fflib_ISObjectDomain
+
The `newInstance` method signature of the Application Domain Factory (fflib_Application.DomainFactory) has changed into:
->public **fflib_IDomain** newInstance(***);
+
+> public **fflib_IDomain** newInstance(\*\*\*);
If you have:
+
```apex
-fflib_ISObjectDomain domain = Application.Domain.newInstance(sObjIds);
+fflib_ISObjectDomain domain = Application.Domain.newInstance(sObjIds);
```
+
You need to change that into:
-> fflib_ISObjectDomain domain = **(fflib_ISObjectDomain)** Application.Domain.newInstance(sObjIds);
-[See this issue report for more information](https://github.com/apex-enterprise-patterns/fflib-apex-common/issues/346)
\ No newline at end of file
+> fflib_ISObjectDomain domain = **(fflib_ISObjectDomain)** Application.Domain.newInstance(sObjIds);
+
+[See this issue report for more information](https://github.com/apex-enterprise-patterns/fflib-apex-common/issues/346)
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 00000000000..7549edf9895
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,611 @@
+{
+ "name": "fflib-apex-common",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "devDependencies": {
+ "@prettier/plugin-xml": "^3.4.2",
+ "prettier": "^3.6.2",
+ "prettier-plugin-apex": "^2.2.6"
+ }
+ },
+ "node_modules/@hapi/address": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/@hapi/address/-/address-5.1.1.tgz",
+ "integrity": "sha512-A+po2d/dVoY7cYajycYI43ZbYMXukuopIsqCjh5QzsBCipDtdofHntljDlpccMjIfTy6UOkg+5KPriwYch2bXA==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "@hapi/hoek": "^11.0.2"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@hapi/formula": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/@hapi/formula/-/formula-3.0.2.tgz",
+ "integrity": "sha512-hY5YPNXzw1He7s0iqkRQi+uMGh383CGdyyIGYtB+W5N3KHPXoqychklvHhKCC9M3Xtv0OCs/IHw+r4dcHtBYWw==",
+ "dev": true,
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/@hapi/hoek": {
+ "version": "11.0.7",
+ "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.7.tgz",
+ "integrity": "sha512-HV5undWkKzcB4RZUusqOpcgxOaq6VOAH7zhhIr2g3G8NF/MlFO75SjOr2NfuSx0Mh40+1FqCkagKLJRykUWoFQ==",
+ "dev": true,
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/@hapi/pinpoint": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@hapi/pinpoint/-/pinpoint-2.0.1.tgz",
+ "integrity": "sha512-EKQmr16tM8s16vTT3cA5L0kZZcTMU5DUOZTuvpnY738m+jyP3JIUj+Mm1xc1rsLkGBQ/gVnfKYPwOmPg1tUR4Q==",
+ "dev": true,
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/@hapi/tlds": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@hapi/tlds/-/tlds-1.1.4.tgz",
+ "integrity": "sha512-Fq+20dxsxLaUn5jSSWrdtSRcIUba2JquuorF9UW1wIJS5cSUwxIsO2GIhaWynPRflvxSzFN+gxKte2HEW1OuoA==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@hapi/topo": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-6.0.2.tgz",
+ "integrity": "sha512-KR3rD5inZbGMrHmgPxsJ9dbi6zEK+C3ZwUwTa+eMwWLz7oijWUTWD2pMSNNYJAU6Qq+65NkxXjqHr/7LM2Xkqg==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "@hapi/hoek": "^11.0.2"
+ }
+ },
+ "node_modules/@prettier-apex/apex-ast-serializer-darwin-arm64": {
+ "version": "2.2.6",
+ "resolved": "https://registry.npmjs.org/@prettier-apex/apex-ast-serializer-darwin-arm64/-/apex-ast-serializer-darwin-arm64-2.2.6.tgz",
+ "integrity": "sha512-XzrGnEVQq/JH/rKPktpdL8/agocjDCnSrY4MuHxMs5V3OnV/4MJdMHp0frQhqOjbhnUIjewypX5XWcVi0xqRBQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@prettier-apex/apex-ast-serializer-darwin-x64": {
+ "version": "2.2.6",
+ "resolved": "https://registry.npmjs.org/@prettier-apex/apex-ast-serializer-darwin-x64/-/apex-ast-serializer-darwin-x64-2.2.6.tgz",
+ "integrity": "sha512-bCOJq90UAL+qCEMbXAuFBULjK04E/PAFL+OXgO9haeNHB41HeoUgNhqAboTQdyz2szHaM3FQ1N6BOdUIjTraXg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@prettier-apex/apex-ast-serializer-linux-x64": {
+ "version": "2.2.6",
+ "resolved": "https://registry.npmjs.org/@prettier-apex/apex-ast-serializer-linux-x64/-/apex-ast-serializer-linux-x64-2.2.6.tgz",
+ "integrity": "sha512-sErKpugEvmF7Iwdk1wqQfWFGQ4+LFDKQ+ek5kunRJfsVLs6yQd6qIaiFqqwYxl/4vU6O6+McaON2eVhwjF8YGg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@prettier-apex/apex-ast-serializer-win32-x64": {
+ "version": "2.2.6",
+ "resolved": "https://registry.npmjs.org/@prettier-apex/apex-ast-serializer-win32-x64/-/apex-ast-serializer-win32-x64-2.2.6.tgz",
+ "integrity": "sha512-liKeEt89l0cJb8mmgy0kU157jV/7FpF8+oUR4Ic4Tu2DainBxDRcBQICBR0+NmKJNUGTY6/MnwFbuld25laNdg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@prettier/plugin-xml": {
+ "version": "3.4.2",
+ "resolved": "https://registry.npmjs.org/@prettier/plugin-xml/-/plugin-xml-3.4.2.tgz",
+ "integrity": "sha512-/UyNlHfkuLXG6Ed85KB0WBF283xn2yavR+UtRibBRUcvEJId2DSLdGXwJ/cDa1X++SWDPzq3+GSFniHjkNy7yg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@xml-tools/parser": "^1.0.11"
+ },
+ "peerDependencies": {
+ "prettier": "^3.0.0"
+ }
+ },
+ "node_modules/@standard-schema/spec": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.0.0.tgz",
+ "integrity": "sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@xml-tools/parser": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/@xml-tools/parser/-/parser-1.0.11.tgz",
+ "integrity": "sha512-aKqQ077XnR+oQtHJlrAflaZaL7qZsulWc/i/ZEooar5JiWj1eLt0+Wg28cpa+XLney107wXqneC+oG1IZvxkTA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "chevrotain": "7.1.1"
+ }
+ },
+ "node_modules/asynckit": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/axios": {
+ "version": "1.13.2",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.2.tgz",
+ "integrity": "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "follow-redirects": "^1.15.6",
+ "form-data": "^4.0.4",
+ "proxy-from-env": "^1.1.0"
+ }
+ },
+ "node_modules/call-bind-apply-helpers": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
+ "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/chevrotain": {
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-7.1.1.tgz",
+ "integrity": "sha512-wy3mC1x4ye+O+QkEinVJkPf5u2vsrDIYW9G7ZuwFl6v/Yu0LwUuT2POsb+NUWApebyxfkQq6+yDfRExbnI5rcw==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "regexp-to-ast": "0.5.0"
+ }
+ },
+ "node_modules/combined-stream": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "delayed-stream": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/delayed-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+ "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/detect-newline": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz",
+ "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/dunder-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
+ "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "gopd": "^1.2.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-define-property": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
+ "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-errors": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
+ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-object-atoms": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
+ "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-set-tostringtag": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
+ "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.6",
+ "has-tostringtag": "^1.0.2",
+ "hasown": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/follow-redirects": {
+ "version": "1.15.11",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz",
+ "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://github.com/sponsors/RubenVerborgh"
+ }
+ ],
+ "license": "MIT",
+ "engines": {
+ "node": ">=4.0"
+ },
+ "peerDependenciesMeta": {
+ "debug": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/form-data": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz",
+ "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "asynckit": "^0.4.0",
+ "combined-stream": "^1.0.8",
+ "es-set-tostringtag": "^2.1.0",
+ "hasown": "^2.0.2",
+ "mime-types": "^2.1.12"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/function-bind": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-intrinsic": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
+ "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "es-define-property": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.1.1",
+ "function-bind": "^1.1.2",
+ "get-proto": "^1.0.1",
+ "gopd": "^1.2.0",
+ "has-symbols": "^1.1.0",
+ "hasown": "^2.0.2",
+ "math-intrinsics": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
+ "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "dunder-proto": "^1.0.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/gopd": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
+ "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-symbols": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
+ "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-tostringtag": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
+ "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-symbols": "^1.0.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/hasown": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
+ "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/jest-docblock": {
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz",
+ "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "detect-newline": "^3.0.0"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/joi": {
+ "version": "18.0.1",
+ "resolved": "https://registry.npmjs.org/joi/-/joi-18.0.1.tgz",
+ "integrity": "sha512-IiQpRyypSnLisQf3PwuN2eIHAsAIGZIrLZkd4zdvIar2bDyhM91ubRjy8a3eYablXsh9BeI/c7dmPYHca5qtoA==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "@hapi/address": "^5.1.1",
+ "@hapi/formula": "^3.0.2",
+ "@hapi/hoek": "^11.0.7",
+ "@hapi/pinpoint": "^2.0.1",
+ "@hapi/tlds": "^1.1.1",
+ "@hapi/topo": "^6.0.2",
+ "@standard-schema/spec": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 20"
+ }
+ },
+ "node_modules/lodash": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/math-intrinsics": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
+ "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/mime-db": {
+ "version": "1.52.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "2.1.35",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "mime-db": "1.52.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/minimist": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
+ "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/prettier": {
+ "version": "3.6.2",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz",
+ "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "prettier": "bin/prettier.cjs"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/prettier/prettier?sponsor=1"
+ }
+ },
+ "node_modules/prettier-plugin-apex": {
+ "version": "2.2.6",
+ "resolved": "https://registry.npmjs.org/prettier-plugin-apex/-/prettier-plugin-apex-2.2.6.tgz",
+ "integrity": "sha512-1z1WFl2zy0FDTCTLP9f/78TdEpTJ6qBGAf9vRbT9o4KRXBOfTmWkZiEYV1+QYky8ulxl085iS18JQKUm5K9KPg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "jest-docblock": "^29.0.0",
+ "wait-on": "^8.0.0"
+ },
+ "bin": {
+ "apex-ast-serializer": "vendor/apex-ast-serializer/bin/apex-ast-serializer",
+ "apex-ast-serializer-http": "vendor/apex-ast-serializer/bin/apex-ast-serializer-http",
+ "start-apex-server": "dist/bin/start-apex-server.js",
+ "stop-apex-server": "dist/bin/stop-apex-server.js"
+ },
+ "optionalDependencies": {
+ "@prettier-apex/apex-ast-serializer-darwin-arm64": "2.2.6",
+ "@prettier-apex/apex-ast-serializer-darwin-x64": "2.2.6",
+ "@prettier-apex/apex-ast-serializer-linux-x64": "2.2.6",
+ "@prettier-apex/apex-ast-serializer-win32-x64": "2.2.6"
+ },
+ "peerDependencies": {
+ "prettier": "^3.0.0"
+ }
+ },
+ "node_modules/proxy-from-env": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
+ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/regexp-to-ast": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/regexp-to-ast/-/regexp-to-ast-0.5.0.tgz",
+ "integrity": "sha512-tlbJqcMHnPKI9zSrystikWKwHkBqu2a/Sgw01h3zFjvYrMxEDYHzzoMZnUrbIfpTFEsoRnnviOXNCzFiSc54Qw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/rxjs": {
+ "version": "7.8.2",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz",
+ "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "tslib": "^2.1.0"
+ }
+ },
+ "node_modules/tslib": {
+ "version": "2.8.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
+ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
+ "dev": true,
+ "license": "0BSD"
+ },
+ "node_modules/wait-on": {
+ "version": "8.0.5",
+ "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-8.0.5.tgz",
+ "integrity": "sha512-J3WlS0txVHkhLRb2FsmRg3dkMTCV1+M6Xra3Ho7HzZDHpE7DCOnoSoCJsZotrmW3uRMhvIJGSKUKrh/MeF4iag==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "axios": "^1.12.1",
+ "joi": "^18.0.1",
+ "lodash": "^4.17.21",
+ "minimist": "^1.2.8",
+ "rxjs": "^7.8.2"
+ },
+ "bin": {
+ "wait-on": "bin/wait-on"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ }
+ }
+ }
+}
diff --git a/package.json b/package.json
new file mode 100644
index 00000000000..dba4ac18ecd
--- /dev/null
+++ b/package.json
@@ -0,0 +1,14 @@
+{
+ "scripts": {
+ "prettier:write": "prettier --write .",
+ "prettier:check": "prettier --check .",
+ "prettier:diff": "prettier --ignore-unknown --list-different",
+ "sf:runLocalTests": "sf apex run test --test-level RunLocalTests --synchronous",
+ "sf:deploy": "sf project deploy start --source-dir sfdx-source/apex-common --ignore-conflicts"
+ },
+ "devDependencies": {
+ "@prettier/plugin-xml": "^3.4.2",
+ "prettier": "^3.6.2",
+ "prettier-plugin-apex": "^2.2.6"
+ }
+}
diff --git a/sfdx-source/apex-common/main/classes/fflib_Application.cls b/sfdx-source/apex-common/main/classes/fflib_Application.cls
index d957ca1d511..c4b3ab862c2 100644
--- a/sfdx-source/apex-common/main/classes/fflib_Application.cls
+++ b/sfdx-source/apex-common/main/classes/fflib_Application.cls
@@ -2,446 +2,464 @@
* Copyright (c), FinancialForce.com, inc
* All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
+ * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
- * - Redistributions of source code must retain the above copyright notice,
+ * - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
- * - Neither the name of the FinancialForce.com, inc nor the names of its contributors
- * may be used to endorse or promote products derived from this software without
+ * - Neither the name of the FinancialForce.com, inc nor the names of its contributors
+ * may be used to endorse or promote products derived from this software without
* specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-**/
+ **/
/**
* Class provides inner classes implementing factories for the main components
* of the Apex Enterprise Patterns, Service, Unit Of Work, Selector and Domain.
* See the sample applications Application.cls file for an example
**/
-public virtual class fflib_Application
-{
- /**
- * Class implements a Unit of Work factory
- **/
- public virtual class UnitOfWorkFactory implements fflib_IUnitOfWorkFactory
- {
- protected List m_objectTypes;
- protected fflib_ISObjectUnitOfWork m_mockUow;
-
- /**
- * Constructs a Unit Of Work factory
- **/
- public UnitOfWorkFactory() { }
-
- /**
- * Constructs a Unit Of Work factory
- *
- * @param objectTypes List of SObjectTypes in dependency order
- **/
- public UnitOfWorkFactory(List objectTypes)
- {
- m_objectTypes = objectTypes.clone();
- }
-
- /**
- * Returns a new fflib_SObjectUnitOfWork configured with the
- * SObjectType list provided in the constructor, returns a Mock implementation
- * if set via the setMock method
- **/
- public virtual fflib_ISObjectUnitOfWork newInstance()
- {
- // Mock?
- if(m_mockUow!=null)
- return m_mockUow;
- return new fflib_SObjectUnitOfWork(m_objectTypes);
- }
-
- /**
- * Returns a new fflib_SObjectUnitOfWork configured with the
- * SObjectType list provided in the constructor, returns a Mock implementation
- * if set via the setMock method
- **/
- public virtual fflib_ISObjectUnitOfWork newInstance(fflib_SObjectUnitOfWork.IDML dml)
- {
- // Mock?
- if(m_mockUow!=null)
- return m_mockUow;
- return new fflib_SObjectUnitOfWork(m_objectTypes, dml);
- }
-
- /**
- * Returns a new fflib_SObjectUnitOfWork configured with the
- * SObjectType list specified, returns a Mock implementation
- * if set via the setMock method
- *
- * @remark If mock is set, the list of SObjectType in the mock could be different
- * than the list of SObjectType specified in this method call
- **/
- public virtual fflib_ISObjectUnitOfWork newInstance(List objectTypes)
- {
- // Mock?
- if(m_mockUow!=null)
- return m_mockUow;
- return new fflib_SObjectUnitOfWork(objectTypes);
- }
-
- /**
- * Returns a new fflib_SObjectUnitOfWork configured with the
- * SObjectType list specified, returns a Mock implementation
- * if set via the setMock method
- *
- * @remark If mock is set, the list of SObjectType in the mock could be different
- * than the list of SObjectType specified in this method call
- **/
- public virtual fflib_ISObjectUnitOfWork newInstance(List objectTypes, fflib_SObjectUnitOfWork.IDML dml)
- {
- // Mock?
- if(m_mockUow!=null)
- return m_mockUow;
- return new fflib_SObjectUnitOfWork(objectTypes, dml);
- }
-
- @TestVisible
- protected virtual void setMock(fflib_ISObjectUnitOfWork mockUow)
- {
- m_mockUow = mockUow;
- }
- }
-
- /**
- * Simple Service Factory implementation
- **/
- public virtual class ServiceFactory implements fflib_IServiceFactory
- {
- protected Map m_serviceInterfaceTypeByServiceImplType;
-
- protected Map m_serviceInterfaceTypeByMockService;
-
- /**
- * Constructs a simple Service Factory
- **/
- public ServiceFactory() { }
-
- /**
- * Constructs a simple Service Factory,
- * using a Map of Apex Interfaces to Apex Classes implementing the interface
- * Note that this will not check the Apex Classes given actually implement the interfaces
- * as this information is not presently available via the Apex runtime
- *
- * @param serviceInterfaceTypeByServiceImplType Map of interfaces to classes
- **/
- public ServiceFactory(Map serviceInterfaceTypeByServiceImplType)
- {
- m_serviceInterfaceTypeByServiceImplType = serviceInterfaceTypeByServiceImplType;
- m_serviceInterfaceTypeByMockService = new Map();
- }
-
- /**
- * Returns a new instance of the Apex class associated with the given Apex interface
- * Will return any mock implementation of the interface provided via setMock
- * Note that this method will not check the configured Apex class actually implements the interface
- *
- * @param serviceInterfaceType Apex interface type
- * @exception Is thrown if there is no registered Apex class for the interface type
- **/
- public virtual Object newInstance(Type serviceInterfaceType)
- {
- // Mock implementation?
- if(m_serviceInterfaceTypeByMockService.containsKey(serviceInterfaceType))
- return m_serviceInterfaceTypeByMockService.get(serviceInterfaceType);
-
- // Create an instance of the type implementing the given interface
- Type serviceImpl = m_serviceInterfaceTypeByServiceImplType.get(serviceInterfaceType);
- if(serviceImpl==null)
- throw new DeveloperException('No implementation registered for service interface ' + serviceInterfaceType.getName());
- return serviceImpl.newInstance();
- }
-
- @TestVisible
- protected virtual void setMock(Type serviceInterfaceType, Object serviceImpl)
- {
- m_serviceInterfaceTypeByMockService.put(serviceInterfaceType, serviceImpl);
- }
- }
-
- /**
- * Class implements a Selector class factory
- **/
- public virtual class SelectorFactory implements fflib_ISelectorFactory
- {
- protected Map m_sObjectBySelectorType;
- protected Map m_sObjectByMockSelector;
-
- /**
- * Constructs a simple Selector Factory
- **/
- public SelectorFactory() { }
-
- /**
- * Constructs a Selector Factory linking SObjectType's with Apex Classes implement the fflib_ISObjectSelector interface
- * Note that the factory does not check the given Apex Classes implement the interface
- * currently this is not possible in Apex.
- *
- * @param sObjectBySelectorType Map of SObjectType's to Selector Apex Classes
- **/
- public SelectorFactory(Map sObjectBySelectorType)
- {
- m_sObjectBySelectorType = sObjectBySelectorType;
- m_sObjectByMockSelector = new Map();
- }
-
- /**
- * Creates a new instance of the associated Apex Class implementing fflib_ISObjectSelector
- * for the given SObjectType, or if provided via setMock returns the Mock implementation
- *
- * @param sObjectType An SObjectType token, e.g. Account.SObjectType
- **/
- public virtual fflib_ISObjectSelector newInstance(SObjectType sObjectType)
- {
- // Mock implementation?
- if(m_sObjectByMockSelector.containsKey(sObjectType))
- return m_sObjectByMockSelector.get(sObjectType);
-
- // Determine Apex class for Selector class
- Type selectorClass = m_sObjectBySelectorType.get(sObjectType);
- if(selectorClass==null)
- throw new DeveloperException('Selector class not found for SObjectType ' + sObjectType);
-
- // Construct Selector class and query by Id for the records
- return (fflib_ISObjectSelector) selectorClass.newInstance();
- }
-
- /**
- * Helper method to query the given SObject records
- * Internally creates an instance of the registered Selector and calls its
- * selectSObjectById method
- *
- * @param recordIds The SObject record Ids, must be all the same SObjectType
- * @exception Is thrown if the record Ids are not all the same or the SObjectType is not registered
- **/
- public virtual List selectById(Set recordIds)
- {
- // No point creating an empty Domain class, nor can we determine the SObjectType anyway
- if(recordIds==null || recordIds.size()==0)
- throw new DeveloperException('Invalid record Id\'s set');
-
- // Determine SObjectType
- SObjectType domainSObjectType = new List(recordIds)[0].getSObjectType();
- for(Id recordId : recordIds)
- if(recordId.getSobjectType()!=domainSObjectType)
- throw new DeveloperException('Unable to determine SObjectType, Set contains Id\'s from different SObject types');
-
- // Construct Selector class and query by Id for the records
- return newInstance(domainSObjectType).selectSObjectsById(recordIds);
- }
-
- /**
- * Helper method to query related records to those provided, for example
- * if passed a list of Opportunity records and the Account Id field will
- * construct internally a list of Account Ids and call the registered
- * Account selector to query the related Account records, e.g.
- *
- * List accounts =
- * (List) Application.Selector.selectByRelationship(myOpps, Opportunity.AccountId);
- *
- * @param relatedRecords used to extract the related record Ids, e.g. Opportunity records
- * @param relationshipField field in the passed records that contains the relationship records to query, e.g. Opportunity.AccountId
- **/
- public virtual List selectByRelationship(List relatedRecords, SObjectField relationshipField)
- {
- Set relatedIds = new Set();
- for(SObject relatedRecord : relatedRecords)
- {
- Id relatedId = (Id) relatedRecord.get(relationshipField);
- if(relatedId!=null)
- relatedIds.add(relatedId);
- }
- return selectById(relatedIds);
- }
-
- @TestVisible
- protected virtual void setMock(fflib_ISObjectSelector selectorInstance)
- {
- m_sObjectByMockSelector.put(selectorInstance.sObjectType(), selectorInstance);
- }
- }
-
- /**
- * Class implements a Domain class factory
- **/
- public virtual class DomainFactory implements fflib_IDomainFactory
- {
- protected fflib_Application.SelectorFactory m_selectorFactory;
-
- protected Map