From 383fdce9f7b5294b5ed797680f07d23c592acaaa Mon Sep 17 00:00:00 2001 From: Aswin Ashar Abdullah Date: Thu, 1 Aug 2024 14:36:20 +0700 Subject: [PATCH] feat(pdf) checkpoint pdf --- package.json | 1 + src/app.module.ts | 2 + .../export/domain/helpers/pdf-make.helper.ts | 44 ++ .../helpers/invoice-mapping.helper.ts | 243 ++++++++++ .../domain/templates/invoice-old.template.ts | 426 ++++++++++++++++++ .../domain/templates/invoice.template.ts | 191 ++++++++ .../configuration/export/export.module.ts | 10 + .../infrastructure/export.controller.ts | 17 + .../download-invoice-transaction.manager.ts | 43 ++ .../transaction/transaction.module.ts | 2 + yarn.lock | 202 ++++++++- 11 files changed, 1177 insertions(+), 4 deletions(-) create mode 100644 src/modules/configuration/export/domain/helpers/pdf-make.helper.ts create mode 100644 src/modules/configuration/export/domain/templates/helpers/invoice-mapping.helper.ts create mode 100644 src/modules/configuration/export/domain/templates/invoice-old.template.ts create mode 100644 src/modules/configuration/export/domain/templates/invoice.template.ts create mode 100644 src/modules/configuration/export/export.module.ts create mode 100644 src/modules/configuration/export/infrastructure/export.controller.ts create mode 100644 src/modules/transaction/transaction/domain/usecases/managers/download-invoice-transaction.manager.ts diff --git a/package.json b/package.json index eeee924..b20c84e 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "moment": "^2.30.1", "nano": "^10.1.3", "nodemailer": "^6.9.14", + "pdfmake": "^0.2.10", "pg": "^8.11.5", "plop": "^4.0.1", "reflect-metadata": "^0.2.0", diff --git a/src/app.module.ts b/src/app.module.ts index 652dec6..a73ced2 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -69,6 +69,7 @@ import { NewsModel } from './modules/web-information/news/data/models/news.model import { BannerModule } from './modules/web-information/banner/banner.module'; import { BannerModel } from './modules/web-information/banner/data/models/banner.model'; import { MailModule } from './modules/configuration/mail/mail.module'; +import { ExportModule } from './modules/configuration/export/export.module'; import { PosLogModel } from './modules/configuration/log/data/models/pos-log.model'; @Module({ @@ -123,6 +124,7 @@ import { PosLogModel } from './modules/configuration/log/data/models/pos-log.mod CqrsModule, CouchModule, CronModule, + // ExportModule, GoogleCalendarModule, LogModule, MailModule, diff --git a/src/modules/configuration/export/domain/helpers/pdf-make.helper.ts b/src/modules/configuration/export/domain/helpers/pdf-make.helper.ts new file mode 100644 index 0000000..964db1b --- /dev/null +++ b/src/modules/configuration/export/domain/helpers/pdf-make.helper.ts @@ -0,0 +1,44 @@ +import * as fs from 'fs'; +import { InvoiceOldTempalte } from '../templates/invoice-old.template'; +const PdfPrinter = require('pdfmake'); + +export function PdfMaker(transaction) { + var fonts = { + Courier: { + normal: 'Courier', + bold: 'Courier-Bold', + italics: 'Courier-Oblique', + bolditalics: 'Courier-BoldOblique', + }, + Helvetica: { + normal: 'Helvetica', + bold: 'Helvetica-Bold', + italics: 'Helvetica-Oblique', + bolditalics: 'Helvetica-BoldOblique', + }, + Times: { + normal: 'Times-Roman', + bold: 'Times-Bold', + italics: 'Times-Italic', + bolditalics: 'Times-BoldItalic', + }, + Symbol: { + normal: 'Symbol', + }, + ZapfDingbats: { + normal: 'ZapfDingbats', + }, + }; + + var printer = new PdfPrinter(fonts); + + var docDefinition = InvoiceOldTempalte(transaction); + + var pdfDoc = printer.createPdfKitDocument(docDefinition); + pdfDoc.pipe( + fs.createWriteStream( + `uploads/invoice/${transaction.invoice_code.split('/').join('-')}.pdf`, + ), + ); + pdfDoc.end(); +} diff --git a/src/modules/configuration/export/domain/templates/helpers/invoice-mapping.helper.ts b/src/modules/configuration/export/domain/templates/helpers/invoice-mapping.helper.ts new file mode 100644 index 0000000..d008070 --- /dev/null +++ b/src/modules/configuration/export/domain/templates/helpers/invoice-mapping.helper.ts @@ -0,0 +1,243 @@ +import { TransactionEntity } from 'src/modules/transaction/transaction/domain/entities/transaction.entity'; + +export function mappingHeader() { + return [ + { + stack: [ + { + alignment: 'center', + columns: [ + { + width: 100, + image: 'data', + }, + { + width: 'auto', + text: 'have', + fontSize: 50, + bold: true, + color: '#169f54', + padding: [0, 0, 0, 0], + margin: [0, 0, 0, 0], + alignment: 'center', + }, + { + width: 'auto', + text: 'fun', + fontSize: 50, + bold: true, + color: '#61c4eb', + padding: [0, 0, 0, 0], + margin: [0, 0, 0, 0], + // alignment: "center" + }, + ], + }, + { + text: 'BOOKING DATE CHANGE', + fontSize: 30, + alignment: 'center', + }, + { + columns: [ + { + text: 'INV-20808/032', + }, + { + text: '10 Juli 2024', + alignment: 'right', + }, + ], + }, + ], + }, + { + width: 150, + text: 'Jl, Kolonel Masturi No.KM. 11, \n Kertawangi, Kec. Cisatua, \n Kab. Bandung Barat, \n Jawa Barat 40551 \n 0815-6380-8021', + // color: '#aaaaab', + // bold: true, + fontSize: 11, + margin: [0, 20, 0, 5], + }, + ]; +} + +export function mappingFooter() { + return [ + [ + { + text: 'we commits to prividing an educative, \n playful, and purposeful environment\n this is advantageous for all ages', + border: [false, true, false, false], + margin: [0, 5, 0, 5], + alignment: 'right', + }, + { + text: 'Thank \n You', + border: [false, true, false, false], + fontSize: 20, + bold: true, + color: '#169f54', + margin: [0, 5, 0, 5], + }, + ], + ]; +} + +export function mappingPrice(transaction: TransactionEntity) { + const result = []; + const sub_total = [ + { + text: 'SUBTOTAL', + alignment: 'right', + bold: true, + margin: [0, 5, 0, 5], + }, + { + text: Number(transaction.payment_sub_total).toLocaleString('id-ID', { + style: 'currency', + currency: 'IDR', + }), + margin: [0, 5, 0, 5], + }, + ]; + result.push(sub_total); + + if (Number(transaction.payment_discount_total ?? 0) > 0) { + const discount = [ + { + text: 'DISCOUNT', + bold: true, + alignment: 'right', + margin: [0, 5, 0, 5], + }, + { + text: Number(transaction.payment_discount_total).toLocaleString( + 'id-ID', + { + style: 'currency', + currency: 'IDR', + }, + ), + margin: [0, 5, 0, 5], + }, + ]; + result.push(discount); + } + + const total = [ + { + text: 'TOTAL', + bold: true, + border: [false, false, false, true], + alignment: 'right', + margin: [0, 5, 0, 5], + }, + { + text: Number(transaction.payment_total).toLocaleString('id-ID', { + style: 'currency', + currency: 'IDR', + }), + border: [false, false, false, true], + margin: [0, 5, 0, 5], + }, + ]; + result.push(total); + + return result; +} + +export function mappingItem(items) { + const header = [ + { + text: 'ITEM', + border: [false, true, false, false], + margin: [0, 5, 0, 5], + bold: true, + textTransform: 'uppercase', + }, + { + text: 'QTY', + alignment: 'center', + border: [false, true, false, false], + margin: [0, 5, 0, 5], + bold: true, + textTransform: 'uppercase', + }, + { + text: 'PRICE', + alignment: 'center', + border: [false, true, false, false], + margin: [0, 5, 0, 5], + bold: true, + textTransform: 'uppercase', + }, + { + text: 'AMOUNT', + border: [false, true, false, false], + alignment: 'center', + bold: true, + margin: [0, 5, 0, 5], + textTransform: 'uppercase', + }, + ]; + + const result = []; + items.forEach((item) => { + const dataRow = [ + { + text: item.item_name, + margin: [0, 5, 0, 5], + alignment: 'left', + }, + { + text: item.qty, + margin: [0, 5, 0, 5], + alignment: 'center', + }, + { + text: Number(item.item_price).toLocaleString('id-ID', { + style: 'currency', + currency: 'IDR', + }), + margin: [0, 5, 0, 5], + alignment: 'right', + }, + { + text: Number(item.total_price).toLocaleString('id-ID', { + style: 'currency', + currency: 'IDR', + }), + alignment: 'right', + margin: [0, 5, 0, 5], + }, + ]; + result.push(dataRow); + }); + + const body = [header, ...result]; + + return body; +} + +export function mappingBody() { + // booking date change information + return [ + "Great news! We've successfully updated your booking date as per your request. \n We're exited to accommodate your new plans and ensure everything goes smoothly \n\n", + 'Here are your updated booking details:', + { + text: '\n\n Original Booking Date: 20 Agustus 2024 \n New Booking Date: 20 Agustus 2025 \n\n', + bold: true, + }, + "Here's a quick recap of your order :", + ]; +} + +export function mappingBodyBottom() { + // booking date change information + return [ + "For your convenience, we've attached a new confirmation receipt reflecting these changes \n", + 'Please be sure to bring this updated receipt with you on the new date \n\n', + 'If you have any questions or need further assistance, our friendly support team is just a call away at \n\n', + "Thank you and we can't wait to see you and make sure you hove an amazing time!", + ]; +} diff --git a/src/modules/configuration/export/domain/templates/invoice-old.template.ts b/src/modules/configuration/export/domain/templates/invoice-old.template.ts new file mode 100644 index 0000000..b568b25 --- /dev/null +++ b/src/modules/configuration/export/domain/templates/invoice-old.template.ts @@ -0,0 +1,426 @@ +export function InvoiceOldTempalte(transaction) { + return { + content: [ + { + columns: [ + [ + { + text: 'Invoice', + color: '#333333', + width: '*', + fontSize: 28, + bold: true, + alignment: 'left', + margin: [0, 0, 0, 15], + }, + { + stack: mappingHeader(transaction), + }, + ], + [ + { + text: 'Customer Detail', + color: '#aaaaab', + bold: true, + fontSize: 14, + alignment: 'right', + margin: [0, 20, 0, 5], + }, + { + stack: [ + { + columns: [ + { + text: 'Name', + color: '#aaaaab', + bold: true, + width: '*', + fontSize: 12, + alignment: 'right', + }, + { + text: transaction.customer_name ?? 'Customer', + bold: true, + color: '#333333', + fontSize: 12, + alignment: 'right', + width: 100, + }, + ], + }, + { + columns: [ + { + text: 'Email', + color: '#aaaaab', + bold: true, + width: '*', + fontSize: 12, + alignment: 'right', + }, + { + text: transaction.customer_email ?? '-', + bold: true, + color: '#333333', + fontSize: 12, + alignment: 'right', + width: 100, + }, + ], + }, + { + columns: [ + { + text: 'Phone', + color: '#aaaaab', + bold: true, + width: '*', + fontSize: 12, + alignment: 'right', + }, + { + text: transaction.customer_phone ?? '-', + bold: true, + color: '#333333', + fontSize: 12, + alignment: 'right', + width: 100, + }, + ], + }, + ], + }, + ], + ], + }, + '\n\n', + { + layout: { + defaultBorder: false, + hLineWidth: function (i, node) { + return 1; + }, + vLineWidth: function (i, node) { + return 1; + }, + hLineColor: function (i, node) { + if (i === 1 || i === 0) { + return '#bfdde8'; + } + return '#eaeaea'; + }, + vLineColor: function (i, node) { + return '#eaeaea'; + }, + hLineStyle: function (i, node) { + // if (i === 0 || i === node.table.body.length) { + return null; + //} + }, + // vLineStyle: function (i, node) { return {dash: { length: 10, space: 4 }}; }, + paddingLeft: function (i, node) { + return 10; + }, + paddingRight: function (i, node) { + return 10; + }, + paddingTop: function (i, node) { + return 2; + }, + paddingBottom: function (i, node) { + return 2; + }, + fillColor: function (rowIndex, node, columnIndex) { + return '#fff'; + }, + }, + table: { + headerRows: 1, + widths: ['*', 'auto', 'auto', 100], + body: mappingItem(transaction.items), + }, + }, + '\n', + { + layout: { + defaultBorder: false, + hLineWidth: function (i, node) { + return null; + }, + vLineWidth: function (i, node) { + return 1; + }, + hLineColor: function (i, node) { + return i === 0 ? '#000000' : '#eaeaea'; + }, + vLineColor: function (i, node) { + return '#eaeaea'; + }, + hLineStyle: function (i, node) { + // if (i === 0 || i === node.table.body.length) { + return null; + //} + }, + // vLineStyle: function (i, node) { return {dash: { length: 10, space: 4 }}; }, + paddingLeft: function (i, node) { + return 10; + }, + paddingRight: function (i, node) { + return 10; + }, + paddingTop: function (i, node) { + return 3; + }, + paddingBottom: function (i, node) { + return 3; + }, + fillColor: function (rowIndex, node, columnIndex) { + return '#fff'; + }, + }, + table: { + headerRows: 1, + widths: ['*', 100], + body: mappingPrice(transaction), + }, + }, + '\n\n', + { + text: 'NOTES', + style: 'notesTitle', + }, + { + text: 'Some notes goes here \n Notes second line', + style: 'notesText', + }, + ], + styles: { + notesTitle: { + fontSize: 10, + bold: true, + margin: [0, 50, 0, 3], + }, + notesText: { + fontSize: 10, + }, + }, + defaultStyle: { + columnGap: 20, + font: 'Times', + }, + }; +} + +function mappingHeader(transaction) { + const result = [ + { + columns: [ + { + text: 'Receipt No.', + color: '#aaaaab', + bold: true, + width: '*', + fontSize: 12, + alignment: 'left', + }, + { + text: transaction.invoice_code, + bold: true, + color: '#333333', + fontSize: 12, + alignment: 'left', + width: 100, + }, + ], + }, + { + columns: [ + { + text: 'Date Issued', + color: '#aaaaab', + bold: true, + width: '*', + fontSize: 12, + alignment: 'left', + }, + { + text: transaction.invoice_date, + bold: true, + color: '#333333', + fontSize: 12, + alignment: 'left', + width: 100, + }, + ], + }, + { + columns: [ + { + text: 'Status', + color: '#aaaaab', + bold: true, + fontSize: 12, + alignment: 'left', + width: '*', + }, + { + text: transaction.status, + bold: true, + fontSize: 14, + alignment: 'left', + color: 'green', + width: 100, + }, + ], + }, + ]; + + return result; +} + +function mappingPrice(transaction) { + const result = []; + const sub_total = [ + { + text: 'Subtotal', + border: [false, true, false, true], + alignment: 'right', + margin: [0, 5, 0, 5], + }, + { + border: [false, true, false, true], + text: Number(transaction.payment_sub_total).toLocaleString('id-ID', { + style: 'currency', + currency: 'IDR', + }), + alignment: 'right', + margin: [0, 5, 0, 5], + }, + ]; + result.push(sub_total); + + if (Number(transaction.payment_discount_total ?? 0) > 0) { + const discount = [ + { + text: 'Discount', + border: [false, false, false, true], + alignment: 'right', + margin: [0, 5, 0, 5], + }, + { + text: Number(transaction.payment_discount_total).toLocaleString( + 'id-ID', + { + style: 'currency', + currency: 'IDR', + }, + ), + border: [false, false, false, true], + alignment: 'right', + margin: [0, 5, 0, 5], + }, + ]; + result.push(discount); + } + + const total = [ + { + text: 'Total', + bold: true, + alignment: 'right', + border: [false, false, false, true], + margin: [0, 5, 0, 5], + }, + { + text: Number(transaction.payment_total).toLocaleString('id-ID', { + style: 'currency', + currency: 'IDR', + }), + bold: true, + alignment: 'right', + border: [false, false, false, true], + margin: [0, 5, 0, 5], + }, + ]; + result.push(total); + + return result; +} + +function mappingItem(items) { + const header = [ + { + text: 'DESCRIPTION', + alignment: 'center', + fillColor: '#eaf2f5', + border: [false, true, false, true], + margin: [0, 5, 0, 5], + textTransform: 'uppercase', + }, + { + text: 'QTY', + alignment: 'center', + fillColor: '#eaf2f5', + border: [false, true, false, true], + margin: [0, 5, 0, 5], + textTransform: 'uppercase', + }, + { + text: 'UNIT PRICE', + alignment: 'center', + fillColor: '#eaf2f5', + border: [false, true, false, true], + margin: [0, 5, 0, 5], + textTransform: 'uppercase', + }, + { + text: 'TOTAL', + border: [false, true, false, true], + alignment: 'center', + fillColor: '#eaf2f5', + margin: [0, 5, 0, 5], + textTransform: 'uppercase', + }, + ]; + + const result = []; + items.forEach((item) => { + const dataRow = [ + { + text: item.item_name, + border: [false, false, false, true], + margin: [0, 5, 0, 5], + alignment: 'left', + }, + { + text: item.qty, + border: [false, false, false, true], + margin: [0, 5, 0, 5], + alignment: 'center', + }, + { + text: Number(item.item_price).toLocaleString('id-ID', { + style: 'currency', + currency: 'IDR', + }), + border: [false, false, false, true], + margin: [0, 5, 0, 5], + alignment: 'right', + }, + { + text: Number(item.total_price).toLocaleString('id-ID', { + style: 'currency', + currency: 'IDR', + }), + border: [false, false, false, true], + alignment: 'right', + margin: [0, 5, 0, 5], + }, + ]; + result.push(dataRow); + }); + + const body = [header, ...result]; + + return body; +} diff --git a/src/modules/configuration/export/domain/templates/invoice.template.ts b/src/modules/configuration/export/domain/templates/invoice.template.ts new file mode 100644 index 0000000..f3a33d2 --- /dev/null +++ b/src/modules/configuration/export/domain/templates/invoice.template.ts @@ -0,0 +1,191 @@ +// playground requires you to assign document definition to a variable called dd + +import { TransactionEntity } from 'src/modules/transaction/transaction/domain/entities/transaction.entity'; +import { + mappingFooter, + mappingHeader, + mappingItem, + mappingPrice, +} from './helpers/invoice-mapping.helper'; + +export function InvoiceOldTempalte(transaction: TransactionEntity) { + return { + content: [ + { + alignment: 'justify', + columns: mappingHeader(), + }, + + '\n\n', + { + columns: [ + { + text: 'Dear, \n Customer \n - \n Booking Date: 15 Juli 2024', + bold: true, + }, + ], + }, + + "\n\n Thank you for choosing us! We're absolutely thrilled and can't wait to embark on this exiting day with you. See you soon for fun times ahead!\n\n", + { + layout: { + defaultBorder: false, + hLineWidth: function (i, node) { + return 1; + }, + vLineWidth: function (i, node) { + return 1; + }, + hLineColor: function (i, node) { + return i === 0 ? '#000000' : '#eaeaea'; + }, + vLineColor: function (i, node) { + return '#eaeaea'; + }, + hLineStyle: function (i, node) { + // if (i === 0 || i === node.table.body.length) { + return null; + //} + }, + // vLineStyle: function (i, node) { return {dash: { length: 10, space: 4 }}; }, + paddingLeft: function (i, node) { + return 10; + }, + paddingRight: function (i, node) { + return 10; + }, + paddingTop: function (i, node) { + return 3; + }, + paddingBottom: function (i, node) { + return 3; + }, + fillColor: function (rowIndex, node, columnIndex) { + return '#fff'; + }, + }, + table: { + widths: ['*', 'auto', 'auto', 100], + body: mappingItem(transaction), + }, + }, + '\n', + { + layout: { + defaultBorder: false, + hLineWidth: function (i, node) { + return 1; + }, + vLineWidth: function (i, node) { + return 1; + }, + hLineColor: function (i, node) { + return i === 3 ? '#000000' : '#eaeaea'; + }, + vLineColor: function (i, node) { + return '#eaeaea'; + }, + hLineStyle: function (i, node) { + // if (i === 0 || i === node.table.body.length) { + return null; + //} + }, + // vLineStyle: function (i, node) { return {dash: { length: 10, space: 4 }}; }, + paddingLeft: function (i, node) { + return 10; + }, + paddingRight: function (i, node) { + return 10; + }, + paddingTop: function (i, node) { + return 3; + }, + paddingBottom: function (i, node) { + return i === 2 ? 20 : 3; + }, + fillColor: function (rowIndex, node, columnIndex) { + return '#fff'; + }, + }, + table: { + headerRows: 1, + widths: ['*', 100], + body: mappingPrice(transaction), + }, + }, + '\n', + 'Just a friendly reminder that your invoice will expire on . \n', + 'To keep things running smoothly, please ensure your payment is compoleted before this data. \n\n', + 'For your convenience, here is a list of our account details :', + + "\n\n Once you've made the payment, please kindly email or send the proof of payment so we can proceed with your booking promptly. \n", + 'If you have any questions or need assistance, feel free to reach out to our support team at 0821-3242-4523 \n\n\n\n', + + { + layout: { + defaultBorder: false, + hLineWidth: function (i, node) { + return 1; + }, + vLineWidth: function (i, node) { + return 1; + }, + hLineColor: function (i, node) { + return i === 0 ? '#000000' : '#eaeaea'; + }, + vLineColor: function (i, node) { + return '#eaeaea'; + }, + hLineStyle: function (i, node) { + // if (i === 0 || i === node.table.body.length) { + return null; + //} + }, + // vLineStyle: function (i, node) { return {dash: { length: 10, space: 4 }}; }, + paddingLeft: function (i, node) { + return 10; + }, + paddingRight: function (i, node) { + return 10; + }, + paddingTop: function (i, node) { + return 20; + }, + paddingBottom: function (i, node) { + return 3; + }, + fillColor: function (rowIndex, node, columnIndex) { + return '#fff'; + }, + }, + table: { + widths: ['*', 200], + body: mappingFooter(), + }, + }, + ], + styles: { + notesTitle: { + fontSize: 10, + bold: true, + margin: [0, 50, 0, 3], + }, + notesText: { + fontSize: 10, + }, + tableExample: { + margin: [0, 5, 0, 15], + headerRows: 1, + widths: ['*', 100], + }, + tableHeader: { + bold: true, + fontSize: 13, + color: 'black', + }, + }, + defaultStyle: { + columnGap: 20, + }, + }; +} diff --git a/src/modules/configuration/export/export.module.ts b/src/modules/configuration/export/export.module.ts new file mode 100644 index 0000000..382f7dc --- /dev/null +++ b/src/modules/configuration/export/export.module.ts @@ -0,0 +1,10 @@ +import { Module } from '@nestjs/common'; +import { ConfigModule } from '@nestjs/config'; +import { ExportController } from './infrastructure/export.controller'; + +@Module({ + imports: [ConfigModule.forRoot()], + controllers: [ExportController], + providers: [], +}) +export class ExportModule {} diff --git a/src/modules/configuration/export/infrastructure/export.controller.ts b/src/modules/configuration/export/infrastructure/export.controller.ts new file mode 100644 index 0000000..705b1d5 --- /dev/null +++ b/src/modules/configuration/export/infrastructure/export.controller.ts @@ -0,0 +1,17 @@ +import { Controller, Post } from '@nestjs/common'; +import { ApiTags } from '@nestjs/swagger'; +import { Public } from 'src/core/guards'; +import { PdfMaker } from '../domain/helpers/pdf-make.helper'; + +@ApiTags('export') +@Controller('export') +@Public(true) +export class ExportController { + constructor() {} + + // @Post('pdf/example') + // async exportPdf( + // ): Promise { + // return PdfMaker(); + // } +} diff --git a/src/modules/transaction/transaction/domain/usecases/managers/download-invoice-transaction.manager.ts b/src/modules/transaction/transaction/domain/usecases/managers/download-invoice-transaction.manager.ts new file mode 100644 index 0000000..4d7f0f7 --- /dev/null +++ b/src/modules/transaction/transaction/domain/usecases/managers/download-invoice-transaction.manager.ts @@ -0,0 +1,43 @@ +import { BaseCustomManager } from 'src/core/modules/domain/usecase/managers/base-custom.manager'; +import { TransactionEntity } from '../../entities/transaction.entity'; +import { EventTopics } from 'src/core/strings/constants/interface.constants'; +import { TransactionModel } from '../../../data/models/transaction.model'; +import { PdfMaker } from 'src/modules/configuration/export/domain/helpers/pdf-make.helper'; + +export class InvoiceTransactionManager extends BaseCustomManager { + get entityTarget(): any { + return TransactionModel; + } + + getResult() { + return []; + } + + get eventTopics(): EventTopics[] { + return; + } + + validateProcess(): Promise { + return; + } + + beforeProcess(): Promise { + return; + } + + async process(): Promise { + const transaction = await this.dataService.getOneByOptions({ + where: { + id: this.data.id, + }, + relations: ['items'], + }); + + PdfMaker(transaction); + return; + } + + afterProcess(): Promise { + return; + } +} diff --git a/src/modules/transaction/transaction/transaction.module.ts b/src/modules/transaction/transaction/transaction.module.ts index a626078..988adec 100644 --- a/src/modules/transaction/transaction/transaction.module.ts +++ b/src/modules/transaction/transaction/transaction.module.ts @@ -32,6 +32,7 @@ import { TaxModel } from '../tax/data/models/tax.model'; import { SettledTransactionHandler } from './domain/usecases/handlers/settled-transaction.handler'; import { RefundUpdatedHandler } from './domain/usecases/handlers/refund-update.handler'; import { MidtransCallbackHandler } from './domain/usecases/handlers/midtrans-transaction-callback.handler'; +import { InvoiceTransactionManager } from './domain/usecases/managers/download-invoice-transaction.manager'; @Module({ imports: [ @@ -64,6 +65,7 @@ import { MidtransCallbackHandler } from './domain/usecases/handlers/midtrans-tra BatchDeleteTransactionManager, BatchConfirmTransactionManager, CancelTransactionManager, + InvoiceTransactionManager, BatchCancelTransactionManager, ConfirmDataTransactionManager, BatchConfirmDataTransactionManager, diff --git a/yarn.lock b/yarn.lock index 640a173..b77f4e8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -429,6 +429,43 @@ lodash.isundefined "^3.0.1" lodash.uniq "^4.5.0" +"@foliojs-fork/fontkit@^1.9.1": + version "1.9.2" + resolved "https://registry.yarnpkg.com/@foliojs-fork/fontkit/-/fontkit-1.9.2.tgz#94241c195bc6204157bc84c33f34bdc967eca9c3" + integrity sha512-IfB5EiIb+GZk+77TRB86AHroVaqfq8JRFlUbz0WEwsInyCG0epX2tCPOy+UfaWPju30DeVoUAXfzWXmhn753KA== + dependencies: + "@foliojs-fork/restructure" "^2.0.2" + brotli "^1.2.0" + clone "^1.0.4" + deep-equal "^1.0.0" + dfa "^1.2.0" + tiny-inflate "^1.0.2" + unicode-properties "^1.2.2" + unicode-trie "^2.0.0" + +"@foliojs-fork/linebreak@^1.1.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@foliojs-fork/linebreak/-/linebreak-1.1.2.tgz#32fee03d5431fa73284373439e172e451ae1e2da" + integrity sha512-ZPohpxxbuKNE0l/5iBJnOAfUaMACwvUIKCvqtWGKIMv1lPYoNjYXRfhi9FeeV9McBkBLxsMFWTVVhHJA8cyzvg== + dependencies: + base64-js "1.3.1" + unicode-trie "^2.0.0" + +"@foliojs-fork/pdfkit@^0.14.0": + version "0.14.0" + resolved "https://registry.yarnpkg.com/@foliojs-fork/pdfkit/-/pdfkit-0.14.0.tgz#ed1868050edd2904284655f8dcddd56b49576c98" + integrity sha512-nMOiQAv6id89MT3tVTCgc7HxD5ZMANwio2o5yvs5sexQkC0KI3BLaLakpsrHmFfeGFAhqPmZATZGbJGXTUebpg== + dependencies: + "@foliojs-fork/fontkit" "^1.9.1" + "@foliojs-fork/linebreak" "^1.1.1" + crypto-js "^4.2.0" + png-js "^1.0.0" + +"@foliojs-fork/restructure@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@foliojs-fork/restructure/-/restructure-2.0.2.tgz#73759aba2aff1da87b7c4554e6839c70d43c92b4" + integrity sha512-59SgoZ3EXbkfSX7b63tsou/SDGzwUEK6MuB5sKqgVK1/XE0fxmpsOb9DQI8LXW3KfGnAjImCGhhEb7uPPAUVNA== + "@humanwhocodes/config-array@^0.11.14": version "0.11.14" resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b" @@ -1899,7 +1936,12 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -base64-js@^1.3.0, base64-js@^1.3.1: +base64-js@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" + integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== + +base64-js@^1.1.2, base64-js@^1.3.0, base64-js@^1.3.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== @@ -2008,6 +2050,13 @@ breadth-filter@^2.0.0: dependencies: object.entries "^1.0.4" +brotli@^1.2.0: + version "1.3.3" + resolved "https://registry.yarnpkg.com/brotli/-/brotli-1.3.3.tgz#7365d8cc00f12cf765d2b2c898716bcf4b604d48" + integrity sha512-oTKjJdShmDuGW94SyyaoQvAjf30dZaHnjJ8uAF+u2/vGJkJbJPJAT1gDiOJP5v1Zb6f9KEyW/1HpuaWIXtGHPg== + dependencies: + base64-js "^1.1.2" + browserslist@^4.21.10, browserslist@^4.22.2: version "4.23.2" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.2.tgz#244fe803641f1c19c28c48c4b6ec9736eb3d32ed" @@ -2085,7 +2134,7 @@ bytes@3.1.2: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== -call-bind@^1.0.7: +call-bind@^1.0.2, call-bind@^1.0.6, call-bind@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== @@ -2331,7 +2380,7 @@ cliui@^8.0.1: strip-ansi "^6.0.1" wrap-ansi "^7.0.0" -clone@^1.0.2: +clone@^1.0.2, clone@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== @@ -2565,6 +2614,11 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" +crypto-js@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.2.0.tgz#4d931639ecdfd12ff80e8186dba6af2c2e856631" + integrity sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q== + dayjs@^1.11.9, dayjs@^1.8.34: version "1.11.11" resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.11.tgz#dfe0e9d54c5f8b68ccf8ca5f72ac603e7e5ed59e" @@ -2599,6 +2653,18 @@ dedent@^1.0.0: resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.5.3.tgz#99aee19eb9bae55a67327717b6e848d0bf777e5a" integrity sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ== +deep-equal@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.2.tgz#78a561b7830eef3134c7f6f3a3d6af272a678761" + integrity sha512-5tdhKF6DbU7iIzrIOa1AOUt39ZRm13cmL1cGEh//aqR8x9+tNfbywRf0n5FD/18OKMdo7DNEtrX2t22ZAkI+eg== + dependencies: + is-arguments "^1.1.1" + is-date-object "^1.0.5" + is-regex "^1.1.4" + object-is "^1.1.5" + object-keys "^1.1.1" + regexp.prototype.flags "^1.5.1" + deep-is@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" @@ -2691,6 +2757,11 @@ dezalgo@^1.0.4: asap "^2.0.0" wrappy "1" +dfa@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/dfa/-/dfa-1.2.0.tgz#96ac3204e2d29c49ea5b57af8d92c2ae12790657" + integrity sha512-ED3jP8saaweFTjeGX8HQPjeC1YYyZs98jGNZx6IiBvxW7JG5v492kamAQB3m2wop07CvU/RQmzcKr6bgcC5D/Q== + diff-sequences@^29.6.3: version "29.6.3" resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" @@ -3469,6 +3540,11 @@ function-bind@^1.1.2: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== +functions-have-names@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" + integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== + gauge@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/gauge/-/gauge-3.0.2.tgz#03bf4441c044383908bcfa0656ad91803259b395" @@ -3762,6 +3838,13 @@ has-symbols@^1.0.3: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== +has-tostringtag@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" + integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== + dependencies: + has-symbols "^1.0.3" + has-unicode@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" @@ -3857,6 +3940,13 @@ iconv-lite@0.4.24, iconv-lite@^0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" +iconv-lite@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + ieee754@^1.1.13, ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" @@ -4004,6 +4094,14 @@ is-absolute@^1.0.0: is-relative "^1.0.0" is-windows "^1.0.1" +is-arguments@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" + integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" @@ -4023,6 +4121,13 @@ is-core-module@^2.13.0: dependencies: hasown "^2.0.2" +is-date-object@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== + dependencies: + has-tostringtag "^1.0.0" + is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -4092,6 +4197,14 @@ is-plain-object@^5.0.0: resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== +is-regex@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + is-relative@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz#a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d" @@ -5429,6 +5542,14 @@ object-inspect@^1.13.1: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.2.tgz#dea0088467fb991e67af4058147a24824a3043ff" integrity sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g== +object-is@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.6.tgz#1a6a53aed2dd8f7e6775ff870bea58545956ab07" + integrity sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" @@ -5612,6 +5733,11 @@ package-json-from-dist@^1.0.0: resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz#e501cd3094b278495eb4258d4c9f6d5ac3019f00" integrity sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw== +pako@^0.2.5: + version "0.2.9" + resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" + integrity sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA== + pako@~1.0.2: version "1.0.11" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" @@ -5749,6 +5875,16 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== +pdfmake@^0.2.10: + version "0.2.10" + resolved "https://registry.yarnpkg.com/pdfmake/-/pdfmake-0.2.10.tgz#a8a0ee8a5acca8f5d728e0dfe4db8be5f1b9ec6b" + integrity sha512-doipFnmE1UHSk+Z3wfQuVweVQqx2pE/Ns2G5gCqZmWwqjDj+mZHnZYH/ryXWoIfD+iVdZUAutgI/VHkTCN+Xrw== + dependencies: + "@foliojs-fork/linebreak" "^1.1.1" + "@foliojs-fork/pdfkit" "^0.14.0" + iconv-lite "^0.6.3" + xmldoc "^1.1.2" + pg-cloudflare@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/pg-cloudflare/-/pg-cloudflare-1.1.1.tgz#e6d5833015b170e23ae819e8c5d7eaedb472ca98" @@ -5881,6 +6017,11 @@ pluralize@8.0.0: resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1" integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA== +png-js@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/png-js/-/png-js-1.0.0.tgz#e5484f1e8156996e383aceebb3789fd75df1874d" + integrity sha512-k+YsbhpA9e+EFfKjTCH3VW6aoKlyNYI6NYdTfDL4CIvFnvsuO84ttonmZE7rc+v23SLTH8XX+5w/Ak9v0xGY4g== + postgres-array@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/postgres-array/-/postgres-array-2.0.0.tgz#48f8fce054fbc69671999329b8834b772652d82e" @@ -6100,6 +6241,16 @@ regenerator-runtime@^0.14.0: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== +regexp.prototype.flags@^1.5.1: + version "1.5.2" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz#138f644a3350f981a858c44f6bb1a61ff59be334" + integrity sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw== + dependencies: + call-bind "^1.0.6" + define-properties "^1.2.1" + es-errors "^1.3.0" + set-function-name "^2.0.1" + relative-microtime@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/relative-microtime/-/relative-microtime-2.0.0.tgz#cceed2af095ecd72ea32011279c79e5fcc7de29b" @@ -6247,11 +6398,16 @@ safe-stable-stringify@^2.3.1: resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz#138c84b6f6edb3db5f8ef3ef7115b8f55ccbf886" integrity sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g== -"safer-buffer@>= 2.1.2 < 3": +"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== +sax@^1.2.4: + version "1.4.1" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.4.1.tgz#44cc8988377f126304d3b3fc1010c733b929ef0f" + integrity sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg== + saxes@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d" @@ -6345,6 +6501,16 @@ set-function-length@^1.2.1: gopd "^1.0.1" has-property-descriptors "^1.0.2" +set-function-name@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.2.tgz#16a705c5a0dc2f5e638ca96d8a8cd4e1c2b90985" + integrity sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + functions-have-names "^1.2.3" + has-property-descriptors "^1.0.2" + setimmediate@^1.0.5, setimmediate@~1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" @@ -6765,6 +6931,11 @@ tiny-emitter@^2.1.0: resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz#1d1a56edfc51c43e863cbb5382a72330e3555423" integrity sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q== +tiny-inflate@^1.0.0, tiny-inflate@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tiny-inflate/-/tiny-inflate-1.0.3.tgz#122715494913a1805166aaf7c93467933eea26c4" + integrity sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw== + title-case@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/title-case/-/title-case-3.0.3.tgz#bc689b46f02e411f1d1e1d081f7c3deca0489982" @@ -7029,11 +7200,27 @@ unicode-byte-truncate@^1.0.0: is-integer "^1.0.6" unicode-substring "^0.1.0" +unicode-properties@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/unicode-properties/-/unicode-properties-1.4.1.tgz#96a9cffb7e619a0dc7368c28da27e05fc8f9be5f" + integrity sha512-CLjCCLQ6UuMxWnbIylkisbRj31qxHPAurvena/0iwSVbQ2G1VY5/HjV0IRabOEbDHlzZlRdCrD4NhB0JtU40Pg== + dependencies: + base64-js "^1.3.0" + unicode-trie "^2.0.0" + unicode-substring@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/unicode-substring/-/unicode-substring-0.1.0.tgz#6120ce3c390385dbcd0f60c32b9065c4181d4b36" integrity sha512-36Xaw9wXi7MB/3/EQZZHkZyyiRNa9i3k9YtPAz2KfqMVH2xutdXyMHn4Igarmnvr+wOrfWa/6njhY+jPpXN2EQ== +unicode-trie@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unicode-trie/-/unicode-trie-2.0.0.tgz#8fd8845696e2e14a8b67d78fa9e0dd2cad62fec8" + integrity sha512-x7bc76x0bm4prf1VLg79uhAzKw8DVboClSN5VxJuQ+LKDOVEW9CdH+VY7SP+vX7xCYQqzzgQpFqz15zeLvAtZQ== + dependencies: + pako "^0.2.5" + tiny-inflate "^1.0.0" + universalify@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" @@ -7327,6 +7514,13 @@ xmlchars@^2.2.0: resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== +xmldoc@^1.1.2: + version "1.3.0" + resolved "https://registry.yarnpkg.com/xmldoc/-/xmldoc-1.3.0.tgz#7823225b096c74036347c9ec5924d06b6a3cebab" + integrity sha512-y7IRWW6PvEnYQZNZFMRLNJw+p3pezM4nKYPfr15g4OOW9i8VpeydycFuipE2297OvZnh3jSb2pxOt9QpkZUVng== + dependencies: + sax "^1.2.4" + xtend@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54"