Skip to content

Commit

Permalink
Merge branch 'feature/resource-mapping-component' into NODE-399-resou…
Browse files Browse the repository at this point in the history
…rce-mapper-ui

* feature/resource-mapping-component: (62 commits)
  fix(editor): Redirect to home page after saving data on SAML onboarding page (no-changelog) (#5961)
  feat: Replace Vue.extend with defineComponent in design system (no-changelog) (#5918)
  feat(MySQL Node): Overhaul
  fix(OpenAI Node): Update models to only show those supported (#5805)
  ci: Add test for wait node (no-changelog) (#5414)
  fix(Github Trigger Node): Remove content_reference event (#5830)
  ci: Validate load options methods in nodes-base (no-changelog) (#5862)
  ci: Use `--chown=node:node` in COPY commands in the custom docker image (no-changelog) (#5913)
  🚀 Release 0.224.0 (#5957)
  fix(NocoDB Node): Fix for updating or deleting rows with not default primary keys
  fix(HTTP Request Node): Show detailed error message in the UI again (#5959)
  ci: Prevent skipping of E2E fail job (no-changelog) (#5958)
  ci: Fix E2E tests on master (no-changelog) (#5960)
  refactor(core): Use injectable classes for db repositories (part-1) (no-changelog) (#5953)
  fix(core): Validate customData keys and values (#5920) (no-changelog)
  feat(editor): Add user activation survey (#5677)
  fix(editor): Update vite legacy-plugin browser target (no-changelog) (#5952)
  docs: Fix typo in AWS S3 and S3 nodes for parent folder key (#5933)
  fix(core): Update xml2js to address CVE-2023-0842 (#5948)
  fix(Code Node): Update vm2 to address CVE-2023-29017 (#5947)
  ...

# Conflicts:
#	packages/workflow/src/Interfaces.ts
  • Loading branch information
MiloradFilipovic committed Apr 13, 2023
2 parents 97cc196 + 8576dcc commit 1d808a9
Show file tree
Hide file tree
Showing 325 changed files with 9,853 additions and 2,609 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,4 @@ jobs:
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/n8n:${{ steps.vars.outputs.tag }}${{ matrix.docker-context }}
${{ secrets.DOCKER_USERNAME }}/n8n:latest${{ matrix.docker-context }}
ghcr.io/${{ github.repository_owner }}/n8n:${{ steps.vars.outputs.tag }}${{ matrix.docker-context }}
ghcr.io/${{ github.repository_owner }}/n8n:latest${{ matrix.docker-context }}
28 changes: 28 additions & 0 deletions .github/workflows/e2e-tests-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,31 @@ jobs:
run-env: base:16.18.1
secrets:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}

post-e2e-tests:
runs-on: ubuntu-latest
name: E2E [Electron/Node 16] - Checks
needs: [run-e2e-tests]
if: always()
steps:
- name: E2E success comment
if: needs.run-e2e-tests.result == 'success'
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
:white_check_mark: All Cypress E2E specs passed
token: ${{ secrets.GITHUB_TOKEN }}

- name: E2E fail comment
if: needs.run-e2e-tests.result == 'failure'
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
:warning: Some Cypress E2E specs are failing, please fix them before merging
token: ${{ secrets.GITHUB_TOKEN }}

- name: Fail job if run-e2e-tests failed
if: needs.run-e2e-tests.result == 'failure'
run: exit 1
6 changes: 4 additions & 2 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@ jobs:
cache: 'pnpm'
- run: pnpm install --frozen-lockfile

- name: Set release version in env
run: echo "RELEASE=$(node -e 'console.log(require("./package.json").version)')" >> $GITHUB_ENV

- name: Build
run: pnpm build

- name: Publish to NPM
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
pnpm publish -r --publish-branch ${{github.event.pull_request.base.ref}} --access public
echo "RELEASE=$(node -e 'console.log(require("./package.json").version)')" >> $GITHUB_ENV
pnpm publish -r --publish-branch ${{github.event.pull_request.base.ref}} --access public --tag rc
- name: Create Release
uses: ncipollo/release-action@v1
Expand Down
136 changes: 136 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

58 changes: 58 additions & 0 deletions cypress/e2e/22-user-activation-modal.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import { WorkflowPage, NDV, UserActivationSurveyModal } from '../pages';
import SettingsWithActivationModalEnabled from '../fixtures/Settings_user_activation_modal_enabled.json';
import { v4 as uuid } from 'uuid';

const workflowPage = new WorkflowPage();
const ndv = new NDV();
const userActivationSurveyModal = new UserActivationSurveyModal();

const BASE_WEBHOOK_URL = 'http://localhost:5678/webhook';

describe('User activation survey', () => {
it('Should show activation survey', () => {
cy.resetAll();

cy.skipSetup();

cy.intercept('GET', '/rest/settings', (req) => {
req.reply(SettingsWithActivationModalEnabled);
});

const path = uuid();
const method = 'GET';

workflowPage.actions.addInitialNodeToCanvas('Webhook');
workflowPage.actions.openNode('Webhook');

//input http method
cy.getByTestId('parameter-input-httpMethod').click();
cy.getByTestId('parameter-input-httpMethod')
.find('.el-select-dropdown')
.find('.option-headline')
.contains(method)
.click();

//input path method
cy.getByTestId('parameter-input-path')
.find('.parameter-input')
.find('input')
.clear()
.type(path);

ndv.actions.close();

workflowPage.actions.saveWorkflowOnButtonClick();

workflowPage.actions.activateWorkflow();

cy.request(method, `${BASE_WEBHOOK_URL}/${path}`).then((response) => {
expect(response.status).to.eq(200);
cy.visit('/');
cy.reload();

userActivationSurveyModal.getters.modalContainer().should('be.visible');
userActivationSurveyModal.getters.feedbackInput().type('testing');
userActivationSurveyModal.getters.sendFeedbackButton().click();
});
});
});
90 changes: 90 additions & 0 deletions cypress/fixtures/Settings_user_activation_modal_enabled.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"data": {
"endpointWebhook": "webhook",
"endpointWebhookTest": "webhook-test",
"saveDataErrorExecution": "all",
"saveDataSuccessExecution": "all",
"saveManualExecutions": false,
"executionTimeout": -1,
"maxExecutionTimeout": 3600,
"workflowCallerPolicyDefaultOption": "workflowsFromSameOwner",
"timezone": "America/New_York",
"urlBaseWebhook": "http://localhost:5678/",
"urlBaseEditor": "http://localhost:5678",
"versionCli": "0.221.2",
"oauthCallbackUrls": {
"oauth1": "http://localhost:5678/rest/oauth1-credential/callback",
"oauth2": "http://localhost:5678/rest/oauth2-credential/callback"
},
"versionNotifications": {
"enabled": true,
"endpoint": "https://api.n8n.io/api/versions/",
"infoUrl": "https://docs.n8n.io/getting-started/installation/updating.html"
},
"instanceId": "c229842c6d1e217486d04caf7223758e08385156ca87a58286c850760c7161f4",
"telemetry": {
"enabled": true
},
"posthog": {
"enabled": false,
"apiHost": "https://ph.n8n.io",
"apiKey": "phc_4URIAm1uYfJO7j8kWSe0J8lc8IqnstRLS7Jx8NcakHo",
"autocapture": false,
"disableSessionRecording": true,
"debug": false
},
"personalizationSurveyEnabled": false,
"userActivationSurveyEnabled": true,
"defaultLocale": "en",
"userManagement": {
"enabled": true,
"showSetupOnFirstLoad": false,
"smtpSetup": false
},
"sso": {
"saml": {
"loginEnabled": false,
"loginLabel": ""
},
"ldap": {
"loginEnabled": false,
"loginLabel": ""
}
},
"publicApi": {
"enabled": false,
"latestVersion": 1,
"path": "api",
"swaggerUi": {
"enabled": true
}
},
"workflowTagsDisabled": false,
"logLevel": "info",
"hiringBannerEnabled": true,
"templates": {
"enabled": true,
"host": "https://api.n8n.io/api/"
},
"onboardingCallPromptEnabled": true,
"executionMode": "regular",
"pushBackend": "sse",
"communityNodesEnabled": true,
"deployment": {
"type": "default"
},
"isNpmAvailable": false,
"allowedModules": {},
"enterprise": {
"sharing": true,
"ldap": true,
"saml": false,
"logStreaming": false,
"advancedExecutionFilters": false
},
"hideUsagePage": false,
"license": {
"environment": "production"
}
}
}
2 changes: 2 additions & 0 deletions cypress/pages/modals/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export * from './credentials-modal';
export * from './message-box';
export * from './workflow-sharing-modal';
export * from './user-activation-survey-modal';

9 changes: 9 additions & 0 deletions cypress/pages/modals/user-activation-survey-modal.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { BasePage } from './../base';

export class UserActivationSurveyModal extends BasePage {
getters = {
modalContainer: () => cy.getByTestId('userActivationSurvey-modal').last(),
feedbackInput: () => cy.getByTestId('activation-feedback-input').find('textarea'),
sendFeedbackButton: () => cy.getByTestId('send-activation-feedback-button'),
};
}
9 changes: 4 additions & 5 deletions docker/images/n8n-custom/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ ARG NODE_VERSION=16
# 1. Create an image to build n8n
FROM n8nio/base:${NODE_VERSION} as builder

COPY turbo.json package.json .npmrc pnpm-lock.yaml pnpm-workspace.yaml jest.config.js tsconfig.json ./
COPY scripts ./scripts
COPY packages ./packages
COPY patches ./patches
COPY --chown=node:node turbo.json package.json .npmrc pnpm-lock.yaml pnpm-workspace.yaml jest.config.js tsconfig.json ./
COPY --chown=node:node scripts ./scripts
COPY --chown=node:node packages ./packages
COPY --chown=node:node patches ./patches

RUN apk add --update libc6-compat jq
RUN corepack enable && corepack prepare --activate
RUN chown -R node:node .
USER node

RUN pnpm install --frozen-lockfile
Expand Down
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "n8n",
"version": "0.222.0",
"version": "0.224.0",
"private": true,
"homepage": "https://n8n.io",
"engines": {
Expand Down Expand Up @@ -47,7 +47,7 @@
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"jest-mock": "^29.5.0",
"jest-mock-extended": "^3.0.3",
"jest-mock-extended": "^3.0.4",
"nock": "^13.2.9",
"node-fetch": "^2.6.7",
"p-limit": "^3.1.0",
Expand All @@ -56,10 +56,10 @@
"run-script-os": "^1.0.7",
"start-server-and-test": "^1.14.0",
"supertest": "^6.3.3",
"ts-jest": "^29.0.5",
"ts-jest": "^29.1.0",
"tsc-watch": "^6.0.0",
"typescript": "*",
"turbo": "1.8.8"
"turbo": "1.8.8",
"typescript": "*"
},
"pnpm": {
"onlyBuiltDependencies": [
Expand All @@ -78,13 +78,15 @@
"prettier": "^2.8.3",
"tslib": "^2.5.0",
"ts-node": "^10.9.1",
"typescript": "^5.0.2",
"typescript": "^5.0.3",
"xml2js": "^0.5.0",
"cpy@8>globby": "^11.1.0",
"qqjs>globby": "^11.1.0"
},
"patchedDependencies": {
"[email protected]": "patches/[email protected]",
"[email protected]": "patches/[email protected]"
"[email protected]": "patches/[email protected]",
"@sentry/[email protected]": "patches/@[email protected]"
}
}
}
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.222.0",
"version": "0.224.0",
"description": "n8n Workflow Automation Tool",
"license": "SEE LICENSE IN LICENSE.md",
"homepage": "https://n8n.io",
Expand Down
Loading

0 comments on commit 1d808a9

Please sign in to comment.