n8n-nodes-smart-memory 1.0.96 → 1.0.97
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.
package/package.json
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions } from '../interfaces/MemoryInterfaces';
|
|
2
|
-
export declare class WorkflowUtils {
|
|
3
|
-
/**
|
|
4
|
-
* Finds the storage backend used by other Smart Memory nodes in the workflow.
|
|
5
|
-
* @param context - The execution context from the n8n node.
|
|
6
|
-
* @returns The storage backend as a string, or null if none is found.
|
|
7
|
-
* @throws An error if multiple different storage backends are found.
|
|
8
|
-
*/
|
|
9
|
-
static findStorageBackendInWorkflow(context: IExecuteFunctions): Promise<string | null>;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=WorkflowUtils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WorkflowUtils.d.ts","sourceRoot":"","sources":["../../src/utils/WorkflowUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAWnE,qBAAa,aAAa;IACxB;;;;;OAKG;WACU,4BAA4B,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;CAuB9F"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WorkflowUtils = void 0;
|
|
4
|
-
class WorkflowUtils {
|
|
5
|
-
/**
|
|
6
|
-
* Finds the storage backend used by other Smart Memory nodes in the workflow.
|
|
7
|
-
* @param context - The execution context from the n8n node.
|
|
8
|
-
* @returns The storage backend as a string, or null if none is found.
|
|
9
|
-
* @throws An error if multiple different storage backends are found.
|
|
10
|
-
*/
|
|
11
|
-
static async findStorageBackendInWorkflow(context) {
|
|
12
|
-
// @ts-ignore
|
|
13
|
-
const nodes = (await context.getWorkflow().nodes);
|
|
14
|
-
const smartMemoryNodes = nodes.filter((node) => node.type === 'smartMemory');
|
|
15
|
-
if (smartMemoryNodes.length <= 1) {
|
|
16
|
-
return null; // No other nodes to infer from
|
|
17
|
-
}
|
|
18
|
-
const backends = new Set();
|
|
19
|
-
for (const node of smartMemoryNodes) {
|
|
20
|
-
if (node.parameters && node.parameters.storageBackend) {
|
|
21
|
-
backends.add(node.parameters.storageBackend);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
if (backends.size > 1) {
|
|
25
|
-
throw new Error('Multiple storage backends found in workflow. Please use the "Custom" scope to specify which backend to clear.');
|
|
26
|
-
}
|
|
27
|
-
const backend = backends.values().next().value;
|
|
28
|
-
return backend !== undefined ? backend : null;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
exports.WorkflowUtils = WorkflowUtils;
|
|
32
|
-
//# sourceMappingURL=WorkflowUtils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WorkflowUtils.js","sourceRoot":"","sources":["../../src/utils/WorkflowUtils.ts"],"names":[],"mappings":";;;AAWA,MAAa,aAAa;IACxB;;;;;OAKG;IACH,MAAM,CAAC,KAAK,CAAC,4BAA4B,CAAC,OAA0B;QAClE,aAAa;QACb,MAAM,KAAK,GAAG,CAAC,MAAM,OAAO,CAAC,WAAW,EAAE,CAAC,KAAK,CAAY,CAAC;QAC7D,MAAM,gBAAgB,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAW,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,aAAa,CAAC,CAAC;QAEpF,IAAI,gBAAgB,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;YACjC,OAAO,IAAI,CAAC,CAAC,+BAA+B;QAC9C,CAAC;QAED,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;QACnC,KAAK,MAAM,IAAI,IAAI,gBAAgB,EAAE,CAAC;YACpC,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC;gBACtD,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;YAC/C,CAAC;QACH,CAAC;QAED,IAAI,QAAQ,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,+GAA+G,CAAC,CAAC;QACnI,CAAC;QAED,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC;QAC/C,OAAO,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;IAChD,CAAC;CACF;AA9BD,sCA8BC"}
|