-
-
Notifications
You must be signed in to change notification settings - Fork 150
/
config.example.jsonc
126 lines (106 loc) · 4.14 KB
/
config.example.jsonc
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
{
// The port to listen server on for HTTP requests, default is 80.
"port": 80,
// The port to listen server on for HTTPs requests, default is 0 (disabled). Change to 443 if you want to enable it.
// You don't need to provide a certificate, the server uses ACME protocol to get a free certificate from Let's Encrypt.
// Note: if you are running the server in a docker container, you need to expose port `443:443`.
"tlsPort": 0,
// Allowed CORS origins, default is allow all origins.
// Note: A valid origin must be a valid URL, including the protocol, domain, and port. e.g. "https://example.com".
"corsAllowOrigins": [],
// Maximum number of concurrent build process, default equals to the number of CPU cores.
"buildConcurrency": 0,
// The wait time for incoming requests to wait for the build process to finish, default is 30 seconds.
"buildWaitTime": 30,
// Compress http response body with gzip/brotli, default is true.
"compress": true,
// Minify built js/css files, default is true,
"minify": true,
// Generate source map for built js/css files, default is true.
"sourceMap": true,
// The storage option.
// Examples:
// - Use local file system as the storage:
// "storage": {
// "type": "fs",
// "endpoint": "/path/to/storage"
// }
// - Use S3-compatible storage:
// "storage": {
// "type": "s3",
// "endpoint": "https://bucket.s3.amazonaws.com",
// "region": "us-west-1",
// "accessKeyID": "***",
// "secretAccessKey": "***"
// }
"storage": {
// storage type, supported types are ["fs", "s3"], default is "fs".
"type": "fs",
// storage endpoint, default is "~/.esmd/storage".
"endpoint": "~/.esmd/storage",
// storage region for s3.
"region": "",
// storage access key id for s3.
"accessKeyID": "",
// storage secret access key for s3.
"secretAccessKey": ""
},
// Cache package raw files in the storage, default is false.
// The server cleans up npm store periodically, to avoid unnecessary installation when accessing
// package raw files, you can enable this option to cache package raw files in the storage.
// Note: this option will increase the storage usage, we recommend to enable it if you are using
// a S3-compatible storage.
"cacheRawFile": false,
// The custom landing page options, default is empty.
// The server will proxy the `/` request to the `origin` server if it's provided.
// If your custom landing page has own assets, you also need to provide those asset paths in the `assets` field.
"customLandingPage": {
"origin": "https://example.com",
"assets": [
"/favicon.ico",
"/assets/app.js",
"/assets/app.css"
]
},
// The work directory for the build system, default is "~/.esmd".
"workDir": "~/.esmd",
// The log directory, default is "~/.esmd/log".
"logDir": "~/.esmd/log",
// The log level, available values are ["debug", "info", "warn", "error"], default is "info".
"logLevel": "info",
// The cache TTL for npm packages query, default is 600 seconds (10 minutes).
"npmQueryCacheTTL": 600,
// The global npm registry, default is "https://registry.npmjs.org/".
"npmRegistry": "https://registry.npmjs.org/",
// The npm access token for the global npm registry, default is empty.
"npmToken": "",
// These two fields are used for basic authentication towards the global npm registry,
// default for both is empty.
"npmUser": "",
"npmPassword": "",
// Registries for scoped packages. This will ensure packages with these scopes get downloaded
// from specific registry, default is empty.
"npmScopedRegistries": {
"@scope_name": {
"registry": "https://your-registry.com/",
"token": "",
"user": "",
"password": ""
}
},
// The list to only allow some packages or scopes, default allow all.
"allowList": {
"packages": ["@scope_name/package_name"],
"scopes": [{
"name": "@scope_name"
}]
},
// The list to ban some packages or scopes, default no ban.
"banList": {
"packages": ["@scope_name/package_name"],
"scopes": [{
"name": "@scope_name",
"excludes": ["package_name"]
}]
}
}