gdu 4.1.7 → 4.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/next.config.d.ts +9 -0
- package/dist/config/next.config.js +117 -44
- package/package.json +1 -1
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
export declare const withTM: (nextConfig?: {}) => {};
|
|
2
|
+
declare type CSPKey = 'frame-ancestors' | 'frame-src' | 'style-src' | 'img-src' | 'font-src' | 'worker-src' | 'child-src' | 'object-src' | 'connect-src' | 'script-src-elem' | 'script-src';
|
|
3
|
+
interface CSPItem {
|
|
4
|
+
key: CSPKey;
|
|
5
|
+
values: string[];
|
|
6
|
+
}
|
|
7
|
+
export declare const CSPDefaultsList: CSPItem[];
|
|
8
|
+
export declare const generateCSP: (cspList: CSPItem[]) => string;
|
|
2
9
|
export declare const defaultSecurityHeaders: {
|
|
3
10
|
key: string;
|
|
4
11
|
value: string;
|
|
@@ -18,6 +25,7 @@ export declare const createNextJSConfig: (buildEnv: any) => {
|
|
|
18
25
|
ignoreBuildErrors: boolean;
|
|
19
26
|
};
|
|
20
27
|
images: {
|
|
28
|
+
minimumCacheTTL: number;
|
|
21
29
|
formats: string[];
|
|
22
30
|
deviceSizes: number[];
|
|
23
31
|
imageSizes: number[];
|
|
@@ -26,3 +34,4 @@ export declare const createNextJSConfig: (buildEnv: any) => {
|
|
|
26
34
|
webpack: (defaultConfig: any) => any;
|
|
27
35
|
};
|
|
28
36
|
export declare const createNextJSTranspiledConfig: () => any;
|
|
37
|
+
export {};
|
|
@@ -22,7 +22,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
22
22
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.createNextJSTranspiledConfig = exports.createNextJSConfig = exports.defaultSecurityHeaders = exports.withTM = void 0;
|
|
25
|
+
exports.createNextJSTranspiledConfig = exports.createNextJSConfig = exports.defaultSecurityHeaders = exports.generateCSP = exports.CSPDefaultsList = exports.withTM = void 0;
|
|
26
26
|
const path_1 = __importStar(require("path"));
|
|
27
27
|
const next_plugin_1 = require("@vanilla-extract/next-plugin");
|
|
28
28
|
const dotenv_webpack_1 = __importDefault(require("dotenv-webpack"));
|
|
@@ -45,45 +45,121 @@ exports.withTM = next_transpile_modules_1.default([
|
|
|
45
45
|
'@autoguru/layout',
|
|
46
46
|
'@popperjs/core',
|
|
47
47
|
]);
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
48
|
+
exports.CSPDefaultsList = [
|
|
49
|
+
{
|
|
50
|
+
key: 'frame-ancestors',
|
|
51
|
+
values: ['https://*.autoguru.com.au'],
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
key: 'frame-src',
|
|
55
|
+
values: ["'self'", 'https://www.youtube.com', 'https://www.google.com'],
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
key: 'style-src',
|
|
59
|
+
values: [
|
|
60
|
+
"'self'",
|
|
61
|
+
"'unsafe-inline'",
|
|
62
|
+
'https://*.autoguru.com.au',
|
|
63
|
+
'https://*.googleapis.com',
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
key: 'img-src',
|
|
68
|
+
values: [
|
|
69
|
+
"'self'",
|
|
70
|
+
'data:',
|
|
71
|
+
'https://*.autoguru.com.au',
|
|
72
|
+
'https://*.googletagmanager.com',
|
|
73
|
+
'https://*.google-analytics.com',
|
|
74
|
+
'https://*.heapanalytics.com/',
|
|
75
|
+
'https://heapanalytics.com/',
|
|
76
|
+
'https://*.tvsquared.com',
|
|
77
|
+
'https://*.google.com',
|
|
78
|
+
'https://*.google.com.au',
|
|
79
|
+
'https://*.gstatic.com',
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
key: 'font-src',
|
|
84
|
+
values: [
|
|
85
|
+
'https://*.autoguru.com.au',
|
|
86
|
+
'https://*.googleapis.com',
|
|
87
|
+
'https://*.gstatic.com',
|
|
88
|
+
],
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
key: 'worker-src',
|
|
92
|
+
values: ["'self'", 'blob:'],
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
key: 'child-src',
|
|
96
|
+
values: ["'self'", 'blob:'],
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
key: 'object-src',
|
|
100
|
+
values: ["'none'"],
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
key: 'connect-src',
|
|
104
|
+
values: [
|
|
105
|
+
"'self'",
|
|
106
|
+
'*.autoguru.com.au',
|
|
107
|
+
'https://*.googletagmanager.com',
|
|
108
|
+
'https://*.google-analytics.com',
|
|
109
|
+
'https://*.google.com',
|
|
110
|
+
'https://*.google.com.au',
|
|
111
|
+
'https://*.gstatic.com',
|
|
112
|
+
'https://*.googleadservices.com',
|
|
113
|
+
'https://*.heapanalytics.com',
|
|
114
|
+
'https://*.doubleclick.net',
|
|
115
|
+
'https://*.mapbox.com',
|
|
116
|
+
'https://*.quantserve.com',
|
|
117
|
+
'https://*.wisepops.com',
|
|
118
|
+
'https://*.tvsquared.com',
|
|
119
|
+
'https://*.quantcount.com',
|
|
120
|
+
],
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
key: 'script-src-elem',
|
|
124
|
+
values: [
|
|
125
|
+
"'self'",
|
|
126
|
+
"'unsafe-inline'",
|
|
127
|
+
'https://*.autoguru.com.au',
|
|
128
|
+
'https://*.google-analytics.com',
|
|
129
|
+
'https://*.googletagmanager.com',
|
|
130
|
+
'https://*.gstatic.com',
|
|
131
|
+
'https://*.google.com',
|
|
132
|
+
'https://*.google.com.au',
|
|
133
|
+
'https://*.gstatic.com',
|
|
134
|
+
'https://*.googleadservices.com',
|
|
135
|
+
'https://*.heapanalytics.com',
|
|
136
|
+
'https://*.doubleclick.net',
|
|
137
|
+
'https://*.mapbox.com',
|
|
138
|
+
'https://*.quantserve.com',
|
|
139
|
+
'https://*.wisepops.com',
|
|
140
|
+
'https://*.tvsquared.com',
|
|
141
|
+
'https://*.quantcount.com',
|
|
142
|
+
],
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
key: 'script-src',
|
|
146
|
+
values: [
|
|
147
|
+
"'self'",
|
|
148
|
+
"'unsafe-eval'",
|
|
149
|
+
'https://*.autoguru.com.au',
|
|
150
|
+
'https://*.googletagmanager.com',
|
|
151
|
+
'https://*.google.com.au',
|
|
152
|
+
'https://*.gstatic.com',
|
|
153
|
+
'https://*.heapanalytics.com',
|
|
154
|
+
'https://*.quantserve.com',
|
|
155
|
+
'https://*.wisepops.com',
|
|
156
|
+
'https://*.tvsquared.com',
|
|
157
|
+
'https://*.quantcount.com',
|
|
158
|
+
],
|
|
159
|
+
},
|
|
160
|
+
];
|
|
161
|
+
const generateCSP = (cspList) => cspList.reduce((policies, csp, currentIndex) => `${policies}${currentIndex !== 0 ? '; ' : ''}${csp.key} ${csp.values.join(' ')}`, '');
|
|
162
|
+
exports.generateCSP = generateCSP;
|
|
87
163
|
exports.defaultSecurityHeaders = [
|
|
88
164
|
{
|
|
89
165
|
key: 'X-DNS-Prefetch-Control',
|
|
@@ -97,10 +173,6 @@ exports.defaultSecurityHeaders = [
|
|
|
97
173
|
key: 'X-Frame-Options',
|
|
98
174
|
value: 'SAMEORIGIN https://*.autoguru.com.au',
|
|
99
175
|
},
|
|
100
|
-
{
|
|
101
|
-
key: 'Content-Security-Policy',
|
|
102
|
-
value: `frame-ancestors https://*.autoguru.com.au; frame-src ${allowedIFrameSources}; style-src ${allowedStyleSources}; img-src ${allowedImageSources} data: ${allowedDataDomains}; font-src ${allowedFontSources}; worker-src ${allowedDataSources}; child-src ${allowedDataSources}; object-src ${allowedObjectSources};connect-src ${allowedScriptSources}; script-src-elem ${allowedScriptSources}; script-src ${allowedScriptSources};`,
|
|
103
|
-
},
|
|
104
176
|
];
|
|
105
177
|
const createNextJSConfig = (buildEnv) => {
|
|
106
178
|
var _a, _b;
|
|
@@ -122,6 +194,7 @@ const createNextJSConfig = (buildEnv) => {
|
|
|
122
194
|
ignoreBuildErrors: true,
|
|
123
195
|
},
|
|
124
196
|
images: {
|
|
197
|
+
minimumCacheTTL: 3153600000,
|
|
125
198
|
formats: ['image/avif', 'image/webp'],
|
|
126
199
|
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
|
|
127
200
|
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
|