n8n 1.3.0 → 1.4.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 (133) hide show
  1. package/dist/ActiveWebhooks.js +2 -5
  2. package/dist/ActiveWebhooks.js.map +1 -1
  3. package/dist/ActiveWorkflowRunner.js +6 -7
  4. package/dist/ActiveWorkflowRunner.js.map +1 -1
  5. package/dist/CredentialsHelper.d.ts +1 -0
  6. package/dist/CredentialsHelper.js +23 -0
  7. package/dist/CredentialsHelper.js.map +1 -1
  8. package/dist/InternalHooks.js +7 -11
  9. package/dist/InternalHooks.js.map +1 -1
  10. package/dist/PublicApi/v1/handlers/workflows/workflows.service.js +2 -2
  11. package/dist/PublicApi/v1/handlers/workflows/workflows.service.js.map +1 -1
  12. package/dist/Server.js +18 -10
  13. package/dist/Server.js.map +1 -1
  14. package/dist/UserManagement/PermissionChecker.js +2 -2
  15. package/dist/UserManagement/PermissionChecker.js.map +1 -1
  16. package/dist/WebhookHelpers.js +5 -0
  17. package/dist/WebhookHelpers.js.map +1 -1
  18. package/dist/WorkflowHelpers.d.ts +2 -2
  19. package/dist/WorkflowHelpers.js +62 -45
  20. package/dist/WorkflowHelpers.js.map +1 -1
  21. package/dist/commands/executeBatch.js +1 -4
  22. package/dist/commands/executeBatch.js.map +1 -1
  23. package/dist/commands/import/workflow.d.ts +1 -0
  24. package/dist/commands/import/workflow.js +5 -5
  25. package/dist/commands/import/workflow.js.map +1 -1
  26. package/dist/commands/worker.d.ts +0 -2
  27. package/dist/commands/worker.js +26 -5
  28. package/dist/commands/worker.js.map +1 -1
  29. package/dist/config/schema.js +1 -1
  30. package/dist/config/schema.js.map +1 -1
  31. package/dist/constants.d.ts +2 -0
  32. package/dist/constants.js +2 -0
  33. package/dist/constants.js.map +1 -1
  34. package/dist/controllers/auth.controller.d.ts +2 -2
  35. package/dist/controllers/auth.controller.js +5 -7
  36. package/dist/controllers/auth.controller.js.map +1 -1
  37. package/dist/controllers/me.controller.d.ts +3 -4
  38. package/dist/controllers/me.controller.js +12 -18
  39. package/dist/controllers/me.controller.js.map +1 -1
  40. package/dist/controllers/owner.controller.d.ts +7 -4
  41. package/dist/controllers/owner.controller.js +7 -4
  42. package/dist/controllers/owner.controller.js.map +1 -1
  43. package/dist/controllers/passwordReset.controller.d.ts +3 -6
  44. package/dist/controllers/passwordReset.controller.js +11 -14
  45. package/dist/controllers/passwordReset.controller.js.map +1 -1
  46. package/dist/controllers/tags.controller.d.ts +6 -10
  47. package/dist/controllers/tags.controller.js +10 -36
  48. package/dist/controllers/tags.controller.js.map +1 -1
  49. package/dist/controllers/users.controller.d.ts +3 -7
  50. package/dist/controllers/users.controller.js +20 -18
  51. package/dist/controllers/users.controller.js.map +1 -1
  52. package/dist/credentials/credentials.service.ee.js +2 -2
  53. package/dist/credentials/credentials.service.ee.js.map +1 -1
  54. package/dist/databases/migrations/common/1659888469333-AddJsonKeyPinData.js +2 -4
  55. package/dist/databases/migrations/common/1659888469333-AddJsonKeyPinData.js.map +1 -1
  56. package/dist/environments/sourceControl/sourceControl.service.ee.js.map +1 -1
  57. package/dist/environments/sourceControl/sourceControlImport.service.ee.js +2 -3
  58. package/dist/environments/sourceControl/sourceControlImport.service.ee.js.map +1 -1
  59. package/dist/eventbus/MessageEventBus/MessageEventBus.js +37 -4
  60. package/dist/eventbus/MessageEventBus/MessageEventBus.js.map +1 -1
  61. package/dist/eventbus/MessageEventBusWriter/MessageEventBusLogWriter.d.ts +4 -0
  62. package/dist/eventbus/MessageEventBusWriter/MessageEventBusLogWriter.js +16 -0
  63. package/dist/eventbus/MessageEventBusWriter/MessageEventBusLogWriter.js.map +1 -1
  64. package/dist/eventbus/MessageEventBusWriter/MessageEventBusLogWriterWorker.js +24 -0
  65. package/dist/eventbus/MessageEventBusWriter/MessageEventBusLogWriterWorker.js.map +1 -1
  66. package/dist/middlewares/listQuery/dtos/pagination.dto.d.ts +6 -0
  67. package/dist/middlewares/listQuery/dtos/pagination.dto.js +22 -0
  68. package/dist/middlewares/listQuery/dtos/pagination.dto.js.map +1 -0
  69. package/dist/middlewares/listQuery/dtos/workflow.filter.dto.d.ts +7 -0
  70. package/dist/middlewares/listQuery/dtos/workflow.filter.dto.js +55 -0
  71. package/dist/middlewares/listQuery/dtos/workflow.filter.dto.js.map +1 -0
  72. package/dist/middlewares/listQuery/dtos/workflow.select.dto.d.ts +5 -0
  73. package/dist/middlewares/listQuery/dtos/workflow.select.dto.js +31 -0
  74. package/dist/middlewares/listQuery/dtos/workflow.select.dto.js.map +1 -0
  75. package/dist/middlewares/listQuery/filter.d.ts +3 -2
  76. package/dist/middlewares/listQuery/filter.js +32 -15
  77. package/dist/middlewares/listQuery/filter.js.map +1 -1
  78. package/dist/middlewares/listQuery/index.d.ts +1 -1
  79. package/dist/middlewares/listQuery/pagination.js +33 -11
  80. package/dist/middlewares/listQuery/pagination.js.map +1 -1
  81. package/dist/middlewares/listQuery/select.js +8 -20
  82. package/dist/middlewares/listQuery/select.js.map +1 -1
  83. package/dist/requests.d.ts +33 -18
  84. package/dist/requests.js +5 -1
  85. package/dist/requests.js.map +1 -1
  86. package/dist/services/events.service.js +2 -2
  87. package/dist/services/events.service.js.map +1 -1
  88. package/dist/services/ownership.service.d.ts +7 -3
  89. package/dist/services/ownership.service.js +13 -4
  90. package/dist/services/ownership.service.js.map +1 -1
  91. package/dist/services/tag.service.d.ts +34 -0
  92. package/dist/services/tag.service.js +121 -0
  93. package/dist/services/tag.service.js.map +1 -0
  94. package/dist/services/user.service.d.ts +19 -0
  95. package/dist/services/user.service.js +62 -0
  96. package/dist/services/user.service.js.map +1 -0
  97. package/dist/sso/saml/schema/saml-schema-assertion-2.0.xsd.js +282 -282
  98. package/dist/sso/saml/schema/saml-schema-metadata-2.0.xsd.js +335 -335
  99. package/dist/sso/saml/schema/saml-schema-protocol-2.0.xsd.js +301 -301
  100. package/dist/telemetry/index.js +1 -1
  101. package/dist/telemetry/index.js.map +1 -1
  102. package/dist/utils.d.ts +3 -0
  103. package/dist/utils.js +5 -1
  104. package/dist/utils.js.map +1 -1
  105. package/dist/workflows/workflows.controller.ee.js +5 -14
  106. package/dist/workflows/workflows.controller.ee.js.map +1 -1
  107. package/dist/workflows/workflows.controller.js +5 -5
  108. package/dist/workflows/workflows.controller.js.map +1 -1
  109. package/dist/workflows/workflows.services.d.ts +5 -5
  110. package/dist/workflows/workflows.services.ee.d.ts +1 -4
  111. package/dist/workflows/workflows.services.ee.js +2 -13
  112. package/dist/workflows/workflows.services.ee.js.map +1 -1
  113. package/dist/workflows/workflows.services.js +51 -38
  114. package/dist/workflows/workflows.services.js.map +1 -1
  115. package/dist/workflows/workflows.types.d.ts +0 -4
  116. package/oclif.manifest.json +1 -1
  117. package/package.json +8 -8
  118. package/templates/oauth-error-callback.handlebars +6 -6
  119. package/dist/TagHelpers.d.ts +0 -7
  120. package/dist/TagHelpers.js +0 -59
  121. package/dist/TagHelpers.js.map +0 -1
  122. package/dist/middlewares/listQuery/error.d.ts +0 -1
  123. package/dist/middlewares/listQuery/error.js +0 -40
  124. package/dist/middlewares/listQuery/error.js.map +0 -1
  125. package/dist/middlewares/listQuery/schema.d.ts +0 -5
  126. package/dist/middlewares/listQuery/schema.js +0 -13
  127. package/dist/middlewares/listQuery/schema.js.map +0 -1
  128. package/dist/middlewares/listQuery/workflow.schema.d.ts +0 -10
  129. package/dist/middlewares/listQuery/workflow.schema.js +0 -59
  130. package/dist/middlewares/listQuery/workflow.schema.js.map +0 -1
  131. package/dist/user/user.service.d.ts +0 -9
  132. package/dist/user/user.service.js +0 -53
  133. package/dist/user/user.service.js.map +0 -1
