Skip to content
This repository was archived by the owner on Jan 2, 2022. It is now read-only.

Commit feea878

Browse files
committed
fix: log the Netlify constants object
Signed-off-by: Jonah Snider <[email protected]>
1 parent 16e151d commit feea878

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"prebuild": "rm -rf tsc_output",
3939
"style": "prettier --ignore-path .gitignore --check \"./**/*.{{j,t}{s,sx},flow,{sc,c,le}ss,json,m{d,dx},{y,ya}ml}\""
4040
},
41-
"version": "0.0.0-development",
41+
"version": "0.0.0-canary-1",
4242
"xo": {
4343
"prettier": true
4444
}

src/index.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ interface NetlifyConstants {
1414
interface NetlifyOpts {
1515
utils: NetlifyUtils;
1616
constants: NetlifyConstants;
17+
inputs: Record<string, any>;
18+
netlifyConfig: Record<string, any>;
1719
}
1820

1921
const buildCachePath = '.next';
@@ -25,7 +27,18 @@ module.exports = {
2527
// Does not do anything if:
2628
// - the file/directory already exists locally
2729
// - the file/directory has not been cached yet
28-
async onPreBuild({utils, constants}: NetlifyOpts) {
30+
async onPreBuild({utils, constants, inputs, netlifyConfig}: NetlifyOpts) {
31+
console.debug('<- DEBUG ->');
32+
console.debug('<- CONSTANTS ->');
33+
console.debug(constants);
34+
console.debug('<- CONSTANTS ->');
35+
console.debug('<- INPUTS ->');
36+
console.debug(inputs);
37+
console.debug('<- INPUTS ->');
38+
console.debug('<- CONFIG ->');
39+
console.log(netlifyConfig);
40+
console.debug('<- CONFIG ->');
41+
console.debug('<- DEBUG ->');
2942
const directory = joinPaths(constants.BUILD_DIR, buildCachePath);
3043

3144
const success = await utils.cache.restore(directory, {

0 commit comments

Comments
 (0)