From f3f1a34b4bcc3883e4db3951432510b1413cb96b Mon Sep 17 00:00:00 2001 From: Vladimir Aleksiev Date: Wed, 5 Jun 2024 11:48:37 +0300 Subject: [PATCH 1/2] handle root space collaboration (#19) --- src/index.ts | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/index.ts b/src/index.ts index d1a2eb1..28c39a5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -72,20 +72,9 @@ export const main = async (spaceId: string, purpose: SpaceIngestionPurpose) => { logger.error(`Space ${spaceId} not found.`); return; } - const documents: Document[] = []; - // const documents = new Documents(); - const { documentId, source, pageContent, type, title } = - generateDocument(space); - documents.push( - new Document({ - pageContent, - metadata: { - documentId, - source, - type, - title, - }, - }) + const documents: Document[] = await handleSubspaces( + [space as Partial], + alkemioClient ); const subspacesDocs = await handleSubspaces( From 4f9e43609014fe536f55d2eee394aa97e810882d Mon Sep 17 00:00:00 2001 From: Valentin Yanakiev Date: Wed, 5 Jun 2024 11:50:20 +0300 Subject: [PATCH 2/2] Updated .env.default + minor version bump --- .env.default | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.env.default b/.env.default index a4af13c..b435d14 100644 --- a/.env.default +++ b/.env.default @@ -2,7 +2,7 @@ RABBITMQ_HOST=localhost RABBITMQ_USER=alekmio-admin RABBITMQ_PASSWORD=alkemio! RABBITMQ_PORT=5672 -RABBITMQ_QUEUE=virtual-contributor-added-to-space +RABBITMQ_QUEUE=virtual-contributor-ingest-space API_ENDPOINT_PRIVATE_GRAPHQL='http://localhost:3000/api/private/non-interactive/graphql' AUTH_ORY_KRATOS_PUBLIC_BASE_URL=http://localhost:3000/ory/kratos/public diff --git a/package-lock.json b/package-lock.json index 6195986..7918b1c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@alkemio/space-ingest", - "version": "0.4.0", + "version": "0.4.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@alkemio/space-ingest", - "version": "0.4.0", + "version": "0.4.1", "license": "EUPL-1.2", "dependencies": { "@alkemio/client-lib": "^0.30.3", diff --git a/package.json b/package.json index 2724d8c..8aaeef2 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@alkemio/space-ingest", - "version": "0.4.0", + "version": "0.4.1", "description": "", "author": "Alkemio Foundation", "private": true,