diff --git a/src/interfaces/packagingInterfacesAndType.ts b/src/interfaces/packagingInterfacesAndType.ts index 912b02f79..18fad78e5 100644 --- a/src/interfaces/packagingInterfacesAndType.ts +++ b/src/interfaces/packagingInterfacesAndType.ts @@ -75,6 +75,8 @@ export type PackageVersionCreateRequestResult = { CreatedDate: string; HasMetadataRemoved: boolean | null; HasPassedCodeCoverageCheck: boolean | null; + CodeCoverage: number | null; + VersionNumber: string | null; CreatedBy: string; ConvertedFromVersionId: string | null; }; diff --git a/src/package/packageVersionCreateRequest.ts b/src/package/packageVersionCreateRequest.ts index fc6d3cab9..b2318930a 100644 --- a/src/package/packageVersionCreateRequest.ts +++ b/src/package/packageVersionCreateRequest.ts @@ -20,7 +20,8 @@ Messages.importMessagesDirectory(__dirname); const messages = Messages.loadMessages('@salesforce/packaging', 'package_version_create'); const QUERY = - 'SELECT Id, Status, Package2Id, Package2.Name, Package2VersionId, Package2Version.SubscriberPackageVersionId, Package2Version.HasPassedCodeCoverageCheck, Tag, Branch, ' + + 'SELECT Id, Status, Package2Id, Package2.Name, Package2VersionId, Package2Version.SubscriberPackageVersionId, Package2Version.HasPassedCodeCoverageCheck,Package2Version.CodeCoverage, Tag, Branch, ' + + 'Package2Version.MajorVersion, Package2Version.MinorVersion, Package2Version.PatchVersion, Package2Version.BuildNumber, ' + 'CreatedDate, Package2Version.HasMetadataRemoved, CreatedById, IsConversionRequest, Package2Version.ConvertedFromVersionId ' + 'FROM Package2VersionCreateRequest ' + '%s' + // WHERE, if applicable @@ -66,7 +67,15 @@ async function query(query: string, connection: Connection): Promise; } & { Package2: Pick; @@ -85,6 +94,14 @@ async function query(query: string, connection: Connection): Promise { Package2Id: '0Ho4p0000004DdnCAE', Package2Name: null, HasPassedCodeCoverageCheck: null, + CodeCoverage: null, + VersionNumber: null, Package2VersionId: '05i4p0000004H7lAAE', Status: 'Success', SubscriberPackageVersionId: null, @@ -261,6 +263,8 @@ describe('packageConvert', () => { Error: [], HasMetadataRemoved: null, HasPassedCodeCoverageCheck: null, + CodeCoverage: null, + VersionNumber: null, Id: '0Ho3i000000Gmj6YYa', Package2Id: undefined, Package2Name: null, diff --git a/test/package/packageTest.nut.ts b/test/package/packageTest.nut.ts index cd0783c2a..a08a76fb0 100644 --- a/test/package/packageTest.nut.ts +++ b/test/package/packageTest.nut.ts @@ -45,6 +45,8 @@ const VERSION_CREATE_RESPONSE_KEYS = [ 'CreatedDate', 'HasMetadataRemoved', 'HasPassedCodeCoverageCheck', + 'CodeCoverage', + 'VersionNumber', 'CreatedBy', 'ConvertedFromVersionId', ]; diff --git a/test/package/packageVersionCreate.test.ts b/test/package/packageVersionCreate.test.ts index be00e25fd..acb5dbe82 100644 --- a/test/package/packageVersionCreate.test.ts +++ b/test/package/packageVersionCreate.test.ts @@ -161,6 +161,8 @@ describe('Package Version Create', () => { 'Error', 'HasMetadataRemoved', 'HasPassedCodeCoverageCheck', + 'CodeCoverage', + 'VersionNumber', 'Id', 'Package2Id', 'Package2Name', @@ -191,6 +193,8 @@ describe('Package Version Create', () => { 'Error', 'HasMetadataRemoved', 'HasPassedCodeCoverageCheck', + 'CodeCoverage', + 'VersionNumber', 'Id', 'Package2Id', 'Package2Name', @@ -219,6 +223,8 @@ describe('Package Version Create', () => { 'Error', 'HasMetadataRemoved', 'HasPassedCodeCoverageCheck', + 'CodeCoverage', + 'VersionNumber', 'Id', 'Package2Id', 'Package2Name', @@ -251,6 +257,8 @@ describe('Package Version Create', () => { 'Error', 'HasMetadataRemoved', 'HasPassedCodeCoverageCheck', + 'CodeCoverage', + 'VersionNumber', 'Id', 'Package2Id', 'Package2Name', @@ -281,6 +289,8 @@ describe('Package Version Create', () => { 'Error', 'HasMetadataRemoved', 'HasPassedCodeCoverageCheck', + 'CodeCoverage', + 'VersionNumber', 'Id', 'Package2Id', 'Package2Name', @@ -310,6 +320,8 @@ describe('Package Version Create', () => { 'Error', 'HasMetadataRemoved', 'HasPassedCodeCoverageCheck', + 'CodeCoverage', + 'VersionNumber', 'Id', 'Package2Id', 'Package2Name', @@ -340,6 +352,8 @@ describe('Package Version Create', () => { 'Error', 'HasMetadataRemoved', 'HasPassedCodeCoverageCheck', + 'CodeCoverage', + 'VersionNumber', 'Id', 'Package2Id', 'Package2Name', @@ -363,6 +377,8 @@ describe('Package Version Create', () => { 'Error', 'HasMetadataRemoved', 'HasPassedCodeCoverageCheck', + 'CodeCoverage', + 'VersionNumber', 'Id', 'Package2Id', 'Package2Name', @@ -410,6 +426,8 @@ describe('Package Version Create', () => { 'Error', 'HasMetadataRemoved', 'HasPassedCodeCoverageCheck', + 'CodeCoverage', + 'VersionNumber', 'Id', 'Package2Id', 'Package2Name', @@ -457,6 +475,8 @@ describe('Package Version Create', () => { 'Error', 'HasMetadataRemoved', 'HasPassedCodeCoverageCheck', + 'CodeCoverage', + 'VersionNumber', 'Id', 'Package2Id', 'Package2Name', @@ -502,6 +522,8 @@ describe('Package Version Create', () => { 'Error', 'HasMetadataRemoved', 'HasPassedCodeCoverageCheck', + 'CodeCoverage', + 'VersionNumber', 'Id', 'Package2Id', 'Package2Name', @@ -526,6 +548,8 @@ describe('Package Version Create', () => { 'Error', 'HasMetadataRemoved', 'HasPassedCodeCoverageCheck', + 'CodeCoverage', + 'VersionNumber', 'Id', 'Package2Id', 'Package2Name', @@ -550,6 +574,8 @@ describe('Package Version Create', () => { 'Error', 'HasMetadataRemoved', 'HasPassedCodeCoverageCheck', + 'CodeCoverage', + 'VersionNumber', 'Id', 'Package2Id', 'Package2Name', @@ -579,6 +605,8 @@ describe('Package Version Create', () => { 'Error', 'HasMetadataRemoved', 'HasPassedCodeCoverageCheck', + 'CodeCoverage', + 'VersionNumber', 'Id', 'Package2Id', 'Package2Name', @@ -782,6 +810,8 @@ describe('Package Version Create', () => { 'Error', 'HasMetadataRemoved', 'HasPassedCodeCoverageCheck', + 'CodeCoverage', + 'VersionNumber', 'Id', 'Package2Id', 'Package2Name', @@ -850,6 +880,8 @@ describe('Package Version Create', () => { 'Error', 'HasMetadataRemoved', 'HasPassedCodeCoverageCheck', + 'CodeCoverage', + 'VersionNumber', 'Id', 'Package2Id', 'Package2Name', @@ -930,6 +962,8 @@ describe('Package Version Create', () => { 'Error', 'HasMetadataRemoved', 'HasPassedCodeCoverageCheck', + 'CodeCoverage', + 'VersionNumber', 'Id', 'Package2Id', 'Package2Name',