From f8a6c4cb4e3c46c303b50b7a483576f696704d0c Mon Sep 17 00:00:00 2001 From: Anna Khismatullina Date: Tue, 24 Dec 2024 21:07:50 +0700 Subject: [PATCH] Fixes --- common/config/rush/pnpm-lock.yaml | 58 +++++++++++++-------------- packages/importer/package.json | 2 +- packages/importer/src/huly/unified.ts | 6 +-- 3 files changed, 32 insertions(+), 34 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 8f417b977a..e6dfb33585 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -310,7 +310,7 @@ dependencies: version: file:projects/import-tool.tgz '@rush-temp/importer': specifier: file:./projects/importer.tgz - version: file:projects/importer.tgz + version: file:projects/importer.tgz(esbuild@0.20.1)(ts-node@10.9.2) '@rush-temp/inventory': specifier: file:./projects/inventory.tgz version: file:projects/inventory.tgz(@types/node@20.11.19)(esbuild@0.20.1)(ts-node@10.9.2) @@ -1455,7 +1455,7 @@ dependencies: specifier: ^4.23.3 version: 4.23.3 bson: - specifier: ^6.10.0 + specifier: ^6.10.1 version: 6.10.1 bufferutil: specifier: ^4.0.8 @@ -1740,7 +1740,7 @@ dependencies: specifier: ^8.0.0 version: 8.0.0 mongodb: - specifier: ^6.10.0 + specifier: ^6.12.0 version: 6.12.0 morgan: specifier: ^1.10.0 @@ -22052,7 +22052,7 @@ packages: dev: false file:projects/account-service.tgz: - resolution: {integrity: sha512-Kxz4jt8+j+W4r7hgcpPq5D1wVL5G4AmpEWF6yxyUTR6+vxQERCTILfJo6wRbecPBvEPcFvA7Snogo8exY2YJQg==, tarball: file:projects/account-service.tgz} + resolution: {integrity: sha512-KccMpHZPWb+Y0Q7JY9dylcbNj1a8vkbyhFfi2z1bJGClZb1CczesAs/NL5RzElAlOv9Aq1M6cCVZ2YXyijZJRQ==, tarball: file:projects/account-service.tgz} name: '@rush-temp/account-service' version: 0.0.0 dependencies: @@ -22102,7 +22102,7 @@ packages: dev: false file:projects/account.tgz(@types/node@20.11.19)(esbuild@0.20.1)(ts-node@10.9.2): - resolution: {integrity: sha512-R9WSNuYeIemHJ7eAv7sCyf8IZHZott9CY1b/KJLAknaJfozXLQ6yOYszJjS/iWQRPl4TFFLgYsQaLWd1gDiqww==, tarball: file:projects/account.tgz} + resolution: {integrity: sha512-aFUxA1twR0m+7sDVFXyKoeVQtVLMrr973LpLK6LHrRa+PD010X6+AyoOkkyVJKFN0Q6zu2Oqz88PsEt50Z2Mjg==, tarball: file:projects/account.tgz} id: file:projects/account.tgz name: '@rush-temp/account' version: 0.0.0 @@ -22655,7 +22655,7 @@ packages: dev: false file:projects/auth-providers.tgz(@types/node@20.11.19)(esbuild@0.20.1)(ts-node@10.9.2): - resolution: {integrity: sha512-G5K3IOYAnIhbM3yteX6zfQ600ZYLT3hfFX3KCymz9p92ig9MgqTnswWyUc3eztDBgVYZ9vWZSWX+s7ir0a2avQ==, tarball: file:projects/auth-providers.tgz} + resolution: {integrity: sha512-jUJhz8FiPT3x0ybVjdPysK9HBA/E1UzU+QraBxLurUXjwKzqnob4Jw112MUJzyHjAiAmYQGYq7jEePiav6nnMQ==, tarball: file:projects/auth-providers.tgz} id: file:projects/auth-providers.tgz name: '@rush-temp/auth-providers' version: 0.0.0 @@ -23522,7 +23522,7 @@ packages: dev: false file:projects/collaborator.tgz(@tiptap/pm@2.6.6)(bufferutil@4.0.8)(utf-8-validate@6.0.4)(y-protocols@1.0.6): - resolution: {integrity: sha512-wkzuDxcUSdfZsCuq7XLd//TTlQFPj++i/AIbxSt6j4M2S/J0sRJnmr4ylfU3vh9F33hrhxhEu3VUKdugNarTTA==, tarball: file:projects/collaborator.tgz} + resolution: {integrity: sha512-T6VYctK5k8hLw4qOg4fzEKYBlt+Zntz0rAbC95VwqEYFWJoR7VgzZFq4cPpKlFqHrPnQoNvvhtUyWKLNtobtQg==, tarball: file:projects/collaborator.tgz} id: file:projects/collaborator.tgz name: '@rush-temp/collaborator' version: 0.0.0 @@ -25130,7 +25130,7 @@ packages: dev: false file:projects/import-tool.tgz: - resolution: {integrity: sha512-+aINV0yg8OL4e+HL4NEtM879eZSQEDyUwuIKcRl2jtzlaGqoUnAoBx56ds3ynehouocaZxhUz+FuRsNA8j6YdQ==, tarball: file:projects/import-tool.tgz} + resolution: {integrity: sha512-Pkbjr/0XN1X7G8Gi6vwh0DjhRr8f0un2HSW2ef6ZMsIv2MyH8BgE2erUpXmzHETxSKsyJllAm6T1DmfSa26XIg==, tarball: file:projects/import-tool.tgz} name: '@rush-temp/import-tool' version: 0.0.0 dependencies: @@ -25173,12 +25173,13 @@ packages: - supports-color dev: false - file:projects/importer.tgz: - resolution: {integrity: sha512-NPWdDMTZZVuM4tlCiUWR3m8XTpr0zD9iNzJBgZZ76JoXwu8Tvimw0CVVCQl2twn7UayHyBLgiJ1Gy5nZHbk2+w==, tarball: file:projects/importer.tgz} + file:projects/importer.tgz(esbuild@0.20.1)(ts-node@10.9.2): + resolution: {integrity: sha512-nd4QEoFM7LFj37X/9PCtKl2HTaQl3xnpCbJL+FBuYPJhimHzG4KTvb3E5vZ31OZxgAzYBBLZb1KsswqqlXAJ9A==, tarball: file:projects/importer.tgz} + id: file:projects/importer.tgz name: '@rush-temp/importer' version: 0.0.0 dependencies: - '@types/csvtojson': 2.0.0 + '@types/csvtojson': 2.0.3 '@types/jest': 29.5.12 '@types/js-yaml': 4.0.9 '@types/mime-types': 2.1.4 @@ -25186,31 +25187,28 @@ packages: '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.56.0)(typescript@5.6.2) '@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.6.2) commander: 8.3.0 - cross-env: 7.0.3 csvtojson: 2.0.10 - esbuild: 0.20.1 eslint: 8.56.0 eslint-config-standard-with-typescript: 40.0.0(@typescript-eslint/eslint-plugin@6.21.0)(eslint-plugin-import@2.29.1)(eslint-plugin-n@15.7.0)(eslint-plugin-promise@6.1.1)(eslint@8.56.0)(typescript@5.6.2) eslint-plugin-import: 2.29.1(eslint@8.56.0) eslint-plugin-n: 15.7.0(eslint@8.56.0) eslint-plugin-promise: 6.1.1(eslint@8.56.0) + image-size: 1.1.1 jest: 29.7.0(@types/node@20.11.19)(ts-node@10.9.2) js-yaml: 4.1.0 mime-types: 2.1.35 prettier: 3.2.5 ts-jest: 29.1.2(esbuild@0.20.1)(jest@29.7.0)(typescript@5.6.2) - ts-node: 10.9.2(@types/node@20.11.19)(typescript@5.6.2) typescript: 5.6.2 - yjs: 13.6.19 transitivePeerDependencies: - '@babel/core' - '@jest/types' - - '@swc/core' - - '@swc/wasm' - babel-jest - babel-plugin-macros + - esbuild - node-notifier - supports-color + - ts-node dev: false file:projects/inventory-assets.tgz(esbuild@0.20.1)(ts-node@10.9.2): @@ -27260,7 +27258,7 @@ packages: dev: false file:projects/mongo.tgz(esbuild@0.20.1)(ts-node@10.9.2): - resolution: {integrity: sha512-xB0zBtKiqfZFDuO6ltvKBmnAXyB5nYUN5o3LKI4a7GYjc3PWSwumUfeOPHY42xUkGVmoGM9tZivAOxZ+NdzT4Q==, tarball: file:projects/mongo.tgz} + resolution: {integrity: sha512-aqU57iG6awiTX9qWSrzXMKyHSbt0V8mKAutQjE3uCx9FdPpnGiZjJflWsMS5PaZ4MdNazv2vUg4XPDHKCc4A/A==, tarball: file:projects/mongo.tgz} id: file:projects/mongo.tgz name: '@rush-temp/mongo' version: 0.0.0 @@ -27652,7 +27650,7 @@ packages: dev: false file:projects/pod-account.tgz: - resolution: {integrity: sha512-VxXlh9Nmh7BJpscc1EioNn9/R30Q0oisiBRqEkVE+r0+BiiV60ZzpQoiwWlbGiKp3FlB4IoQbJEgiTxPAm0blw==, tarball: file:projects/pod-account.tgz} + resolution: {integrity: sha512-TAOKeZxld3/nLRHUUQP88QK1vFYsZMZmPwO6GFeuhMt8jerigx5xJ9gGFGevawJYtAZxVuh1ldl4+jNi3QTxmQ==, tarball: file:projects/pod-account.tgz} name: '@rush-temp/pod-account' version: 0.0.0 dependencies: @@ -27701,7 +27699,7 @@ packages: dev: false file:projects/pod-ai-bot.tgz(bufferutil@4.0.8)(utf-8-validate@6.0.4)(zod@3.23.8): - resolution: {integrity: sha512-PCffAOQ2fD8Fc+MNG5soHN73TZUX0YsOqRirVIt54y89aq2WU5CxlwG5wDeU815D7Qdh23oukT+7ZuXIppWF0Q==, tarball: file:projects/pod-ai-bot.tgz} + resolution: {integrity: sha512-I9I1xC6KzbKTKHzDRhwz529igoO/QWs49U/jqI0YabbDdDcHIleS6KJaI0wA0MCKX8zzGTlyABrOSr1QFi/ZRg==, tarball: file:projects/pod-ai-bot.tgz} id: file:projects/pod-ai-bot.tgz name: '@rush-temp/pod-ai-bot' version: 0.0.0 @@ -27760,7 +27758,7 @@ packages: dev: false file:projects/pod-analytics-collector.tgz(bufferutil@4.0.8)(utf-8-validate@6.0.4): - resolution: {integrity: sha512-isSU4pNNtLNmE5cZnQt8sf+Z4o2YpVDvdk/yz2SntdD7rk8+jcpu1U0Qa3GZ9FZwRYb5fpptuFpnhjYPX0Zcgw==, tarball: file:projects/pod-analytics-collector.tgz} + resolution: {integrity: sha512-yjtbm9NmsV3l3PxLXvEK1g9a1kxNL5wRl2C1Cd53B10ag8JFyWkXPIgKmGmDqXPjgQs5zkCTYBjSgKE7wxgjCQ==, tarball: file:projects/pod-analytics-collector.tgz} id: file:projects/pod-analytics-collector.tgz name: '@rush-temp/pod-analytics-collector' version: 0.0.0 @@ -27848,7 +27846,7 @@ packages: dev: false file:projects/pod-calendar.tgz(bufferutil@4.0.8)(ts-node@10.9.2)(utf-8-validate@6.0.4): - resolution: {integrity: sha512-mK8k5lb/mgTB59D2j/fSrevvwr+Mng88MERC/b1fpc1ymBfmqerZEnPJhwMqY183hKoM3LVBnHf9hNxqFKifAw==, tarball: file:projects/pod-calendar.tgz} + resolution: {integrity: sha512-mXYkStYsFTFkD8ZOjY4S1IgT/UkV6w5uanTX5SCqemgL15IvMdQYjCEuAEVKzaBLdwctmLyJ4GzbfvLkuybSYQ==, tarball: file:projects/pod-calendar.tgz} id: file:projects/pod-calendar.tgz name: '@rush-temp/pod-calendar' version: 0.0.0 @@ -28027,7 +28025,7 @@ packages: dev: false file:projects/pod-github.tgz(bufferutil@4.0.8)(utf-8-validate@6.0.4)(y-prosemirror@1.2.12): - resolution: {integrity: sha512-V7Ic6tICMeySunSZrXMyiLXa2hPNAQGikG5wGs9XlUmSJfrxfAzicmX8hDu4ZNJIGgHEzulf/kDR15qNs18Grw==, tarball: file:projects/pod-github.tgz} + resolution: {integrity: sha512-iacj4H1IV8nLLN9zhWh1/eOiTjdGC3KOGJAzQa4Wc3UnM9sfaf8fZYiQaH76SXl5VhvCXzYa3E2qcGprEgzIsA==, tarball: file:projects/pod-github.tgz} id: file:projects/pod-github.tgz name: '@rush-temp/pod-github' version: 0.0.0 @@ -28116,7 +28114,7 @@ packages: dev: false file:projects/pod-gmail.tgz(ts-node@10.9.2): - resolution: {integrity: sha512-4SWWAvJjo0toTWWAJOEWCC8lq07YALC6wBtcqPsMVCv5g26kpK830TwOtftH91AnFFvjMzsrGt76n0Ln95j3sg==, tarball: file:projects/pod-gmail.tgz} + resolution: {integrity: sha512-MMtwzImU/BMqrACzYFsiyjNwh3Ync5wV1/6EpGS6aEyFj5epN7jfHQymE5mNax3LeB6cKMI3rocxJHu1HyUzOQ==, tarball: file:projects/pod-gmail.tgz} id: file:projects/pod-gmail.tgz name: '@rush-temp/pod-gmail' version: 0.0.0 @@ -28348,7 +28346,7 @@ packages: dev: false file:projects/pod-sign.tgz: - resolution: {integrity: sha512-BhTfp8tRi+RUsPk2rTaY2i5ASNi7LzggHkPameyQhbyEH/vwP7ZASvDsOUjJ2rMyNxY6qZfNBhVe+hg9V6Ze+Q==, tarball: file:projects/pod-sign.tgz} + resolution: {integrity: sha512-WSL79DGrFcPtNtgGQ/iT9P1pa4pnXAEP8rba9dakvYGyJoFFwwPhJ1k00bg8bj4ExD6DIvODap+fyc4VIQrplQ==, tarball: file:projects/pod-sign.tgz} name: '@rush-temp/pod-sign' version: 0.0.0 dependencies: @@ -28441,7 +28439,7 @@ packages: dev: false file:projects/pod-telegram-bot.tgz(bufferutil@4.0.8)(utf-8-validate@6.0.4): - resolution: {integrity: sha512-Zj91MB4TkMFeOrhvccD8uZaPopiZ+w22MvlXXm8B54sT5PJ9tzh6XBMX7URPRGmeB6ZB47V2Nmx1VwzMS93N/Q==, tarball: file:projects/pod-telegram-bot.tgz} + resolution: {integrity: sha512-oDd91fX8QlOY0GcrldOmjyXP1vLEZ1MHXwA+Qdm2gWOypc9C9LG1/bbxy3xY2Iigven+eGx9gktC4qVvLO18Lw==, tarball: file:projects/pod-telegram-bot.tgz} id: file:projects/pod-telegram-bot.tgz name: '@rush-temp/pod-telegram-bot' version: 0.0.0 @@ -28500,7 +28498,7 @@ packages: dev: false file:projects/pod-telegram.tgz(bufferutil@4.0.8)(ts-node@10.9.2)(utf-8-validate@6.0.4): - resolution: {integrity: sha512-YGa9OBguYqCy660vl7FORxWV/GqxjVWUNV3bBTpvPrbZlFTzSU6QcEs2CnAarhBbphqwuQebCrmnXKF51cmHTg==, tarball: file:projects/pod-telegram.tgz} + resolution: {integrity: sha512-6kC7AKWj4u6AOZHciRcDsVnaaIMkKKwo1q1irgEts6927ph7kEDCOrweBfN9I0vEG7xXsgs57lYl5ARttFOxzQ==, tarball: file:projects/pod-telegram.tgz} id: file:projects/pod-telegram.tgz name: '@rush-temp/pod-telegram' version: 0.0.0 @@ -28561,7 +28559,7 @@ packages: dev: false file:projects/pod-workspace.tgz: - resolution: {integrity: sha512-UiDkouD/LBO0045nwkwGbz5X0s5/yCHn8p3ie2vX1TQduKweJbOSh7q7XWvY5pNIqEAGGKrHnXj++Pu0UtX4aQ==, tarball: file:projects/pod-workspace.tgz} + resolution: {integrity: sha512-E9hTCvWHsDkmNql6RRc998Rnsk5QZOm/un5W93IpJ8/rfhlUXJ6J4yY09MmnEJUv+ab1eReKL+d+AXHwK8wqJA==, tarball: file:projects/pod-workspace.tgz} name: '@rush-temp/pod-workspace' version: 0.0.0 dependencies: @@ -31649,7 +31647,7 @@ packages: dev: false file:projects/server-tool.tgz(@types/node@20.11.19)(esbuild@0.20.1)(ts-node@10.9.2): - resolution: {integrity: sha512-KrWvamRcvwO2YhpEiGjKBl2gVkkEkeF40fR5siXFNaDzrjNkdyPdAqSM//pGlaBSlzXA3PBG6Z8G8IfwgVEvXg==, tarball: file:projects/server-tool.tgz} + resolution: {integrity: sha512-G/gF05AF5jsncB4bMGt9HXus2GLzKjAwYPYPlanY7M4tavCE8gOstoBPgW8I/ETxaRI3oztLV7G5UoCHEGON3g==, tarball: file:projects/server-tool.tgz} id: file:projects/server-tool.tgz name: '@rush-temp/server-tool' version: 0.0.0 @@ -33318,7 +33316,7 @@ packages: dev: false file:projects/tool.tgz: - resolution: {integrity: sha512-zOR5nWhm639KcPxnXF9glZz7Du3lvg/uzo0sbFI5gUsB6Jp4fiiyHIU/K+OyfLjWL2thuo5EZQOsuoDPQCm3JQ==, tarball: file:projects/tool.tgz} + resolution: {integrity: sha512-qjEycqbfsUNTcz6yg21rc9hMpNrFJhwm8hI9/hNTMNNNVFicRE7Dbfn7+Uct7swl9f1WELsPbnRy7m/FvMGLjg==, tarball: file:projects/tool.tgz} name: '@rush-temp/tool' version: 0.0.0 dependencies: diff --git a/packages/importer/package.json b/packages/importer/package.json index b6155b5d25..9ac60f7e2e 100644 --- a/packages/importer/package.json +++ b/packages/importer/package.json @@ -45,7 +45,7 @@ "@hcengineering/chunter": "^0.6.20", "@hcengineering/collaboration": "^0.6.0", "@hcengineering/contact": "^0.6.24", - "@hcengineering/controlled-documents": "^0.1.0" + "@hcengineering/controlled-documents": "^0.1.0", "@hcengineering/core": "^0.6.32", "@hcengineering/document": "^0.6.0", "@hcengineering/model-attachment": "^0.6.0", diff --git a/packages/importer/src/huly/unified.ts b/packages/importer/src/huly/unified.ts index 21f548fddb..a07892931d 100644 --- a/packages/importer/src/huly/unified.ts +++ b/packages/importer/src/huly/unified.ts @@ -373,7 +373,7 @@ export class UnifiedFormatImporter { this.logger.log('Importing attachments...') const attachments: ImportAttachment[] = await Promise.all( - Array.from(this.fileMetadataByPath.values()) + Array.from(this.fileMetaByPath.values()) .filter((attachMeta) => attachMeta.parentId !== undefined) .map(async (attachMeta: AttachmentMetadata) => await this.processAttachment(attachMeta)) ) @@ -731,7 +731,7 @@ export class UnifiedFormatImporter { if (comment.attachments !== undefined) { for (const attachmentPath of comment.attachments) { const fullPath = path.resolve(currentPath, attachmentPath) - const attachmentMeta = this.fileMetadataByPath.get(fullPath) + const attachmentMeta = this.fileMetaByPath.get(fullPath) if (attachmentMeta !== undefined) { const importAttachment = await this.processAttachment(attachmentMeta) attachments.push(importAttachment) @@ -971,7 +971,7 @@ export class UnifiedFormatImporter { await processDir(fullPath) } else if (entry.isFile()) { const attachmentId = generateId() - this.fileMetadataByPath.set(fullPath, { id: attachmentId, name: entry.name, path: fullPath }) + this.fileMetaByPath.set(fullPath, { id: attachmentId, name: entry.name, path: fullPath }) } } }