feat(editor): Update design-system and editor dependencies (no-changelog) (#5188)
This commit is contained in:
@@ -65,10 +65,11 @@
|
||||
"pinia": "^2.0.22",
|
||||
"prettier": "^2.8.2",
|
||||
"prismjs": "^1.17.1",
|
||||
"stream-browserify": "^3.0.0",
|
||||
"timeago.js": "^4.0.2",
|
||||
"uuid": "^8.3.2",
|
||||
"v-click-outside": "^3.1.2",
|
||||
"vue": "^2.7",
|
||||
"vue": "^2.7.14",
|
||||
"vue-agile": "^2.0.0",
|
||||
"vue-fragment": "1.5.1",
|
||||
"vue-i18n": "^8.26.7",
|
||||
@@ -76,7 +77,7 @@
|
||||
"vue-json-pretty": "1.9.3",
|
||||
"vue-prism-editor": "^0.3.0",
|
||||
"vue-router": "^3.6.5",
|
||||
"vue-template-compiler": "^2.7",
|
||||
"vue-template-compiler": "^2.7.14",
|
||||
"vue-typed-mixins": "^0.2.0",
|
||||
"vue2-boring-avatars": "0.3.4",
|
||||
"vue2-teleport": "^1.0.1",
|
||||
@@ -98,17 +99,16 @@
|
||||
"@types/lodash.set": "^4.3.6",
|
||||
"@types/luxon": "^2.0.9",
|
||||
"@types/uuid": "^8.3.2",
|
||||
"@vitejs/plugin-legacy": "^1.8.2",
|
||||
"@vitejs/plugin-vue2": "^1.1.2",
|
||||
"@vitejs/plugin-legacy": "^3.0.1",
|
||||
"@vitejs/plugin-vue2": "^2.2.0",
|
||||
"c8": "^7.12.0",
|
||||
"jshint": "^2.9.7",
|
||||
"sass": "^1.55.0",
|
||||
"sass-loader": "^10.1.1",
|
||||
"string-template-parser": "^1.2.6",
|
||||
"vite": "2.9.5",
|
||||
"vite-plugin-html": "^3.2.0",
|
||||
"vite": "4.0.4",
|
||||
"vite-plugin-monaco-editor": "^1.0.10",
|
||||
"vitest": "0.9.3",
|
||||
"vue-tsc": "^0.35.0"
|
||||
"vitest": "0.27.2",
|
||||
"vue-tsc": "^1.0.24"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,34 +3,34 @@
|
||||
exports[`RunDataJsonSchema.vue > renders schema for data 1`] = `
|
||||
<div>
|
||||
<div
|
||||
class="_schemaWrapper_1mtap_1"
|
||||
class="schemaWrapper"
|
||||
>
|
||||
<div
|
||||
class=""
|
||||
>
|
||||
<div
|
||||
class="_schema_1mtap_1"
|
||||
class="schema"
|
||||
>
|
||||
<div
|
||||
class="_item_14xdy_1"
|
||||
class="item"
|
||||
>
|
||||
<!---->
|
||||
<!---->
|
||||
<!---->
|
||||
<!---->
|
||||
<div
|
||||
class="_sub_14xdy_14"
|
||||
class="sub"
|
||||
>
|
||||
<div
|
||||
class="_item_14xdy_1"
|
||||
class="item"
|
||||
style="transition-delay: 0s;"
|
||||
>
|
||||
<div
|
||||
class="_pill_14xdy_51 _mappable_14xdy_70"
|
||||
class="pill mappable"
|
||||
title="string"
|
||||
>
|
||||
<span
|
||||
class="_label_14xdy_89"
|
||||
class="label"
|
||||
data-depth="1"
|
||||
data-name="name"
|
||||
data-path="[\\"name\\"]"
|
||||
@@ -50,7 +50,7 @@ exports[`RunDataJsonSchema.vue > renders schema for data 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
<span
|
||||
class="_text_14xdy_100"
|
||||
class="text"
|
||||
>
|
||||
John
|
||||
</span>
|
||||
@@ -59,15 +59,15 @@ exports[`RunDataJsonSchema.vue > renders schema for data 1`] = `
|
||||
<!---->
|
||||
</div>
|
||||
<div
|
||||
class="_item_14xdy_1"
|
||||
class="item"
|
||||
style="transition-delay: 0.033s;"
|
||||
>
|
||||
<div
|
||||
class="_pill_14xdy_51 _mappable_14xdy_70"
|
||||
class="pill mappable"
|
||||
title="number"
|
||||
>
|
||||
<span
|
||||
class="_label_14xdy_89"
|
||||
class="label"
|
||||
data-depth="1"
|
||||
data-name="age"
|
||||
data-path="[\\"age\\"]"
|
||||
@@ -87,7 +87,7 @@ exports[`RunDataJsonSchema.vue > renders schema for data 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
<span
|
||||
class="_text_14xdy_100"
|
||||
class="text"
|
||||
>
|
||||
22
|
||||
</span>
|
||||
@@ -96,15 +96,15 @@ exports[`RunDataJsonSchema.vue > renders schema for data 1`] = `
|
||||
<!---->
|
||||
</div>
|
||||
<div
|
||||
class="_item_14xdy_1"
|
||||
class="item"
|
||||
style="transition-delay: 0.066s;"
|
||||
>
|
||||
<div
|
||||
class="_pill_14xdy_51 _mappable_14xdy_70"
|
||||
class="pill mappable"
|
||||
title="array"
|
||||
>
|
||||
<span
|
||||
class="_label_14xdy_89"
|
||||
class="label"
|
||||
data-depth="1"
|
||||
data-name="hobbies"
|
||||
data-path="[\\"hobbies\\"]"
|
||||
@@ -130,7 +130,7 @@ exports[`RunDataJsonSchema.vue > renders schema for data 1`] = `
|
||||
type="checkbox"
|
||||
/>
|
||||
<label
|
||||
class="_toggle_14xdy_20"
|
||||
class="toggle"
|
||||
for="array-0-2"
|
||||
>
|
||||
<font-awesome-icon-stub
|
||||
@@ -138,18 +138,18 @@ exports[`RunDataJsonSchema.vue > renders schema for data 1`] = `
|
||||
/>
|
||||
</label>
|
||||
<div
|
||||
class="_sub_14xdy_14"
|
||||
class="sub"
|
||||
>
|
||||
<div
|
||||
class="_item_14xdy_1"
|
||||
class="item"
|
||||
style="transition-delay: 0s;"
|
||||
>
|
||||
<div
|
||||
class="_pill_14xdy_51 _mappable_14xdy_70"
|
||||
class="pill mappable"
|
||||
title="string"
|
||||
>
|
||||
<span
|
||||
class="_label_14xdy_89"
|
||||
class="label"
|
||||
data-depth="2"
|
||||
data-name="string[0]"
|
||||
data-path="[\\"hobbies\\"][0]"
|
||||
@@ -164,14 +164,14 @@ exports[`RunDataJsonSchema.vue > renders schema for data 1`] = `
|
||||
hobbies
|
||||
</span>
|
||||
<span
|
||||
class="_arrayIndex_14xdy_94"
|
||||
class="arrayIndex"
|
||||
>
|
||||
[0]
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<span
|
||||
class="_text_14xdy_100"
|
||||
class="text"
|
||||
>
|
||||
surfing
|
||||
</span>
|
||||
@@ -180,15 +180,15 @@ exports[`RunDataJsonSchema.vue > renders schema for data 1`] = `
|
||||
<!---->
|
||||
</div>
|
||||
<div
|
||||
class="_item_14xdy_1"
|
||||
class="item"
|
||||
style="transition-delay: 0.033s;"
|
||||
>
|
||||
<div
|
||||
class="_pill_14xdy_51 _mappable_14xdy_70"
|
||||
class="pill mappable"
|
||||
title="string"
|
||||
>
|
||||
<span
|
||||
class="_label_14xdy_89"
|
||||
class="label"
|
||||
data-depth="2"
|
||||
data-name="string[1]"
|
||||
data-path="[\\"hobbies\\"][1]"
|
||||
@@ -203,14 +203,14 @@ exports[`RunDataJsonSchema.vue > renders schema for data 1`] = `
|
||||
hobbies
|
||||
</span>
|
||||
<span
|
||||
class="_arrayIndex_14xdy_94"
|
||||
class="arrayIndex"
|
||||
>
|
||||
[1]
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<span
|
||||
class="_text_14xdy_100"
|
||||
class="text"
|
||||
>
|
||||
traveling
|
||||
</span>
|
||||
@@ -235,19 +235,19 @@ exports[`RunDataJsonSchema.vue > renders schema for data 1`] = `
|
||||
exports[`RunDataJsonSchema.vue > renders schema for empty data 1`] = `
|
||||
<div>
|
||||
<div
|
||||
class="_schemaWrapper_1mtap_1"
|
||||
class="schemaWrapper"
|
||||
>
|
||||
<div
|
||||
class="n8n-info-tip _info_3egb8_33 _note_3egb8_16 _base_3egb8_1 _bold_3egb8_12"
|
||||
class="n8n-info-tip info note bold"
|
||||
>
|
||||
<span
|
||||
class="_iconText_3egb8_28"
|
||||
class="iconText"
|
||||
>
|
||||
<span
|
||||
class="n8n-icon n8n-text _compact_e4k11_34 _size-medium_e4k11_19 _regular_e4k11_5"
|
||||
class="n8n-icon n8n-text compact size-medium regular"
|
||||
>
|
||||
<font-awesome-icon-stub
|
||||
class="_medium_1pnjy_9"
|
||||
class="medium"
|
||||
icon="info-circle"
|
||||
/>
|
||||
</span>
|
||||
|
||||
10
packages/editor-ui/src/shims.d.ts
vendored
10
packages/editor-ui/src/shims.d.ts
vendored
@@ -5,6 +5,16 @@ declare module 'markdown-it-emoji';
|
||||
declare module 'markdown-it-task-lists';
|
||||
|
||||
declare global {
|
||||
interface ImportMeta {
|
||||
env: {
|
||||
DEV: boolean;
|
||||
PROD: boolean;
|
||||
NODE_ENV: 'development' | 'production';
|
||||
VUE_APP_URL_BASE_API: string;
|
||||
VUE_APP_ENDPOINT_REST?: string;
|
||||
};
|
||||
}
|
||||
|
||||
interface Window {
|
||||
BASE_PATH: string;
|
||||
}
|
||||
|
||||
@@ -5,14 +5,12 @@ import { defineStore } from 'pinia';
|
||||
import Vue from 'vue';
|
||||
import { useNodeTypesStore } from './nodeTypes';
|
||||
|
||||
const { VUE_APP_URL_BASE_API, VUE_APP_ENDPOINT_REST } = import.meta.env;
|
||||
|
||||
export const useRootStore = defineStore(STORES.ROOT, {
|
||||
state: (): RootState => ({
|
||||
// @ts-ignore
|
||||
baseUrl: import.meta.env.VUE_APP_URL_BASE_API
|
||||
? import.meta.env.VUE_APP_URL_BASE_API
|
||||
: window.BASE_PATH === '/%BASE_PATH%/'
|
||||
? '/'
|
||||
: window.BASE_PATH,
|
||||
baseUrl:
|
||||
VUE_APP_URL_BASE_API ?? window.BASE_PATH === '/{{BASE_PATH}}/' ? '/' : window.BASE_PATH,
|
||||
defaultLocale: 'en',
|
||||
endpointWebhook: 'webhook',
|
||||
endpointWebhookTest: 'webhook-test',
|
||||
@@ -44,16 +42,16 @@ export const useRootStore = defineStore(STORES.ROOT, {
|
||||
|
||||
getRestUrl(): string {
|
||||
let endpoint = 'rest';
|
||||
if (import.meta.env.VUE_APP_ENDPOINT_REST) {
|
||||
endpoint = import.meta.env.VUE_APP_ENDPOINT_REST;
|
||||
if (VUE_APP_ENDPOINT_REST) {
|
||||
endpoint = VUE_APP_ENDPOINT_REST;
|
||||
}
|
||||
return `${this.baseUrl}${endpoint}`;
|
||||
},
|
||||
|
||||
getRestApiContext(): IRestApiContext {
|
||||
let endpoint = 'rest';
|
||||
if (import.meta.env.VUE_APP_ENDPOINT_REST) {
|
||||
endpoint = import.meta.env.VUE_APP_ENDPOINT_REST;
|
||||
if (VUE_APP_ENDPOINT_REST) {
|
||||
endpoint = VUE_APP_ENDPOINT_REST;
|
||||
}
|
||||
return {
|
||||
baseUrl: `${this.baseUrl}${endpoint}`,
|
||||
|
||||
@@ -1,18 +1,26 @@
|
||||
import vue from '@vitejs/plugin-vue2';
|
||||
import { createHtmlPlugin } from 'vite-plugin-html';
|
||||
import legacy from '@vitejs/plugin-legacy';
|
||||
import monacoEditorPlugin from 'vite-plugin-monaco-editor';
|
||||
import path, { resolve } from 'path';
|
||||
import { defineConfig, mergeConfig, PluginOption } from 'vite';
|
||||
import { defineConfig as defineVitestConfig } from 'vitest/config';
|
||||
|
||||
import packageJSON from './package.json';
|
||||
|
||||
const vendorChunks = ['vue', 'vue-router'];
|
||||
const n8nChunks = ['n8n-workflow', 'n8n-design-system'];
|
||||
const ignoreChunks = [
|
||||
'vue2-boring-avatars',
|
||||
'vue-template-compiler',
|
||||
'jquery',
|
||||
'@fontsource/open-sans',
|
||||
'normalize-wheel',
|
||||
'stream-browserify',
|
||||
'lodash.camelcase',
|
||||
'lodash.debounce',
|
||||
'lodash.get',
|
||||
'lodash.orderby',
|
||||
'lodash.set',
|
||||
];
|
||||
|
||||
const isScopedPackageToIgnore = (str: string) => /@codemirror\//.test(str);
|
||||
@@ -22,7 +30,7 @@ function renderChunks() {
|
||||
const chunks: Record<string, string[]> = {};
|
||||
|
||||
Object.keys(dependencies).forEach((key) => {
|
||||
if ([...vendorChunks, ...ignoreChunks].includes(key)) {
|
||||
if ([...vendorChunks, ...n8nChunks, ...ignoreChunks].includes(key)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -46,19 +54,13 @@ export default mergeConfig(
|
||||
define: {
|
||||
// This causes test to fail but is required for actually running it
|
||||
...(process.env.NODE_ENV !== 'test' ? { global: 'globalThis' } : {}),
|
||||
BASE_PATH: `'${publicPath}'`,
|
||||
},
|
||||
plugins: [
|
||||
legacy({
|
||||
targets: ['defaults', 'not IE 11'],
|
||||
}),
|
||||
vue(),
|
||||
...(createHtmlPlugin({
|
||||
inject: {
|
||||
data: {
|
||||
BASE_PATH: publicPath,
|
||||
},
|
||||
},
|
||||
}) as PluginOption[]),
|
||||
monacoEditorPlugin({
|
||||
publicPath: 'assets/monaco-editor',
|
||||
customDistPath: (root: string, buildOutDir: string, base: string) =>
|
||||
@@ -68,7 +70,7 @@ export default mergeConfig(
|
||||
resolve: {
|
||||
alias: [
|
||||
{ find: '@', replacement: resolve(__dirname, 'src') },
|
||||
{ find: 'stream', replacement: '' },
|
||||
{ find: 'stream', replacement: 'stream-browserify' },
|
||||
{
|
||||
find: /^n8n-design-system\//,
|
||||
replacement: resolve(__dirname, '..', 'design-system', 'src') + '/',
|
||||
@@ -108,6 +110,7 @@ export default mergeConfig(
|
||||
output: {
|
||||
manualChunks: {
|
||||
vendor: vendorChunks,
|
||||
n8n: n8nChunks,
|
||||
...renderChunks(),
|
||||
},
|
||||
},
|
||||
@@ -119,6 +122,11 @@ export default mergeConfig(
|
||||
globals: true,
|
||||
environment: 'jsdom',
|
||||
setupFiles: ['./src/__tests__/setup.ts'],
|
||||
css: {
|
||||
modules: {
|
||||
classNameStrategy: 'non-scoped',
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -6,10 +6,6 @@ module.exports = {
|
||||
config.resolve.symlinks(false);
|
||||
// config.plugins.delete("prefetch"); // enable when language package grows
|
||||
},
|
||||
// transpileDependencies: [
|
||||
// // 'node_modules/quill'
|
||||
// /\/node_modules\/quill\//
|
||||
// ]
|
||||
pluginOptions: {
|
||||
webpackBundleAnalyzer: {
|
||||
openAnalyzer: false,
|
||||
@@ -50,5 +46,4 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
},
|
||||
publicPath: process.env.VUE_APP_PUBLIC_PATH ?? '/',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user