From 6ff5981986002edc21e99455b8084d6f727baf23 Mon Sep 17 00:00:00 2001 From: Joabesv Date: Mon, 23 Dec 2024 13:28:37 -0300 Subject: [PATCH 1/5] feat: write job to upload logs --- apps/core/package.json | 1 + apps/core/src/lib/aws.service.ts | 9 + apps/core/src/queue/definitions.ts | 24 + apps/core/src/queue/jobs/logs.job.ts | 51 ++ pnpm-lock.yaml | 1065 +++++++++++++++++++++++++- 5 files changed, 1147 insertions(+), 3 deletions(-) create mode 100644 apps/core/src/queue/jobs/logs.job.ts diff --git a/apps/core/package.json b/apps/core/package.json index 59a61436..4bfc3bc4 100644 --- a/apps/core/package.json +++ b/apps/core/package.json @@ -17,6 +17,7 @@ "lint": "biome lint --write --unsafe --diagnostic-level=error ." }, "dependencies": { + "@aws-sdk/client-s3": "^3.717.0", "@aws-sdk/client-ses": "^3.600.0", "@bull-board/api": "^6.3.3", "@bull-board/fastify": "^6.3.3", diff --git a/apps/core/src/lib/aws.service.ts b/apps/core/src/lib/aws.service.ts index a46323ac..119ac3a2 100644 --- a/apps/core/src/lib/aws.service.ts +++ b/apps/core/src/lib/aws.service.ts @@ -1,3 +1,4 @@ +import { S3Client } from '@aws-sdk/client-s3'; import { SESClient } from '@aws-sdk/client-ses'; export const sesClient = new SESClient({ @@ -7,3 +8,11 @@ export const sesClient = new SESClient({ secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY!, }, }); + +export const s3Client = new S3Client({ + region: process.env.AWS_REGION, + credentials: { + accessKeyId: process.env.AWS_ACCESS_KEY_ID!, + secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY!, + }, +}); diff --git a/apps/core/src/queue/definitions.ts b/apps/core/src/queue/definitions.ts index fb861cc7..b0591579 100644 --- a/apps/core/src/queue/definitions.ts +++ b/apps/core/src/queue/definitions.ts @@ -9,6 +9,7 @@ import { } from './jobs/user-enrollments.job.js'; import type { WorkerOptions } from 'bullmq'; import { processComponentsTeachers } from './jobs/components-teacher.job.js'; +import { uploadLogsToS3 } from './jobs/logs.job.js'; const MONTH = 60 * 60 * 24 * 30; @@ -62,6 +63,10 @@ export const QUEUE_JOBS: Record = { age: 0, }, }, + /** + * Queue for updating our + codebase with the UFABC components + */ 'sync:components': { concurrency: 10, removeOnComplete: { @@ -73,6 +78,10 @@ export const QUEUE_JOBS: Record = { duration: 1000, }, }, + /** + * Queue for updating our + codebase with the UFABC teachers + */ 'sync:components:teachers': { concurrency: 10, removeOnComplete: { @@ -84,6 +93,16 @@ export const QUEUE_JOBS: Record = { duration: 1000, }, }, + /** + * Queue for sending production logs to the bucket + */ + 'logs:upload': { + concurrency: 1, + removeOnComplete: { + count: 100, + age: 24 * 60 * 60, + }, + }, } as const; export const JOBS = { @@ -129,6 +148,11 @@ export const JOBS = { queue: 'sync:components:teachers', handler: processComponentsTeachers, }, + LogsUpload: { + queue: 'logs:upload', + handler: uploadLogsToS3, + every: '1 day', + }, } as const; export type QueueNames = keyof typeof QUEUE_JOBS; diff --git a/apps/core/src/queue/jobs/logs.job.ts b/apps/core/src/queue/jobs/logs.job.ts new file mode 100644 index 00000000..0de6f6e3 --- /dev/null +++ b/apps/core/src/queue/jobs/logs.job.ts @@ -0,0 +1,51 @@ +import { readdir, readFile, unlink } from 'node:fs/promises'; +import type { QueueContext } from '../types.js'; +import { join } from 'node:path'; +import { s3Client } from '@/lib/aws.service.js'; +import { PutObjectCommand } from '@aws-sdk/client-s3'; + +type S3UploadJob = { + folderPath: string; + bucket: string; +}; + +export async function uploadLogsToS3(ctx: QueueContext) { + const { + data: { folderPath, bucket }, + } = ctx.job; + + try { + const files = await readdir(folderPath); + const logFiles = files.filter((file) => file.startsWith('app-')); + + for (const file of logFiles) { + const filePath = join(folderPath, file); + const fileContent = await readFile(filePath); + + await s3Client.send( + new PutObjectCommand({ + Bucket: bucket, + Key: `logs/${file}`, + Body: fileContent, + }), + ); + + // delete after upload + await unlink(filePath); + + ctx.app.log.debug({ + msg: 'Log file uploaded to S3', + file, + bucket, + }); + } + } catch (error) { + ctx.app.log.error({ + msg: 'Error uploading logs to S3', + error: error instanceof Error ? error.message : String(error), + folderPath, + bucket, + }); + throw error; + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a1ed372f..89e61063 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,6 +20,9 @@ importers: apps/core: dependencies: + '@aws-sdk/client-s3': + specifier: ^3.717.0 + version: 3.717.0 '@aws-sdk/client-ses': specifier: ^3.600.0 version: 3.623.0 @@ -186,6 +189,16 @@ importers: packages: + '@aws-crypto/crc32@5.2.0': + resolution: {integrity: sha512-nLbCWqQNgUiwwtFsen1AdzAtvuLRsQS8rYgMuxCrdKf9kOssamGLuPwyTY9wyYblNr9+1XM8v6zoDTPPSIeANg==} + engines: {node: '>=16.0.0'} + + '@aws-crypto/crc32c@5.2.0': + resolution: {integrity: sha512-+iWb8qaHLYKrNvGRbiYRHSdKRWhto5XlZUEBwDjYNf+ly5SVYG6zEoYIdxvf5R3zyeP16w4PLBn3rH1xc74Rag==} + + '@aws-crypto/sha1-browser@5.2.0': + resolution: {integrity: sha512-OH6lveCFfcDjX4dbAvCFSYUjJZjDr/3XJ3xHtjn3Oj5b9RjojQo8npoLeA/bNwkOkrSQ0wgrHzXk4tDRxGKJeg==} + '@aws-crypto/sha256-browser@5.2.0': resolution: {integrity: sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw==} @@ -199,6 +212,10 @@ packages: '@aws-crypto/util@5.2.0': resolution: {integrity: sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==} + '@aws-sdk/client-s3@3.717.0': + resolution: {integrity: sha512-jzaH8IskAXVnqlZ3/H/ROwrB2HCnq/atlN7Hi7FIfjWvMPf5nfcJKfzJ1MXFX0EQR5qO6X4TbK7rgi7Bjw9NjQ==} + engines: {node: '>=16.0.0'} + '@aws-sdk/client-ses@3.623.0': resolution: {integrity: sha512-+f4mzWB+rVu6pK9M7SMUYx65IupRqwoSJ7PDJyIPFdjTROVzJpPBygWVDjNRREkn58ageoLgpXXgL7ALzO0fvg==} engines: {node: '>=16.0.0'} @@ -209,84 +226,200 @@ packages: peerDependencies: '@aws-sdk/client-sts': ^3.623.0 + '@aws-sdk/client-sso-oidc@3.716.0': + resolution: {integrity: sha512-lA4IB9FzR2KjH7EVCo+mHGFKqdViVyeBQEIX9oVratL/l7P0bMS1fMwgfHOc3ACazqNxBxDES7x08ZCp32y6Lw==} + engines: {node: '>=16.0.0'} + peerDependencies: + '@aws-sdk/client-sts': ^3.716.0 + '@aws-sdk/client-sso@3.623.0': resolution: {integrity: sha512-oEACriysQMnHIVcNp7TD6D1nzgiHfYK0tmMBMbUxgoFuCBkW9g9QYvspHN+S9KgoePfMEXHuPUe9mtG9AH9XeA==} engines: {node: '>=16.0.0'} + '@aws-sdk/client-sso@3.716.0': + resolution: {integrity: sha512-5Nb0jJXce2TclbjG7WVPufwhgV1TRydz1QnsuBtKU0AdViEpr787YrZhPpGnNIM1Dx+R1H/tmAHZnOoohS6D8g==} + engines: {node: '>=16.0.0'} + '@aws-sdk/client-sts@3.623.0': resolution: {integrity: sha512-iJNdx76SOw0YjHAUv8aj3HXzSu3TKI7qSGuR+OGATwA/kpJZDd+4+WYBdGtr8YK+hPrGGqhfecuCkEg805O5iA==} engines: {node: '>=16.0.0'} + '@aws-sdk/client-sts@3.716.0': + resolution: {integrity: sha512-i4SVNsrdXudp8T4bkm7Fi3YWlRnvXCSwvNDqf6nLqSJxqr4CN3VlBELueDyjBK7TAt453/qSif+eNx+bHmwo4Q==} + engines: {node: '>=16.0.0'} + '@aws-sdk/core@3.623.0': resolution: {integrity: sha512-8Toq3X6trX/67obSdh4K0MFQY4f132bEbr1i0YPDWk/O3KdBt12mLC/sW3aVRnlIs110XMuX9yrWWqJ8fDW10g==} engines: {node: '>=16.0.0'} + '@aws-sdk/core@3.716.0': + resolution: {integrity: sha512-5DkUiTrbyzO8/W4g7UFEqRFpuhgizayHI/Zbh0wtFMcot8801nJV+MP/YMhdjimlvAr/OqYB08FbGsPyWppMTw==} + engines: {node: '>=16.0.0'} + '@aws-sdk/credential-provider-env@3.620.1': resolution: {integrity: sha512-ExuILJ2qLW5ZO+rgkNRj0xiAipKT16Rk77buvPP8csR7kkCflT/gXTyzRe/uzIiETTxM7tr8xuO9MP/DQXqkfg==} engines: {node: '>=16.0.0'} + '@aws-sdk/credential-provider-env@3.716.0': + resolution: {integrity: sha512-JI2KQUnn2arICwP9F3CnqP1W3nAbm4+meQg/yOhp9X0DMzQiHrHRd4HIrK2vyVgi2/6hGhONY5uLF26yRTA7nQ==} + engines: {node: '>=16.0.0'} + '@aws-sdk/credential-provider-http@3.622.0': resolution: {integrity: sha512-VUHbr24Oll1RK3WR8XLUugLpgK9ZuxEm/NVeVqyFts1Ck9gsKpRg1x4eH7L7tW3SJ4TDEQNMbD7/7J+eoL2svg==} engines: {node: '>=16.0.0'} + '@aws-sdk/credential-provider-http@3.716.0': + resolution: {integrity: sha512-CZ04pl2z7igQPysQyH2xKZHM3fLwkemxQbKOlje3TmiS1NwXvcKvERhp9PE/H23kOL7beTM19NMRog/Fka/rlw==} + engines: {node: '>=16.0.0'} + '@aws-sdk/credential-provider-ini@3.623.0': resolution: {integrity: sha512-kvXA1SwGneqGzFwRZNpESitnmaENHGFFuuTvgGwtMe7mzXWuA/LkXdbiHmdyAzOo0iByKTCD8uetuwh3CXy4Pw==} engines: {node: '>=16.0.0'} peerDependencies: '@aws-sdk/client-sts': ^3.623.0 + '@aws-sdk/credential-provider-ini@3.716.0': + resolution: {integrity: sha512-P37We2GtZvdROxiwP0zrpEL81/HuYK1qlYxp5VCj3uV+G4mG8UQN2gMIU/baYrpOQqa0h81RfyQGRFUjVaDVqw==} + engines: {node: '>=16.0.0'} + peerDependencies: + '@aws-sdk/client-sts': ^3.716.0 + '@aws-sdk/credential-provider-node@3.623.0': resolution: {integrity: sha512-qDwCOkhbu5PfaQHyuQ+h57HEx3+eFhKdtIw7aISziWkGdFrMe07yIBd7TJqGe4nxXnRF1pfkg05xeOlMId997g==} engines: {node: '>=16.0.0'} + '@aws-sdk/credential-provider-node@3.716.0': + resolution: {integrity: sha512-FGQPK2uKfS53dVvoskN/s/t6m0Po24BGd1PzJdzHBFCOjxbZLM6+8mDMXeyi2hCLVVQOUcuW41kOgmJ0+zMbww==} + engines: {node: '>=16.0.0'} + '@aws-sdk/credential-provider-process@3.620.1': resolution: {integrity: sha512-hWqFMidqLAkaV9G460+1at6qa9vySbjQKKc04p59OT7lZ5cO5VH5S4aI05e+m4j364MBROjjk2ugNvfNf/8ILg==} engines: {node: '>=16.0.0'} + '@aws-sdk/credential-provider-process@3.716.0': + resolution: {integrity: sha512-0spcu2MWVVHSTHH3WE2E//ttUJPwXRM3BCp+WyI41xLzpNu1Fd8zjOrDpEo0SnGUzsSiRTIJWgkuu/tqv9NJ2A==} + engines: {node: '>=16.0.0'} + '@aws-sdk/credential-provider-sso@3.623.0': resolution: {integrity: sha512-70LZhUb3l7cttEsg4A0S4Jq3qrCT/v5Jfyl8F7w1YZJt5zr3oPPcvDJxo/UYckFz4G4/5BhGa99jK8wMlNE9QA==} engines: {node: '>=16.0.0'} + '@aws-sdk/credential-provider-sso@3.716.0': + resolution: {integrity: sha512-J2IA3WuCpRGGoZm6VHZVFCnrxXP+41iUWb9Ct/1spljegTa1XjiaZ5Jf3+Ubj7WKiyvP9/dgz1L0bu2bYEjliw==} + engines: {node: '>=16.0.0'} + '@aws-sdk/credential-provider-web-identity@3.621.0': resolution: {integrity: sha512-w7ASSyfNvcx7+bYGep3VBgC3K6vEdLmlpjT7nSIHxxQf+WSdvy+HynwJosrpZax0sK5q0D1Jpn/5q+r5lwwW6w==} engines: {node: '>=16.0.0'} peerDependencies: '@aws-sdk/client-sts': ^3.621.0 + '@aws-sdk/credential-provider-web-identity@3.716.0': + resolution: {integrity: sha512-vzgpWKs2gGXZGdbMKRFrMW4PqEFWkGvwWH2T7ZwQv9m+8lQ7P4Dk2uimqu0f37HZAbpn8HFMqRh4CaySjU354A==} + engines: {node: '>=16.0.0'} + peerDependencies: + '@aws-sdk/client-sts': ^3.716.0 + + '@aws-sdk/middleware-bucket-endpoint@3.714.0': + resolution: {integrity: sha512-I/xSOskiseJJ8i183Z522BgqbgYzLKP7jGcg2Qeib/IWoG2IP+9DH8pwqagKaPAycyswtnoKBJiiFXY43n0CkA==} + engines: {node: '>=16.0.0'} + + '@aws-sdk/middleware-expect-continue@3.714.0': + resolution: {integrity: sha512-rlzsXdG8Lzo4Qpl35ZnpOBAWlzvDHpP9++0AXoUwAJA0QmMm7auIRmgxJuNj91VwT9h15ZU6xjU4S7fJl4W0+w==} + engines: {node: '>=16.0.0'} + + '@aws-sdk/middleware-flexible-checksums@3.717.0': + resolution: {integrity: sha512-a5kY5r7/7bDZZlOQQGWOR1ulQewdtNexdW1Ex5DD0FLKlFY7RD0va24hxQ6BP7mWHol+Dx4pj6UQ8ahk0ap1tw==} + engines: {node: '>=16.0.0'} + '@aws-sdk/middleware-host-header@3.620.0': resolution: {integrity: sha512-VMtPEZwqYrII/oUkffYsNWY9PZ9xpNJpMgmyU0rlDQ25O1c0Hk3fJmZRe6pEkAJ0omD7kLrqGl1DUjQVxpd/Rg==} engines: {node: '>=16.0.0'} + '@aws-sdk/middleware-host-header@3.714.0': + resolution: {integrity: sha512-6l68kjNrh5QC8FGX3I3geBDavWN5Tg1RLHJ2HLA8ByGBtJyCwnz3hEkKfaxn0bBx0hF9DzbfjEOUF6cDqy2Kjg==} + engines: {node: '>=16.0.0'} + + '@aws-sdk/middleware-location-constraint@3.714.0': + resolution: {integrity: sha512-MX7M+V+FblujKck3fyuzePVIAy9530gY719IiSxV6uN1qLHl7VDJxNblpF/KpXakD6rOg8OpvtmqsXj9aBMftw==} + engines: {node: '>=16.0.0'} + '@aws-sdk/middleware-logger@3.609.0': resolution: {integrity: sha512-S62U2dy4jMDhDFDK5gZ4VxFdWzCtLzwbYyFZx2uvPYTECkepLUfzLic2BHg2Qvtu4QjX+oGE3P/7fwaGIsGNuQ==} engines: {node: '>=16.0.0'} + '@aws-sdk/middleware-logger@3.714.0': + resolution: {integrity: sha512-RkqHlMvQWUaRklU1bMfUuBvdWwxgUtEqpADaHXlGVj3vtEY2UgBjy+57CveC4MByqKIunNvVHBBbjrGVtwY7Lg==} + engines: {node: '>=16.0.0'} + '@aws-sdk/middleware-recursion-detection@3.620.0': resolution: {integrity: sha512-nh91S7aGK3e/o1ck64sA/CyoFw+gAYj2BDOnoNa6ouyCrVJED96ZXWbhye/fz9SgmNUZR2g7GdVpiLpMKZoI5w==} engines: {node: '>=16.0.0'} + '@aws-sdk/middleware-recursion-detection@3.714.0': + resolution: {integrity: sha512-AVU5ixnh93nqtsfgNc284oXsXaadyHGPHpql/jwgaaqQfEXjS/1/j3j9E/vpacfTTz2Vzo7hAOjnvrOXSEVDaA==} + engines: {node: '>=16.0.0'} + + '@aws-sdk/middleware-sdk-s3@3.716.0': + resolution: {integrity: sha512-Qzz5OfRA/5brqfvq+JHTInwS1EuJ1+tC6qMtwKWJN3czMnVJVdnnsPTf+G5IM/1yYaGEIjY8rC1ExQLcc8ApFQ==} + engines: {node: '>=16.0.0'} + + '@aws-sdk/middleware-ssec@3.714.0': + resolution: {integrity: sha512-RkK8REAVwNUQmYbIDRw8eYbMJ8F1Rw4C9mlME4BBMhFlelGcD3ErU2ce24moQbDxBjNwHNESmIqgmdQk93CDCQ==} + engines: {node: '>=16.0.0'} + '@aws-sdk/middleware-user-agent@3.620.0': resolution: {integrity: sha512-bvS6etn+KsuL32ubY5D3xNof1qkenpbJXf/ugGXbg0n98DvDFQ/F+SMLxHgbnER5dsKYchNnhmtI6/FC3HFu/A==} engines: {node: '>=16.0.0'} + '@aws-sdk/middleware-user-agent@3.716.0': + resolution: {integrity: sha512-FpAtT6nNKrYdkDZndutEraiRMf+TgDzAGvniqRtZ/YTPA+gIsWrsn+TwMKINR81lFC3nQfb9deS5CFtxd021Ew==} + engines: {node: '>=16.0.0'} + '@aws-sdk/region-config-resolver@3.614.0': resolution: {integrity: sha512-vDCeMXvic/LU0KFIUjpC3RiSTIkkvESsEfbVHiHH0YINfl8HnEqR5rj+L8+phsCeVg2+LmYwYxd5NRz4PHxt5g==} engines: {node: '>=16.0.0'} + '@aws-sdk/region-config-resolver@3.714.0': + resolution: {integrity: sha512-HJzsQxgMOAzZrbf/YIqEx30or4tZK1oNAk6Wm6xecUQx+23JXIaePRu1YFUOLBBERQ4QBPpISFurZWBMZ5ibAw==} + engines: {node: '>=16.0.0'} + + '@aws-sdk/signature-v4-multi-region@3.716.0': + resolution: {integrity: sha512-k0goWotZKKz+kV6Ln0qeAMSeSVi4NipuIIz5R8A0uCF2zBK4CXWdZR7KeaIoLBhJwQnHj1UU7E+2MK74KIUBzA==} + engines: {node: '>=16.0.0'} + '@aws-sdk/token-providers@3.614.0': resolution: {integrity: sha512-okItqyY6L9IHdxqs+Z116y5/nda7rHxLvROxtAJdLavWTYDydxrZstImNgGWTeVdmc0xX2gJCI77UYUTQWnhRw==} engines: {node: '>=16.0.0'} peerDependencies: '@aws-sdk/client-sso-oidc': ^3.614.0 + '@aws-sdk/token-providers@3.714.0': + resolution: {integrity: sha512-vKN064aLE3kl+Zl16Ony3jltHnMddMBT7JRkP1L+lLywhA0PcAKxpdvComul/sTBWnbnwLnaS5NsDUhcWySH8A==} + engines: {node: '>=16.0.0'} + peerDependencies: + '@aws-sdk/client-sso-oidc': ^3.714.0 + '@aws-sdk/types@3.609.0': resolution: {integrity: sha512-+Tqnh9w0h2LcrUsdXyT1F8mNhXz+tVYBtP19LpeEGntmvHwa2XzvLUCWpoIAIVsHp5+HdB2X9Sn0KAtmbFXc2Q==} engines: {node: '>=16.0.0'} + '@aws-sdk/types@3.714.0': + resolution: {integrity: sha512-ZjpP2gYbSFlxxaUDa1Il5AVvfggvUPbjzzB/l3q0gIE5Thd6xKW+yzEpt2mLZ5s5UaYSABZbF94g8NUOF4CVGA==} + engines: {node: '>=16.0.0'} + + '@aws-sdk/util-arn-parser@3.693.0': + resolution: {integrity: sha512-WC8x6ca+NRrtpAH64rWu+ryDZI3HuLwlEr8EU6/dbC/pt+r/zC0PBoC15VEygUaBA+isppCikQpGyEDu0Yj7gQ==} + engines: {node: '>=16.0.0'} + '@aws-sdk/util-endpoints@3.614.0': resolution: {integrity: sha512-wK2cdrXHH4oz4IomV/yrGkftU9A+ITB6nFL+rxxyO78is2ifHJpFdV4aqk4LSkXYPi6CXWNru/Dqc7yiKXgJPw==} engines: {node: '>=16.0.0'} + '@aws-sdk/util-endpoints@3.714.0': + resolution: {integrity: sha512-Xv+Z2lhe7w7ZZRsgBwBMZgGTVmS+dkkj2S13uNHAx9lhB5ovM8PhK5G/j28xYf6vIibeuHkRAbb7/ozdZIGR+A==} + engines: {node: '>=16.0.0'} + '@aws-sdk/util-locate-window@3.568.0': resolution: {integrity: sha512-3nh4TINkXYr+H41QaPelCceEB2FXP3fxp93YZXB/kqJvX0U9j0N0Uk45gvsjmEPzG8XxkPEeLIfT2I1M7A6Lig==} engines: {node: '>=16.0.0'} @@ -294,6 +427,9 @@ packages: '@aws-sdk/util-user-agent-browser@3.609.0': resolution: {integrity: sha512-fojPU+mNahzQ0YHYBsx0ZIhmMA96H+ZIZ665ObU9tl+SGdbLneVZVikGve+NmHTQwHzwkFsZYYnVKAkreJLAtA==} + '@aws-sdk/util-user-agent-browser@3.714.0': + resolution: {integrity: sha512-OdJJ03cP9/MgIVToPJPCPUImbpZzTcwdIgbXC0tUQPJhbD7b7cB4LdnkhNHko+MptpOrCq4CPY/33EpOjRdofw==} + '@aws-sdk/util-user-agent-node@3.614.0': resolution: {integrity: sha512-15ElZT88peoHnq5TEoEtZwoXTXRxNrk60TZNdpl/TUBJ5oNJ9Dqb5Z4ryb8ofN6nm9aFf59GVAerFDz8iUoHBA==} engines: {node: '>=16.0.0'} @@ -303,6 +439,19 @@ packages: aws-crt: optional: true + '@aws-sdk/util-user-agent-node@3.716.0': + resolution: {integrity: sha512-3PqaXmQbxrtHKAsPCdp7kn5FrQktj8j3YyuNsqFZ8rWZeEQ88GWlsvE61PTsr2peYCKzpFqYVddef2x1axHU0w==} + engines: {node: '>=16.0.0'} + peerDependencies: + aws-crt: '>=1.0.0' + peerDependenciesMeta: + aws-crt: + optional: true + + '@aws-sdk/xml-builder@3.709.0': + resolution: {integrity: sha512-2GPCwlNxeHspoK/Mc8nbk9cBOkSpp3j2SJUQmFnyQK6V/pR6II2oPRyZkMomug1Rc10hqlBHByMecq4zhV2uUw==} + engines: {node: '>=16.0.0'} + '@balena/dockerignore@1.0.2': resolution: {integrity: sha512-wMue2Sy4GAVTk6Ic4tJVcnfdau+gx2EnG7S+uAEe+TWJFqE4YoWN4/H8MSLj4eYJKxGg26lZwboEniNiNwZQ6Q==} @@ -906,6 +1055,20 @@ packages: resolution: {integrity: sha512-MBJBiidoe+0cTFhyxT8g+9g7CeVccLM0IOKKUMCNQ1CNMJ/eIfoo0RTfVrXOONEI1UCN1W+zkiHSbzUNE9dZtQ==} engines: {node: '>=16.0.0'} + '@smithy/abort-controller@3.1.9': + resolution: {integrity: sha512-yiW0WI30zj8ZKoSYNx90no7ugVn3khlyH/z5W8qtKBtVE6awRALbhSG+2SAHA1r6bO/6M9utxYKVZ3PCJ1rWxw==} + engines: {node: '>=16.0.0'} + + '@smithy/chunked-blob-reader-native@3.0.1': + resolution: {integrity: sha512-VEYtPvh5rs/xlyqpm5NRnfYLZn+q0SRPELbvBV+C/G7IQ+ouTuo+NKKa3ShG5OaFR8NYVMXls9hPYLTvIKKDrQ==} + + '@smithy/chunked-blob-reader@4.0.0': + resolution: {integrity: sha512-jSqRnZvkT4egkq/7b6/QRCNXmmYVcHwnJldqJ3IhVpQE2atObVJ137xmGeuGFhjFUr8gCEVAOKwSY79OvpbDaQ==} + + '@smithy/config-resolver@3.0.13': + resolution: {integrity: sha512-Gr/qwzyPaTL1tZcq8WQyHhTZREER5R1Wytmz4WnVGL4onA3dNk6Btll55c8Vr58pLdvWZmtG8oZxJTw3t3q7Jg==} + engines: {node: '>=16.0.0'} + '@smithy/config-resolver@3.0.5': resolution: {integrity: sha512-SkW5LxfkSI1bUC74OtfBbdz+grQXYiPYolyu8VfpLIjEoN/sHVBlLeGXMQ1vX4ejkgfv6sxVbQJ32yF2cl1veA==} engines: {node: '>=16.0.0'} @@ -914,17 +1077,61 @@ packages: resolution: {integrity: sha512-in5wwt6chDBcUv1Lw1+QzZxN9fBffi+qOixfb65yK4sDuKG7zAUO9HAFqmVzsZM3N+3tTyvZjtnDXePpvp007Q==} engines: {node: '>=16.0.0'} + '@smithy/core@2.5.5': + resolution: {integrity: sha512-G8G/sDDhXA7o0bOvkc7bgai6POuSld/+XhNnWAbpQTpLv2OZPvyqQ58tLPPlz0bSNsXktldDDREIv1LczFeNEw==} + engines: {node: '>=16.0.0'} + '@smithy/credential-provider-imds@3.2.0': resolution: {integrity: sha512-0SCIzgd8LYZ9EJxUjLXBmEKSZR/P/w6l7Rz/pab9culE/RWuqelAKGJvn5qUOl8BgX8Yj5HWM50A5hiB/RzsgA==} engines: {node: '>=16.0.0'} + '@smithy/credential-provider-imds@3.2.8': + resolution: {integrity: sha512-ZCY2yD0BY+K9iMXkkbnjo+08T2h8/34oHd0Jmh6BZUSZwaaGlGCyBT/3wnS7u7Xl33/EEfN4B6nQr3Gx5bYxgw==} + engines: {node: '>=16.0.0'} + + '@smithy/eventstream-codec@3.1.10': + resolution: {integrity: sha512-323B8YckSbUH0nMIpXn7HZsAVKHYHFUODa8gG9cHo0ySvA1fr5iWaNT+iIL0UCqUzG6QPHA3BSsBtRQou4mMqQ==} + + '@smithy/eventstream-serde-browser@3.0.14': + resolution: {integrity: sha512-kbrt0vjOIihW3V7Cqj1SXQvAI5BR8SnyQYsandva0AOR307cXAc+IhPngxIPslxTLfxwDpNu0HzCAq6g42kCPg==} + engines: {node: '>=16.0.0'} + + '@smithy/eventstream-serde-config-resolver@3.0.11': + resolution: {integrity: sha512-P2pnEp4n75O+QHjyO7cbw/vsw5l93K/8EWyjNCAAybYwUmj3M+hjSQZ9P5TVdUgEG08ueMAP5R4FkuSkElZ5tQ==} + engines: {node: '>=16.0.0'} + + '@smithy/eventstream-serde-node@3.0.13': + resolution: {integrity: sha512-zqy/9iwbj8Wysmvi7Lq7XFLeDgjRpTbCfwBhJa8WbrylTAHiAu6oQTwdY7iu2lxigbc9YYr9vPv5SzYny5tCXQ==} + engines: {node: '>=16.0.0'} + + '@smithy/eventstream-serde-universal@3.0.13': + resolution: {integrity: sha512-L1Ib66+gg9uTnqp/18Gz4MDpJPKRE44geOjOQ2SVc0eiaO5l255ADziATZgjQjqumC7yPtp1XnjHlF1srcwjKw==} + engines: {node: '>=16.0.0'} + '@smithy/fetch-http-handler@3.2.4': resolution: {integrity: sha512-kBprh5Gs5h7ug4nBWZi1FZthdqSM+T7zMmsZxx0IBvWUn7dK3diz2SHn7Bs4dQGFDk8plDv375gzenDoNwrXjg==} + '@smithy/fetch-http-handler@4.1.2': + resolution: {integrity: sha512-R7rU7Ae3ItU4rC0c5mB2sP5mJNbCfoDc8I5XlYjIZnquyUwec7fEo78F6DA3SmgJgkU1qTMcZJuGblxZsl10ZA==} + + '@smithy/hash-blob-browser@3.1.10': + resolution: {integrity: sha512-elwslXOoNunmfS0fh55jHggyhccobFkexLYC1ZeZ1xP2BTSrcIBaHV2b4xUQOdctrSNOpMqOZH1r2XzWTEhyfA==} + + '@smithy/hash-node@3.0.11': + resolution: {integrity: sha512-emP23rwYyZhQBvklqTtwetkQlqbNYirDiEEwXl2v0GYWMnCzxst7ZaRAnWuy28njp5kAH54lvkdG37MblZzaHA==} + engines: {node: '>=16.0.0'} + '@smithy/hash-node@3.0.3': resolution: {integrity: sha512-2ctBXpPMG+B3BtWSGNnKELJ7SH9e4TNefJS0cd2eSkOOROeBnnVBnAy9LtJ8tY4vUEoe55N4CNPxzbWvR39iBw==} engines: {node: '>=16.0.0'} + '@smithy/hash-stream-node@3.1.10': + resolution: {integrity: sha512-olomK/jZQ93OMayW1zfTHwcbwBdhcZOHsyWyiZ9h9IXvc1mCD/VuvzbLb3Gy/qNJwI4MANPLctTp2BucV2oU/Q==} + engines: {node: '>=16.0.0'} + + '@smithy/invalid-dependency@3.0.11': + resolution: {integrity: sha512-NuQmVPEJjUX6c+UELyVz8kUx8Q539EDeNwbRyu4IIF8MeV7hUtq1FB3SHVyki2u++5XLMFqngeMKk7ccspnNyQ==} + '@smithy/invalid-dependency@3.0.3': resolution: {integrity: sha512-ID1eL/zpDULmHJbflb864k72/SNOZCADRc9i7Exq3RUNJw6raWUSlFEQ+3PX3EYs++bTxZB2dE9mEHTQLv61tw==} @@ -936,6 +1143,13 @@ packages: resolution: {integrity: sha512-+Fsu6Q6C4RSJiy81Y8eApjEB5gVtM+oFKTffg+jSuwtvomJJrhUJBu2zS8wjXSgH/g1MKEWrzyChTBe6clb5FQ==} engines: {node: '>=16.0.0'} + '@smithy/md5-js@3.0.11': + resolution: {integrity: sha512-3NM0L3i2Zm4bbgG6Ymi9NBcxXhryi3uE8fIfHJZIOfZVxOkGdjdgjR9A06SFIZCfnEIWKXZdm6Yq5/aPXFFhsQ==} + + '@smithy/middleware-content-length@3.0.13': + resolution: {integrity: sha512-zfMhzojhFpIX3P5ug7jxTjfUcIPcGjcQYzB9t+rv0g1TX7B0QdwONW+ATouaLoD7h7LOw/ZlXfkq4xJ/g2TrIw==} + engines: {node: '>=16.0.0'} + '@smithy/middleware-content-length@3.0.5': resolution: {integrity: sha512-ILEzC2eyxx6ncej3zZSwMpB5RJ0zuqH7eMptxC4KN3f+v9bqT8ohssKbhNR78k/2tWW+KS5Spw+tbPF4Ejyqvw==} engines: {node: '>=16.0.0'} @@ -944,18 +1158,38 @@ packages: resolution: {integrity: sha512-5y5aiKCEwg9TDPB4yFE7H6tYvGFf1OJHNczeY10/EFF8Ir8jZbNntQJxMWNfeQjC1mxPsaQ6mR9cvQbf+0YeMw==} engines: {node: '>=16.0.0'} + '@smithy/middleware-endpoint@3.2.6': + resolution: {integrity: sha512-WAqzyulvvSKrT5c6VrQelgNVNNO7BlTQW9Z+s9tcG6G5CaBS1YBpPtT3VuhXLQbewSiGi7oXQROwpw26EG9PLQ==} + engines: {node: '>=16.0.0'} + '@smithy/middleware-retry@3.0.14': resolution: {integrity: sha512-7ZaWZJOjUxa5hgmuMspyt8v/zVsh0GXYuF7OvCmdcbVa/xbnKQoYC+uYKunAqRGTkxjOyuOCw9rmFUFOqqC0eQ==} engines: {node: '>=16.0.0'} + '@smithy/middleware-retry@3.0.31': + resolution: {integrity: sha512-yq9wawrJLYHAYFpChLujxRN4My+SiKXvZk9Ml/CvTdRSA8ew+hvuR5LT+mjSlSBv3c4XJrkN8CWegkBaeD0Vrg==} + engines: {node: '>=16.0.0'} + + '@smithy/middleware-serde@3.0.11': + resolution: {integrity: sha512-KzPAeySp/fOoQA82TpnwItvX8BBURecpx6ZMu75EZDkAcnPtO6vf7q4aH5QHs/F1s3/snQaSFbbUMcFFZ086Mw==} + engines: {node: '>=16.0.0'} + '@smithy/middleware-serde@3.0.3': resolution: {integrity: sha512-puUbyJQBcg9eSErFXjKNiGILJGtiqmuuNKEYNYfUD57fUl4i9+mfmThtQhvFXU0hCVG0iEJhvQUipUf+/SsFdA==} engines: {node: '>=16.0.0'} + '@smithy/middleware-stack@3.0.11': + resolution: {integrity: sha512-1HGo9a6/ikgOMrTrWL/WiN9N8GSVYpuRQO5kjstAq4CvV59bjqnh7TbdXGQ4vxLD3xlSjfBjq5t1SOELePsLnA==} + engines: {node: '>=16.0.0'} + '@smithy/middleware-stack@3.0.3': resolution: {integrity: sha512-r4klY9nFudB0r9UdSMaGSyjyQK5adUyPnQN/ZM6M75phTxOdnc/AhpvGD1fQUvgmqjQEBGCwpnPbDm8pH5PapA==} engines: {node: '>=16.0.0'} + '@smithy/node-config-provider@3.1.12': + resolution: {integrity: sha512-O9LVEu5J/u/FuNlZs+L7Ikn3lz7VB9hb0GtPT9MQeiBmtK8RSY3ULmsZgXhe6VAlgTw0YO+paQx4p8xdbs43vQ==} + engines: {node: '>=16.0.0'} + '@smithy/node-config-provider@3.1.4': resolution: {integrity: sha512-YvnElQy8HR4vDcAjoy7Xkx9YT8xZP4cBXcbJSgm/kxmiQu08DwUwj8rkGnyoJTpfl/3xYHH+d8zE+eHqoDCSdQ==} engines: {node: '>=16.0.0'} @@ -964,6 +1198,14 @@ packages: resolution: {integrity: sha512-+UmxgixgOr/yLsUxcEKGH0fMNVteJFGkmRltYFHnBMlogyFdpzn2CwqWmxOrfJELhV34v0WSlaqG1UtE1uXlJg==} engines: {node: '>=16.0.0'} + '@smithy/node-http-handler@3.3.2': + resolution: {integrity: sha512-t4ng1DAd527vlxvOfKFYEe6/QFBcsj7WpNlWTyjorwXXcKw3XlltBGbyHfSJ24QT84nF+agDha9tNYpzmSRZPA==} + engines: {node: '>=16.0.0'} + + '@smithy/property-provider@3.1.11': + resolution: {integrity: sha512-I/+TMc4XTQ3QAjXfOcUWbSS073oOEAxgx4aZy8jHaf8JQnRkq2SZWw8+PfDtBvLUjcGMdxl+YwtzWe6i5uhL/A==} + engines: {node: '>=16.0.0'} + '@smithy/property-provider@3.1.3': resolution: {integrity: sha512-zahyOVR9Q4PEoguJ/NrFP4O7SMAfYO1HLhB18M+q+Z4KFd4V2obiMnlVoUFzFLSPeVt1POyNWneHHrZaTMoc/g==} engines: {node: '>=16.0.0'} @@ -972,18 +1214,38 @@ packages: resolution: {integrity: sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==} engines: {node: '>=16.0.0'} + '@smithy/protocol-http@4.1.8': + resolution: {integrity: sha512-hmgIAVyxw1LySOwkgMIUN0kjN8TG9Nc85LJeEmEE/cNEe2rkHDUWhnJf2gxcSRFLWsyqWsrZGw40ROjUogg+Iw==} + engines: {node: '>=16.0.0'} + + '@smithy/querystring-builder@3.0.11': + resolution: {integrity: sha512-u+5HV/9uJaeLj5XTb6+IEF/dokWWkEqJ0XiaRRogyREmKGUgZnNecLucADLdauWFKUNbQfulHFEZEdjwEBjXRg==} + engines: {node: '>=16.0.0'} + '@smithy/querystring-builder@3.0.3': resolution: {integrity: sha512-vyWckeUeesFKzCDaRwWLUA1Xym9McaA6XpFfAK5qI9DKJ4M33ooQGqvM4J+LalH4u/Dq9nFiC8U6Qn1qi0+9zw==} engines: {node: '>=16.0.0'} + '@smithy/querystring-parser@3.0.11': + resolution: {integrity: sha512-Je3kFvCsFMnso1ilPwA7GtlbPaTixa3WwC+K21kmMZHsBEOZYQaqxcMqeFFoU7/slFjKDIpiiPydvdJm8Q/MCw==} + engines: {node: '>=16.0.0'} + '@smithy/querystring-parser@3.0.3': resolution: {integrity: sha512-zahM1lQv2YjmznnfQsWbYojFe55l0SLG/988brlLv1i8z3dubloLF+75ATRsqPBboUXsW6I9CPGE5rQgLfY0vQ==} engines: {node: '>=16.0.0'} + '@smithy/service-error-classification@3.0.11': + resolution: {integrity: sha512-QnYDPkyewrJzCyaeI2Rmp7pDwbUETe+hU8ADkXmgNusO1bgHBH7ovXJiYmba8t0fNfJx75fE8dlM6SEmZxheog==} + engines: {node: '>=16.0.0'} + '@smithy/service-error-classification@3.0.3': resolution: {integrity: sha512-Jn39sSl8cim/VlkLsUhRFq/dKDnRUFlfRkvhOJaUbLBXUsLRLNf9WaxDv/z9BjuQ3A6k/qE8af1lsqcwm7+DaQ==} engines: {node: '>=16.0.0'} + '@smithy/shared-ini-file-loader@3.1.12': + resolution: {integrity: sha512-1xKSGI+U9KKdbG2qDvIR9dGrw3CNx+baqJfyr0igKEpjbHL5stsqAesYBzHChYHlelWtb87VnLWlhvfCz13H8Q==} + engines: {node: '>=16.0.0'} + '@smithy/shared-ini-file-loader@3.1.4': resolution: {integrity: sha512-qMxS4hBGB8FY2GQqshcRUy1K6k8aBWP5vwm8qKkCT3A9K2dawUwOIJfqh9Yste/Bl0J2lzosVyrXDj68kLcHXQ==} engines: {node: '>=16.0.0'} @@ -992,14 +1254,29 @@ packages: resolution: {integrity: sha512-aRryp2XNZeRcOtuJoxjydO6QTaVhxx/vjaR+gx7ZjaFgrgPRyZ3HCTbfwqYj6ZWEBHkCSUfcaymKPURaByukag==} engines: {node: '>=16.0.0'} + '@smithy/signature-v4@4.2.4': + resolution: {integrity: sha512-5JWeMQYg81TgU4cG+OexAWdvDTs5JDdbEZx+Qr1iPbvo91QFGzjy0IkXAKaXUHqmKUJgSHK0ZxnCkgZpzkeNTA==} + engines: {node: '>=16.0.0'} + '@smithy/smithy-client@3.1.12': resolution: {integrity: sha512-wtm8JtsycthkHy1YA4zjIh2thJgIQ9vGkoR639DBx5lLlLNU0v4GARpQZkr2WjXue74nZ7MiTSWfVrLkyD8RkA==} engines: {node: '>=16.0.0'} + '@smithy/smithy-client@3.5.1': + resolution: {integrity: sha512-PmjskH4Os1Eh3rd5vSsa5uVelZ4DRu+N5CBEgb9AT96hQSJGWSEb6pGxKV/PtKQSIp9ft3+KvnT8ViMKaguzgA==} + engines: {node: '>=16.0.0'} + '@smithy/types@3.3.0': resolution: {integrity: sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==} engines: {node: '>=16.0.0'} + '@smithy/types@3.7.2': + resolution: {integrity: sha512-bNwBYYmN8Eh9RyjS1p2gW6MIhSO2rl7X9QeLM8iTdcGRP+eDiIWDt66c9IysCc22gefKszZv+ubV9qZc7hdESg==} + engines: {node: '>=16.0.0'} + + '@smithy/url-parser@3.0.11': + resolution: {integrity: sha512-TmlqXkSk8ZPhfc+SQutjmFr5FjC0av3GZP4B/10caK1SbRwe/v+Wzu/R6xEKxoNqL+8nY18s1byiy6HqPG37Aw==} + '@smithy/url-parser@3.0.3': resolution: {integrity: sha512-pw3VtZtX2rg+s6HMs6/+u9+hu6oY6U7IohGhVNnjbgKy86wcIsSZwgHrFR+t67Uyxvp4Xz3p3kGXXIpTNisq8A==} @@ -1030,22 +1307,42 @@ packages: resolution: {integrity: sha512-0iwTgKKmAIf+vFLV8fji21Jb2px11ktKVxbX6LIDPAUJyWQqGqBVfwba7xwa1f2FZUoolYQgLvxQEpJycXuQ5w==} engines: {node: '>= 10.0.0'} + '@smithy/util-defaults-mode-browser@3.0.31': + resolution: {integrity: sha512-eO+zkbqrPnmsagqzrmF7IJrCoU2wTQXWVYxMPqA9Oue55kw9WEvhyuw2XQzTVTCRcYsg6KgmV3YYhLlWQJfK1A==} + engines: {node: '>= 10.0.0'} + '@smithy/util-defaults-mode-node@3.0.14': resolution: {integrity: sha512-e9uQarJKfXApkTMMruIdxHprhcXivH1flYCe8JRDTzkkLx8dA3V5J8GZlST9yfDiRWkJpZJlUXGN9Rc9Ade3OQ==} engines: {node: '>= 10.0.0'} + '@smithy/util-defaults-mode-node@3.0.31': + resolution: {integrity: sha512-0/nJfpSpbGZOs6qs42wCe2TdjobbnnD4a3YUUlvTXSQqLy4qa63luDaV04hGvqSHP7wQ7/WGehbvHkDhMZd1MQ==} + engines: {node: '>= 10.0.0'} + '@smithy/util-endpoints@2.0.5': resolution: {integrity: sha512-ReQP0BWihIE68OAblC/WQmDD40Gx+QY1Ez8mTdFMXpmjfxSyz2fVQu3A4zXRfQU9sZXtewk3GmhfOHswvX+eNg==} engines: {node: '>=16.0.0'} + '@smithy/util-endpoints@2.1.7': + resolution: {integrity: sha512-tSfcqKcN/Oo2STEYCABVuKgJ76nyyr6skGl9t15hs+YaiU06sgMkN7QYjo0BbVw+KT26zok3IzbdSOksQ4YzVw==} + engines: {node: '>=16.0.0'} + '@smithy/util-hex-encoding@3.0.0': resolution: {integrity: sha512-eFndh1WEK5YMUYvy3lPlVmYY/fZcQE1D8oSf41Id2vCeIkKJXPcYDCZD+4+xViI6b1XSd7tE+s5AmXzz5ilabQ==} engines: {node: '>=16.0.0'} + '@smithy/util-middleware@3.0.11': + resolution: {integrity: sha512-dWpyc1e1R6VoXrwLoLDd57U1z6CwNSdkM69Ie4+6uYh2GC7Vg51Qtan7ITzczuVpqezdDTKJGJB95fFvvjU/ow==} + engines: {node: '>=16.0.0'} + '@smithy/util-middleware@3.0.3': resolution: {integrity: sha512-l+StyYYK/eO3DlVPbU+4Bi06Jjal+PFLSMmlWM1BEwyLxZ3aKkf1ROnoIakfaA7mC6uw3ny7JBkau4Yc+5zfWw==} engines: {node: '>=16.0.0'} + '@smithy/util-retry@3.0.11': + resolution: {integrity: sha512-hJUC6W7A3DQgaee3Hp9ZFcOxVDZzmBIRBPlUAk8/fSOEl7pE/aX7Dci0JycNOnm9Mfr0KV2XjIlUOcGWXQUdVQ==} + engines: {node: '>=16.0.0'} + '@smithy/util-retry@3.0.3': resolution: {integrity: sha512-AFw+hjpbtVApzpNDhbjNG5NA3kyoMs7vx0gsgmlJF4s+yz1Zlepde7J58zpIRIsdjc+emhpAITxA88qLkPF26w==} engines: {node: '>=16.0.0'} @@ -1054,6 +1351,10 @@ packages: resolution: {integrity: sha512-FIv/bRhIlAxC0U7xM1BCnF2aDRPq0UaelqBHkM2lsCp26mcBbgI0tCVTv+jGdsQLUmAMybua/bjDsSu8RQHbmw==} engines: {node: '>=16.0.0'} + '@smithy/util-stream@3.3.2': + resolution: {integrity: sha512-sInAqdiVeisUGYAv/FrXpmJ0b4WTFmciTRqzhb7wVuem9BHvhIG7tpiYHLDWrl2stOokNZpTTGqz3mzB2qFwXg==} + engines: {node: '>=16.0.0'} + '@smithy/util-uri-escape@3.0.0': resolution: {integrity: sha512-LqR7qYLgZTD7nWLBecUi4aqolw8Mhza9ArpNEQ881MJJIU2sE5iHCK6TdyqqzcDLy0OPe10IY4T8ctVdtynubg==} engines: {node: '>=16.0.0'} @@ -1070,6 +1371,10 @@ packages: resolution: {integrity: sha512-4pP0EV3iTsexDx+8PPGAKCQpd/6hsQBaQhqWzU4hqKPHN5epPsxKbvUTIiYIHTxaKt6/kEaqPBpu/ufvfbrRzw==} engines: {node: '>=16.0.0'} + '@smithy/util-waiter@3.2.0': + resolution: {integrity: sha512-PpjSboaDUE6yl+1qlg3Si57++e84oXdWGbuFUSAciXsVfEZJJJupR2Nb0QuXHiunt2vGR+1PTizOMvnUPaG2Qg==} + engines: {node: '>=16.0.0'} + '@total-typescript/ts-reset@0.5.1': resolution: {integrity: sha512-AqlrT8YA1o7Ff5wPfMOL0pvL+1X+sw60NN6CcOCqs658emD6RfiXhF7Gu9QcfKBH7ELY2nInLhKSCWVoNL70MQ==} @@ -2673,12 +2978,33 @@ packages: snapshots: + '@aws-crypto/crc32@5.2.0': + dependencies: + '@aws-crypto/util': 5.2.0 + '@aws-sdk/types': 3.714.0 + tslib: 2.6.3 + + '@aws-crypto/crc32c@5.2.0': + dependencies: + '@aws-crypto/util': 5.2.0 + '@aws-sdk/types': 3.714.0 + tslib: 2.6.3 + + '@aws-crypto/sha1-browser@5.2.0': + dependencies: + '@aws-crypto/supports-web-crypto': 5.2.0 + '@aws-crypto/util': 5.2.0 + '@aws-sdk/types': 3.714.0 + '@aws-sdk/util-locate-window': 3.568.0 + '@smithy/util-utf8': 2.3.0 + tslib: 2.6.3 + '@aws-crypto/sha256-browser@5.2.0': dependencies: '@aws-crypto/sha256-js': 5.2.0 '@aws-crypto/supports-web-crypto': 5.2.0 '@aws-crypto/util': 5.2.0 - '@aws-sdk/types': 3.609.0 + '@aws-sdk/types': 3.714.0 '@aws-sdk/util-locate-window': 3.568.0 '@smithy/util-utf8': 2.3.0 tslib: 2.6.3 @@ -2686,7 +3012,7 @@ snapshots: '@aws-crypto/sha256-js@5.2.0': dependencies: '@aws-crypto/util': 5.2.0 - '@aws-sdk/types': 3.609.0 + '@aws-sdk/types': 3.714.0 tslib: 2.6.3 '@aws-crypto/supports-web-crypto@5.2.0': @@ -2695,10 +3021,73 @@ snapshots: '@aws-crypto/util@5.2.0': dependencies: - '@aws-sdk/types': 3.609.0 + '@aws-sdk/types': 3.714.0 '@smithy/util-utf8': 2.3.0 tslib: 2.6.3 + '@aws-sdk/client-s3@3.717.0': + dependencies: + '@aws-crypto/sha1-browser': 5.2.0 + '@aws-crypto/sha256-browser': 5.2.0 + '@aws-crypto/sha256-js': 5.2.0 + '@aws-sdk/client-sso-oidc': 3.716.0(@aws-sdk/client-sts@3.716.0) + '@aws-sdk/client-sts': 3.716.0 + '@aws-sdk/core': 3.716.0 + '@aws-sdk/credential-provider-node': 3.716.0(@aws-sdk/client-sso-oidc@3.716.0(@aws-sdk/client-sts@3.716.0))(@aws-sdk/client-sts@3.716.0) + '@aws-sdk/middleware-bucket-endpoint': 3.714.0 + '@aws-sdk/middleware-expect-continue': 3.714.0 + '@aws-sdk/middleware-flexible-checksums': 3.717.0 + '@aws-sdk/middleware-host-header': 3.714.0 + '@aws-sdk/middleware-location-constraint': 3.714.0 + '@aws-sdk/middleware-logger': 3.714.0 + '@aws-sdk/middleware-recursion-detection': 3.714.0 + '@aws-sdk/middleware-sdk-s3': 3.716.0 + '@aws-sdk/middleware-ssec': 3.714.0 + '@aws-sdk/middleware-user-agent': 3.716.0 + '@aws-sdk/region-config-resolver': 3.714.0 + '@aws-sdk/signature-v4-multi-region': 3.716.0 + '@aws-sdk/types': 3.714.0 + '@aws-sdk/util-endpoints': 3.714.0 + '@aws-sdk/util-user-agent-browser': 3.714.0 + '@aws-sdk/util-user-agent-node': 3.716.0 + '@aws-sdk/xml-builder': 3.709.0 + '@smithy/config-resolver': 3.0.13 + '@smithy/core': 2.5.5 + '@smithy/eventstream-serde-browser': 3.0.14 + '@smithy/eventstream-serde-config-resolver': 3.0.11 + '@smithy/eventstream-serde-node': 3.0.13 + '@smithy/fetch-http-handler': 4.1.2 + '@smithy/hash-blob-browser': 3.1.10 + '@smithy/hash-node': 3.0.11 + '@smithy/hash-stream-node': 3.1.10 + '@smithy/invalid-dependency': 3.0.11 + '@smithy/md5-js': 3.0.11 + '@smithy/middleware-content-length': 3.0.13 + '@smithy/middleware-endpoint': 3.2.6 + '@smithy/middleware-retry': 3.0.31 + '@smithy/middleware-serde': 3.0.11 + '@smithy/middleware-stack': 3.0.11 + '@smithy/node-config-provider': 3.1.12 + '@smithy/node-http-handler': 3.3.2 + '@smithy/protocol-http': 4.1.8 + '@smithy/smithy-client': 3.5.1 + '@smithy/types': 3.7.2 + '@smithy/url-parser': 3.0.11 + '@smithy/util-base64': 3.0.0 + '@smithy/util-body-length-browser': 3.0.0 + '@smithy/util-body-length-node': 3.0.0 + '@smithy/util-defaults-mode-browser': 3.0.31 + '@smithy/util-defaults-mode-node': 3.0.31 + '@smithy/util-endpoints': 2.1.7 + '@smithy/util-middleware': 3.0.11 + '@smithy/util-retry': 3.0.11 + '@smithy/util-stream': 3.3.2 + '@smithy/util-utf8': 3.0.0 + '@smithy/util-waiter': 3.2.0 + tslib: 2.6.3 + transitivePeerDependencies: + - aws-crt + '@aws-sdk/client-ses@3.623.0': dependencies: '@aws-crypto/sha256-browser': 5.2.0 @@ -2791,6 +3180,51 @@ snapshots: transitivePeerDependencies: - aws-crt + '@aws-sdk/client-sso-oidc@3.716.0(@aws-sdk/client-sts@3.716.0)': + dependencies: + '@aws-crypto/sha256-browser': 5.2.0 + '@aws-crypto/sha256-js': 5.2.0 + '@aws-sdk/client-sts': 3.716.0 + '@aws-sdk/core': 3.716.0 + '@aws-sdk/credential-provider-node': 3.716.0(@aws-sdk/client-sso-oidc@3.716.0(@aws-sdk/client-sts@3.716.0))(@aws-sdk/client-sts@3.716.0) + '@aws-sdk/middleware-host-header': 3.714.0 + '@aws-sdk/middleware-logger': 3.714.0 + '@aws-sdk/middleware-recursion-detection': 3.714.0 + '@aws-sdk/middleware-user-agent': 3.716.0 + '@aws-sdk/region-config-resolver': 3.714.0 + '@aws-sdk/types': 3.714.0 + '@aws-sdk/util-endpoints': 3.714.0 + '@aws-sdk/util-user-agent-browser': 3.714.0 + '@aws-sdk/util-user-agent-node': 3.716.0 + '@smithy/config-resolver': 3.0.13 + '@smithy/core': 2.5.5 + '@smithy/fetch-http-handler': 4.1.2 + '@smithy/hash-node': 3.0.11 + '@smithy/invalid-dependency': 3.0.11 + '@smithy/middleware-content-length': 3.0.13 + '@smithy/middleware-endpoint': 3.2.6 + '@smithy/middleware-retry': 3.0.31 + '@smithy/middleware-serde': 3.0.11 + '@smithy/middleware-stack': 3.0.11 + '@smithy/node-config-provider': 3.1.12 + '@smithy/node-http-handler': 3.3.2 + '@smithy/protocol-http': 4.1.8 + '@smithy/smithy-client': 3.5.1 + '@smithy/types': 3.7.2 + '@smithy/url-parser': 3.0.11 + '@smithy/util-base64': 3.0.0 + '@smithy/util-body-length-browser': 3.0.0 + '@smithy/util-body-length-node': 3.0.0 + '@smithy/util-defaults-mode-browser': 3.0.31 + '@smithy/util-defaults-mode-node': 3.0.31 + '@smithy/util-endpoints': 2.1.7 + '@smithy/util-middleware': 3.0.11 + '@smithy/util-retry': 3.0.11 + '@smithy/util-utf8': 3.0.0 + tslib: 2.6.3 + transitivePeerDependencies: + - aws-crt + '@aws-sdk/client-sso@3.623.0': dependencies: '@aws-crypto/sha256-browser': 5.2.0 @@ -2834,6 +3268,49 @@ snapshots: transitivePeerDependencies: - aws-crt + '@aws-sdk/client-sso@3.716.0': + dependencies: + '@aws-crypto/sha256-browser': 5.2.0 + '@aws-crypto/sha256-js': 5.2.0 + '@aws-sdk/core': 3.716.0 + '@aws-sdk/middleware-host-header': 3.714.0 + '@aws-sdk/middleware-logger': 3.714.0 + '@aws-sdk/middleware-recursion-detection': 3.714.0 + '@aws-sdk/middleware-user-agent': 3.716.0 + '@aws-sdk/region-config-resolver': 3.714.0 + '@aws-sdk/types': 3.714.0 + '@aws-sdk/util-endpoints': 3.714.0 + '@aws-sdk/util-user-agent-browser': 3.714.0 + '@aws-sdk/util-user-agent-node': 3.716.0 + '@smithy/config-resolver': 3.0.13 + '@smithy/core': 2.5.5 + '@smithy/fetch-http-handler': 4.1.2 + '@smithy/hash-node': 3.0.11 + '@smithy/invalid-dependency': 3.0.11 + '@smithy/middleware-content-length': 3.0.13 + '@smithy/middleware-endpoint': 3.2.6 + '@smithy/middleware-retry': 3.0.31 + '@smithy/middleware-serde': 3.0.11 + '@smithy/middleware-stack': 3.0.11 + '@smithy/node-config-provider': 3.1.12 + '@smithy/node-http-handler': 3.3.2 + '@smithy/protocol-http': 4.1.8 + '@smithy/smithy-client': 3.5.1 + '@smithy/types': 3.7.2 + '@smithy/url-parser': 3.0.11 + '@smithy/util-base64': 3.0.0 + '@smithy/util-body-length-browser': 3.0.0 + '@smithy/util-body-length-node': 3.0.0 + '@smithy/util-defaults-mode-browser': 3.0.31 + '@smithy/util-defaults-mode-node': 3.0.31 + '@smithy/util-endpoints': 2.1.7 + '@smithy/util-middleware': 3.0.11 + '@smithy/util-retry': 3.0.11 + '@smithy/util-utf8': 3.0.0 + tslib: 2.6.3 + transitivePeerDependencies: + - aws-crt + '@aws-sdk/client-sts@3.623.0': dependencies: '@aws-crypto/sha256-browser': 5.2.0 @@ -2879,6 +3356,51 @@ snapshots: transitivePeerDependencies: - aws-crt + '@aws-sdk/client-sts@3.716.0': + dependencies: + '@aws-crypto/sha256-browser': 5.2.0 + '@aws-crypto/sha256-js': 5.2.0 + '@aws-sdk/client-sso-oidc': 3.716.0(@aws-sdk/client-sts@3.716.0) + '@aws-sdk/core': 3.716.0 + '@aws-sdk/credential-provider-node': 3.716.0(@aws-sdk/client-sso-oidc@3.716.0(@aws-sdk/client-sts@3.716.0))(@aws-sdk/client-sts@3.716.0) + '@aws-sdk/middleware-host-header': 3.714.0 + '@aws-sdk/middleware-logger': 3.714.0 + '@aws-sdk/middleware-recursion-detection': 3.714.0 + '@aws-sdk/middleware-user-agent': 3.716.0 + '@aws-sdk/region-config-resolver': 3.714.0 + '@aws-sdk/types': 3.714.0 + '@aws-sdk/util-endpoints': 3.714.0 + '@aws-sdk/util-user-agent-browser': 3.714.0 + '@aws-sdk/util-user-agent-node': 3.716.0 + '@smithy/config-resolver': 3.0.13 + '@smithy/core': 2.5.5 + '@smithy/fetch-http-handler': 4.1.2 + '@smithy/hash-node': 3.0.11 + '@smithy/invalid-dependency': 3.0.11 + '@smithy/middleware-content-length': 3.0.13 + '@smithy/middleware-endpoint': 3.2.6 + '@smithy/middleware-retry': 3.0.31 + '@smithy/middleware-serde': 3.0.11 + '@smithy/middleware-stack': 3.0.11 + '@smithy/node-config-provider': 3.1.12 + '@smithy/node-http-handler': 3.3.2 + '@smithy/protocol-http': 4.1.8 + '@smithy/smithy-client': 3.5.1 + '@smithy/types': 3.7.2 + '@smithy/url-parser': 3.0.11 + '@smithy/util-base64': 3.0.0 + '@smithy/util-body-length-browser': 3.0.0 + '@smithy/util-body-length-node': 3.0.0 + '@smithy/util-defaults-mode-browser': 3.0.31 + '@smithy/util-defaults-mode-node': 3.0.31 + '@smithy/util-endpoints': 2.1.7 + '@smithy/util-middleware': 3.0.11 + '@smithy/util-retry': 3.0.11 + '@smithy/util-utf8': 3.0.0 + tslib: 2.6.3 + transitivePeerDependencies: + - aws-crt + '@aws-sdk/core@3.623.0': dependencies: '@smithy/core': 2.3.2 @@ -2891,6 +3413,20 @@ snapshots: fast-xml-parser: 4.4.1 tslib: 2.6.3 + '@aws-sdk/core@3.716.0': + dependencies: + '@aws-sdk/types': 3.714.0 + '@smithy/core': 2.5.5 + '@smithy/node-config-provider': 3.1.12 + '@smithy/property-provider': 3.1.11 + '@smithy/protocol-http': 4.1.8 + '@smithy/signature-v4': 4.2.4 + '@smithy/smithy-client': 3.5.1 + '@smithy/types': 3.7.2 + '@smithy/util-middleware': 3.0.11 + fast-xml-parser: 4.4.1 + tslib: 2.6.3 + '@aws-sdk/credential-provider-env@3.620.1': dependencies: '@aws-sdk/types': 3.609.0 @@ -2898,6 +3434,14 @@ snapshots: '@smithy/types': 3.3.0 tslib: 2.6.3 + '@aws-sdk/credential-provider-env@3.716.0': + dependencies: + '@aws-sdk/core': 3.716.0 + '@aws-sdk/types': 3.714.0 + '@smithy/property-provider': 3.1.11 + '@smithy/types': 3.7.2 + tslib: 2.6.3 + '@aws-sdk/credential-provider-http@3.622.0': dependencies: '@aws-sdk/types': 3.609.0 @@ -2910,6 +3454,19 @@ snapshots: '@smithy/util-stream': 3.1.3 tslib: 2.6.3 + '@aws-sdk/credential-provider-http@3.716.0': + dependencies: + '@aws-sdk/core': 3.716.0 + '@aws-sdk/types': 3.714.0 + '@smithy/fetch-http-handler': 4.1.2 + '@smithy/node-http-handler': 3.3.2 + '@smithy/property-provider': 3.1.11 + '@smithy/protocol-http': 4.1.8 + '@smithy/smithy-client': 3.5.1 + '@smithy/types': 3.7.2 + '@smithy/util-stream': 3.3.2 + tslib: 2.6.3 + '@aws-sdk/credential-provider-ini@3.623.0(@aws-sdk/client-sso-oidc@3.623.0(@aws-sdk/client-sts@3.623.0))(@aws-sdk/client-sts@3.623.0)': dependencies: '@aws-sdk/client-sts': 3.623.0 @@ -2928,6 +3485,25 @@ snapshots: - '@aws-sdk/client-sso-oidc' - aws-crt + '@aws-sdk/credential-provider-ini@3.716.0(@aws-sdk/client-sso-oidc@3.716.0(@aws-sdk/client-sts@3.716.0))(@aws-sdk/client-sts@3.716.0)': + dependencies: + '@aws-sdk/client-sts': 3.716.0 + '@aws-sdk/core': 3.716.0 + '@aws-sdk/credential-provider-env': 3.716.0 + '@aws-sdk/credential-provider-http': 3.716.0 + '@aws-sdk/credential-provider-process': 3.716.0 + '@aws-sdk/credential-provider-sso': 3.716.0(@aws-sdk/client-sso-oidc@3.716.0(@aws-sdk/client-sts@3.716.0)) + '@aws-sdk/credential-provider-web-identity': 3.716.0(@aws-sdk/client-sts@3.716.0) + '@aws-sdk/types': 3.714.0 + '@smithy/credential-provider-imds': 3.2.8 + '@smithy/property-provider': 3.1.11 + '@smithy/shared-ini-file-loader': 3.1.12 + '@smithy/types': 3.7.2 + tslib: 2.6.3 + transitivePeerDependencies: + - '@aws-sdk/client-sso-oidc' + - aws-crt + '@aws-sdk/credential-provider-node@3.623.0(@aws-sdk/client-sso-oidc@3.623.0(@aws-sdk/client-sts@3.623.0))(@aws-sdk/client-sts@3.623.0)': dependencies: '@aws-sdk/credential-provider-env': 3.620.1 @@ -2947,6 +3523,25 @@ snapshots: - '@aws-sdk/client-sts' - aws-crt + '@aws-sdk/credential-provider-node@3.716.0(@aws-sdk/client-sso-oidc@3.716.0(@aws-sdk/client-sts@3.716.0))(@aws-sdk/client-sts@3.716.0)': + dependencies: + '@aws-sdk/credential-provider-env': 3.716.0 + '@aws-sdk/credential-provider-http': 3.716.0 + '@aws-sdk/credential-provider-ini': 3.716.0(@aws-sdk/client-sso-oidc@3.716.0(@aws-sdk/client-sts@3.716.0))(@aws-sdk/client-sts@3.716.0) + '@aws-sdk/credential-provider-process': 3.716.0 + '@aws-sdk/credential-provider-sso': 3.716.0(@aws-sdk/client-sso-oidc@3.716.0(@aws-sdk/client-sts@3.716.0)) + '@aws-sdk/credential-provider-web-identity': 3.716.0(@aws-sdk/client-sts@3.716.0) + '@aws-sdk/types': 3.714.0 + '@smithy/credential-provider-imds': 3.2.8 + '@smithy/property-provider': 3.1.11 + '@smithy/shared-ini-file-loader': 3.1.12 + '@smithy/types': 3.7.2 + tslib: 2.6.3 + transitivePeerDependencies: + - '@aws-sdk/client-sso-oidc' + - '@aws-sdk/client-sts' + - aws-crt + '@aws-sdk/credential-provider-process@3.620.1': dependencies: '@aws-sdk/types': 3.609.0 @@ -2955,6 +3550,15 @@ snapshots: '@smithy/types': 3.3.0 tslib: 2.6.3 + '@aws-sdk/credential-provider-process@3.716.0': + dependencies: + '@aws-sdk/core': 3.716.0 + '@aws-sdk/types': 3.714.0 + '@smithy/property-provider': 3.1.11 + '@smithy/shared-ini-file-loader': 3.1.12 + '@smithy/types': 3.7.2 + tslib: 2.6.3 + '@aws-sdk/credential-provider-sso@3.623.0(@aws-sdk/client-sso-oidc@3.623.0(@aws-sdk/client-sts@3.623.0))': dependencies: '@aws-sdk/client-sso': 3.623.0 @@ -2968,6 +3572,20 @@ snapshots: - '@aws-sdk/client-sso-oidc' - aws-crt + '@aws-sdk/credential-provider-sso@3.716.0(@aws-sdk/client-sso-oidc@3.716.0(@aws-sdk/client-sts@3.716.0))': + dependencies: + '@aws-sdk/client-sso': 3.716.0 + '@aws-sdk/core': 3.716.0 + '@aws-sdk/token-providers': 3.714.0(@aws-sdk/client-sso-oidc@3.716.0(@aws-sdk/client-sts@3.716.0)) + '@aws-sdk/types': 3.714.0 + '@smithy/property-provider': 3.1.11 + '@smithy/shared-ini-file-loader': 3.1.12 + '@smithy/types': 3.7.2 + tslib: 2.6.3 + transitivePeerDependencies: + - '@aws-sdk/client-sso-oidc' + - aws-crt + '@aws-sdk/credential-provider-web-identity@3.621.0(@aws-sdk/client-sts@3.623.0)': dependencies: '@aws-sdk/client-sts': 3.623.0 @@ -2976,6 +3594,48 @@ snapshots: '@smithy/types': 3.3.0 tslib: 2.6.3 + '@aws-sdk/credential-provider-web-identity@3.716.0(@aws-sdk/client-sts@3.716.0)': + dependencies: + '@aws-sdk/client-sts': 3.716.0 + '@aws-sdk/core': 3.716.0 + '@aws-sdk/types': 3.714.0 + '@smithy/property-provider': 3.1.11 + '@smithy/types': 3.7.2 + tslib: 2.6.3 + + '@aws-sdk/middleware-bucket-endpoint@3.714.0': + dependencies: + '@aws-sdk/types': 3.714.0 + '@aws-sdk/util-arn-parser': 3.693.0 + '@smithy/node-config-provider': 3.1.12 + '@smithy/protocol-http': 4.1.8 + '@smithy/types': 3.7.2 + '@smithy/util-config-provider': 3.0.0 + tslib: 2.6.3 + + '@aws-sdk/middleware-expect-continue@3.714.0': + dependencies: + '@aws-sdk/types': 3.714.0 + '@smithy/protocol-http': 4.1.8 + '@smithy/types': 3.7.2 + tslib: 2.6.3 + + '@aws-sdk/middleware-flexible-checksums@3.717.0': + dependencies: + '@aws-crypto/crc32': 5.2.0 + '@aws-crypto/crc32c': 5.2.0 + '@aws-crypto/util': 5.2.0 + '@aws-sdk/core': 3.716.0 + '@aws-sdk/types': 3.714.0 + '@smithy/is-array-buffer': 3.0.0 + '@smithy/node-config-provider': 3.1.12 + '@smithy/protocol-http': 4.1.8 + '@smithy/types': 3.7.2 + '@smithy/util-middleware': 3.0.11 + '@smithy/util-stream': 3.3.2 + '@smithy/util-utf8': 3.0.0 + tslib: 2.6.3 + '@aws-sdk/middleware-host-header@3.620.0': dependencies: '@aws-sdk/types': 3.609.0 @@ -2983,12 +3643,31 @@ snapshots: '@smithy/types': 3.3.0 tslib: 2.6.3 + '@aws-sdk/middleware-host-header@3.714.0': + dependencies: + '@aws-sdk/types': 3.714.0 + '@smithy/protocol-http': 4.1.8 + '@smithy/types': 3.7.2 + tslib: 2.6.3 + + '@aws-sdk/middleware-location-constraint@3.714.0': + dependencies: + '@aws-sdk/types': 3.714.0 + '@smithy/types': 3.7.2 + tslib: 2.6.3 + '@aws-sdk/middleware-logger@3.609.0': dependencies: '@aws-sdk/types': 3.609.0 '@smithy/types': 3.3.0 tslib: 2.6.3 + '@aws-sdk/middleware-logger@3.714.0': + dependencies: + '@aws-sdk/types': 3.714.0 + '@smithy/types': 3.7.2 + tslib: 2.6.3 + '@aws-sdk/middleware-recursion-detection@3.620.0': dependencies: '@aws-sdk/types': 3.609.0 @@ -2996,6 +3675,36 @@ snapshots: '@smithy/types': 3.3.0 tslib: 2.6.3 + '@aws-sdk/middleware-recursion-detection@3.714.0': + dependencies: + '@aws-sdk/types': 3.714.0 + '@smithy/protocol-http': 4.1.8 + '@smithy/types': 3.7.2 + tslib: 2.6.3 + + '@aws-sdk/middleware-sdk-s3@3.716.0': + dependencies: + '@aws-sdk/core': 3.716.0 + '@aws-sdk/types': 3.714.0 + '@aws-sdk/util-arn-parser': 3.693.0 + '@smithy/core': 2.5.5 + '@smithy/node-config-provider': 3.1.12 + '@smithy/protocol-http': 4.1.8 + '@smithy/signature-v4': 4.2.4 + '@smithy/smithy-client': 3.5.1 + '@smithy/types': 3.7.2 + '@smithy/util-config-provider': 3.0.0 + '@smithy/util-middleware': 3.0.11 + '@smithy/util-stream': 3.3.2 + '@smithy/util-utf8': 3.0.0 + tslib: 2.6.3 + + '@aws-sdk/middleware-ssec@3.714.0': + dependencies: + '@aws-sdk/types': 3.714.0 + '@smithy/types': 3.7.2 + tslib: 2.6.3 + '@aws-sdk/middleware-user-agent@3.620.0': dependencies: '@aws-sdk/types': 3.609.0 @@ -3004,6 +3713,16 @@ snapshots: '@smithy/types': 3.3.0 tslib: 2.6.3 + '@aws-sdk/middleware-user-agent@3.716.0': + dependencies: + '@aws-sdk/core': 3.716.0 + '@aws-sdk/types': 3.714.0 + '@aws-sdk/util-endpoints': 3.714.0 + '@smithy/core': 2.5.5 + '@smithy/protocol-http': 4.1.8 + '@smithy/types': 3.7.2 + tslib: 2.6.3 + '@aws-sdk/region-config-resolver@3.614.0': dependencies: '@aws-sdk/types': 3.609.0 @@ -3013,6 +3732,24 @@ snapshots: '@smithy/util-middleware': 3.0.3 tslib: 2.6.3 + '@aws-sdk/region-config-resolver@3.714.0': + dependencies: + '@aws-sdk/types': 3.714.0 + '@smithy/node-config-provider': 3.1.12 + '@smithy/types': 3.7.2 + '@smithy/util-config-provider': 3.0.0 + '@smithy/util-middleware': 3.0.11 + tslib: 2.6.3 + + '@aws-sdk/signature-v4-multi-region@3.716.0': + dependencies: + '@aws-sdk/middleware-sdk-s3': 3.716.0 + '@aws-sdk/types': 3.714.0 + '@smithy/protocol-http': 4.1.8 + '@smithy/signature-v4': 4.2.4 + '@smithy/types': 3.7.2 + tslib: 2.6.3 + '@aws-sdk/token-providers@3.614.0(@aws-sdk/client-sso-oidc@3.623.0(@aws-sdk/client-sts@3.623.0))': dependencies: '@aws-sdk/client-sso-oidc': 3.623.0(@aws-sdk/client-sts@3.623.0) @@ -3022,11 +3759,29 @@ snapshots: '@smithy/types': 3.3.0 tslib: 2.6.3 + '@aws-sdk/token-providers@3.714.0(@aws-sdk/client-sso-oidc@3.716.0(@aws-sdk/client-sts@3.716.0))': + dependencies: + '@aws-sdk/client-sso-oidc': 3.716.0(@aws-sdk/client-sts@3.716.0) + '@aws-sdk/types': 3.714.0 + '@smithy/property-provider': 3.1.11 + '@smithy/shared-ini-file-loader': 3.1.12 + '@smithy/types': 3.7.2 + tslib: 2.6.3 + '@aws-sdk/types@3.609.0': dependencies: '@smithy/types': 3.3.0 tslib: 2.6.3 + '@aws-sdk/types@3.714.0': + dependencies: + '@smithy/types': 3.7.2 + tslib: 2.6.3 + + '@aws-sdk/util-arn-parser@3.693.0': + dependencies: + tslib: 2.6.3 + '@aws-sdk/util-endpoints@3.614.0': dependencies: '@aws-sdk/types': 3.609.0 @@ -3034,6 +3789,13 @@ snapshots: '@smithy/util-endpoints': 2.0.5 tslib: 2.6.3 + '@aws-sdk/util-endpoints@3.714.0': + dependencies: + '@aws-sdk/types': 3.714.0 + '@smithy/types': 3.7.2 + '@smithy/util-endpoints': 2.1.7 + tslib: 2.6.3 + '@aws-sdk/util-locate-window@3.568.0': dependencies: tslib: 2.6.3 @@ -3045,6 +3807,13 @@ snapshots: bowser: 2.11.0 tslib: 2.6.3 + '@aws-sdk/util-user-agent-browser@3.714.0': + dependencies: + '@aws-sdk/types': 3.714.0 + '@smithy/types': 3.7.2 + bowser: 2.11.0 + tslib: 2.6.3 + '@aws-sdk/util-user-agent-node@3.614.0': dependencies: '@aws-sdk/types': 3.609.0 @@ -3052,6 +3821,19 @@ snapshots: '@smithy/types': 3.3.0 tslib: 2.6.3 + '@aws-sdk/util-user-agent-node@3.716.0': + dependencies: + '@aws-sdk/middleware-user-agent': 3.716.0 + '@aws-sdk/types': 3.714.0 + '@smithy/node-config-provider': 3.1.12 + '@smithy/types': 3.7.2 + tslib: 2.6.3 + + '@aws-sdk/xml-builder@3.709.0': + dependencies: + '@smithy/types': 3.7.2 + tslib: 2.6.3 + '@balena/dockerignore@1.0.2': {} '@bcoe/v8-coverage@0.2.3': {} @@ -3508,6 +4290,28 @@ snapshots: '@smithy/types': 3.3.0 tslib: 2.6.3 + '@smithy/abort-controller@3.1.9': + dependencies: + '@smithy/types': 3.7.2 + tslib: 2.6.3 + + '@smithy/chunked-blob-reader-native@3.0.1': + dependencies: + '@smithy/util-base64': 3.0.0 + tslib: 2.6.3 + + '@smithy/chunked-blob-reader@4.0.0': + dependencies: + tslib: 2.6.3 + + '@smithy/config-resolver@3.0.13': + dependencies: + '@smithy/node-config-provider': 3.1.12 + '@smithy/types': 3.7.2 + '@smithy/util-config-provider': 3.0.0 + '@smithy/util-middleware': 3.0.11 + tslib: 2.6.3 + '@smithy/config-resolver@3.0.5': dependencies: '@smithy/node-config-provider': 3.1.4 @@ -3527,6 +4331,17 @@ snapshots: '@smithy/util-middleware': 3.0.3 tslib: 2.6.3 + '@smithy/core@2.5.5': + dependencies: + '@smithy/middleware-serde': 3.0.11 + '@smithy/protocol-http': 4.1.8 + '@smithy/types': 3.7.2 + '@smithy/util-body-length-browser': 3.0.0 + '@smithy/util-middleware': 3.0.11 + '@smithy/util-stream': 3.3.2 + '@smithy/util-utf8': 3.0.0 + tslib: 2.6.3 + '@smithy/credential-provider-imds@3.2.0': dependencies: '@smithy/node-config-provider': 3.1.4 @@ -3535,6 +4350,44 @@ snapshots: '@smithy/url-parser': 3.0.3 tslib: 2.6.3 + '@smithy/credential-provider-imds@3.2.8': + dependencies: + '@smithy/node-config-provider': 3.1.12 + '@smithy/property-provider': 3.1.11 + '@smithy/types': 3.7.2 + '@smithy/url-parser': 3.0.11 + tslib: 2.6.3 + + '@smithy/eventstream-codec@3.1.10': + dependencies: + '@aws-crypto/crc32': 5.2.0 + '@smithy/types': 3.7.2 + '@smithy/util-hex-encoding': 3.0.0 + tslib: 2.6.3 + + '@smithy/eventstream-serde-browser@3.0.14': + dependencies: + '@smithy/eventstream-serde-universal': 3.0.13 + '@smithy/types': 3.7.2 + tslib: 2.6.3 + + '@smithy/eventstream-serde-config-resolver@3.0.11': + dependencies: + '@smithy/types': 3.7.2 + tslib: 2.6.3 + + '@smithy/eventstream-serde-node@3.0.13': + dependencies: + '@smithy/eventstream-serde-universal': 3.0.13 + '@smithy/types': 3.7.2 + tslib: 2.6.3 + + '@smithy/eventstream-serde-universal@3.0.13': + dependencies: + '@smithy/eventstream-codec': 3.1.10 + '@smithy/types': 3.7.2 + tslib: 2.6.3 + '@smithy/fetch-http-handler@3.2.4': dependencies: '@smithy/protocol-http': 4.1.0 @@ -3543,6 +4396,28 @@ snapshots: '@smithy/util-base64': 3.0.0 tslib: 2.6.3 + '@smithy/fetch-http-handler@4.1.2': + dependencies: + '@smithy/protocol-http': 4.1.8 + '@smithy/querystring-builder': 3.0.11 + '@smithy/types': 3.7.2 + '@smithy/util-base64': 3.0.0 + tslib: 2.6.3 + + '@smithy/hash-blob-browser@3.1.10': + dependencies: + '@smithy/chunked-blob-reader': 4.0.0 + '@smithy/chunked-blob-reader-native': 3.0.1 + '@smithy/types': 3.7.2 + tslib: 2.6.3 + + '@smithy/hash-node@3.0.11': + dependencies: + '@smithy/types': 3.7.2 + '@smithy/util-buffer-from': 3.0.0 + '@smithy/util-utf8': 3.0.0 + tslib: 2.6.3 + '@smithy/hash-node@3.0.3': dependencies: '@smithy/types': 3.3.0 @@ -3550,6 +4425,17 @@ snapshots: '@smithy/util-utf8': 3.0.0 tslib: 2.6.3 + '@smithy/hash-stream-node@3.1.10': + dependencies: + '@smithy/types': 3.7.2 + '@smithy/util-utf8': 3.0.0 + tslib: 2.6.3 + + '@smithy/invalid-dependency@3.0.11': + dependencies: + '@smithy/types': 3.7.2 + tslib: 2.6.3 + '@smithy/invalid-dependency@3.0.3': dependencies: '@smithy/types': 3.3.0 @@ -3563,6 +4449,18 @@ snapshots: dependencies: tslib: 2.6.3 + '@smithy/md5-js@3.0.11': + dependencies: + '@smithy/types': 3.7.2 + '@smithy/util-utf8': 3.0.0 + tslib: 2.6.3 + + '@smithy/middleware-content-length@3.0.13': + dependencies: + '@smithy/protocol-http': 4.1.8 + '@smithy/types': 3.7.2 + tslib: 2.6.3 + '@smithy/middleware-content-length@3.0.5': dependencies: '@smithy/protocol-http': 4.1.0 @@ -3579,6 +4477,17 @@ snapshots: '@smithy/util-middleware': 3.0.3 tslib: 2.6.3 + '@smithy/middleware-endpoint@3.2.6': + dependencies: + '@smithy/core': 2.5.5 + '@smithy/middleware-serde': 3.0.11 + '@smithy/node-config-provider': 3.1.12 + '@smithy/shared-ini-file-loader': 3.1.12 + '@smithy/types': 3.7.2 + '@smithy/url-parser': 3.0.11 + '@smithy/util-middleware': 3.0.11 + tslib: 2.6.3 + '@smithy/middleware-retry@3.0.14': dependencies: '@smithy/node-config-provider': 3.1.4 @@ -3591,16 +4500,45 @@ snapshots: tslib: 2.6.3 uuid: 9.0.1 + '@smithy/middleware-retry@3.0.31': + dependencies: + '@smithy/node-config-provider': 3.1.12 + '@smithy/protocol-http': 4.1.8 + '@smithy/service-error-classification': 3.0.11 + '@smithy/smithy-client': 3.5.1 + '@smithy/types': 3.7.2 + '@smithy/util-middleware': 3.0.11 + '@smithy/util-retry': 3.0.11 + tslib: 2.6.3 + uuid: 9.0.1 + + '@smithy/middleware-serde@3.0.11': + dependencies: + '@smithy/types': 3.7.2 + tslib: 2.6.3 + '@smithy/middleware-serde@3.0.3': dependencies: '@smithy/types': 3.3.0 tslib: 2.6.3 + '@smithy/middleware-stack@3.0.11': + dependencies: + '@smithy/types': 3.7.2 + tslib: 2.6.3 + '@smithy/middleware-stack@3.0.3': dependencies: '@smithy/types': 3.3.0 tslib: 2.6.3 + '@smithy/node-config-provider@3.1.12': + dependencies: + '@smithy/property-provider': 3.1.11 + '@smithy/shared-ini-file-loader': 3.1.12 + '@smithy/types': 3.7.2 + tslib: 2.6.3 + '@smithy/node-config-provider@3.1.4': dependencies: '@smithy/property-provider': 3.1.3 @@ -3616,6 +4554,19 @@ snapshots: '@smithy/types': 3.3.0 tslib: 2.6.3 + '@smithy/node-http-handler@3.3.2': + dependencies: + '@smithy/abort-controller': 3.1.9 + '@smithy/protocol-http': 4.1.8 + '@smithy/querystring-builder': 3.0.11 + '@smithy/types': 3.7.2 + tslib: 2.6.3 + + '@smithy/property-provider@3.1.11': + dependencies: + '@smithy/types': 3.7.2 + tslib: 2.6.3 + '@smithy/property-provider@3.1.3': dependencies: '@smithy/types': 3.3.0 @@ -3626,21 +4577,46 @@ snapshots: '@smithy/types': 3.3.0 tslib: 2.6.3 + '@smithy/protocol-http@4.1.8': + dependencies: + '@smithy/types': 3.7.2 + tslib: 2.6.3 + + '@smithy/querystring-builder@3.0.11': + dependencies: + '@smithy/types': 3.7.2 + '@smithy/util-uri-escape': 3.0.0 + tslib: 2.6.3 + '@smithy/querystring-builder@3.0.3': dependencies: '@smithy/types': 3.3.0 '@smithy/util-uri-escape': 3.0.0 tslib: 2.6.3 + '@smithy/querystring-parser@3.0.11': + dependencies: + '@smithy/types': 3.7.2 + tslib: 2.6.3 + '@smithy/querystring-parser@3.0.3': dependencies: '@smithy/types': 3.3.0 tslib: 2.6.3 + '@smithy/service-error-classification@3.0.11': + dependencies: + '@smithy/types': 3.7.2 + '@smithy/service-error-classification@3.0.3': dependencies: '@smithy/types': 3.3.0 + '@smithy/shared-ini-file-loader@3.1.12': + dependencies: + '@smithy/types': 3.7.2 + tslib: 2.6.3 + '@smithy/shared-ini-file-loader@3.1.4': dependencies: '@smithy/types': 3.3.0 @@ -3657,6 +4633,17 @@ snapshots: '@smithy/util-utf8': 3.0.0 tslib: 2.6.3 + '@smithy/signature-v4@4.2.4': + dependencies: + '@smithy/is-array-buffer': 3.0.0 + '@smithy/protocol-http': 4.1.8 + '@smithy/types': 3.7.2 + '@smithy/util-hex-encoding': 3.0.0 + '@smithy/util-middleware': 3.0.11 + '@smithy/util-uri-escape': 3.0.0 + '@smithy/util-utf8': 3.0.0 + tslib: 2.6.3 + '@smithy/smithy-client@3.1.12': dependencies: '@smithy/middleware-endpoint': 3.1.0 @@ -3666,10 +4653,30 @@ snapshots: '@smithy/util-stream': 3.1.3 tslib: 2.6.3 + '@smithy/smithy-client@3.5.1': + dependencies: + '@smithy/core': 2.5.5 + '@smithy/middleware-endpoint': 3.2.6 + '@smithy/middleware-stack': 3.0.11 + '@smithy/protocol-http': 4.1.8 + '@smithy/types': 3.7.2 + '@smithy/util-stream': 3.3.2 + tslib: 2.6.3 + '@smithy/types@3.3.0': dependencies: tslib: 2.6.3 + '@smithy/types@3.7.2': + dependencies: + tslib: 2.6.3 + + '@smithy/url-parser@3.0.11': + dependencies: + '@smithy/querystring-parser': 3.0.11 + '@smithy/types': 3.7.2 + tslib: 2.6.3 + '@smithy/url-parser@3.0.3': dependencies: '@smithy/querystring-parser': 3.0.3 @@ -3712,6 +4719,14 @@ snapshots: bowser: 2.11.0 tslib: 2.6.3 + '@smithy/util-defaults-mode-browser@3.0.31': + dependencies: + '@smithy/property-provider': 3.1.11 + '@smithy/smithy-client': 3.5.1 + '@smithy/types': 3.7.2 + bowser: 2.11.0 + tslib: 2.6.3 + '@smithy/util-defaults-mode-node@3.0.14': dependencies: '@smithy/config-resolver': 3.0.5 @@ -3722,21 +4737,48 @@ snapshots: '@smithy/types': 3.3.0 tslib: 2.6.3 + '@smithy/util-defaults-mode-node@3.0.31': + dependencies: + '@smithy/config-resolver': 3.0.13 + '@smithy/credential-provider-imds': 3.2.8 + '@smithy/node-config-provider': 3.1.12 + '@smithy/property-provider': 3.1.11 + '@smithy/smithy-client': 3.5.1 + '@smithy/types': 3.7.2 + tslib: 2.6.3 + '@smithy/util-endpoints@2.0.5': dependencies: '@smithy/node-config-provider': 3.1.4 '@smithy/types': 3.3.0 tslib: 2.6.3 + '@smithy/util-endpoints@2.1.7': + dependencies: + '@smithy/node-config-provider': 3.1.12 + '@smithy/types': 3.7.2 + tslib: 2.6.3 + '@smithy/util-hex-encoding@3.0.0': dependencies: tslib: 2.6.3 + '@smithy/util-middleware@3.0.11': + dependencies: + '@smithy/types': 3.7.2 + tslib: 2.6.3 + '@smithy/util-middleware@3.0.3': dependencies: '@smithy/types': 3.3.0 tslib: 2.6.3 + '@smithy/util-retry@3.0.11': + dependencies: + '@smithy/service-error-classification': 3.0.11 + '@smithy/types': 3.7.2 + tslib: 2.6.3 + '@smithy/util-retry@3.0.3': dependencies: '@smithy/service-error-classification': 3.0.3 @@ -3754,6 +4796,17 @@ snapshots: '@smithy/util-utf8': 3.0.0 tslib: 2.6.3 + '@smithy/util-stream@3.3.2': + dependencies: + '@smithy/fetch-http-handler': 4.1.2 + '@smithy/node-http-handler': 3.3.2 + '@smithy/types': 3.7.2 + '@smithy/util-base64': 3.0.0 + '@smithy/util-buffer-from': 3.0.0 + '@smithy/util-hex-encoding': 3.0.0 + '@smithy/util-utf8': 3.0.0 + tslib: 2.6.3 + '@smithy/util-uri-escape@3.0.0': dependencies: tslib: 2.6.3 @@ -3774,6 +4827,12 @@ snapshots: '@smithy/types': 3.3.0 tslib: 2.6.3 + '@smithy/util-waiter@3.2.0': + dependencies: + '@smithy/abort-controller': 3.1.9 + '@smithy/types': 3.7.2 + tslib: 2.6.3 + '@total-typescript/ts-reset@0.5.1': {} '@types/docker-modem@3.0.6': From 7db66950d66c510a170447dc682cb0390aa506b6 Mon Sep 17 00:00:00 2001 From: Joabesv Date: Mon, 23 Dec 2024 14:28:33 -0300 Subject: [PATCH 2/5] feat: processing logs locally --- apps/core/src/plugins/external/config.ts | 1 + apps/core/src/queue/jobs/logs.job.ts | 94 ++++++++++++++++-------- apps/core/src/server.ts | 5 ++ 3 files changed, 70 insertions(+), 30 deletions(-) diff --git a/apps/core/src/plugins/external/config.ts b/apps/core/src/plugins/external/config.ts index 7d0543aa..df136f78 100644 --- a/apps/core/src/plugins/external/config.ts +++ b/apps/core/src/plugins/external/config.ts @@ -26,6 +26,7 @@ const configSchema = z.object({ AWS_REGION: z.string(), AWS_ACCESS_KEY_ID: z.string(), AWS_SECRET_ACCESS_KEY: z.string(), + AWS_LOGS_BUCKET: z.string().optional(), OAUTH_GOOGLE_CLIENT_ID: z.string(), OAUTH_GOOGLE_SECRET: z.string().min(16), BACKOFFICE_EMAILS: z diff --git a/apps/core/src/queue/jobs/logs.job.ts b/apps/core/src/queue/jobs/logs.job.ts index 0de6f6e3..254d3f20 100644 --- a/apps/core/src/queue/jobs/logs.job.ts +++ b/apps/core/src/queue/jobs/logs.job.ts @@ -1,50 +1,84 @@ -import { readdir, readFile, unlink } from 'node:fs/promises'; -import type { QueueContext } from '../types.js'; +import { PutObjectCommand } from '@aws-sdk/client-s3'; +import { + mkdir, + readdir, + readFile, + rename, + stat, + unlink, +} from 'node:fs/promises'; import { join } from 'node:path'; import { s3Client } from '@/lib/aws.service.js'; -import { PutObjectCommand } from '@aws-sdk/client-s3'; +import type { QueueContext } from '../types.js'; +import { existsSync } from 'node:fs'; type S3UploadJob = { - folderPath: string; - bucket: string; + bucket?: string; + localOnly?: boolean; + retentionDays?: number; }; +const LOGS_DIR = join(process.cwd(), 'logs'); +const ARCHIVE_DIR = join(LOGS_DIR, 'archive'); + export async function uploadLogsToS3(ctx: QueueContext) { const { - data: { folderPath, bucket }, + data: { bucket, localOnly = false, retentionDays = 7 }, } = ctx.job; try { - const files = await readdir(folderPath); - const logFiles = files.filter((file) => file.startsWith('app-')); + ctx.app.log.info('init logs processing'); + if (!existsSync(LOGS_DIR)) { + ctx.app.log.warn('No logs directory found, skipping...'); + return; + } + if (!existsSync(ARCHIVE_DIR)) { + await mkdir(ARCHIVE_DIR, { recursive: true }); + } + const files = await readdir(LOGS_DIR); + const logFiles = files.filter( + (file) => file.startsWith('app-') && !file.includes('archive'), + ); for (const file of logFiles) { - const filePath = join(folderPath, file); - const fileContent = await readFile(filePath); - - await s3Client.send( - new PutObjectCommand({ - Bucket: bucket, - Key: `logs/${file}`, - Body: fileContent, - }), - ); - - // delete after upload - await unlink(filePath); - - ctx.app.log.debug({ - msg: 'Log file uploaded to S3', - file, - bucket, - }); + const filePath = join(LOGS_DIR, file); + const stats = await stat(filePath); + const dayOld = Date.now() - stats.mtime.getTime() > 24 * 60 * 60 * 1000; + + if (!dayOld) continue; + + if (!localOnly) { + const fileContent = await readFile(filePath); + await s3Client.send( + new PutObjectCommand({ + Bucket: bucket, + Key: `logs/${file}`, + Body: fileContent, + }), + ); + ctx.app.log.debug(`Uploaded to S3: ${file}`); + } + + // Move to archive + const archivePath = join(ARCHIVE_DIR, file); + await rename(filePath, archivePath); + ctx.app.log.debug(`Archived: ${file}`); + + // Clean old archives + const archiveStats = await stat(archivePath); + const isOld = + Date.now() - archiveStats.mtime.getTime() > + retentionDays * 24 * 60 * 60 * 1000; + + if (isOld) { + await unlink(archivePath); + ctx.app.log.debug(`Deleted old archive: ${file}`); + } } } catch (error) { ctx.app.log.error({ - msg: 'Error uploading logs to S3', + msg: 'Error managing log files', error: error instanceof Error ? error.message : String(error), - folderPath, - bucket, }); throw error; } diff --git a/apps/core/src/server.ts b/apps/core/src/server.ts index bb40fc50..58525b7d 100644 --- a/apps/core/src/server.ts +++ b/apps/core/src/server.ts @@ -18,6 +18,11 @@ export async function start() { app.job.schedule('EnrolledSync'); app.job.schedule('ComponentsSync'); + app.job.schedule('LogsUpload', { + bucket: app.config.AWS_LOGS_BUCKET, + localOnly: app.config.NODE_ENV === 'dev', + retentionDays: 7, + }); gracefullyShutdown({ delay: 500 }, async ({ err, signal }) => { if (err) { From 2bc92ce2cc90fa6d8123fb7b508d7dee649f23cb Mon Sep 17 00:00:00 2001 From: Joabesv Date: Mon, 23 Dec 2024 20:32:15 -0300 Subject: [PATCH 3/5] archive logs --- apps/core/src/queue/jobs/logs.job.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/apps/core/src/queue/jobs/logs.job.ts b/apps/core/src/queue/jobs/logs.job.ts index 254d3f20..08c70c83 100644 --- a/apps/core/src/queue/jobs/logs.job.ts +++ b/apps/core/src/queue/jobs/logs.job.ts @@ -1,4 +1,4 @@ -import { PutObjectCommand } from '@aws-sdk/client-s3'; +import { ListObjectsCommand, PutObjectCommand } from '@aws-sdk/client-s3'; import { mkdir, readdir, @@ -45,7 +45,9 @@ export async function uploadLogsToS3(ctx: QueueContext) { const stats = await stat(filePath); const dayOld = Date.now() - stats.mtime.getTime() > 24 * 60 * 60 * 1000; - if (!dayOld) continue; + if (!dayOld) { + continue; + } if (!localOnly) { const fileContent = await readFile(filePath); @@ -56,13 +58,13 @@ export async function uploadLogsToS3(ctx: QueueContext) { Body: fileContent, }), ); - ctx.app.log.debug(`Uploaded to S3: ${file}`); + ctx.app.log.info(`Uploaded to S3: ${file}`); } // Move to archive const archivePath = join(ARCHIVE_DIR, file); await rename(filePath, archivePath); - ctx.app.log.debug(`Archived: ${file}`); + ctx.app.log.info(`Archived: ${file}`); // Clean old archives const archiveStats = await stat(archivePath); @@ -72,7 +74,7 @@ export async function uploadLogsToS3(ctx: QueueContext) { if (isOld) { await unlink(archivePath); - ctx.app.log.debug(`Deleted old archive: ${file}`); + ctx.app.log.info(`Deleted old archive: ${file}`); } } } catch (error) { From 8c025025f065b7055535f51535244fe1938a0b82 Mon Sep 17 00:00:00 2001 From: Joabesv Date: Mon, 23 Dec 2024 20:46:07 -0300 Subject: [PATCH 4/5] remove unused method --- apps/core/src/queue/jobs/logs.job.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/core/src/queue/jobs/logs.job.ts b/apps/core/src/queue/jobs/logs.job.ts index 08c70c83..0915c6e3 100644 --- a/apps/core/src/queue/jobs/logs.job.ts +++ b/apps/core/src/queue/jobs/logs.job.ts @@ -1,4 +1,4 @@ -import { ListObjectsCommand, PutObjectCommand } from '@aws-sdk/client-s3'; +import { PutObjectCommand } from '@aws-sdk/client-s3'; import { mkdir, readdir, From b06b798d0c65a017e68b4b900afb919752682734 Mon Sep 17 00:00:00 2001 From: Joabesv Date: Mon, 23 Dec 2024 20:48:50 -0300 Subject: [PATCH 5/5] ci: remove unused methods --- .github/workflows/ci.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd6b2295..797e125e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,10 +11,6 @@ jobs: ci: name: ๐Ÿ”„ CI Workflow runs-on: [ubuntu-latest] - strategy: - matrix: - mongodb_version: ['6.0'] - redis-version: [7.2.4] env: TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} TURBO_TEAM: ${{ vars.TURBO_TEAM }} @@ -37,13 +33,7 @@ jobs: key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | ${{ runner.os }}-pnpm-store- - - uses: supercharge/mongodb-github-action@1.11.0 - with: - mongodb-version: ${{ matrix.mongodb_version }} - - uses: supercharge/redis-github-action@1.8.0 - with: - redis-version: ${{ matrix.redis-version }} - + - name: ๐Ÿ“ฆ Install dependencies run: pnpm i @@ -56,7 +46,7 @@ jobs: - name: ๐Ÿ’ผ Type Check run: pnpm tsc - - name: ๐Ÿงช Test - env: - CI: true - run: pnpm test + # - name: ๐Ÿงช Test + # env: + # CI: true + # run: pnpm test