-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathenv.ts
20 lines (17 loc) · 1.15 KB
/
env.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/**
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
const properties = PropertiesService.getScriptProperties();
const env = typeof process === 'undefined' ? null : process.env;
export default <Record<string, string>>{
DEBUG: properties.getProperty('DEBUG') || env?.DEBUG || '0',
CONFIG_REQUEST_CACHE_TTL_SECS: properties.getProperty('CONFIG_REQUEST_CACHE_TTL_SECS') || env?.CONFIG_REQUEST_CACHE_TTL_SECS || '60',
MAX_ROWS_TO_FETCH_PER_REQUEST: properties.getProperty('MAX_ROWS_TO_FETCH_PER_REQUEST') || env?.MAX_ROWS_TO_FETCH_PER_REQUEST || '1000',
SCRIPT_RUNTIME_LIMIT: properties.getProperty('SCRIPT_RUNTIME_LIMIT') || env?.SCRIPT_RUNTIME_LIMIT || '350',
API_REQUEST_SOURCE_IDENTIFIER: properties.getProperty('API_REQUEST_SOURCE_IDENTIFIER') || env?.API_REQUEST_SOURCE_IDENTIFIER || 'fromLooker',
API_REQUEST_RETRY_LIMIT_IN_SECS: properties.getProperty('API_REQUEST_RETRY_LIMIT_IN_SECS') || env?.API_REQUEST_RETRY_LIMIT_IN_SECS || '120',
API_REQUEST_EXTRA_HEADERS: properties.getProperty('API_REQUEST_EXTRA_HEADERS') || env?.API_REQUEST_EXTRA_HEADERS || '{}',
};