@n8n/chat 0.2.0 → 0.3.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.
- package/.eslintrc.cjs +2 -3
- package/package.json +2 -62
- package/src/__tests__/index.spec.ts +2 -2
package/.eslintrc.cjs
CHANGED
|
@@ -9,6 +9,8 @@ module.exports = {
|
|
|
9
9
|
...sharedOptions(__dirname, 'frontend'),
|
|
10
10
|
|
|
11
11
|
rules: {
|
|
12
|
+
'n8n-local-rules/dangerously-use-html-string-missing': 'off',
|
|
13
|
+
|
|
12
14
|
// TODO: Remove these
|
|
13
15
|
'id-denylist': 'warn',
|
|
14
16
|
'import/extensions': 'warn',
|
|
@@ -31,9 +33,7 @@ module.exports = {
|
|
|
31
33
|
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'warn',
|
|
32
34
|
'@typescript-eslint/no-unnecessary-type-assertion': 'warn',
|
|
33
35
|
'@typescript-eslint/no-unsafe-argument': 'warn',
|
|
34
|
-
'@typescript-eslint/no-unsafe-assignment': 'warn',
|
|
35
36
|
'@typescript-eslint/no-unsafe-call': 'warn',
|
|
36
|
-
'@typescript-eslint/no-unsafe-member-access': 'warn',
|
|
37
37
|
'@typescript-eslint/no-unsafe-return': 'warn',
|
|
38
38
|
'@typescript-eslint/no-unused-expressions': 'warn',
|
|
39
39
|
'@typescript-eslint/no-unused-vars': 'warn',
|
|
@@ -42,7 +42,6 @@ module.exports = {
|
|
|
42
42
|
'@typescript-eslint/prefer-nullish-coalescing': 'warn',
|
|
43
43
|
'@typescript-eslint/prefer-optional-chain': 'warn',
|
|
44
44
|
'@typescript-eslint/restrict-plus-operands': 'warn',
|
|
45
|
-
'@typescript-eslint/restrict-template-expressions': 'warn',
|
|
46
45
|
'@typescript-eslint/unbound-method': 'warn',
|
|
47
46
|
'@typescript-eslint/ban-ts-comment': ['warn', { 'ts-ignore': true }],
|
|
48
47
|
'@typescript-eslint/no-redundant-type-constituents': 'warn',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@n8n/chat",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"main": "./chat.umd.cjs",
|
|
5
5
|
"module": "./chat.es.js",
|
|
6
6
|
"types": "./types/index.d.ts",
|
|
@@ -14,70 +14,10 @@
|
|
|
14
14
|
"require": "./style.css"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
|
-
"dependencies": {
|
|
18
|
-
"highlight.js": "^11.8.0",
|
|
19
|
-
"uuid": "^8.3.2",
|
|
20
|
-
"vue": "^3.3.4",
|
|
21
|
-
"vue-markdown-render": "^2.0.1"
|
|
22
|
-
},
|
|
23
|
-
"devDependencies": {
|
|
24
|
-
"@iconify-json/mdi": "^1.1.54",
|
|
25
|
-
"@rushstack/eslint-patch": "^1.3.2",
|
|
26
|
-
"@storybook/addon-essentials": "^7.4.0",
|
|
27
|
-
"@storybook/addon-interactions": "^7.4.0",
|
|
28
|
-
"@storybook/addon-links": "^7.4.0",
|
|
29
|
-
"@storybook/blocks": "^7.4.0",
|
|
30
|
-
"@storybook/testing-library": "^0.2.0",
|
|
31
|
-
"@storybook/vue3": "^7.4.0",
|
|
32
|
-
"@storybook/vue3-vite": "^7.4.0",
|
|
33
|
-
"@testing-library/jest-dom": "^5.17.0",
|
|
34
|
-
"@testing-library/vue": "^7.0.0",
|
|
35
|
-
"@tsconfig/node18": "^18.2.0",
|
|
36
|
-
"@types/jsdom": "^21.1.1",
|
|
37
|
-
"@types/markdown-it": "^12.2.3",
|
|
38
|
-
"@types/node": "^18.17.0",
|
|
39
|
-
"@vitejs/plugin-vue": "^4.2.3",
|
|
40
|
-
"@vue/eslint-config-prettier": "^8.0.0",
|
|
41
|
-
"@vue/eslint-config-typescript": "^11.0.3",
|
|
42
|
-
"@vue/test-utils": "^2.4.1",
|
|
43
|
-
"@vue/tsconfig": "^0.4.0",
|
|
44
|
-
"eslint": "^8.45.0",
|
|
45
|
-
"eslint-plugin-vue": "^9.15.1",
|
|
46
|
-
"jsdom": "^22.1.0",
|
|
47
|
-
"npm-run-all": "^4.1.5",
|
|
48
|
-
"prettier": "^3.0.0",
|
|
49
|
-
"react": "^18.2.0",
|
|
50
|
-
"react-dom": "^18.2.0",
|
|
51
|
-
"shelljs": "^0.8.5",
|
|
52
|
-
"storybook": "^7.4.0",
|
|
53
|
-
"typescript": "~5.1.6",
|
|
54
|
-
"unplugin-icons": "^0.17.0",
|
|
55
|
-
"vite": "^4.4.6",
|
|
56
|
-
"vite-plugin-dts": "^3.6.0",
|
|
57
|
-
"vitest": "^0.33.0",
|
|
58
|
-
"vue-tsc": "^1.8.6"
|
|
59
|
-
},
|
|
60
17
|
"repository": {
|
|
61
18
|
"type": "git",
|
|
62
19
|
"url": "git+https://github.com/n8n-io/n8n.git"
|
|
63
20
|
},
|
|
64
21
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
65
|
-
"homepage": "https://n8n.io"
|
|
66
|
-
"scripts": {
|
|
67
|
-
"dev": "npm run storybook",
|
|
68
|
-
"build": "run-p type-check build:vite && npm run build:prepare",
|
|
69
|
-
"build:vite": "vite build && npm run build:vite:full",
|
|
70
|
-
"build:vite:full": "INCLUDE_VUE=true vite build",
|
|
71
|
-
"build:prepare": "node scripts/postbuild.js",
|
|
72
|
-
"build:pack": "node scripts/pack.js",
|
|
73
|
-
"preview": "vite preview",
|
|
74
|
-
"test:dev": "vitest",
|
|
75
|
-
"test": "vitest run --coverage",
|
|
76
|
-
"type-check": "vue-tsc --noEmit -p tsconfig.json --composite false",
|
|
77
|
-
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore --ignore-path .eslintignore",
|
|
78
|
-
"format": "prettier --write src/",
|
|
79
|
-
"storybook": "storybook dev -p 6006 --no-open",
|
|
80
|
-
"build:storybook": "storybook build",
|
|
81
|
-
"release": "pnpm run build && cd dist && pnpm publish"
|
|
82
|
-
}
|
|
22
|
+
"homepage": "https://n8n.io"
|
|
83
23
|
}
|
|
@@ -86,7 +86,7 @@ describe('createChat()', () => {
|
|
|
86
86
|
expect.objectContaining({
|
|
87
87
|
method: 'POST',
|
|
88
88
|
headers: {},
|
|
89
|
-
body: expect.
|
|
89
|
+
body: expect.stringContaining('"action":"loadPreviousSession"') as unknown,
|
|
90
90
|
mode: 'cors',
|
|
91
91
|
cache: 'no-cache',
|
|
92
92
|
}),
|
|
@@ -160,7 +160,7 @@ describe('createChat()', () => {
|
|
|
160
160
|
expect.objectContaining({
|
|
161
161
|
method: 'POST',
|
|
162
162
|
headers: {},
|
|
163
|
-
body: expect.stringMatching(/"action":"sendMessage"/),
|
|
163
|
+
body: expect.stringMatching(/"action":"sendMessage"/) as unknown,
|
|
164
164
|
mode: 'cors',
|
|
165
165
|
cache: 'no-cache',
|
|
166
166
|
}),
|