From f06f666cb4bd85f3e1c6a07e966fa487c79b635a Mon Sep 17 00:00:00 2001 From: Luiz Silva Date: Mon, 16 Sep 2024 18:16:42 -0300 Subject: [PATCH] =?UTF-8?q?feat:=20adc=20exten=C3=A7=C3=B5es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/extensoes.d.ts | 5 ++ dist/extensoes.js | 156 ++++++++++++++++++++++++++++++++++++++++++ dist/extensoes.js.map | 1 + dist/index.d.ts | 1 + dist/index.js | 1 + dist/index.js.map | 2 +- package.json | 2 +- src/extensoes.ts | 156 ++++++++++++++++++++++++++++++++++++++++++ src/index.ts | 1 + 9 files changed, 323 insertions(+), 2 deletions(-) create mode 100644 dist/extensoes.d.ts create mode 100644 dist/extensoes.js create mode 100644 dist/extensoes.js.map create mode 100644 src/extensoes.ts diff --git a/dist/extensoes.d.ts b/dist/extensoes.d.ts new file mode 100644 index 0000000..405e03b --- /dev/null +++ b/dist/extensoes.d.ts @@ -0,0 +1,5 @@ +export declare const extensoes: { + ext: string; + tipo: string; + mime: string; +}[]; diff --git a/dist/extensoes.js b/dist/extensoes.js new file mode 100644 index 0000000..5f0e563 --- /dev/null +++ b/dist/extensoes.js @@ -0,0 +1,156 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.extensoes = void 0; +exports.extensoes = [ + { + ext: "gif", + tipo: "imagem", + mime: "image/gif", + }, + { + ext: "jpg", + tipo: "imagem", + mime: "image/jpeg", + }, + { + ext: "jpeg", + tipo: "imagem", + mime: "image/jpeg", + }, + { + ext: "png", + tipo: "imagem", + mime: "image/png", + }, + { + ext: "bmp", + tipo: "imagem", + mime: "image/bmp", + }, + { + ext: "webp", + tipo: "imagem", + mime: "image/webp", + }, + { + ext: "tiff", + tipo: "imagem", + mime: "image/tiff", + }, + { + ext: "svg", + tipo: "imagem", + mime: "image/svg+xml", + }, + { + ext: "ico", + tipo: "imagem", + mime: "image/x-icon", + }, + { + ext: "pdf", + tipo: "documento", + mime: "application/pdf", + }, + { + ext: "doc", + tipo: "documento", + mime: "application/msword", + }, + { + ext: "docx", + tipo: "documento", + mime: "application/vnd.openxmlformats-officedocument.wordprocessingml.document", + }, + { + ext: "xls", + tipo: "documento", + mime: "application/vnd.ms-excel", + }, + { + ext: "xlsx", + tipo: "documento", + mime: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", + }, + { + ext: "ppt", + tipo: "documento", + mime: "application/vnd.ms-powerpoint", + }, + { + ext: "pptx", + tipo: "documento", + mime: "application/vnd.openxmlformats-officedocument.presentationml.presentation", + }, + { + ext: "txt", + tipo: "documento", + mime: "text/plain", + }, + { + ext: "odt", + tipo: "documento", + mime: "application/vnd.oasis.opendocument.text", + }, + { + ext: "ods", + tipo: "documento", + mime: "application/vnd.oasis.opendocument.spreadsheet", + }, + { + ext: "rtf", + tipo: "documento", + mime: "application/rtf", + }, + { + ext: "csv", + tipo: "documento", + mime: "text/csv", + }, + { + ext: "mp4", + tipo: "vídeo", + mime: "video/mp4", + }, + { + ext: "avi", + tipo: "vídeo", + mime: "video/x-msvideo", + }, + { + ext: "mkv", + tipo: "vídeo", + mime: "video/x-matroska", + }, + { + ext: "mov", + tipo: "vídeo", + mime: "video/quicktime", + }, + { + ext: "wmv", + tipo: "vídeo", + mime: "video/x-ms-wmv", + }, + { + ext: "flv", + tipo: "vídeo", + mime: "video/x-flv", + }, + { + ext: "webm", + tipo: "vídeo", + mime: "video/webm", + }, + { + ext: "3gp", + tipo: "vídeo", + mime: "video/3gpp", + }, + { + ext: "mpeg", + tipo: "vídeo", + mime: "video/mpeg", + }, +]; +//# sourceMappingURL=extensoes.js.map \ No newline at end of file diff --git a/dist/extensoes.js.map b/dist/extensoes.js.map new file mode 100644 index 0000000..8d941b4 --- /dev/null +++ b/dist/extensoes.js.map @@ -0,0 +1 @@ +{"version":3,"file":"extensoes.js","sourceRoot":"","sources":["../src/extensoes.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,G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 No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts index fbe1588..29c518b 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -8,3 +8,4 @@ export * from "./provedores"; export * from "./ecosistema"; export * from "./variaveisComuns"; export * from "./tipagemRotas"; +export * from "./extensoes"; diff --git a/dist/index.js b/dist/index.js index d9fe803..ab35209 100644 --- a/dist/index.js +++ b/dist/index.js @@ -24,4 +24,5 @@ __exportStar(require("./provedores"), exports); __exportStar(require("./ecosistema"), exports); __exportStar(require("./variaveisComuns"), exports); __exportStar(require("./tipagemRotas"), exports); +__exportStar(require("./extensoes"), exports); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/index.js.map b/dist/index.js.map index a48ac43..b2ebbfc 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,6CAA0B;AAC1B,8CAA2B;AAC3B,gDAA6B;AAC7B,oDAAiC;AACjC,yCAAsB;AACtB,+CAA4B;AAC5B,+CAA4B;AAC5B,oDAAiC;AACjC,iDAA8B"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,6CAA0B;AAC1B,8CAA2B;AAC3B,gDAA6B;AAC7B,oDAAiC;AACjC,yCAAsB;AACtB,+CAA4B;AAC5B,+CAA4B;AAC5B,oDAAiC;AACjC,iDAA8B;AAC9B,8CAA2B"} \ No newline at end of file diff --git a/package.json b/package.json index 232797f..8059d3f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "p-comuns", - "version": "0.47.0", + "version": "0.48.0", "description": "", "main": "dist/index.js", "scripts": { diff --git a/src/extensoes.ts b/src/extensoes.ts new file mode 100644 index 0000000..59602a2 --- /dev/null +++ b/src/extensoes.ts @@ -0,0 +1,156 @@ +export const extensoes: { + ext: string + tipo: string + mime: string +}[] = [ + { + ext: "gif", + tipo: "imagem", + mime: "image/gif", + }, + { + ext: "jpg", + tipo: "imagem", + mime: "image/jpeg", + }, + { + ext: "jpeg", + tipo: "imagem", + mime: "image/jpeg", + }, + { + ext: "png", + tipo: "imagem", + mime: "image/png", + }, + { + ext: "bmp", + tipo: "imagem", + mime: "image/bmp", + }, + { + ext: "webp", + tipo: "imagem", + mime: "image/webp", + }, + { + ext: "tiff", + tipo: "imagem", + mime: "image/tiff", + }, + { + ext: "svg", + tipo: "imagem", + mime: "image/svg+xml", + }, + { + ext: "ico", + tipo: "imagem", + mime: "image/x-icon", + }, + { + ext: "pdf", + tipo: "documento", + mime: "application/pdf", + }, + { + ext: "doc", + tipo: "documento", + mime: "application/msword", + }, + { + ext: "docx", + tipo: "documento", + mime: "application/vnd.openxmlformats-officedocument.wordprocessingml.document", + }, + { + ext: "xls", + tipo: "documento", + mime: "application/vnd.ms-excel", + }, + { + ext: "xlsx", + tipo: "documento", + mime: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", + }, + { + ext: "ppt", + tipo: "documento", + mime: "application/vnd.ms-powerpoint", + }, + { + ext: "pptx", + tipo: "documento", + mime: "application/vnd.openxmlformats-officedocument.presentationml.presentation", + }, + { + ext: "txt", + tipo: "documento", + mime: "text/plain", + }, + { + ext: "odt", + tipo: "documento", + mime: "application/vnd.oasis.opendocument.text", + }, + { + ext: "ods", + tipo: "documento", + mime: "application/vnd.oasis.opendocument.spreadsheet", + }, + { + ext: "rtf", + tipo: "documento", + mime: "application/rtf", + }, + { + ext: "csv", + tipo: "documento", + mime: "text/csv", + }, + { + ext: "mp4", + tipo: "vídeo", + mime: "video/mp4", + }, + { + ext: "avi", + tipo: "vídeo", + mime: "video/x-msvideo", + }, + { + ext: "mkv", + tipo: "vídeo", + mime: "video/x-matroska", + }, + { + ext: "mov", + tipo: "vídeo", + mime: "video/quicktime", + }, + { + ext: "wmv", + tipo: "vídeo", + mime: "video/x-ms-wmv", + }, + { + ext: "flv", + tipo: "vídeo", + mime: "video/x-flv", + }, + { + ext: "webm", + tipo: "vídeo", + mime: "video/webm", + }, + { + ext: "3gp", + tipo: "vídeo", + mime: "video/3gpp", + }, + { + ext: "mpeg", + tipo: "vídeo", + mime: "video/mpeg", + }, +] diff --git a/src/index.ts b/src/index.ts index f4c8d60..f8d7453 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8,3 +8,4 @@ export * from "./provedores" export * from "./ecosistema" export * from "./variaveisComuns" export * from "./tipagemRotas" +export * from "./extensoes"