convertido para pnpm

This commit is contained in:
Luiz Silva 2025-07-17 10:37:54 -03:00
parent 59e710f6cf
commit 175d767d27
115 changed files with 2366 additions and 1451 deletions

View file

@ -1,6 +1,6 @@
import cFetch from "cross-fetch"
import { cacheM } from "p-comuns"
import { respostaComuns, type tipoResposta } from "p-respostas"
import { cacheAuDrive } from "./plugins/node-cache"
import { uuidV3 } from "./plugins/uuid"
export const tx_vinculos__listar = "vinculos__listar" as const
@ -30,9 +30,7 @@ export const listarVinculos = async ({
// Buscar promeiro no cache
if (!desativarCache) {
const valorCache =
cacheAuDrive.get<Promise<tipoResposta<tipo_retorno_vinculo_listas[]>>>(
chaveCache,
)
cacheM<Promise<tipoResposta<tipo_retorno_vinculo_listas[]>>>(chaveCache)
if (valorCache) return valorCache
}
@ -66,13 +64,10 @@ export const listarVinculos = async ({
)
})()
cacheAuDrive.set(
cacheM(
chaveCache,
res.then((a) => {
try {
if (a.eErro) {
cacheAuDrive.del(chaveCache)
}
} catch {}
return a

View file

@ -1,3 +0,0 @@
import NodeCache from "node-cache"
export const cacheAuDrive = new NodeCache()