mirror of
https://gitee.com/ByteDance/flowgram.ai.git
synced 2025-07-07 17:43:29 +08:00
chore: support llmstxt (#317)
* chore: support llmstxt * chore: close ssg for vercel build * fix: e2e test case
This commit is contained in:
parent
60f7ace69d
commit
4661634a01
7
apps/docs/llms/README.md
Normal file
7
apps/docs/llms/README.md
Normal file
@ -0,0 +1,7 @@
|
||||
# support for llm
|
||||
|
||||
generated by @rspress/plugin-llms 2.0.0-alpha.8.
|
||||
|
||||
"@rspress/plugin-llms": "^2.0.0-alpha.8",
|
||||
|
||||
generate for csg
|
||||
3146
apps/docs/llms/llms-full.txt
Normal file
3146
apps/docs/llms/llms-full.txt
Normal file
File diff suppressed because it is too large
Load Diff
88
apps/docs/llms/llms.txt
Normal file
88
apps/docs/llms/llms.txt
Normal file
@ -0,0 +1,88 @@
|
||||
# FlowGram.AI
|
||||
|
||||
## 指引
|
||||
|
||||
- [介绍](/guide/introduction.md)
|
||||
|
||||
## 例子
|
||||
|
||||
- [预览](/examples/index.md)
|
||||
- [基础用法](/examples/fixed-layout/fixed-layout-simple.md)
|
||||
- [复合节点](/examples/fixed-layout/fixed-composite-nodes.md)
|
||||
- [最佳实践](/examples/fixed-layout/fixed-feature-overview.md)
|
||||
- [基础用法](/examples/free-layout/free-layout-simple.md)
|
||||
- [最佳实践](/examples/free-layout/free-feature-overview.md)
|
||||
- [基础用法](/examples/node-form/basic.md)
|
||||
- [副作用](/examples/node-form/effect.md)
|
||||
- [数组](/examples/node-form/array.md)
|
||||
- [联动](/examples/node-form/dynamic.md)
|
||||
|
||||
## 常用 API
|
||||
|
||||
- [常用 API](/api/common-apis.md)
|
||||
- [API 预览](/api/index.md)
|
||||
- [](/api/plugins.md)
|
||||
- [Basic Config](/api/plugins/config-basic.md)
|
||||
- [Build Config](/api/plugins/config-build.md)
|
||||
- [Front Matter Config](/api/plugins/config-frontmatter.md)
|
||||
- [Theme Config](/api/plugins/config-theme.md)
|
||||
- [FlowDocument](/api/core/flow-document.md)
|
||||
- [FlowNodeEntity/WorkflowNodeEntity](/api/core/flow-node-entity.md)
|
||||
- [WorkflowDocument (free)](/api/core/workflow-document.md)
|
||||
- [WorkflowLinesManager (free)](/api/core/workflow-lines-manager.md)
|
||||
- [WorkflowLineEntity (free)](/api/core/workflow-line-entity.md)
|
||||
- [Playground](/api/core/playground.md)
|
||||
- [useClientContext](/api/hooks/use-client-context.md)
|
||||
- [useNodeRender](/api/hooks/use-node-render.md)
|
||||
- [usePlaygroundTools](/api/hooks/use-playground-tools.md)
|
||||
- [useRefresh](/api/hooks/use-refresh.md)
|
||||
- [useService](/api/hooks/use-service.md)
|
||||
- [EditorRenderer](/api/components/editor-renderer.md)
|
||||
- [FixedLayoutEditorProvider](/api/components/fixed-layout-editor-provider.md)
|
||||
- [FixedLayoutEditor](/api/components/fixed-layout-editor.md)
|
||||
- [FreeLayoutEditorProvider](/api/components/free-layout-editor-provider.md)
|
||||
- [FreeLayoutEditor](/api/components/free-layout-editor.md)
|
||||
- [WorkflowNodeRenderer(free)](/api/components/workflow-node-renderer.md)
|
||||
- [ClipboardService](/api/services/clipboard-service.md)
|
||||
- [CommandService](/api/services/command-service.md)
|
||||
- [FlowOperationService](/api/services/flow-operation-service.md)
|
||||
- [](/api/services/history-service.md)
|
||||
- [SelectionService](/api/services/selection-service.md)
|
||||
- [DisposableCollection](/api/utils/disposable-collection.md)
|
||||
- [Disposable](/api/utils/disposable.md)
|
||||
- [Emitter](/api/utils/emitter.md)
|
||||
- [getNodeForm](/api/utils/get-node-form.md)
|
||||
|
||||
## Other
|
||||
|
||||
- [自定义插件](/guide/advanced/custom-plugin.md)
|
||||
- [自定义 Service](/guide/advanced/custom-service.md)
|
||||
- [复合节点](/guide/advanced/fixed-layout/composite-nodes.md)
|
||||
- [加载与保存](/guide/advanced/fixed-layout/load.md)
|
||||
- [节点](/guide/advanced/fixed-layout/node.md)
|
||||
- [官方表单物料](/guide/advanced/form-materials.md)
|
||||
- [节点表单](/guide/advanced/form.md)
|
||||
- [线条](/guide/advanced/free-layout/line.md)
|
||||
- [加载与保存](/guide/advanced/free-layout/load.md)
|
||||
- [节点](/guide/advanced/free-layout/node.md)
|
||||
- [端口](/guide/advanced/free-layout/port.md)
|
||||
- [子画布](/guide/advanced/free-layout/sub-canvas.md)
|
||||
- [历史记录](/guide/advanced/history.md)
|
||||
- [缩略图](/guide/advanced/minimap.md)
|
||||
- [快捷键](/guide/advanced/shortcuts.md)
|
||||
- [变量基础](/guide/advanced/variable/basic.md)
|
||||
- [消费变量](/guide/advanced/variable/variable-consume.md)
|
||||
- [输出变量](/guide/advanced/variable/variable-output.md)
|
||||
- [不使用表单](/guide/advanced/without-form.md)
|
||||
- [画布引擎](/guide/concepts/canvas-engine.md)
|
||||
- [ECS](/guide/concepts/ecs.md)
|
||||
- [概念](/guide/concepts/index.md)
|
||||
- [IOC](/guide/concepts/ioc.md)
|
||||
- [节点引擎](/guide/concepts/node-engine.md)
|
||||
- [对比 ReactFlow](/guide/concepts/reactflow.md)
|
||||
- [变量引擎](/guide/concepts/variable-engine.md)
|
||||
- [联系我们](/guide/contact-us.md)
|
||||
- [创建固定布局画布](/guide/getting-started/create-fixed-layout-simple.md)
|
||||
- [创建自由布局画布](/guide/getting-started/create-free-layout-simple.md)
|
||||
- [安装](/guide/getting-started/install.md)
|
||||
- [常见问题](/guide/question.md)
|
||||
@ -3,7 +3,7 @@
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "NODE_OPTIONS='--max-old-space-size=8192' && rm -rf ./doc_build && rspress build",
|
||||
"build": "NODE_OPTIONS='--max-old-space-size=8192' && rm -rf ./doc_build && rspress build && shx cp -r llms/* doc_build/",
|
||||
"docs": "NODE_OPTIONS='--max-old-space-size=8192' tsx ./scripts/auto-generate.ts",
|
||||
"dev": "rspress dev",
|
||||
"lint": "eslint ./components --cache",
|
||||
@ -61,7 +61,8 @@
|
||||
"typescript-eslint": "^8.8.1",
|
||||
"openai": "~4.98.0",
|
||||
"dotenv": "~16.5.0",
|
||||
"tsx": "~4.19.4"
|
||||
"tsx": "~4.19.4",
|
||||
"shx": "0.4.0"
|
||||
},
|
||||
"homepage": "https://github.com/bytedance/flowgram.ai/"
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ import * as path from 'node:path';
|
||||
|
||||
import { merge } from 'webpack-merge';
|
||||
import { defineConfig } from 'rspress/config';
|
||||
// import { pluginLlms } from '@rspress/plugin-llms';
|
||||
|
||||
export default defineConfig({
|
||||
root: path.join(__dirname, 'src'),
|
||||
@ -44,7 +45,7 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
},
|
||||
ssg: true,
|
||||
ssg: false,
|
||||
// locales 为一个对象数组
|
||||
locales: [
|
||||
{
|
||||
@ -68,7 +69,12 @@ export default defineConfig({
|
||||
},
|
||||
lang: 'zh',
|
||||
logoText: 'FlowGram.AI',
|
||||
plugins: [],
|
||||
plugins: [
|
||||
// pluginLlms({
|
||||
// llmsTxt: true,
|
||||
// llmsFullTxt: true,
|
||||
// }),
|
||||
],
|
||||
themeConfig: {
|
||||
localeRedirect: 'auto',
|
||||
footer: {
|
||||
|
||||
104
common/config/rush/pnpm-lock.yaml
generated
104
common/config/rush/pnpm-lock.yaml
generated
@ -768,6 +768,9 @@ importers:
|
||||
raw-loader:
|
||||
specifier: ^4.0.2
|
||||
version: 4.0.2(webpack@5.76.0)
|
||||
shx:
|
||||
specifier: 0.4.0
|
||||
version: 0.4.0
|
||||
sucrase:
|
||||
specifier: 3.35.0
|
||||
version: 3.35.0
|
||||
@ -9709,6 +9712,17 @@ packages:
|
||||
cross-spawn: 7.0.6
|
||||
dev: true
|
||||
|
||||
/cross-spawn@6.0.6:
|
||||
resolution: {integrity: sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==}
|
||||
engines: {node: '>=4.8'}
|
||||
dependencies:
|
||||
nice-try: 1.0.5
|
||||
path-key: 2.0.1
|
||||
semver: 5.7.2
|
||||
shebang-command: 1.2.0
|
||||
which: 1.3.1
|
||||
dev: true
|
||||
|
||||
/cross-spawn@7.0.6:
|
||||
resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==}
|
||||
engines: {node: '>= 8'}
|
||||
@ -10136,7 +10150,6 @@ packages:
|
||||
resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==}
|
||||
dependencies:
|
||||
once: 1.4.0
|
||||
dev: false
|
||||
|
||||
/enhanced-resolve@5.17.1:
|
||||
resolution: {integrity: sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==}
|
||||
@ -10950,6 +10963,19 @@ packages:
|
||||
resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==}
|
||||
engines: {node: '>=0.8.x'}
|
||||
|
||||
/execa@1.0.0:
|
||||
resolution: {integrity: sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==}
|
||||
engines: {node: '>=6'}
|
||||
dependencies:
|
||||
cross-spawn: 6.0.6
|
||||
get-stream: 4.1.0
|
||||
is-stream: 1.1.0
|
||||
npm-run-path: 2.0.2
|
||||
p-finally: 1.0.0
|
||||
signal-exit: 3.0.7
|
||||
strip-eof: 1.0.0
|
||||
dev: true
|
||||
|
||||
/execa@5.1.1:
|
||||
resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==}
|
||||
engines: {node: '>=10'}
|
||||
@ -11336,7 +11362,6 @@ packages:
|
||||
engines: {node: '>=6'}
|
||||
dependencies:
|
||||
pump: 3.0.2
|
||||
dev: false
|
||||
|
||||
/get-stream@6.0.1:
|
||||
resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==}
|
||||
@ -11858,6 +11883,11 @@ packages:
|
||||
hasown: 2.0.2
|
||||
side-channel: 1.1.0
|
||||
|
||||
/interpret@1.4.0:
|
||||
resolution: {integrity: sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==}
|
||||
engines: {node: '>= 0.10'}
|
||||
dev: true
|
||||
|
||||
/intersection-observer@0.10.0:
|
||||
resolution: {integrity: sha512-fn4bQ0Xq8FTej09YC/jqKZwtijpvARlRp6wxL5WTA6yPe2YWSJ5RJh7Nm79rK2qB0wr6iDQzH60XGq5V/7u8YQ==}
|
||||
dev: false
|
||||
@ -12116,7 +12146,6 @@ packages:
|
||||
/is-stream@1.1.0:
|
||||
resolution: {integrity: sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: false
|
||||
|
||||
/is-stream@2.0.1:
|
||||
resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==}
|
||||
@ -13960,6 +13989,10 @@ packages:
|
||||
- '@babel/core'
|
||||
- babel-plugin-macros
|
||||
|
||||
/nice-try@1.0.5:
|
||||
resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==}
|
||||
dev: true
|
||||
|
||||
/node-domexception@1.0.0:
|
||||
resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==}
|
||||
engines: {node: '>=10.5.0'}
|
||||
@ -14000,6 +14033,13 @@ packages:
|
||||
sort-keys: 2.0.0
|
||||
dev: false
|
||||
|
||||
/npm-run-path@2.0.2:
|
||||
resolution: {integrity: sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==}
|
||||
engines: {node: '>=4'}
|
||||
dependencies:
|
||||
path-key: 2.0.1
|
||||
dev: true
|
||||
|
||||
/npm-run-path@4.0.1:
|
||||
resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==}
|
||||
engines: {node: '>=8'}
|
||||
@ -14168,7 +14208,6 @@ packages:
|
||||
/p-finally@1.0.0:
|
||||
resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==}
|
||||
engines: {node: '>=4'}
|
||||
dev: false
|
||||
|
||||
/p-is-promise@1.1.0:
|
||||
resolution: {integrity: sha512-zL7VE4JVS2IFSkR2GQKDSPEVxkoH43/p7oEnwpdCndKYJO0HVeRB7fA8TJwuLOTBREtK0ea8eHaxdwcpob5dmg==}
|
||||
@ -14256,6 +14295,11 @@ packages:
|
||||
resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
/path-key@2.0.1:
|
||||
resolution: {integrity: sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==}
|
||||
engines: {node: '>=4'}
|
||||
dev: true
|
||||
|
||||
/path-key@3.1.1:
|
||||
resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}
|
||||
engines: {node: '>=8'}
|
||||
@ -14513,7 +14557,6 @@ packages:
|
||||
dependencies:
|
||||
end-of-stream: 1.4.4
|
||||
once: 1.4.0
|
||||
dev: false
|
||||
|
||||
/punycode@2.3.1:
|
||||
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
|
||||
@ -14752,6 +14795,13 @@ packages:
|
||||
engines: {node: '>= 14.16.0'}
|
||||
dev: true
|
||||
|
||||
/rechoir@0.6.2:
|
||||
resolution: {integrity: sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==}
|
||||
engines: {node: '>= 0.10'}
|
||||
dependencies:
|
||||
resolve: 1.22.8
|
||||
dev: true
|
||||
|
||||
/recma-build-jsx@1.0.0:
|
||||
resolution: {integrity: sha512-8GtdyqaBcDfva+GUKDr3nev3VpKAhup1+RvkMvUxURHpW7QyIvk9F5wz7Vzo06CEMSilw6uArgRqhpiUcWp8ew==}
|
||||
dependencies:
|
||||
@ -15563,16 +15613,39 @@ packages:
|
||||
'@img/sharp-win32-x64': 0.33.5
|
||||
optional: true
|
||||
|
||||
/shebang-command@1.2.0:
|
||||
resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
dependencies:
|
||||
shebang-regex: 1.0.0
|
||||
dev: true
|
||||
|
||||
/shebang-command@2.0.0:
|
||||
resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==}
|
||||
engines: {node: '>=8'}
|
||||
dependencies:
|
||||
shebang-regex: 3.0.0
|
||||
|
||||
/shebang-regex@1.0.0:
|
||||
resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: true
|
||||
|
||||
/shebang-regex@3.0.0:
|
||||
resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
/shelljs@0.9.2:
|
||||
resolution: {integrity: sha512-S3I64fEiKgTZzKCC46zT/Ib9meqofLrQVbpSswtjFfAVDW+AZ54WTnAM/3/yENoxz/V1Cy6u3kiiEbQ4DNphvw==}
|
||||
engines: {node: '>=18'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
execa: 1.0.0
|
||||
fast-glob: 3.3.2
|
||||
interpret: 1.4.0
|
||||
rechoir: 0.6.2
|
||||
dev: true
|
||||
|
||||
/shiki@0.14.7:
|
||||
resolution: {integrity: sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==}
|
||||
dependencies:
|
||||
@ -15581,6 +15654,15 @@ packages:
|
||||
vscode-oniguruma: 1.7.0
|
||||
vscode-textmate: 8.0.0
|
||||
|
||||
/shx@0.4.0:
|
||||
resolution: {integrity: sha512-Z0KixSIlGPpijKgcH6oCMCbltPImvaKy0sGH8AkLRXw1KyzpKtaCTizP2xen+hNDqVF4xxgvA0KXSb9o4Q6hnA==}
|
||||
engines: {node: '>=18'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
minimist: 1.2.8
|
||||
shelljs: 0.9.2
|
||||
dev: true
|
||||
|
||||
/side-channel-list@1.0.0:
|
||||
resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==}
|
||||
engines: {node: '>= 0.4'}
|
||||
@ -15879,6 +15961,11 @@ packages:
|
||||
is-natural-number: 4.0.1
|
||||
dev: false
|
||||
|
||||
/strip-eof@1.0.0:
|
||||
resolution: {integrity: sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: true
|
||||
|
||||
/strip-final-newline@2.0.0:
|
||||
resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==}
|
||||
engines: {node: '>=6'}
|
||||
@ -17098,6 +17185,13 @@ packages:
|
||||
gopd: 1.2.0
|
||||
has-tostringtag: 1.0.2
|
||||
|
||||
/which@1.3.1:
|
||||
resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
isexe: 2.0.0
|
||||
dev: true
|
||||
|
||||
/which@2.0.2:
|
||||
resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==}
|
||||
engines: {node: '>= 8'}
|
||||
|
||||
@ -16,6 +16,18 @@ class FixedLayoutModel {
|
||||
return await this.page.locator('.gedit-flow-activity-node').count();
|
||||
}
|
||||
|
||||
public async isStartNodeExist() {
|
||||
return await this.page.locator('[data-node-id="start_0"]').count();
|
||||
}
|
||||
|
||||
public async isEndNodeExist() {
|
||||
return await this.page.locator('[data-node-id="end_0"]').count();
|
||||
}
|
||||
|
||||
public async isConditionNodeExist() {
|
||||
return await this.page.locator('[data-node-id="$blockIcon$condition_0"]').count();
|
||||
}
|
||||
|
||||
public async insert(searchText: string, { from, to }: InsertEdgeOptions) {
|
||||
const preConditionNodes = await this.page.locator('.gedit-flow-activity-node');
|
||||
const preCount = await preConditionNodes.count();
|
||||
|
||||
@ -11,16 +11,21 @@ test.describe('node operations', () => {
|
||||
});
|
||||
|
||||
test('node preview', async () => {
|
||||
const defaultNodeCount = await editorPage.getNodeCount();
|
||||
expect(defaultNodeCount).toEqual(10);
|
||||
const startCount = await editorPage.isStartNodeExist();
|
||||
const endCount = await editorPage.isEndNodeExist();
|
||||
const conditionCount = await editorPage.isConditionNodeExist();
|
||||
expect(startCount).toEqual(1);
|
||||
expect(endCount).toEqual(1);
|
||||
expect(conditionCount).toEqual(1);
|
||||
});
|
||||
|
||||
test('add node', async () => {
|
||||
const prevCount = await editorPage.getNodeCount();
|
||||
await editorPage.insert('condition', {
|
||||
from: 'llm_0',
|
||||
to: 'loop_0',
|
||||
});
|
||||
const defaultNodeCount = await editorPage.getNodeCount();
|
||||
expect(defaultNodeCount).toEqual(13);
|
||||
expect(defaultNodeCount).toEqual(prevCount + 3);
|
||||
});
|
||||
});
|
||||
|
||||
@ -14,6 +14,18 @@ class FreeLayoutModel {
|
||||
);
|
||||
}
|
||||
|
||||
public async isStartNodeExist() {
|
||||
return await this.page.locator('[data-node-id="start_0"]').count();
|
||||
}
|
||||
|
||||
public async isEndNodeExist() {
|
||||
return await this.page.locator('[data-node-id="end_0"]').count();
|
||||
}
|
||||
|
||||
public async isConditionNodeExist() {
|
||||
return await this.page.locator('[data-node-id="condition_0"]').count();
|
||||
}
|
||||
|
||||
async addConditionNode() {
|
||||
const preConditionNodes = await this.page.locator('.gedit-flow-activity-node');
|
||||
const preCount = await preConditionNodes.count();
|
||||
|
||||
@ -11,13 +11,18 @@ test.describe('node operations', () => {
|
||||
});
|
||||
|
||||
test('node preview', async () => {
|
||||
const defaultNodeCount = await editorPage.getNodeCount();
|
||||
expect(defaultNodeCount).toEqual(10);
|
||||
const startCount = await editorPage.isStartNodeExist();
|
||||
const endCount = await editorPage.isEndNodeExist();
|
||||
const conditionCount = await editorPage.isConditionNodeExist();
|
||||
expect(startCount).toEqual(1);
|
||||
expect(endCount).toEqual(1);
|
||||
expect(conditionCount).toEqual(1);
|
||||
});
|
||||
|
||||
test('add node', async () => {
|
||||
const prevCount = await editorPage.getNodeCount();
|
||||
await editorPage.addConditionNode();
|
||||
const defaultNodeCount = await editorPage.getNodeCount();
|
||||
expect(defaultNodeCount).toEqual(11);
|
||||
expect(defaultNodeCount).toEqual(prevCount + 1);
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user