@nocobase/plugin-ai 2.1.31 → 2.2.0-alpha.10
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/client-v2.d.ts +1 -0
- package/dist/ai/docs/nocobase/api/app/env.md +1 -1
- package/dist/ai/docs/nocobase/api/cli/index.md +14 -2
- package/dist/ai/docs/nocobase/api/cli/portal/config.md +44 -0
- package/dist/ai/docs/nocobase/api/cli/portal/create.md +48 -0
- package/dist/ai/docs/nocobase/api/cli/portal/deploy.md +39 -0
- package/dist/ai/docs/nocobase/api/cli/portal/destroy.md +41 -0
- package/dist/ai/docs/nocobase/api/cli/portal/dev.md +39 -0
- package/dist/ai/docs/nocobase/api/cli/portal/index.md +136 -0
- package/dist/ai/docs/nocobase/api/cli/portal/info.md +41 -0
- package/dist/ai/docs/nocobase/api/cli/portal/list.md +40 -0
- package/dist/ai/docs/nocobase/api/cli/portal/pull.md +43 -0
- package/dist/ai/docs/nocobase/api/cli/portal/push.md +41 -0
- package/dist/ai/docs/nocobase/file-manager/stable-url.md +87 -0
- package/dist/ai/docs/nocobase/file-manager/storage/index.md +66 -26
- package/dist/ai/docs/nocobase/file-manager/storage/s3-pro.md +58 -7
- package/dist/ai/docs/nocobase/get-started/deployment/production.md +24 -2
- package/dist/ai/docs/nocobase/get-started/installation/docker-caddy.mdx +3 -0
- package/dist/ai/docs/nocobase/get-started/installation/docker-nginx.mdx +3 -0
- package/dist/ai/docs/nocobase/get-started/installation/docker.mdx +27 -3
- package/dist/ai/docs/nocobase/get-started/installation/env.md +34 -1
- package/dist/ai/docs/nocobase/interface-builder/blocks/data-blocks/comment.md +107 -0
- package/dist/ai/docs/nocobase/interface-builder/blocks/data-blocks/gantt.md +204 -0
- package/dist/ai/docs/nocobase/interface-builder/index.md +7 -6
- package/dist/ai/docs/nocobase/interface-builder/ui-layout/desktop.md +97 -0
- package/dist/ai/docs/nocobase/interface-builder/ui-layout/index.md +50 -0
- package/dist/ai/docs/nocobase/interface-builder/ui-layout/mobile.md +133 -0
- package/dist/ai/docs/nocobase/nocobase-cli/production/index.md +10 -0
- package/dist/ai/docs/nocobase/nocobase-cli/production/reverse-proxy/caddy.md +15 -2
- package/dist/ai/docs/nocobase/nocobase-cli/production/reverse-proxy/index.md +1 -1
- package/dist/ai/docs/nocobase/nocobase-cli/production/reverse-proxy/nginx.md +16 -2
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-block-comment/index.md +14 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-multi-portal/index.md +16 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-ui-layout/index.md +14 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-workflow-transaction/index.md +16 -0
- package/dist/ai/docs/nocobase/runjs/context/ai.md +206 -0
- package/dist/ai/docs/nocobase/workflow/development/api.md +259 -77
- package/dist/ai/docs/nocobase/workflow/development/index.md +2 -1
- package/dist/ai/docs/nocobase/workflow/development/migration.md +319 -0
- package/dist/ai/docs/nocobase/workflow/development/node.md +84 -51
- package/dist/ai/docs/nocobase/workflow/development/trigger.md +122 -20
- package/dist/ai/docs/nocobase/workflow/nodes/index.md +2 -1
- package/dist/ai/docs/nocobase/workflow/nodes/transaction.md +81 -0
- package/dist/ai/tools/executeFrontendTool.d.ts +10 -0
- package/dist/ai/tools/executeFrontendTool.js +86 -0
- package/dist/ai/tools/formFiller.js +4 -3
- package/dist/ai/tools/loadFrontendTool.d.ts +10 -0
- package/dist/ai/tools/loadFrontendTool.js +99 -0
- package/dist/ai/tools/subAgentWebSearch.js +20 -15
- package/dist/client/23.65ea8c37cd4b884b.js +10 -0
- package/dist/client/264.cc98933ef65608b6.js +10 -0
- package/dist/client/336.7a8a8853196ad779.js +11 -0
- package/dist/client/372.49163fac65cef81c.js +10 -0
- package/dist/client/416.92b74ca47e4099c4.js +10 -0
- package/dist/client/446.d63c38d0309fe250.js +10 -0
- package/dist/client/525.94dd4136c1361477.js +10 -0
- package/dist/client/663.680bcf6272a8504d.js +10 -0
- package/dist/client/681.399948c18d753667.js +10 -0
- package/dist/client/705.19b642db34de438a.js +10 -0
- package/dist/client/ai-employees/1.x/selector/AIContextCollector.d.ts +1 -4
- package/dist/client/ai-employees/permissions/PermissionsTab.d.ts +21 -5
- package/dist/client/index.d.ts +15 -20
- package/dist/client/index.js +8 -8
- package/dist/client/workflow/nodes/employee/index.d.ts +2 -23
- package/dist/client/workflow/nodes/llm/index.d.ts +2 -52
- package/dist/client/workflow/triggers/ai-employee/index.d.ts +2 -83
- package/dist/client-v2/23.1bcb6986b40723d8.js +10 -0
- package/dist/client-v2/264.be92ff6a4d2612f1.js +10 -0
- package/dist/client-v2/336.e406470429e0670e.js +11 -0
- package/dist/client-v2/372.387161cdeb106987.js +10 -0
- package/dist/client-v2/406.341be51205c674e0.js +10 -0
- package/dist/client-v2/416.0e1c2d9cde43b83d.js +10 -0
- package/dist/client-v2/446.073d450882db29fd.js +10 -0
- package/dist/client-v2/457.d72febb89e88fc00.js +10 -0
- package/dist/client-v2/663.342341f0b2b412d8.js +10 -0
- package/dist/client-v2/681.082f4f1c7b841983.js +10 -0
- package/dist/client-v2/705.8dc34d43f02f322c.js +10 -0
- package/dist/{client/ai-employees/admin/AvatarSelect.d.ts → client-v2/ai-employees/AIEmployeeDropdown.d.ts} +8 -9
- package/dist/client-v2/ai-employees/AIEmployeeShortcut.d.ts +9 -2
- package/dist/{client → client-v2}/ai-employees/AddContextButton.d.ts +1 -1
- package/dist/{client → client-v2}/ai-employees/ai-coding/AICodingButton.d.ts +2 -1
- package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/Actions.d.ts +2 -4
- package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/AddLLMModal.d.ts +2 -4
- package/dist/client-v2/ai-employees/chatbox/components/Attachments.d.ts +27 -0
- package/dist/{client/ai-employees/permissions/Permissions.d.ts → client-v2/ai-employees/chatbox/components/ChatBox.d.ts} +2 -2
- package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/ChatBoxLayout.d.ts +1 -1
- package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/ContextItem.d.ts +1 -1
- package/dist/{client/ai-employees/admin/Employees.d.ts → client-v2/ai-employees/chatbox/components/DebugPanel.d.ts} +1 -1
- package/dist/{client/ai-employees/chatbox/markdown/Code.d.ts → client-v2/ai-employees/chatbox/components/Markdown.d.ts} +12 -5
- package/dist/{client/ai-employees/admin/ProfileSettings.d.ts → client-v2/ai-employees/chatbox/components/MessageContent.d.ts} +3 -2
- package/dist/client-v2/ai-employees/chatbox/components/MessageRenderers.d.ts +39 -0
- package/dist/{client/ai-employees/chatbox/generative-ui → client-v2/ai-employees/chatbox/components}/ToolCard.d.ts +7 -5
- package/dist/{client/ai-employees/admin/datasource/components/basic → client-v2/ai-employees/chatbox/components}/index.d.ts +5 -2
- package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useChat.d.ts +21 -22
- package/dist/client-v2/ai-employees/chatbox/hooks/useChatBoxActions.d.ts +3 -2
- package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useChatConversationActions.d.ts +2 -2
- package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useChatMessageActions.d.ts +8 -4
- package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useToolCallActions.d.ts +1 -1
- package/dist/client-v2/ai-employees/chatbox/hooks/useUploadFiles.d.ts +46 -0
- package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useWorkflowTasks.d.ts +1 -1
- package/dist/{client → client-v2}/ai-employees/chatbox/model.d.ts +9 -2
- package/dist/client-v2/ai-employees/chatbox/roles.d.ts +162 -0
- package/dist/client-v2/ai-employees/chatbox/stores/chat-box.d.ts +1 -49
- package/dist/client-v2/ai-employees/chatbox/stores/chat-conversations.d.ts +2 -19
- package/dist/client-v2/ai-employees/chatbox/stores/chat-messages.d.ts +1 -46
- package/dist/{client → client-v2}/ai-employees/chatbox/stores/chat-tool-call.d.ts +1 -15
- package/dist/client-v2/ai-employees/chatbox/stores/chat-tools.d.ts +30 -0
- package/dist/client-v2/ai-employees/chatbox/stores/create-selectors.d.ts +31 -3
- package/dist/{client/ai-employees/chatbox/conversations/common.d.ts → client-v2/ai-employees/chatbox/stores/workflow-tasks.d.ts} +21 -4
- package/dist/client-v2/ai-employees/chatbox/utils/normalizeTriggerTaskOptions.d.ts +19 -0
- package/dist/{client → client-v2}/ai-employees/chatbox/utils.d.ts +26 -7
- package/dist/{client/ai-employees/data-visualization/context.d.ts → client-v2/ai-employees/context/chart-config.d.ts} +1 -1
- package/dist/{client → client-v2}/ai-employees/context/code-editor.d.ts +1 -1
- package/dist/{client → client-v2}/ai-employees/context/datasource.d.ts +1 -1
- package/dist/{client → client-v2}/ai-employees/context/flow-models.d.ts +1 -1
- package/dist/{client/ai-employees/admin/datasource/components/DatasourceSettingDetail.d.ts → client-v2/ai-employees/data-modeling/setup.d.ts} +6 -5
- package/dist/{client → client-v2}/ai-employees/datasource/DatasourceSelector.d.ts +6 -2
- package/dist/{client/ai-employees/admin/datasource/flow-models/DatasourceSettingModel.d.ts → client-v2/ai-employees/flow/index.d.ts} +4 -6
- package/dist/{client → client-v2}/ai-employees/form-filler/tools/index.d.ts +1 -1
- package/dist/{client/ai-employees/ai-coding/tools/index.d.ts → client-v2/ai-employees/frontend-tools.d.ts} +3 -3
- package/dist/{client → client-v2}/ai-employees/stores/ai-selection.d.ts +4 -4
- package/dist/{client → client-v2}/ai-employees/stores/dialog-controller.d.ts +4 -4
- package/dist/{client/ai-employees/business-report/ui → client-v2/ai-employees/tools}/BusinessReportCard.d.ts +2 -2
- package/dist/{client/ai-employees/business-report/ui → client-v2/ai-employees/tools}/BusinessReportModal.d.ts +2 -2
- package/dist/{client/ai-employees/1.x/selector/withAISelectable.d.ts → client-v2/ai-employees/tools/ChartGeneratorCard.d.ts} +5 -4
- package/dist/{client/ai-employees/ai-coding/ui → client-v2/ai-employees/tools}/CodeToolCard.d.ts +1 -1
- package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools}/DataModelingCard.d.ts +3 -5
- package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools}/DataModelingModal.d.ts +4 -6
- package/dist/{client/ai-employees/sub-agents/ui → client-v2/ai-employees/tools}/SubAgentDispatchCard.d.ts +4 -9
- package/dist/{client/ai-employees/AISettingsProvider.d.ts → client-v2/ai-employees/tools/SuggestionsOptionsCard.d.ts} +6 -8
- package/dist/{client/ai-employees/workflow-tasks/ui → client-v2/ai-employees/tools}/WorkflowTaskOutputCard.d.ts +7 -2
- package/dist/{client/ai-employees/ai-coding/tools/context-tools.d.ts → client-v2/ai-employees/tools/ai-coding.d.ts} +3 -1
- package/dist/client-v2/ai-employees/tools/business-report-utils.d.ts +45 -0
- package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools/data-modeling}/CollectionNode.d.ts +2 -3
- package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools/data-modeling}/Diagram.d.ts +1 -1
- package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools/data-modeling}/Table.d.ts +2 -2
- package/dist/client-v2/ai-employees/tools/data-modeling/legacy-template.d.ts +13 -0
- package/dist/client-v2/ai-employees/tools/data-modeling/runtime.d.ts +15 -0
- package/dist/{client/ai-employees → client-v2/ai-employees/tools}/data-modeling/types.d.ts +27 -4
- package/dist/client-v2/ai-employees/tools/data-modeling/useFieldInterfaceOptions.d.ts +151 -0
- package/dist/{client/ai-employees/data-visualization/tools/index.d.ts → client-v2/ai-employees/tools/data-visualization.d.ts} +1 -1
- package/dist/client-v2/ai-employees/tools/index.d.ts +32 -0
- package/dist/client-v2/ai-employees/types.d.ts +104 -7
- package/dist/client-v2/components/RemoteSelect.d.ts +43 -0
- package/dist/{client → client-v2}/debug-logger.d.ts +2 -2
- package/dist/client-v2/f0053e745af0ad03.svg +50 -0
- package/dist/client-v2/index.d.ts +9 -8
- package/dist/client-v2/index.js +37 -1
- package/dist/client-v2/llm-providers/forms.d.ts +44 -0
- package/dist/client-v2/llm-providers/index.d.ts +24 -0
- package/dist/{client/ai-employees/chart-generator/tools/index.d.ts → client-v2/llm-services/utils.d.ts} +5 -2
- package/dist/client-v2/locale.d.ts +14 -0
- package/dist/client-v2/manager/ai-manager.d.ts +57 -0
- package/dist/client-v2/manager/frontend-tool-registry.d.ts +30 -0
- package/dist/client-v2/models/ai-employees/AIEmployeeActionModel.d.ts +33 -0
- package/dist/client-v2/models/ai-employees/AIEmployeeShortcutModel.d.ts +44 -0
- package/dist/client-v2/pages/AdminSettingsPage.d.ts +24 -0
- package/dist/client-v2/pages/DatasourceSettingsPage.d.ts +62 -0
- package/dist/client-v2/pages/EmployeesPage.d.ts +63 -0
- package/dist/client-v2/pages/LLMServicesPage.d.ts +75 -0
- package/dist/client-v2/pages/MCPSettingsPage.d.ts +73 -0
- package/dist/client-v2/pages/drawerWidth.d.ts +10 -0
- package/dist/client-v2/pages/permissions/Permissions.d.ts +67 -0
- package/dist/client-v2/pages/permissions/PermissionsTab.d.ts +12 -0
- package/dist/client-v2/pages/useUnsavedChangesBeforeClose.d.ts +29 -0
- package/dist/client-v2/plugin.d.ts +33 -0
- package/dist/client-v2/repositories/AIConfigRepository.d.ts +3 -23
- package/dist/client-v2/runjs/registerAIEmployeeRunJSFacade.d.ts +20 -0
- package/dist/client-v2/workflow/components/FormValueRegistry.d.ts +12 -0
- package/dist/{client/components/ListCollapse.d.ts → client-v2/workflow/components/WorkflowListCollapse.d.ts} +4 -4
- package/dist/client-v2/workflow/constants.d.ts +26 -0
- package/dist/client-v2/workflow/nodes/employee/components/AIEmployeeFieldset.d.ts +11 -0
- package/dist/{client/ai-employees/common/CodeHighlight.d.ts → client-v2/workflow/nodes/employee/components/AIEmployeeSelect.d.ts} +5 -6
- package/dist/{client/ai-employees/ContextAwareTooltip.d.ts → client-v2/workflow/nodes/employee/components/Assignees.d.ts} +2 -1
- package/dist/client-v2/workflow/nodes/employee/components/FeedbackSettings.d.ts +17 -0
- package/dist/client-v2/workflow/nodes/employee/components/FileInputs.d.ts +11 -0
- package/dist/{client/ai-employees/AIEmployeesProvider.d.ts → client-v2/workflow/nodes/employee/components/MessageInputs.d.ts} +2 -3
- package/dist/client-v2/workflow/nodes/employee/components/ModelOptions.d.ts +17 -0
- package/dist/{client/ai-employees/admin/datasource/components/basic/CollectionCascader.d.ts → client-v2/workflow/nodes/employee/components/SkillSettings.d.ts} +6 -3
- package/dist/client-v2/workflow/nodes/employee/components/StructuredOutput.d.ts +11 -0
- package/dist/client-v2/workflow/nodes/employee/components/UserInput.d.ts +18 -0
- package/dist/client-v2/workflow/nodes/employee/components/WebSearchOptions.d.ts +16 -0
- package/dist/client-v2/workflow/nodes/employee/index.d.ts +23 -0
- package/dist/{client/ai-employees/AIEmployeeListItem.d.ts → client-v2/workflow/nodes/llm/components/LLMFieldset.d.ts} +3 -5
- package/dist/{client/admin-settings/AdminSettings.d.ts → client-v2/workflow/nodes/llm/components/Messages.d.ts} +2 -1
- package/dist/client-v2/workflow/nodes/llm/components/StructuredOutput.d.ts +11 -0
- package/dist/client-v2/workflow/nodes/llm/index.d.ts +30 -0
- package/dist/{client/ai-employees/1.x/selector/BlockSelector.d.ts → client-v2/workflow/register.d.ts} +2 -6
- package/dist/client-v2/workflow/triggers/ai-employee/AIEmployeeTriggerConfig.d.ts +11 -0
- package/dist/client-v2/workflow/triggers/ai-employee/Parameters.d.ts +11 -0
- package/dist/client-v2/workflow/triggers/ai-employee/index.d.ts +25 -0
- package/dist/client-v2/workflow/types.d.ts +128 -0
- package/dist/common/frontend-tools.d.ts +26 -0
- package/dist/common/frontend-tools.js +57 -0
- package/dist/externalVersion.js +20 -25
- package/dist/locale/en-US.json +48 -1
- package/dist/locale/zh-CN.json +48 -1
- package/dist/node_modules/@langchain/mistralai/package.json +1 -1
- package/dist/node_modules/@langchain/xai/package.json +1 -1
- package/dist/node_modules/fs-extra/package.json +1 -1
- package/dist/node_modules/jsonrepair/package.json +1 -1
- package/dist/node_modules/just-bash/package.json +1 -1
- package/dist/node_modules/nodejs-snowflake/package.json +1 -1
- package/dist/node_modules/openai/package.json +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/ai-employees/ai-conversations.d.ts +2 -0
- package/dist/server/ai-employees/ai-employee.d.ts +1 -1
- package/dist/server/ai-employees/ai-employee.js +27 -8
- package/dist/server/ai-employees/prompts.d.ts +2 -1
- package/dist/server/ai-employees/prompts.js +8 -2
- package/dist/server/ai-employees/tool-call-sanitizer.d.ts +1 -0
- package/dist/server/ai-employees/tool-call-sanitizer.js +2 -1
- package/dist/server/ai-employees/utils.js +11 -5
- package/dist/server/collections/ai-usage-events.d.ts +10 -0
- package/dist/server/collections/ai-usage-events.js +183 -0
- package/dist/server/document-loader/constants.js +1 -0
- package/dist/server/frontend-tools.d.ts +25 -0
- package/dist/server/frontend-tools.js +171 -0
- package/dist/server/llm-providers/dashscope.d.ts +2 -1
- package/dist/server/llm-providers/dashscope.js +16 -1
- package/dist/server/llm-providers/deepseek.d.ts +2 -1
- package/dist/server/llm-providers/deepseek.js +33 -2
- package/dist/server/llm-providers/kimi/provider.d.ts +2 -1
- package/dist/server/llm-providers/kimi/provider.js +22 -2
- package/dist/server/llm-providers/mistral.d.ts +36 -2
- package/dist/server/llm-providers/mistral.js +62 -2
- package/dist/server/llm-providers/openai/completions.d.ts +2 -1
- package/dist/server/llm-providers/openai/completions.js +17 -1
- package/dist/server/llm-providers/openai/responses.d.ts +2 -1
- package/dist/server/llm-providers/openai/responses.js +17 -1
- package/dist/server/llm-providers/provider.d.ts +7 -0
- package/dist/server/llm-providers/provider.js +7 -1
- package/dist/server/manager/ai-chat-conversation.js +2 -0
- package/dist/server/manager/ai-context-datasource-manager.js +34 -7
- package/dist/server/manager/ai-manager.d.ts +2 -1
- package/dist/server/manager/ai-manager.js +4 -1
- package/dist/server/manager/ai-usage-events.d.ts +49 -0
- package/dist/server/manager/ai-usage-events.js +195 -0
- package/dist/server/manager/work-context-handler.js +10 -3
- package/dist/server/resource/aiConversations.d.ts +2 -0
- package/dist/server/resource/aiConversations.js +27 -1
- package/package.json +5 -5
- package/dist/client/119.c6bf8c6433167d81.js +0 -10
- package/dist/client/170.d98eacdc00d9d527.js +0 -10
- package/dist/client/228.b4b709f93b86b6b9.js +0 -10
- package/dist/client/280.003b9e9788599244.js +0 -10
- package/dist/client/290.0f7f441d8a94f03c.js +0 -10
- package/dist/client/331.d547c95410476a69.js +0 -10
- package/dist/client/406.15c09d98faa2ccf1.js +0 -10
- package/dist/client/428.5eb4f53ddbb6a3b8.js +0 -10
- package/dist/client/462.d172d0fe91519e35.js +0 -10
- package/dist/client/486.dcac8f3fcec19c33.js +0 -10
- package/dist/client/502.2b4a51e0a8122e52.js +0 -10
- package/dist/client/525.33a9c8ec28be4ec4.js +0 -10
- package/dist/client/559.959c46d0056ccdc8.js +0 -10
- package/dist/client/561.7ec804ef39ec7dcd.js +0 -10
- package/dist/client/580.35ba54ff91b7fe6d.js +0 -10
- package/dist/client/597.b0d64948d74cf6cb.js +0 -10
- package/dist/client/604.89c674f35b52b4ef.js +0 -10
- package/dist/client/614.aa766080f6b99aab.js +0 -10
- package/dist/client/646.07bb23e72fb6eb15.js +0 -10
- package/dist/client/687.224e569a99cae4bb.js +0 -10
- package/dist/client/699.57c0a1acb723202a.js +0 -10
- package/dist/client/711.92cd94681fde7e05.js +0 -10
- package/dist/client/758.a9741e81911e53c3.js +0 -10
- package/dist/client/768.5177bff46ae71a5b.js +0 -10
- package/dist/client/792.abb57765453bcbcc.js +0 -10
- package/dist/client/820.f72ef2462b61d812.js +0 -10
- package/dist/client/832.0cf69e3f43c320b2.js +0 -10
- package/dist/client/927.d95c74ebb8fd51c9.js +0 -10
- package/dist/client/ai-employees/1.x/selector/AISelectorProvider.d.ts +0 -33
- package/dist/client/ai-employees/ProfileCard.d.ts +0 -15
- package/dist/client/ai-employees/admin/ChatSettings.d.ts +0 -10
- package/dist/client/ai-employees/admin/DataSourceSettings.d.ts +0 -10
- package/dist/client/ai-employees/admin/EnableSwitch.d.ts +0 -10
- package/dist/client/ai-employees/admin/InputsFormSettings.d.ts +0 -10
- package/dist/client/ai-employees/admin/KnowledgeBaseSettings.d.ts +0 -10
- package/dist/client/ai-employees/admin/ModelSettings.d.ts +0 -10
- package/dist/client/ai-employees/admin/SkillSettings.d.ts +0 -19
- package/dist/client/ai-employees/admin/SystemPrompt.d.ts +0 -10
- package/dist/client/ai-employees/admin/Templates.d.ts +0 -10
- package/dist/client/ai-employees/admin/ToolsSettings.d.ts +0 -17
- package/dist/client/ai-employees/admin/datasource/components/DatasourceSettingForm.d.ts +0 -10
- package/dist/client/ai-employees/admin/datasource/components/DatasourceSettingGrid.d.ts +0 -10
- package/dist/client/ai-employees/admin/datasource/components/basic/FieldsTransfer.d.ts +0 -17
- package/dist/client/ai-employees/admin/datasource/components/form-steps/CollectionSetting.d.ts +0 -17
- package/dist/client/ai-employees/admin/datasource/components/form-steps/FieldsSetting.d.ts +0 -15
- package/dist/client/ai-employees/admin/datasource/components/form-steps/FilterSetting.d.ts +0 -17
- package/dist/client/ai-employees/admin/datasource/components/form-steps/Preview.d.ts +0 -13
- package/dist/client/ai-employees/admin/datasource/components/form-steps/SortSetting.d.ts +0 -15
- package/dist/client/ai-employees/admin/datasource/components/form-steps/index.d.ts +0 -13
- package/dist/client/ai-employees/admin/datasource/components/index.d.ts +0 -9
- package/dist/client/ai-employees/admin/datasource/context.d.ts +0 -17
- package/dist/client/ai-employees/admin/datasource/flow-models/index.d.ts +0 -9
- package/dist/client/ai-employees/admin/datasource/index.d.ts +0 -10
- package/dist/client/ai-employees/admin/hooks.d.ts +0 -39
- package/dist/client/ai-employees/admin/mcp/MCPSettings.d.ts +0 -10
- package/dist/client/ai-employees/admin/mcp/MCPToolsList.d.ts +0 -19
- package/dist/client/ai-employees/admin/mcp/context.d.ts +0 -15
- package/dist/client/ai-employees/admin/mcp/schemas.d.ts +0 -1314
- package/dist/client/ai-employees/ai-coding/CodeHistory.d.ts +0 -10
- package/dist/client/ai-employees/ai-coding/markdown/Code.d.ts +0 -16
- package/dist/client/ai-employees/avatars.d.ts +0 -9
- package/dist/client/ai-employees/built-in/utils.d.ts +0 -15
- package/dist/client/ai-employees/business-report/tools/index.d.ts +0 -10
- package/dist/client/ai-employees/business-report/ui/report-utils.d.ts +0 -38
- package/dist/client/ai-employees/chart-generator/ui/ECharts.d.ts +0 -13
- package/dist/client/ai-employees/chatbox/AIThinking.d.ts +0 -12
- package/dist/client/ai-employees/chatbox/Attachment.d.ts +0 -14
- package/dist/client/ai-employees/chatbox/AttachmentsHeader.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/ChatBox.d.ts +0 -12
- package/dist/client/ai-employees/chatbox/ContextItemsHeader.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/DebugPanel.d.ts +0 -16
- package/dist/client/ai-employees/chatbox/EditMessageHeader.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/HintMessageHeader.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/MessageRenderer.d.ts +0 -33
- package/dist/client/ai-employees/chatbox/SenderFooter.d.ts +0 -13
- package/dist/client/ai-employees/chatbox/SenderHeader.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/SenderPrefix.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/Upload.d.ts +0 -12
- package/dist/client/ai-employees/chatbox/VirtualList.d.ts +0 -28
- package/dist/client/ai-employees/chatbox/conversations/ConversationsList.d.ts +0 -13
- package/dist/client/ai-employees/chatbox/conversations/WorkflowTasksList.d.ts +0 -13
- package/dist/client/ai-employees/chatbox/conversations/index.d.ts +0 -9
- package/dist/client/ai-employees/chatbox/generative-ui/DefaultToolCard.d.ts +0 -16
- package/dist/client/ai-employees/chatbox/hooks/useChatBoxActions.d.ts +0 -18
- package/dist/client/ai-employees/chatbox/hooks/useUploadFiles.d.ts +0 -12
- package/dist/client/ai-employees/chatbox/markdown/ECharts.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/markdown/Form.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/markdown/Generating.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/markdown/Markdown.d.ts +0 -13
- package/dist/client/ai-employees/chatbox/roles.d.ts +0 -32
- package/dist/client/ai-employees/chatbox/stores/chat-box.d.ts +0 -9
- package/dist/client/ai-employees/chatbox/stores/chat-conversations.d.ts +0 -9
- package/dist/client/ai-employees/chatbox/stores/chat-messages.d.ts +0 -9
- package/dist/client/ai-employees/chatbox/stores/chat-tools.d.ts +0 -51
- package/dist/client/ai-employees/chatbox/stores/create-selectors.d.ts +0 -18
- package/dist/client/ai-employees/chatbox/stores/workflow-tasks.d.ts +0 -45
- package/dist/client/ai-employees/context/classic-pages.d.ts +0 -10
- package/dist/client/ai-employees/data-modeling/Table.d.ts +0 -12
- package/dist/client/ai-employees/data-modeling/setup.d.ts +0 -10
- package/dist/client/ai-employees/data-modeling/tools/index.d.ts +0 -10
- package/dist/client/ai-employees/data-modeling/ui/useFieldInterfaceOptions.d.ts +0 -14
- package/dist/client/ai-employees/datasource/DatasourceList.d.ts +0 -17
- package/dist/client/ai-employees/datasource/index.d.ts +0 -9
- package/dist/client/ai-employees/flow/events/index.d.ts +0 -9
- package/dist/client/ai-employees/flow/index.d.ts +0 -36
- package/dist/client/ai-employees/flow/models/AIEmployeeActionModel.d.ts +0 -18
- package/dist/client/ai-employees/flow/models/AIEmployeeShortcutModel.d.ts +0 -30
- package/dist/client/ai-employees/shortcuts/ShortcutList.d.ts +0 -10
- package/dist/client/ai-employees/shortcuts/useShortcuts.d.ts +0 -13
- package/dist/client/ai-employees/stores/context-aware.d.ts +0 -19
- package/dist/client/ai-employees/sub-agents/tools/index.d.ts +0 -10
- package/dist/client/ai-employees/suggestions/tools/index.d.ts +0 -10
- package/dist/client/ai-employees/suggestions/ui/SuggestionsOptions.d.ts +0 -13
- package/dist/client/ai-employees/types.d.ts +0 -259
- package/dist/client/ai-employees/workflow-tasks/tools/index.d.ts +0 -10
- package/dist/client/chat-settings/Messages.d.ts +0 -11
- package/dist/client/chat-settings/StructuredOutput.d.ts +0 -11
- package/dist/client/components/skill-settings.d.ts +0 -22
- package/dist/client/features/components.d.ts +0 -9
- package/dist/client/features/feature-manager.d.ts +0 -9
- package/dist/client/features/index.d.ts +0 -9
- package/dist/client/features/vector-database-provider.d.ts +0 -9
- package/dist/client/features/vector-store-provider.d.ts +0 -9
- package/dist/client/llm-providers/anthropic/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/anthropic/ProviderSettings.d.ts +0 -10
- package/dist/client/llm-providers/anthropic/index.d.ts +0 -10
- package/dist/client/llm-providers/components/Chat.d.ts +0 -10
- package/dist/client/llm-providers/components/ModelSelect.d.ts +0 -10
- package/dist/client/llm-providers/dashscope/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/dashscope/ProviderSettings.d.ts +0 -10
- package/dist/client/llm-providers/dashscope/index.d.ts +0 -10
- package/dist/client/llm-providers/deepseek/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/deepseek/index.d.ts +0 -10
- package/dist/client/llm-providers/google-genai/MessageRenderer.d.ts +0 -13
- package/dist/client/llm-providers/google-genai/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/google-genai/ProviderSettings.d.ts +0 -10
- package/dist/client/llm-providers/google-genai/index.d.ts +0 -10
- package/dist/client/llm-providers/kimi/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/kimi/index.d.ts +0 -10
- package/dist/client/llm-providers/mimo/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/mimo/index.d.ts +0 -10
- package/dist/client/llm-providers/mistral/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/mistral/index.d.ts +0 -10
- package/dist/client/llm-providers/ollama/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/ollama/ProviderSettings.d.ts +0 -10
- package/dist/client/llm-providers/ollama/index.d.ts +0 -10
- package/dist/client/llm-providers/openai/completions/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/openai/completions/index.d.ts +0 -10
- package/dist/client/llm-providers/openai/components/ProviderSettings.d.ts +0 -10
- package/dist/client/llm-providers/openai/responses/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/openai/responses/index.d.ts +0 -10
- package/dist/client/llm-providers/orcarouter/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/orcarouter/ProviderSettings.d.ts +0 -10
- package/dist/client/llm-providers/orcarouter/index.d.ts +0 -10
- package/dist/client/llm-providers/tongyi/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/tongyi/ProviderSettings.d.ts +0 -10
- package/dist/client/llm-providers/tongyi/index.d.ts +0 -10
- package/dist/client/llm-providers/xai/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/xai/index.d.ts +0 -10
- package/dist/client/llm-services/LLMServices.d.ts +0 -13
- package/dist/client/llm-services/component/DefaultModelSelect.d.ts +0 -10
- package/dist/client/llm-services/component/EnabledModelsSelect.d.ts +0 -23
- package/dist/client/llm-services/component/LLMTestFlight.d.ts +0 -10
- package/dist/client/llm-services/component/ModelOptionsSettings.d.ts +0 -10
- package/dist/client/llm-services/component/UnifiedModelSettings.d.ts +0 -10
- package/dist/client/llm-services/hooks/useLLMServiceCatalog.d.ts +0 -18
- package/dist/client/llm-services/llm-providers.d.ts +0 -27
- package/dist/client/llm-services/utils.d.ts +0 -35
- package/dist/client/manager/ai-feature-manager.d.ts +0 -9
- package/dist/client/manager/ai-manager.d.ts +0 -35
- package/dist/client/repositories/AIConfigRepository.d.ts +0 -60
- package/dist/client/repositories/hooks/useAIConfigRepository.d.ts +0 -10
- package/dist/client/schemas/llms.d.ts +0 -347
- package/dist/client/workflow/nodes/employee/components/AIEmployeeSelect.d.ts +0 -10
- package/dist/client/workflow/nodes/employee/components/assigness.d.ts +0 -11
- package/dist/client/workflow/nodes/employee/components/file-inputs.d.ts +0 -10
- package/dist/client/workflow/nodes/employee/components/message-inputs.d.ts +0 -12
- package/dist/client/workflow/nodes/employee/components/model-options.d.ts +0 -10
- package/dist/client/workflow/nodes/employee/components/structured-output.d.ts +0 -10
- package/dist/client/workflow/nodes/employee/components/users-select.d.ts +0 -13
- package/dist/client/workflow/nodes/employee/components/web-search-options.d.ts +0 -10
- package/dist/client/workflow/nodes/employee/configuration.d.ts +0 -12
- package/dist/client/workflow/nodes/employee/flow-models/feedback.d.ts +0 -14
- package/dist/client/workflow/nodes/employee/flow-models/task.d.ts +0 -13
- package/dist/client/workflow/nodes/llm/ModelSettings.d.ts +0 -11
- package/dist/client/workflow/triggers/ai-employee/Parameters.d.ts +0 -13
- /package/dist/{client → client-v2}/ai-employees/AISelection.d.ts +0 -0
- /package/dist/{client → client-v2}/ai-employees/AISelectionControl.d.ts +0 -0
- /package/dist/{client → client-v2}/ai-employees/ai-coding/prompts.d.ts +0 -0
- /package/dist/{client → client-v2}/ai-employees/ai-coding/setup.d.ts +0 -0
- /package/dist/{client/ai-employees/chatbox/AIEmployeeSwitch.d.ts → client-v2/ai-employees/chatbox/components/AIEmployeeSwitcher.d.ts} +0 -0
- /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/ChatButton.d.ts +0 -0
- /package/dist/{client/ai-employees/chatbox/conversations → client-v2/ai-employees/chatbox/components}/Conversations.d.ts +0 -0
- /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/Messages.d.ts +0 -0
- /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/ModelSwitcher.d.ts +0 -0
- /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/SearchSwitch.d.ts +0 -0
- /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/Sender.d.ts +0 -0
- /package/dist/{client/ai-employees/chatbox/generative-ui → client-v2/ai-employees/chatbox/components}/ToolModal.d.ts +0 -0
- /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/UserPrompt.d.ts +0 -0
- /package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useChatBoxEffect.d.ts +0 -0
- /package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useLoadMoreObserver.d.ts +0 -0
- /package/dist/client-v2/ai-employees/{chatbox/stores → stores}/global-store.d.ts +0 -0
- /package/dist/{client/ai-employees/flow/models → client-v2/models/ai-employees}/AIEmployeeShortcutListModel.d.ts +0 -0
- /package/dist/{client/ai-employees/flow/models → client-v2/models/ai-employees}/index.d.ts +0 -0
- /package/dist/{client/ai-employees/flow/events/ai-context-selection.d.ts → client-v2/workflow/components/index.d.ts} +0 -0
package/client-v2.d.ts
CHANGED
|
@@ -107,7 +107,7 @@ For example, to add the `hello` plugin to the `my-nocobase-app` project, the ful
|
|
|
107
107
|
PLUGIN_PACKAGE_PREFIX can be configured as:
|
|
108
108
|
|
|
109
109
|
```bash
|
|
110
|
-
PLUGIN_PACKAGE_PREFIX=@nocobase/plugin-,@nocobase
|
|
110
|
+
PLUGIN_PACKAGE_PREFIX=@nocobase/plugin-,@nocobase/preset-,@my-nocobase-app/plugin-
|
|
111
111
|
```
|
|
112
112
|
|
|
113
113
|
Then the mapping between plugin names and package names is as follows:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: 'NocoBase CLI'
|
|
3
|
-
description: 'NocoBase CLI (`nb` command) reference: initialization, backup and restore, configuration, environment management, app runtime, source code, database, plugins, commercial license, API, CLI self-update, and Skills management.'
|
|
4
|
-
keywords: 'NocoBase CLI,nb,command line,command reference,backup,restore,environment management,plugin management,commercial license,API'
|
|
3
|
+
description: 'NocoBase CLI (`nb` command) reference: initialization, backup and restore, configuration, environment management, app runtime, portal, source code, database, plugins, commercial license, API, CLI self-update, and Skills management.'
|
|
4
|
+
keywords: 'NocoBase CLI,nb,command line,command reference,backup,restore,environment management,Portal,plugin management,commercial license,API'
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# NocoBase CLI
|
|
@@ -39,6 +39,7 @@ The following command groups are shown in `nb --help`:
|
|
|
39
39
|
| [`nb env`](./env/index.md) | Manage NocoBase project environments, the current env, status, details, and runtime commands. |
|
|
40
40
|
| [`nb license`](./license/index.md) | Manage commercial licenses and licensed plugins. |
|
|
41
41
|
| [`nb plugin`](./plugin/index.md) | Manage plugins in the selected NocoBase env. |
|
|
42
|
+
| [`nb portal`](./portal/index.md) | Manage portals: configure, create, develop, sync source, deploy, and destroy. |
|
|
42
43
|
| [`nb scaffold`](./scaffold/index.md) | Generate scaffolding for NocoBase plugin development. |
|
|
43
44
|
| [`nb self`](./self/index.md) | Check or update NocoBase CLI itself. |
|
|
44
45
|
| [`nb session`](./session/index.md) | Configure `NB_SESSION_ID` so the current env is isolated by shell or agent runtime. |
|
|
@@ -70,6 +71,8 @@ nb backup --help
|
|
|
70
71
|
nb config --help
|
|
71
72
|
nb api resource --help
|
|
72
73
|
nb license --help
|
|
74
|
+
nb portal --help
|
|
75
|
+
nb portal config --help
|
|
73
76
|
```
|
|
74
77
|
|
|
75
78
|
## Examples
|
|
@@ -127,6 +130,15 @@ nb license status -e app1
|
|
|
127
130
|
nb license plugins list -e app1
|
|
128
131
|
```
|
|
129
132
|
|
|
133
|
+
Create and develop a portal:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
nb portal create customer -e app1 --yes
|
|
137
|
+
nb portal config customer -e app1 --yes --source-storage git --git-repo git@github.com:nocobase/customer-portal.git
|
|
138
|
+
nb portal dev customer -e app1 --yes
|
|
139
|
+
nb portal deploy customer -e app1 --yes
|
|
140
|
+
```
|
|
141
|
+
|
|
130
142
|
Create and download a backup:
|
|
131
143
|
|
|
132
144
|
```bash
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "nb portal config"
|
|
3
|
+
description: "nb portal config command reference: update source storage and Git source configuration for a portal."
|
|
4
|
+
keywords: "nb portal config,NocoBase CLI,Portal"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# nb portal config
|
|
8
|
+
|
|
9
|
+
Update the local portal source configuration and sync it to the remote portal record when possible
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
nb portal config <portal> [flags]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Flag
|
|
18
|
+
|
|
19
|
+
| Flag | Type | Description |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| `<portal>` | string | Portal name or slug |
|
|
22
|
+
| `--env`, `-e` | string | CLI env name. If omitted, the current env is used. |
|
|
23
|
+
| `--yes`, `-y` | boolean | Skip cross-env confirmation. |
|
|
24
|
+
| `--source-storage` | `nocobase` \| `git` | Where portal source code is managed. |
|
|
25
|
+
| `--git-repo` | string | Git repository URL used with `--source-storage=git`. |
|
|
26
|
+
| `--git-branch` | string | Git branch used with `--source-storage=git`. |
|
|
27
|
+
| `--git-path` | string | Directory inside the Git repository; defaults to the repository root (`.`). |
|
|
28
|
+
|
|
29
|
+
## Examples
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
nb portal config customer --source-storage nocobase
|
|
33
|
+
nb portal config customer --source-storage git --git-repo git@github.com:nocobase/customer-portal.git
|
|
34
|
+
nb portal config customer --git-branch main --git-path portals/customer
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Notes
|
|
38
|
+
|
|
39
|
+
Pass at least one configuration flag. The local workspace must already exist; use `nb portal create` or `nb portal pull` first. If the remote portal record exists, the configuration is synced to it; otherwise only `portal.config.json` is updated locally.
|
|
40
|
+
|
|
41
|
+
## Related Commands
|
|
42
|
+
|
|
43
|
+
- [`nb portal`](./index.md)
|
|
44
|
+
- [`nb env`](../env/index.md)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "nb portal create"
|
|
3
|
+
description: "nb portal create command reference: create a local portal from a template and create or update the portal record."
|
|
4
|
+
keywords: "nb portal create,NocoBase CLI,Portal"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# nb portal create
|
|
8
|
+
|
|
9
|
+
Create a local portal from a template and create or update the portal record
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
nb portal create <portal> [flags]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Flag
|
|
18
|
+
|
|
19
|
+
| Flag | Type | Description |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| `<portal>` | string | Portal name or slug. |
|
|
22
|
+
| `--template` | string | Template package, local path, or `file://` URL. Default: `@nocobase/portal-template-default`. |
|
|
23
|
+
| `--env`, `-e` | string | CLI env name. If omitted, the current env is used. |
|
|
24
|
+
| `--yes`, `-y` | boolean | Skip cross-env confirmation. |
|
|
25
|
+
| `--title` | string | Portal display title. |
|
|
26
|
+
| `--force` | boolean | Delete the existing workspace and recreate it. |
|
|
27
|
+
| `--source-storage` | `nocobase` \| `git` | Where portal source code is managed. Default: `nocobase`. |
|
|
28
|
+
| `--git-repo` | string | Git repository URL used with `--source-storage=git`. |
|
|
29
|
+
| `--git-branch` | string | Git branch used with `--source-storage=git`. |
|
|
30
|
+
| `--git-path` | string | Directory inside the Git repository; defaults to the repository root (`.`). |
|
|
31
|
+
|
|
32
|
+
## Examples
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
nb portal create customer
|
|
36
|
+
nb portal create customer --template @nocobase/portal-template-default
|
|
37
|
+
nb portal create customer --env dev --yes
|
|
38
|
+
nb portal create customer --source-storage git --git-repo git@github.com:nocobase/customer-portal.git
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Notes
|
|
42
|
+
|
|
43
|
+
The command writes `.env`, `.env.local`, and `portal.config.json`. If the template contains `package.json`, it runs `pnpm install`. Portal names must use lowercase letters, numbers, underscores, or hyphens, and start with a lowercase letter or number.
|
|
44
|
+
|
|
45
|
+
## Related Commands
|
|
46
|
+
|
|
47
|
+
- [`nb portal`](./index.md)
|
|
48
|
+
- [`nb env`](../env/index.md)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "nb portal deploy"
|
|
3
|
+
description: "nb portal deploy command reference: build and deploy a portal."
|
|
4
|
+
keywords: "nb portal deploy,NocoBase CLI,Portal"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# nb portal deploy
|
|
8
|
+
|
|
9
|
+
Build and deploy the specified portal
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
nb portal deploy <portal> [flags]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Flag
|
|
18
|
+
|
|
19
|
+
| Flag | Type | Description |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| `<portal>` | string | Portal name or slug. |
|
|
22
|
+
| `--env`, `-e` | string | CLI env name. If omitted, the current env is used. |
|
|
23
|
+
| `--yes`, `-y` | boolean | Skip cross-env confirmation. |
|
|
24
|
+
|
|
25
|
+
## Examples
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
nb portal deploy customer
|
|
29
|
+
nb portal deploy customer --env dev --yes
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Notes
|
|
33
|
+
|
|
34
|
+
The command refreshes `.env` and `.env.local`, runs `pnpm build`, and expects `dist/index.html`. For `local` and `docker` envs, it syncs the portal record and uses the local or volume-mounted `dist`; for `http` envs, it uploads the packed `dist` through the API.
|
|
35
|
+
|
|
36
|
+
## Related Commands
|
|
37
|
+
|
|
38
|
+
- [`nb portal`](./index.md)
|
|
39
|
+
- [`nb env`](../env/index.md)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "nb portal destroy"
|
|
3
|
+
description: "nb portal destroy command reference: delete a portal record and its local workspace."
|
|
4
|
+
keywords: "nb portal destroy,NocoBase CLI,Portal"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# nb portal destroy
|
|
8
|
+
|
|
9
|
+
Delete the portal record and local workspace
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
nb portal destroy <portal> [flags]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Flag
|
|
18
|
+
|
|
19
|
+
| Flag | Type | Description |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| `<portal>` | string | Portal name or slug. |
|
|
22
|
+
| `--env`, `-e` | string | CLI env name. If omitted, the current env is used. |
|
|
23
|
+
| `--yes`, `-y` | boolean | Skip confirmation prompts. |
|
|
24
|
+
| `--force` | boolean | Ignore missing portal records or workspace directories. |
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
nb portal destroy customer --yes
|
|
30
|
+
nb portal destroy customer --env dev --yes
|
|
31
|
+
nb portal destroy customer --force --yes
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Notes
|
|
35
|
+
|
|
36
|
+
This command affects both the remote portal record and the local workspace. In non-interactive mode, pass `--yes`. Use `--force` to ignore missing records or local files.
|
|
37
|
+
|
|
38
|
+
## Related Commands
|
|
39
|
+
|
|
40
|
+
- [`nb portal`](./index.md)
|
|
41
|
+
- [`nb env`](../env/index.md)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "nb portal dev"
|
|
3
|
+
description: "nb portal dev command reference: start a portal in development mode."
|
|
4
|
+
keywords: "nb portal dev,NocoBase CLI,Portal"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# nb portal dev
|
|
8
|
+
|
|
9
|
+
Start development mode for the specified portal
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
nb portal dev <portal> [flags]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Flag
|
|
18
|
+
|
|
19
|
+
| Flag | Type | Description |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| `<portal>` | string | Portal name or slug. |
|
|
22
|
+
| `--env`, `-e` | string | CLI env name. If omitted, the current env is used. |
|
|
23
|
+
| `--yes`, `-y` | boolean | Skip cross-env confirmation. |
|
|
24
|
+
|
|
25
|
+
## Examples
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
nb portal dev customer
|
|
29
|
+
nb portal dev customer --env dev --yes
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Notes
|
|
33
|
+
|
|
34
|
+
The workspace must contain `package.json`. The command refreshes `.env` and `.env.local`, then runs `pnpm dev`. `ssh` envs are not supported in the current version.
|
|
35
|
+
|
|
36
|
+
## Related Commands
|
|
37
|
+
|
|
38
|
+
- [`nb portal`](./index.md)
|
|
39
|
+
- [`nb env`](../env/index.md)
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "nb portal"
|
|
3
|
+
description: "nb portal command reference: manage portals, including configuration, creation, development, source sync, deployment, and deletion."
|
|
4
|
+
keywords: "nb portal,NocoBase CLI,Portal,workspace,source storage,deploy"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# nb portal
|
|
8
|
+
|
|
9
|
+
`nb portal` manages portals. A portal can have its own frontend source, entry path, and deployment output; this command group connects the portal record in NocoBase with the local workspace and source storage.
|
|
10
|
+
|
|
11
|
+
A typical flow is to create a local workspace, start development mode, push source changes to source storage, and then build and deploy. If you are taking over an existing portal, pull it locally first.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
nb portal <command>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Subcommands
|
|
20
|
+
|
|
21
|
+
| Command | Description |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| [`nb portal config`](./config.md) | Update the local portal source configuration and sync it to the remote portal record when possible |
|
|
24
|
+
| [`nb portal create`](./create.md) | Create a local portal from a template and create or update the portal record |
|
|
25
|
+
| [`nb portal deploy`](./deploy.md) | Build and deploy the specified portal |
|
|
26
|
+
| [`nb portal destroy`](./destroy.md) | Delete the portal record and local workspace |
|
|
27
|
+
| [`nb portal dev`](./dev.md) | Start development mode for the specified portal |
|
|
28
|
+
| [`nb portal info`](./info.md) | Show details for the specified portal record and local workspace |
|
|
29
|
+
| [`nb portal list`](./list.md) | List portal records and local workspace sync status |
|
|
30
|
+
| [`nb portal pull`](./pull.md) | Pull portal source from source storage into the local workspace |
|
|
31
|
+
| [`nb portal push`](./push.md) | Push local portal source changes to source storage |
|
|
32
|
+
|
|
33
|
+
## Typical Flow
|
|
34
|
+
|
|
35
|
+
Create a portal named `customer`:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
nb portal create customer -e dev --yes
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Start local development mode:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
nb portal dev customer -e dev --yes
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Inspect the local workspace and remote record:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
nb portal info customer -e dev --yes
|
|
51
|
+
nb portal list -e dev --yes
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Push source and deploy:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
nb portal push customer -e dev --yes --message "Update customer portal"
|
|
58
|
+
nb portal deploy customer -e dev --yes
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Take over an existing portal:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
nb portal list -e dev --yes
|
|
65
|
+
nb portal pull customer -e dev --yes
|
|
66
|
+
nb portal dev customer -e dev --yes
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Switch source storage:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
nb portal config customer -e dev --yes --source-storage git --git-repo git@github.com:nocobase/customer-portal.git
|
|
73
|
+
nb portal push customer -e dev --yes --message "Move customer portal source to Git"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## source storage
|
|
77
|
+
|
|
78
|
+
When creating a portal, choose where the source code is managed:
|
|
79
|
+
|
|
80
|
+
| Mode | Description |
|
|
81
|
+
| --- | --- |
|
|
82
|
+
| `nocobase` | Default mode. Source code is managed by NocoBase source storage. |
|
|
83
|
+
| `git` | Source code is stored in a Git repository, configured with `--git-repo`, `--git-branch`, and `--git-path`. |
|
|
84
|
+
|
|
85
|
+
For quick creation and development, the default `nocobase` storage is usually enough. Use `git` when the portal source should be reviewed, versioned, or built through an existing team workflow.
|
|
86
|
+
|
|
87
|
+
Source configuration is written to `portal.config.json` in the local workspace. `create`, `pull`, and `config` maintain this file; `push` and `deploy` read it to sync source or deployment output.
|
|
88
|
+
|
|
89
|
+
## Env Types
|
|
90
|
+
|
|
91
|
+
`nb portal` currently supports `local`, `docker`, and `http` envs:
|
|
92
|
+
|
|
93
|
+
| Mode | Description |
|
|
94
|
+
| --- | --- |
|
|
95
|
+
| `local` | The workspace and app storage are on the current machine. With default `nocobase` storage, `pull`/`push` usually do not need extra sync. |
|
|
96
|
+
| `docker` | The workspace is shared with the app through a Docker volume. With default `nocobase` storage, `pull`/`push` usually do not need extra sync. |
|
|
97
|
+
| `http` | Source and deployment output are synced through APIs. `pull` downloads a source archive, and `push` uploads one. |
|
|
98
|
+
|
|
99
|
+
`ssh` envs do not support portal management in the current version.
|
|
100
|
+
|
|
101
|
+
## Local Workspace Path
|
|
102
|
+
|
|
103
|
+
Portals are stored under the selected env storage:
|
|
104
|
+
|
|
105
|
+
```text
|
|
106
|
+
<storagePath>/portals/<app>/<portal>
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
The main app access path is usually:
|
|
110
|
+
|
|
111
|
+
```text
|
|
112
|
+
<appPublicPath>/x/<portal>/
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
A sub-app access path is usually:
|
|
116
|
+
|
|
117
|
+
```text
|
|
118
|
+
<appPublicPath>/x/apps/<app>/<portal>/
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Env Confirmation
|
|
122
|
+
|
|
123
|
+
Most `nb portal` subcommands support `--env` and `--yes`:
|
|
124
|
+
|
|
125
|
+
| Flag | Description |
|
|
126
|
+
| --- | --- |
|
|
127
|
+
| `--env`, `-e` | CLI env name. If omitted, the current env is used. |
|
|
128
|
+
| `--yes`, `-y` | Skip cross-env confirmation when an explicit `--env` targets a different env from the current env. |
|
|
129
|
+
|
|
130
|
+
In scripts or AI agent workflows, pass `--env` and `--yes` explicitly to avoid stopping at an interactive confirmation.
|
|
131
|
+
|
|
132
|
+
## Related Commands
|
|
133
|
+
|
|
134
|
+
- [`nb env`](../env/index.md)
|
|
135
|
+
- [`nb app`](../app/index.md)
|
|
136
|
+
- [`nb source`](../source/index.md)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "nb portal info"
|
|
3
|
+
description: "nb portal info command reference: show portal record and local workspace details."
|
|
4
|
+
keywords: "nb portal info,NocoBase CLI,Portal"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# nb portal info
|
|
8
|
+
|
|
9
|
+
Show details for the specified portal record and local workspace
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
nb portal info <portal> [flags]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Flag
|
|
18
|
+
|
|
19
|
+
| Flag | Type | Description |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| `<portal>` | string | Portal name or slug. |
|
|
22
|
+
| `--env`, `-e` | string | CLI env name. If omitted, the current env is used. |
|
|
23
|
+
| `--yes`, `-y` | boolean | Skip cross-env confirmation. |
|
|
24
|
+
| `--json-output`, `-j` | boolean | Print portal details as JSON. |
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
nb portal info customer
|
|
30
|
+
nb portal info customer --env dev --yes
|
|
31
|
+
nb portal info customer --json-output
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Notes
|
|
35
|
+
|
|
36
|
+
Text output includes name, URL, portal type, local path, enabled status, and local sync status. `--json-output` prints `name`, `url`, `portalType`, `localPath`, `enabled`, `sourceStorage`, and `localSynced`. You can query by `routeName` or `uid`.
|
|
37
|
+
|
|
38
|
+
## Related Commands
|
|
39
|
+
|
|
40
|
+
- [`nb portal`](./index.md)
|
|
41
|
+
- [`nb env`](../env/index.md)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "nb portal list"
|
|
3
|
+
description: "nb portal list command reference: list portal records and local workspace sync status."
|
|
4
|
+
keywords: "nb portal list,NocoBase CLI,Portal"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# nb portal list
|
|
8
|
+
|
|
9
|
+
List portal records and local workspace sync status
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
nb portal list [flags]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Flag
|
|
18
|
+
|
|
19
|
+
| Flag | Type | Description |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| `--env`, `-e` | string | CLI env name. If omitted, the current env is used. |
|
|
22
|
+
| `--yes`, `-y` | boolean | Skip cross-env confirmation. |
|
|
23
|
+
| `--json-output`, `-j` | boolean | Print portal records as JSON. |
|
|
24
|
+
|
|
25
|
+
## Examples
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
nb portal list
|
|
29
|
+
nb portal list --env dev --yes
|
|
30
|
+
nb portal list --json-output
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Notes
|
|
34
|
+
|
|
35
|
+
The list shows name, URL, portal type, source storage, local path, enabled status, and local sync status. Only `ai` portals have local workspace sync checks; other portal types show an empty sync status.
|
|
36
|
+
|
|
37
|
+
## Related Commands
|
|
38
|
+
|
|
39
|
+
- [`nb portal`](./index.md)
|
|
40
|
+
- [`nb env`](../env/index.md)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "nb portal pull"
|
|
3
|
+
description: "nb portal pull command reference: pull portal source into the local workspace."
|
|
4
|
+
keywords: "nb portal pull,NocoBase CLI,Portal"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# nb portal pull
|
|
8
|
+
|
|
9
|
+
Pull portal source from source storage into the local workspace
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
nb portal pull <portal> [flags]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Flag
|
|
18
|
+
|
|
19
|
+
| Flag | Type | Description |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| `<portal>` | string | Portal name or slug. |
|
|
22
|
+
| `--env`, `-e` | string | CLI env name. If omitted, the current env is used. |
|
|
23
|
+
| `--yes`, `-y` | boolean | Skip cross-env confirmation. |
|
|
24
|
+
| `--force` | boolean | Delete the existing local workspace and pull it again. |
|
|
25
|
+
| `--install` / `--no-install` | boolean | Run `pnpm install` after pulling source. Enabled by default. |
|
|
26
|
+
|
|
27
|
+
## Examples
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
nb portal pull customer
|
|
31
|
+
nb portal pull customer --env prod --yes
|
|
32
|
+
nb portal pull customer --force
|
|
33
|
+
nb portal pull customer --no-install
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Notes
|
|
37
|
+
|
|
38
|
+
When the pulled workspace contains `package.json`, `pnpm install` runs by default. Use `--no-install` to skip it. Git source storage clones the configured repo and branch, then copies `--git-path`. With default `nocobase` storage, `local` and `docker` envs are usually no-op; `http` envs download a source archive through the API.
|
|
39
|
+
|
|
40
|
+
## Related Commands
|
|
41
|
+
|
|
42
|
+
- [`nb portal`](./index.md)
|
|
43
|
+
- [`nb env`](../env/index.md)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "nb portal push"
|
|
3
|
+
description: "nb portal push command reference: push local portal source changes to source storage."
|
|
4
|
+
keywords: "nb portal push,NocoBase CLI,Portal"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# nb portal push
|
|
8
|
+
|
|
9
|
+
Push local portal source changes to source storage
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
nb portal push <portal> [flags]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Flag
|
|
18
|
+
|
|
19
|
+
| Flag | Type | Description |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| `<portal>` | string | Portal name or slug. |
|
|
22
|
+
| `--env`, `-e` | string | CLI env name. If omitted, the current env is used. |
|
|
23
|
+
| `--yes`, `-y` | boolean | Skip cross-env confirmation. |
|
|
24
|
+
| `--message`, `-m` | string | Source update message; for Git-managed source, it is used as the Git commit message. |
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
nb portal push customer
|
|
30
|
+
nb portal push customer --env prod --yes
|
|
31
|
+
nb portal push customer --message "Update customer portal"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Notes
|
|
35
|
+
|
|
36
|
+
The command reads `portal.config.json` and syncs that configuration to the remote portal record first. Git source storage clones the configured repo, copies the local workspace into `--git-path`, commits, and pushes. With default `nocobase` storage, `local` and `docker` envs are usually no-op; `http` envs upload a source archive through the API.
|
|
37
|
+
|
|
38
|
+
## Related Commands
|
|
39
|
+
|
|
40
|
+
- [`nb portal`](./index.md)
|
|
41
|
+
- [`nb env`](../env/index.md)
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
pkg: '@nocobase/plugin-file-manager'
|
|
3
|
+
title: "Stable URL (proxy URL)"
|
|
4
|
+
description: "Explains NocoBase stable file URLs, access permissions, redirects, temporary Office preview URLs, and behavior across file-related features."
|
|
5
|
+
keywords: "stable URL,proxy URL,permanent URL,file access,file permissions,Office preview,NocoBase"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Stable URL
|
|
9
|
+
|
|
10
|
+
Files managed by a NocoBase storage engine are accessed through a **stable URL**. The URL first reaches NocoBase, where the file record and access permissions are checked, and then redirects to the actual URL generated by the storage engine.
|
|
11
|
+
|
|
12
|
+
## URL format
|
|
13
|
+
|
|
14
|
+
```text
|
|
15
|
+
/files/<app>/<dataSource>/<collection>/<id><extname>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
For example:
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
/files/main/main/attachments/42.pdf
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
When `APP_PUBLIC_PATH=/nocobase` is configured, the URL starts with `/nocobase/files/`. The path identifies the app, data source, file collection, record ID, and extension. The ID and extension cannot be changed after creation, which keeps the URL stable for the lifetime of the record.
|
|
25
|
+
|
|
26
|
+
## URL variants
|
|
27
|
+
|
|
28
|
+
| Purpose | URL | Behavior |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| Open or embed | `/files/.../42.pdf` | Checks permission and redirects to the actual file URL |
|
|
31
|
+
| Preview | `/files/.../42.png?preview=1` | Redirects to the preview or thumbnail URL |
|
|
32
|
+
| Download | `/files/.../42.pdf?download=1` | Redirects with download semantics |
|
|
33
|
+
| Office preview | `/files/.../42.xlsx?temporaryAccessToken=...` | Allows Microsoft Office Online Viewer to fetch one file for a short time |
|
|
34
|
+
|
|
35
|
+
:::tip
|
|
36
|
+
|
|
37
|
+
Use the `url` and `preview` values returned by NocoBase. Application code normally should not construct `/files` URLs or their query parameters.
|
|
38
|
+
|
|
39
|
+
:::
|
|
40
|
+
|
|
41
|
+
## Behavior across NocoBase
|
|
42
|
+
|
|
43
|
+
- Attachment fields and file collections return stable URLs after upload and when records are queried
|
|
44
|
+
- [HTTP API](./http-api.md) responses no longer expose local paths, storage domains, or presigned download URLs
|
|
45
|
+
- Markdown uploads store the stable URL, including files in private S3, OSS, COS, or S3 Pro storage
|
|
46
|
+
- Attachment URL fields store a stable URL for managed uploads, while manually entered external URLs remain unchanged
|
|
47
|
+
- Image, PDF, audio, video, and text previews use the stable URL and the current NocoBase login session
|
|
48
|
+
- Public forms grant limited access to files uploaded in the current public-form browser session; this does not create a generally public link
|
|
49
|
+
|
|
50
|
+
## Office preview
|
|
51
|
+
|
|
52
|
+
Microsoft Office Online Viewer fetches the file from Microsoft servers and cannot use the user's NocoBase cookie. When the user opens an Office preview, NocoBase first checks the user's file permission and then issues a temporary URL for that file.
|
|
53
|
+
|
|
54
|
+
The URL is valid for 10 minutes by default. `TEMPORARY_FILE_ACCESS_EXPIRES_IN` may be set from 5 to 10 minutes. It is requested again when the preview is reopened and must never be saved in an attachment field, Markdown content, or a business record.
|
|
55
|
+
|
|
56
|
+
## Permissions and redirects
|
|
57
|
+
|
|
58
|
+
Logged-in requests use the current app credentials and role. After permission is granted, NocoBase responds with `302` and redirects to the local or object-storage URL.
|
|
59
|
+
|
|
60
|
+
Stable URLs support `GET` and `HEAD`. Other methods return `405`. A command-line client must follow redirects, for example:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
curl -L \
|
|
64
|
+
-H "Authorization: Bearer <JWT>" \
|
|
65
|
+
"https://example.com/files/main/main/attachments/42.pdf"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Important notes
|
|
69
|
+
|
|
70
|
+
- Stable does not mean public; recipients still need permission to view the file
|
|
71
|
+
- Deleting the record or changing its app, data source, or collection context invalidates the old URL
|
|
72
|
+
- Do not persist `temporaryAccessToken` or use it as a sharing link
|
|
73
|
+
- Do not cache the `302 Location` as a permanent URL because storage signatures can expire
|
|
74
|
+
- Do not rewrite the app, data source, collection, ID, or extension in the path
|
|
75
|
+
- Reverse proxies must forward the `/files/` route under `APP_PUBLIC_PATH` to NocoBase. For subpath deployments, keep a compatible root-level `/files/` route as well. Configurations generated by the NocoBase CLI include both routes automatically
|
|
76
|
+
- Deployments where the pages access the API cross-origin (with `API_BASE_URL` pointing to another origin) must add the page origin to `CORS_ORIGIN_WHITELIST`; otherwise the login cookie is never stored and stable URLs return `403` for lack of credentials. See [Environment Variables](../get-started/installation/env.md#api_base_url)
|
|
77
|
+
- Use a different `hostname` for each independent NocoBase service instead of separating services only by port. Browser cookies are not isolated by port; see [Production Environment Deployment](../get-started/deployment/production.md)
|
|
78
|
+
- Sub-apps in the same NocoBase deployment are distinguished by app name and do not need separate hostnames. However, an independent service on another port still needs hostname isolation if it contains a main app or sub-app with the same name
|
|
79
|
+
- Custom `fetch()` code may also need object-storage CORS after following the redirect
|
|
80
|
+
- Use a dedicated sharing or public-access feature when a long-lived public link is required
|
|
81
|
+
|
|
82
|
+
## Related links
|
|
83
|
+
|
|
84
|
+
- [HTTP API](./http-api.md) — Upload and query files through the API
|
|
85
|
+
- [File preview](./file-preview/index.md) — Preview behavior for supported file types
|
|
86
|
+
- [Office file preview](./file-preview/ms-office.md) — Configure Microsoft Office Online Viewer
|
|
87
|
+
- [Storage engines](./storage/index.md) — Configure local and object storage
|