@tmlmobilidade/consts 20251202.1817.5
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/dist/app-configs.d.ts +18 -0
- package/dist/app-configs.js +194 -0
- package/dist/app-routes.d.ts +151 -0
- package/dist/app-routes.js +235 -0
- package/dist/ascii-art.d.ts +3 -0
- package/dist/ascii-art.js +45 -0
- package/dist/http-exception.d.ts +4 -0
- package/dist/http-exception.js +12 -0
- package/dist/http-status.d.ts +50 -0
- package/dist/http-status.js +56 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +7 -0
- package/dist/mime-types.d.ts +84 -0
- package/dist/mime-types.js +84 -0
- package/dist/mongo-error.d.ts +338 -0
- package/dist/mongo-error.js +348 -0
- package/package.json +46 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
export const ASCII_TMLMOBILIDADE = `
|
|
3
|
+
▗▄▄▄▖▗▄▄▖ ▗▄▖ ▗▖ ▗▖ ▗▄▄▖▗▄▄▖ ▗▄▖ ▗▄▄▖▗▄▄▄▖▗▄▄▄▖ ▗▄▄▖ ▄▄▄ ▄▄▄
|
|
4
|
+
█ ▐▌ ▐▌▐▌ ▐▌▐▛▚▖▐▌▐▌ ▐▌ ▐▌▐▌ ▐▌▐▌ ▐▌ █ ▐▌ ▐▌ ▐▒▒▒▌▓▓▓▓▓▓▓▐▒▒▒▌
|
|
5
|
+
█ ▐▛▀▚▖▐▛▀▜▌▐▌ ▝▜▌ ▝▀▚▖▐▛▀▘ ▐▌ ▐▌▐▛▀▚▖ █ ▐▛▀▀▘ ▝▀▚▖▐▒▒▒▌▓▓▓▓▓▓▓▐▒▒▒▌
|
|
6
|
+
█ ▐▌ ▐▌▐▌ ▐▌▐▌ ▐▌▗▄▄▞▘▐▌ ▝▚▄▞▘▐▌ ▐▌ █ ▐▙▄▄▖▗▄▄▞▘ ▀▀▀ ▀▀▀
|
|
7
|
+
▗▖ ▗▖▗▄▄▄▖▗▄▄▄▖▗▄▄▖ ▗▄▖ ▗▄▄▖ ▗▄▖ ▗▖ ▗▄▄▄▖▗▄▄▄▖▗▄▖ ▗▖ ▗▖ ▗▄▖ ▗▄▄▖
|
|
8
|
+
▐▛▚▞▜▌▐▌ █ ▐▌ ▐▌▐▌ ▐▌▐▌ ▐▌▐▌ ▐▌▐▌ █ █ ▐▌ ▐▌▐▛▚▖▐▌▐▌ ▐▌▐▌
|
|
9
|
+
▐▌ ▐▌▐▛▀▀▘ █ ▐▛▀▚▖▐▌ ▐▌▐▛▀▘ ▐▌ ▐▌▐▌ █ █ ▐▛▀▜▌▐▌ ▝▜▌▐▌ ▐▌ ▝▀▚▖
|
|
10
|
+
▐▌ ▐▌▐▙▄▄▖ █ ▐▌ ▐▌▝▚▄▞▘▐▌ ▝▚▄▞▘▐▙▄▄▖▗▄█▄▖ █ ▐▌ ▐▌▐▌ ▐▌▝▚▄▞▘▗▄▄▞▘
|
|
11
|
+
▗▄▄▄ ▗▄▄▄▖ ▄▄▄ ▄▄▄ ▗▖ ▗▄▄▄▖ ▗▄▄▖▗▄▄▖ ▗▄▖ ▗▄▖
|
|
12
|
+
▐▌ █▐▌ ▐▒▒▒▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐▒▒▒▌ ▐▌ █ ▐▌ ▐▌ ▐▌▐▌ ▐▌▐▌ ▐▌
|
|
13
|
+
▐▌ █▐▛▀▀▘ ▐▒▒▒▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐▒▒▒▌ ▐▌ █ ▝▀▚▖▐▛▀▚▖▐▌ ▐▌▐▛▀▜▌
|
|
14
|
+
▐▙▄▄▀▐▙▄▄▖ ▀▀▀ ▀▀▀ ▐▙▄▄▖▗▄█▄▖▗▄▄▞▘▐▙▄▞▘▝▚▄▞▘▐▌ ▐▌
|
|
15
|
+
`;
|
|
16
|
+
/* * */
|
|
17
|
+
export const ASCII_CM_SHORT = `
|
|
18
|
+
███████ ██████ ██████
|
|
19
|
+
███████████████████████████
|
|
20
|
+
█████ ██████ ██████ █████
|
|
21
|
+
████ ████ ████ ████
|
|
22
|
+
████
|
|
23
|
+
████████
|
|
24
|
+
███████
|
|
25
|
+
`;
|
|
26
|
+
/* * */
|
|
27
|
+
export const ASCII_CM_FULL = `
|
|
28
|
+
███████ ██████ ██████
|
|
29
|
+
█████████████ ████████████ ████████████
|
|
30
|
+
████████████████████████████████████████████
|
|
31
|
+
██████ ████████ ████████ ██████
|
|
32
|
+
██████ ██████ █████ █████
|
|
33
|
+
█████ █████ █████ █████
|
|
34
|
+
██████ ███ █ █
|
|
35
|
+
██████
|
|
36
|
+
███████████ ████ █████ ████ ████ ██ ███
|
|
37
|
+
████████████ █ █ ██ ██ ██ ██ ███
|
|
38
|
+
████████ █████ ██████ ██ ██ ██ ████
|
|
39
|
+
|
|
40
|
+
█ ██ ██ █
|
|
41
|
+
███████ ████ ███ ███ ████ ████ ███ █ ██ ███ ████ █████ ████
|
|
42
|
+
█ █ ██ ████ █ █ █ ██ █ █ ██ █ ██ ██ █ █ █ ██ █ ██ █
|
|
43
|
+
█ █ █ ██ █ █ ███ ████ ███ █ ██ █ ████ █ █ ████
|
|
44
|
+
█
|
|
45
|
+
`;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { HttpStatus } from './http-status.js';
|
|
3
|
+
/* * */
|
|
4
|
+
export class HttpException extends Error {
|
|
5
|
+
statusCode;
|
|
6
|
+
constructor(statusCode, message, cause) {
|
|
7
|
+
super(message);
|
|
8
|
+
this.statusCode = statusCode || HttpStatus.INTERNAL_SERVER_ERROR;
|
|
9
|
+
this.message = message;
|
|
10
|
+
this.cause = cause;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export declare const HttpStatus: Readonly<{
|
|
2
|
+
CONTINUE: 100;
|
|
3
|
+
SWITCHING_PROTOCOLS: 101;
|
|
4
|
+
PROCESSING: 102;
|
|
5
|
+
EARLYHINTS: 103;
|
|
6
|
+
OK: 200;
|
|
7
|
+
CREATED: 201;
|
|
8
|
+
ACCEPTED: 202;
|
|
9
|
+
NON_AUTHORITATIVE_INFORMATION: 203;
|
|
10
|
+
NO_CONTENT: 204;
|
|
11
|
+
RESET_CONTENT: 205;
|
|
12
|
+
PARTIAL_CONTENT: 206;
|
|
13
|
+
AMBIGUOUS: 300;
|
|
14
|
+
MOVED_PERMANENTLY: 301;
|
|
15
|
+
FOUND: 302;
|
|
16
|
+
SEE_OTHER: 303;
|
|
17
|
+
NOT_MODIFIED: 304;
|
|
18
|
+
TEMPORARY_REDIRECT: 307;
|
|
19
|
+
PERMANENT_REDIRECT: 308;
|
|
20
|
+
BAD_REQUEST: 400;
|
|
21
|
+
UNAUTHORIZED: 401;
|
|
22
|
+
PAYMENT_REQUIRED: 402;
|
|
23
|
+
FORBIDDEN: 403;
|
|
24
|
+
NOT_FOUND: 404;
|
|
25
|
+
METHOD_NOT_ALLOWED: 405;
|
|
26
|
+
NOT_ACCEPTABLE: 406;
|
|
27
|
+
PROXY_AUTHENTICATION_REQUIRED: 407;
|
|
28
|
+
REQUEST_TIMEOUT: 408;
|
|
29
|
+
CONFLICT: 409;
|
|
30
|
+
GONE: 410;
|
|
31
|
+
LENGTH_REQUIRED: 411;
|
|
32
|
+
PRECONDITION_FAILED: 412;
|
|
33
|
+
PAYLOAD_TOO_LARGE: 413;
|
|
34
|
+
URI_TOO_LONG: 414;
|
|
35
|
+
UNSUPPORTED_MEDIA_TYPE: 415;
|
|
36
|
+
REQUESTED_RANGE_NOT_SATISFIABLE: 416;
|
|
37
|
+
EXPECTATION_FAILED: 417;
|
|
38
|
+
I_AM_A_TEAPOT: 418;
|
|
39
|
+
MISDIRECTED: 421;
|
|
40
|
+
UNPROCESSABLE_ENTITY: 422;
|
|
41
|
+
FAILED_DEPENDENCY: 424;
|
|
42
|
+
PRECONDITION_REQUIRED: 428;
|
|
43
|
+
TOO_MANY_REQUESTS: 429;
|
|
44
|
+
INTERNAL_SERVER_ERROR: 500;
|
|
45
|
+
NOT_IMPLEMENTED: 501;
|
|
46
|
+
BAD_GATEWAY: 502;
|
|
47
|
+
SERVICE_UNAVAILABLE: 503;
|
|
48
|
+
GATEWAY_TIMEOUT: 504;
|
|
49
|
+
HTTP_VERSION_NOT_SUPPORTED: 505;
|
|
50
|
+
}>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/* eslint-disable perfectionist/sort-objects */
|
|
2
|
+
export const HttpStatus = Object.freeze({
|
|
3
|
+
/* 100s */
|
|
4
|
+
CONTINUE: 100,
|
|
5
|
+
SWITCHING_PROTOCOLS: 101,
|
|
6
|
+
PROCESSING: 102,
|
|
7
|
+
EARLYHINTS: 103,
|
|
8
|
+
/* 200s */
|
|
9
|
+
OK: 200,
|
|
10
|
+
CREATED: 201,
|
|
11
|
+
ACCEPTED: 202,
|
|
12
|
+
NON_AUTHORITATIVE_INFORMATION: 203,
|
|
13
|
+
NO_CONTENT: 204,
|
|
14
|
+
RESET_CONTENT: 205,
|
|
15
|
+
PARTIAL_CONTENT: 206,
|
|
16
|
+
/* 300s */
|
|
17
|
+
AMBIGUOUS: 300,
|
|
18
|
+
MOVED_PERMANENTLY: 301,
|
|
19
|
+
FOUND: 302,
|
|
20
|
+
SEE_OTHER: 303,
|
|
21
|
+
NOT_MODIFIED: 304,
|
|
22
|
+
TEMPORARY_REDIRECT: 307,
|
|
23
|
+
PERMANENT_REDIRECT: 308,
|
|
24
|
+
/* 400s */
|
|
25
|
+
BAD_REQUEST: 400,
|
|
26
|
+
UNAUTHORIZED: 401,
|
|
27
|
+
PAYMENT_REQUIRED: 402,
|
|
28
|
+
FORBIDDEN: 403,
|
|
29
|
+
NOT_FOUND: 404,
|
|
30
|
+
METHOD_NOT_ALLOWED: 405,
|
|
31
|
+
NOT_ACCEPTABLE: 406,
|
|
32
|
+
PROXY_AUTHENTICATION_REQUIRED: 407,
|
|
33
|
+
REQUEST_TIMEOUT: 408,
|
|
34
|
+
CONFLICT: 409,
|
|
35
|
+
GONE: 410,
|
|
36
|
+
LENGTH_REQUIRED: 411,
|
|
37
|
+
PRECONDITION_FAILED: 412,
|
|
38
|
+
PAYLOAD_TOO_LARGE: 413,
|
|
39
|
+
URI_TOO_LONG: 414,
|
|
40
|
+
UNSUPPORTED_MEDIA_TYPE: 415,
|
|
41
|
+
REQUESTED_RANGE_NOT_SATISFIABLE: 416,
|
|
42
|
+
EXPECTATION_FAILED: 417,
|
|
43
|
+
I_AM_A_TEAPOT: 418,
|
|
44
|
+
MISDIRECTED: 421,
|
|
45
|
+
UNPROCESSABLE_ENTITY: 422,
|
|
46
|
+
FAILED_DEPENDENCY: 424,
|
|
47
|
+
PRECONDITION_REQUIRED: 428,
|
|
48
|
+
TOO_MANY_REQUESTS: 429,
|
|
49
|
+
/* 500s */
|
|
50
|
+
INTERNAL_SERVER_ERROR: 500,
|
|
51
|
+
NOT_IMPLEMENTED: 501,
|
|
52
|
+
BAD_GATEWAY: 502,
|
|
53
|
+
SERVICE_UNAVAILABLE: 503,
|
|
54
|
+
GATEWAY_TIMEOUT: 504,
|
|
55
|
+
HTTP_VERSION_NOT_SUPPORTED: 505,
|
|
56
|
+
});
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
export declare const mimeTypes: Readonly<{
|
|
2
|
+
'3gp': "video/3gpp";
|
|
3
|
+
'3gp_DOES_NOT_CONTAIN_VIDEO': "audio/3gpp";
|
|
4
|
+
'3gp2': "video/3gpp2";
|
|
5
|
+
'3gp2_DOES_NOT_CONTAIN_VIDEO': "audio/3gpp2";
|
|
6
|
+
'7z': "application/x-7z-compressed";
|
|
7
|
+
aac: "audio/aac";
|
|
8
|
+
abw: "application/x-abiword";
|
|
9
|
+
ai: "application/postscript";
|
|
10
|
+
arc: "application/octet-stream";
|
|
11
|
+
avi: "video/x-msvideo";
|
|
12
|
+
azw: "application/vnd.amazon.ebook";
|
|
13
|
+
bin: "application/octet-stream";
|
|
14
|
+
bz: "application/x-bzip";
|
|
15
|
+
bz2: "application/x-bzip2";
|
|
16
|
+
csh: "application/x-csh";
|
|
17
|
+
css: "text/css";
|
|
18
|
+
csv: "text/csv";
|
|
19
|
+
db: "application/vnd.sqlite3";
|
|
20
|
+
'db-shm': "application/vnd.sqlite3";
|
|
21
|
+
'db-wal': "application/vnd.sqlite3";
|
|
22
|
+
dll: "application/octet-stream";
|
|
23
|
+
doc: "application/msword";
|
|
24
|
+
eot: "application/vnd.ms-fontobject";
|
|
25
|
+
epub: "application/epub+zip";
|
|
26
|
+
gif: "image/gif";
|
|
27
|
+
htm: "text/html";
|
|
28
|
+
html: "text/html";
|
|
29
|
+
ico: "image/x-icon";
|
|
30
|
+
ics: "text/calendar";
|
|
31
|
+
jar: "application/java-archive";
|
|
32
|
+
jpeg: "image/jpeg";
|
|
33
|
+
jpg: "image/jpeg";
|
|
34
|
+
js: "application/javascript";
|
|
35
|
+
json: "application/json";
|
|
36
|
+
mid: "audio/midi";
|
|
37
|
+
midi: "audio/midi";
|
|
38
|
+
mp2: "audio/mpeg";
|
|
39
|
+
mp3: "audio/mpeg";
|
|
40
|
+
mp4: "video/mp4";
|
|
41
|
+
mpa: "video/mpeg";
|
|
42
|
+
mpe: "video/mpeg";
|
|
43
|
+
mpeg: "video/mpeg";
|
|
44
|
+
mpkg: "application/vnd.apple.installer+xml";
|
|
45
|
+
odp: "application/vnd.oasis.opendocument.presentation";
|
|
46
|
+
ods: "application/vnd.oasis.opendocument.spreadsheet";
|
|
47
|
+
odt: "application/vnd.oasis.opendocument.text";
|
|
48
|
+
oga: "audio/ogg";
|
|
49
|
+
ogv: "video/ogg";
|
|
50
|
+
ogx: "application/ogg";
|
|
51
|
+
otf: "font/otf";
|
|
52
|
+
pdf: "application/pdf";
|
|
53
|
+
png: "image/png";
|
|
54
|
+
ppt: "application/vnd.ms-powerpoint";
|
|
55
|
+
rar: "application/x-rar-compressed";
|
|
56
|
+
rtf: "application/rtf";
|
|
57
|
+
sh: "application/x-sh";
|
|
58
|
+
sqlite: "application/vnd.sqlite3";
|
|
59
|
+
'sqlite-shm': "application/vnd.sqlite3";
|
|
60
|
+
'sqlite-wal': "application/vnd.sqlite3";
|
|
61
|
+
sqlite3: "application/vnd.sqlite3";
|
|
62
|
+
svg: "image/svg+xml";
|
|
63
|
+
swf: "application/x-shockwave-flash";
|
|
64
|
+
tar: "application/x-tar";
|
|
65
|
+
tif: "image/tiff";
|
|
66
|
+
tiff: "image/tiff";
|
|
67
|
+
ts: "application/typescript";
|
|
68
|
+
ttf: "font/ttf";
|
|
69
|
+
txt: "text/plain";
|
|
70
|
+
vsd: "application/vnd.visio";
|
|
71
|
+
wav: "audio/x-wav";
|
|
72
|
+
weba: "audio/webm";
|
|
73
|
+
webm: "video/webm";
|
|
74
|
+
webp: "image/webp";
|
|
75
|
+
woff: "font/woff";
|
|
76
|
+
woff2: "font/woff2";
|
|
77
|
+
xhtml: "application/xhtml+xml";
|
|
78
|
+
xls: "application/vnd.ms-excel";
|
|
79
|
+
xlsx: "application/vnd.ms-excel";
|
|
80
|
+
xlsx_OLD: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
81
|
+
xml: "application/xml";
|
|
82
|
+
xul: "application/vnd.mozilla.xul+xml";
|
|
83
|
+
zip: "application/zip";
|
|
84
|
+
}>;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
export const mimeTypes = Object.freeze({
|
|
2
|
+
'3gp': 'video/3gpp',
|
|
3
|
+
'3gp_DOES_NOT_CONTAIN_VIDEO': 'audio/3gpp',
|
|
4
|
+
'3gp2': 'video/3gpp2',
|
|
5
|
+
'3gp2_DOES_NOT_CONTAIN_VIDEO': 'audio/3gpp2',
|
|
6
|
+
'7z': 'application/x-7z-compressed',
|
|
7
|
+
'aac': 'audio/aac',
|
|
8
|
+
'abw': 'application/x-abiword',
|
|
9
|
+
'ai': 'application/postscript',
|
|
10
|
+
'arc': 'application/octet-stream',
|
|
11
|
+
'avi': 'video/x-msvideo',
|
|
12
|
+
'azw': 'application/vnd.amazon.ebook',
|
|
13
|
+
'bin': 'application/octet-stream',
|
|
14
|
+
'bz': 'application/x-bzip',
|
|
15
|
+
'bz2': 'application/x-bzip2',
|
|
16
|
+
'csh': 'application/x-csh',
|
|
17
|
+
'css': 'text/css',
|
|
18
|
+
'csv': 'text/csv',
|
|
19
|
+
'db': 'application/vnd.sqlite3',
|
|
20
|
+
'db-shm': 'application/vnd.sqlite3',
|
|
21
|
+
'db-wal': 'application/vnd.sqlite3',
|
|
22
|
+
'dll': 'application/octet-stream',
|
|
23
|
+
'doc': 'application/msword',
|
|
24
|
+
'eot': 'application/vnd.ms-fontobject',
|
|
25
|
+
'epub': 'application/epub+zip',
|
|
26
|
+
'gif': 'image/gif',
|
|
27
|
+
'htm': 'text/html',
|
|
28
|
+
'html': 'text/html',
|
|
29
|
+
'ico': 'image/x-icon',
|
|
30
|
+
'ics': 'text/calendar',
|
|
31
|
+
'jar': 'application/java-archive',
|
|
32
|
+
'jpeg': 'image/jpeg',
|
|
33
|
+
'jpg': 'image/jpeg',
|
|
34
|
+
'js': 'application/javascript',
|
|
35
|
+
'json': 'application/json',
|
|
36
|
+
'mid': 'audio/midi',
|
|
37
|
+
'midi': 'audio/midi',
|
|
38
|
+
'mp2': 'audio/mpeg',
|
|
39
|
+
'mp3': 'audio/mpeg',
|
|
40
|
+
'mp4': 'video/mp4',
|
|
41
|
+
'mpa': 'video/mpeg',
|
|
42
|
+
'mpe': 'video/mpeg',
|
|
43
|
+
'mpeg': 'video/mpeg',
|
|
44
|
+
'mpkg': 'application/vnd.apple.installer+xml',
|
|
45
|
+
'odp': 'application/vnd.oasis.opendocument.presentation',
|
|
46
|
+
'ods': 'application/vnd.oasis.opendocument.spreadsheet',
|
|
47
|
+
'odt': 'application/vnd.oasis.opendocument.text',
|
|
48
|
+
'oga': 'audio/ogg',
|
|
49
|
+
'ogv': 'video/ogg',
|
|
50
|
+
'ogx': 'application/ogg',
|
|
51
|
+
'otf': 'font/otf',
|
|
52
|
+
'pdf': 'application/pdf',
|
|
53
|
+
'png': 'image/png',
|
|
54
|
+
'ppt': 'application/vnd.ms-powerpoint',
|
|
55
|
+
'rar': 'application/x-rar-compressed',
|
|
56
|
+
'rtf': 'application/rtf',
|
|
57
|
+
'sh': 'application/x-sh',
|
|
58
|
+
'sqlite': 'application/vnd.sqlite3',
|
|
59
|
+
'sqlite-shm': 'application/vnd.sqlite3',
|
|
60
|
+
'sqlite-wal': 'application/vnd.sqlite3',
|
|
61
|
+
'sqlite3': 'application/vnd.sqlite3',
|
|
62
|
+
'svg': 'image/svg+xml',
|
|
63
|
+
'swf': 'application/x-shockwave-flash',
|
|
64
|
+
'tar': 'application/x-tar',
|
|
65
|
+
'tif': 'image/tiff',
|
|
66
|
+
'tiff': 'image/tiff',
|
|
67
|
+
'ts': 'application/typescript',
|
|
68
|
+
'ttf': 'font/ttf',
|
|
69
|
+
'txt': 'text/plain',
|
|
70
|
+
'vsd': 'application/vnd.visio',
|
|
71
|
+
'wav': 'audio/x-wav',
|
|
72
|
+
'weba': 'audio/webm',
|
|
73
|
+
'webm': 'video/webm',
|
|
74
|
+
'webp': 'image/webp',
|
|
75
|
+
'woff': 'font/woff',
|
|
76
|
+
'woff2': 'font/woff2',
|
|
77
|
+
'xhtml': 'application/xhtml+xml',
|
|
78
|
+
'xls': 'application/vnd.ms-excel',
|
|
79
|
+
'xlsx': 'application/vnd.ms-excel',
|
|
80
|
+
'xlsx_OLD': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
81
|
+
'xml': 'application/xml',
|
|
82
|
+
'xul': 'application/vnd.mozilla.xul+xml',
|
|
83
|
+
'zip': 'application/zip',
|
|
84
|
+
});
|