Merge branch 'dev' into 6500-procRefactor8
gitea/salix/pipeline/pr-dev This commit looks good
Details
gitea/salix/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
commit
36b3a92ca3
|
@ -0,0 +1,33 @@
|
|||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
function getCurrentBranchName(p = process.cwd()) {
|
||||
if (!fs.existsSync(p)) return false;
|
||||
|
||||
const gitHeadPath = path.join(p, '.git', 'HEAD');
|
||||
|
||||
if (!fs.existsSync(gitHeadPath))
|
||||
return getCurrentBranchName(path.resolve(p, '..'));
|
||||
|
||||
const headContent = fs.readFileSync(gitHeadPath, 'utf-8');
|
||||
return headContent.trim().split('/')[2];
|
||||
}
|
||||
|
||||
const branchName = getCurrentBranchName();
|
||||
|
||||
if (branchName) {
|
||||
const msgPath = `.git/COMMIT_EDITMSG`;
|
||||
const msg = fs.readFileSync(msgPath, 'utf-8');
|
||||
const reference = branchName.match(/^\d+/);
|
||||
|
||||
const referenceTag = `refs #${reference}`;
|
||||
if (!msg.includes(referenceTag) && reference) {
|
||||
const splitedMsg = msg.split(':');
|
||||
|
||||
if (splitedMsg.length > 1) {
|
||||
const finalMsg = splitedMsg[0] + ': ' + referenceTag + splitedMsg.slice(1).join(':');
|
||||
fs.writeFileSync(msgPath, finalMsg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
echo "Running husky commit-msg hook"
|
||||
npx --no-install commitlint --edit
|
||||
echo "Adding reference tag to commit message"
|
||||
node .husky/addReferenceTag.js
|
||||
|
|
@ -45,7 +45,6 @@ module.exports = Self => {
|
|||
});
|
||||
availableNotificationsMap.delete(active.notificationFk);
|
||||
}
|
||||
|
||||
return {
|
||||
active: [...activeNotificationsMap.entries()],
|
||||
available: [...availableNotificationsMap.entries()]
|
||||
|
|
|
@ -4,8 +4,8 @@ describe('NotificationSubscription getList()', () => {
|
|||
it('should return a list of available and active notifications of a user', async() => {
|
||||
const userId = 9;
|
||||
const {active, available} = await models.NotificationSubscription.getList(userId);
|
||||
const notifications = await models.Notification.find({});
|
||||
const totalAvailable = notifications.length - active.length;
|
||||
const notifications = await models.NotificationSubscription.getAvailable(userId);
|
||||
const totalAvailable = notifications.size - active.length;
|
||||
|
||||
expect(active.length).toEqual(3);
|
||||
expect(available.length).toEqual(totalAvailable);
|
||||
|
|
|
@ -174,5 +174,8 @@
|
|||
},
|
||||
"WorkerActivityType": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"ProductionConfig": {
|
||||
"dataSource": "vn"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "ProductionConfig",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "productionConfig"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number",
|
||||
"required": true,
|
||||
"id": true
|
||||
},
|
||||
"backupPrinterNotificationDelay": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -41,8 +41,7 @@ describe('loopback model NotificationSubscription', () => {
|
|||
|
||||
try {
|
||||
const options = {transaction: tx, accessToken: {userId: 9}};
|
||||
const notificationSubscriptionId = 2;
|
||||
await models.NotificationSubscription.destroyAll({id: notificationSubscriptionId}, options);
|
||||
await models.NotificationSubscription.destroyAll({id: 2}, options);
|
||||
|
||||
await tx.rollback();
|
||||
} catch (e) {
|
||||
|
@ -76,8 +75,7 @@ describe('loopback model NotificationSubscription', () => {
|
|||
|
||||
try {
|
||||
const options = {transaction: tx, accessToken: {userId: 9}};
|
||||
const notificationSubscriptionId = 6;
|
||||
await models.NotificationSubscription.destroyAll({id: notificationSubscriptionId}, options);
|
||||
await models.NotificationSubscription.destroyAll({id: 6}, options);
|
||||
|
||||
await tx.rollback();
|
||||
} catch (e) {
|
||||
|
@ -111,8 +109,7 @@ describe('loopback model NotificationSubscription', () => {
|
|||
|
||||
try {
|
||||
const options = {transaction: tx, accessToken: {userId: 19}};
|
||||
const notificationSubscriptionId = 4;
|
||||
await models.NotificationSubscription.destroyAll({id: notificationSubscriptionId}, options);
|
||||
await models.NotificationSubscription.destroyAll({id: 4}, options);
|
||||
|
||||
await tx.rollback();
|
||||
} catch (e) {
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
module.exports = {extends: ['@commitlint/config-conventional']};
|
|
@ -113,9 +113,6 @@ INSERT INTO vn.ticket (clientFk, warehouseFk, shipped, nickname, refFk, addressF
|
|||
(100, 4, '2022-07-12 00:00:00', 'root', NULL, 195, NULL, NULL, 0, 0, 0, 0, NULL, 0, '2022-07-12 16:18:58', 1, NULL, 4, NULL, 1, 567, 1, '2022-07-12', 0, 0, 6, NULL, NULL, NULL, NULL, NULL),
|
||||
(100, 5, '2022-07-12 00:00:00', 'root', NULL, 195, NULL, NULL, 0, 0, 0, 0, NULL, 0, '2022-07-12 16:18:58', 1, NULL, 5, NULL, 1, 567, 1, '2022-07-12', 0, 0, 1, NULL, NULL, NULL, NULL, NULL);
|
||||
*/
|
||||
INSERT INTO vn.sector (description,warehouseFk) VALUES
|
||||
('Sector One',1);
|
||||
|
||||
INSERT INTO vn.saleGroup (userFk,parkingFk,sectorFk) VALUES
|
||||
(100,1,1);
|
||||
|
||||
|
@ -156,16 +153,6 @@ INSERT INTO `vn`.`occupationCode` (`code`, `name`)
|
|||
('b', 'Representantes de comercio'),
|
||||
('c', 'Personal de oficios en trabajos de construcción en general, y en instalac.,edificios y obras');
|
||||
|
||||
INSERT INTO `vn2008`.`payroll_employee` (`CodTrabajador`,`codempresa`)
|
||||
VALUES
|
||||
(36,20),
|
||||
(43,20),
|
||||
(76,20),
|
||||
(1106,20),
|
||||
(1107,20),
|
||||
(1108,20),
|
||||
(1109,20),
|
||||
(1110,20);
|
||||
|
||||
INSERT INTO `vn`.`trainingCourseType` (`id`, `name`)
|
||||
VALUES
|
||||
|
|
|
@ -198,7 +198,7 @@ INSERT INTO `vn`.`printer` (`id`, `name`, `path`, `isLabeler`, `sectorFk`, `ipAd
|
|||
(2, 'printer2', 'path2', 1, 1 , NULL),
|
||||
(4, 'printer4', 'path4', 0, NULL, '10.1.10.4');
|
||||
|
||||
UPDATE `vn`.`sector` SET mainPrinterFk = 1 WHERE id = 1;
|
||||
UPDATE `vn`.`sector` SET `backupPrinterFk` = 1 WHERE id = 1;
|
||||
|
||||
|
||||
INSERT INTO `vn`.`worker`(`id`, `code`, `firstName`, `lastName`,`bossFk`, `phone`)
|
||||
|
@ -2822,7 +2822,8 @@ INSERT INTO `util`.`notification` (`id`, `name`, `description`)
|
|||
(4, 'supplier-pay-method-update', 'A supplier pay method has been updated'),
|
||||
(5, 'modified-entry', 'An entry has been modified'),
|
||||
(6, 'book-entry-deleted', 'accounting entries deleted'),
|
||||
(7, 'zone-included','An email to notify zoneCollisions');
|
||||
(7, 'zone-included','An email to notify zoneCollisions'),
|
||||
(8, 'backup-printer-selected','A backup printer has been selected');
|
||||
|
||||
TRUNCATE `util`.`notificationAcl`;
|
||||
INSERT INTO `util`.`notificationAcl` (`notificationFk`, `roleFk`)
|
||||
|
@ -2834,7 +2835,8 @@ INSERT INTO `util`.`notificationAcl` (`notificationFk`, `roleFk`)
|
|||
(4, 1),
|
||||
(5, 9),
|
||||
(6, 9),
|
||||
(7, 9);
|
||||
(7, 9),
|
||||
(8, 66);
|
||||
|
||||
TRUNCATE `util`.`notificationQueue`;
|
||||
INSERT INTO `util`.`notificationQueue` (`id`, `notificationFk`, `params`, `authorFk`, `status`, `created`)
|
||||
|
@ -2854,15 +2856,16 @@ INSERT INTO `util`.`notificationSubscription` (`notificationFk`, `userFk`)
|
|||
(1, 9),
|
||||
(1, 3),
|
||||
(6, 9),
|
||||
(7, 9);
|
||||
(7, 9),
|
||||
(8, 66);
|
||||
|
||||
INSERT INTO `vn`.`routeConfig` (`id`, `defaultWorkCenterFk`)
|
||||
VALUES
|
||||
(1, 9);
|
||||
|
||||
INSERT INTO `vn`.`productionConfig` (`isPreviousPreparationRequired`, `ticketPrintedMax`, `ticketTrolleyMax`, `rookieDays`, `notBuyingMonths`, `id`, `isZoneClosedByExpeditionActivated`, `maxNotReadyCollections`, `minTicketsToCloseZone`, `movingTicketDelRoute`, `defaultZone`, `defautlAgencyMode`, `hasUniqueCollectionTime`, `maxCollectionWithoutUser`, `pendingCollectionsOrder`, `pendingCollectionsAge`)
|
||||
INSERT INTO `vn`.`productionConfig` (`isPreviousPreparationRequired`, `ticketPrintedMax`, `ticketTrolleyMax`, `rookieDays`, `notBuyingMonths`, `id`, `isZoneClosedByExpeditionActivated`, `maxNotReadyCollections`, `minTicketsToCloseZone`, `movingTicketDelRoute`, `defaultZone`, `defautlAgencyMode`, `hasUniqueCollectionTime`, `maxCollectionWithoutUser`, `pendingCollectionsOrder`, `pendingCollectionsAge`, `backupPrinterNotificationDelay`)
|
||||
VALUES
|
||||
(0, 8, 80, 0, 0, 1, 0, 15, 25, -1, 697, 1328, 0, 1, 8, 6);
|
||||
(0, 8, 80, 0, 0, 1, 0, 15, 25, -1, 697, 1328, 0, 1, 8, 6, 3600);
|
||||
|
||||
INSERT INTO `vn`.`collection` (`id`, `created`, `workerFk`, `stateFk`, `itemPackingTypeFk`, `saleTotalCount`, `salePickedCount`, `trainFk`, `sectorFk`, `wagons`)
|
||||
VALUES
|
||||
|
@ -3743,5 +3746,18 @@ INSERT INTO vn.ticketLog (originFk,userFk,`action`,creationDate,changedModel,new
|
|||
VALUES (18,9,'insert','2001-01-01 11:01:00.000','Ticket','{"isDeleted":true}',45,'Super Man');
|
||||
|
||||
INSERT INTO `vn`.`supplierDms`(`supplierFk`, `dmsFk`, `editorFk`)
|
||||
VALUES (1, 10, 9);
|
||||
|
||||
INSERT INTO `vn`.`accountReconciliation` (supplierAccountFk,operationDated,valueDated,amount,concept,debitCredit,calculatedCode,created)
|
||||
VALUES
|
||||
(1, 10, 9);
|
||||
(241,'2023-12-13 00:00:00.000','2023-12-07 00:00:00.000',19.36,'BEL 1','debit','2','2023-12-14 08:39:53.000'),
|
||||
(241,'2023-12-13 00:00:00.000','2023-12-07 00:00:00.000',30226.43,'BEL 2','debit','1','2023-12-14 08:39:53.000'),
|
||||
(241,'2023-12-13 00:00:00.000','2023-12-13 00:00:00.000',118.81,'RCBO','debit','10','2023-12-14 08:39:53.000'),
|
||||
(241,'2023-12-13 00:00:00.000','2023-12-13 00:00:00.000',150.03,'TJ','debit','12','2023-12-14 08:39:53.000'),
|
||||
(241,'2023-12-13 00:00:00.000','2023-12-13 00:00:00.000',150.03,'TJ','debit','12','2023-12-14 08:39:53.000'),
|
||||
(241,'2023-12-13 00:00:00.000','2023-12-13 00:00:00.000',2149.71,'RCBO.AMAZON','debit','122','2023-12-14 08:39:53.000'),
|
||||
(241,'2023-12-13 00:00:00.000','2023-12-13 00:00:00.000',3210.5,'RCBO.VOLVO','debit','121','2023-12-14 08:39:53.000'),
|
||||
(241,'2023-12-13 00:00:00.000','2023-12-13 00:00:00.000',6513.7,'RCBO.ENERPLUS','debit','120','2023-12-14 08:39:53.000');
|
||||
|
||||
INSERT INTO `vn`.`accountReconciliationConfig`(currencyFk, warehouseFk)
|
||||
VALUES (1, 1);
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
ALTER TABLE `vn`.`packingSite` DROP FOREIGN KEY IF EXISTS `packingSite_FK_4`;
|
||||
ALTER TABLE `vn`.`arcRead` DROP FOREIGN KEY IF EXISTS `worker_printer_FK`;
|
||||
ALTER TABLE `vn`.`host` DROP FOREIGN KEY IF EXISTS `configHost_FK`;
|
||||
ALTER TABLE `vn`.`operator` DROP FOREIGN KEY IF EXISTS `operator_FK_5`;
|
||||
ALTER TABLE `vn`.`packingSite` DROP FOREIGN KEY IF EXISTS `packingSite_FK_1`;
|
||||
ALTER TABLE `vn`.`printQueue` DROP FOREIGN KEY IF EXISTS `printQueue_printerFk`;
|
||||
ALTER TABLE `vn`.`sector` DROP FOREIGN KEY IF EXISTS `sector_FK_1`;
|
||||
ALTER TABLE `vn`.`worker` DROP FOREIGN KEY IF EXISTS `worker_FK`;
|
||||
ALTER TABLE dipole.printer DROP FOREIGN KEY IF EXISTS printer_FK;
|
||||
ALTER TABLE dipole.expedition_PrintOut DROP FOREIGN KEY IF EXISTS expedition_PrintOut_FK;
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
ALTER TABLE `vn`.`printer` MODIFY COLUMN IF EXISTS `id` int unsigned auto_increment NOT NULL;
|
||||
|
||||
ALTER TABLE `vn`.`arcRead` MODIFY COLUMN IF EXISTS `printerFk` int unsigned DEFAULT NULL NULL;
|
||||
ALTER TABLE `vn`.`arcRead` ADD CONSTRAINT `arcRead_FK` FOREIGN KEY IF NOT EXISTS (printerFk) REFERENCES vn.printer(id) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
ALTER TABLE `vn`.`host` MODIFY COLUMN IF EXISTS `printerFk` int unsigned DEFAULT NULL NULL;
|
||||
ALTER TABLE `vn`.`host` ADD CONSTRAINT `host_FK` FOREIGN KEY IF NOT EXISTS (printerFk) REFERENCES vn.printer(id) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
ALTER TABLE `vn`.`operator` MODIFY COLUMN IF EXISTS `labelerFk` int unsigned DEFAULT NULL NULL;
|
||||
ALTER TABLE `vn`.`operator` ADD CONSTRAINT `operator_FK_4` FOREIGN KEY IF NOT EXISTS (labelerFk) REFERENCES vn.printer(id) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
ALTER TABLE `vn`.`packingSite` MODIFY COLUMN IF EXISTS `printerFk` int unsigned DEFAULT NULL NULL;
|
||||
ALTER TABLE `vn`.`packingSite` ADD CONSTRAINT `packingSite_FK_1` FOREIGN KEY IF NOT EXISTS (printerFk) REFERENCES vn.printer(id) ON DELETE RESTRICT ON UPDATE RESTRICT;
|
||||
|
||||
ALTER TABLE `vn`.`packingSite` MODIFY COLUMN IF EXISTS `printerRfidFk` int unsigned DEFAULT NULL NULL;
|
||||
ALTER TABLE `vn`.`packingSite` ADD CONSTRAINT `packingSite_FK_4` FOREIGN KEY IF NOT EXISTS(printerRfidFk) REFERENCES vn.printer(id) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
ALTER TABLE `vn`.`printQueue` MODIFY COLUMN IF EXISTS `printerFk` int unsigned DEFAULT NULL NULL;
|
||||
ALTER TABLE `vn`.`printQueue` ADD CONSTRAINT `printQueue_FK` FOREIGN KEY IF NOT EXISTS (printerFk) REFERENCES vn.printer(id) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
ALTER TABLE `vn`.`sector` MODIFY COLUMN IF EXISTS `mainPrinterFk` int unsigned DEFAULT NULL NULL;
|
||||
ALTER TABLE `vn`.`sector` ADD CONSTRAINT `sector_FK` FOREIGN KEY IF NOT EXISTS (mainPrinterFk) REFERENCES vn.printer(id) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
ALTER TABLE `dipole`.`printer` MODIFY COLUMN IF EXISTS `id` int unsigned DEFAULT NULL NULL;
|
||||
ALTER TABLE `dipole`.`printer` ADD CONSTRAINT `vnPrinter_FK` FOREIGN KEY IF NOT EXISTS (id) REFERENCES vn.printer(id) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
ALTER TABLE `dipole`.`expedition_PrintOut` MODIFY COLUMN IF EXISTS `printerFk` int unsigned DEFAULT 0 NOT NULL;
|
||||
ALTER TABLE `dipole`.`expedition_PrintOut` ADD CONSTRAINT `expedition_PrintOut_FK` FOREIGN KEY IF NOT EXISTS (printerFk) REFERENCES printer(id) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
ALTER TABLE `vn`.`productionConfig` ADD IF NOT EXISTS backupPrinterNotificationDelay int unsigned NULL
|
||||
COMMENT 'Minimum seconds Interval to Prevent Spam from Same-Type Notifications';
|
||||
|
||||
ALTER TABLE vn.sector DROP FOREIGN KEY IF EXISTS sector_FK;
|
||||
|
||||
ALTER TABLE `vn`.`sector` CHANGE IF EXISTS `mainPrinterFk` `backupPrinterFk` int unsigned DEFAULT NULL NULL;
|
||||
|
||||
ALTER TABLE `util`.`notificationSubscription` DROP FOREIGN KEY IF EXISTS `notificationSubscription_ibfk_1`;
|
||||
ALTER TABLE `util`.`notificationQueue` DROP FOREIGN KEY IF EXISTS `nnotificationQueue_ibfk_1`;
|
||||
ALTER TABLE `util`.`notificationAcl` DROP FOREIGN KEY IF EXISTS `notificationAcl_ibfk_1`;
|
||||
|
||||
ALTER TABLE `util`.`notification` MODIFY COLUMN IF EXISTS `id` int(11) auto_increment NOT NULL;
|
||||
|
||||
ALTER TABLE `util`.`notificationSubscription` ADD CONSTRAINT `notificationSubscription_Fk` FOREIGN KEY IF NOT EXISTS (`notificationFk`) REFERENCES `util`.`notification`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
ALTER TABLE `util`.`notificationQueue` ADD CONSTRAINT `notificationQueue_Fk` FOREIGN KEY IF NOT EXISTS (`notificationFk`) REFERENCES `util`.`notification`(`name`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
ALTER TABLE `util`.`notificationAcl` ADD CONSTRAINT `notificationAcl_Fk` FOREIGN KEY IF NOT EXISTS (`notificationFk`) REFERENCES `util`.`notification`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@ -0,0 +1,12 @@
|
|||
INSERT IGNORE INTO util.notification (name, description)
|
||||
VALUES ('backup-printer-selected','A backup printer has been selected');
|
||||
|
||||
INSERT IGNORE INTO util.notificationSubscription (notificationFk, userFk)
|
||||
SELECT id, 10435
|
||||
FROM util.notification
|
||||
WHERE name = 'backup-printer-selected';
|
||||
|
||||
INSERT IGNORE INTO util.notificationAcl (notificationFk, roleFk)
|
||||
SELECT id, 66
|
||||
FROM util.notification
|
||||
WHERE name = 'backup-printer-selected';
|
|
@ -48,7 +48,7 @@
|
|||
"type": "number",
|
||||
"required": false
|
||||
},
|
||||
"mainPrinterFk": {
|
||||
"backupPrinterFk": {
|
||||
"type": "number",
|
||||
"required": false
|
||||
},
|
||||
|
|
|
@ -3,60 +3,80 @@ const models = require('vn-loopback/server/server').models;
|
|||
describe('Operator', () => {
|
||||
const authorFk = 9;
|
||||
const sectorId = 1;
|
||||
const mainPrinter = 1;
|
||||
const notificationName = 'not-main-printer-configured';
|
||||
const operator = {
|
||||
workerFk: 1,
|
||||
trainFk: 1,
|
||||
itemPackingTypeFk: 'H',
|
||||
warehouseFk: 1,
|
||||
sectorFk: sectorId
|
||||
};
|
||||
const labeler = 1;
|
||||
const notificationName = 'backup-printer-selected';
|
||||
const sentStatus = 'sent';
|
||||
|
||||
async function createOperator(labelerFk, options) {
|
||||
operator.labelerFk = labelerFk;
|
||||
await models.Operator.create(operator, options);
|
||||
return models.NotificationQueue.findOne({
|
||||
where: {
|
||||
notificationFk: notificationName
|
||||
}
|
||||
}, options);
|
||||
beforeEach(async() => {
|
||||
await deleteNotification();
|
||||
});
|
||||
|
||||
afterAll(async() => {
|
||||
await deleteNotification();
|
||||
});
|
||||
|
||||
async function deleteNotification() {
|
||||
await models.NotificationQueue.destroyAll({notificationFk: notificationName});
|
||||
}
|
||||
|
||||
it('should create notification when configured a not main printer in the sector', async() => {
|
||||
const tx = await models.Operator.beginTransaction({});
|
||||
async function updateOperatorAndFindNotification(labelerFk = labeler) {
|
||||
await models.Operator.updateAll({id: authorFk}, {workerFk: authorFk, labelerFk: labelerFk, sectorFk: sectorId});
|
||||
return models.NotificationQueue.findOne({order: 'id DESC'});
|
||||
}
|
||||
|
||||
try {
|
||||
const options = {transaction: tx, accessToken: {userId: authorFk}};
|
||||
const notificationQueue = await createOperator(2, options);
|
||||
it('should create notification when configured a backup printer in the sector', async() => {
|
||||
const notificationQueue = await updateOperatorAndFindNotification();
|
||||
const params = JSON.parse(notificationQueue.params);
|
||||
|
||||
expect(notificationQueue.notificationFk).toEqual(notificationName);
|
||||
expect(notificationQueue.authorFk).toEqual(authorFk);
|
||||
expect(params.labelerId).toEqual(2);
|
||||
expect(params.labelerId).toEqual(1);
|
||||
expect(params.sectorId).toEqual(1);
|
||||
expect(params.workerId).toEqual(9);
|
||||
});
|
||||
|
||||
await tx.rollback();
|
||||
it('should not create notification when configured a non backup printer in the sector', async() => {
|
||||
const notificationQueue = await updateOperatorAndFindNotification(2);
|
||||
|
||||
expect(notificationQueue?.notificationFk).not.toEqual(notificationName);
|
||||
});
|
||||
|
||||
it('should create notification when delay is null', async() => {
|
||||
const config = await models.ProductionConfig.findOne();
|
||||
const delay = config.backupPrinterNotificationDelay;
|
||||
await config.updateAttributes({backupPrinterNotificationDelay: null});
|
||||
const lastNotification = await updateOperatorAndFindNotification();
|
||||
await config.updateAttributes({backupPrinterNotificationDelay: delay});
|
||||
|
||||
expect(lastNotification.notificationFk).toEqual(notificationName);
|
||||
});
|
||||
|
||||
it('should not sent notification when is already notified by another worker', async() => {
|
||||
try {
|
||||
await models.NotificationQueue.create({
|
||||
authorFk: 2,
|
||||
notificationFk: notificationName,
|
||||
params: JSON.stringify({'labelerId': labeler, 'sectorId': sectorId, 'workerId': 2}),
|
||||
created: '2001-01-01 12:30:00',
|
||||
status: sentStatus
|
||||
});
|
||||
await models.Operator.updateAll({id: 1}, {labelerFk: labeler, sectorFk: sectorId});
|
||||
} catch (e) {
|
||||
await tx.rollback();
|
||||
throw e;
|
||||
expect(e.message).toEqual('Previous notification sended with the same parameters');
|
||||
}
|
||||
});
|
||||
|
||||
it('should not create notification when configured the main printer in the sector', async() => {
|
||||
const tx = await models.Operator.beginTransaction({});
|
||||
it('should send a notification when the previous one has distinct params', async() => {
|
||||
await models.NotificationQueue.create({
|
||||
authorFk: 2,
|
||||
notificationFk: notificationName,
|
||||
params: JSON.stringify({'labelerId': labeler, 'sectorId': 2, 'workerId': 1}),
|
||||
created: '2001-01-01 12:30:00',
|
||||
status: sentStatus
|
||||
});
|
||||
const lastNotification = await updateOperatorAndFindNotification();
|
||||
|
||||
try {
|
||||
const options = {transaction: tx, accessToken: {userId: authorFk}};
|
||||
const notificationQueue = await createOperator(mainPrinter, options);
|
||||
|
||||
expect(notificationQueue).toEqual(null);
|
||||
|
||||
await tx.rollback();
|
||||
} catch (e) {
|
||||
await tx.rollback();
|
||||
throw e;
|
||||
}
|
||||
expect(lastNotification.notificationFk).toEqual(notificationName);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -1,19 +1,41 @@
|
|||
module.exports = Self => {
|
||||
Self.observe('after save', async function(ctx) {
|
||||
Self.observe('after save', async ctx => {
|
||||
const instance = ctx.data || ctx.instance;
|
||||
const models = Self.app.models;
|
||||
const options = ctx.options;
|
||||
const notificationName = 'backup-printer-selected';
|
||||
const userId = ctx.options.accessToken?.userId || instance.workerFk;
|
||||
|
||||
if (!instance?.sectorFk || !instance?.labelerFk) return;
|
||||
|
||||
const sector = await models.Sector.findById(instance.sectorFk, {
|
||||
fields: ['mainPrinterFk']
|
||||
fields: ['backupPrinterFk']
|
||||
}, options);
|
||||
|
||||
if (sector.mainPrinterFk && sector.mainPrinterFk != instance.labelerFk) {
|
||||
const userId = ctx.options.accessToken.userId;
|
||||
if (sector.backupPrinterFk && sector.backupPrinterFk == instance.labelerFk) {
|
||||
const {labelerFk, sectorFk} = instance;
|
||||
|
||||
const {backupPrinterNotificationDelay} = await models.ProductionConfig.findOne();
|
||||
if (backupPrinterNotificationDelay) {
|
||||
const notifications = await models.NotificationQueue.find(
|
||||
{where: {created: {gte: Date.vnNow() - (backupPrinterNotificationDelay * 1000) + (3600 * 1000)},
|
||||
notificationFk: notificationName,
|
||||
status: 'sent'
|
||||
}
|
||||
});
|
||||
|
||||
const criteria = {labelerId: labelerFk, sectorId: sectorFk};
|
||||
const filteredNotifications = notifications.filter(notification => {
|
||||
const paramsObj = JSON.parse(notification.params);
|
||||
return Object.keys(criteria).every(key => criteria[key] === paramsObj?.[key]);
|
||||
});
|
||||
|
||||
if (filteredNotifications.length >= 1)
|
||||
throw new Error('Previous notification sended with the same parameters');
|
||||
}
|
||||
|
||||
await models.NotificationQueue.create({
|
||||
notificationFk: 'not-main-printer-configured',
|
||||
notificationFk: notificationName,
|
||||
authorFk: userId,
|
||||
params: JSON.stringify(
|
||||
{
|
||||
|
@ -22,7 +44,8 @@ module.exports = Self => {
|
|||
'workerId': userId
|
||||
}
|
||||
)
|
||||
}, options);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -56,6 +56,8 @@
|
|||
"@babel/plugin-syntax-dynamic-import": "^7.7.4",
|
||||
"@babel/preset-env": "^7.11.0",
|
||||
"@babel/register": "^7.7.7",
|
||||
"@commitlint/cli": "^19.2.1",
|
||||
"@commitlint/config-conventional": "^19.1.0",
|
||||
"@verdnatura/myt": "^1.6.9",
|
||||
"angular-mocks": "^1.7.9",
|
||||
"babel-jest": "^26.0.1",
|
||||
|
@ -82,6 +84,7 @@
|
|||
"html-loader": "^0.4.5",
|
||||
"html-loader-jest": "^0.2.1",
|
||||
"html-webpack-plugin": "^5.5.1",
|
||||
"husky": "^8.0.0",
|
||||
"identity-obj-proxy": "^3.0.0",
|
||||
"jasmine": "^5.0.2",
|
||||
"jasmine-reporters": "^2.4.0",
|
||||
|
|
461
pnpm-lock.yaml
461
pnpm-lock.yaml
|
@ -94,7 +94,7 @@ dependencies:
|
|||
version: 1.3.0
|
||||
puppeteer:
|
||||
specifier: 21.11.0
|
||||
version: 21.11.0
|
||||
version: 21.11.0(typescript@5.4.4)
|
||||
read-chunk:
|
||||
specifier: ^3.2.0
|
||||
version: 3.2.0
|
||||
|
@ -130,6 +130,12 @@ devDependencies:
|
|||
'@babel/register':
|
||||
specifier: ^7.7.7
|
||||
version: 7.23.7(@babel/core@7.23.9)
|
||||
'@commitlint/cli':
|
||||
specifier: ^19.2.1
|
||||
version: 19.2.1(@types/node@20.11.16)(typescript@5.4.4)
|
||||
'@commitlint/config-conventional':
|
||||
specifier: ^19.1.0
|
||||
version: 19.1.0
|
||||
'@verdnatura/myt':
|
||||
specifier: ^1.6.9
|
||||
version: 1.6.9
|
||||
|
@ -208,6 +214,9 @@ devDependencies:
|
|||
html-webpack-plugin:
|
||||
specifier: ^5.5.1
|
||||
version: 5.6.0(webpack@5.90.1)
|
||||
husky:
|
||||
specifier: ^8.0.0
|
||||
version: 8.0.3
|
||||
identity-obj-proxy:
|
||||
specifier: ^3.0.0
|
||||
version: 3.0.0
|
||||
|
@ -1502,6 +1511,169 @@ packages:
|
|||
minimist: 1.2.8
|
||||
dev: true
|
||||
|
||||
/@commitlint/cli@19.2.1(@types/node@20.11.16)(typescript@5.4.4):
|
||||
resolution: {integrity: sha512-cbkYUJsLqRomccNxvoJTyv5yn0bSy05BBizVyIcLACkRbVUqYorC351Diw/XFSWC/GtpwiwT2eOvQgFZa374bg==}
|
||||
engines: {node: '>=v18'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@commitlint/format': 19.0.3
|
||||
'@commitlint/lint': 19.1.0
|
||||
'@commitlint/load': 19.2.0(@types/node@20.11.16)(typescript@5.4.4)
|
||||
'@commitlint/read': 19.2.1
|
||||
'@commitlint/types': 19.0.3
|
||||
execa: 8.0.1
|
||||
yargs: 17.7.2
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- typescript
|
||||
dev: true
|
||||
|
||||
/@commitlint/config-conventional@19.1.0:
|
||||
resolution: {integrity: sha512-KIKD2xrp6Uuk+dcZVj3++MlzIr/Su6zLE8crEDQCZNvWHNQSeeGbzOlNtsR32TUy6H3JbP7nWgduAHCaiGQ6EA==}
|
||||
engines: {node: '>=v18'}
|
||||
dependencies:
|
||||
'@commitlint/types': 19.0.3
|
||||
conventional-changelog-conventionalcommits: 7.0.2
|
||||
dev: true
|
||||
|
||||
/@commitlint/config-validator@19.0.3:
|
||||
resolution: {integrity: sha512-2D3r4PKjoo59zBc2auodrSCaUnCSALCx54yveOFwwP/i2kfEAQrygwOleFWswLqK0UL/F9r07MFi5ev2ohyM4Q==}
|
||||
engines: {node: '>=v18'}
|
||||
dependencies:
|
||||
'@commitlint/types': 19.0.3
|
||||
ajv: 8.12.0
|
||||
dev: true
|
||||
|
||||
/@commitlint/ensure@19.0.3:
|
||||
resolution: {integrity: sha512-SZEpa/VvBLoT+EFZVb91YWbmaZ/9rPH3ESrINOl0HD2kMYsjvl0tF7nMHh0EpTcv4+gTtZBAe1y/SS6/OhfZzQ==}
|
||||
engines: {node: '>=v18'}
|
||||
dependencies:
|
||||
'@commitlint/types': 19.0.3
|
||||
lodash.camelcase: 4.3.0
|
||||
lodash.kebabcase: 4.1.1
|
||||
lodash.snakecase: 4.1.1
|
||||
lodash.startcase: 4.4.0
|
||||
lodash.upperfirst: 4.3.1
|
||||
dev: true
|
||||
|
||||
/@commitlint/execute-rule@19.0.0:
|
||||
resolution: {integrity: sha512-mtsdpY1qyWgAO/iOK0L6gSGeR7GFcdW7tIjcNFxcWkfLDF5qVbPHKuGATFqRMsxcO8OUKNj0+3WOHB7EHm4Jdw==}
|
||||
engines: {node: '>=v18'}
|
||||
dev: true
|
||||
|
||||
/@commitlint/format@19.0.3:
|
||||
resolution: {integrity: sha512-QjjyGyoiVWzx1f5xOteKHNLFyhyweVifMgopozSgx1fGNrGV8+wp7k6n1t6StHdJ6maQJ+UUtO2TcEiBFRyR6Q==}
|
||||
engines: {node: '>=v18'}
|
||||
dependencies:
|
||||
'@commitlint/types': 19.0.3
|
||||
chalk: 5.3.0
|
||||
dev: true
|
||||
|
||||
/@commitlint/is-ignored@19.0.3:
|
||||
resolution: {integrity: sha512-MqDrxJaRSVSzCbPsV6iOKG/Lt52Y+PVwFVexqImmYYFhe51iVJjK2hRhOG2jUAGiUHk4jpdFr0cZPzcBkSzXDQ==}
|
||||
engines: {node: '>=v18'}
|
||||
dependencies:
|
||||
'@commitlint/types': 19.0.3
|
||||
semver: 7.6.0
|
||||
dev: true
|
||||
|
||||
/@commitlint/lint@19.1.0:
|
||||
resolution: {integrity: sha512-ESjaBmL/9cxm+eePyEr6SFlBUIYlYpI80n+Ltm7IA3MAcrmiP05UMhJdAD66sO8jvo8O4xdGn/1Mt2G5VzfZKw==}
|
||||
engines: {node: '>=v18'}
|
||||
dependencies:
|
||||
'@commitlint/is-ignored': 19.0.3
|
||||
'@commitlint/parse': 19.0.3
|
||||
'@commitlint/rules': 19.0.3
|
||||
'@commitlint/types': 19.0.3
|
||||
dev: true
|
||||
|
||||
/@commitlint/load@19.2.0(@types/node@20.11.16)(typescript@5.4.4):
|
||||
resolution: {integrity: sha512-XvxxLJTKqZojCxaBQ7u92qQLFMMZc4+p9qrIq/9kJDy8DOrEa7P1yx7Tjdc2u2JxIalqT4KOGraVgCE7eCYJyQ==}
|
||||
engines: {node: '>=v18'}
|
||||
dependencies:
|
||||
'@commitlint/config-validator': 19.0.3
|
||||
'@commitlint/execute-rule': 19.0.0
|
||||
'@commitlint/resolve-extends': 19.1.0
|
||||
'@commitlint/types': 19.0.3
|
||||
chalk: 5.3.0
|
||||
cosmiconfig: 9.0.0(typescript@5.4.4)
|
||||
cosmiconfig-typescript-loader: 5.0.0(@types/node@20.11.16)(cosmiconfig@9.0.0)(typescript@5.4.4)
|
||||
lodash.isplainobject: 4.0.6
|
||||
lodash.merge: 4.6.2
|
||||
lodash.uniq: 4.5.0
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- typescript
|
||||
dev: true
|
||||
|
||||
/@commitlint/message@19.0.0:
|
||||
resolution: {integrity: sha512-c9czf6lU+9oF9gVVa2lmKaOARJvt4soRsVmbR7Njwp9FpbBgste5i7l/2l5o8MmbwGh4yE1snfnsy2qyA2r/Fw==}
|
||||
engines: {node: '>=v18'}
|
||||
dev: true
|
||||
|
||||
/@commitlint/parse@19.0.3:
|
||||
resolution: {integrity: sha512-Il+tNyOb8VDxN3P6XoBBwWJtKKGzHlitEuXA5BP6ir/3loWlsSqDr5aecl6hZcC/spjq4pHqNh0qPlfeWu38QA==}
|
||||
engines: {node: '>=v18'}
|
||||
dependencies:
|
||||
'@commitlint/types': 19.0.3
|
||||
conventional-changelog-angular: 7.0.0
|
||||
conventional-commits-parser: 5.0.0
|
||||
dev: true
|
||||
|
||||
/@commitlint/read@19.2.1:
|
||||
resolution: {integrity: sha512-qETc4+PL0EUv7Q36lJbPG+NJiBOGg7SSC7B5BsPWOmei+Dyif80ErfWQ0qXoW9oCh7GTpTNRoaVhiI8RbhuaNw==}
|
||||
engines: {node: '>=v18'}
|
||||
dependencies:
|
||||
'@commitlint/top-level': 19.0.0
|
||||
'@commitlint/types': 19.0.3
|
||||
execa: 8.0.1
|
||||
git-raw-commits: 4.0.0
|
||||
minimist: 1.2.8
|
||||
dev: true
|
||||
|
||||
/@commitlint/resolve-extends@19.1.0:
|
||||
resolution: {integrity: sha512-z2riI+8G3CET5CPgXJPlzftH+RiWYLMYv4C9tSLdLXdr6pBNimSKukYP9MS27ejmscqCTVA4almdLh0ODD2KYg==}
|
||||
engines: {node: '>=v18'}
|
||||
dependencies:
|
||||
'@commitlint/config-validator': 19.0.3
|
||||
'@commitlint/types': 19.0.3
|
||||
global-directory: 4.0.1
|
||||
import-meta-resolve: 4.0.0
|
||||
lodash.mergewith: 4.6.2
|
||||
resolve-from: 5.0.0
|
||||
dev: true
|
||||
|
||||
/@commitlint/rules@19.0.3:
|
||||
resolution: {integrity: sha512-TspKb9VB6svklxNCKKwxhELn7qhtY1rFF8ls58DcFd0F97XoG07xugPjjbVnLqmMkRjZDbDIwBKt9bddOfLaPw==}
|
||||
engines: {node: '>=v18'}
|
||||
dependencies:
|
||||
'@commitlint/ensure': 19.0.3
|
||||
'@commitlint/message': 19.0.0
|
||||
'@commitlint/to-lines': 19.0.0
|
||||
'@commitlint/types': 19.0.3
|
||||
execa: 8.0.1
|
||||
dev: true
|
||||
|
||||
/@commitlint/to-lines@19.0.0:
|
||||
resolution: {integrity: sha512-vkxWo+VQU5wFhiP9Ub9Sre0FYe019JxFikrALVoD5UGa8/t3yOJEpEhxC5xKiENKKhUkTpEItMTRAjHw2SCpZw==}
|
||||
engines: {node: '>=v18'}
|
||||
dev: true
|
||||
|
||||
/@commitlint/top-level@19.0.0:
|
||||
resolution: {integrity: sha512-KKjShd6u1aMGNkCkaX4aG1jOGdn7f8ZI8TR1VEuNqUOjWTOdcDSsmglinglJ18JTjuBX5I1PtjrhQCRcixRVFQ==}
|
||||
engines: {node: '>=v18'}
|
||||
dependencies:
|
||||
find-up: 7.0.0
|
||||
dev: true
|
||||
|
||||
/@commitlint/types@19.0.3:
|
||||
resolution: {integrity: sha512-tpyc+7i6bPG9mvaBbtKUeghfyZSDgWquIDfMgqYtTbmZ9Y9VzEm2je9EYcQ0aoz5o7NvGS+rcDec93yO08MHYA==}
|
||||
engines: {node: '>=v18'}
|
||||
dependencies:
|
||||
'@types/conventional-commits-parser': 5.0.0
|
||||
chalk: 5.3.0
|
||||
dev: true
|
||||
|
||||
/@discoveryjs/json-ext@0.5.7:
|
||||
resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==}
|
||||
engines: {node: '>=10.0.0'}
|
||||
|
@ -2433,6 +2605,12 @@ packages:
|
|||
'@types/node': 20.11.16
|
||||
dev: false
|
||||
|
||||
/@types/conventional-commits-parser@5.0.0:
|
||||
resolution: {integrity: sha512-loB369iXNmAZglwWATL+WRe+CRMmmBPtpolYzIebFaX4YA3x+BEfLqhUAV9WanycKI3TG1IMr5bMJDajDKLlUQ==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.16
|
||||
dev: true
|
||||
|
||||
/@types/eslint-scope@3.7.7:
|
||||
resolution: {integrity: sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==}
|
||||
dependencies:
|
||||
|
@ -2814,7 +2992,6 @@ packages:
|
|||
dependencies:
|
||||
jsonparse: 1.3.1
|
||||
through: 2.3.8
|
||||
dev: false
|
||||
|
||||
/abab@2.0.6:
|
||||
resolution: {integrity: sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==}
|
||||
|
@ -3161,6 +3338,10 @@ packages:
|
|||
resolution: {integrity: sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==}
|
||||
dev: true
|
||||
|
||||
/array-ify@1.0.0:
|
||||
resolution: {integrity: sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==}
|
||||
dev: true
|
||||
|
||||
/array-initial@1.1.0:
|
||||
resolution: {integrity: sha512-BC4Yl89vneCYfpLrs5JU2aAu9/a+xWbeKhvISg9PT7eWFB9UlRvI+rKEtk6mgxWr3dSkk9gQ8hCrdqt06NXPdw==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
@ -4002,6 +4183,11 @@ packages:
|
|||
ansi-styles: 4.3.0
|
||||
supports-color: 7.2.0
|
||||
|
||||
/chalk@5.3.0:
|
||||
resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==}
|
||||
engines: {node: ^12.17.0 || ^14.13 || >=16.0.0}
|
||||
dev: true
|
||||
|
||||
/char-regex@1.0.2:
|
||||
resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==}
|
||||
engines: {node: '>=10'}
|
||||
|
@ -4299,6 +4485,13 @@ packages:
|
|||
/commondir@1.0.1:
|
||||
resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==}
|
||||
|
||||
/compare-func@2.0.0:
|
||||
resolution: {integrity: sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==}
|
||||
dependencies:
|
||||
array-ify: 1.0.0
|
||||
dot-prop: 5.3.0
|
||||
dev: true
|
||||
|
||||
/component-emitter@1.3.1:
|
||||
resolution: {integrity: sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==}
|
||||
dev: true
|
||||
|
@ -4559,6 +4752,31 @@ packages:
|
|||
resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==}
|
||||
engines: {node: '>= 0.6'}
|
||||
|
||||
/conventional-changelog-angular@7.0.0:
|
||||
resolution: {integrity: sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==}
|
||||
engines: {node: '>=16'}
|
||||
dependencies:
|
||||
compare-func: 2.0.0
|
||||
dev: true
|
||||
|
||||
/conventional-changelog-conventionalcommits@7.0.2:
|
||||
resolution: {integrity: sha512-NKXYmMR/Hr1DevQegFB4MwfM5Vv0m4UIxKZTTYuD98lpTknaZlSRrDOG4X7wIXpGkfsYxZTghUN+Qq+T0YQI7w==}
|
||||
engines: {node: '>=16'}
|
||||
dependencies:
|
||||
compare-func: 2.0.0
|
||||
dev: true
|
||||
|
||||
/conventional-commits-parser@5.0.0:
|
||||
resolution: {integrity: sha512-ZPMl0ZJbw74iS9LuX9YIAiW8pfM5p3yh2o/NbXHbkFuZzY5jvdi5jFycEOkmBW5H5I7nA+D6f3UcsCLP2vvSEA==}
|
||||
engines: {node: '>=16'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
JSONStream: 1.3.5
|
||||
is-text-path: 2.0.0
|
||||
meow: 12.1.1
|
||||
split2: 4.2.0
|
||||
dev: true
|
||||
|
||||
/convert-source-map@1.9.0:
|
||||
resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==}
|
||||
dev: true
|
||||
|
@ -4613,7 +4831,21 @@ packages:
|
|||
/core-util-is@1.0.3:
|
||||
resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==}
|
||||
|
||||
/cosmiconfig@9.0.0:
|
||||
/cosmiconfig-typescript-loader@5.0.0(@types/node@20.11.16)(cosmiconfig@9.0.0)(typescript@5.4.4):
|
||||
resolution: {integrity: sha512-+8cK7jRAReYkMwMiG+bxhcNKiHJDM6bR9FD/nGBXOWdMLuYawjF5cGrtLilJ+LGd3ZjCXnJjR5DkfWPoIVlqJA==}
|
||||
engines: {node: '>=v16'}
|
||||
peerDependencies:
|
||||
'@types/node': '*'
|
||||
cosmiconfig: '>=8.2'
|
||||
typescript: '>=4'
|
||||
dependencies:
|
||||
'@types/node': 20.11.16
|
||||
cosmiconfig: 9.0.0(typescript@5.4.4)
|
||||
jiti: 1.21.0
|
||||
typescript: 5.4.4
|
||||
dev: true
|
||||
|
||||
/cosmiconfig@9.0.0(typescript@5.4.4):
|
||||
resolution: {integrity: sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==}
|
||||
engines: {node: '>=14'}
|
||||
peerDependencies:
|
||||
|
@ -4626,7 +4858,7 @@ packages:
|
|||
import-fresh: 3.3.0
|
||||
js-yaml: 4.1.0
|
||||
parse-json: 5.2.0
|
||||
dev: false
|
||||
typescript: 5.4.4
|
||||
|
||||
/cross-fetch@4.0.0:
|
||||
resolution: {integrity: sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==}
|
||||
|
@ -4746,6 +4978,11 @@ packages:
|
|||
engines: {node: '>=4'}
|
||||
dev: true
|
||||
|
||||
/dargs@8.1.0:
|
||||
resolution: {integrity: sha512-wAV9QHOsNbwnWdNW2FYvE1P56wtgSbM+3SZcdGiWQILwVjACCXDCI3Ai8QlCjMDB8YK5zySiXZYBiwGmNY3lnw==}
|
||||
engines: {node: '>=12'}
|
||||
dev: true
|
||||
|
||||
/dashdash@1.14.1:
|
||||
resolution: {integrity: sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==}
|
||||
engines: {node: '>=0.10'}
|
||||
|
@ -5170,6 +5407,13 @@ packages:
|
|||
is-obj: 1.0.1
|
||||
dev: false
|
||||
|
||||
/dot-prop@5.3.0:
|
||||
resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==}
|
||||
engines: {node: '>=8'}
|
||||
dependencies:
|
||||
is-obj: 2.0.0
|
||||
dev: true
|
||||
|
||||
/duplex-child-process@0.0.5:
|
||||
resolution: {integrity: sha512-3WVvFnyEYmFYXi2VB9z9XG8y4MbCMEPYrSGYROY3Pp7TT5qsyrdv+rZS6ydjQvTegHMc00pbrl4V/OOwrzo1KQ==}
|
||||
dev: false
|
||||
|
@ -5648,6 +5892,21 @@ packages:
|
|||
signal-exit: 3.0.7
|
||||
strip-final-newline: 2.0.0
|
||||
|
||||
/execa@8.0.1:
|
||||
resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==}
|
||||
engines: {node: '>=16.17'}
|
||||
dependencies:
|
||||
cross-spawn: 7.0.3
|
||||
get-stream: 8.0.1
|
||||
human-signals: 5.0.0
|
||||
is-stream: 3.0.0
|
||||
merge-stream: 2.0.0
|
||||
npm-run-path: 5.3.0
|
||||
onetime: 6.0.0
|
||||
signal-exit: 4.1.0
|
||||
strip-final-newline: 3.0.0
|
||||
dev: true
|
||||
|
||||
/exit@0.1.2:
|
||||
resolution: {integrity: sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==}
|
||||
engines: {node: '>= 0.8.0'}
|
||||
|
@ -5990,6 +6249,15 @@ packages:
|
|||
path-exists: 4.0.0
|
||||
dev: true
|
||||
|
||||
/find-up@7.0.0:
|
||||
resolution: {integrity: sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g==}
|
||||
engines: {node: '>=18'}
|
||||
dependencies:
|
||||
locate-path: 7.2.0
|
||||
path-exists: 5.0.0
|
||||
unicorn-magic: 0.1.0
|
||||
dev: true
|
||||
|
||||
/findup-sync@2.0.0:
|
||||
resolution: {integrity: sha512-vs+3unmJT45eczmcAZ6zMJtxN3l/QXeccaXQx5cu/MeJMhewVfoWZqibRkOxPnmoR59+Zy5hjabfQc6JLSah4g==}
|
||||
engines: {node: '>= 0.10'}
|
||||
|
@ -6406,6 +6674,11 @@ packages:
|
|||
dependencies:
|
||||
pump: 3.0.0
|
||||
|
||||
/get-stream@8.0.1:
|
||||
resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==}
|
||||
engines: {node: '>=16'}
|
||||
dev: true
|
||||
|
||||
/get-uri@6.0.2:
|
||||
resolution: {integrity: sha512-5KLucCJobh8vBY1K07EFV4+cPZH3mrV9YeAruUseCQKHB58SGjjT2l9/eA9LD082IiuMjSlFJEcdJ27TXvbZNw==}
|
||||
engines: {node: '>= 14'}
|
||||
|
@ -6432,6 +6705,16 @@ packages:
|
|||
dependencies:
|
||||
assert-plus: 1.0.0
|
||||
|
||||
/git-raw-commits@4.0.0:
|
||||
resolution: {integrity: sha512-ICsMM1Wk8xSGMowkOmPrzo2Fgmfo4bMHLNX6ytHjajRJUqvHOw/TFapQ+QG75c3X/tTDDhOSRPGC52dDbNM8FQ==}
|
||||
engines: {node: '>=16'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
dargs: 8.1.0
|
||||
meow: 12.1.1
|
||||
split2: 4.2.0
|
||||
dev: true
|
||||
|
||||
/github-from-package@0.0.0:
|
||||
resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==}
|
||||
requiresBuild: true
|
||||
|
@ -6538,6 +6821,13 @@ packages:
|
|||
once: 1.4.0
|
||||
dev: true
|
||||
|
||||
/global-directory@4.0.1:
|
||||
resolution: {integrity: sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==}
|
||||
engines: {node: '>=18'}
|
||||
dependencies:
|
||||
ini: 4.1.1
|
||||
dev: true
|
||||
|
||||
/global-modules@1.0.0:
|
||||
resolution: {integrity: sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
@ -7382,12 +7672,23 @@ packages:
|
|||
resolution: {integrity: sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==}
|
||||
engines: {node: '>=8.12.0'}
|
||||
|
||||
/human-signals@5.0.0:
|
||||
resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==}
|
||||
engines: {node: '>=16.17.0'}
|
||||
dev: true
|
||||
|
||||
/humanize-ms@1.2.1:
|
||||
resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==}
|
||||
dependencies:
|
||||
ms: 2.1.3
|
||||
dev: true
|
||||
|
||||
/husky@8.0.3:
|
||||
resolution: {integrity: sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==}
|
||||
engines: {node: '>=14'}
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/i18n@0.8.6:
|
||||
resolution: {integrity: sha512-aMsJq8i1XXrb+BBsgmJBwak9mr69zPEIAUPb6c5yw2G/O4k1Q52lBxL+agZdQDN/RGf1ylQzrCswsOOgIiC1FA==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
@ -7495,6 +7796,10 @@ packages:
|
|||
resolve-cwd: 3.0.0
|
||||
dev: true
|
||||
|
||||
/import-meta-resolve@4.0.0:
|
||||
resolution: {integrity: sha512-okYUR7ZQPH+efeuMJGlq4f8ubUgO50kByRPyt/Cy1Io4PSRsPjxME+YlVaCOx+NIToW7hCsZNFJyTPFFKepRSA==}
|
||||
dev: true
|
||||
|
||||
/imurmurhash@0.1.4:
|
||||
resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==}
|
||||
engines: {node: '>=0.8.19'}
|
||||
|
@ -7774,6 +8079,11 @@ packages:
|
|||
engines: {node: '>=0.10.0'}
|
||||
dev: false
|
||||
|
||||
/is-obj@2.0.0:
|
||||
resolution: {integrity: sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==}
|
||||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
/is-path-cwd@1.0.0:
|
||||
resolution: {integrity: sha512-cnS56eR9SPAscL77ik76ATVqoPARTqPIVkMDVxRaWH06zT+6+CzIroYRJ0VVvm0Z1zfAvxvz9i/D3Ppjaqt5Nw==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
@ -7862,6 +8172,18 @@ packages:
|
|||
resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
/is-stream@3.0.0:
|
||||
resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==}
|
||||
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
|
||||
dev: true
|
||||
|
||||
/is-text-path@2.0.0:
|
||||
resolution: {integrity: sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw==}
|
||||
engines: {node: '>=8'}
|
||||
dependencies:
|
||||
text-extensions: 2.4.0
|
||||
dev: true
|
||||
|
||||
/is-typed-array@1.1.13:
|
||||
resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
@ -8536,6 +8858,11 @@ packages:
|
|||
- utf-8-validate
|
||||
dev: true
|
||||
|
||||
/jiti@1.21.0:
|
||||
resolution: {integrity: sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==}
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/jmespath@0.16.0:
|
||||
resolution: {integrity: sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw==}
|
||||
engines: {node: '>= 0.6.0'}
|
||||
|
@ -8695,7 +9022,6 @@ packages:
|
|||
/jsonparse@1.3.1:
|
||||
resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==}
|
||||
engines: {'0': node >= 0.2.0}
|
||||
dev: false
|
||||
|
||||
/jsprim@1.4.2:
|
||||
resolution: {integrity: sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==}
|
||||
|
@ -8929,6 +9255,13 @@ packages:
|
|||
p-locate: 4.1.0
|
||||
dev: true
|
||||
|
||||
/locate-path@7.2.0:
|
||||
resolution: {integrity: sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==}
|
||||
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
|
||||
dependencies:
|
||||
p-locate: 6.0.0
|
||||
dev: true
|
||||
|
||||
/lodash._basecopy@3.0.1:
|
||||
resolution: {integrity: sha512-rFR6Vpm4HeCK1WPGvjZSJ+7yik8d8PVUdCJx5rT2pogG4Ve/2ZS7kfmO5l5T2o5V2mqlNIfSF5MZlr1+xOoYQQ==}
|
||||
dev: true
|
||||
|
@ -8965,6 +9298,10 @@ packages:
|
|||
resolution: {integrity: sha512-O0pWuFSK6x4EXhM1dhZ8gchNtG7JMqBtrHdoUFUWXD7dJnNSUze1GuyQr5sOs0aCvgGeI3o/OJW8f4ca7FDxmQ==}
|
||||
dev: true
|
||||
|
||||
/lodash.camelcase@4.3.0:
|
||||
resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==}
|
||||
dev: true
|
||||
|
||||
/lodash.debounce@4.0.8:
|
||||
resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==}
|
||||
dev: true
|
||||
|
@ -8987,6 +9324,14 @@ packages:
|
|||
resolution: {integrity: sha512-JwObCrNJuT0Nnbuecmqr5DgtuBppuCvGD9lxjFpAzwnVtdGoDQ1zig+5W8k5/6Gcn0gZ3936HDAlGd28i7sOGQ==}
|
||||
dev: true
|
||||
|
||||
/lodash.isplainobject@4.0.6:
|
||||
resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==}
|
||||
dev: true
|
||||
|
||||
/lodash.kebabcase@4.1.1:
|
||||
resolution: {integrity: sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==}
|
||||
dev: true
|
||||
|
||||
/lodash.keys@3.1.2:
|
||||
resolution: {integrity: sha512-CuBsapFjcubOGMn3VD+24HOAPxM79tH+V6ivJL3CHYjtrawauDJHUk//Yew9Hvc6e9rbCrURGk8z6PC+8WJBfQ==}
|
||||
dependencies:
|
||||
|
@ -9007,6 +9352,14 @@ packages:
|
|||
resolution: {integrity: sha512-L4/arjjuq4noiUJpt3yS6KIKDtJwNe2fIYgMqyYYKoeIfV1iEqvPwhCx23o+R9dzouGihDAPN1dTIRWa7zk8tw==}
|
||||
dev: true
|
||||
|
||||
/lodash.snakecase@4.1.1:
|
||||
resolution: {integrity: sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==}
|
||||
dev: true
|
||||
|
||||
/lodash.startcase@4.4.0:
|
||||
resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==}
|
||||
dev: true
|
||||
|
||||
/lodash.template@3.6.2:
|
||||
resolution: {integrity: sha512-0B4Y53I0OgHUJkt+7RmlDFWKjVAI/YUpWNiL9GQz5ORDr4ttgfQGo+phBWKFLJbBdtOwgMuUkdOHOnPg45jKmQ==}
|
||||
dependencies:
|
||||
|
@ -9032,6 +9385,14 @@ packages:
|
|||
resolution: {integrity: sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==}
|
||||
dev: true
|
||||
|
||||
/lodash.uniq@4.5.0:
|
||||
resolution: {integrity: sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==}
|
||||
dev: true
|
||||
|
||||
/lodash.upperfirst@4.3.1:
|
||||
resolution: {integrity: sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==}
|
||||
dev: true
|
||||
|
||||
/lodash@4.17.21:
|
||||
resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==}
|
||||
|
||||
|
@ -9484,6 +9845,11 @@ packages:
|
|||
readable-stream: 2.3.8
|
||||
dev: true
|
||||
|
||||
/meow@12.1.1:
|
||||
resolution: {integrity: sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==}
|
||||
engines: {node: '>=16.10'}
|
||||
dev: true
|
||||
|
||||
/meow@9.0.0:
|
||||
resolution: {integrity: sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==}
|
||||
engines: {node: '>=10'}
|
||||
|
@ -9593,6 +9959,11 @@ packages:
|
|||
resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==}
|
||||
engines: {node: '>=6'}
|
||||
|
||||
/mimic-fn@4.0.0:
|
||||
resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==}
|
||||
engines: {node: '>=12'}
|
||||
dev: true
|
||||
|
||||
/mimic-response@1.0.1:
|
||||
resolution: {integrity: sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==}
|
||||
engines: {node: '>=4'}
|
||||
|
@ -10361,6 +10732,13 @@ packages:
|
|||
dependencies:
|
||||
path-key: 3.1.1
|
||||
|
||||
/npm-run-path@5.3.0:
|
||||
resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==}
|
||||
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
|
||||
dependencies:
|
||||
path-key: 4.0.0
|
||||
dev: true
|
||||
|
||||
/npmlog@4.1.2:
|
||||
resolution: {integrity: sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==}
|
||||
dependencies:
|
||||
|
@ -10517,6 +10895,13 @@ packages:
|
|||
dependencies:
|
||||
mimic-fn: 2.1.0
|
||||
|
||||
/onetime@6.0.0:
|
||||
resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==}
|
||||
engines: {node: '>=12'}
|
||||
dependencies:
|
||||
mimic-fn: 4.0.0
|
||||
dev: true
|
||||
|
||||
/opn@5.5.0:
|
||||
resolution: {integrity: sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==}
|
||||
engines: {node: '>=4'}
|
||||
|
@ -10638,6 +11023,13 @@ packages:
|
|||
p-try: 2.2.0
|
||||
dev: true
|
||||
|
||||
/p-limit@4.0.0:
|
||||
resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==}
|
||||
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
|
||||
dependencies:
|
||||
yocto-queue: 1.0.0
|
||||
dev: true
|
||||
|
||||
/p-locate@3.0.0:
|
||||
resolution: {integrity: sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==}
|
||||
engines: {node: '>=6'}
|
||||
|
@ -10652,6 +11044,13 @@ packages:
|
|||
p-limit: 2.3.0
|
||||
dev: true
|
||||
|
||||
/p-locate@6.0.0:
|
||||
resolution: {integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==}
|
||||
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
|
||||
dependencies:
|
||||
p-limit: 4.0.0
|
||||
dev: true
|
||||
|
||||
/p-map@2.1.0:
|
||||
resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==}
|
||||
engines: {node: '>=6'}
|
||||
|
@ -10809,6 +11208,11 @@ packages:
|
|||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
/path-exists@5.0.0:
|
||||
resolution: {integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==}
|
||||
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
|
||||
dev: true
|
||||
|
||||
/path-is-absolute@1.0.1:
|
||||
resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
@ -10825,6 +11229,11 @@ packages:
|
|||
resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
/path-key@4.0.0:
|
||||
resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==}
|
||||
engines: {node: '>=12'}
|
||||
dev: true
|
||||
|
||||
/path-parse@1.0.7:
|
||||
resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}
|
||||
dev: true
|
||||
|
@ -11241,14 +11650,14 @@ packages:
|
|||
- utf-8-validate
|
||||
dev: false
|
||||
|
||||
/puppeteer@21.11.0:
|
||||
/puppeteer@21.11.0(typescript@5.4.4):
|
||||
resolution: {integrity: sha512-9jTHuYe22TD3sNxy0nEIzC7ZrlRnDgeX3xPkbS7PnbdwYjl2o/z/YuCrRBwezdKpbTDTJ4VqIggzNyeRcKq3cg==}
|
||||
engines: {node: '>=16.13.2'}
|
||||
hasBin: true
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
'@puppeteer/browsers': 1.9.1
|
||||
cosmiconfig: 9.0.0
|
||||
cosmiconfig: 9.0.0(typescript@5.4.4)
|
||||
puppeteer-core: 21.11.0
|
||||
transitivePeerDependencies:
|
||||
- bufferutil
|
||||
|
@ -11990,6 +12399,14 @@ packages:
|
|||
dependencies:
|
||||
lru-cache: 6.0.0
|
||||
|
||||
/semver@7.6.0:
|
||||
resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==}
|
||||
engines: {node: '>=10'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
lru-cache: 6.0.0
|
||||
dev: true
|
||||
|
||||
/send@0.18.0(supports-color@6.1.0):
|
||||
resolution: {integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==}
|
||||
engines: {node: '>= 0.8.0'}
|
||||
|
@ -12445,6 +12862,11 @@ packages:
|
|||
extend-shallow: 3.0.2
|
||||
dev: true
|
||||
|
||||
/split2@4.2.0:
|
||||
resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==}
|
||||
engines: {node: '>= 10.x'}
|
||||
dev: true
|
||||
|
||||
/sprintf-js@1.0.3:
|
||||
resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==}
|
||||
|
||||
|
@ -12705,6 +13127,11 @@ packages:
|
|||
resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==}
|
||||
engines: {node: '>=6'}
|
||||
|
||||
/strip-final-newline@3.0.0:
|
||||
resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==}
|
||||
engines: {node: '>=12'}
|
||||
dev: true
|
||||
|
||||
/strip-indent@3.0.0:
|
||||
resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==}
|
||||
engines: {node: '>=8'}
|
||||
|
@ -13120,6 +13547,11 @@ packages:
|
|||
minimatch: 3.1.2
|
||||
dev: true
|
||||
|
||||
/text-extensions@2.4.0:
|
||||
resolution: {integrity: sha512-te/NtwBwfiNRLf9Ijqx3T0nlqZiQ2XrrtBvu+cLL8ZRrGkO0NHTug8MYFKyoSrv/sHTaSKfilUkizV6XhxMJ3g==}
|
||||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
/text-table@0.2.0:
|
||||
resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==}
|
||||
dev: true
|
||||
|
@ -13420,6 +13852,11 @@ packages:
|
|||
ts-toolbelt: 9.6.0
|
||||
dev: false
|
||||
|
||||
/typescript@5.4.4:
|
||||
resolution: {integrity: sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw==}
|
||||
engines: {node: '>=14.17'}
|
||||
hasBin: true
|
||||
|
||||
/uglify-js@3.4.10:
|
||||
resolution: {integrity: sha512-Y2VsbPVs0FIshJztycsO2SfPk7/KAF/T72qzv9u5EpQ4kB2hQoHlhNQTsNyy6ul7lQtqJN/AoWeS23OzEiEFxw==}
|
||||
engines: {node: '>=0.8.0'}
|
||||
|
@ -13514,6 +13951,11 @@ packages:
|
|||
engines: {node: '>=4'}
|
||||
dev: true
|
||||
|
||||
/unicorn-magic@0.1.0:
|
||||
resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==}
|
||||
engines: {node: '>=18'}
|
||||
dev: true
|
||||
|
||||
/union-value@1.0.1:
|
||||
resolution: {integrity: sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
@ -14453,3 +14895,8 @@ packages:
|
|||
buffer-crc32: 0.2.13
|
||||
fd-slicer: 1.1.0
|
||||
dev: false
|
||||
|
||||
/yocto-queue@1.0.0:
|
||||
resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==}
|
||||
engines: {node: '>=12.20'}
|
||||
dev: true
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<email-body v-bind="$props">
|
||||
<div class="grid-row">
|
||||
<div class="grid-block vn-pa-ml">
|
||||
<h1>{{ $t('title') }}</h1>
|
||||
<p v-html="$t('description',
|
||||
[
|
||||
worker.nickname,
|
||||
labeler.id,
|
||||
sector.description,
|
||||
]
|
||||
)"/>
|
||||
</div>
|
||||
</div>
|
||||
</email-body>
|
|
@ -2,15 +2,14 @@ const Component = require(`vn-print/core/component`);
|
|||
const emailBody = new Component('email-body');
|
||||
|
||||
module.exports = {
|
||||
name: 'not-main-printer-configured',
|
||||
name: 'backup-printer-selected',
|
||||
async serverPrefetch() {
|
||||
this.sector = await this.findOneFromDef('sector', [this.sectorId]);
|
||||
|
||||
if (!this.sector)
|
||||
throw new Error('Something went wrong');
|
||||
|
||||
this.labeler = await this.findOneFromDef('printer', [this.labelerId]);
|
||||
this.mainPrinter = await this.findOneFromDef('printer', [this.sector.mainPrinterFk]);
|
||||
this.mainPrinter = await this.findOneFromDef('printer', [this.sector.backupPrinterFk]);
|
||||
this.worker = await this.findOneFromDef('worker', [this.workerId]);
|
||||
},
|
||||
components: {
|
||||
|
@ -29,5 +28,6 @@ module.exports = {
|
|||
type: Number,
|
||||
required: true
|
||||
}
|
||||
|
||||
}
|
||||
};
|
|
@ -0,0 +1,3 @@
|
|||
subject: Not main printer configured
|
||||
title: Not main printer configured
|
||||
description: 'The worker {0} is using the backup printer {1} for their sector {2}.'
|
|
@ -0,0 +1,3 @@
|
|||
subject: Seleccionada impresora de repuesto
|
||||
title: Seleccionada impresora de repuesto
|
||||
description: 'El trabajador {0} esta utilizando la impresora de repuesto {1} del sector {2}.'
|
|
@ -1,3 +1,4 @@
|
|||
SELECT id, name
|
||||
SELECT id,
|
||||
name
|
||||
FROM vn.printer
|
||||
WHERE id = ?
|
|
@ -0,0 +1,5 @@
|
|||
SELECT id,
|
||||
description,
|
||||
backupPrinterFk
|
||||
FROM vn.sector
|
||||
WHERE id = ?
|
|
@ -1,3 +0,0 @@
|
|||
subject: Not main printer configured
|
||||
title: Not main printer configured
|
||||
description: 'Printer #{0} {1} has been configured in sector #{2} {3} (the main printer for that sector is #{4} {5}). Ask the worker {6}.'
|
|
@ -1,3 +0,0 @@
|
|||
subject: Configurada impresora no principal
|
||||
title: Configurada impresora no principal
|
||||
description: 'Se ha configurado la impresora #{0} {1} en el sector #{2} {3} (la impresora principal de ese sector es la #{4} {5}). Preguntar al trabajador {6}.'
|
|
@ -1,8 +0,0 @@
|
|||
<email-body v-bind="$props">
|
||||
<div class="grid-row">
|
||||
<div class="grid-block vn-pa-ml">
|
||||
<h1>{{ $t('title') }}</h1>
|
||||
<p v-html="$t('description', [labeler.id, labeler.name, sector.id, sector.description, mainPrinter.id, mainPrinter.name, worker.nickname])"></p>
|
||||
</div>
|
||||
</div>
|
||||
</email-body>
|
|
@ -1,3 +0,0 @@
|
|||
SELECT id, description, mainPrinterFk
|
||||
FROM vn.sector
|
||||
WHERE id = ?
|
|
@ -0,0 +1,18 @@
|
|||
# win
|
||||
|
||||
In this folder, there are two scripts:
|
||||
1- 'addRule' : adds a rule to the Windows firewall to accept requests on ports 3000 and 5000.
|
||||
2- 'redirect' : allows redirecting ports 3000 and 5000 so that our machine processes them with our local Salix server.
|
||||
|
||||
|
||||
## Run
|
||||
|
||||
Two ways:
|
||||
|
||||
1-Search the project of Salix in WSL with the explorer of windows, for example: \\wsl.localhost\Debian\home\your_user\projects\salix and with a terminal Powershell with administrator permissions execute addRule.ps1 only one time and execute redirect.ps1 every time you need redirect ports when the project is running.
|
||||
|
||||
2-Search the project of Salix in WSL with the explorer of windows and edit the files with .lnk with the path of your installation of Salix. So , you will have a direct link for execute.
|
||||
|
||||
## Server
|
||||
|
||||
To access your Salix server, you can directly enter the IP or name of your computer along with the corresponding port
|
|
@ -0,0 +1,26 @@
|
|||
# Definir las propiedades de la nueva regla
|
||||
# Define el nombre de la regla
|
||||
$ruleName = "salixRule"
|
||||
|
||||
# Define el perfil de la regla (Dominio, Privado, P<>blico)
|
||||
$profile = "Domain,Private,Public"
|
||||
|
||||
# Define la acción (Permitir/Bloquear)
|
||||
$action = "Allow"
|
||||
|
||||
# Define el protocolo (TCP/UDP)
|
||||
$protocol = "TCP"
|
||||
|
||||
# Define el puerto local
|
||||
$port = 3000, 5000
|
||||
|
||||
# Define una descripción (opcional)
|
||||
$description = "Permitir tráfico HTTP.Frontend y backend Salix."
|
||||
|
||||
# Crea la regla de firewall
|
||||
New-NetFirewallRule -DisplayName $ruleName -Profile $profile -Action $action -Protocol $protocol -LocalPort $port -Description $description
|
||||
|
||||
# Imprime un mensaje de confirmación
|
||||
Write-Host "Regla de firewall creada exitosamente: $ruleName"
|
||||
|
||||
pause
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,5 @@
|
|||
# Redireccionar ports
|
||||
|
||||
$wslip = ((wsl hostname -I) -split " ")[0]
|
||||
netsh interface portproxy set v4tov4 listenport=3000 listenaddress=0.0.0.0 connectport=3000 connectaddress=$wslip
|
||||
netsh interface portproxy set v4tov4 listenport=5000 listenaddress=0.0.0.0 connectport=5000 connectaddress=$wslip
|
Loading…
Reference in New Issue