diff --git a/apps/core/src/domain/tasksManager/tasksManagerDomain.spec.ts b/apps/core/src/domain/tasksManager/tasksManagerDomain.spec.ts index b249615ed..04088a647 100644 --- a/apps/core/src/domain/tasksManager/tasksManagerDomain.spec.ts +++ b/apps/core/src/domain/tasksManager/tasksManagerDomain.spec.ts @@ -3,14 +3,15 @@ // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt import {IAmqpService} from '@leav/message-broker'; import * as amqp from 'amqplib'; -import {IEventsManagerDomain} from 'domain/eventsManager/eventsManagerDomain'; -import {ITaskRepo} from 'infra/task/taskRepo'; -import {IUtils} from 'utils/utils'; -import {IConfig} from '_types/config'; +import {IEventsManagerDomain} from '../../domain/eventsManager/eventsManagerDomain'; +import {ITaskRepo} from '../../infra/task/taskRepo'; +import {IUtils} from '../../utils/utils'; +import {IConfig} from '../../_types/config'; import {TaskCallbackStatus, TaskStatus} from '../../_types/tasksManager'; import {mockCtx} from '../../__tests__/mocks/shared'; import {mockTask} from '../../__tests__/mocks/task'; import tasksManager from './tasksManagerDomain'; +import {Mockify} from '@leav/utils'; const mockAmqpChannel: Mockify = { assertExchange: jest.fn(), @@ -79,8 +80,8 @@ describe('Tasks Manager', () => { await tm.createTask(mockTask, mockCtx); - expect(mockTaskRepo.createTask).toBeCalledTimes(1); - expect(mockEventsManager.sendPubSubEvent).toBeCalledTimes(1); + expect(mockTaskRepo.createTask).toHaveBeenCalledTimes(1); + expect(mockEventsManager.sendPubSubEvent).toHaveBeenCalledTimes(1); }); test('Delete task', async () => { @@ -97,7 +98,7 @@ describe('Tasks Manager', () => { await tm.deleteTasks([mockTask], mockCtx); - expect(mockTaskRepo.deleteTask).toBeCalledTimes(1); + expect(mockTaskRepo.deleteTask).toHaveBeenCalledTimes(1); }); test('Archive task', async () => { @@ -114,8 +115,8 @@ describe('Tasks Manager', () => { await tm.deleteTasks([{...mockTask, archive: true}], mockCtx); - expect(mockTaskRepo.updateTask).toBeCalledTimes(1); - expect(mockEventsManager.sendPubSubEvent).toBeCalledTimes(1); + expect(mockTaskRepo.updateTask).toHaveBeenCalledTimes(1); + expect(mockEventsManager.sendPubSubEvent).toHaveBeenCalledTimes(1); }); test('Cancel task', async () => { @@ -137,8 +138,8 @@ describe('Tasks Manager', () => { await tm.cancelTask(mockTask, mockCtx); - expect(mockTaskRepo.updateTask).toBeCalledTimes(1); - expect(mockEventsManager.sendPubSubEvent).toBeCalledTimes(1); + expect(mockTaskRepo.updateTask).toHaveBeenCalledTimes(1); + expect(mockEventsManager.sendPubSubEvent).toHaveBeenCalledTimes(1); }); test('Get tasks', async () => { @@ -153,7 +154,7 @@ describe('Tasks Manager', () => { await tm.getTasks({params: {}, ctx: mockCtx}); - expect(mockTaskRepo.getTasks).toBeCalledTimes(1); + expect(mockTaskRepo.getTasks).toHaveBeenCalledTimes(1); }); test('Init Master / Task to execute', async () => { @@ -192,8 +193,8 @@ describe('Tasks Manager', () => { await new Promise(r => setTimeout(r, conf.tasksManager.checkingInterval + 1)); - expect(mockAmqpService.consumer.channel.assertQueue).toBeCalledTimes(1); - expect(mockAmqpService.consumer.channel.bindQueue).toBeCalledTimes(1); + expect(mockAmqpService.consumer.channel.assertQueue).toHaveBeenCalledTimes(1); + expect(mockAmqpService.consumer.channel.bindQueue).toHaveBeenCalledTimes(1); expect(mockTaskRepo.updateTask).toBeCalledWith( {id: mockTask.id, status: TaskStatus.PENDING}, @@ -243,8 +244,8 @@ describe('Tasks Manager', () => { await new Promise(r => setTimeout(r, conf.tasksManager.checkingInterval + 1)); - expect(mockAmqpService.consumer.channel.assertQueue).toBeCalledTimes(1); - expect(mockAmqpService.consumer.channel.bindQueue).toBeCalledTimes(1); + expect(mockAmqpService.consumer.channel.assertQueue).toHaveBeenCalledTimes(1); + expect(mockAmqpService.consumer.channel.bindQueue).toHaveBeenCalledTimes(1); expect(mockAmqpService.publish).toBeCalled(); @@ -290,8 +291,8 @@ describe('Tasks Manager', () => { await new Promise(r => setTimeout(r, conf.tasksManager.checkingInterval + 1)); - expect(mockAmqpService.consumer.channel.assertQueue).toBeCalledTimes(1); - expect(mockAmqpService.consumer.channel.bindQueue).toBeCalledTimes(1); + expect(mockAmqpService.consumer.channel.assertQueue).toHaveBeenCalledTimes(1); + expect(mockAmqpService.consumer.channel.bindQueue).toHaveBeenCalledTimes(1); expect(mockTaskRepo.updateTask).toBeCalledWith( {id: mockTask.id, callbacks: [{...mockTask.callbacks[0], status: TaskCallbackStatus.RUNNING}]}, @@ -321,9 +322,18 @@ describe('Tasks Manager', () => { await tm.initWorker(); - expect(mockAmqpService.consume).toBeCalledTimes(2); - expect(mockAmqpService.consumer.channel.assertQueue).toBeCalledTimes(1); - expect(mockAmqpService.consumer.channel.bindQueue).toBeCalledTimes(1); + expect(mockAmqpService.consume).toHaveBeenCalledTimes(2); + expect(mockAmqpService.consumer.channel.assertQueue).toHaveBeenCalledTimes(2); + expect(mockAmqpService.consumer.channel.assertQueue).toHaveBeenNthCalledWith( + 1, + conf.tasksManager?.queues.execOrders + ); + expect(mockAmqpService.consumer.channel.assertQueue).toHaveBeenNthCalledWith( + 2, + expect.stringMatching(conf.tasksManager?.queues.cancelOrders), + {autoDelete: true, durable: false, exclusive: true} + ); + expect(mockAmqpService.consumer.channel.bindQueue).toHaveBeenCalledTimes(1); }); test('Update progress', async () => { @@ -344,12 +354,12 @@ describe('Tasks Manager', () => { mockCtx ); - expect(mockTaskRepo.getTasks).toBeCalledTimes(1); + expect(mockTaskRepo.getTasks).toHaveBeenCalledTimes(1); expect(mockTaskRepo.updateTask).toBeCalledWith( {id: mockTask.id, progress: {percent: 55, description: {fr: 'description', en: 'description'}}}, mockCtx ); - expect(mockEventsManager.sendPubSubEvent).toBeCalledTimes(1); + expect(mockEventsManager.sendPubSubEvent).toHaveBeenCalledTimes(1); await tm.updateProgress( mockTask.id, @@ -377,8 +387,8 @@ describe('Tasks Manager', () => { await tm.setLink(mockTask.id, {name: 'name', url: 'url'}, mockCtx); - expect(mockTaskRepo.getTasks).toBeCalledTimes(1); + expect(mockTaskRepo.getTasks).toHaveBeenCalledTimes(1); expect(mockTaskRepo.updateTask).toBeCalledWith({id: mockTask.id, link: {name: 'name', url: 'url'}}, mockCtx); - expect(mockEventsManager.sendPubSubEvent).toBeCalledTimes(1); + expect(mockEventsManager.sendPubSubEvent).toHaveBeenCalledTimes(1); }); }); diff --git a/apps/core/src/domain/tasksManager/tasksManagerDomain.ts b/apps/core/src/domain/tasksManager/tasksManagerDomain.ts index 525fa4202..3e76b7eaf 100644 --- a/apps/core/src/domain/tasksManager/tasksManagerDomain.ts +++ b/apps/core/src/domain/tasksManager/tasksManagerDomain.ts @@ -457,6 +457,8 @@ export default function ({ }; const _listenExecOrders = async () => { + await amqpService.consumer.channel.assertQueue(config.tasksManager.queues.execOrders); + await amqpService.consume( config.tasksManager.queues.execOrders, config.tasksManager.routingKeys.execOrders, @@ -499,7 +501,6 @@ export default function ({ config.amqp.exchange, config.tasksManager.routingKeys.execOrders ); - return _monitorTasks({ userId: config.defaultUserId, queryId: 'TasksManagerDomain' diff --git a/libs/ui/package.json b/libs/ui/package.json index 882e2c4be..26b39140b 100644 --- a/libs/ui/package.json +++ b/libs/ui/package.json @@ -63,7 +63,7 @@ "dependencies": { "@ckeditor/ckeditor5-build-inline": "39.0.1", "@ckeditor/ckeditor5-react": "6.1.0", - "@leav/utils": "0.0.2", + "@leav/utils": "0.0.3", "dompurify": "3.0.5", "html-react-parser": "4.2.2", "i18next-resources-to-backend": "1.1.4", diff --git a/libs/utils/dist/cjs/types/forms.d.ts b/libs/utils/dist/cjs/types/forms.d.ts index b119927bf..49b92f501 100644 --- a/libs/utils/dist/cjs/types/forms.d.ts +++ b/libs/utils/dist/cjs/types/forms.d.ts @@ -22,6 +22,7 @@ export declare enum TabsDirection { export interface ICommonFieldsSettings { label?: Record; attribute?: string; + useAttributeLabel?: boolean; } export interface IRequiredFieldsSettings extends ICommonFieldsSettings { required?: boolean; diff --git a/libs/utils/dist/cjs/types/forms.js.map b/libs/utils/dist/cjs/types/forms.js.map index 99553fbb3..cec4096ce 100644 --- a/libs/utils/dist/cjs/types/forms.js.map +++ b/libs/utils/dist/cjs/types/forms.js.map @@ -1 +1 @@ -{"version":3,"file":"forms.js","sourceRoot":"","sources":["../../../src/types/forms.ts"],"names":[],"mappings":";;;AAKA,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC1B,yCAAmB,CAAA;IACnB,2DAAqC,CAAA;IACrC,mEAA6C,CAAA;IAC7C,+CAAyB,CAAA;IACzB,mCAAa,CAAA;AACjB,CAAC,EANW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAM7B;AAED,IAAY,cAQX;AARD,WAAY,cAAc;IACtB,4CAA0B,CAAA;IAC1B,+BAAa,CAAA;IACb,uCAAqB,CAAA;IACrB,yCAAuB,CAAA;IACvB,uCAAqB,CAAA;IACrB,+BAAa,CAAA;IACb,+BAAa,CAAA;AACjB,CAAC,EARW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAQzB;AAED,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,0CAAyB,CAAA;IACzB,sCAAqB,CAAA;AACzB,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB;AAyCY,QAAA,sBAAsB,GAAG,QAAQ,CAAC"} \ No newline at end of file +{"version":3,"file":"forms.js","sourceRoot":"","sources":["../../../src/types/forms.ts"],"names":[],"mappings":";;;AAKA,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC1B,yCAAmB,CAAA;IACnB,2DAAqC,CAAA;IACrC,mEAA6C,CAAA;IAC7C,+CAAyB,CAAA;IACzB,mCAAa,CAAA;AACjB,CAAC,EANW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAM7B;AAED,IAAY,cAQX;AARD,WAAY,cAAc;IACtB,4CAA0B,CAAA;IAC1B,+BAAa,CAAA;IACb,uCAAqB,CAAA;IACrB,yCAAuB,CAAA;IACvB,uCAAqB,CAAA;IACrB,+BAAa,CAAA;IACb,+BAAa,CAAA;AACjB,CAAC,EARW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAQzB;AAED,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,0CAAyB,CAAA;IACzB,sCAAqB,CAAA;AACzB,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB;AA0CY,QAAA,sBAAsB,GAAG,QAAQ,CAAC"} \ No newline at end of file diff --git a/libs/utils/dist/cjs/types/helpers.d.ts b/libs/utils/dist/cjs/types/helpers.d.ts index ff1c34052..00c7fa87f 100644 --- a/libs/utils/dist/cjs/types/helpers.d.ts +++ b/libs/utils/dist/cjs/types/helpers.d.ts @@ -10,5 +10,7 @@ export declare type WithTypename = { readonly __typename?: string; }; export declare type Mockify = { - [P in keyof T]?: T[P] extends (...args: any) => any ? jest.Mock : T[P]; + [P in keyof T]?: T[P] extends (...args: any[]) => any + ? jest.Mock extends never ? never : any> + : T[P]; }; diff --git a/libs/utils/dist/cjs/utils.js b/libs/utils/dist/cjs/utils.js index 9981ff500..ac8e74657 100644 --- a/libs/utils/dist/cjs/utils.js +++ b/libs/utils/dist/cjs/utils.js @@ -72,7 +72,7 @@ exports.localizedTranslation = localizedTranslation; */ const stringToColor = (str = '', format = 'hsl', saturation = 30, luminosity = 80) => { let hash = 0; - for (let i = 0; i < (str !== null && str !== void 0 ? str : '').length; i++) { + for (let i = 0; i < (str ?? '').length; i++) { // eslint-disable-next-line no-bitwise hash = str.charCodeAt(i) + ((hash << 5) - hash); } @@ -157,10 +157,10 @@ const extractArgsFromString = (mapping) => { .split('-') .slice(1) .map(e => e.replace(/\s+/g, ' ').trim().split(' ')); - return args.reduce((acc, value) => { var _a; return (Object.assign(Object.assign({}, acc), { [value[0]]: (_a = value[1]) !== null && _a !== void 0 ? _a : true })); }, {}); + return args.reduce((acc, value) => ({ ...acc, [value[0]]: value[1] ?? true }), {}); }; exports.extractArgsFromString = extractArgsFromString; -const objectToNameValueArray = (obj) => Object.keys(obj !== null && obj !== void 0 ? obj : {}).map(key => ({ name: key, value: obj[key] })); +const objectToNameValueArray = (obj) => Object.keys(obj ?? {}).map(key => ({ name: key, value: obj[key] })); exports.objectToNameValueArray = objectToNameValueArray; const nameValArrayToObj = (arr = [], keyFieldName = 'name', valueFieldName = 'value') => Array.isArray(arr) && arr.length ? arr.reduce((formattedElem, elem) => { @@ -268,7 +268,6 @@ const simpleStringHash = (str) => { }; exports.simpleStringHash = simpleStringHash; const getFlagByLang = (lang) => { - var _a; const flagsByLang = { en: '🇬🇧', es: '🇪🇸', @@ -280,7 +279,7 @@ const getFlagByLang = (lang) => { ja: '🇯🇵', ko: '🇰🇷' // Korean }; - return (_a = flagsByLang[lang]) !== null && _a !== void 0 ? _a : ''; + return flagsByLang[lang] ?? ''; }; exports.getFlagByLang = getFlagByLang; const getLogsIndexName = (instanceId) => `logs-${instanceId}`; @@ -305,7 +304,7 @@ exports.isTypeStandard = isTypeStandard; * Return a new object without the keys passed in parameter */ const omit = (obj, ...keys) => { - const result = Object.assign({}, obj); + const result = { ...obj }; keys.forEach(key => delete result[key]); return result; }; diff --git a/libs/utils/dist/cjs/utils.js.map b/libs/utils/dist/cjs/utils.js.map index 0093a6916..7a4887163 100644 --- a/libs/utils/dist/cjs/utils.js.map +++ b/libs/utils/dist/cjs/utils.js.map @@ -1 +1 @@ -{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gCAAgC;AAChC,sCAAsC;AACtC,sEAAsE;AACtE,iEAAyC;AACzC,uDAA+B;AAC/B,6DAAqC;AACrC,uEAA+C;AAC/C,6DAAqC;AACrC,mEAA2C;AAC3C,0DAAkC;AAClC,mEAAqD;AACrD,mDAAiD;AACjD,yCAAuC;AAGhC,MAAM,6BAA6B,GAAG,CAAC,OAAe,EAAU,EAAE,CACrE,IAAA,cAAI,EAAC,CAAC,mBAAS,EAAE,oBAAU,EAAE,iBAAO,EAAE,IAAA,sBAA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G,EAAC,CAAC;IACxB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IACxC,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC;AAJW,QAAA,IAAI,QAIf"} \ No newline at end of file diff --git a/libs/utils/dist/esm/types/forms.d.ts b/libs/utils/dist/esm/types/forms.d.ts index b119927bf..49b92f501 100644 --- a/libs/utils/dist/esm/types/forms.d.ts +++ b/libs/utils/dist/esm/types/forms.d.ts @@ -22,6 +22,7 @@ export declare enum TabsDirection { export interface ICommonFieldsSettings { label?: Record; attribute?: string; + useAttributeLabel?: boolean; } export interface IRequiredFieldsSettings extends ICommonFieldsSettings { required?: boolean; diff --git a/libs/utils/dist/esm/types/forms.js.map b/libs/utils/dist/esm/types/forms.js.map index 41eef5268..ae0d32ad2 100644 --- a/libs/utils/dist/esm/types/forms.js.map +++ b/libs/utils/dist/esm/types/forms.js.map @@ -1 +1 @@ -{"version":3,"file":"forms.js","sourceRoot":"","sources":["../../../src/types/forms.ts"],"names":[],"mappings":"AAKA,MAAM,CAAN,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC1B,yCAAmB,CAAA;IACnB,2DAAqC,CAAA;IACrC,mEAA6C,CAAA;IAC7C,+CAAyB,CAAA;IACzB,mCAAa,CAAA;AACjB,CAAC,EANW,kBAAkB,KAAlB,kBAAkB,QAM7B;AAED,MAAM,CAAN,IAAY,cAQX;AARD,WAAY,cAAc;IACtB,4CAA0B,CAAA;IAC1B,+BAAa,CAAA;IACb,uCAAqB,CAAA;IACrB,yCAAuB,CAAA;IACvB,uCAAqB,CAAA;IACrB,+BAAa,CAAA;IACb,+BAAa,CAAA;AACjB,CAAC,EARW,cAAc,KAAd,cAAc,QAQzB;AAED,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,0CAAyB,CAAA;IACzB,sCAAqB,CAAA;AACzB,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB;AAyCD,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC"} \ No newline at end of file +{"version":3,"file":"forms.js","sourceRoot":"","sources":["../../../src/types/forms.ts"],"names":[],"mappings":"AAKA,MAAM,CAAN,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC1B,yCAAmB,CAAA;IACnB,2DAAqC,CAAA;IACrC,mEAA6C,CAAA;IAC7C,+CAAyB,CAAA;IACzB,mCAAa,CAAA;AACjB,CAAC,EANW,kBAAkB,KAAlB,kBAAkB,QAM7B;AAED,MAAM,CAAN,IAAY,cAQX;AARD,WAAY,cAAc;IACtB,4CAA0B,CAAA;IAC1B,+BAAa,CAAA;IACb,uCAAqB,CAAA;IACrB,yCAAuB,CAAA;IACvB,uCAAqB,CAAA;IACrB,+BAAa,CAAA;IACb,+BAAa,CAAA;AACjB,CAAC,EARW,cAAc,KAAd,cAAc,QAQzB;AAED,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,0CAAyB,CAAA;IACzB,sCAAqB,CAAA;AACzB,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB;AA0CD,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC"} \ No newline at end of file diff --git a/libs/utils/dist/esm/types/helpers.d.ts b/libs/utils/dist/esm/types/helpers.d.ts index ff1c34052..00c7fa87f 100644 --- a/libs/utils/dist/esm/types/helpers.d.ts +++ b/libs/utils/dist/esm/types/helpers.d.ts @@ -10,5 +10,7 @@ export declare type WithTypename = { readonly __typename?: string; }; export declare type Mockify = { - [P in keyof T]?: T[P] extends (...args: any) => any ? jest.Mock : T[P]; + [P in keyof T]?: T[P] extends (...args: any[]) => any + ? jest.Mock extends never ? never : any> + : T[P]; }; diff --git a/libs/utils/dist/esm/utils.js b/libs/utils/dist/esm/utils.js index d3d3e1cf4..f0148a789 100644 --- a/libs/utils/dist/esm/utils.js +++ b/libs/utils/dist/esm/utils.js @@ -39,7 +39,7 @@ export const localizedTranslation = (translations, availableLanguages) => { */ export const stringToColor = (str = '', format = 'hsl', saturation = 30, luminosity = 80) => { let hash = 0; - for (let i = 0; i < (str !== null && str !== void 0 ? str : '').length; i++) { + for (let i = 0; i < (str ?? '').length; i++) { // eslint-disable-next-line no-bitwise hash = str.charCodeAt(i) + ((hash << 5) - hash); } @@ -122,9 +122,9 @@ export const extractArgsFromString = (mapping) => { .split('-') .slice(1) .map(e => e.replace(/\s+/g, ' ').trim().split(' ')); - return args.reduce((acc, value) => { var _a; return (Object.assign(Object.assign({}, acc), { [value[0]]: (_a = value[1]) !== null && _a !== void 0 ? _a : true })); }, {}); + return args.reduce((acc, value) => ({ ...acc, [value[0]]: value[1] ?? true }), {}); }; -export const objectToNameValueArray = (obj) => Object.keys(obj !== null && obj !== void 0 ? obj : {}).map(key => ({ name: key, value: obj[key] })); +export const objectToNameValueArray = (obj) => Object.keys(obj ?? {}).map(key => ({ name: key, value: obj[key] })); export const nameValArrayToObj = (arr = [], keyFieldName = 'name', valueFieldName = 'value') => Array.isArray(arr) && arr.length ? arr.reduce((formattedElem, elem) => { formattedElem[elem[keyFieldName]] = elem[valueFieldName]; @@ -224,7 +224,6 @@ export const simpleStringHash = (str) => { return Math.abs(hash); }; export const getFlagByLang = (lang) => { - var _a; const flagsByLang = { en: '🇬🇧', es: '🇪🇸', @@ -236,7 +235,7 @@ export const getFlagByLang = (lang) => { ja: '🇯🇵', ko: '🇰🇷' // Korean }; - return (_a = flagsByLang[lang]) !== null && _a !== void 0 ? _a : ''; + return flagsByLang[lang] ?? ''; }; export const getLogsIndexName = (instanceId) => `logs-${instanceId}`; export const waitFor = async (predicate, options = {}) => { @@ -256,7 +255,7 @@ export const isTypeStandard = (type) => type === AttributeType.simple || type == * Return a new object without the keys passed in parameter */ export const omit = (obj, ...keys) => { - const result = Object.assign({}, obj); + const result = { ...obj }; keys.forEach(key => delete result[key]); return result; }; diff --git a/libs/utils/dist/esm/utils.js.map b/libs/utils/dist/esm/utils.js.map index 952858dbd..189b1cf36 100644 --- a/libs/utils/dist/esm/utils.js.map +++ b/libs/utils/dist/esm/utils.js.map @@ -1 +1 @@ -{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,SAAS,MAAM,kBAAkB,CAAC;AACzC,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,OAAO,MAAM,gBAAgB,CAAC;AACrC,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,OAAO,MAAM,gBAAgB,CAAC;AACrC,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAC3C,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAGvC,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,OAAe,EAAU,EAAE,CACrE,IAAI,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;AAEhF,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,OAAe,EAAU,EAAE,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;AAEnH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAAc,EAAE,SAAmB,EAAE,UAAoB,EAAE,QAAgB,EAAW,EAAE;IAClH,gEAAgE;IAChE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE;QACnB,SAAS,GAAG,CAAC,IAAI,CAAC,CAAC;KACtB;IAED,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,SAAS,CAAC,QAAQ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AmB,EAAE,EAAE,CAAC,IAAI,KAAK,aAAa,CAAC,MAAM,IAAI,IAAI,KAAK,aAAa,CAAC,QAAQ,CAAC;AAExH;;GAEG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAsC,GAAM,EAAE,GAAG,IAAS,EAAc,EAAE;IAC1F,MAAM,MAAM,GAAG,EAAC,GAAG,GAAG,EAAC,CAAC;IACxB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IACxC,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC"} \ No newline at end of file diff --git a/libs/utils/package.json b/libs/utils/package.json index cf16e4af4..d0cccb9fe 100644 --- a/libs/utils/package.json +++ b/libs/utils/package.json @@ -1,6 +1,6 @@ { "name": "@leav/utils", - "version": "0.0.2", + "version": "0.0.3", "files": [ "dist" ], diff --git a/libs/utils/src/types/helpers.ts b/libs/utils/src/types/helpers.ts index e6bb43997..484ed848c 100644 --- a/libs/utils/src/types/helpers.ts +++ b/libs/utils/src/types/helpers.ts @@ -16,4 +16,8 @@ export type WithTypename = { readonly __typename?: string; }; -export type Mockify = {[P in keyof T]?: T[P] extends (...args: any) => any ? jest.Mock : T[P]}; +export type Mockify = { + [P in keyof T]?: T[P] extends (...args: any[]) => any + ? jest.Mock extends never ? never : any> + : T[P]; +}; diff --git a/yarn.lock b/yarn.lock index dc2fb1f95..7521a79d6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8128,7 +8128,7 @@ __metadata: "@ckeditor/ckeditor5-react": "npm:6.1.0" "@graphql-codegen/add": "npm:5.0.0" "@graphql-codegen/cli": "npm:5.0.0" - "@leav/utils": "npm:0.0.2" + "@leav/utils": "npm:0.0.3" "@testing-library/jest-dom": "npm:5.16.5" "@testing-library/react": "npm:14.0.0" "@testing-library/react-hooks": "npm:8.0.1" @@ -8175,7 +8175,7 @@ __metadata: languageName: unknown linkType: soft -"@leav/utils@npm:0.0.2, @leav/utils@workspace:*, @leav/utils@workspace:libs/utils": +"@leav/utils@npm:0.0.3, @leav/utils@workspace:*, @leav/utils@workspace:libs/utils": version: 0.0.0-use.local resolution: "@leav/utils@workspace:libs/utils" dependencies: