@e-mc/types 0.10.1 → 0.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/constant.d.ts CHANGED
@@ -1,339 +1,339 @@
1
- export const enum INTERNAL {
2
- VERSION = '0.10.1',
3
- TEMP_DIR = 'tmp',
4
- CJS = '__cjs__'
5
- }
6
-
7
- export const enum VAL_MESSAGE {
8
- SUCCESS = 'Success',
9
- COMPLETED = 'Completed',
10
- CHECKSUM = 'Checksum matched',
11
- MODIFIED_FILE = 'File modified',
12
- MODIFIED_DIRECTORY = 'Directory was modified',
13
- COMMIT_TRANSACTION = 'Transactions were committed'
14
- }
15
-
16
- export const enum VAL_DB {
17
- EXEC_QUERYUNASSIGNED = 'Execute unassigned queries'
18
- }
19
-
20
- export const enum VAL_CLOUD {
21
- UPLOAD_FILE = 'Upload success',
22
- DOWNLOAD_FILE = 'Download success',
23
- DELETE_FILE = 'Delete success',
24
- RENAME_FILE = 'File renamed',
25
- CREATE_TAG = 'Tags created',
26
- DELETE_TAG = 'Tags deleted',
27
- PUBLIC_READ = 'Grant public-read',
28
- CREATE_BUCKET = 'Bucket created',
29
- DELETE_BUCKET = 'Bucket deleted',
30
- EMPTY_BUCKET = 'Bucket emptied',
31
- CONFIGURE_BUCKET = 'Bucket configured',
32
- POLICY_BUCKET = 'Bucket policy configured',
33
- WEBSITE_BUCKET = 'Bucket website configured',
34
- ACL_BUCKET = 'Bucket ACL configured'
35
- }
36
-
37
- export const enum ERR_MESSAGE {
38
- UNKNOWN = 'Unknown',
39
- FAIL = 'FAIL!',
40
- WARN = 'WARN!',
41
- ABORTED = 'Aborted',
42
- EXPIRED = 'Expired',
43
- ABORTED_HOST = 'Aborted by host',
44
- ABORTED_CLIENT = 'Aborted by client',
45
- ABORTED_PROCESS = 'Aborted by process',
46
- ABORTED_OPERATION = 'This operation was aborted',
47
- FAILED = 'Failed',
48
- FAILED_CHECKSUM = 'Checksum did not match',
49
- PARAMETERS = 'Invalid parameters',
50
- FORMAT = 'Invalid format',
51
- CHECKSUM = 'Invalid checksum',
52
- CONFIG = 'Invalid config',
53
- RESPONSE = 'Invalid response',
54
- FUNCTION = 'Invalid function',
55
- SIZE = 'Size limit was exceeded',
56
- ERROR_CODE = 'Error code',
57
- BUSY_RESOURCE = 'Resource already in use',
58
- PERMISSION = 'Operation not permitted',
59
- EXEC_PERMISSION = 'Exec command not permitted',
60
- NOT_CACHEABLE = 'Not able to cache',
61
- NOT_COPYABLE = 'Not able to copy file',
62
- NOT_DIRECTORY = 'Path is not a directory',
63
- NOT_ABSOLUTE = 'Path is not absolute',
64
- NOT_READABLE = 'Not able to read buffer',
65
- CANCELLED = 'Transaction was cancelled',
66
- INCOMPLETE = 'Transaction was not completed',
67
- THREAD = 'Thread limit exceeded',
68
- THREAD_KILLED = 'Thread was killed',
69
- TIMEOUT = 'Timeout was exceeded',
70
- HANDLED_REJECTION = 'Handled rejection',
71
- UNSUPPORTED_ACCESS = 'Unsupported access',
72
- UNSUPPORTED_PROTOCOL = 'Unsupported protocol',
73
- UNSUPPORTED_MIME = 'Unsupported MIME',
74
- UNSUPPORTED_READ = 'Not permitted to read file',
75
- UNSUPPORTED_WRITE = 'Not permitted to write file',
76
- NOTFOUND_PATH = 'Path not found',
77
- NOTFOUND_FILE = 'File not found',
78
- NOTFOUND_BINARY = 'Binary not found',
79
- NOTFOUND_PACKAGE = 'Package not found',
80
- NOTFOUND_MIME = 'MIME not found',
81
- NOTFOUND_TLS = 'TLS/SSL key and cert not found',
82
- INSTALL = 'Install required?',
83
- INLINE_METHOD = 'Unable to parse inline method',
84
- INLINE_OBJECT = 'Unable to parse inline object',
85
- PROCESS_FILE = 'Unable to process file',
86
- READ_FILE = 'Unable to read file',
87
- WRITE_FILE = 'Unable to write file',
88
- COPY_FILE = 'Unable to copy file',
89
- DELETE_FILE = 'Unable to delete file',
90
- RENAME_FILE = 'Unable to rename file',
91
- MOVE_FILE = 'Unable to move file',
92
- CONVERT_FILE = 'Unable to convert file',
93
- DOWNLOAD_FILE = 'Unable to download file',
94
- RESOLVE_FILE = 'Unable to resolve file',
95
- RESOLVE_HOSTNAME = 'Unable to resolve hostname',
96
- REPLACE_FILE = 'Unable to replace file',
97
- COMPRESS_FILE = 'Unable to compress file',
98
- COMPRESS_BUFFER = 'Unable to compress buffer',
99
- DECOMPRESS_FILE = 'Unable to decompress file',
100
- WATCH_FILE = 'Unable to watch file',
101
- EXECUTE_FILE = 'Unable to execute file',
102
- OVERWRITE_FILE = 'Unable to overwrite file',
103
- CREATE_DIRECTORY = 'Unable to create directory',
104
- TEMP_DIRECTORY = 'Unable to create temp directory',
105
- READ_DIRECTORY = 'Unable to read directory',
106
- WRITE_DIRECTORY = 'Unable to write directory',
107
- MOVE_DIRECTORY = 'Unable to move directory',
108
- REMOVE_DIRECTORY = 'Unable to remove directory',
109
- LOAD_CONFIG = 'Unable to load configuration',
110
- LOAD_HANDLER = 'Unable to load handler',
111
- READ_BUFFER = 'Unable to read buffer',
112
- WRITE_BUFFER = 'Unable to write buffer',
113
- TRANSFORM_DOCUMENT = 'Unable to transform document',
114
- PERFORM_TASK = 'Unable to perform task'
115
- }
116
-
117
- export const enum ERR_DB {
118
- CONSTRUCTOR = 'Not a Db constructor',
119
- PROVIDER_NOTFOUND = 'Database provider not found',
120
- MODULE_NOTFOUND = 'Db module not installed',
121
- UPGRADE = 'Upgrade client to latest version',
122
- NAME = 'Missing database name',
123
- INSTANCE = 'Missing instance name',
124
- PRODUCT = 'Missing database product',
125
- TABLE = 'Missing database table',
126
- QUERY = 'Missing database query',
127
- CONNECTION = 'Missing connection string',
128
- TLS = 'Missing TLS/SSL credentials',
129
- CLIENT = 'Unable to configure client',
130
- EXEC_QUERY = 'Unable to execute query',
131
- FILTER_QUERY = 'Unable to filter results',
132
- CONNECTION_OPEN = 'Unable to open connnection',
133
- CONNECTION_CLOSE = 'Unable to close connnection',
134
- KEY = 'Invalid key',
135
- VALUE = 'Invalid value',
136
- CREDENTIALS = 'Invalid credentials'
137
- }
138
-
139
- export const enum ERR_CLOUD {
140
- CONSTRUCTOR = 'Not a Cloud constructor',
141
- CREATE_BUCKET = 'Unable to create bucket',
142
- POLICY_BUCKET = 'Unable to update bucket policy',
143
- TAGGING_BUCKET = 'Unable to update bucket tagging',
144
- WEBSITE_BUCKET = 'Unable to set bucket website',
145
- DELETE_BUCKET = 'Unable to empty bucket',
146
- CONFIGURE_BUCKET = 'Unable to configure bucket',
147
- CREATE_TAG = 'Unable to create tags',
148
- EXISTS_BUCKET = 'Bucket does not exist',
149
- POLICY_INVALID = 'Invalid bucket policy',
150
- LIST_BUCKET = 'Unable to list bucket',
151
- PUBLIC_READ = 'Unable to grant public-read',
152
- TEMP_DIR = 'Unable to create temp directory',
153
- PROVIDER_NOTFOUND = 'Cloud provider not found',
154
- ACCOUNT_NOTFOUND = 'Cloud account not found',
155
- MODULE_NOTFOUND = 'Cloud module not installed',
156
- CREATE_BUCKET_SUPPORT = 'Create bucket not supported',
157
- BUCKET_POLICY_SUPPORT = 'Bucket policy not supported',
158
- BUCKET_TAGGING_SUPPORT = 'Bucket tagging not supported',
159
- DELETE_OBJECTS_SUPPORT = 'Delete objects not supported',
160
- BUCKET_WEBSITE_SUPPORT = 'Set bucket website not supported',
161
- EXECUTE_QUERY_SUPPORT = 'Execute query not supported',
162
- UPLOAD_SUPPORT = 'Upload function not supported',
163
- DOWNLOAD_SUPPORT = 'Download function not supported',
164
- UPLOAD_FAIL = 'Upload failed',
165
- DOWNLOAD_FAIL = 'Download failed',
166
- DELETE_FAIL = 'Delete failed',
167
- METADATA_FAIL = 'Metadata failed'
168
- }
169
-
170
- export const enum ERR_COMPRESS {
171
- API_KEY = 'Missing API key'
172
- }
173
-
174
- export const enum ERR_IMAGE {
175
- ROTATE = 'Unable to rotate image',
176
- FINALIZE = 'Unable to finalize image',
177
- METHOD_NAME = 'Invalid method name',
178
- METHOD_ARGS = 'Invalid method arguments'
179
- }
180
-
181
- export const enum ERR_HTTP {
182
- HEADERS = 'Unable to process headers',
183
- FORMAT = 'Unable to parse URI response',
184
- SERVER_WEBSOCKET = 'Unable to create WebSocket server',
185
- ETAG = 'ETag not supported',
186
- REQUEST = 'Invalid HTTP request',
187
- TIMEOUT = 'HTTP request timeout',
188
- TIMEOUT_CONNECTION = 'HTTP connection timeout',
189
- DATA_RECEIVED = 'No data received',
190
- REDIRECT_LIMIT = 'Exceeded redirect limit',
191
- REDIRECT_FOLLOW = 'Follow redirect was disabled',
192
- REDIRECT_MISSING = 'Missing redirect location',
193
- DOWNLOAD_SUCCESS = 'No files were successfully downloaded',
194
- MULTIPART_ATTACH = 'No files were attached'
195
- }
196
-
197
- export const enum DB_TRANSACTION {
198
- ACTIVE = 1,
199
- PARTIAL = 2,
200
- COMMIT = 4,
201
- TERMINATE = 8,
202
- ABORT = 16,
203
- FAIL = 32,
204
- AUTH = 64,
205
- CACHE = 128
206
- }
207
-
208
- export const enum TRANSFER_TYPE {
209
- DISK = 1,
210
- STREAM = 2,
211
- CHUNK = 4
212
- }
213
-
214
- export const enum TIME {
215
- Y = 1000 * 60 * 60 * 24 * 7 * 52,
216
- M = 1000 * 60 * 60 * 24 * 30,
217
- W = 1000 * 60 * 60 * 24 * 7,
218
- D = 1000 * 60 * 60 * 24,
219
- H = 1000 * 60 * 60,
220
- m = 1000 * 60,
221
- S = 1000
222
- }
223
-
224
- export const enum PACKAGE_NAME {
225
- CLOUD = '@e-mc/cloud',
226
- CLOUD_UTIL = '@e-mc/cloud/util',
227
- COMPAT_V4 = '@e-mc/compat-v4',
228
- COMPRESS = '@e-mc/compress',
229
- CORE = '@e-mc/core',
230
- DB = '@e-mc/db',
231
- DB_POOL = '@e-mc/db/pool',
232
- DB_UTIL = '@e-mc/db/util',
233
- DOCUMENT = '@e-mc/document',
234
- DOCUMENT_ANDROID = '@pi-r/android',
235
- DOCUMENT_CHROME = '@pi-r/chrome',
236
- DOCUMENT_TRANSFORM = '@e-mc/document/transform',
237
- DOCUMENT_UTIL = '@e-mc/document/util',
238
- FILE_MANAGER = '@e-mc/file-manager',
239
- IMAGE = '@e-mc/image',
240
- IMAGE_JIMP = '@pi-r/jimp',
241
- MODULE = '@e-mc/module',
242
- MODULE_LIB_V4 = '@e-mc/module/lib-v4',
243
- REQUEST = '@e-mc/request',
244
- REQUEST_HTTP_HOST = '@e-mc/request/http/host',
245
- REQUEST_UTIL = '@e-mc/request/util',
246
- TASK = '@e-mc/task',
247
- TASK_GULP = '@pi-r/gulp',
248
- TYPES = '@e-mc/types',
249
- WATCH = '@e-mc/watch',
250
- WATCH_FILEGROUP = '@e-mc/watch/filegroup'
251
- }
252
-
253
- export const enum MIME_TYPE {
254
- MULTIPART = 'multipart/form-data',
255
- URLENCODED = 'application/x-www-form-urlencoded',
256
- JSON = 'application/json',
257
- TEXT = 'text/plain',
258
- OCTET_STREAM = 'application/octet-stream'
259
- }
260
-
261
- export const enum ASSET_FLAG {
262
- NONE = 0,
263
- IGNORE = 1,
264
- CLONE = 2,
265
- USING = 4,
266
- WATCH = 8,
267
- MODIFIED = 16,
268
- PROCESS = 32,
269
- MAIN = 64,
270
- EXISTS = 128
271
- }
272
-
273
- export const enum LOG_TYPE {
274
- UNKNOWN = 0,
275
- SYSTEM = 1,
276
- NODE = 2,
277
- PROCESS = 4,
278
- COMPRESS = 8,
279
- WATCH = 16,
280
- FILE = 32,
281
- CLOUD = 64,
282
- TIME_ELAPSED = 128,
283
- TIME_PROCESS = 256,
284
- FAIL = 512,
285
- HTTP = 1024,
286
- IMAGE = 2048,
287
- EXEC = 4096,
288
- PERMISSION = 8192,
289
- TIMEOUT = 16384,
290
- STDOUT = 32768,
291
- DB = 65536
292
- }
293
-
294
- export const enum LOG_STATE {
295
- STDIN,
296
- STDOUT,
297
- STDERR
298
- }
299
-
300
- export const enum READDIR_SORT {
301
- FILE,
302
- DIRECTORY,
303
- DESCENDING
304
- }
305
-
306
- export const enum SETTINGS_KEY_NAME {
307
- NODE_PROCESS_CPUUSAGE = "node.process.cpu_usage",
308
- NODE_PROCESS_MEMORYUSAGE = "node.process.memory_usage",
309
- NODE_PROCESS_INLINE = "node.process.inline",
310
- NODE_REQUIRE_EXT = "node.require.ext",
311
- NODE_REQUIRE_NPM = "node.require.npm",
312
- NODE_REQUIRE_INLINE = "node.require.inline",
313
- TEMP_DIR = "temp.dir",
314
- TEMP_WRITE = "temp.write",
315
- PROCESS_PASSWORD = "process.password",
316
- PROCESS_ENV_APPLY = "process.env.apply",
317
- PROCESS_CIPHER_ALGORITHM = "process.cipher.algorithm",
318
- PERMISSION_PROCESS_EXEC = "permission.process_exec",
319
- PERMISSION_HOMEREAD = "permission.home_read",
320
- PERMISSION_HOMEWRITE = "permission.home_write",
321
- MEMORY_SETTINGS_USERS = "memory.settings.users",
322
- MEMORY_SETTINGS_CACHE_DISK = "memory.settings.cache_disk",
323
- ERROR_OUT = "error.out",
324
- ERROR_FATAL = "error.fatal",
325
- BROADCAST_OUT = "broadcast.out",
326
- LOGGER_LEVEL = "logger.level"
327
- }
328
-
329
- export const enum CACHE_SIZE {
330
- CORE_CLIENTDB_PARTITION_SIZE = 16,
331
- CORE_CLIENTDB_PARTITION_MULT = 2,
332
- CLOUD_PARTITION_SIZE = 16,
333
- CLOUD_PARTITION_MULT = 2,
334
- DB_PARTITION_SIZE = 16,
335
- DB_PARTITION_MULT = 2,
336
- FILE_MANAGER_DISK_LIMIT = '1gb',
337
- FILE_MANAGER_MEMORY_LIMIT = '100mb',
338
- FILE_MANAGER_MEMORY_LIMIT_ALL = '512mb'
1
+ export const enum INTERNAL {
2
+ VERSION = '0.10.3',
3
+ TEMP_DIR = 'tmp',
4
+ CJS = '__cjs__'
5
+ }
6
+
7
+ export const enum VAL_MESSAGE {
8
+ SUCCESS = 'Success',
9
+ COMPLETED = 'Completed',
10
+ CHECKSUM = 'Checksum matched',
11
+ MODIFIED_FILE = 'File modified',
12
+ MODIFIED_DIRECTORY = 'Directory was modified',
13
+ COMMIT_TRANSACTION = 'Transactions were committed'
14
+ }
15
+
16
+ export const enum VAL_DB {
17
+ EXEC_QUERYUNASSIGNED = 'Execute unassigned queries'
18
+ }
19
+
20
+ export const enum VAL_CLOUD {
21
+ UPLOAD_FILE = 'Upload success',
22
+ DOWNLOAD_FILE = 'Download success',
23
+ DELETE_FILE = 'Delete success',
24
+ RENAME_FILE = 'File renamed',
25
+ CREATE_TAG = 'Tags created',
26
+ DELETE_TAG = 'Tags deleted',
27
+ PUBLIC_READ = 'Grant public-read',
28
+ CREATE_BUCKET = 'Bucket created',
29
+ DELETE_BUCKET = 'Bucket deleted',
30
+ EMPTY_BUCKET = 'Bucket emptied',
31
+ CONFIGURE_BUCKET = 'Bucket configured',
32
+ POLICY_BUCKET = 'Bucket policy configured',
33
+ WEBSITE_BUCKET = 'Bucket website configured',
34
+ ACL_BUCKET = 'Bucket ACL configured'
35
+ }
36
+
37
+ export const enum ERR_MESSAGE {
38
+ UNKNOWN = 'Unknown',
39
+ FAIL = 'FAIL!',
40
+ WARN = 'WARN!',
41
+ ABORTED = 'Aborted',
42
+ EXPIRED = 'Expired',
43
+ ABORTED_HOST = 'Aborted by host',
44
+ ABORTED_CLIENT = 'Aborted by client',
45
+ ABORTED_PROCESS = 'Aborted by process',
46
+ ABORTED_OPERATION = 'This operation was aborted',
47
+ FAILED = 'Failed',
48
+ FAILED_CHECKSUM = 'Checksum did not match',
49
+ PARAMETERS = 'Invalid parameters',
50
+ FORMAT = 'Invalid format',
51
+ CHECKSUM = 'Invalid checksum',
52
+ CONFIG = 'Invalid config',
53
+ RESPONSE = 'Invalid response',
54
+ FUNCTION = 'Invalid function',
55
+ SIZE = 'Size limit was exceeded',
56
+ ERROR_CODE = 'Error code',
57
+ BUSY_RESOURCE = 'Resource already in use',
58
+ PERMISSION = 'Operation not permitted',
59
+ EXEC_PERMISSION = 'Exec command not permitted',
60
+ NOT_CACHEABLE = 'Not able to cache',
61
+ NOT_COPYABLE = 'Not able to copy file',
62
+ NOT_DIRECTORY = 'Path is not a directory',
63
+ NOT_ABSOLUTE = 'Path is not absolute',
64
+ NOT_READABLE = 'Not able to read buffer',
65
+ CANCELLED = 'Transaction was cancelled',
66
+ INCOMPLETE = 'Transaction was not completed',
67
+ THREAD = 'Thread limit exceeded',
68
+ THREAD_KILLED = 'Thread was killed',
69
+ TIMEOUT = 'Timeout was exceeded',
70
+ HANDLED_REJECTION = 'Handled rejection',
71
+ UNSUPPORTED_ACCESS = 'Unsupported access',
72
+ UNSUPPORTED_PROTOCOL = 'Unsupported protocol',
73
+ UNSUPPORTED_MIME = 'Unsupported MIME',
74
+ UNSUPPORTED_READ = 'Not permitted to read file',
75
+ UNSUPPORTED_WRITE = 'Not permitted to write file',
76
+ NOTFOUND_PATH = 'Path not found',
77
+ NOTFOUND_FILE = 'File not found',
78
+ NOTFOUND_BINARY = 'Binary not found',
79
+ NOTFOUND_PACKAGE = 'Package not found',
80
+ NOTFOUND_MIME = 'MIME not found',
81
+ NOTFOUND_TLS = 'TLS/SSL key and cert not found',
82
+ INSTALL = 'Install required?',
83
+ INLINE_METHOD = 'Unable to parse inline method',
84
+ INLINE_OBJECT = 'Unable to parse inline object',
85
+ PROCESS_FILE = 'Unable to process file',
86
+ READ_FILE = 'Unable to read file',
87
+ WRITE_FILE = 'Unable to write file',
88
+ COPY_FILE = 'Unable to copy file',
89
+ DELETE_FILE = 'Unable to delete file',
90
+ RENAME_FILE = 'Unable to rename file',
91
+ MOVE_FILE = 'Unable to move file',
92
+ CONVERT_FILE = 'Unable to convert file',
93
+ DOWNLOAD_FILE = 'Unable to download file',
94
+ RESOLVE_FILE = 'Unable to resolve file',
95
+ RESOLVE_HOSTNAME = 'Unable to resolve hostname',
96
+ REPLACE_FILE = 'Unable to replace file',
97
+ COMPRESS_FILE = 'Unable to compress file',
98
+ COMPRESS_BUFFER = 'Unable to compress buffer',
99
+ DECOMPRESS_FILE = 'Unable to decompress file',
100
+ WATCH_FILE = 'Unable to watch file',
101
+ EXECUTE_FILE = 'Unable to execute file',
102
+ OVERWRITE_FILE = 'Unable to overwrite file',
103
+ CREATE_DIRECTORY = 'Unable to create directory',
104
+ TEMP_DIRECTORY = 'Unable to create temp directory',
105
+ READ_DIRECTORY = 'Unable to read directory',
106
+ WRITE_DIRECTORY = 'Unable to write directory',
107
+ MOVE_DIRECTORY = 'Unable to move directory',
108
+ REMOVE_DIRECTORY = 'Unable to remove directory',
109
+ LOAD_CONFIG = 'Unable to load configuration',
110
+ LOAD_HANDLER = 'Unable to load handler',
111
+ READ_BUFFER = 'Unable to read buffer',
112
+ WRITE_BUFFER = 'Unable to write buffer',
113
+ TRANSFORM_DOCUMENT = 'Unable to transform document',
114
+ PERFORM_TASK = 'Unable to perform task'
115
+ }
116
+
117
+ export const enum ERR_DB {
118
+ CONSTRUCTOR = 'Not a Db constructor',
119
+ PROVIDER_NOTFOUND = 'Database provider not found',
120
+ MODULE_NOTFOUND = 'Db module not installed',
121
+ UPGRADE = 'Upgrade client to latest version',
122
+ NAME = 'Missing database name',
123
+ INSTANCE = 'Missing instance name',
124
+ PRODUCT = 'Missing database product',
125
+ TABLE = 'Missing database table',
126
+ QUERY = 'Missing database query',
127
+ CONNECTION = 'Missing connection string',
128
+ TLS = 'Missing TLS/SSL credentials',
129
+ CLIENT = 'Unable to configure client',
130
+ EXEC_QUERY = 'Unable to execute query',
131
+ FILTER_QUERY = 'Unable to filter results',
132
+ CONNECTION_OPEN = 'Unable to open connnection',
133
+ CONNECTION_CLOSE = 'Unable to close connnection',
134
+ KEY = 'Invalid key',
135
+ VALUE = 'Invalid value',
136
+ CREDENTIALS = 'Invalid credentials'
137
+ }
138
+
139
+ export const enum ERR_CLOUD {
140
+ CONSTRUCTOR = 'Not a Cloud constructor',
141
+ CREATE_BUCKET = 'Unable to create bucket',
142
+ POLICY_BUCKET = 'Unable to update bucket policy',
143
+ TAGGING_BUCKET = 'Unable to update bucket tagging',
144
+ WEBSITE_BUCKET = 'Unable to set bucket website',
145
+ DELETE_BUCKET = 'Unable to empty bucket',
146
+ CONFIGURE_BUCKET = 'Unable to configure bucket',
147
+ CREATE_TAG = 'Unable to create tags',
148
+ EXISTS_BUCKET = 'Bucket does not exist',
149
+ POLICY_INVALID = 'Invalid bucket policy',
150
+ LIST_BUCKET = 'Unable to list bucket',
151
+ PUBLIC_READ = 'Unable to grant public-read',
152
+ TEMP_DIR = 'Unable to create temp directory',
153
+ PROVIDER_NOTFOUND = 'Cloud provider not found',
154
+ ACCOUNT_NOTFOUND = 'Cloud account not found',
155
+ MODULE_NOTFOUND = 'Cloud module not installed',
156
+ CREATE_BUCKET_SUPPORT = 'Create bucket not supported',
157
+ BUCKET_POLICY_SUPPORT = 'Bucket policy not supported',
158
+ BUCKET_TAGGING_SUPPORT = 'Bucket tagging not supported',
159
+ DELETE_OBJECTS_SUPPORT = 'Delete objects not supported',
160
+ BUCKET_WEBSITE_SUPPORT = 'Set bucket website not supported',
161
+ EXECUTE_QUERY_SUPPORT = 'Execute query not supported',
162
+ UPLOAD_SUPPORT = 'Upload function not supported',
163
+ DOWNLOAD_SUPPORT = 'Download function not supported',
164
+ UPLOAD_FAIL = 'Upload failed',
165
+ DOWNLOAD_FAIL = 'Download failed',
166
+ DELETE_FAIL = 'Delete failed',
167
+ METADATA_FAIL = 'Metadata failed'
168
+ }
169
+
170
+ export const enum ERR_COMPRESS {
171
+ API_KEY = 'Missing API key'
172
+ }
173
+
174
+ export const enum ERR_IMAGE {
175
+ ROTATE = 'Unable to rotate image',
176
+ FINALIZE = 'Unable to finalize image',
177
+ METHOD_NAME = 'Invalid method name',
178
+ METHOD_ARGS = 'Invalid method arguments'
179
+ }
180
+
181
+ export const enum ERR_HTTP {
182
+ HEADERS = 'Unable to process headers',
183
+ FORMAT = 'Unable to parse URI response',
184
+ SERVER_WEBSOCKET = 'Unable to create WebSocket server',
185
+ ETAG = 'ETag not supported',
186
+ REQUEST = 'Invalid HTTP request',
187
+ TIMEOUT = 'HTTP request timeout',
188
+ TIMEOUT_CONNECTION = 'HTTP connection timeout',
189
+ DATA_RECEIVED = 'No data received',
190
+ REDIRECT_LIMIT = 'Exceeded redirect limit',
191
+ REDIRECT_FOLLOW = 'Follow redirect was disabled',
192
+ REDIRECT_MISSING = 'Missing redirect location',
193
+ DOWNLOAD_SUCCESS = 'No files were successfully downloaded',
194
+ MULTIPART_ATTACH = 'No files were attached'
195
+ }
196
+
197
+ export const enum DB_TRANSACTION {
198
+ ACTIVE = 1,
199
+ PARTIAL = 2,
200
+ COMMIT = 4,
201
+ TERMINATE = 8,
202
+ ABORT = 16,
203
+ FAIL = 32,
204
+ AUTH = 64,
205
+ CACHE = 128
206
+ }
207
+
208
+ export const enum TRANSFER_TYPE {
209
+ DISK = 1,
210
+ STREAM = 2,
211
+ CHUNK = 4
212
+ }
213
+
214
+ export const enum TIME {
215
+ Y = 1000 * 60 * 60 * 24 * 7 * 52,
216
+ M = 1000 * 60 * 60 * 24 * 30,
217
+ W = 1000 * 60 * 60 * 24 * 7,
218
+ D = 1000 * 60 * 60 * 24,
219
+ H = 1000 * 60 * 60,
220
+ m = 1000 * 60,
221
+ S = 1000
222
+ }
223
+
224
+ export const enum PACKAGE_NAME {
225
+ CLOUD = '@e-mc/cloud',
226
+ CLOUD_UTIL = '@e-mc/cloud/util',
227
+ COMPAT_V4 = '@e-mc/compat-v4',
228
+ COMPRESS = '@e-mc/compress',
229
+ CORE = '@e-mc/core',
230
+ DB = '@e-mc/db',
231
+ DB_POOL = '@e-mc/db/pool',
232
+ DB_UTIL = '@e-mc/db/util',
233
+ DOCUMENT = '@e-mc/document',
234
+ DOCUMENT_ANDROID = '@pi-r/android',
235
+ DOCUMENT_CHROME = '@pi-r/chrome',
236
+ DOCUMENT_TRANSFORM = '@e-mc/document/transform',
237
+ DOCUMENT_UTIL = '@e-mc/document/util',
238
+ FILE_MANAGER = '@e-mc/file-manager',
239
+ IMAGE = '@e-mc/image',
240
+ IMAGE_JIMP = '@pi-r/jimp',
241
+ MODULE = '@e-mc/module',
242
+ MODULE_LIB_V4 = '@e-mc/module/lib-v4',
243
+ REQUEST = '@e-mc/request',
244
+ REQUEST_HTTP_HOST = '@e-mc/request/http/host',
245
+ REQUEST_UTIL = '@e-mc/request/util',
246
+ TASK = '@e-mc/task',
247
+ TASK_GULP = '@pi-r/gulp',
248
+ TYPES = '@e-mc/types',
249
+ WATCH = '@e-mc/watch',
250
+ WATCH_FILEGROUP = '@e-mc/watch/filegroup'
251
+ }
252
+
253
+ export const enum MIME_TYPE {
254
+ MULTIPART = 'multipart/form-data',
255
+ URLENCODED = 'application/x-www-form-urlencoded',
256
+ JSON = 'application/json',
257
+ TEXT = 'text/plain',
258
+ OCTET_STREAM = 'application/octet-stream'
259
+ }
260
+
261
+ export const enum ASSET_FLAG {
262
+ NONE = 0,
263
+ IGNORE = 1,
264
+ CLONE = 2,
265
+ USING = 4,
266
+ WATCH = 8,
267
+ MODIFIED = 16,
268
+ PROCESS = 32,
269
+ MAIN = 64,
270
+ EXISTS = 128
271
+ }
272
+
273
+ export const enum LOG_TYPE {
274
+ UNKNOWN = 0,
275
+ SYSTEM = 1,
276
+ NODE = 2,
277
+ PROCESS = 4,
278
+ COMPRESS = 8,
279
+ WATCH = 16,
280
+ FILE = 32,
281
+ CLOUD = 64,
282
+ TIME_ELAPSED = 128,
283
+ TIME_PROCESS = 256,
284
+ FAIL = 512,
285
+ HTTP = 1024,
286
+ IMAGE = 2048,
287
+ EXEC = 4096,
288
+ PERMISSION = 8192,
289
+ TIMEOUT = 16384,
290
+ STDOUT = 32768,
291
+ DB = 65536
292
+ }
293
+
294
+ export const enum LOG_STATE {
295
+ STDIN,
296
+ STDOUT,
297
+ STDERR
298
+ }
299
+
300
+ export const enum READDIR_SORT {
301
+ FILE,
302
+ DIRECTORY,
303
+ DESCENDING
304
+ }
305
+
306
+ export const enum SETTINGS_KEY_NAME {
307
+ NODE_PROCESS_CPUUSAGE = "node.process.cpu_usage",
308
+ NODE_PROCESS_MEMORYUSAGE = "node.process.memory_usage",
309
+ NODE_PROCESS_INLINE = "node.process.inline",
310
+ NODE_REQUIRE_EXT = "node.require.ext",
311
+ NODE_REQUIRE_NPM = "node.require.npm",
312
+ NODE_REQUIRE_INLINE = "node.require.inline",
313
+ TEMP_DIR = "temp.dir",
314
+ TEMP_WRITE = "temp.write",
315
+ PROCESS_PASSWORD = "process.password",
316
+ PROCESS_ENV_APPLY = "process.env.apply",
317
+ PROCESS_CIPHER_ALGORITHM = "process.cipher.algorithm",
318
+ PERMISSION_PROCESS_EXEC = "permission.process_exec",
319
+ PERMISSION_HOMEREAD = "permission.home_read",
320
+ PERMISSION_HOMEWRITE = "permission.home_write",
321
+ MEMORY_SETTINGS_USERS = "memory.settings.users",
322
+ MEMORY_SETTINGS_CACHE_DISK = "memory.settings.cache_disk",
323
+ ERROR_OUT = "error.out",
324
+ ERROR_FATAL = "error.fatal",
325
+ BROADCAST_OUT = "broadcast.out",
326
+ LOGGER_LEVEL = "logger.level"
327
+ }
328
+
329
+ export const enum CACHE_SIZE {
330
+ CORE_CLIENTDB_PARTITION_SIZE = 16,
331
+ CORE_CLIENTDB_PARTITION_MULT = 2,
332
+ CLOUD_PARTITION_SIZE = 16,
333
+ CLOUD_PARTITION_MULT = 2,
334
+ DB_PARTITION_SIZE = 16,
335
+ DB_PARTITION_MULT = 2,
336
+ FILE_MANAGER_DISK_LIMIT = '1gb',
337
+ FILE_MANAGER_MEMORY_LIMIT = '100mb',
338
+ FILE_MANAGER_MEMORY_LIMIT_ALL = '512mb'
339
339
  }