@@ -1 +1 @@
1
- {"version":"1.3.0","commands":{"BaseCommand":{"id":"BaseCommand","pluginName":"n8n","pluginType":"core","aliases":[],"flags":{},"args":[]},"audit":{"id":"audit","description":"Generate a security audit report for this n8n instance","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n audit","$ n8n audit --categories=database,credentials","$ n8n audit --days-abandoned-workflow=10"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"categories":{"name":"categories","type":"option","description":"Comma-separated list of categories to include in the audit","default":"credentials,database,nodes,instance,filesystem"},"days-abandoned-workflow":{"name":"days-abandoned-workflow","type":"option","description":"Days for a workflow to be considered abandoned if not executed","default":90}},"args":[]},"execute":{"id":"execute","description":"\nExecutes a given workflow","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n execute --id=5","$ n8n execute --file=workflow.json"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"file":{"name":"file","type":"option","description":"path to a workflow file to execute"},"id":{"name":"id","type":"option","description":"id of the workflow to execute"},"rawOutput":{"name":"rawOutput","type":"boolean","description":"Outputs only JSON data, with no other text","allowNo":false}},"args":[]},"executeBatch":{"id":"executeBatch","description":"\nExecutes multiple workflows once","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n executeBatch","$ n8n executeBatch --concurrency=10 --skipList=/data/skipList.txt","$ n8n executeBatch --debug --output=/data/output.json","$ n8n executeBatch --ids=10,13,15 --shortOutput","$ n8n executeBatch --snapshot=/data/snapshots --shallow","$ n8n executeBatch --compare=/data/previousExecutionData --retries=2"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Toggles on displaying all errors and debug messages.","allowNo":false},"ids":{"name":"ids","type":"option","description":"Specifies workflow IDs to get executed, separated by a comma or a file containing the ids"},"concurrency":{"name":"concurrency","type":"option","description":"How many workflows can run in parallel. Defaults to 1 which means no concurrency.","default":1},"output":{"name":"output","type":"option","description":"Enable execution saving, You must inform an existing folder to save execution via this param"},"snapshot":{"name":"snapshot","type":"option","description":"Enables snapshot saving. You must inform an existing folder to save snapshots via this param."},"compare":{"name":"compare","type":"option","description":"Compares current execution with an existing snapshot. You must inform an existing folder where the snapshots are saved."},"shallow":{"name":"shallow","type":"boolean","description":"Compares only if attributes output from node are the same, with no regards to nested JSON objects.","allowNo":false},"githubWorkflow":{"name":"githubWorkflow","type":"boolean","description":"Enables more lenient comparison for GitHub workflows. This is useful for reducing false positives when comparing Test workflows.","allowNo":false},"skipList":{"name":"skipList","type":"option","description":"File containing a comma separated list of workflow IDs to skip."},"retries":{"name":"retries","type":"option","description":"Retries failed workflows up to N tries. Default is 1. Set 0 to disable.","default":1},"shortOutput":{"name":"shortOutput","type":"boolean","description":"Omits the full execution information from output, displaying only summary.","allowNo":false}},"args":[]},"start":{"id":"start","description":"Starts n8n. Makes Web-UI available and starts active workflows","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n start","$ n8n start --tunnel","$ n8n start -o","$ n8n start --tunnel -o"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"open":{"name":"open","type":"boolean","char":"o","description":"opens the UI automatically in browser","allowNo":false},"tunnel":{"name":"tunnel","type":"boolean","description":"runs the webhooks via a hooks.n8n.cloud tunnel server. Use only for testing and development!","allowNo":false},"reinstallMissingPackages":{"name":"reinstallMissingPackages","type":"boolean","description":"Attempts to self heal n8n if packages with nodes are missing. Might drastically increase startup times.","allowNo":false}},"args":[]},"webhook":{"id":"webhook","description":"Starts n8n webhook process. Intercepts only production URLs.","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n webhook"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"worker":{"id":"worker","description":"\nStarts a n8n worker","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n worker --concurrency=5"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"concurrency":{"name":"concurrency","type":"option","description":"How many jobs can run in parallel.","default":10}},"args":[]},"db:revert":{"id":"db:revert","description":"Revert last database migration","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n db:revert"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"export:credentials":{"id":"export:credentials","description":"Export credentials","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n export:credentials --all","$ n8n export:credentials --id=5 --output=file.json","$ n8n export:credentials --all --output=backups/latest.json","$ n8n export:credentials --backup --output=backups/latest/","$ n8n export:credentials --all --decrypted --output=backups/decrypted.json"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"all":{"name":"all","type":"boolean","description":"Export all credentials","allowNo":false},"backup":{"name":"backup","type":"boolean","description":"Sets --all --pretty --separate for simple backups. Only --output has to be set additionally.","allowNo":false},"id":{"name":"id","type":"option","description":"The ID of the credential to export"},"output":{"name":"output","type":"option","char":"o","description":"Output file name or directory if using separate files"},"pretty":{"name":"pretty","type":"boolean","description":"Format the output in an easier to read fashion","allowNo":false},"separate":{"name":"separate","type":"boolean","description":"Exports one file per credential (useful for versioning). Must inform a directory via --output.","allowNo":false},"decrypted":{"name":"decrypted","type":"boolean","description":"Exports data decrypted / in plain text. ALL SENSITIVE INFORMATION WILL BE VISIBLE IN THE FILES. Use to migrate from a installation to another that have a different secret key (in the config file).","allowNo":false}},"args":[]},"export:workflow":{"id":"export:workflow","description":"Export workflows","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n export:workflow --all","$ n8n export:workflow --id=5 --output=file.json","$ n8n export:workflow --all --output=backups/latest/","$ n8n export:workflow --backup --output=backups/latest/"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"all":{"name":"all","type":"boolean","description":"Export all workflows","allowNo":false},"backup":{"name":"backup","type":"boolean","description":"Sets --all --pretty --separate for simple backups. Only --output has to be set additionally.","allowNo":false},"id":{"name":"id","type":"option","description":"The ID of the workflow to export"},"output":{"name":"output","type":"option","char":"o","description":"Output file name or directory if using separate files"},"pretty":{"name":"pretty","type":"boolean","description":"Format the output in an easier to read fashion","allowNo":false},"separate":{"name":"separate","type":"boolean","description":"Exports one file per workflow (useful for versioning). Must inform a directory via --output.","allowNo":false}},"args":[]},"import:credentials":{"id":"import:credentials","description":"Import credentials","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n import:credentials --input=file.json","$ n8n import:credentials --separate --input=backups/latest/","$ n8n import:credentials --input=file.json --userId=1d64c3d2-85fe-4a83-a649-e446b07b3aae","$ n8n import:credentials --separate --input=backups/latest/ --userId=1d64c3d2-85fe-4a83-a649-e446b07b3aae"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"input":{"name":"input","type":"option","char":"i","description":"Input file name or directory if --separate is used"},"separate":{"name":"separate","type":"boolean","description":"Imports *.json files from directory provided by --input","allowNo":false},"userId":{"name":"userId","type":"option","description":"The ID of the user to assign the imported credentials to"}},"args":[]},"import:workflow":{"id":"import:workflow","description":"Import workflows","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n import:workflow --input=file.json","$ n8n import:workflow --separate --input=backups/latest/","$ n8n import:workflow --input=file.json --userId=1d64c3d2-85fe-4a83-a649-e446b07b3aae","$ n8n import:workflow --separate --input=backups/latest/ --userId=1d64c3d2-85fe-4a83-a649-e446b07b3aae"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"input":{"name":"input","type":"option","char":"i","description":"Input file name or directory if --separate is used"},"separate":{"name":"separate","type":"boolean","description":"Imports *.json files from directory provided by --input","allowNo":false},"userId":{"name":"userId","type":"option","description":"The ID of the user to assign the imported workflows to"}},"args":[]},"ldap:reset":{"id":"ldap:reset","description":"\nResets the database to the default ldap state","pluginName":"n8n","pluginType":"core","aliases":[],"flags":{},"args":[]},"license:clear":{"id":"license:clear","description":"Clear license","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n clear:license"],"flags":{},"args":[]},"license:info":{"id":"license:info","description":"Print license information","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n license:info"],"flags":{},"args":[]},"list:workflow":{"id":"list:workflow","description":"\nList workflows","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n list:workflow","$ n8n list:workflow --active=true --onlyId","$ n8n list:workflow --active=false"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"active":{"name":"active","type":"option","description":"Filters workflows by active status. Can be true or false"},"onlyId":{"name":"onlyId","type":"boolean","description":"Outputs workflow IDs only, one per line.","allowNo":false}},"args":[]},"update:workflow":{"id":"update:workflow","description":"Update workflows","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n update:workflow --all --active=false","$ n8n update:workflow --id=5 --active=true"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"active":{"name":"active","type":"option","description":"Active state the workflow/s should be set to"},"all":{"name":"all","type":"boolean","description":"Operate on all workflows","allowNo":false},"id":{"name":"id","type":"option","description":"The ID of the workflow to operate on"}},"args":[]},"user-management:reset":{"id":"user-management:reset","description":"Resets the database to the default user state","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n user-management:reset"],"flags":{},"args":[]}}}
1
+ {"version":"1.4.0","commands":{"BaseCommand":{"id":"BaseCommand","pluginName":"n8n","pluginType":"core","aliases":[],"flags":{},"args":[]},"audit":{"id":"audit","description":"Generate a security audit report for this n8n instance","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n audit","$ n8n audit --categories=database,credentials","$ n8n audit --days-abandoned-workflow=10"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"categories":{"name":"categories","type":"option","description":"Comma-separated list of categories to include in the audit","default":"credentials,database,nodes,instance,filesystem"},"days-abandoned-workflow":{"name":"days-abandoned-workflow","type":"option","description":"Days for a workflow to be considered abandoned if not executed","default":90}},"args":[]},"execute":{"id":"execute","description":"\nExecutes a given workflow","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n execute --id=5","$ n8n execute --file=workflow.json"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"file":{"name":"file","type":"option","description":"path to a workflow file to execute"},"id":{"name":"id","type":"option","description":"id of the workflow to execute"},"rawOutput":{"name":"rawOutput","type":"boolean","description":"Outputs only JSON data, with no other text","allowNo":false}},"args":[]},"executeBatch":{"id":"executeBatch","description":"\nExecutes multiple workflows once","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n executeBatch","$ n8n executeBatch --concurrency=10 --skipList=/data/skipList.txt","$ n8n executeBatch --debug --output=/data/output.json","$ n8n executeBatch --ids=10,13,15 --shortOutput","$ n8n executeBatch --snapshot=/data/snapshots --shallow","$ n8n executeBatch --compare=/data/previousExecutionData --retries=2"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Toggles on displaying all errors and debug messages.","allowNo":false},"ids":{"name":"ids","type":"option","description":"Specifies workflow IDs to get executed, separated by a comma or a file containing the ids"},"concurrency":{"name":"concurrency","type":"option","description":"How many workflows can run in parallel. Defaults to 1 which means no concurrency.","default":1},"output":{"name":"output","type":"option","description":"Enable execution saving, You must inform an existing folder to save execution via this param"},"snapshot":{"name":"snapshot","type":"option","description":"Enables snapshot saving. You must inform an existing folder to save snapshots via this param."},"compare":{"name":"compare","type":"option","description":"Compares current execution with an existing snapshot. You must inform an existing folder where the snapshots are saved."},"shallow":{"name":"shallow","type":"boolean","description":"Compares only if attributes output from node are the same, with no regards to nested JSON objects.","allowNo":false},"githubWorkflow":{"name":"githubWorkflow","type":"boolean","description":"Enables more lenient comparison for GitHub workflows. This is useful for reducing false positives when comparing Test workflows.","allowNo":false},"skipList":{"name":"skipList","type":"option","description":"File containing a comma separated list of workflow IDs to skip."},"retries":{"name":"retries","type":"option","description":"Retries failed workflows up to N tries. Default is 1. Set 0 to disable.","default":1},"shortOutput":{"name":"shortOutput","type":"boolean","description":"Omits the full execution information from output, displaying only summary.","allowNo":false}},"args":[]},"start":{"id":"start","description":"Starts n8n. Makes Web-UI available and starts active workflows","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n start","$ n8n start --tunnel","$ n8n start -o","$ n8n start --tunnel -o"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"open":{"name":"open","type":"boolean","char":"o","description":"opens the UI automatically in browser","allowNo":false},"tunnel":{"name":"tunnel","type":"boolean","description":"runs the webhooks via a hooks.n8n.cloud tunnel server. Use only for testing and development!","allowNo":false},"reinstallMissingPackages":{"name":"reinstallMissingPackages","type":"boolean","description":"Attempts to self heal n8n if packages with nodes are missing. Might drastically increase startup times.","allowNo":false}},"args":[]},"webhook":{"id":"webhook","description":"Starts n8n webhook process. Intercepts only production URLs.","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n webhook"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"worker":{"id":"worker","description":"\nStarts a n8n worker","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n worker --concurrency=5"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"concurrency":{"name":"concurrency","type":"option","description":"How many jobs can run in parallel.","default":10}},"args":[]},"db:revert":{"id":"db:revert","description":"Revert last database migration","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n db:revert"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"export:credentials":{"id":"export:credentials","description":"Export credentials","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n export:credentials --all","$ n8n export:credentials --id=5 --output=file.json","$ n8n export:credentials --all --output=backups/latest.json","$ n8n export:credentials --backup --output=backups/latest/","$ n8n export:credentials --all --decrypted --output=backups/decrypted.json"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"all":{"name":"all","type":"boolean","description":"Export all credentials","allowNo":false},"backup":{"name":"backup","type":"boolean","description":"Sets --all --pretty --separate for simple backups. Only --output has to be set additionally.","allowNo":false},"id":{"name":"id","type":"option","description":"The ID of the credential to export"},"output":{"name":"output","type":"option","char":"o","description":"Output file name or directory if using separate files"},"pretty":{"name":"pretty","type":"boolean","description":"Format the output in an easier to read fashion","allowNo":false},"separate":{"name":"separate","type":"boolean","description":"Exports one file per credential (useful for versioning). Must inform a directory via --output.","allowNo":false},"decrypted":{"name":"decrypted","type":"boolean","description":"Exports data decrypted / in plain text. ALL SENSITIVE INFORMATION WILL BE VISIBLE IN THE FILES. Use to migrate from a installation to another that have a different secret key (in the config file).","allowNo":false}},"args":[]},"export:workflow":{"id":"export:workflow","description":"Export workflows","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n export:workflow --all","$ n8n export:workflow --id=5 --output=file.json","$ n8n export:workflow --all --output=backups/latest/","$ n8n export:workflow --backup --output=backups/latest/"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"all":{"name":"all","type":"boolean","description":"Export all workflows","allowNo":false},"backup":{"name":"backup","type":"boolean","description":"Sets --all --pretty --separate for simple backups. Only --output has to be set additionally.","allowNo":false},"id":{"name":"id","type":"option","description":"The ID of the workflow to export"},"output":{"name":"output","type":"option","char":"o","description":"Output file name or directory if using separate files"},"pretty":{"name":"pretty","type":"boolean","description":"Format the output in an easier to read fashion","allowNo":false},"separate":{"name":"separate","type":"boolean","description":"Exports one file per workflow (useful for versioning). Must inform a directory via --output.","allowNo":false}},"args":[]},"import:credentials":{"id":"import:credentials","description":"Import credentials","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n import:credentials --input=file.json","$ n8n import:credentials --separate --input=backups/latest/","$ n8n import:credentials --input=file.json --userId=1d64c3d2-85fe-4a83-a649-e446b07b3aae","$ n8n import:credentials --separate --input=backups/latest/ --userId=1d64c3d2-85fe-4a83-a649-e446b07b3aae"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"input":{"name":"input","type":"option","char":"i","description":"Input file name or directory if --separate is used"},"separate":{"name":"separate","type":"boolean","description":"Imports *.json files from directory provided by --input","allowNo":false},"userId":{"name":"userId","type":"option","description":"The ID of the user to assign the imported credentials to"}},"args":[]},"import:workflow":{"id":"import:workflow","description":"Import workflows","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n import:workflow --input=file.json","$ n8n import:workflow --separate --input=backups/latest/","$ n8n import:workflow --input=file.json --userId=1d64c3d2-85fe-4a83-a649-e446b07b3aae","$ n8n import:workflow --separate --input=backups/latest/ --userId=1d64c3d2-85fe-4a83-a649-e446b07b3aae"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"input":{"name":"input","type":"option","char":"i","description":"Input file name or directory if --separate is used"},"separate":{"name":"separate","type":"boolean","description":"Imports *.json files from directory provided by --input","allowNo":false},"userId":{"name":"userId","type":"option","description":"The ID of the user to assign the imported workflows to"}},"args":[]},"ldap:reset":{"id":"ldap:reset","description":"\nResets the database to the default ldap state","pluginName":"n8n","pluginType":"core","aliases":[],"flags":{},"args":[]},"license:clear":{"id":"license:clear","description":"Clear license","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n clear:license"],"flags":{},"args":[]},"license:info":{"id":"license:info","description":"Print license information","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n license:info"],"flags":{},"args":[]},"list:workflow":{"id":"list:workflow","description":"\nList workflows","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n list:workflow","$ n8n list:workflow --active=true --onlyId","$ n8n list:workflow --active=false"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"active":{"name":"active","type":"option","description":"Filters workflows by active status. Can be true or false"},"onlyId":{"name":"onlyId","type":"boolean","description":"Outputs workflow IDs only, one per line.","allowNo":false}},"args":[]},"update:workflow":{"id":"update:workflow","description":"Update workflows","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n update:workflow --all --active=false","$ n8n update:workflow --id=5 --active=true"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"active":{"name":"active","type":"option","description":"Active state the workflow/s should be set to"},"all":{"name":"all","type":"boolean","description":"Operate on all workflows","allowNo":false},"id":{"name":"id","type":"option","description":"The ID of the workflow to operate on"}},"args":[]},"user-management:reset":{"id":"user-management:reset","description":"Resets the database to the default user state","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n user-management:reset"],"flags":{},"args":[]}}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "n8n Workflow Automation Tool",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "homepage": "https://n8n.io",
@@ -163,11 +163,11 @@
163
163
  "xml2js": "^0.5.0",
164
164
  "xmllint-wasm": "^3.0.1",
165
165
  "yamljs": "^0.3.0",
166
- "@n8n/client-oauth2": "0.6.0",
167
- "n8n-core": "1.3.0",
168
- "n8n-editor-ui": "1.3.0",
169
- "n8n-nodes-base": "1.3.0",
170
- "n8n-workflow": "1.3.0"
166
+ "@n8n/client-oauth2": "0.7.0",
167
+ "n8n-core": "1.4.0",
168
+ "n8n-editor-ui": "1.4.0",
169
+ "n8n-nodes-base": "1.4.0",
170
+ "n8n-workflow": "1.4.0"
171
171
  },
172
172
  "scripts": {
173
173
  "clean": "rimraf dist .turbo",
@@ -178,8 +178,8 @@
178
178
  "dev:worker": "concurrently -k -n \"TypeScript,Node\" -c \"yellow.bold,cyan.bold\" \"npm run watch\" \"nodemon worker\"",
179
179
  "dev:webhook": "concurrently -k -n \"TypeScript,Node\" -c \"yellow.bold,cyan.bold\" \"npm run watch\" \"nodemon webhook\"",
180
180
  "format": "prettier --write . --ignore-path ../../.prettierignore",
181
- "lint": "eslint . --quiet --report-unused-disable-directives",
182
- "lintfix": "eslint . --fix --report-unused-disable-directives",
181
+ "lint": "eslint . --quiet",
182
+ "lintfix": "eslint . --fix",
183
183
  "start": "run-script-os",
184
184
  "start:default": "cd bin && ./n8n",
185
185
  "start:windows": "cd bin && n8n",
@@ -2,9 +2,9 @@
2
2
  <head>
3
3
  <title>n8n - OAuth Callback</title>
4
4
  <style>
5
- body { font-family: 'Open Sans', sans-serif; padding: 10px;}
6
- details.error { margin-bottom: 20px; }
7
- pre.reason { background: #f7f7f7; border: 1px solid #ddd; border-radius: 3px; padding: 10px; overflow: auto; overflow-wrap: break-word; white-space: pre-wrap;}
5
+ body { font-family: 'Open Sans', sans-serif; padding: 10px;} details.error { margin-bottom:
6
+ 20px; } pre.reason { background: #f7f7f7; border: 1px solid #ddd; border-radius: 3px; padding:
7
+ 10px; overflow: auto; overflow-wrap: break-word; white-space: pre-wrap;}
8
8
  </style>
9
9
  </head>
10
10
  <body>
@@ -12,12 +12,12 @@
12
12
  <h4>Error: {{error.message}}</h4>
13
13
  <details class='error'>
14
14
  <summary>More details</summary>
15
- {{#if error.reason}}<pre class="reason">{{error.reason}}</pre>{{/if}}
16
- </details>
15
+ {{#if error.reason}}<pre class='reason'>{{error.reason}}</pre>{{/if}}
16
+ </details>
17
17
  {{/if}}
18
18
  Failed to connect. The window can be closed now.
19
19
  <script>
20
20
  (function messageParent() { window.opener?.postMessage('error', '*'); })();
21
21
  </script>
22
22
  </body>
23
- </html>
23
+ </html>
@@ -1,7 +0,0 @@
1
- import type { EntityManager } from 'typeorm';
2
- import type { TagEntity } from './databases/entities/TagEntity';
3
- import type { IWorkflowToImport } from './Interfaces';
4
- export declare function sortByRequestOrder(tags: TagEntity[], { requestOrder }: {
5
- requestOrder: string[];
6
- }): TagEntity[];
7
- export declare function setTagsForImport(transactionManager: EntityManager, workflow: IWorkflowToImport, tags: TagEntity[]): Promise<void>;
@@ -1,59 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.setTagsForImport = exports.sortByRequestOrder = void 0;
7
- const repositories_1 = require("./databases/repositories");
8
- const typedi_1 = __importDefault(require("typedi"));
9
- function sortByRequestOrder(tags, { requestOrder }) {
10
- const tagMap = tags.reduce((acc, tag) => {
11
- acc[tag.id] = tag;
12
- return acc;
13
- }, {});
14
- return requestOrder.map((tagId) => tagMap[tagId]);
15
- }
16
- exports.sortByRequestOrder = sortByRequestOrder;
17
- const createTag = async (transactionManager, name) => {
18
- const tag = typedi_1.default.get(repositories_1.TagRepository).create({ name: name.trim() });
19
- return transactionManager.save(tag);
20
- };
21
- const findOrCreateTag = async (transactionManager, importTag, tagsEntities) => {
22
- const identicalMatch = tagsEntities.find((existingTag) => existingTag.id === importTag.id &&
23
- existingTag.createdAt &&
24
- importTag.createdAt &&
25
- existingTag.createdAt.getTime() === new Date(importTag.createdAt).getTime());
26
- if (identicalMatch) {
27
- return identicalMatch;
28
- }
29
- const nameMatch = tagsEntities.find((existingTag) => existingTag.name === importTag.name);
30
- if (nameMatch) {
31
- return nameMatch;
32
- }
33
- const created = await createTag(transactionManager, importTag.name);
34
- tagsEntities.push(created);
35
- return created;
36
- };
37
- const hasTags = (workflow) => 'tags' in workflow && Array.isArray(workflow.tags) && workflow.tags.length > 0;
38
- async function setTagsForImport(transactionManager, workflow, tags) {
39
- var _a;
40
- if (!hasTags(workflow)) {
41
- return;
42
- }
43
- const workflowTags = workflow.tags;
44
- const tagLookupPromises = [];
45
- for (let i = 0; i < workflowTags.length; i++) {
46
- if ((_a = workflowTags[i]) === null || _a === void 0 ? void 0 : _a.name) {
47
- const lookupPromise = findOrCreateTag(transactionManager, workflowTags[i], tags).then((tag) => {
48
- workflowTags[i] = {
49
- id: tag.id,
50
- name: tag.name,
51
- };
52
- });
53
- tagLookupPromises.push(lookupPromise);
54
- }
55
- }
56
- await Promise.all(tagLookupPromises);
57
- }
58
- exports.setTagsForImport = setTagsForImport;
59
- //# sourceMappingURL=TagHelpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TagHelpers.js","sourceRoot":"","sources":["../src/TagHelpers.ts"],"names":[],"mappings":"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"}
@@ -1 +0,0 @@
1
- export declare function handleListQueryError(paramName: 'filter' | 'select', paramValue: string, maybeError: unknown): void;
@@ -1,40 +0,0 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.handleListQueryError = void 0;
27
- const ResponseHelper_1 = require("../../ResponseHelper");
28
- const n8n_workflow_1 = require("n8n-workflow");
29
- const utils = __importStar(require("../../utils"));
30
- function handleListQueryError(paramName, paramValue, maybeError) {
31
- const error = utils.toError(maybeError);
32
- n8n_workflow_1.LoggerProxy.error(`Invalid "${paramName}" query parameter`, {
33
- paramName,
34
- paramValue,
35
- error,
36
- });
37
- throw new ResponseHelper_1.BadRequestError(`Invalid "${paramName}" query parameter: ${paramValue}. Error: ${error.message}`);
38
- }
39
- exports.handleListQueryError = handleListQueryError;
40
- //# sourceMappingURL=error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error.js","sourceRoot":"","sources":["../../../src/middlewares/listQuery/error.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAmD;AACnD,+CAA2C;AAC3C,+CAAiC;AAEjC,SAAgB,oBAAoB,CACnC,SAA8B,EAC9B,UAAkB,EAClB,UAAmB;IAEnB,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAExC,0BAAW,CAAC,KAAK,CAAC,YAAY,SAAS,mBAAmB,EAAE;QAC3D,SAAS;QACT,UAAU;QACV,KAAK;KACL,CAAC,CAAC;IAEH,MAAM,IAAI,gCAAe,CACxB,YAAY,SAAS,sBAAsB,UAAU,YAAY,KAAK,CAAC,OAAO,EAAE,CAChF,CAAC;AACH,CAAC;AAhBD,oDAgBC"}
@@ -1,5 +0,0 @@
1
- export declare class Schema {
2
- private data;
3
- constructor(data?: unknown);
4
- static get fieldNames(): string[];
5
- }
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Schema = void 0;
4
- class Schema {
5
- constructor(data = {}) {
6
- this.data = data;
7
- }
8
- static get fieldNames() {
9
- return [];
10
- }
11
- }
12
- exports.Schema = Schema;
13
- //# sourceMappingURL=schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/middlewares/listQuery/schema.ts"],"names":[],"mappings":";;;AAAA,MAAa,MAAM;IAClB,YAAoB,OAAgB,EAAE;QAAlB,SAAI,GAAJ,IAAI,CAAc;IAAG,CAAC;IAE1C,MAAM,KAAK,UAAU;QACpB,OAAO,EAAE,CAAC;IACX,CAAC;CACD;AAND,wBAMC"}
@@ -1,10 +0,0 @@
1
- import { Schema } from '../../middlewares/listQuery/schema';
2
- export declare class WorkflowSchema extends Schema {
3
- constructor(data?: unknown);
4
- id?: string;
5
- name?: string;
6
- active?: boolean;
7
- createdAt?: Date;
8
- updatedAt?: Date;
9
- static get fieldNames(): string[];
10
- }
@@ -1,59 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.WorkflowSchema = void 0;
13
- const schema_1 = require("../../middlewares/listQuery/schema");
14
- const class_validator_1 = require("class-validator");
15
- class WorkflowSchema extends schema_1.Schema {
16
- constructor(data = {}) {
17
- super();
18
- this.id = undefined;
19
- this.name = undefined;
20
- this.active = undefined;
21
- this.createdAt = undefined;
22
- this.updatedAt = undefined;
23
- Object.assign(this, data);
24
- const result = (0, class_validator_1.validateSync)(this, { whitelist: true });
25
- if (result.length > 0) {
26
- throw new Error('Parsed filter does not fit the schema');
27
- }
28
- }
29
- static get fieldNames() {
30
- return Object.getOwnPropertyNames(new WorkflowSchema());
31
- }
32
- }
33
- exports.WorkflowSchema = WorkflowSchema;
34
- __decorate([
35
- (0, class_validator_1.IsOptional)(),
36
- (0, class_validator_1.IsString)(),
37
- __metadata("design:type", String)
38
- ], WorkflowSchema.prototype, "id", void 0);
39
- __decorate([
40
- (0, class_validator_1.IsOptional)(),
41
- (0, class_validator_1.IsString)(),
42
- __metadata("design:type", String)
43
- ], WorkflowSchema.prototype, "name", void 0);
44
- __decorate([
45
- (0, class_validator_1.IsOptional)(),
46
- (0, class_validator_1.IsBoolean)(),
47
- __metadata("design:type", Boolean)
48
- ], WorkflowSchema.prototype, "active", void 0);
49
- __decorate([
50
- (0, class_validator_1.IsOptional)(),
51
- (0, class_validator_1.IsDateString)(),
52
- __metadata("design:type", Date)
53
- ], WorkflowSchema.prototype, "createdAt", void 0);
54
- __decorate([
55
- (0, class_validator_1.IsOptional)(),
56
- (0, class_validator_1.IsDateString)(),
57
- __metadata("design:type", Date)
58
- ], WorkflowSchema.prototype, "updatedAt", void 0);
59
- //# sourceMappingURL=workflow.schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workflow.schema.js","sourceRoot":"","sources":["../../../src/middlewares/listQuery/workflow.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2DAAwD;AACxD,qDAA8F;AAE9F,MAAa,cAAe,SAAQ,eAAM;IACzC,YAAY,OAAgB,EAAE;QAC7B,KAAK,EAAE,CAAC;QAaT,OAAE,GAAY,SAAS,CAAC;QAIxB,SAAI,GAAY,SAAS,CAAC;QAI1B,WAAM,GAAa,SAAS,CAAC;QAI7B,cAAS,GAAU,SAAS,CAAC;QAI7B,cAAS,GAAU,SAAS,CAAC;QA5B5B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAG1B,MAAM,MAAM,GAAG,IAAA,8BAAY,EAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAEvD,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;YACtB,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;SACzD;IACF,CAAC;IAsBD,MAAM,KAAK,UAAU;QACpB,OAAO,MAAM,CAAC,mBAAmB,CAAC,IAAI,cAAc,EAAE,CAAC,CAAC;IACzD,CAAC;CACD;AApCD,wCAoCC;AArBA;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;0CACa;AAIxB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;4CACe;AAI1B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;;8CACiB;AAI7B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,8BAAY,GAAE;8BACH,IAAI;iDAAa;AAI7B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,8BAAY,GAAE;8BACH,IAAI;iDAAa"}
@@ -1,9 +0,0 @@
1
- import type { EntityManager, FindOptionsWhere } from 'typeorm';
2
- import { User } from '../databases/entities/User';
3
- import type { IUserSettings } from 'n8n-workflow';
4
- export declare class UserService {
5
- static get(where: FindOptionsWhere<User>): Promise<User | null>;
6
- static getByIds(transaction: EntityManager, ids: string[]): Promise<User[]>;
7
- static updateUserSettings(id: string, userSettings: Partial<IUserSettings>): Promise<import("typeorm").UpdateResult>;
8
- static generatePasswordResetUrl(instanceBaseUrl: string, token: string): Promise<string>;
9
- }
@@ -1,53 +0,0 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.UserService = void 0;
27
- const typeorm_1 = require("typeorm");
28
- const Db = __importStar(require("../Db"));
29
- const User_1 = require("../databases/entities/User");
30
- class UserService {
31
- static async get(where) {
32
- return Db.collections.User.findOne({
33
- relations: ['globalRole'],
34
- where,
35
- });
36
- }
37
- static async getByIds(transaction, ids) {
38
- return transaction.find(User_1.User, { where: { id: (0, typeorm_1.In)(ids) } });
39
- }
40
- static async updateUserSettings(id, userSettings) {
41
- const { settings: currentSettings } = await Db.collections.User.findOneOrFail({
42
- where: { id },
43
- });
44
- return Db.collections.User.update(id, { settings: { ...currentSettings, ...userSettings } });
45
- }
46
- static async generatePasswordResetUrl(instanceBaseUrl, token) {
47
- const url = new URL(`${instanceBaseUrl}/change-password`);
48
- url.searchParams.append('token', token);
49
- return url.toString();
50
- }
51
- }
52
- exports.UserService = UserService;
53
- //# sourceMappingURL=user.service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"user.service.js","sourceRoot":"","sources":["../../src/user/user.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,qCAA6B;AAC7B,yCAA2B;AAC3B,4CAAyC;AAGzC,MAAa,WAAW;IACvB,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,KAA6B;QAC7C,OAAO,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC;YAClC,SAAS,EAAE,CAAC,YAAY,CAAC;YACzB,KAAK;SACL,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,WAA0B,EAAE,GAAa;QAC9D,OAAO,WAAW,CAAC,IAAI,CAAC,WAAI,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,IAAA,YAAE,EAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;IAC3D,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,EAAU,EAAE,YAAoC;QAC/E,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,GAAG,MAAM,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,aAAa,CAAC;YAC7E,KAAK,EAAE,EAAE,EAAE,EAAE;SACb,CAAC,CAAC;QACH,OAAO,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,GAAG,eAAe,EAAE,GAAG,YAAY,EAAE,EAAE,CAAC,CAAC;IAC9F,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,wBAAwB,CAAC,eAAuB,EAAE,KAAa;QAC3E,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,eAAe,kBAAkB,CAAC,CAAC;QAC1D,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACxC,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;IACvB,CAAC;CACD;AAxBD,kCAwBC"}