Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into node-354-support-bi…
Browse files Browse the repository at this point in the history
…nary-streaming-for-the-respond
  • Loading branch information
netroy committed May 15, 2023
2 parents ad7407c + 2a20a19 commit 89e67f7
Show file tree
Hide file tree
Showing 37 changed files with 805 additions and 595 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e-tests-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ jobs:
run: exit 0

- name: Fail job if run-e2e-tests failed
if: needs.run-e2e-tests.result == 'failure'
if: ${{ github.event.review.state != 'approved' || needs.run-e2e-tests.result == 'failure' }}
run: exit 1
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
# [0.228.0](https://github.com/n8n-io/n8n/compare/[email protected]@0.228.0) (2023-05-11)


### Bug Fixes

* **AWS Rekognition Node:** Fix all different action type ([#6136](https://github.com/n8n-io/n8n/issues/6136)) ([22b82a4](https://github.com/n8n-io/n8n/commit/22b82a43a24bb8415eb8f4a941b05647ef8904c2))
* **core:** Ensure DB repositories are initialized before the DB migrations are run ([#6220](https://github.com/n8n-io/n8n/issues/6220)) ([500c0eb](https://github.com/n8n-io/n8n/commit/500c0ebce34dc2d21a531176dee965a70abec5f8))
* **core:** Move nodeExecute InternalHook calls to hookFunctionsSave ([#6193](https://github.com/n8n-io/n8n/issues/6193)) ([f00b2ae](https://github.com/n8n-io/n8n/commit/f00b2ae3eaa225e483abc8defdc58d27b7d2c5e8))
* Correctly save executions that failed when polling as error instead of new ([#6192](https://github.com/n8n-io/n8n/issues/6192)) ([06948b5](https://github.com/n8n-io/n8n/commit/06948b5ba5775b4f03d1ce46d57a461014317d51))
* **editor:** Add loading skeletons to Executions list page ([#6184](https://github.com/n8n-io/n8n/issues/6184)) ([eae3a55](https://github.com/n8n-io/n8n/commit/eae3a55cc6b87bc8998d18d3d32d0d03013996b1))
* **editor:** Display SSO entry in Settings on Cloud ([#6181](https://github.com/n8n-io/n8n/issues/6181)) ([b0a1899](https://github.com/n8n-io/n8n/commit/b0a1899e7141e5726d4fcbca6bba47e8e4b5cef7))
* **editor:** Fix polling trigger check for `runData` ([#6130](https://github.com/n8n-io/n8n/issues/6130)) ([80831cd](https://github.com/n8n-io/n8n/commit/80831cd7c60f77557c37317600690a289d966448))
* **editor:** Fix viewing and downloading of binary data ([#6218](https://github.com/n8n-io/n8n/issues/6218)) ([b9779c3](https://github.com/n8n-io/n8n/commit/b9779c32936c8b5e2385226ecab1025ff88d7044))
* **editor:** Flag issues only on workflow activation ([#6127](https://github.com/n8n-io/n8n/issues/6127)) ([1b49c17](https://github.com/n8n-io/n8n/commit/1b49c17f38e97547430c407e21284b0c508469fa))
* **editor:** Remove duplicate mapping of `item.json` key in data pinning ([#6135](https://github.com/n8n-io/n8n/issues/6135)) ([91fee0c](https://github.com/n8n-io/n8n/commit/91fee0ca667f233c0bde0dc6089bbed7d7db5b5f))
* **editor:** Show the correct actions count in the nodes list ([#6183](https://github.com/n8n-io/n8n/issues/6183)) ([751e132](https://github.com/n8n-io/n8n/commit/751e132968470144cfca1c1b7ca22caf2c4c1de4))
* **editor:** Update and add design system checkbox component to Editor ([#6178](https://github.com/n8n-io/n8n/issues/6178)) ([13c143e](https://github.com/n8n-io/n8n/commit/13c143eb6df41457fbd361674f2063b983a0e077))
* **editor:** Update and fix storybook (was failing to run in local dev mode) ([#6180](https://github.com/n8n-io/n8n/issues/6180)) ([1e6a75f](https://github.com/n8n-io/n8n/commit/1e6a75f3416cdfcce1299dc9d242e23d0ea97ad3))
* **FTP Node:** Use filename instead of remote filepath for downloaded binary data ([#6170](https://github.com/n8n-io/n8n/issues/6170)) ([be08933](https://github.com/n8n-io/n8n/commit/be089331b372e029ab5516b91e63a2d5d9033719))
* **Google Sheets Node:** Upgrade xlsx to address CVE-2023-30533 ([#6172](https://github.com/n8n-io/n8n/issues/6172)) ([45dc985](https://github.com/n8n-io/n8n/commit/45dc985af742b049dc5673cf972da704d1f1f220))
* **HTTP Request Node:** Correctly doesn't redirect on non GET method ([#6132](https://github.com/n8n-io/n8n/issues/6132)) ([3f5c606](https://github.com/n8n-io/n8n/commit/3f5c6062542f3b2b8a02cf0820e03da3f01d8bf2))
* **MySQL Node:** Node should return date types as strings ([#6169](https://github.com/n8n-io/n8n/issues/6169)) ([5d77ec7](https://github.com/n8n-io/n8n/commit/5d77ec76e3c47fe9f9d7f31fe6c03827685ec576))
* **Postgres Node:** Always return TIMESTAMP and TIMESTAMPZ as ISO string ([#6145](https://github.com/n8n-io/n8n/issues/6145)) ([0eb4d9f](https://github.com/n8n-io/n8n/commit/0eb4d9fc16aad1d1a350ba074c4b86712fbd90a1))
* Prevent overflow when rendering expression hints ([#6214](https://github.com/n8n-io/n8n/issues/6214)) ([c717771](https://github.com/n8n-io/n8n/commit/c7177719e5f60813f4d15f7f97f1b4f253e29b07))
* Prevent unnecessary error messages also for data loaded flag ([#6201](https://github.com/n8n-io/n8n/issues/6201)) ([d5e62ff](https://github.com/n8n-io/n8n/commit/d5e62ff096ddefd52dae742166fe92ceef17ded6))


### Features

* **Airtable Node:** Access token support ([#6160](https://github.com/n8n-io/n8n/issues/6160)) ([f9fd820](https://github.com/n8n-io/n8n/commit/f9fd82040ac09914a03e5b9f8f84fce5f6a99835))
* **Code Node:** Add Python support ([#4295](https://github.com/n8n-io/n8n/issues/4295)) ([35c8510](https://github.com/n8n-io/n8n/commit/35c8510ab6d607fe59056a4aa1d8d148e194d12c))
* **core:** Improve health check ([#6205](https://github.com/n8n-io/n8n/issues/6205)) ([9e7b9fb](https://github.com/n8n-io/n8n/commit/9e7b9fb443046c73135efb70d0d1894207125f66))
* Create NPM node ([#6177](https://github.com/n8n-io/n8n/issues/6177)) ([f3bc6f1](https://github.com/n8n-io/n8n/commit/f3bc6f19b68f6bd4bd99614f60bd6833bd15813f))
* **Date & Time Node:** Overhaul of the node ([#5904](https://github.com/n8n-io/n8n/issues/5904)) ([7d1d1f7](https://github.com/n8n-io/n8n/commit/7d1d1f7872163cecb468c317670da2d8b89a7651))
* **HubSpot Node:** Overhaul the HubSpot Node ([#4337](https://github.com/n8n-io/n8n/issues/4337)) ([2913e67](https://github.com/n8n-io/n8n/commit/2913e676e639757cdf1a513ad35a7df0e494fa6f))
* **JotForm Trigger Node:** Add support for hipaa-api.jotform.com ([#6171](https://github.com/n8n-io/n8n/issues/6171)) ([3074f42](https://github.com/n8n-io/n8n/commit/3074f42b3b98cf0dbdc13ad7b927d6b7fc726fab))
* **Kafka Trigger Node:** Add non-parallel execution ([#6175](https://github.com/n8n-io/n8n/issues/6175)) ([814ea51](https://github.com/n8n-io/n8n/commit/814ea5185ce82e0a7687b41161602b45f92bee93))



# [0.227.0](https://github.com/n8n-io/n8n/compare/[email protected]@0.227.0) (2023-05-03)


Expand Down
8 changes: 4 additions & 4 deletions cypress/e2e/14-mapping.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ describe('Data mapping', () => {
ndv.actions.mapToParameter('value');
ndv.getters
.inlineExpressionEditorInput()
.should('have.text', `{{ $node['${SCHEDULE_TRIGGER_NODE_NAME}'].json.input[0].count }}`);
.should('have.text', `{{ $('${SCHEDULE_TRIGGER_NODE_NAME}').item.json.input[0].count }}`);
ndv.getters.parameterExpressionPreview('value').should('not.exist');

ndv.actions.switchInputMode('Table');
Expand All @@ -203,7 +203,7 @@ describe('Data mapping', () => {
.inlineExpressionEditorInput()
.should(
'have.text',
`{{ $node['${SCHEDULE_TRIGGER_NODE_NAME}'].json.input[0].count }} {{ $node['${SCHEDULE_TRIGGER_NODE_NAME}'].json.input }}`,
`{{ $('${SCHEDULE_TRIGGER_NODE_NAME}').item.json.input[0].count }} {{ $('${SCHEDULE_TRIGGER_NODE_NAME}').item.json.input }}`,
);
ndv.actions.validateExpressionPreview('value', ' ');

Expand Down Expand Up @@ -311,12 +311,12 @@ describe('Data mapping', () => {
ndv.getters.parameterInput('keepOnlySet').find('input[type="text"]')
.should('exist')
.invoke('css', 'border')
.then((border) => expect(border).to.include('1.5px dashed rgb(90, 76, 194)'));
.then((border) => expect(border).to.include('dashed rgb(90, 76, 194)'));

ndv.getters.parameterInput('value').find('input[type="text"]')
.should('exist')
.invoke('css', 'border')
.then((border) => expect(border).to.include('1.5px dashed rgb(90, 76, 194)'));
.then((border) => expect(border).to.include('dashed rgb(90, 76, 194)'));
});

});
13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "n8n",
"version": "0.227.0",
"version": "0.228.0",
"private": true,
"homepage": "https://n8n.io",
"engines": {
Expand Down Expand Up @@ -41,6 +41,10 @@
"@ngneat/falso": "^6.1.0",
"@types/jest": "^29.5.0",
"@types/supertest": "^2.0.12",
"@vitejs/plugin-legacy": "^3.0.1",
"@vitejs/plugin-vue2": "^2.2.0",
"@vitest/coverage-c8": "^0.28.5",
"c8": "^7.12.0",
"cross-env": "^7.0.3",
"cypress": "^12.8.1",
"cypress-real-events": "^1.7.6",
Expand All @@ -60,7 +64,11 @@
"ts-jest": "^29.1.0",
"tsc-watch": "^6.0.0",
"turbo": "1.8.8",
"typescript": "*"
"typescript": "*",
"vite": "^4.0.4",
"vitest": "^0.28.5",
"vue-template-compiler": "^2.7.14",
"vue-tsc": "^1.0.24"
},
"pnpm": {
"onlyBuiltDependencies": [
Expand All @@ -80,7 +88,6 @@
"tslib": "^2.5.0",
"ts-node": "^10.9.1",
"typescript": "^5.0.3",
"xlsx": "https://cdn.sheetjs.com/xlsx-0.19.3/xlsx-0.19.3.tgz",
"xml2js": "^0.5.0",
"cpy@8>globby": "^11.1.0",
"qqjs>globby": "^11.1.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "n8n",
"version": "0.227.0",
"version": "0.228.0",
"description": "n8n Workflow Automation Tool",
"license": "SEE LICENSE IN LICENSE.md",
"homepage": "https://n8n.io",
Expand Down
4 changes: 3 additions & 1 deletion packages/cli/src/NodeTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ import { LoadNodesAndCredentials } from './LoadNodesAndCredentials';

@Service()
export class NodeTypes implements INodeTypes {
constructor(private nodesAndCredentials: LoadNodesAndCredentials) {
constructor(private nodesAndCredentials: LoadNodesAndCredentials) {}

init() {
// Some nodeTypes need to get special parameters applied like the
// polling nodes the polling times
this.applySpecialNodeParameters();
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/commands/BaseCommand.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Command } from '@oclif/command';
import { ExitError } from '@oclif/errors';
import { Container } from 'typedi';
import type { INodeTypes } from 'n8n-workflow';
import { LoggerProxy, ErrorReporterProxy as ErrorReporter, sleep } from 'n8n-workflow';
import type { IUserSettings } from 'n8n-core';
import { BinaryDataManager, UserSettings } from 'n8n-core';
Expand Down Expand Up @@ -31,7 +30,7 @@ export abstract class BaseCommand extends Command {

protected loadNodesAndCredentials: LoadNodesAndCredentials;

protected nodeTypes: INodeTypes;
protected nodeTypes: NodeTypes;

protected userSettings: IUserSettings;

Expand All @@ -51,6 +50,7 @@ export abstract class BaseCommand extends Command {
this.loadNodesAndCredentials = Container.get(LoadNodesAndCredentials);
await this.loadNodesAndCredentials.init();
this.nodeTypes = Container.get(NodeTypes);
this.nodeTypes.init();
const credentialTypes = Container.get(CredentialTypes);
CredentialsOverwrites(credentialTypes);

Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "n8n-core",
"version": "0.166.0",
"version": "0.167.0",
"description": "Core functionality of n8n",
"license": "SEE LICENSE IN LICENSE.md",
"homepage": "https://n8n.io",
Expand Down
9 changes: 5 additions & 4 deletions packages/core/src/WorkflowExecute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,11 @@ export class WorkflowExecute {
if (node && pinData && pinData[node.name]) {
incomingData.push(pinData[node.name]);
} else {
incomingData.push(
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
runData[connection.node][runIndex].data![connection.type][connection.index]!,
);
const nodeIncomingData =
runData[connection.node][runIndex]?.data?.[connection.type][connection.index];
if (nodeIncomingData) {
incomingData.push(nodeIncomingData);
}
}

incomingSourceData.main.push({
Expand Down
18 changes: 3 additions & 15 deletions packages/design-system/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "n8n-design-system",
"version": "0.63.0",
"version": "0.64.0",
"license": "SEE LICENSE IN LICENSE.md",
"homepage": "https://n8n.io",
"author": {
Expand Down Expand Up @@ -36,7 +36,7 @@
"markdown-it-task-lists": "^2.1.1",
"vue": "^2.7.14",
"vue-typed-mixins": "^0.2.0",
"xss": "^1.0.10"
"xss": "^1.0.14"
},
"devDependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.36",
Expand All @@ -55,25 +55,13 @@
"@types/markdown-it-emoji": "^2.0.2",
"@types/markdown-it-link-attributes": "^3.0.1",
"@types/sanitize-html": "^2.8.0",
"@vitest/coverage-c8": "^0.28.5",
"@vitejs/plugin-vue2": "^2.2.0",
"autoprefixer": "^10.4.13",
"c8": "7.12.0",
"core-js": "^3.27.2",
"jsdom": "21.1.0",
"node-notifier": "^10.0.1",
"sass": "^1.58.0",
"sass-loader": "^13.2.0",
"storybook": "^7.0.7",
"storybook-addon-themes": "^6.1.0",
"trim": "^1.0.1",
"vite": "^4.0.4",
"vitest": "^0.28.5",
"vue-class-component": "^7.2.6",
"vue-loader": "^15.10.1",
"vue-property-decorator": "^9.1.2",
"vue-template-compiler": "^2.7.14",
"vue-tsc": "^1.0.24"
"storybook-addon-themes": "^6.1.0"
},
"dependencies": {
"element-ui": "~2.15.12",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue';
import N8nColorPicker from './ColorPicker.vue';

export default {
title: 'Atoms/ColorPicker',
component: N8nColorPicker,
argTypes: {
disabled: {
control: 'boolean',
},
size: {
control: 'select',
options: ['mini', 'small', 'medium', 'large'],
},
showAlpha: {
control: 'boolean',
},
colorFormat: {
control: 'select',
options: ['hsl', 'hsv', 'hex', 'rgb'],
},
popperClass: {
control: 'text',
},
predefine: {
control: 'array',
},
},
};

const methods = {
onChange: action('change'),
onActiveChange: action('active-change'),
onInput: action('input'),
};

const DefaultTemplate: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nColorPicker,
},
data: () => ({
color: null,
}),
template:
'<n8n-color-picker v-model="color" v-bind="$props" @input="onInput" @change="onChange" @active-change="onActiveChange" />',
methods,
});

export const Default = DefaultTemplate.bind({});
Default.args = {
disabled: false,
size: 'medium',
showAlpha: false,
colorFormat: '',
popperClass: '',
showInput: true,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<script lang="ts" setup>
import { computed, ref } from 'vue';
import { ColorPicker } from 'element-ui';
import N8nInput from '../N8nInput';
export type Props = {
disabled?: boolean;
size?: 'small' | 'medium' | 'mini';
showAlpha?: boolean;
colorFormat?: 'hex' | 'rgb' | 'hsl' | 'hsv';
popperClass?: string;
predefine?: string[];
value?: string;
showInput?: boolean;
};
const props = withDefaults(defineProps<Props>(), {
disabled: false,
size: 'medium',
showAlpha: false,
colorFormat: 'hex',
popperClass: '',
showInput: true,
value: null,
});
const color = ref(props.value);
const colorPickerProps = computed(() => {
const { value, showInput, ...rest } = props;
return rest;
});
const emit = defineEmits<{
(event: 'input', value: string): void;
(event: 'change', value: string): void;
(event: 'active-change', value: string): void;
}>();
const model = computed({
get() {
return color.value;
},
set(value: string) {
color.value = value;
emit('input', value);
},
});
const onChange = (value: string) => {
emit('change', value);
};
const onInput = (value: string) => {
color.value = value;
};
const onActiveChange = (value: string) => {
emit('active-change', value);
};
</script>
<template>
<span :class="['n8n-color-picker', $style.component]">
<color-picker
v-model="model"
v-bind="colorPickerProps"
@change="onChange"
@active-change="onActiveChange"
/>
<n8n-input
v-if="showInput"
:class="$style.input"
:disabled="props.disabled"
:size="props.size"
:value="color"
@input="onInput"
type="text"
/>
</span>
</template>
<style lang="scss" module>
.component {
display: inline-flex;
align-items: center;
}
.input {
margin-left: var(--spacing-3xs);
}
</style>

<style lang="scss" scoped>
:deep(.el-color-picker) {
.el-color-picker__empty,
.el-color-picker__icon {
display: none;
}
}
</style>
Loading

0 comments on commit 89e67f7

Please sign in to comment.