-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcommons.js
77 lines (73 loc) · 1.74 KB
/
commons.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
const API_EXTENSIONS = {
"features": "OGC API - Features",
"features-transactions": "OGC API - Features - Transactions",
"features-versioning": "OGC API - Features - Versioning",
"item-search": "Item Search",
"item-search-context": "Item Search - Context",
"item-search-fields": "Item Search - Fields",
"item-search-filter": "Item Search - Filter",
"item-search-query": "Item Search - Query (deprecated)",
"item-search-sort": "Item Search - Sort"
};
const EXTENSIONS = {
"checksum": "Checksum (deprecated)",
"collection-assets": "Collection Assets",
"datacube": "Data Cube",
"eo": "Electro-Optical",
"file": "File",
"item-assets": "Item Asset Definition",
"label": "Label",
"mgrs": "MGRS",
"pointcloud": "Point Cloud",
"processing": "Processing",
"projection": "Projection",
"raster": "Raster",
"sar": "SAR",
"sat": "Satellite",
"scientific": "Scientific",
"single-file-stac": "Single File STAC",
"storage": "Cloud Storage",
"tiled-asstes": "Tiled Assets",
"timestamps": "Timestamps",
"version": "Versioning Indicators",
"view": "View Geometry"
};
const CATEGORIES = [
'API',
'CLI',
'Client',
'Data Creation',
'Data Processing',
'Other',
'Server',
'Static',
'Validation',
'Visualization'
];
const LINK_REGEXP = /^(.*)\[([^\]]+)\]\((https?:\/\/[^\)<>"']+)\)(.*)$/is;
const DEV = false;
const HTTP_HOST = DEV ? 'localhost' : 'stacindex.org';
const HTTP_INT_PORT = DEV ? 80 : 9999;
const HTTP_PORT = DEV ? 80 : 80;
const HTTP_PATH = DEV ? '' : '/api';
const HTTPS = !DEV;
const DATABASE = {
user: 'postgres',
host: 'localhost',
database: 'stacindex',
password: '',
port: 5432
};
module.exports = {
LINK_REGEXP,
EXTENSIONS,
API_EXTENSIONS,
CATEGORIES,
DEV,
HTTP_HOST,
HTTP_PORT,
HTTP_INT_PORT,
HTTP_PATH,
HTTPS,
DATABASE
};