gscan 4.23.1 → 4.24.0

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/README.md CHANGED
@@ -16,7 +16,7 @@ GScan works on a system of rules. Each rule has a way to check whether it passes
16
16
 
17
17
  In addition, an **error** can be marked as **fatal**. A **fatal error** means, left unchecked a Ghost publication would throw 500 errors on certain pages because of the detected out-of-date or erroneous code.
18
18
 
19
- In Ghost, we call GScan on boot. If any fatal errors are detected, the blog will not boot. In Ghost(Pro) and in Ghost-CLI we call GScan as part of major upgrades. The upgrade will not be allowed to continue if any fatal errors are detected.
19
+ In Ghost, we call GScan on boot. If any fatal errors are detected in Ghost(Pro) and in Ghost-CLI we call GScan as part of major upgrades. The upgrade will not be allowed to continue if any fatal errors are detected.
20
20
 
21
21
  Errors are only marked as **fatal errors** if they would cause errors, and therefore should block a boot or an upgrade.
22
22
 
@@ -22,6 +22,17 @@ let rules = {
22
22
  The <code>ghost-api</code> is not supported starting Ghost v5 and should not be used.
23
23
  Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
24
24
  },
25
+ 'GS090-NO-AUTHOR-HELPER-IN-POST-CONTEXT': {
26
+ level: 'error',
27
+ fatal: true,
28
+ rule: 'The <code>{{author}}</code> helper should be replaces with <code>{{authors}}</code>',
29
+ details: oneLineTrim`The <code>{{author}}</code> helper has been deprecated since Ghost 1.22.0 in favor of <code>{{<authors>}}</code><br>
30
+ The <code>{{author}}</code> helper was removed in Ghost v5 and should not be used.
31
+ Find more information about the <code>@site</code> property <a href="${docsBaseUrl}helpers/site/" target=_blank>here</a>.`,
32
+ helper: '{{author}}'
33
+ },
34
+
35
+ // Updated v1 & v2 rules
25
36
  'GS001-DEPR-BLOG': {
26
37
  level: 'error',
27
38
  fatal: true,
@@ -32,14 +43,413 @@ let rules = {
32
43
  regex: /{{\s*?@blog\.[a-zA-Z0-9_]+\s*?}}/g,
33
44
  helper: '{{@blog}}'
34
45
  },
35
- 'GS090-NO-AUTHOR-HELPER-IN-POST-CONTEXT': {
46
+ 'GS001-DEPR-AUTH-ID': {
36
47
  level: 'error',
37
48
  fatal: true,
38
- rule: 'The <code>{{author}}</code> helper should be replaces with <code>{{authors}}</code>',
39
- details: oneLineTrim`The <code>{{author}}</code> helper has been deprecated since Ghost 1.22.0 in favor of <code>{{<authors>}}</code><br>
40
- The <code>{{author}}</code> helper was removed in Ghost v5 and should not be used.
41
- Find more information about the <code>@site</code> property <a href="${docsBaseUrl}helpers/site/" target=_blank>here</a>.`,
42
- helper: '{{author}}'
49
+ rule: 'Replace the <code>{{author.id}}</code> helper with <code>{{primary_author.id}}</code> or <code>{{authors.[#].id}}</code>',
50
+ details: oneLineTrim`The usage of <code>{{author.id}}</code> is deprecated and should be replaced with either <code>{{primary_author.id}}</code>
51
+ or <code>{{authors.[#].id}}</code>.<br>
52
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
53
+ regex: /{{\s*?author\.id\s*?}}/g,
54
+ helper: '{{author.id}}'
55
+ },
56
+ 'GS001-DEPR-AUTH-SLUG': {
57
+ level: 'error',
58
+ fatal: true,
59
+ rule: 'Replace the <code>{{author.slug}}</code> helper with <code>{{primary_author.slug}}</code> or <code>{{authors.[#].slug}}</code>',
60
+ details: oneLineTrim`The usage of <code>{{author.slug}}</code> is deprecated and should be replaced with either <code>{{primary_author.slug}}</code>
61
+ or <code>{{authors.[#].slug}}</code>.<br>
62
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
63
+ regex: /{{\s*?author\.slug\s*?}}/g,
64
+ helper: '{{author.slug}}'
65
+ },
66
+ 'GS001-DEPR-AUTH-MAIL': {
67
+ level: 'error',
68
+ fatal: true,
69
+ rule: 'Replace the <code>{{author.email}}</code> helper with <code>{{primary_author.email}}</code> or <code>{{authors.[#].email}}</code>',
70
+ details: oneLineTrim`The usage of <code>{{author.email}}</code> is deprecated and should be replaced with either <code>{{primary_author.email}}</code>
71
+ or <code>{{authors.[#].email}}</code>.<br>
72
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
73
+ regex: /{{\s*?author\.email\s*?}}/g,
74
+ helper: '{{author.email}}'
75
+ },
76
+ 'GS001-DEPR-AUTH-MT': {
77
+ level: 'error',
78
+ fatal: true,
79
+ rule: 'Replace the <code>{{author.meta_title}}</code> helper with <code>{{primary_author.meta_title}}</code> or <code>{{authors.[#].meta_title}}</code>',
80
+ details: oneLineTrim`The usage of <code>{{author.meta_title}}</code> is deprecated and should be replaced with either <code>{{primary_author.meta_title}}</code>
81
+ or <code>{{authors.[#].meta_title}}</code>.<br>
82
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
83
+ regex: /{{\s*?author\.meta_title\s*?}}/g,
84
+ helper: '{{author.meta_title}}'
85
+ },
86
+ 'GS001-DEPR-AUTH-MD': {
87
+ level: 'error',
88
+ fatal: true,
89
+ rule: 'Replace the <code>{{author.meta_description}}</code> helper with <code>{{primary_author.meta_description}}</code> or <code>{{authors.[#].meta_description}}</code>',
90
+ details: oneLineTrim`The usage of <code>{{author.meta_description}}</code> is deprecated and should be replaced with either <code>{{primary_author.meta_description}}</code>
91
+ or <code>{{authors.[#].meta_description}}</code>.<br>
92
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
93
+ regex: /{{\s*?author\.meta_description\s*?}}/g,
94
+ helper: '{{author.meta_description}}'
95
+ },
96
+ 'GS001-DEPR-AUTH-NAME': {
97
+ level: 'error',
98
+ fatal: true,
99
+ rule: 'Replace the <code>{{author.name}}</code> helper with <code>{{primary_author.name}}</code> or <code>{{authors.[#].name}}</code>',
100
+ details: oneLineTrim`The usage of <code>{{author.name}}</code> is deprecated and should be replaced with either <code>{{primary_author.name}}</code>
101
+ or <code>{{authors.[#].name}}</code>.<br>
102
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
103
+ regex: /{{\s*?author\.name\s*?}}/g,
104
+ helper: '{{author.name}}'
105
+ },
106
+ 'GS001-DEPR-AUTH-BIO': {
107
+ level: 'error',
108
+ fatal: true,
109
+ rule: 'Replace the <code>{{author.bio}}</code> helper with <code>{{primary_author.bio}}</code> or <code>{{authors.[#].bio}}</code>',
110
+ details: oneLineTrim`The usage of <code>{{author.bio}}</code> is deprecated and should be replaced with either <code>{{primary_author.bio}}</code>
111
+ or <code>{{authors.[#].bio}}</code>.<br>
112
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
113
+ regex: /{{\s*?author\.bio\s*?}}/g,
114
+ helper: '{{author.bio}}'
115
+ },
116
+ 'GS001-DEPR-AUTH-LOC': {
117
+ level: 'error',
118
+ fatal: true,
119
+ rule: 'Replace the <code>{{author.location}}</code> helper with <code>{{primary_author.location}}</code> or <code>{{authors.[#].location}}</code>',
120
+ details: oneLineTrim`The usage of <code>{{author.location}}</code> is deprecated and should be replaced with either <code>{{primary_author.location}}</code>
121
+ or <code>{{authors.[#].location}}</code>.<br>
122
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
123
+ regex: /{{\s*?author\.location\s*?}}/g,
124
+ helper: '{{author.location}}'
125
+ },
126
+ 'GS001-DEPR-AUTH-WEB': {
127
+ level: 'error',
128
+ fatal: true,
129
+ rule: 'Replace the <code>{{author.website}}</code> helper with <code>{{primary_author.website}}</code> or <code>{{authors.[#].website}}</code>',
130
+ details: oneLineTrim`The usage of <code>{{author.website}}</code> is deprecated and should be replaced with either <code>{{primary_author.website}}</code>
131
+ or <code>{{authors.[#].website}}</code>.<br>
132
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
133
+ regex: /{{\s*?author\.website\s*?}}/g,
134
+ helper: '{{author.website}}'
135
+ },
136
+ 'GS001-DEPR-AUTH-TW': {
137
+ level: 'error',
138
+ fatal: true,
139
+ rule: 'Replace the <code>{{author.twitter}}</code> helper with <code>{{primary_author.twitter}}</code> or <code>{{authors.[#].twitter}}</code>',
140
+ details: oneLineTrim`The usage of <code>{{author.twitter}}</code> is deprecated and should be replaced with either <code>{{primary_author.twitter}}</code>
141
+ or <code>{{authors.[#].twitter}}</code>.<br>
142
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
143
+ regex: /{{\s*?author\.twitter\s*?}}/g,
144
+ helper: '{{author.twitter}}'
145
+ },
146
+ 'GS001-DEPR-AUTH-FB': {
147
+ level: 'error',
148
+ fatal: true,
149
+ rule: 'Replace the <code>{{author.facebook}}</code> helper with <code>{{primary_author.facebook}}</code> or <code>{{authors.[#].facebook}}</code>',
150
+ details: oneLineTrim`The usage of <code>{{author.facebook}}</code> is deprecated and should be replaced with either <code>{{primary_author.facebook}}</code>
151
+ or <code>{{authors.[#].facebook}}</code>.<br>
152
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
153
+ regex: /{{\s*?author\.facebook\s*?}}/g,
154
+ helper: '{{author.facebook}}'
155
+ },
156
+ 'GS001-DEPR-AUTH-PIMG': {
157
+ level: 'error',
158
+ fatal: true,
159
+ rule: 'Replace the <code>{{author.profile_image}}</code> helper with <code>{{primary_author.profile_image}}</code> or <code>{{authors.[#].profile_image}}</code>',
160
+ details: oneLineTrim`The usage of <code>{{author.profile_image}}</code> is deprecated and should be replaced with either <code>{{primary_author.profile_image}}</code>
161
+ or <code>{{authors.[#].profile_image}}</code>.<br>
162
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
163
+ regex: /{{\s*?author\.profile_image\s*?}}/g,
164
+ helper: '{{author.profile_image}}'
165
+ },
166
+ 'GS001-DEPR-AUTH-CIMG': {
167
+ level: 'error',
168
+ fatal: true,
169
+ rule: 'Replace the <code>{{author.cover_image}}</code> helper with <code>{{primary_author.cover_image}}</code> or <code>{{authors.[#].cover_image}}</code>',
170
+ details: oneLineTrim`The usage of <code>{{author.cover_image}}</code> is deprecated and should be replaced with either <code>{{primary_author.cover_image}}</code>
171
+ or <code>{{authors.[#].cover_image}}</code>.<br>
172
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
173
+ regex: /{{\s*?author\.cover_image\s*?}}/g,
174
+ helper: '{{author.cover_image}}'
175
+ },
176
+ 'GS001-DEPR-AUTH-URL': {
177
+ level: 'error',
178
+ fatal: true,
179
+ rule: 'Replace the <code>{{author.url}}</code> helper with <code>{{primary_author.url}}</code> or <code>{{authors.[#].url}}</code>',
180
+ details: oneLineTrim`The usage of <code>{{author.url}}</code> is deprecated and should be replaced with either <code>{{primary_author.url}}</code>
181
+ or <code>{{authors.[#].url}}</code>.<br>
182
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
183
+ regex: /{{\s*?author\.url\s*?}}/g,
184
+ helper: '{{author.url}}'
185
+ },
186
+ 'GS001-DEPR-PAUTH': {
187
+ level: 'error',
188
+ fatal: true,
189
+ rule: 'Replace the <code>{{post.author}}</code> helper with <code>{{post.primary_author}}</code> or <code>{{authors.[#]}}</code>',
190
+ details: oneLineTrim`The usage of <code>{{post.author}}</code> is deprecated and should be replaced with either <code>{{post.primary_author}}</code>
191
+ or <code>{{post.authors.[#]}}</code>.<br>
192
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
193
+ regex: /{{\s*?post\.author\s*?}}/g,
194
+ helper: '{{post.author}}'
195
+ },
196
+ 'GS001-DEPR-PAUTH-ID': {
197
+ level: 'error',
198
+ fatal: true,
199
+ rule: 'Replace the <code>{{post.author.id}}</code> helper with <code>{{post.primary_author.id}}</code> or <code>{{authors.[#].id}}</code>',
200
+ details: oneLineTrim`The usage of <code>{{post.author.id}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.id}}</code>
201
+ or <code>{{post.authors.[#].id}}</code>.<br>
202
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
203
+ regex: /{{\s*?post\.author\.id\s*?}}/g,
204
+ helper: '{{post.author.id}}'
205
+ },
206
+ 'GS001-DEPR-PAUTH-SLUG': {
207
+ level: 'error',
208
+ fatal: true,
209
+ rule: 'Replace the <code>{{post.author.slug}}</code> helper with <code>{{post.primary_author.slug}}</code> or <code>{{post.authors.[#].slug}}</code>',
210
+ details: oneLineTrim`The usage of <code>{{post.author.slug}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.slug}}</code>
211
+ or <code>{{post.authors.[#].slug}}</code>.<br>
212
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
213
+ regex: /{{\s*?post\.author\.slug\s*?}}/g,
214
+ helper: '{{post.author.slug}}'
215
+ },
216
+ 'GS001-DEPR-PAUTH-MAIL': {
217
+ level: 'error',
218
+ fatal: true,
219
+ rule: 'Replace the <code>{{post.author.email}}</code> helper with <code>{{post.primary_author.email}}</code> or <code>{{post.authors.[#].email}}</code>',
220
+ details: oneLineTrim`The usage of <code>{{post.author.email}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.email}}</code>
221
+ or <code>{{post.authors.[#].email}}</code>.<br>
222
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
223
+ regex: /{{\s*?post\.author\.email\s*?}}/g,
224
+ helper: '{{post.author.email}}'
225
+ },
226
+ 'GS001-DEPR-PAUTH-MT': {
227
+ level: 'error',
228
+ fatal: true,
229
+ rule: 'Replace the <code>{{post.author.meta_title}}</code> helper with <code>{{post.primary_author.meta_title}}</code> or <code>{{post.authors.[#].meta_title}}</code>',
230
+ details: oneLineTrim`The usage of <code>{{post.author.meta_title}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.meta_title}}</code>
231
+ or <code>{{post.authors.[#].meta_title}}</code>.<br>
232
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
233
+ regex: /{{\s*?post\.author\.meta_title\s*?}}/g,
234
+ helper: '{{post.author.meta_title}}'
235
+ },
236
+ 'GS001-DEPR-PAUTH-MD': {
237
+ level: 'error',
238
+ fatal: true,
239
+ rule: 'Replace the <code>{{post.author.meta_description}}</code> helper with <code>{{post.primary_author.meta_description}}</code> or <code>{{post.authors.[#].meta_description}}</code>',
240
+ details: oneLineTrim`The usage of <code>{{post.author.meta_description}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.meta_description}}</code>
241
+ or <code>{{post.authors.[#].meta_description}}</code>.<br>
242
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
243
+ regex: /{{\s*?post\.author\.meta_description\s*?}}/g,
244
+ helper: '{{post.author.meta_description}}'
245
+ },
246
+ 'GS001-DEPR-PAUTH-NAME': {
247
+ level: 'error',
248
+ fatal: true,
249
+ rule: 'Replace the <code>{{post.author.name}}</code> helper with <code>{{post.primary_author.name}}</code> or <code>{{post.authors.[#].name}}</code>',
250
+ details: oneLineTrim`The usage of <code>{{post.author.name}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.name}}</code>
251
+ or <code>{{post.authors.[#].name}}</code>.<br>
252
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
253
+ regex: /{{\s*?post\.author\.name\s*?}}/g,
254
+ helper: '{{post.author.name}}'
255
+ },
256
+ 'GS001-DEPR-PAUTH-BIO': {
257
+ level: 'error',
258
+ fatal: true,
259
+ rule: 'Replace the <code>{{post.author.bio}}</code> helper with <code>{{post.primary_author.bio}}</code> or <code>{{post.authors.[#].bio}}</code>',
260
+ details: oneLineTrim`The usage of <code>{{post.author.bio}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.bio}}</code>
261
+ or <code>{{post.authors.[#].bio}}</code>.<br>
262
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
263
+ regex: /{{\s*?post\.author\.bio\s*?}}/g,
264
+ helper: '{{post.author.bio}}'
265
+ },
266
+ 'GS001-DEPR-PAUTH-LOC': {
267
+ level: 'error',
268
+ fatal: true,
269
+ rule: 'Replace the <code>{{post.author.location}}</code> helper with <code>{{post.primary_author.location}}</code> or <code>{{post.authors.[#].location}}</code>',
270
+ details: oneLineTrim`The usage of <code>{{post.author.location}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.location}}</code>
271
+ or <code>{{post.authors.[#].location}}</code>.<br>
272
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
273
+ regex: /{{\s*?post\.author\.location\s*?}}/g,
274
+ helper: '{{post.author.location}}'
275
+ },
276
+ 'GS001-DEPR-PAUTH-WEB': {
277
+ level: 'error',
278
+ fatal: true,
279
+ rule: 'Replace the <code>{{post.author.website}}</code> helper with <code>{{post.primary_author.website}}</code> or <code>{{post.authors.[#].website}}</code>',
280
+ details: oneLineTrim`The usage of <code>{{post.author.website}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.website}}</code>
281
+ or <code>{{post.authors.[#].website}}</code>.<br>
282
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
283
+ regex: /{{\s*?post\.author\.website\s*?}}/g,
284
+ helper: '{{post.author.website}}'
285
+ },
286
+ 'GS001-DEPR-PAUTH-TW': {
287
+ level: 'error',
288
+ fatal: true,
289
+ rule: 'Replace the <code>{{post.author.twitter}}</code> helper with <code>{{post.primary_author.twitter}}</code> or <code>{{post.authors.[#].twitter}}</code>',
290
+ details: oneLineTrim`The usage of <code>{{post.author.twitter}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.twitter}}</code>
291
+ or <code>{{post.authors.[#].twitter}}</code>.<br>
292
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
293
+ regex: /{{\s*?post\.author\.twitter\s*?}}/g,
294
+ helper: '{{post.author.twitter}}'
295
+ },
296
+ 'GS001-DEPR-PAUTH-FB': {
297
+ level: 'error',
298
+ fatal: true,
299
+ rule: 'Replace the <code>{{post.author.facebook}}</code> helper with <code>{{post.primary_author.facebook}}</code> or <code>{{post.authors.[#].facebook}}</code>',
300
+ details: oneLineTrim`The usage of <code>{{post.author.facebook}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.facebook}}</code>
301
+ or <code>{{post.authors.[#].facebook}}</code>.<br>
302
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
303
+ regex: /{{\s*?post\.author\.facebook\s*?}}/g,
304
+ helper: '{{post.author.facebook}}'
305
+ },
306
+ 'GS001-DEPR-PAUTH-PIMG': {
307
+ level: 'error',
308
+ fatal: true,
309
+ rule: 'Replace the <code>{{post.author.profile_image}}</code> helper with <code>{{post.primary_author.profile_image}}</code> or <code>{{post.authors.[#].profile_image}}</code>',
310
+ details: oneLineTrim`The usage of <code>{{post.author.profile_image}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.profile_image}}</code>
311
+ or <code>{{post.authors.[#].profile_image}}</code>.<br>
312
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
313
+ regex: /{{\s*?post\.author\.profile_image\s*?}}/g,
314
+ helper: '{{post.author.profile_image}}'
315
+ },
316
+ 'GS001-DEPR-PAUTH-CIMG': {
317
+ level: 'error',
318
+ fatal: true,
319
+ rule: 'Replace the <code>{{post.author.cover_image}}</code> helper with <code>{{post.primary_author.cover_image}}</code> or <code>{{post.authors.[#].cover_image}}</code>',
320
+ details: oneLineTrim`The usage of <code>{{post.author.cover_image}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.cover_image}}</code>
321
+ or <code>{{post.authors.[#].cover_image}}</code>.<br>
322
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
323
+ regex: /{{\s*?post\.author\.cover_image\s*?}}/g,
324
+ helper: '{{post.author.cover_image}}'
325
+ },
326
+ 'GS001-DEPR-PAUTH-URL': {
327
+ level: 'error',
328
+ fatal: true,
329
+ rule: 'Replace the <code>{{post.author.url}}</code> helper with <code>{{post.primary_author.url}}</code> or <code>{{post.authors.[#].url}}</code>',
330
+ details: oneLineTrim`The usage of <code>{{post.author.url}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.url}}</code>
331
+ or <code>{{post.authors.[#].url}}</code>.<br>
332
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
333
+ regex: /{{\s*?post\.author\.url\s*?}}/g,
334
+ helper: '{{post.author.url}}'
335
+ },
336
+ 'GS001-DEPR-PAID': {
337
+ level: 'error',
338
+ fatal: true,
339
+ rule: 'Replace <code>{{post.author_id}}</code> code with <code>{{post.primary_author.id}}</code>',
340
+ details: oneLineTrim`The <code>{{post.author_id}}</code> attribute in post context was removed<br>
341
+ Instead of <code>{{post.author_id}}</code> you need to use <code>{{post.primary_author.id}}</code>.<br>
342
+ See the object attributes of <code>post</code> <a href="${docsBaseUrl}context/post/#post-object-attributes" target=_blank>here</a>.`,
343
+ regex: /{{\s*?post\.author_id\s*?}}/g,
344
+ helper: '{{post.author_id}}'
345
+ },
346
+ 'GS001-DEPR-NAUTH': {
347
+ level: 'error',
348
+ fatal: true,
349
+ rule: 'Replace <code>../author</code> with <code>../primary_author</code> or <code>../authors.[#]</code>',
350
+ details: oneLineTrim`The usage of <code>../author</code> is deprecated and should be replaced with either <code>../primary_author</code>
351
+ or <code>../authors.[#]</code>.<br>
352
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
353
+ regex: /{{\s*?(?:#|#if)?\s*?\.\.\/author(?:\.\S*?)?\s*?}}/g,
354
+ helper: '{{../author}}'
355
+ },
356
+ 'GS001-DEPR-IUA': {
357
+ level: 'error',
358
+ fatal: true,
359
+ rule: 'Replace <code>{{img_url author.*}}</code> with <code>{{img_url primary_author.*}}</code> or <code>.{img_url author.[#].*}}</code>',
360
+ details: oneLineTrim`The usage of <code>{{img_url author.*}}</code> is deprecated and should be replaced with either <code>{{img_url primary_author.*}}</code>
361
+ or <code>{{img_url author.[#].*}}</code>.<br>
362
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
363
+ regex: /{{\s*?img_url\s*?(author.).*}}/g,
364
+ helper: '{{img_url author.*}}'
365
+ },
366
+ 'GS001-DEPR-AC': {
367
+ level: 'error',
368
+ fatal: true,
369
+ rule: 'Replace the <code>{{author.cover}}</code> helper with <code>{{primary_author.cover_image}}</code>',
370
+ details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
371
+ Instead of <code>{{author.cover}}</code> you need to use
372
+ <code>{{primary_author.cover_image}}</code> or <code>{{authors.[#].cover_image}}</code>.<br>
373
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
374
+ regex: /{{\s*?author\.cover\s*?}}/g,
375
+ helper: '{{author.cover}}'
376
+ },
377
+ 'GS001-DEPR-AIMG': {
378
+ level: 'error',
379
+ fatal: true,
380
+ rule: 'Replace the <code>{{author.image}}</code> helper with <code>{{primary_author.profile_image}}</code> or <code>{{authors.[#].profile_image}}</code>',
381
+ details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
382
+ Instead of <code>{{author.image}}</code>, you need to use
383
+ <code>{{primary_author.profile_image}}</code> or <code>{{authors.[#].profile_image}}</code>.<br>
384
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
385
+ regex: /{{\s*?author\.image\s*?}}/g,
386
+ helper: '{{author.image}}'
387
+ },
388
+ 'GS001-DEPR-PAC': {
389
+ level: 'error',
390
+ fatal: true,
391
+ rule: 'Replace the <code>{{post.author.cover}}</code> helper with <code>{{post.primary_author.cover_image}}</code> or <code>{{post.authors.[#].cover_image}}</code>',
392
+ details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
393
+ Instead of <code>{{post.author.cover}}</code>, you need to use
394
+ <code>{{post.primary_author.cover_image}}</code> or <code>{{post.authors.[#].cover_image}}</code>.<br>
395
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
396
+ regex: /{{\s*?post\.author\.cover\s*?}}/g,
397
+ helper: '{{post.author.cover}}'
398
+ },
399
+ 'GS001-DEPR-PAIMG': {
400
+ level: 'error',
401
+ fatal: true,
402
+ rule: 'Replace the <code>{{post.author.image}}</code> helper with <code>{{post.primary_author.profile_image}}</code> or <code>{{post.authors.[#].profile_image}}</code>',
403
+ details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
404
+ Instead of <code>{{post.author.image}}</code>, you need to use
405
+ <code>{{post.primary_author.profile_image}}</code> or <code>{{post.authors.[#].profile_image}}</code>.<br>
406
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
407
+ regex: /{{\s*?post\.author\.image\s*?}}/g,
408
+ helper: '{{post.author.image}}'
409
+ },
410
+ 'GS001-DEPR-CON-AC': {
411
+ level: 'error',
412
+ fatal: true,
413
+ rule: 'Replace the <code>{{#if author.cover}}</code> helper with <code>{{#if primary_author.cover_image}}</code> or <code>{{#if authors.[#].cover_image}}</code>',
414
+ details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
415
+ Instead of <code>{{#if author.cover}}</code>, you need to use
416
+ <code>{{#if primary_author.cover_image}}</code> or <code>{{#if authors.[#].cover_image}}</code>.<br>
417
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
418
+ regex: /{{\s*?#if\s*?author\.cover\s*?}}/g,
419
+ helper: '{{#if author.cover}}'
420
+ },
421
+ 'GS001-DEPR-CON-AIMG': {
422
+ level: 'error',
423
+ fatal: true,
424
+ rule: 'Replace the <code>{{#if author.image}}</code> helper with <code>{{#if primary_author.profile_image}}</code> or <code>{{#if authors.[#].profile_image}}</code>',
425
+ details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
426
+ Instead of <code>{{#if author.image}}</code>, you need to use
427
+ <code>{{#if primary_author.profile_image}}</code> or <code>{{#if authors.[#].profile_image}}</code>.<br>
428
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
429
+ regex: /{{\s*?#if\s*?author\.image\s*?}}/g,
430
+ helper: '{{#if author.image}}'
431
+ },
432
+ 'GS001-DEPR-CON-PAC': {
433
+ level: 'error',
434
+ fatal: true,
435
+ rule: 'Replace the <code>{{#if post.author.cover}}</code> helper with <code>{{#if post.primary_author.cover_image}}</code> or <code>{{#if post.authors.[#].cover_image}}</code>',
436
+ details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
437
+ Instead of <code>{{#if post.author.cover}}</code>, you need to use
438
+ <code>{{#if post.primary_author.cover_image}}</code> or <code>{{#if post.authors.[#].cover_image}}</code>.<br>
439
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
440
+ regex: /{{\s*?#if\s*?post\.author\.cover\s*?}}/g,
441
+ helper: '{{#if post.author.cover}}'
442
+ },
443
+ 'GS001-DEPR-CON-PAIMG': {
444
+ level: 'error',
445
+ fatal: true,
446
+ rule: 'Replace the <code>{{#if post.author.image}}</code> helper with <code>{{#if post.primary_author.profile_image}}</code> or <code>{{#if post.authors.[#].profile_image}}</code>',
447
+ details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
448
+ Instead of <code>{{#if post.author.image}}</code>, you need to use
449
+ <code>{{#if post.primary_author.profile_image}}</code> or <code>{{#if post.authors.[#].profile_image}}</code>.<br>
450
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
451
+ regex: /{{\s*?#if\s*?post\.author\.image\s*?}}/g,
452
+ helper: '{{#if post.author.image}}'
43
453
  }
44
454
  };
45
455
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gscan",
3
- "version": "4.23.1",
3
+ "version": "4.24.0",
4
4
  "description": "Scans Ghost themes looking for errors, deprecations, features and compatibility",
5
5
  "keywords": [
6
6
  "ghost",
@@ -40,7 +40,7 @@
40
40
  "gscan": "./bin/cli.js"
41
41
  },
42
42
  "dependencies": {
43
- "@sentry/node": "6.18.2",
43
+ "@sentry/node": "6.19.1",
44
44
  "@tryghost/config": "0.2.2",
45
45
  "@tryghost/debug": "0.1.11",
46
46
  "@tryghost/ignition-errors": "0.1.8",