-
Notifications
You must be signed in to change notification settings - Fork 146
/
Copy pathlayout.js
110 lines (98 loc) · 4.26 KB
/
layout.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
import { MAX_FILE_SIZE_TO_PARSE_MB } from 'const';
import { i18n } from 'utils';
export const DUPLICATE_XPI_ENTRY = {
code: 'DUPLICATE_XPI_ENTRY',
message: i18n._('Package contains duplicate entries'),
description: i18n._(`The package contains multiple entries
with the same name. This practice has been banned. Try unzipping
and re-zipping your add-on package and try again.`),
};
export const INVALID_XPI_ENTRY = {
code: 'INVALID_XPI_ENTRY',
// `message` will be replaced with the `InvalidZipFileError` message
// got from the addons-scanner-utils dependency when we were reading
// the zip file entries (in particular this would be triggered by
// a zipfile entry using invalid characters, like '\' as a path
// separator, and the underlying yauzl error message follows the
// format:
// `invalid characters in fileName: nameOfTheInvalidZipFileEntry`
message: 'Invalid ZIP file entry',
description: i18n._(`The package is invalid. It may contain
entries using invalid characters, as an example using '\\' as a
path separator is not allowed in Firefox. Try to recreate your
add-on package (ZIP) and make sure all entries are using '/' as the
path separator.`),
};
export const BAD_ZIPFILE = {
code: 'BAD_ZIPFILE',
message: 'Corrupt ZIP file',
description: i18n._('We were unable to decompress the zip file.'),
};
export const TYPE_NO_MANIFEST_JSON = {
code: 'TYPE_NO_MANIFEST_JSON',
message: i18n._('manifest.json was not found'),
description: i18n._(`No manifest.json was found at the root of the extension.
The package file must be a ZIP of the extension's files themselves, not of the
containing directory. See: https://mzl.la/2r2McKv for more on packaging.`),
};
export const FILE_TOO_LARGE = {
code: 'FILE_TOO_LARGE',
message: i18n._('File is too large to parse.'),
description: i18n.sprintf(
i18n._(`This file is not binary and is too large to parse. Files larger
than %(maxFileSizeToParseMB)sMB will not be parsed. Consider moving
large lists of data out of JavaScript files and into JSON files, or
splitting very large files into smaller ones.`),
{ maxFileSizeToParseMB: MAX_FILE_SIZE_TO_PARSE_MB }
),
};
export const HIDDEN_FILE = {
code: 'HIDDEN_FILE',
message: i18n._('Hidden file flagged'),
description: i18n._(`Hidden files complicate the
review process and can contain sensitive information about the system that
generated the add-on. Please modify the packaging process so that these
files aren't included.`),
};
export const FLAGGED_FILE = {
code: 'FLAGGED_FILE',
message: i18n._('Flagged filename found'),
description: i18n._(`Files were found that are either unnecessary
or have been included unintentionally. They should be removed.`),
};
export const FLAGGED_FILE_EXTENSION = {
code: 'FLAGGED_FILE_EXTENSION',
message: i18n._('Flagged file extensions found'),
description: i18n._(`Files were found that are either unnecessary
or have been included unintentionally. They should be removed.`),
};
export const FLAGGED_FILE_TYPE = {
code: 'FLAGGED_FILE_TYPE',
message: i18n._('Flagged file type found'),
description: i18n._(`Files whose names end with flagged extensions
have been found in the add-on. The extension of these files are flagged
because they usually identify binary components. Please see
https://bit.ly/review-policy for more information on the binary content
review process.`),
};
export const ALREADY_SIGNED = {
code: 'ALREADY_SIGNED',
message: i18n._('Package already signed'),
description: i18n._(`Add-ons which are already signed will be
re-signed when published on AMO. This will replace any existing signatures
on the add-on.`),
};
export const COINMINER_USAGE_DETECTED = {
code: 'COINMINER_USAGE_DETECTED',
message: i18n._('Firefox add-ons are not allowed to run coin miners.'),
description: i18n._(`We do not allow coinminer scripts to be run inside
WebExtensions.
See https://github.com/mozilla/addons-linter/issues/1643 for more
details.`),
};
export const RESERVED_FILENAME = {
code: 'RESERVED_FILENAME',
message: i18n._('Reserved filename found.'),
description: i18n._(`Files whose names are reserved have been found in
the add-on. Please refrain from using them and rename your files.`),
};