n8n-nodes-couchbase 0.1.5 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/README.md +26 -52
  2. package/dist/credentials/CouchbaseApi.credentials.d.ts +8 -0
  3. package/dist/credentials/CouchbaseApi.credentials.js +39 -0
  4. package/dist/credentials/CouchbaseApi.credentials.js.map +1 -0
  5. package/dist/nodes/Couchbase/Couchbase.node.d.ts +14 -0
  6. package/dist/nodes/Couchbase/Couchbase.node.js +173 -0
  7. package/dist/nodes/Couchbase/Couchbase.node.js.map +1 -0
  8. package/dist/nodes/Couchbase/Couchbase.node.json +18 -0
  9. package/dist/nodes/Couchbase/CouchbaseProperties.d.ts +16 -0
  10. package/dist/nodes/Couchbase/CouchbaseProperties.js +511 -0
  11. package/dist/nodes/Couchbase/CouchbaseProperties.js.map +1 -0
  12. package/dist/nodes/Couchbase/couchbase.dark.svg +14 -0
  13. package/dist/nodes/Couchbase/couchbase.svg +14 -0
  14. package/dist/nodes/icons/couchbase.dark.svg +14 -0
  15. package/dist/nodes/icons/couchbase.svg +14 -0
  16. package/dist/nodes/vector_store/VectorStoreCouchbaseSearch/VectorStoreCouchbaseSearch.node.d.ts +16 -0
  17. package/dist/nodes/vector_store/VectorStoreCouchbaseSearch/VectorStoreCouchbaseSearch.node.js +335 -0
  18. package/dist/nodes/vector_store/VectorStoreCouchbaseSearch/VectorStoreCouchbaseSearch.node.js.map +1 -0
  19. package/dist/nodes/vector_store/shared/createVectorStoreNode/constants.d.ts +4 -0
  20. package/dist/nodes/vector_store/shared/createVectorStoreNode/constants.js +45 -0
  21. package/dist/nodes/vector_store/shared/createVectorStoreNode/constants.js.map +1 -0
  22. package/dist/nodes/vector_store/shared/createVectorStoreNode/createVectorStoreNode.d.ts +15 -0
  23. package/dist/nodes/vector_store/shared/createVectorStoreNode/createVectorStoreNode.js +227 -0
  24. package/dist/nodes/vector_store/shared/createVectorStoreNode/createVectorStoreNode.js.map +1 -0
  25. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/index.d.ts +5 -0
  26. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/index.js +22 -0
  27. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/index.js.map +1 -0
  28. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/insertOperation.d.ts +5 -0
  29. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/insertOperation.js +36 -0
  30. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/insertOperation.js.map +1 -0
  31. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/loadOperation.d.ts +5 -0
  32. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/loadOperation.js +34 -0
  33. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/loadOperation.js.map +1 -0
  34. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveAsToolOperation.d.ts +5 -0
  35. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveAsToolOperation.js +43 -0
  36. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveAsToolOperation.js.map +1 -0
  37. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveOperation.d.ts +5 -0
  38. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveOperation.js +17 -0
  39. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveOperation.js.map +1 -0
  40. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/updateOperation.d.ts +5 -0
  41. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/updateOperation.js +40 -0
  42. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/updateOperation.js.map +1 -0
  43. package/dist/nodes/vector_store/shared/createVectorStoreNode/types.d.ts +31 -0
  44. package/dist/nodes/vector_store/shared/createVectorStoreNode/types.js +3 -0
  45. package/dist/nodes/vector_store/shared/createVectorStoreNode/types.js.map +1 -0
  46. package/dist/nodes/vector_store/shared/createVectorStoreNode/utils.d.ts +6 -0
  47. package/dist/nodes/vector_store/shared/createVectorStoreNode/utils.js +22 -0
  48. package/dist/nodes/vector_store/shared/createVectorStoreNode/utils.js.map +1 -0
  49. package/dist/nodes/vector_store/shared/processDocuments.d.ts +16 -0
  50. package/dist/nodes/vector_store/shared/processDocuments.js +28 -0
  51. package/dist/nodes/vector_store/shared/processDocuments.js.map +1 -0
  52. package/dist/package.json +37 -19
  53. package/dist/tsconfig.tsbuildinfo +1 -1
  54. package/dist/utils/N8nBinaryLoader.d.ts +18 -0
  55. package/dist/utils/N8nBinaryLoader.js +159 -0
  56. package/dist/utils/N8nBinaryLoader.js.map +1 -0
  57. package/dist/utils/N8nJsonLoader.d.ts +11 -0
  58. package/dist/utils/N8nJsonLoader.js +67 -0
  59. package/dist/utils/N8nJsonLoader.js.map +1 -0
  60. package/dist/utils/couchbase/connectToCouchbase.d.ts +6 -0
  61. package/dist/utils/couchbase/connectToCouchbase.js +88 -0
  62. package/dist/utils/couchbase/connectToCouchbase.js.map +1 -0
  63. package/dist/utils/couchbase/populateCouchbaseRLs.d.ts +25 -0
  64. package/dist/utils/couchbase/populateCouchbaseRLs.js +121 -0
  65. package/dist/utils/couchbase/populateCouchbaseRLs.js.map +1 -0
  66. package/dist/utils/couchbase/validateBucketScopeCollection.d.ts +2 -0
  67. package/dist/utils/couchbase/validateBucketScopeCollection.js +53 -0
  68. package/dist/utils/couchbase/validateBucketScopeCollection.js.map +1 -0
  69. package/dist/utils/helpers.d.ts +10 -0
  70. package/dist/utils/helpers.js +61 -0
  71. package/dist/utils/helpers.js.map +1 -0
  72. package/dist/utils/logWrapper.d.ts +20 -0
  73. package/dist/utils/logWrapper.js +285 -0
  74. package/dist/utils/logWrapper.js.map +1 -0
  75. package/dist/utils/sharedFields.d.ts +6 -0
  76. package/dist/utils/sharedFields.js +122 -0
  77. package/dist/utils/sharedFields.js.map +1 -0
  78. package/package.json +43 -27
  79. package/dist/credentials/CouchbaseCredentialsApi.credentials.d.ts +0 -7
  80. package/dist/credentials/CouchbaseCredentialsApi.credentials.js +0 -50
  81. package/dist/credentials/CouchbaseCredentialsApi.credentials.js.map +0 -1
  82. package/dist/nodes/CouchbaseDB/CBLogomark.svg +0 -350
  83. package/dist/nodes/CouchbaseDB/CouchbaseNode.node.d.ts +0 -6
  84. package/dist/nodes/CouchbaseDB/CouchbaseNode.node.js +0 -206
  85. package/dist/nodes/CouchbaseDB/CouchbaseNode.node.js.map +0 -1
  86. package/dist/nodes/CouchbaseNode/CBLogomark.svg +0 -350
  87. package/dist/nodes/CouchbaseNode/CouchbaseNode.node.d.ts +0 -6
  88. package/dist/nodes/CouchbaseNode/CouchbaseNode.node.js +0 -293
  89. package/dist/nodes/CouchbaseNode/CouchbaseNode.node.js.map +0 -1
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./loadOperation"), exports);
18
+ __exportStar(require("./insertOperation"), exports);
19
+ __exportStar(require("./updateOperation"), exports);
20
+ __exportStar(require("./retrieveOperation"), exports);
21
+ __exportStar(require("./retrieveAsToolOperation"), exports);
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../nodes/vector_store/shared/createVectorStoreNode/operations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,oDAAkC;AAClC,oDAAkC;AAClC,sDAAoC;AACpC,4DAA0C"}
@@ -0,0 +1,5 @@
1
+ import type { Embeddings } from '@langchain/core/embeddings';
2
+ import type { VectorStore } from '@langchain/core/vectorstores';
3
+ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
4
+ import type { VectorStoreNodeConstructorArgs } from '../types';
5
+ export declare function handleInsertOperation<T extends VectorStore = VectorStore>(context: IExecuteFunctions, args: VectorStoreNodeConstructorArgs<T>, embeddings: Embeddings): Promise<INodeExecutionData[]>;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.handleInsertOperation = handleInsertOperation;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const helpers_1 = require("../../../../../utils/helpers");
6
+ const processDocuments_1 = require("../../processDocuments");
7
+ async function handleInsertOperation(context, args, embeddings) {
8
+ var _a, _b;
9
+ const nodeVersion = context.getNode().typeVersion;
10
+ const items = context.getInputData();
11
+ const documentInput = (await context.getInputConnectionData(n8n_workflow_1.NodeConnectionTypes.AiDocument, 0));
12
+ const resultData = [];
13
+ const documentsForEmbedding = [];
14
+ for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
15
+ if ((_a = context.getExecutionCancelSignal()) === null || _a === void 0 ? void 0 : _a.aborted) {
16
+ break;
17
+ }
18
+ const itemData = items[itemIndex];
19
+ const processedDocuments = await (0, processDocuments_1.processDocument)(documentInput, itemData, itemIndex);
20
+ resultData.push(...processedDocuments.serializedDocuments);
21
+ documentsForEmbedding.push(...processedDocuments.processedDocuments);
22
+ if (nodeVersion === 1) {
23
+ await args.populateVectorStore(context, embeddings, processedDocuments.processedDocuments, itemIndex);
24
+ }
25
+ (0, helpers_1.logAiEvent)(context, 'ai-vector-store-populated');
26
+ }
27
+ if (nodeVersion >= 1.1) {
28
+ const embeddingBatchSize = (_b = context.getNodeParameter('embeddingBatchSize', 0, 200)) !== null && _b !== void 0 ? _b : 200;
29
+ for (let i = 0; i < documentsForEmbedding.length; i += embeddingBatchSize) {
30
+ const nextBatch = documentsForEmbedding.slice(i, i + embeddingBatchSize);
31
+ await args.populateVectorStore(context, embeddings, nextBatch, 0);
32
+ }
33
+ }
34
+ return resultData;
35
+ }
36
+ //# sourceMappingURL=insertOperation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"insertOperation.js","sourceRoot":"","sources":["../../../../../../nodes/vector_store/shared/createVectorStoreNode/operations/insertOperation.ts"],"names":[],"mappings":";;AAiBA,sDA4DC;AAzED,+CAAmD;AAEnD,4CAA4C;AAI5C,6DAAyD;AAOlD,KAAK,UAAU,qBAAqB,CAC1C,OAA0B,EAC1B,IAAuC,EACvC,UAAsB;;IAEtB,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,WAAW,CAAC;IAElD,MAAM,KAAK,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IACrC,MAAM,aAAa,GAAG,CAAC,MAAM,OAAO,CAAC,sBAAsB,CAC1D,kCAAmB,CAAC,UAAU,EAC9B,CAAC,CACD,CAA+E,CAAC;IAEjF,MAAM,UAAU,GAAyB,EAAE,CAAC;IAC5C,MAAM,qBAAqB,GAA6C,EAAE,CAAC;IAG3E,KAAK,IAAI,SAAS,GAAG,CAAC,EAAE,SAAS,GAAG,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,CAAC;QAE/D,IAAI,MAAA,OAAO,CAAC,wBAAwB,EAAE,0CAAE,OAAO,EAAE,CAAC;YACjD,MAAM;QACP,CAAC;QAED,MAAM,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;QAGlC,MAAM,kBAAkB,GAAG,MAAM,IAAA,kCAAe,EAAC,aAAa,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;QAGrF,UAAU,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;QAG3D,qBAAqB,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAC,kBAAkB,CAAC,CAAC;QAGrE,IAAI,WAAW,KAAK,CAAC,EAAE,CAAC;YACvB,MAAM,IAAI,CAAC,mBAAmB,CAC7B,OAAO,EACP,UAAU,EACV,kBAAkB,CAAC,kBAAkB,EACrC,SAAS,CACT,CAAC;QACH,CAAC;QAED,IAAA,oBAAU,EAAC,OAAO,EAAE,2BAA2B,CAAC,CAAC;IAClD,CAAC;IAGD,IAAI,WAAW,IAAI,GAAG,EAAE,CAAC;QACxB,MAAM,kBAAkB,GACvB,MAAC,OAAO,CAAC,gBAAgB,CAAC,oBAAoB,EAAE,CAAC,EAAE,GAAG,CAAY,mCAAI,GAAG,CAAC;QAG3E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,qBAAqB,CAAC,MAAM,EAAE,CAAC,IAAI,kBAAkB,EAAE,CAAC;YAC3E,MAAM,SAAS,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,kBAAkB,CAAC,CAAC;YACzE,MAAM,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC;QACnE,CAAC;IACF,CAAC;IAED,OAAO,UAAU,CAAC;AACnB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Embeddings } from '@langchain/core/embeddings';
2
+ import type { VectorStore } from '@langchain/core/vectorstores';
3
+ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
4
+ import type { VectorStoreNodeConstructorArgs } from '../types';
5
+ export declare function handleLoadOperation<T extends VectorStore = VectorStore>(context: IExecuteFunctions, args: VectorStoreNodeConstructorArgs<T>, embeddings: Embeddings, itemIndex: number): Promise<INodeExecutionData[]>;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.handleLoadOperation = handleLoadOperation;
4
+ const helpers_1 = require("../../../../../utils/helpers");
5
+ async function handleLoadOperation(context, args, embeddings, itemIndex) {
6
+ var _a;
7
+ const filter = (0, helpers_1.getMetadataFiltersValues)(context, itemIndex);
8
+ const vectorStore = await args.getVectorStoreClient(context, undefined, embeddings, itemIndex);
9
+ try {
10
+ const prompt = context.getNodeParameter('prompt', itemIndex);
11
+ const topK = context.getNodeParameter('topK', itemIndex, 4);
12
+ const includeDocumentMetadata = context.getNodeParameter('includeDocumentMetadata', itemIndex, true);
13
+ const embeddedPrompt = await embeddings.embedQuery(prompt);
14
+ const docs = await vectorStore.similaritySearchVectorWithScore(embeddedPrompt, topK, filter);
15
+ const serializedDocs = docs.map(([doc, score]) => {
16
+ const document = {
17
+ pageContent: doc.pageContent,
18
+ ...(includeDocumentMetadata ? { metadata: doc.metadata } : {}),
19
+ };
20
+ return {
21
+ json: { document, score },
22
+ pairedItem: {
23
+ item: itemIndex,
24
+ },
25
+ };
26
+ });
27
+ (0, helpers_1.logAiEvent)(context, 'ai-vector-store-searched', { query: prompt });
28
+ return serializedDocs;
29
+ }
30
+ finally {
31
+ (_a = args.releaseVectorStoreClient) === null || _a === void 0 ? void 0 : _a.call(args, vectorStore);
32
+ }
33
+ }
34
+ //# sourceMappingURL=loadOperation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadOperation.js","sourceRoot":"","sources":["../../../../../../nodes/vector_store/shared/createVectorStoreNode/operations/loadOperation.ts"],"names":[],"mappings":";;AAYA,kDAsDC;AA9DD,4CAAsE;AAQ/D,KAAK,UAAU,mBAAmB,CACxC,OAA0B,EAC1B,IAAuC,EACvC,UAAsB,EACtB,SAAiB;;IAEjB,MAAM,MAAM,GAAG,IAAA,kCAAwB,EAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAC5D,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAClD,OAAO,EAEP,SAAS,EACT,UAAU,EACV,SAAS,CACT,CAAC;IAEF,IAAI,CAAC;QAEJ,MAAM,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,QAAQ,EAAE,SAAS,CAAW,CAAC;QACvE,MAAM,IAAI,GAAG,OAAO,CAAC,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAW,CAAC;QACtE,MAAM,uBAAuB,GAAG,OAAO,CAAC,gBAAgB,CACvD,yBAAyB,EACzB,SAAS,EACT,IAAI,CACO,CAAC;QAGb,MAAM,cAAc,GAAG,MAAM,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAG3D,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC,+BAA+B,CAAC,cAAc,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QAG7F,MAAM,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YAChD,MAAM,QAAQ,GAAG;gBAChB,WAAW,EAAE,GAAG,CAAC,WAAW;gBAC5B,GAAG,CAAC,uBAAuB,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aAC9D,CAAC;YAEF,OAAO;gBACN,IAAI,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE;gBACzB,UAAU,EAAE;oBACX,IAAI,EAAE,SAAS;iBACf;aACD,CAAC;QACH,CAAC,CAAC,CAAC;QAGH,IAAA,oBAAU,EAAC,OAAO,EAAE,0BAA0B,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;QAEnE,OAAO,cAAc,CAAC;IACvB,CAAC;YAAS,CAAC;QAEV,MAAA,IAAI,CAAC,wBAAwB,qDAAG,WAAW,CAAC,CAAC;IAC9C,CAAC;AACF,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Embeddings } from '@langchain/core/embeddings';
2
+ import type { VectorStore } from '@langchain/core/vectorstores';
3
+ import type { ISupplyDataFunctions, SupplyData } from 'n8n-workflow';
4
+ import type { VectorStoreNodeConstructorArgs } from '../types';
5
+ export declare function handleRetrieveAsToolOperation<T extends VectorStore = VectorStore>(context: ISupplyDataFunctions, args: VectorStoreNodeConstructorArgs<T>, embeddings: Embeddings, itemIndex: number): Promise<SupplyData>;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.handleRetrieveAsToolOperation = handleRetrieveAsToolOperation;
4
+ const tools_1 = require("langchain/tools");
5
+ const helpers_1 = require("../../../../../utils/helpers");
6
+ const logWrapper_1 = require("../../../../../utils/logWrapper");
7
+ async function handleRetrieveAsToolOperation(context, args, embeddings, itemIndex) {
8
+ const toolDescription = context.getNodeParameter('toolDescription', itemIndex);
9
+ const toolName = context.getNodeParameter('toolName', itemIndex);
10
+ const topK = context.getNodeParameter('topK', itemIndex, 4);
11
+ const includeDocumentMetadata = context.getNodeParameter('includeDocumentMetadata', itemIndex, true);
12
+ const filter = (0, helpers_1.getMetadataFiltersValues)(context, itemIndex);
13
+ const vectorStoreTool = new tools_1.DynamicTool({
14
+ name: toolName,
15
+ description: toolDescription,
16
+ func: async (input) => {
17
+ var _a;
18
+ const vectorStore = await args.getVectorStoreClient(context, undefined, embeddings, itemIndex);
19
+ try {
20
+ const embeddedPrompt = await embeddings.embedQuery(input);
21
+ const documents = await vectorStore.similaritySearchVectorWithScore(embeddedPrompt, topK, filter);
22
+ return documents
23
+ .map((document) => {
24
+ if (includeDocumentMetadata) {
25
+ return { type: 'text', text: JSON.stringify(document[0]) };
26
+ }
27
+ return {
28
+ type: 'text',
29
+ text: JSON.stringify({ pageContent: document[0].pageContent }),
30
+ };
31
+ })
32
+ .filter((document) => !!document);
33
+ }
34
+ finally {
35
+ (_a = args.releaseVectorStoreClient) === null || _a === void 0 ? void 0 : _a.call(args, vectorStore);
36
+ }
37
+ },
38
+ });
39
+ return {
40
+ response: (0, logWrapper_1.logWrapper)(vectorStoreTool, context),
41
+ };
42
+ }
43
+ //# sourceMappingURL=retrieveAsToolOperation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retrieveAsToolOperation.js","sourceRoot":"","sources":["../../../../../../nodes/vector_store/shared/createVectorStoreNode/operations/retrieveAsToolOperation.ts"],"names":[],"mappings":";;AAcA,sEAoEC;AAhFD,2CAA8C;AAG9C,4CAA0D;AAC1D,kDAA+C;AAQxC,KAAK,UAAU,6BAA6B,CAClD,OAA6B,EAC7B,IAAuC,EACvC,UAAsB,EACtB,SAAiB;IAGjB,MAAM,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,SAAS,CAAW,CAAC;IACzF,MAAM,QAAQ,GAAG,OAAO,CAAC,gBAAgB,CAAC,UAAU,EAAE,SAAS,CAAW,CAAC;IAC3E,MAAM,IAAI,GAAG,OAAO,CAAC,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAW,CAAC;IACtE,MAAM,uBAAuB,GAAG,OAAO,CAAC,gBAAgB,CACvD,yBAAyB,EACzB,SAAS,EACT,IAAI,CACO,CAAC;IAGb,MAAM,MAAM,GAAG,IAAA,kCAAwB,EAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAG5D,MAAM,eAAe,GAAG,IAAI,mBAAW,CAAC;QACvC,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,eAAe;QAC5B,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;;YAIrB,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAClD,OAAO,EACP,SAAS,EACT,UAAU,EACV,SAAS,CACT,CAAC;YAEF,IAAI,CAAC;gBAEJ,MAAM,cAAc,GAAG,MAAM,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;gBAG1D,MAAM,SAAS,GAAG,MAAM,WAAW,CAAC,+BAA+B,CAClE,cAAc,EACd,IAAI,EACJ,MAAM,CACN,CAAC;gBAGF,OAAO,SAAS;qBACd,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE;oBACjB,IAAI,uBAAuB,EAAE,CAAC;wBAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;oBAC5D,CAAC;oBACD,OAAO;wBACN,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;qBAC9D,CAAC;gBACH,CAAC,CAAC;qBACD,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;YACpC,CAAC;oBAAS,CAAC;gBAEV,MAAA,IAAI,CAAC,wBAAwB,qDAAG,WAAW,CAAC,CAAC;YAC9C,CAAC;QACF,CAAC;KACD,CAAC,CAAC;IAGH,OAAO;QACN,QAAQ,EAAE,IAAA,uBAAU,EAAC,eAAe,EAAE,OAAO,CAAC;KAC9C,CAAC;AACH,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Embeddings } from '@langchain/core/embeddings';
2
+ import type { VectorStore } from '@langchain/core/vectorstores';
3
+ import type { ISupplyDataFunctions, SupplyData } from 'n8n-workflow';
4
+ import type { VectorStoreNodeConstructorArgs } from '../types';
5
+ export declare function handleRetrieveOperation<T extends VectorStore = VectorStore>(context: ISupplyDataFunctions, args: VectorStoreNodeConstructorArgs<T>, embeddings: Embeddings, itemIndex: number): Promise<SupplyData>;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.handleRetrieveOperation = handleRetrieveOperation;
4
+ const helpers_1 = require("../../../../../utils/helpers");
5
+ const logWrapper_1 = require("../../../../../utils/logWrapper");
6
+ async function handleRetrieveOperation(context, args, embeddings, itemIndex) {
7
+ const filter = (0, helpers_1.getMetadataFiltersValues)(context, itemIndex);
8
+ const vectorStore = await args.getVectorStoreClient(context, filter, embeddings, itemIndex);
9
+ return {
10
+ response: (0, logWrapper_1.logWrapper)(vectorStore, context),
11
+ closeFunction: async () => {
12
+ var _a;
13
+ (_a = args.releaseVectorStoreClient) === null || _a === void 0 ? void 0 : _a.call(args, vectorStore);
14
+ },
15
+ };
16
+ }
17
+ //# sourceMappingURL=retrieveOperation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retrieveOperation.js","sourceRoot":"","sources":["../../../../../../nodes/vector_store/shared/createVectorStoreNode/operations/retrieveOperation.ts"],"names":[],"mappings":";;AAaA,0DAoBC;AA7BD,4CAA0D;AAC1D,kDAA+C;AAQxC,KAAK,UAAU,uBAAuB,CAC5C,OAA6B,EAC7B,IAAuC,EACvC,UAAsB,EACtB,SAAiB;IAGjB,MAAM,MAAM,GAAG,IAAA,kCAAwB,EAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAG5D,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;IAG5F,OAAO;QACN,QAAQ,EAAE,IAAA,uBAAU,EAAC,WAAW,EAAE,OAAO,CAAC;QAC1C,aAAa,EAAE,KAAK,IAAI,EAAE;;YAEzB,MAAA,IAAI,CAAC,wBAAwB,qDAAG,WAAW,CAAC,CAAC;QAC9C,CAAC;KACD,CAAC;AACH,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Embeddings } from '@langchain/core/embeddings';
2
+ import type { VectorStore } from '@langchain/core/vectorstores';
3
+ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
4
+ import type { VectorStoreNodeConstructorArgs } from '../types';
5
+ export declare function handleUpdateOperation<T extends VectorStore = VectorStore>(context: IExecuteFunctions, args: VectorStoreNodeConstructorArgs<T>, embeddings: Embeddings): Promise<INodeExecutionData[]>;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.handleUpdateOperation = handleUpdateOperation;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const helpers_1 = require("../../../../../utils/helpers");
6
+ const N8nJsonLoader_1 = require("../../../../../utils/N8nJsonLoader");
7
+ const processDocuments_1 = require("../../processDocuments");
8
+ const utils_1 = require("../utils");
9
+ async function handleUpdateOperation(context, args, embeddings) {
10
+ var _a;
11
+ if (!(0, utils_1.isUpdateSupported)(args)) {
12
+ throw new n8n_workflow_1.NodeOperationError(context.getNode(), 'Update operation is not implemented for this Vector Store');
13
+ }
14
+ const items = context.getInputData();
15
+ const loader = new N8nJsonLoader_1.N8nJsonLoader(context);
16
+ const resultData = [];
17
+ for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
18
+ const itemData = items[itemIndex];
19
+ const documentId = context.getNodeParameter('id', itemIndex, '', {
20
+ extractValue: true,
21
+ });
22
+ const vectorStore = await args.getVectorStoreClient(context, undefined, embeddings, itemIndex);
23
+ try {
24
+ let { processedDocuments, serializedDocuments } = await (0, processDocuments_1.processDocument)(loader, itemData, itemIndex);
25
+ if ((processedDocuments === null || processedDocuments === void 0 ? void 0 : processedDocuments.length) !== 1) {
26
+ throw new n8n_workflow_1.NodeOperationError(context.getNode(), 'Single document per item expected');
27
+ }
28
+ resultData.push(...serializedDocuments);
29
+ await vectorStore.addDocuments(processedDocuments, {
30
+ ids: [documentId],
31
+ });
32
+ (0, helpers_1.logAiEvent)(context, 'ai-vector-store-updated');
33
+ }
34
+ finally {
35
+ (_a = args.releaseVectorStoreClient) === null || _a === void 0 ? void 0 : _a.call(args, vectorStore);
36
+ }
37
+ }
38
+ return resultData;
39
+ }
40
+ //# sourceMappingURL=updateOperation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateOperation.js","sourceRoot":"","sources":["../../../../../../nodes/vector_store/shared/createVectorStoreNode/operations/updateOperation.ts"],"names":[],"mappings":";;AAgBA,sDA8DC;AA3ED,+CAAkD;AAElD,4CAA4C;AAC5C,wDAAqD;AAErD,6DAAyD;AAEzD,oCAA6C;AAMtC,KAAK,UAAU,qBAAqB,CAC1C,OAA0B,EAC1B,IAAuC,EACvC,UAAsB;;IAGtB,IAAI,CAAC,IAAA,yBAAiB,EAAC,IAAI,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,iCAAkB,CAC3B,OAAO,CAAC,OAAO,EAAE,EACjB,2DAA2D,CAC3D,CAAC;IACH,CAAC;IAGD,MAAM,KAAK,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAErC,MAAM,MAAM,GAAG,IAAI,6BAAa,CAAC,OAAO,CAAC,CAAC;IAE1C,MAAM,UAAU,GAAyB,EAAE,CAAC;IAG5C,KAAK,IAAI,SAAS,GAAG,CAAC,EAAE,SAAS,GAAG,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,CAAC;QAC/D,MAAM,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;QAGlC,MAAM,UAAU,GAAG,OAAO,CAAC,gBAAgB,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE;YAChE,YAAY,EAAE,IAAI;SAClB,CAAW,CAAC;QAGb,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;QAE/F,IAAI,CAAC;YAEJ,IAAI,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,GAAG,MAAM,IAAA,kCAAe,EACtE,MAAM,EACN,QAAQ,EACR,SAAS,CACT,CAAC;YAGF,IAAI,CAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,MAAM,MAAK,CAAC,EAAE,CAAC;gBACtC,MAAM,IAAI,iCAAkB,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,mCAAmC,CAAC,CAAC;YACtF,CAAC;YAGD,UAAU,CAAC,IAAI,CAAC,GAAG,mBAAmB,CAAC,CAAC;YAGxC,MAAM,WAAW,CAAC,YAAY,CAAC,kBAAkB,EAAE;gBAClD,GAAG,EAAE,CAAC,UAAU,CAAC;aACjB,CAAC,CAAC;YAGH,IAAA,oBAAU,EAAC,OAAO,EAAE,yBAAyB,CAAC,CAAC;QAChD,CAAC;gBAAS,CAAC;YAEV,MAAA,IAAI,CAAC,wBAAwB,qDAAG,WAAW,CAAC,CAAC;QAC9C,CAAC;IACF,CAAC;IAED,OAAO,UAAU,CAAC;AACnB,CAAC"}
@@ -0,0 +1,31 @@
1
+ import type { Document } from '@langchain/core/documents';
2
+ import type { Embeddings } from '@langchain/core/embeddings';
3
+ import type { VectorStore } from '@langchain/core/vectorstores';
4
+ import type { IExecuteFunctions, INodeCredentialDescription, INodeProperties, ILoadOptionsFunctions, INodeListSearchResult, Icon, ISupplyDataFunctions, ThemeIconColor } from 'n8n-workflow';
5
+ export type NodeOperationMode = 'insert' | 'load' | 'retrieve' | 'update' | 'retrieve-as-tool';
6
+ export interface NodeMeta {
7
+ displayName: string;
8
+ name: string;
9
+ description: string;
10
+ docsUrl: string;
11
+ icon: Icon;
12
+ iconColor?: ThemeIconColor;
13
+ credentials?: INodeCredentialDescription[];
14
+ operationModes?: NodeOperationMode[];
15
+ }
16
+ export interface VectorStoreNodeConstructorArgs<T extends VectorStore = VectorStore> {
17
+ meta: NodeMeta;
18
+ methods?: {
19
+ listSearch?: {
20
+ [key: string]: (this: ILoadOptionsFunctions, filter?: string, paginationToken?: string) => Promise<INodeListSearchResult>;
21
+ };
22
+ };
23
+ sharedFields: INodeProperties[];
24
+ insertFields?: INodeProperties[];
25
+ loadFields?: INodeProperties[];
26
+ retrieveFields?: INodeProperties[];
27
+ updateFields?: INodeProperties[];
28
+ populateVectorStore: (context: IExecuteFunctions | ISupplyDataFunctions, embeddings: Embeddings, documents: Array<Document<Record<string, unknown>>>, itemIndex: number) => Promise<void>;
29
+ getVectorStoreClient: (context: IExecuteFunctions | ISupplyDataFunctions, filter: Record<string, never> | undefined, embeddings: Embeddings, itemIndex: number) => Promise<T>;
30
+ releaseVectorStoreClient?: (vectorStore: T) => void;
31
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../nodes/vector_store/shared/createVectorStoreNode/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import type { VectorStore } from '@langchain/core/vectorstores';
2
+ import type { INodeProperties, INodePropertyOptions } from 'n8n-workflow';
3
+ import type { NodeOperationMode, VectorStoreNodeConstructorArgs } from './types';
4
+ export declare function transformDescriptionForOperationMode(fields: INodeProperties[], mode: NodeOperationMode | NodeOperationMode[]): INodeProperties[];
5
+ export declare function isUpdateSupported<T extends VectorStore>(args: VectorStoreNodeConstructorArgs<T>): boolean;
6
+ export declare function getOperationModeOptions<T extends VectorStore>(args: VectorStoreNodeConstructorArgs<T>): INodePropertyOptions[];
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.transformDescriptionForOperationMode = transformDescriptionForOperationMode;
4
+ exports.isUpdateSupported = isUpdateSupported;
5
+ exports.getOperationModeOptions = getOperationModeOptions;
6
+ const constants_1 = require("./constants");
7
+ function transformDescriptionForOperationMode(fields, mode) {
8
+ return fields.map((field) => ({
9
+ ...field,
10
+ displayOptions: { show: { mode: Array.isArray(mode) ? mode : [mode] } },
11
+ }));
12
+ }
13
+ function isUpdateSupported(args) {
14
+ var _a, _b;
15
+ return (_b = (_a = args.meta.operationModes) === null || _a === void 0 ? void 0 : _a.includes('update')) !== null && _b !== void 0 ? _b : false;
16
+ }
17
+ function getOperationModeOptions(args) {
18
+ var _a;
19
+ const enabledOperationModes = (_a = args.meta.operationModes) !== null && _a !== void 0 ? _a : constants_1.DEFAULT_OPERATION_MODES;
20
+ return constants_1.OPERATION_MODE_DESCRIPTIONS.filter(({ value }) => enabledOperationModes.includes(value));
21
+ }
22
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../nodes/vector_store/shared/createVectorStoreNode/utils.ts"],"names":[],"mappings":";;AAUA,oFAQC;AAMD,8CAIC;AAMD,0DAQC;AAvCD,2CAAmF;AAOnF,SAAgB,oCAAoC,CACnD,MAAyB,EACzB,IAA6C;IAE7C,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAC7B,GAAG,KAAK;QACR,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE;KACvE,CAAC,CAAC,CAAC;AACL,CAAC;AAMD,SAAgB,iBAAiB,CAChC,IAAuC;;IAEvC,OAAO,MAAA,MAAA,IAAI,CAAC,IAAI,CAAC,cAAc,0CAAE,QAAQ,CAAC,QAAQ,CAAC,mCAAI,KAAK,CAAC;AAC9D,CAAC;AAMD,SAAgB,uBAAuB,CACtC,IAAuC;;IAEvC,MAAM,qBAAqB,GAAG,MAAA,IAAI,CAAC,IAAI,CAAC,cAAc,mCAAI,mCAAuB,CAAC;IAElF,OAAO,uCAA2B,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CACvD,qBAAqB,CAAC,QAAQ,CAAC,KAA0B,CAAC,CAC1D,CAAC;AACH,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { Document } from '@langchain/core/documents';
2
+ import type { INodeExecutionData } from 'n8n-workflow';
3
+ import { N8nBinaryLoader } from '../../../utils/N8nBinaryLoader';
4
+ import { N8nJsonLoader } from '../../../utils/N8nJsonLoader';
5
+ export declare function processDocument(documentInput: N8nJsonLoader | N8nBinaryLoader | Array<Document<Record<string, unknown>>>, inputItem: INodeExecutionData, itemIndex: number): Promise<{
6
+ processedDocuments: Document<Record<string, any>>[];
7
+ serializedDocuments: {
8
+ json: {
9
+ metadata: Record<string, any>;
10
+ pageContent: string;
11
+ };
12
+ pairedItem: {
13
+ item: number;
14
+ };
15
+ }[];
16
+ }>;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.processDocument = processDocument;
4
+ async function processDocument(documentInput, inputItem, itemIndex) {
5
+ var _a, _b;
6
+ let processedDocuments;
7
+ if (documentInput &&
8
+ typeof documentInput === 'object' &&
9
+ !Array.isArray(documentInput) &&
10
+ (((_a = documentInput.constructor) === null || _a === void 0 ? void 0 : _a.name) === 'N8nJsonLoader' ||
11
+ ((_b = documentInput.constructor) === null || _b === void 0 ? void 0 : _b.name) === 'N8nBinaryLoader')) {
12
+ processedDocuments = await documentInput.processItem(inputItem, itemIndex);
13
+ }
14
+ else {
15
+ processedDocuments = documentInput;
16
+ }
17
+ const serializedDocuments = processedDocuments.map(({ metadata, pageContent }) => ({
18
+ json: { metadata, pageContent },
19
+ pairedItem: {
20
+ item: itemIndex,
21
+ },
22
+ }));
23
+ return {
24
+ processedDocuments,
25
+ serializedDocuments,
26
+ };
27
+ }
28
+ //# sourceMappingURL=processDocuments.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"processDocuments.js","sourceRoot":"","sources":["../../../../nodes/vector_store/shared/processDocuments.ts"],"names":[],"mappings":";;AAMA,0CAuCC;AAvCM,KAAK,UAAU,eAAe,CACpC,aAAyF,EACzF,SAA6B,EAC7B,SAAiB;;IAEjB,IAAI,kBAA8B,CAAC;IAInC,IACC,aAAa;QACb,OAAO,aAAa,KAAK,QAAQ;QACjC,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC;QAC7B,CAAC,CAAA,MAAA,aAAa,CAAC,WAAW,0CAAE,IAAI,MAAK,eAAe;YACnD,CAAA,MAAA,aAAa,CAAC,WAAW,0CAAE,IAAI,MAAK,iBAAiB,CAAC,EACtD,CAAC;QAGF,kBAAkB,GAAG,MAAO,aAAiD,CAAC,WAAW,CACxF,SAAS,EACT,SAAS,CACT,CAAC;IACH,CAAC;SAAM,CAAC;QAGP,kBAAkB,GAAG,aAAyD,CAAC;IAChF,CAAC;IAED,MAAM,mBAAmB,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;QAClF,IAAI,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE;QAC/B,UAAU,EAAE;YACX,IAAI,EAAE,SAAS;SACf;KACD,CAAC,CAAC,CAAC;IAEJ,OAAO;QACN,kBAAkB;QAClB,mBAAmB;KACnB,CAAC;AACH,CAAC"}
package/dist/package.json CHANGED
@@ -1,28 +1,35 @@
1
1
  {
2
2
  "name": "n8n-nodes-couchbase",
3
- "version": "0.1.5",
4
- "description": "N8N Node to add, get, update, delete import and query data to couchbase",
3
+ "version": "1.1.0",
4
+ "description": "Community node for using Couchbase Key-Value, Query, and Full-Text Search with n8n.",
5
5
  "keywords": [
6
6
  "n8n-community-node-package"
7
7
  ],
8
8
  "license": "MIT",
9
- "homepage": "",
9
+ "homepage": "https://github.com/Couchbase-Ecosystem/n8n-nodes-couchbase#readme",
10
10
  "author": {
11
- "name": "marloaquino",
12
- "email": "marloauino080621@gmail.com"
11
+ "name": "Elliot Scribner",
12
+ "email": "elliot.scribner@couchbase.com"
13
13
  },
14
14
  "repository": {
15
15
  "type": "git",
16
- "url": "https://github.com/maruakinu/n8n-nodes-couchbase.git"
16
+ "url": "https://github.com/Couchbase-Ecosystem/n8n-nodes-couchbase.git"
17
17
  },
18
+ "engines": {
19
+ "node": ">=18.10",
20
+ "pnpm": ">=9.1"
21
+ },
22
+ "packageManager": "pnpm@9.1.4",
18
23
  "main": "index.js",
19
24
  "scripts": {
25
+ "preinstall": "npx only-allow pnpm",
20
26
  "build": "tsc && gulp build:icons",
21
27
  "dev": "tsc --watch",
28
+ "dev:ui": "nodemon -w nodes -w credentials -w utils --ext ts --exec 'tsc && tsc-alias && cd $HOME/.n8n/custom && COREPACK_ENABLE_STRICT=0 pnpm install && cd - && n8n'",
22
29
  "format": "prettier nodes credentials --write",
23
30
  "lint": "eslint nodes credentials package.json",
24
31
  "lintfix": "eslint nodes credentials package.json --fix",
25
- "prepublishOnly": "npm run build && npm run lint -c .eslintrc.prepublish.js nodes credentials package.json"
32
+ "prepublishOnly": "pnpm build && pnpm lint -c .eslintrc.prepublish.js nodes credentials package.json"
26
33
  },
27
34
  "files": [
28
35
  "dist"
@@ -30,25 +37,36 @@
30
37
  "n8n": {
31
38
  "n8nNodesApiVersion": 1,
32
39
  "credentials": [
33
- "dist/credentials/CouchbaseCredentialsApi.credentials.js"
40
+ "dist/credentials/CouchbaseApi.credentials.js"
34
41
  ],
35
42
  "nodes": [
36
- "dist/nodes/CouchbaseNode/CouchbaseNode.node.js"
43
+ "dist/nodes/Couchbase/Couchbase.node.js",
44
+ "dist/nodes/Couchbase/vector_store/VectorStoreCouchbaseSearch.node.js"
37
45
  ]
38
46
  },
39
47
  "devDependencies": {
40
- "@types/express": "^4.17.6",
41
- "@types/request-promise-native": "~1.0.15",
42
- "@typescript-eslint/parser": "~5.45",
43
- "eslint-plugin-n8n-nodes-base": "^1.11.0",
48
+ "@types/node": "^22.13.5",
49
+ "@typescript-eslint/parser": "^7.15.0",
50
+ "eslint": "^8.56.0",
51
+ "eslint-plugin-n8n-nodes-base": "^1.16.1",
44
52
  "gulp": "^4.0.2",
45
- "n8n-core": "*",
46
- "n8n-workflow": "*",
47
- "prettier": "^2.7.1",
48
- "typescript": "~4.8.4"
53
+ "nodemon": "^3.1.9",
54
+ "prettier": "^3.3.2",
55
+ "sqlite3": "^5.1.7",
56
+ "tsc-alias": "^1.8.13",
57
+ "typescript": "^5.5.3"
58
+ },
59
+ "peerDependencies": {
60
+ "n8n-workflow": "*"
49
61
  },
50
62
  "dependencies": {
51
- "couchbase": "^4.2.4",
52
- "link": "^1.5.1"
63
+ "@langchain/community": "^0.3.38",
64
+ "@langchain/core": "^0.3.43",
65
+ "@langchain/textsplitters": "^0.1.0",
66
+ "langchain": "^0.3.19",
67
+ "couchbase": "^4.4.5",
68
+ "tmp-promise": "^3.0.3",
69
+ "uuid": "^11.1.0",
70
+ "zod": "^3.24.2"
53
71
  }
54
72
  }