-
-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathconfig.ts
38 lines (33 loc) · 1.38 KB
/
config.ts
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
import { LogLevel } from "./logger";
// log level setting for prod. vs. dev run of this ext.
export const logLevel: LogLevel = LogLevel.Info; // change to .Debug for ext. dev debug
export const supportedDataFiles: RegExp = /.*\.(json|jsonl|json5|hjson|ndjson|arrow|arr|avro|parquet|parq|config|env|properties|ini|yaml|yml|md|csv|tsv|txt|tab|dif|ods|xls|xlsb|xlsx|xlsm|xml|html)/;
export const supportedBinaryDataFiles: RegExp = /.*\.(arrow|arr|avro|parquet|parq|dif|ods|xls|xlsb|xlsx|xlsm)/;
export const supportedFilesFilters: any = {
'JSON': ['json', 'jsonl', 'json5', 'hjson', 'ndjson'],
'CSV/TSV': ['csv', 'tsv', 'tab', 'txt'],
'Excel': ['dif', 'ods', 'xls', 'xlsb', 'xlsx', 'xlsm', 'xml', 'html'],
'Arrow': ['arrow'],
'Avro': ['avro'],
'Config': ['config'],
'Markdown': ['md'],
'Properties': ['env', 'ini', 'properties'],
'YAML': ['yml']
};
// arrow to data view type mappings
// see: https://github.com/finos/perspective/blob/master/packages/perspective/src/js/utils.js
// and https://github.com/finos/perspective/blob/master/packages/perspective/src/js/perspective.js#ArrowColumnLoader
export const dataTypes = {
"Binary": "string",
"Bool": "boolean",
"Date": "date",
"Dictionary": "string",
"Float32": "float",
"Float64": "float",
"Int8": "integer",
"Int16": "integer",
"Int32": "integer",
"Int64": "integer",
"Timestamp": "datetime",
"Utf8": "string",
};