File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
src/commands/package/version Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,8 @@ import Package2VersionStatus = PackagingSObjects.Package2VersionStatus;
22
22
23
23
Messages . importMessagesDirectoryFromMetaUrl ( import . meta. url ) ;
24
24
const messages = Messages . loadMessages ( '@salesforce/plugin-packaging' , 'package_version_create' ) ;
25
-
25
+ const fileCountThreshold = 7000 ;
26
+ const maxFileCountLimit = 10000 ;
26
27
export type PackageVersionCommandResult = Partial < PackageVersionCreateRequestResult > ;
27
28
28
29
export class PackageVersionCreateCommand extends SfCommand < PackageVersionCommandResult > {
@@ -284,6 +285,15 @@ export class PackageVersionCreateCommand extends SfCommand<PackageVersionCommand
284
285
this . config . bin ,
285
286
] )
286
287
) ;
288
+ if ( ( result . TotalNumberOfMetadataFiles ?? 0 ) > fileCountThreshold ) {
289
+ this . warn (
290
+ 'This package contains more than ${fileCountThreshold} metadata files.' +
291
+ 'The maximum number of metadata files in a package is ' +
292
+ maxFileCountLimit +
293
+ 'If you reach the file limit, you won’t be able to create new package versions. ' +
294
+ 'To confirm the exact file count for this package, run sf package version report and review the “# Metadata Files” column.'
295
+ ) ;
296
+ }
287
297
break ;
288
298
default :
289
299
this . log (
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ const expectedPVCRkeys = [
42
42
'ConvertedFromVersionId' ,
43
43
'CodeCoverage' ,
44
44
'VersionNumber' ,
45
+ 'TotalNumberOfMetadataFiles' ,
45
46
] ;
46
47
47
48
describe ( 'package:version:*' , ( ) => {
You can’t perform that action at this time.
0 commit comments