mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(core): Introduce simplified node versioning (#3205)
* ✨ Introduce simple node versioning * ⚡ Add example how to read version in node-code for custom logic * 🐛 Fix setting of parameters * 🐛 Fix another instance where it sets the wrong parameter * ⚡ Remove unnecessary TOODs * ⚡ Revert Set Node example changes * ;rotating_light: Add test
This commit is contained in:
@@ -342,6 +342,7 @@ export class CredentialsHelper extends ICredentialsHelper {
|
||||
decryptedDataOriginal as INodeParameters,
|
||||
true,
|
||||
false,
|
||||
null,
|
||||
) as ICredentialDataDecryptedObject;
|
||||
|
||||
if (decryptedDataOriginal.oauthTokenData !== undefined) {
|
||||
@@ -436,8 +437,6 @@ export class CredentialsHelper extends ICredentialsHelper {
|
||||
// Add special database related data
|
||||
newCredentialsData.updatedAt = new Date();
|
||||
|
||||
// TODO: also add user automatically depending on who is logged in, if anybody is logged in
|
||||
|
||||
// Save the credentials in DB
|
||||
const findQuery = {
|
||||
id: credentials.id,
|
||||
@@ -562,7 +561,9 @@ export class CredentialsHelper extends ICredentialsHelper {
|
||||
parameters: {},
|
||||
name: 'Temp-Node',
|
||||
type: nodeType.description.name,
|
||||
typeVersion: nodeType.description.version,
|
||||
typeVersion: Array.isArray(nodeType.description.version)
|
||||
? nodeType.description.version.slice(-1)[0]
|
||||
: nodeType.description.version,
|
||||
position: [0, 0],
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user