@@ -2,8 +2,8 @@ import {join as joinPaths} from 'path';
2
2
3
3
interface NetlifyUtils {
4
4
cache : {
5
- restore ( path : string , options : { digest : string [ ] } ) : Promise < any > ;
6
- save ( path : string , options : { digest : string [ ] } ) : Promise < any > ;
5
+ restore ( path : string , options ?: Partial < { move : boolean } > ) : Promise < any > ;
6
+ save ( path : string , options ?: Partial < { digests : string [ ] ; move : boolean ; ttl : number } > ) : Promise < any > ;
7
7
} ;
8
8
}
9
9
@@ -39,9 +39,9 @@ function generateAbsolutePaths(
39
39
const buildDirPathFromProject = options . inputs . build_dir_path ?? '.' ;
40
40
41
41
/** The absolute path to the build folder for Next.js. */
42
- const absoluteBuildDirPath = joinPaths ( options . netlifyConfig . build . base , buildDirPathFromProject , buildDirName , 'cache' ) ;
43
- /** The absolute path to the build manifest Next.js uses. */
44
- // I don't actually know if this build manifest has any relation to the cache folder
42
+ const absoluteBuildDirPath = joinPaths ( options . netlifyConfig . build . base , buildDirPathFromProject , buildDirName , 'cache' ) ;
43
+ /** The absolute path to the build manifest Next.js uses. */
44
+ // I don't actually know if this build manifest has any relation to the cache folder
45
45
const manifestPath = joinPaths ( absoluteBuildDirPath , '..' , 'build-manifest.json' ) ;
46
46
47
47
return {
@@ -79,7 +79,7 @@ module.exports = {
79
79
const paths = generateAbsolutePaths ( { netlifyConfig, inputs} ) ;
80
80
81
81
const success = await utils . cache . save ( paths . absolute . buildDir , {
82
- digest : [ paths . absolute . manifest ]
82
+ digests : [ paths . absolute . manifest ]
83
83
} ) ;
84
84
85
85
if ( success ) {
0 commit comments