diff --git a/src/cfml/system/services/ArtifactService.cfc b/src/cfml/system/services/ArtifactService.cfc index 7c7733f05..4ce5c2f9c 100644 --- a/src/cfml/system/services/ArtifactService.cfc +++ b/src/cfml/system/services/ArtifactService.cfc @@ -21,7 +21,6 @@ component accessors="true" singleton { property name='packageService' inject='PackageService'; property name='logger' inject='logbox:logger:{this}'; property name="semanticVersion" inject="provider:semanticVersion@semver"; - // COMMANDBOX-479 property name="configService" inject="ConfigService"; @@ -31,7 +30,6 @@ component accessors="true" singleton { function onDIComplete() { // Create the artifacts directory if it doesn't exist - // COMMANDBOX-479 if( !directoryExists( getArtifactsDirectory() ) ) { directoryCreate( getArtifactsDirectory() ); } @@ -44,8 +42,9 @@ component accessors="true" singleton { * @returns A struct of arrays where the struct key is the package package and the array contains the versions of that package in the cache. */ struct function listArtifacts( packageName='' ) { - var result = {}; - // COMMANDBOX-479 + // Ordered struct + var result = [:]; + var dirList = directoryList( path=getArtifactsDirectory(), recurse=false, listInfo='query', sort='name asc' ); for( var dir in dirList ) { @@ -71,7 +70,7 @@ component accessors="true" singleton { * Removes all artifacts from the cache and returns the number of wiped out directories */ numeric function cleanArtifacts() { - // COMMANDBOX-479 + var qryDir = directoryList( path=getArtifactsDirectory(), recurse=false, listInfo='query' ); var numRemoved = 0; @@ -115,7 +114,7 @@ component accessors="true" singleton { */ function getPackagePath( required packageName, version="" ){ // This will likely change, so I'm only going to put the code here. - // COMMANDBOX-479 + var path = getArtifactsDirectory() & '/' & arguments.packageName; // do we have a version? if( arguments.version.len() ){ @@ -267,7 +266,7 @@ component accessors="true" singleton { } } - // COMMANDBOX-479 + string function getArtifactsDirectory() { return configService.getSetting( 'artifactsDirectory', variables.artifactDir ); }