-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: build ComponentSet from metadata and org connection
- Loading branch information
Showing
6 changed files
with
124 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -397,6 +397,36 @@ describe('ComponentSetBuilder', () => { | |
expect(compSet.has(apexClassComponent)).to.equal(true); | ||
}); | ||
|
||
it('should create ComponentSet from org connection and metadata', async () => { | ||
const mdCompSet = new ComponentSet(); | ||
mdCompSet.add(apexClassComponent); | ||
|
||
fromSourceStub.returns(mdCompSet); | ||
const packageDir1 = path.resolve('force-app'); | ||
|
||
componentSet.add(apexClassWildcardMatch); | ||
fromConnectionStub.resolves(componentSet); | ||
const options = { | ||
sourcepath: undefined, | ||
metadata: { | ||
metadataEntries: ['ApexClass:MyClas*'], | ||
directoryPaths: [packageDir1], | ||
}, | ||
manifest: undefined, | ||
org: { | ||
username: '[email protected]', | ||
exclude: [], | ||
}, | ||
}; | ||
|
||
const compSet = await ComponentSetBuilder.build(options); | ||
expect(fromSourceStub.calledTwice).to.equal(true); | ||
expect(fromConnectionStub.calledOnce).to.equal(true); | ||
expect(compSet.size).to.equal(2); | ||
expect(compSet.has(apexClassComponent)).to.equal(true); | ||
expect(compSet.has(apexClassWildcardMatch)).to.equal(true); | ||
}); | ||
|
||
it('should create ComponentSet from manifest and multiple package', async () => { | ||
fileExistsSyncStub.returns(true); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0c9d568
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark
eda-componentSetCreate-linux
200
ms206
ms0.97
eda-sourceToMdapi-linux
4937
ms4840
ms1.02
eda-sourceToZip-linux
3904
ms5152
ms0.76
eda-mdapiToSource-linux
3085
ms2975
ms1.04
lotsOfClasses-componentSetCreate-linux
374
ms383
ms0.98
lotsOfClasses-sourceToMdapi-linux
5767
ms6107
ms0.94
lotsOfClasses-sourceToZip-linux
5738
ms5052
ms1.14
lotsOfClasses-mdapiToSource-linux
3428
ms3474
ms0.99
lotsOfClassesOneDir-componentSetCreate-linux
632
ms644
ms0.98
lotsOfClassesOneDir-sourceToMdapi-linux
9019
ms9091
ms0.99
lotsOfClassesOneDir-sourceToZip-linux
8250
ms7402
ms1.11
lotsOfClassesOneDir-mdapiToSource-linux
6190
ms6096
ms1.02
This comment was automatically generated by workflow using github-action-benchmark.
0c9d568
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark
eda-componentSetCreate-win32
418
ms412
ms1.01
eda-sourceToMdapi-win32
6788
ms5971
ms1.14
eda-sourceToZip-win32
5811
ms4963
ms1.17
eda-mdapiToSource-win32
6056
ms5826
ms1.04
lotsOfClasses-componentSetCreate-win32
944
ms885
ms1.07
lotsOfClasses-sourceToMdapi-win32
10733
ms10012
ms1.07
lotsOfClasses-sourceToZip-win32
7949
ms7309
ms1.09
lotsOfClasses-mdapiToSource-win32
7431
ms7562
ms0.98
lotsOfClassesOneDir-componentSetCreate-win32
1501
ms1490
ms1.01
lotsOfClassesOneDir-sourceToMdapi-win32
16765
ms16628
ms1.01
lotsOfClassesOneDir-sourceToZip-win32
13000
ms10759
ms1.21
lotsOfClassesOneDir-mdapiToSource-win32
15529
ms13835
ms1.12
This comment was automatically generated by workflow using github-action-benchmark.