@_tc/template-core 0.1.15 → 0.2.0-bate.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/.skills/tc-component-usage-skills/SKILL.md +9 -2
- package/.skills/tc-component-usage-skills/reference/component-api.md +13 -4
- package/.skills/tc-component-usage-skills/reference/patterns.md +3 -3
- package/.skills/tc-component-usage-skills/reference/template-core-frontend.md +3 -1
- package/.skills/tc-generator/SKILL.md +1 -1
- package/.skills/tc-generator/reference/example.md +4 -0
- package/.skills/tc-generator/reference/project-template/config/config.default.js +4 -0
- package/.skills/tc-generator/reference/project-template/model/product/project/default.js +2 -0
- package/.skills/tc-generator/reference/runtime-extensions.md +110 -0
- package/AGENT_README.md +632 -0
- package/README.md +443 -37
- package/cjs/app/controller/project.js +1 -1
- package/cjs/app/controller/view.js +1 -1
- package/cjs/app/extend/crypto.js +1 -0
- package/cjs/app/extend/render-view.js +1 -1
- package/cjs/app/middleware.js +1 -1
- package/cjs/app/middlewares/api-params-verify.js +1 -0
- package/cjs/app/middlewares/api-sign-verify.js +1 -0
- package/cjs/app/{middleware → middlewares}/error-handle.js +1 -1
- package/cjs/app/middlewares/project-handler.js +1 -0
- package/cjs/app/middlewares/request-parameter-parsing.js +1 -0
- package/cjs/app/router/project.js +1 -1
- package/cjs/app/view/entry.tpl +19 -0
- package/cjs/bundler/buildBE.js +1 -0
- package/cjs/bundler/defaultRouteGuard.js +1 -0
- package/cjs/bundler/index.js +1 -1
- package/cjs/bundler/utils.js +3 -1
- package/cjs/config/config.default.js +1 -1
- package/cjs/packages/core/env.js +1 -1
- package/cjs/packages/core/index.js +1 -1
- package/cjs/packages/core/loader/middleware.js +1 -1
- package/cjs/packages/core/loader/router.js +1 -1
- package/cjs/scripts/vite-build/build.js +3 -0
- package/cjs/scripts/vite-build/collect.js +1 -0
- package/cjs/scripts/vite-build/constants.js +1 -0
- package/cjs/scripts/vite-build/dts.js +1 -0
- package/cjs/scripts/vite-build/index.js +1 -0
- package/cjs/scripts/vite-build/normalize.js +1 -0
- package/cjs/scripts/vite-build/plugins.js +1 -0
- package/cjs/scripts/vite-build/resolve.js +1 -0
- package/cjs/scripts/vite-build/types.js +0 -0
- package/cjs/scripts/vite-build/utils.js +1 -0
- package/esm/app/controller/project.js +7 -2
- package/esm/app/controller/view.js +21 -18
- package/esm/app/extend/crypto.js +31 -0
- package/esm/app/extend/render-view.js +5 -3
- package/esm/app/middleware.js +7 -2
- package/esm/app/{middleware → middlewares}/api-params-verify.js +2 -2
- package/esm/app/{middleware → middlewares}/api-sign-verify.js +2 -2
- package/esm/app/{middleware → middlewares}/error-handle.js +2 -2
- package/esm/app/middlewares/project-handler.js +15 -0
- package/esm/app/middlewares/request-parameter-parsing.js +18 -0
- package/esm/app/router/project.js +2 -2
- package/esm/app/view/entry.tpl +19 -0
- package/esm/bundler/buildBE.js +54 -0
- package/esm/bundler/defaultRouteGuard.js +4 -0
- package/esm/bundler/index.js +11 -14
- package/esm/bundler/utils.js +103 -60
- package/esm/config/config.default.js +4 -0
- package/esm/packages/core/env.js +1 -1
- package/esm/packages/core/index.js +37 -33
- package/esm/packages/core/loader/middleware.js +1 -1
- package/esm/packages/core/loader/router.js +5 -2
- package/esm/scripts/vite-build/build.js +141 -0
- package/esm/scripts/vite-build/collect.js +79 -0
- package/esm/scripts/vite-build/constants.js +34 -0
- package/esm/scripts/vite-build/dts.js +132 -0
- package/esm/scripts/vite-build/index.js +3 -0
- package/esm/scripts/vite-build/normalize.js +78 -0
- package/esm/scripts/vite-build/plugins.js +106 -0
- package/esm/scripts/vite-build/resolve.js +46 -0
- package/esm/scripts/vite-build/types.js +0 -0
- package/esm/scripts/vite-build/utils.js +24 -0
- package/fe/frontend/apps/dash/Dashboard.d.ts +0 -1
- package/fe/frontend/apps/dash/Dashboard.js +178 -169
- package/fe/frontend/apps/dash/dash.entry.d.ts +0 -1
- package/fe/frontend/apps/dash/dash.entry.js +58 -78
- package/fe/frontend/apps/dash/types.d.ts +16 -14
- package/fe/frontend/apps/dash/types.js +0 -1
- package/fe/frontend/apps/ui-components/index.d.ts +0 -1
- package/fe/frontend/apps/ui-components/index.js +7 -7
- package/fe/frontend/apps/ui-components/ui-components.entry.d.ts +0 -1
- package/fe/frontend/apps/ui-components/ui-components.entry.js +7 -5
- package/fe/frontend/extended/SchemaForm/data.d.ts +1 -5
- package/fe/frontend/extended/SchemaForm/data.js +7 -7
- package/fe/frontend/src/api/baseInfo.d.ts +1 -2
- package/fe/frontend/src/api/baseInfo.js +12 -13
- package/fe/frontend/src/common/CRUD/CRUD.d.ts +2 -3
- package/fe/frontend/src/common/CRUD/CRUD.js +2 -2
- package/fe/frontend/src/common/CRUD/index.d.ts +1 -2
- package/fe/frontend/src/common/CRUD/index.js +2 -1
- package/fe/frontend/src/common/auth/index.d.ts +6 -2
- package/fe/frontend/src/common/auth/index.js +23 -16
- package/fe/frontend/src/common/fetchErrorShow.d.ts +1 -2
- package/fe/frontend/src/common/fetchErrorShow.js +10 -8
- package/fe/frontend/src/common/generateMenuData.d.ts +2 -3
- package/fe/frontend/src/common/generateMenuData.js +15 -12
- package/fe/frontend/src/common/importComponent.d.ts +1 -2
- package/fe/frontend/src/common/importComponent.js +21 -9
- package/fe/frontend/src/common/language.d.ts +1 -2
- package/fe/frontend/src/common/language.js +11 -10
- package/fe/frontend/src/common/logFn/index.d.ts +0 -1
- package/fe/frontend/src/common/logFn/index.js +11 -8
- package/fe/frontend/src/common/menu.d.ts +1 -14
- package/fe/frontend/src/common/menu.js +94 -98
- package/fe/frontend/src/common/request.d.ts +2 -6
- package/fe/frontend/src/common/request.js +159 -195
- package/fe/frontend/src/components/AsyncSelect/AsyncSelect.d.ts +3 -4
- package/fe/frontend/src/components/AsyncSelect/AsyncSelect.js +35 -31
- package/fe/frontend/src/components/AsyncSelect/index.d.ts +2 -3
- package/fe/frontend/src/components/AsyncSelect/index.js +5 -3
- package/fe/frontend/src/components/BasePage/HeaderView.d.ts +1 -2
- package/fe/frontend/src/components/BasePage/HeaderView.js +53 -17
- package/fe/frontend/src/components/LanguageSwitch/LanguageSwitch.d.ts +14 -5
- package/fe/frontend/src/components/LanguageSwitch/LanguageSwitch.js +80 -31
- package/fe/frontend/src/components/LanguageSwitch/index.d.ts +2 -3
- package/fe/frontend/src/components/LanguageSwitch/index.js +5 -3
- package/fe/frontend/src/components/Router/index.d.ts +2 -3
- package/fe/frontend/src/components/Router/index.js +20 -10
- package/fe/frontend/src/components/Router/type.d.ts +0 -1
- package/fe/frontend/src/components/Router/type.js +0 -1
- package/fe/frontend/src/components/ThemeSwitch/ThemeSwitch.d.ts +0 -1
- package/fe/frontend/src/components/ThemeSwitch/ThemeSwitch.js +83 -55
- package/fe/frontend/src/components/ThemeSwitch/index.d.ts +2 -3
- package/fe/frontend/src/components/ThemeSwitch/index.js +5 -3
- package/fe/frontend/src/components/index.d.ts +10 -11
- package/fe/frontend/src/components/index.js +7 -10
- package/fe/frontend/src/defaultPages/Iframe/index.d.ts +0 -1
- package/fe/frontend/src/defaultPages/Iframe/index.js +14 -7
- package/fe/frontend/src/defaultPages/NotFoundPage/index.d.ts +0 -1
- package/fe/frontend/src/defaultPages/NotFoundPage/index.js +27 -6
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/DetailPanel.d.ts +1 -2
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/DetailPanel.js +97 -90
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/PopFrom.d.ts +1 -2
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/PopFrom.js +116 -127
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/builtIn.d.ts +2 -18
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/builtIn.js +9 -6
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/data.d.ts +1 -2
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/data.js +8 -5
- package/fe/frontend/src/defaultPages/SchemaPage/components/SchemaSearch/index.d.ts +0 -1
- package/fe/frontend/src/defaultPages/SchemaPage/components/SchemaSearch/index.js +60 -61
- package/fe/frontend/src/defaultPages/SchemaPage/components/SchemaTable/index.d.ts +2 -3
- package/fe/frontend/src/defaultPages/SchemaPage/components/SchemaTable/index.js +199 -186
- package/fe/frontend/src/defaultPages/SchemaPage/data/eventInfo.d.ts +0 -1
- package/fe/frontend/src/defaultPages/SchemaPage/data/eventInfo.js +8 -5
- package/fe/frontend/src/defaultPages/SchemaPage/data/index.d.ts +0 -1
- package/fe/frontend/src/defaultPages/SchemaPage/data/index.js +4 -1
- package/fe/frontend/src/defaultPages/SchemaPage/hooks/useComConfig.d.ts +1 -2
- package/fe/frontend/src/defaultPages/SchemaPage/hooks/useComConfig.js +16 -13
- package/fe/frontend/src/defaultPages/SchemaPage/index.css +1 -26
- package/fe/frontend/src/defaultPages/SchemaPage/index.d.ts +1 -2
- package/fe/frontend/src/defaultPages/SchemaPage/index.js +89 -76
- package/fe/frontend/src/defaultPages/SchemaPage/schemaType.d.ts +4 -14
- package/fe/frontend/src/defaultPages/SchemaPage/schemaType.js +7 -4
- package/fe/frontend/src/defaultPages/SchemaPage/utils/permissions.d.ts +0 -1
- package/fe/frontend/src/defaultPages/SchemaPage/utils/permissions.js +6 -3
- package/fe/frontend/src/defaultPages/SchemaPage/utils/schemaConversion.d.ts +1 -2
- package/fe/frontend/src/defaultPages/SchemaPage/utils/schemaConversion.js +63 -112
- package/fe/frontend/src/defaultPages/SchemaPage/utils/validator.d.ts +1 -5
- package/fe/frontend/src/defaultPages/SchemaPage/utils/validator.js +116 -165
- package/fe/frontend/src/defaultPages/SidebarSlotPage/SidebarSlotContainer.d.ts +2 -3
- package/fe/frontend/src/defaultPages/SidebarSlotPage/SidebarSlotContainer.js +54 -37
- package/fe/frontend/src/defaultPages/SidebarSlotPage/index.d.ts +0 -1
- package/fe/frontend/src/defaultPages/SidebarSlotPage/index.js +20 -16
- package/fe/frontend/src/defaultPages/SidebarSlotPageTmp.d.ts +0 -1
- package/fe/frontend/src/defaultPages/SidebarSlotPageTmp.js +20 -16
- package/fe/frontend/src/defaultPages/SlotPage/index.d.ts +0 -1
- package/fe/frontend/src/defaultPages/SlotPage/index.js +21 -26
- package/fe/frontend/src/exportStore.d.ts +4 -17
- package/fe/frontend/src/exportStore.js +5 -16
- package/fe/frontend/src/hooks/useCurrentMenuData.d.ts +1 -10
- package/fe/frontend/src/hooks/useCurrentMenuData.js +28 -26
- package/fe/frontend/src/hooks/useRouterParams.d.ts +0 -1
- package/fe/frontend/src/hooks/useRouterParams.js +15 -10
- package/fe/frontend/src/index.d.ts +13 -21
- package/fe/frontend/src/index.js +20 -18
- package/fe/frontend/src/language/en-US.d.ts +0 -1
- package/fe/frontend/src/language/en-US.js +89 -88
- package/fe/frontend/src/language/index.d.ts +1 -2
- package/fe/frontend/src/language/index.js +77 -74
- package/fe/frontend/src/language/zh-CN.d.ts +0 -1
- package/fe/frontend/src/language/zh-CN.js +89 -88
- package/fe/frontend/src/main.css +1 -1
- package/fe/frontend/src/main.d.ts +13 -20
- package/fe/frontend/src/main.js +75 -70
- package/fe/frontend/src/stores/apiFreezer.d.ts +1 -68
- package/fe/frontend/src/stores/apiFreezer.js +50 -46
- package/fe/frontend/src/stores/mode.d.ts +2 -6
- package/fe/frontend/src/stores/mode.js +35 -36
- package/fe/frontend/src/stores/schemaEventBus.d.ts +1 -21
- package/fe/frontend/src/stores/schemaEventBus.js +52 -69
- package/fe/frontend/src/stores/schemaStore.d.ts +5 -20
- package/fe/frontend/src/stores/schemaStore.js +27 -25
- package/fe/frontend/src/typing/scalability.d.ts +3 -35
- package/fe/frontend/src/typing/scalability.js +0 -1
- package/fe/frontend/src/typing/window.d.ts +0 -1
- package/fe/frontend/src/typing/window.js +0 -1
- package/fe/model/types/data/button.d.ts +2 -12
- package/fe/model/types/data/component.d.ts +4 -14
- package/fe/model/types/data/fetchInfo.d.ts +0 -13
- package/fe/model/types/data/schema.d.ts +6 -58
- package/fe/model/types/data/search.d.ts +1 -2
- package/{model → fe/model}/types/index.d.ts +2 -3
- package/fe/model/types/menuType.d.ts +0 -30
- package/fe/model/types/model.d.ts +1 -15
- package/fe/packages/common/LRUCache.d.ts +1 -0
- package/fe/packages/common/array/index.d.ts +0 -1
- package/fe/packages/common/cache/LRUCache.d.ts +0 -1
- package/fe/packages/common/cache/LRUCache.js +43 -47
- package/fe/packages/common/cache/index.d.ts +0 -1
- package/fe/packages/common/guards/index.d.ts +0 -1
- package/fe/packages/common/guards/index.js +8 -24
- package/fe/packages/common/http/index.d.ts +0 -1
- package/fe/packages/common/http/index.js +272 -282
- package/fe/packages/common/i18n/default.d.ts +0 -6
- package/fe/packages/common/i18n/default.js +91 -88
- package/fe/packages/common/i18n/en-US.d.ts +0 -6
- package/fe/packages/common/i18n/en-US.js +91 -88
- package/fe/packages/common/i18n/index.d.ts +3 -28
- package/fe/packages/common/i18n/index.js +142 -153
- package/fe/packages/common/i18n/locales.d.ts +3 -4
- package/fe/packages/common/i18n/locales.js +10 -9
- package/fe/packages/common/i18n/types.d.ts +0 -25
- package/fe/packages/common/index.d.ts +0 -1
- package/fe/packages/common/log/index.d.ts +0 -1
- package/fe/packages/common/number/index.d.ts +0 -1
- package/fe/packages/common/object/filterEmpty.d.ts +0 -1
- package/fe/packages/common/object/filterEmpty.js +25 -30
- package/fe/packages/common/object/filtereEmpty.d.ts +1 -0
- package/fe/packages/common/object/index.d.ts +0 -1
- package/fe/packages/common/string/index.d.ts +0 -1
- package/fe/packages/common/types/index.d.ts +0 -1
- package/fe/packages/{ui/react → react}/hooks/useBreadcrumb.d.ts +3 -4
- package/fe/packages/react/hooks/useBreadcrumb.js +5 -0
- package/fe/packages/react/hooks/useExecuteOnce.d.ts +11 -0
- package/fe/packages/react/hooks/useExecuteOnce.js +47 -0
- package/fe/packages/{ui/react → react}/hooks/useInit.d.ts +0 -1
- package/fe/packages/react/hooks/useInit.js +11 -0
- package/fe/packages/react/hooks/useLanguage.d.ts +1 -0
- package/fe/packages/react/hooks/useLanguage.js +8 -0
- package/fe/packages/{ui/react → react}/hooks/usePagination.d.ts +0 -1
- package/fe/packages/react/hooks/usePagination.js +30 -0
- package/fe/packages/{ui/react → react}/hooks/useRefState.d.ts +1 -14
- package/fe/packages/react/hooks/useRefState.js +35 -0
- package/fe/packages/{ui/react → react}/hooks/useWatch.d.ts +0 -9
- package/fe/packages/react/hooks/useWatch.js +60 -0
- package/fe/packages/react/hooks/useWatch.test.js +24 -0
- package/fe/packages/react/ui/assets/table/no-result.js +4 -0
- package/fe/packages/{ui/react → react/ui}/components/Button/Button.d.ts +1 -35
- package/fe/packages/react/ui/components/Button/Button.js +88 -0
- package/fe/packages/{ui/react → react/ui}/components/Button/SubmitButton.d.ts +2 -7
- package/fe/packages/react/ui/components/Button/SubmitButton.js +30 -0
- package/fe/packages/react/ui/components/Button/index.d.ts +3 -0
- package/fe/packages/react/ui/components/Button/index.js +3 -0
- package/fe/packages/{ui/react → react/ui}/components/Card/Card.d.ts +2 -2
- package/fe/packages/react/ui/components/Card/Card.js +31 -0
- package/fe/packages/react/ui/components/Card/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Card/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Checkbox/Checkbox.d.ts +1 -2
- package/fe/packages/react/ui/components/Checkbox/Checkbox.js +52 -0
- package/fe/packages/react/ui/components/Checkbox/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Checkbox/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/ConfirmDialog/ConfirmDialog.d.ts +0 -9
- package/fe/packages/react/ui/components/ConfirmDialog/ConfirmDialog.js +41 -0
- package/fe/packages/react/ui/components/ConfirmDialog/index.d.ts +1 -0
- package/fe/packages/react/ui/components/ConfirmDialog/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/DataTable/ActionBtn.d.ts +1 -2
- package/fe/packages/react/ui/components/DataTable/ActionBtn.js +116 -0
- package/fe/packages/{ui/react → react/ui}/components/DataTable/index.d.ts +8 -28
- package/fe/packages/react/ui/components/DataTable/index.js +235 -0
- package/fe/packages/{ui/react → react/ui}/components/Date/Calendar.d.ts +2 -16
- package/fe/packages/react/ui/components/Date/Calendar.js +351 -0
- package/fe/packages/{ui/react → react/ui}/components/Date/Date.d.ts +0 -12
- package/fe/packages/react/ui/components/Date/Date.js +210 -0
- package/fe/packages/{ui/react → react/ui}/components/Date/DateTestPage.d.ts +0 -1
- package/fe/packages/react/ui/components/Date/DateTestPage.js +340 -0
- package/fe/packages/react/ui/components/Date/LocaleContext.d.ts +1 -0
- package/fe/packages/react/ui/components/Date/LocaleContext.js +11 -0
- package/fe/packages/react/ui/components/Date/LocaleProvider.d.ts +7 -0
- package/fe/packages/react/ui/components/Date/LocaleProvider.js +31 -0
- package/fe/packages/{ui/react → react/ui}/components/Date/TimePicker.d.ts +0 -1
- package/fe/packages/react/ui/components/Date/TimePicker.js +136 -0
- package/fe/packages/{ui/react → react/ui}/components/Date/data.d.ts +0 -1
- package/fe/packages/react/ui/components/Date/data.js +7 -0
- package/fe/packages/{ui/react → react/ui}/components/Date/dateLocaleStore.d.ts +1 -8
- package/fe/packages/react/ui/components/Date/dateLocaleStore.js +14 -0
- package/fe/packages/react/ui/components/Date/dropdownPositioning.d.ts +2 -0
- package/fe/packages/react/ui/components/Date/dropdownPositioning.js +12 -0
- package/fe/packages/react/ui/components/Date/index.d.ts +5 -0
- package/fe/packages/react/ui/components/Date/index.js +6 -0
- package/fe/packages/{ui/react → react/ui}/components/Date/locales.d.ts +0 -20
- package/fe/packages/react/ui/components/Date/locales.js +25 -0
- package/fe/packages/{ui/react → react/ui}/components/Drawer/Drawer.d.ts +1 -8
- package/fe/packages/react/ui/components/Drawer/Drawer.js +151 -0
- package/fe/packages/react/ui/components/Drawer/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Drawer/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Dropdown/Dropdown.d.ts +2 -4
- package/fe/packages/react/ui/components/Dropdown/Dropdown.js +105 -0
- package/fe/packages/react/ui/components/Dropdown/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Dropdown/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Form/Form.d.ts +2 -9
- package/fe/packages/react/ui/components/Form/Form.js +15 -0
- package/fe/packages/{ui/react → react/ui}/components/Form/FormItem.d.ts +3 -25
- package/fe/packages/react/ui/components/Form/FormItem.js +60 -0
- package/fe/packages/{ui/react → react/ui}/components/Form/SchemaForm/data.d.ts +8 -9
- package/fe/packages/react/ui/components/Form/SchemaForm/data.js +16 -0
- package/fe/packages/react/ui/components/Form/SchemaForm/defaultComponentsMap.d.ts +3 -0
- package/fe/packages/react/ui/components/Form/SchemaForm/defaultComponentsMap.js +4 -0
- package/fe/packages/{ui/react → react/ui}/components/Form/SchemaForm/index.d.ts +9 -103
- package/fe/packages/react/ui/components/Form/SchemaForm/index.js +119 -0
- package/fe/packages/react/ui/components/Form/index.d.ts +4 -0
- package/fe/packages/react/ui/components/Form/index.js +5 -0
- package/fe/packages/react/ui/components/Form/useForm.d.ts +2 -0
- package/fe/packages/react/ui/components/Form/useForm.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/ImagePreview/ImagePreview.d.ts +0 -1
- package/fe/packages/react/ui/components/ImagePreview/ImagePreview.js +307 -0
- package/fe/packages/{ui/react → react/ui}/components/ImagePreview/PreviewImage.d.ts +2 -6
- package/fe/packages/react/ui/components/ImagePreview/PreviewImage.js +56 -0
- package/fe/packages/react/ui/components/ImagePreview/index.d.ts +2 -0
- package/fe/packages/react/ui/components/ImagePreview/index.js +3 -0
- package/fe/packages/{ui/react → react/ui}/components/Input/Input.d.ts +1 -24
- package/fe/packages/react/ui/components/Input/Input.js +142 -0
- package/fe/packages/react/ui/components/Input/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Input/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/InputNumber/InputNumber.d.ts +2 -5
- package/fe/packages/react/ui/components/InputNumber/InputNumber.js +207 -0
- package/fe/packages/react/ui/components/InputNumber/index.d.ts +1 -0
- package/fe/packages/react/ui/components/InputNumber/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/InputNumber/inputNumberUtils.d.ts +0 -1
- package/fe/packages/react/ui/components/InputNumber/inputNumberUtils.js +45 -0
- package/fe/packages/react/ui/components/InputNumber/inputNumberUtils.test.js +59 -0
- package/fe/packages/{ui/react → react/ui}/components/Label/Label.d.ts +1 -31
- package/fe/packages/react/ui/components/Label/Label.js +58 -0
- package/fe/packages/react/ui/components/Label/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Label/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Layout/Layout.d.ts +1 -2
- package/fe/packages/react/ui/components/Layout/Layout.js +33 -0
- package/fe/packages/react/ui/components/Layout/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Layout/index.js +2 -0
- package/fe/packages/react/ui/components/Loading/Loading.d.ts +13 -0
- package/fe/packages/react/ui/components/Loading/Loading.js +48 -0
- package/fe/packages/react/ui/components/Loading/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Loading/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Menu/Menu.d.ts +0 -1
- package/fe/packages/react/ui/components/Menu/Menu.js +147 -0
- package/fe/packages/{ui/react → react/ui}/components/Menu/MenuContext.d.ts +0 -1
- package/fe/packages/react/ui/components/Menu/MenuContext.js +88 -0
- package/fe/packages/{ui/react → react/ui}/components/Menu/MenuItem.d.ts +0 -1
- package/fe/packages/react/ui/components/Menu/MenuItem.js +78 -0
- package/fe/packages/react/ui/components/Menu/SubMenu.d.ts +2 -0
- package/fe/packages/react/ui/components/Menu/SubMenu.js +207 -0
- package/fe/packages/react/ui/components/Menu/index.d.ts +8 -0
- package/fe/packages/react/ui/components/Menu/index.js +5 -0
- package/fe/packages/{ui/react → react/ui}/components/Menu/menuTypes.d.ts +1 -3
- package/fe/packages/react/ui/components/Menu/menuTypes.js +0 -0
- package/fe/packages/{ui/react → react/ui}/components/Menu/utils.d.ts +0 -1
- package/fe/packages/react/ui/components/Menu/utils.js +8 -0
- package/fe/packages/{ui/react → react/ui}/components/Message/Message.d.ts +1 -9
- package/fe/packages/react/ui/components/Message/Message.js +76 -0
- package/fe/packages/{ui/react → react/ui}/components/Message/MessageManager.d.ts +2 -3
- package/fe/packages/react/ui/components/Message/MessageManager.js +104 -0
- package/fe/packages/{ui/react → react/ui}/components/Message/data.d.ts +0 -1
- package/fe/packages/react/ui/components/Message/data.js +4 -0
- package/fe/packages/react/ui/components/Message/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Message/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Modal/Modal.d.ts +1 -8
- package/fe/packages/react/ui/components/Modal/Modal.js +59 -0
- package/fe/packages/{ui/react → react/ui}/components/Modal/ModalManager.d.ts +3 -16
- package/fe/packages/react/ui/components/Modal/ModalManager.js +106 -0
- package/fe/packages/react/ui/components/Modal/index.d.ts +3 -0
- package/fe/packages/react/ui/components/Modal/index.js +3 -0
- package/fe/packages/{ui/react → react/ui}/components/Notification/Notification.d.ts +1 -2
- package/fe/packages/react/ui/components/Notification/Notification.js +56 -0
- package/fe/packages/react/ui/components/Notification/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Notification/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Overlay/Overlay.d.ts +1 -5
- package/fe/packages/react/ui/components/Overlay/Overlay.js +61 -0
- package/fe/packages/react/ui/components/Overlay/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Overlay/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Pagination/Pagination.d.ts +0 -8
- package/fe/packages/react/ui/components/Pagination/Pagination.js +115 -0
- package/fe/packages/react/ui/components/Pagination/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Pagination/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Popup/Popup.d.ts +0 -1
- package/fe/packages/react/ui/components/Popup/Popup.js +86 -0
- package/fe/packages/react/ui/components/Popup/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Popup/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Radio/Radio.d.ts +1 -2
- package/fe/packages/react/ui/components/Radio/Radio.js +36 -0
- package/fe/packages/{ui/react → react/ui}/components/Radio/RadioGroup.d.ts +1 -2
- package/fe/packages/react/ui/components/Radio/RadioGroup.js +33 -0
- package/fe/packages/react/ui/components/Radio/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Radio/index.js +3 -0
- package/fe/packages/{ui/react → react/ui}/components/Search/Search.d.ts +4 -8
- package/fe/packages/react/ui/components/Search/Search.js +24 -0
- package/fe/packages/react/ui/components/Search/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Search/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Select/Select.d.ts +2 -7
- package/fe/packages/react/ui/components/Select/Select.js +282 -0
- package/fe/packages/react/ui/components/Select/dropdownPositioning.d.ts +2 -0
- package/fe/packages/react/ui/components/Select/dropdownPositioning.js +16 -0
- package/fe/packages/react/ui/components/Select/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Select/index.js +2 -0
- package/fe/packages/react/ui/components/Skeleton/Skeleton.d.ts +12 -0
- package/fe/packages/react/ui/components/Skeleton/Skeleton.js +101 -0
- package/fe/packages/react/ui/components/Skeleton/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Skeleton/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Switch/Switch.d.ts +1 -2
- package/fe/packages/react/ui/components/Switch/Switch.js +28 -0
- package/fe/packages/react/ui/components/Switch/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Switch/index.js +2 -0
- package/fe/packages/react/ui/components/TableSearch/TableSearch.d.ts +30 -0
- package/fe/packages/react/ui/components/TableSearch/TableSearch.js +146 -0
- package/fe/packages/react/ui/components/TableSearch/index.d.ts +2 -0
- package/fe/packages/react/ui/components/TableSearch/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/TableSearch/lang.d.ts +0 -1
- package/fe/packages/react/ui/components/TableSearch/lang.js +14 -0
- package/fe/packages/{ui/react → react/ui}/components/TableSearch/tableSearchLocaleStore.d.ts +1 -2
- package/fe/packages/react/ui/components/TableSearch/tableSearchLocaleStore.js +10 -0
- package/fe/packages/{ui/react → react/ui}/components/Tabs/Tabs.d.ts +1 -2
- package/fe/packages/react/ui/components/Tabs/Tabs.js +33 -0
- package/fe/packages/react/ui/components/Tabs/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Tabs/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Textarea/Textarea.d.ts +0 -47
- package/fe/packages/react/ui/components/Textarea/Textarea.js +58 -0
- package/fe/packages/react/ui/components/Textarea/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Textarea/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Tooltip/Tooltip.d.ts +0 -17
- package/fe/packages/react/ui/components/Tooltip/Tooltip.js +77 -0
- package/fe/packages/react/ui/components/Tooltip/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Tooltip/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/TreeSelect/TreeSelect.d.ts +0 -7
- package/fe/packages/react/ui/components/TreeSelect/TreeSelect.js +190 -0
- package/fe/packages/react/ui/components/TreeSelect/index.d.ts +1 -0
- package/fe/packages/react/ui/components/TreeSelect/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Upload/ImageUpload.d.ts +0 -1
- package/fe/packages/react/ui/components/Upload/ImageUpload.js +101 -0
- package/fe/packages/react/ui/components/Upload/Upload.d.ts +13 -0
- package/fe/packages/react/ui/components/Upload/Upload.js +29 -0
- package/fe/packages/react/ui/components/Upload/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Upload/index.js +3 -0
- package/fe/packages/{ui/react → react/ui}/components/breadcrumb/breadcrumb.d.ts +0 -1
- package/fe/packages/react/ui/components/breadcrumb/breadcrumb.js +155 -0
- package/fe/packages/react/ui/components/breadcrumb/index.d.ts +1 -0
- package/fe/packages/react/ui/components/breadcrumb/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/hooks/useDropdownPositioning.d.ts +0 -7
- package/fe/packages/react/ui/components/hooks/useDropdownPositioning.js +121 -0
- package/fe/packages/{ui/react → react/ui}/components/hooks/useInputController.d.ts +0 -4
- package/fe/packages/react/ui/components/hooks/useInputController.js +39 -0
- package/fe/packages/react/ui/components/index.d.ts +35 -0
- package/fe/packages/react/ui/components/index.js +81 -0
- package/fe/packages/react/ui/components/table/index.d.ts +1 -0
- package/fe/packages/react/ui/components/table/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/table/table.d.ts +1 -2
- package/fe/packages/react/ui/components/table/table.js +166 -0
- package/fe/packages/{ui/react → react/ui}/components/testPage/MenuTestPage.d.ts +0 -1
- package/fe/packages/react/ui/components/testPage/MenuTestPage.js +397 -0
- package/fe/packages/{ui/react → react/ui}/components/testPage/index.d.ts +0 -1
- package/fe/packages/react/ui/components/testPage/index.js +1638 -0
- package/fe/packages/react/ui/i18n/I18nProvider.d.ts +12 -0
- package/fe/packages/react/ui/i18n/I18nProvider.js +38 -0
- package/fe/packages/react/ui/i18n/index.d.ts +3 -0
- package/fe/packages/react/ui/i18n/index.js +7 -0
- package/fe/packages/react/ui/i18n/useI18n.d.ts +8 -0
- package/fe/packages/react/ui/i18n/useI18n.js +25 -0
- package/fe/packages/{ui/react → react/ui}/index.css +66 -9
- package/fe/packages/react/ui/index.d.ts +4 -0
- package/fe/packages/react/ui/index.js +58 -0
- package/fe/packages/{ui/react → react/ui}/lib/createStoreHook.d.ts +1 -2
- package/fe/packages/react/ui/lib/createStoreHook.js +9 -0
- package/fe/packages/react/ui/lib/export.d.ts +21 -0
- package/fe/packages/react/ui/lib/export.js +112 -0
- package/fe/packages/react/ui/lib/utils.d.ts +9 -0
- package/fe/packages/react/ui/lib/utils.js +64 -0
- package/fe/packages/{ui/react → react/ui}/stores/breadcrumb.d.ts +1 -2
- package/fe/packages/react/ui/stores/breadcrumb.js +52 -0
- package/fe/packages/react/ui/stores/language.d.ts +3 -0
- package/fe/packages/react/ui/stores/language.js +4 -0
- package/fe/packages/{ui/react → react/ui}/types/index.d.ts +0 -1
- package/fe/packages/react/ui/types/index.js +0 -0
- package/fe/typings/type.d.ts +0 -1
- package/model/frontend/extended/SchemaForm/data.d.ts +9 -0
- package/model/frontend/src/common/auth/index.d.ts +11 -0
- package/model/frontend/src/common/fetchErrorShow.d.ts +2 -0
- package/model/frontend/src/common/language.d.ts +2 -0
- package/model/frontend/src/common/logFn/index.d.ts +4 -0
- package/model/frontend/src/common/request.d.ts +33 -0
- package/model/frontend/src/components/AsyncSelect/AsyncSelect.d.ts +7 -0
- package/model/frontend/src/components/AsyncSelect/index.d.ts +3 -0
- package/model/frontend/src/defaultPages/SchemaPage/components/CallCom/DetailPanel.d.ts +6 -0
- package/model/frontend/src/defaultPages/SchemaPage/components/CallCom/PopFrom.d.ts +12 -0
- package/model/frontend/src/defaultPages/SchemaPage/components/CallCom/builtIn.d.ts +28 -0
- package/model/frontend/src/defaultPages/SchemaPage/data/eventInfo.d.ts +7 -0
- package/model/frontend/src/defaultPages/SchemaPage/data/index.d.ts +2 -0
- package/model/frontend/src/defaultPages/SchemaPage/hooks/useComConfig.d.ts +9 -0
- package/model/frontend/src/defaultPages/SchemaPage/schemaType.d.ts +41 -0
- package/model/frontend/src/defaultPages/SchemaPage/utils/permissions.d.ts +2 -0
- package/model/frontend/src/defaultPages/SchemaPage/utils/validator.d.ts +7 -0
- package/model/frontend/src/language/en-US.d.ts +88 -0
- package/model/frontend/src/language/index.d.ts +72 -0
- package/model/frontend/src/language/zh-CN.d.ts +88 -0
- package/model/frontend/src/stores/apiFreezer.d.ts +26 -0
- package/model/frontend/src/stores/schemaEventBus.d.ts +22 -0
- package/model/frontend/src/stores/schemaStore.d.ts +32 -0
- package/model/frontend/src/typing/scalability.d.ts +15 -0
- package/model/frontend/src/typing/window.d.ts +8 -0
- package/model/{index.d.ts → model/index.d.ts} +1 -2
- package/model/{types → model/types}/data/button.d.ts +2 -12
- package/model/{types → model/types}/data/component.d.ts +4 -14
- package/model/model/types/data/fetchInfo.d.ts +7 -0
- package/model/model/types/data/schema.d.ts +46 -0
- package/model/{types → model/types}/data/search.d.ts +1 -2
- package/model/model/types/index.d.ts +2 -0
- package/model/{types → model/types}/menuType.d.ts +0 -30
- package/model/{types → model/types}/model.d.ts +1 -15
- package/model/packages/common/array/index.d.ts +6 -0
- package/model/packages/common/cache/LRUCache.d.ts +12 -0
- package/model/packages/common/guards/index.d.ts +8 -0
- package/model/packages/common/http/index.d.ts +89 -0
- package/model/packages/common/i18n/default.d.ts +86 -0
- package/model/packages/common/i18n/en-US.d.ts +86 -0
- package/model/packages/common/i18n/index.d.ts +18 -0
- package/model/packages/common/i18n/locales.d.ts +7 -0
- package/model/packages/common/i18n/types.d.ts +46 -0
- package/model/packages/common/log/index.d.ts +32 -0
- package/model/packages/common/number/index.d.ts +2 -0
- package/model/packages/common/object/filterEmpty.d.ts +2 -0
- package/model/packages/common/object/index.d.ts +4 -0
- package/model/packages/common/string/index.d.ts +3 -0
- package/model/packages/common/types/index.d.ts +3 -0
- package/model/packages/react/hooks/useBreadcrumb.d.ts +9 -0
- package/model/packages/react/hooks/useExecuteOnce.d.ts +11 -0
- package/model/packages/react/hooks/useLanguage.d.ts +1 -0
- package/model/packages/react/ui/components/Button/Button.d.ts +24 -0
- package/model/packages/react/ui/components/Button/SubmitButton.d.ts +8 -0
- package/model/packages/react/ui/components/Button/index.d.ts +3 -0
- package/model/packages/react/ui/components/Card/Card.d.ts +10 -0
- package/model/packages/react/ui/components/Card/index.d.ts +1 -0
- package/model/packages/react/ui/components/Checkbox/Checkbox.d.ts +16 -0
- package/model/packages/react/ui/components/Checkbox/index.d.ts +1 -0
- package/model/packages/react/ui/components/ConfirmDialog/ConfirmDialog.d.ts +11 -0
- package/model/packages/react/ui/components/ConfirmDialog/index.d.ts +1 -0
- package/model/packages/react/ui/components/DataTable/ActionBtn.d.ts +7 -0
- package/model/packages/react/ui/components/DataTable/index.d.ts +32 -0
- package/model/packages/react/ui/components/Date/Calendar.d.ts +21 -0
- package/model/packages/react/ui/components/Date/Date.d.ts +26 -0
- package/model/packages/react/ui/components/Date/LocaleContext.d.ts +1 -0
- package/model/packages/react/ui/components/Date/LocaleProvider.d.ts +7 -0
- package/model/packages/react/ui/components/Date/TimePicker.d.ts +6 -0
- package/model/packages/react/ui/components/Date/data.d.ts +5 -0
- package/model/packages/react/ui/components/Date/dateLocaleStore.d.ts +9 -0
- package/model/packages/react/ui/components/Date/dropdownPositioning.d.ts +2 -0
- package/model/packages/react/ui/components/Date/index.d.ts +5 -0
- package/model/packages/react/ui/components/Date/locales.d.ts +23 -0
- package/model/packages/react/ui/components/Drawer/Drawer.d.ts +22 -0
- package/model/packages/react/ui/components/Drawer/index.d.ts +2 -0
- package/model/packages/react/ui/components/Dropdown/Dropdown.d.ts +24 -0
- package/model/packages/react/ui/components/Dropdown/index.d.ts +1 -0
- package/model/packages/react/ui/components/Form/Form.d.ts +11 -0
- package/model/packages/react/ui/components/Form/FormItem.d.ts +19 -0
- package/model/packages/react/ui/components/Form/SchemaForm/data.d.ts +39 -0
- package/model/packages/react/ui/components/Form/SchemaForm/index.d.ts +59 -0
- package/model/packages/react/ui/components/Form/index.d.ts +4 -0
- package/model/packages/react/ui/components/Form/useForm.d.ts +2 -0
- package/model/packages/react/ui/components/ImagePreview/ImagePreview.d.ts +7 -0
- package/model/packages/react/ui/components/ImagePreview/PreviewImage.d.ts +7 -0
- package/model/packages/react/ui/components/ImagePreview/index.d.ts +2 -0
- package/model/packages/react/ui/components/Input/Input.d.ts +22 -0
- package/model/packages/react/ui/components/Input/index.d.ts +1 -0
- package/model/packages/react/ui/components/InputNumber/InputNumber.d.ts +25 -0
- package/model/packages/react/ui/components/InputNumber/index.d.ts +1 -0
- package/model/packages/react/ui/components/InputNumber/inputNumberUtils.d.ts +29 -0
- package/model/packages/react/ui/components/Label/Label.d.ts +21 -0
- package/model/packages/react/ui/components/Label/index.d.ts +2 -0
- package/model/packages/react/ui/components/Layout/Layout.d.ts +10 -0
- package/model/packages/react/ui/components/Layout/index.d.ts +1 -0
- package/model/packages/react/ui/components/Loading/Loading.d.ts +13 -0
- package/model/packages/react/ui/components/Loading/index.d.ts +1 -0
- package/model/packages/react/ui/components/Menu/Menu.d.ts +17 -0
- package/model/packages/react/ui/components/Menu/MenuContext.d.ts +38 -0
- package/model/packages/react/ui/components/Menu/MenuItem.d.ts +2 -0
- package/model/packages/react/ui/components/Menu/SubMenu.d.ts +2 -0
- package/model/packages/react/ui/components/Menu/index.d.ts +8 -0
- package/model/packages/react/ui/components/Menu/menuTypes.d.ts +57 -0
- package/model/packages/react/ui/components/Menu/utils.d.ts +1 -0
- package/model/packages/react/ui/components/Message/Message.d.ts +12 -0
- package/model/packages/react/ui/components/Message/MessageManager.d.ts +36 -0
- package/model/packages/react/ui/components/Message/data.d.ts +1 -0
- package/model/packages/react/ui/components/Message/index.d.ts +2 -0
- package/model/packages/react/ui/components/Modal/Modal.d.ts +20 -0
- package/model/packages/react/ui/components/Modal/ModalManager.d.ts +46 -0
- package/model/packages/react/ui/components/Modal/index.d.ts +3 -0
- package/model/packages/react/ui/components/Notification/Notification.d.ts +13 -0
- package/model/packages/react/ui/components/Notification/index.d.ts +1 -0
- package/model/packages/react/ui/components/Overlay/Overlay.d.ts +19 -0
- package/model/packages/react/ui/components/Overlay/index.d.ts +2 -0
- package/model/packages/react/ui/components/Pagination/Pagination.d.ts +10 -0
- package/model/packages/react/ui/components/Pagination/index.d.ts +1 -0
- package/model/packages/react/ui/components/Popup/Popup.d.ts +25 -0
- package/model/packages/react/ui/components/Popup/index.d.ts +1 -0
- package/model/packages/react/ui/components/Radio/Radio.d.ts +8 -0
- package/model/packages/react/ui/components/Radio/RadioGroup.d.ts +18 -0
- package/model/packages/react/ui/components/Radio/index.d.ts +2 -0
- package/model/packages/react/ui/components/Search/Search.d.ts +13 -0
- package/model/packages/react/ui/components/Search/index.d.ts +1 -0
- package/model/packages/react/ui/components/Select/Select.d.ts +21 -0
- package/model/packages/react/ui/components/Select/dropdownPositioning.d.ts +2 -0
- package/model/packages/react/ui/components/Select/index.d.ts +1 -0
- package/model/packages/react/ui/components/Skeleton/Skeleton.d.ts +12 -0
- package/model/packages/react/ui/components/Skeleton/index.d.ts +2 -0
- package/model/packages/react/ui/components/Switch/Switch.d.ts +10 -0
- package/model/packages/react/ui/components/Switch/index.d.ts +1 -0
- package/model/packages/react/ui/components/TableSearch/TableSearch.d.ts +30 -0
- package/model/packages/react/ui/components/TableSearch/index.d.ts +2 -0
- package/model/packages/react/ui/components/TableSearch/lang.d.ts +14 -0
- package/model/packages/react/ui/components/TableSearch/tableSearchLocaleStore.d.ts +8 -0
- package/model/packages/react/ui/components/Tabs/Tabs.d.ts +15 -0
- package/model/packages/react/ui/components/Tabs/index.d.ts +1 -0
- package/model/packages/react/ui/components/Textarea/Textarea.d.ts +20 -0
- package/model/packages/react/ui/components/Textarea/index.d.ts +1 -0
- package/model/packages/react/ui/components/Tooltip/Tooltip.d.ts +8 -0
- package/model/packages/react/ui/components/Tooltip/index.d.ts +1 -0
- package/model/packages/react/ui/components/TreeSelect/TreeSelect.d.ts +18 -0
- package/model/packages/react/ui/components/TreeSelect/index.d.ts +1 -0
- package/model/packages/react/ui/components/Upload/ImageUpload.d.ts +8 -0
- package/model/packages/react/ui/components/Upload/Upload.d.ts +13 -0
- package/model/packages/react/ui/components/Upload/index.d.ts +2 -0
- package/model/packages/react/ui/components/breadcrumb/breadcrumb.d.ts +34 -0
- package/model/packages/react/ui/components/breadcrumb/index.d.ts +1 -0
- package/model/packages/react/ui/components/hooks/useDropdownPositioning.d.ts +42 -0
- package/model/packages/react/ui/components/hooks/useInputController.d.ts +20 -0
- package/model/packages/react/ui/components/index.d.ts +35 -0
- package/model/packages/react/ui/components/table/index.d.ts +1 -0
- package/model/packages/react/ui/components/table/table.d.ts +29 -0
- package/model/packages/react/ui/i18n/I18nProvider.d.ts +12 -0
- package/model/packages/react/ui/i18n/index.d.ts +3 -0
- package/model/packages/react/ui/i18n/useI18n.d.ts +8 -0
- package/model/packages/react/ui/index.d.ts +4 -0
- package/model/packages/react/ui/lib/createStoreHook.d.ts +8 -0
- package/model/packages/react/ui/lib/export.d.ts +21 -0
- package/model/packages/react/ui/lib/utils.d.ts +9 -0
- package/model/packages/react/ui/stores/breadcrumb.d.ts +14 -0
- package/model/packages/react/ui/stores/language.d.ts +3 -0
- package/model/packages/react/ui/types/index.d.ts +1 -0
- package/model/typings/type.d.ts +4 -0
- package/package.json +24 -9
- package/types/app/controller/view.d.ts +2 -1
- package/types/app/extend/crypto.d.ts +64 -0
- package/types/app/extend/render-view.d.ts +2 -1
- package/types/app/middlewares/project-handler.d.ts +4 -0
- package/types/app/middlewares/request-parameter-parsing.d.ts +7 -0
- package/types/app/router/project.d.ts +1 -1
- package/types/app/type.d.ts +30 -1
- package/types/app/typings.d.ts +3 -0
- package/types/bundler/buildBE.d.ts +13 -0
- package/types/bundler/defaultRouteGuard.d.ts +2 -0
- package/types/bundler/index.d.ts +3 -1
- package/types/config/config.default.d.ts +27 -1
- package/types/index.d.ts +2 -1
- package/types/packages/core/loader/config.d.ts +1 -1
- package/types/packages/core/loader/middleware.d.ts +1 -1
- package/types/packages/core/types.d.ts +7 -0
- package/types/scripts/vite-build/build.d.ts +24 -0
- package/types/scripts/vite-build/collect.d.ts +57 -0
- package/types/scripts/vite-build/constants.d.ts +6 -0
- package/types/scripts/vite-build/dts.d.ts +53 -0
- package/types/scripts/vite-build/index.d.ts +2 -0
- package/types/scripts/vite-build/normalize.d.ts +66 -0
- package/types/scripts/vite-build/plugins.d.ts +67 -0
- package/types/scripts/vite-build/resolve.d.ts +61 -0
- package/types/scripts/vite-build/types.d.ts +174 -0
- package/types/scripts/vite-build/utils.d.ts +35 -0
- package/cjs/app/middleware/api-params-verify.js +0 -1
- package/cjs/app/middleware/api-sign-verify.js +0 -1
- package/cjs/app/middleware/project-handler.js +0 -1
- package/esm/app/middleware/project-handler.js +0 -15
- package/fe/model/types/data/button.js +0 -16
- package/fe/model/types/data/component.js +0 -11
- package/fe/model/types/data/schema.js +0 -1
- package/fe/model/types/data/search.js +0 -1
- package/fe/model/types/menuType.js +0 -1
- package/fe/model/types/model.js +0 -1
- package/fe/packages/common/array/index.js +0 -40
- package/fe/packages/common/i18n/types.js +0 -1
- package/fe/packages/common/log/index.js +0 -176
- package/fe/packages/common/number/index.js +0 -10
- package/fe/packages/common/object/index.js +0 -25
- package/fe/packages/common/string/index.js +0 -17
- package/fe/packages/common/types/index.js +0 -1
- package/fe/packages/ui/react/components/Button/Button.js +0 -72
- package/fe/packages/ui/react/components/Button/SubmitButton.js +0 -25
- package/fe/packages/ui/react/components/Button/index.d.ts +0 -4
- package/fe/packages/ui/react/components/Button/index.js +0 -2
- package/fe/packages/ui/react/components/Card/Card.js +0 -8
- package/fe/packages/ui/react/components/Card/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Card/index.js +0 -1
- package/fe/packages/ui/react/components/Checkbox/Checkbox.js +0 -39
- package/fe/packages/ui/react/components/Checkbox/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Checkbox/index.js +0 -1
- package/fe/packages/ui/react/components/ConfirmDialog/ConfirmDialog.js +0 -11
- package/fe/packages/ui/react/components/ConfirmDialog/index.d.ts +0 -2
- package/fe/packages/ui/react/components/ConfirmDialog/index.js +0 -1
- package/fe/packages/ui/react/components/DataTable/ActionBtn.js +0 -96
- package/fe/packages/ui/react/components/DataTable/index.js +0 -191
- package/fe/packages/ui/react/components/Date/Calendar.js +0 -216
- package/fe/packages/ui/react/components/Date/Date.js +0 -201
- package/fe/packages/ui/react/components/Date/DateTestPage.js +0 -29
- package/fe/packages/ui/react/components/Date/LocaleContext.d.ts +0 -6
- package/fe/packages/ui/react/components/Date/LocaleContext.js +0 -8
- package/fe/packages/ui/react/components/Date/LocaleProvider.d.ts +0 -19
- package/fe/packages/ui/react/components/Date/LocaleProvider.js +0 -24
- package/fe/packages/ui/react/components/Date/TimePicker.js +0 -78
- package/fe/packages/ui/react/components/Date/data.js +0 -4
- package/fe/packages/ui/react/components/Date/dateLocaleStore.js +0 -14
- package/fe/packages/ui/react/components/Date/dropdownPositioning.d.ts +0 -3
- package/fe/packages/ui/react/components/Date/dropdownPositioning.js +0 -12
- package/fe/packages/ui/react/components/Date/index.d.ts +0 -6
- package/fe/packages/ui/react/components/Date/index.js +0 -5
- package/fe/packages/ui/react/components/Date/locales.js +0 -21
- package/fe/packages/ui/react/components/Drawer/Drawer.js +0 -100
- package/fe/packages/ui/react/components/Drawer/index.d.ts +0 -3
- package/fe/packages/ui/react/components/Drawer/index.js +0 -1
- package/fe/packages/ui/react/components/Dropdown/Dropdown.js +0 -49
- package/fe/packages/ui/react/components/Dropdown/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Dropdown/index.js +0 -1
- package/fe/packages/ui/react/components/Form/Form.js +0 -8
- package/fe/packages/ui/react/components/Form/FormItem.js +0 -43
- package/fe/packages/ui/react/components/Form/SchemaForm/data.js +0 -18
- package/fe/packages/ui/react/components/Form/SchemaForm/index.js +0 -79
- package/fe/packages/ui/react/components/Form/index.d.ts +0 -5
- package/fe/packages/ui/react/components/Form/index.js +0 -4
- package/fe/packages/ui/react/components/Form/useForm.d.ts +0 -3
- package/fe/packages/ui/react/components/Form/useForm.js +0 -1
- package/fe/packages/ui/react/components/ImagePreview/ImagePreview.js +0 -169
- package/fe/packages/ui/react/components/ImagePreview/PreviewImage.js +0 -28
- package/fe/packages/ui/react/components/ImagePreview/index.d.ts +0 -3
- package/fe/packages/ui/react/components/ImagePreview/index.js +0 -2
- package/fe/packages/ui/react/components/Input/Input.js +0 -61
- package/fe/packages/ui/react/components/Input/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Input/index.js +0 -1
- package/fe/packages/ui/react/components/InputNumber/InputNumber.js +0 -144
- package/fe/packages/ui/react/components/InputNumber/index.d.ts +0 -2
- package/fe/packages/ui/react/components/InputNumber/index.js +0 -1
- package/fe/packages/ui/react/components/InputNumber/inputNumberUtils.js +0 -63
- package/fe/packages/ui/react/components/InputNumber/inputNumberUtils.test.d.ts +0 -2
- package/fe/packages/ui/react/components/InputNumber/inputNumberUtils.test.js +0 -27
- package/fe/packages/ui/react/components/Label/Label.js +0 -35
- package/fe/packages/ui/react/components/Label/index.d.ts +0 -3
- package/fe/packages/ui/react/components/Label/index.js +0 -2
- package/fe/packages/ui/react/components/Layout/Layout.js +0 -8
- package/fe/packages/ui/react/components/Layout/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Layout/index.js +0 -1
- package/fe/packages/ui/react/components/Loading/Loading.d.ts +0 -9
- package/fe/packages/ui/react/components/Loading/Loading.js +0 -13
- package/fe/packages/ui/react/components/Loading/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Loading/index.js +0 -1
- package/fe/packages/ui/react/components/Menu/Menu.js +0 -103
- package/fe/packages/ui/react/components/Menu/MenuContext.js +0 -97
- package/fe/packages/ui/react/components/Menu/MenuItem.js +0 -33
- package/fe/packages/ui/react/components/Menu/SubMenu.d.ts +0 -10
- package/fe/packages/ui/react/components/Menu/SubMenu.js +0 -169
- package/fe/packages/ui/react/components/Menu/index.d.ts +0 -9
- package/fe/packages/ui/react/components/Menu/index.js +0 -5
- package/fe/packages/ui/react/components/Menu/menuTypes.js +0 -1
- package/fe/packages/ui/react/components/Menu/utils.js +0 -7
- package/fe/packages/ui/react/components/Message/Message.js +0 -58
- package/fe/packages/ui/react/components/Message/MessageManager.js +0 -90
- package/fe/packages/ui/react/components/Message/data.js +0 -1
- package/fe/packages/ui/react/components/Message/index.d.ts +0 -3
- package/fe/packages/ui/react/components/Message/index.js +0 -1
- package/fe/packages/ui/react/components/Modal/Modal.js +0 -14
- package/fe/packages/ui/react/components/Modal/ModalManager.js +0 -90
- package/fe/packages/ui/react/components/Modal/index.d.ts +0 -4
- package/fe/packages/ui/react/components/Modal/index.js +0 -2
- package/fe/packages/ui/react/components/Notification/Notification.js +0 -29
- package/fe/packages/ui/react/components/Notification/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Notification/index.js +0 -1
- package/fe/packages/ui/react/components/Overlay/Overlay.js +0 -53
- package/fe/packages/ui/react/components/Overlay/index.d.ts +0 -3
- package/fe/packages/ui/react/components/Overlay/index.js +0 -1
- package/fe/packages/ui/react/components/Pagination/Pagination.js +0 -88
- package/fe/packages/ui/react/components/Pagination/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Pagination/index.js +0 -1
- package/fe/packages/ui/react/components/Popup/Popup.js +0 -81
- package/fe/packages/ui/react/components/Popup/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Popup/index.js +0 -1
- package/fe/packages/ui/react/components/Radio/Radio.js +0 -20
- package/fe/packages/ui/react/components/Radio/RadioGroup.js +0 -21
- package/fe/packages/ui/react/components/Radio/index.d.ts +0 -3
- package/fe/packages/ui/react/components/Radio/index.js +0 -2
- package/fe/packages/ui/react/components/Search/Search.js +0 -8
- package/fe/packages/ui/react/components/Search/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Search/index.js +0 -1
- package/fe/packages/ui/react/components/Select/Select.js +0 -123
- package/fe/packages/ui/react/components/Select/dropdownPositioning.d.ts +0 -3
- package/fe/packages/ui/react/components/Select/dropdownPositioning.js +0 -13
- package/fe/packages/ui/react/components/Select/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Select/index.js +0 -1
- package/fe/packages/ui/react/components/Skeleton/Skeleton.d.ts +0 -28
- package/fe/packages/ui/react/components/Skeleton/Skeleton.js +0 -31
- package/fe/packages/ui/react/components/Skeleton/index.d.ts +0 -3
- package/fe/packages/ui/react/components/Skeleton/index.js +0 -1
- package/fe/packages/ui/react/components/Switch/Switch.js +0 -22
- package/fe/packages/ui/react/components/Switch/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Switch/index.js +0 -1
- package/fe/packages/ui/react/components/TableSearch/TableSearch.d.ts +0 -68
- package/fe/packages/ui/react/components/TableSearch/TableSearch.js +0 -121
- package/fe/packages/ui/react/components/TableSearch/index.d.ts +0 -3
- package/fe/packages/ui/react/components/TableSearch/index.js +0 -1
- package/fe/packages/ui/react/components/TableSearch/lang.js +0 -14
- package/fe/packages/ui/react/components/TableSearch/tableSearchLocaleStore.js +0 -11
- package/fe/packages/ui/react/components/Tabs/Tabs.js +0 -19
- package/fe/packages/ui/react/components/Tabs/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Tabs/index.js +0 -1
- package/fe/packages/ui/react/components/Textarea/Textarea.js +0 -37
- package/fe/packages/ui/react/components/Textarea/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Textarea/index.js +0 -1
- package/fe/packages/ui/react/components/Tooltip/Tooltip.js +0 -79
- package/fe/packages/ui/react/components/Tooltip/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Tooltip/index.js +0 -1
- package/fe/packages/ui/react/components/TreeSelect/TreeSelect.js +0 -160
- package/fe/packages/ui/react/components/TreeSelect/index.d.ts +0 -2
- package/fe/packages/ui/react/components/TreeSelect/index.js +0 -1
- package/fe/packages/ui/react/components/Upload/ImageUpload.js +0 -75
- package/fe/packages/ui/react/components/Upload/Upload.d.ts +0 -41
- package/fe/packages/ui/react/components/Upload/Upload.js +0 -6
- package/fe/packages/ui/react/components/Upload/index.d.ts +0 -3
- package/fe/packages/ui/react/components/Upload/index.js +0 -2
- package/fe/packages/ui/react/components/breadcrumb/breadcrumb.js +0 -81
- package/fe/packages/ui/react/components/breadcrumb/index.d.ts +0 -2
- package/fe/packages/ui/react/components/breadcrumb/index.js +0 -1
- package/fe/packages/ui/react/components/hooks/useDropdownPositioning.js +0 -137
- package/fe/packages/ui/react/components/hooks/useInputController.js +0 -44
- package/fe/packages/ui/react/components/index.d.ts +0 -36
- package/fe/packages/ui/react/components/index.js +0 -35
- package/fe/packages/ui/react/components/table/index.d.ts +0 -2
- package/fe/packages/ui/react/components/table/index.js +0 -1
- package/fe/packages/ui/react/components/table/table.js +0 -116
- package/fe/packages/ui/react/components/testPage/MenuTestPage.js +0 -104
- package/fe/packages/ui/react/components/testPage/index.js +0 -475
- package/fe/packages/ui/react/hooks/useBreadcrumb.js +0 -2
- package/fe/packages/ui/react/hooks/useExecuteOnce.d.ts +0 -30
- package/fe/packages/ui/react/hooks/useExecuteOnce.js +0 -57
- package/fe/packages/ui/react/hooks/useInit.js +0 -9
- package/fe/packages/ui/react/hooks/useLanguage.d.ts +0 -2
- package/fe/packages/ui/react/hooks/useLanguage.js +0 -4
- package/fe/packages/ui/react/hooks/usePagination.js +0 -27
- package/fe/packages/ui/react/hooks/useRefState.js +0 -29
- package/fe/packages/ui/react/hooks/useWatch.js +0 -87
- package/fe/packages/ui/react/hooks/useWatch.test.d.ts +0 -2
- package/fe/packages/ui/react/hooks/useWatch.test.js +0 -22
- package/fe/packages/ui/react/i18n/I18nProvider.d.ts +0 -31
- package/fe/packages/ui/react/i18n/I18nProvider.js +0 -25
- package/fe/packages/ui/react/i18n/index.d.ts +0 -4
- package/fe/packages/ui/react/i18n/index.js +0 -3
- package/fe/packages/ui/react/i18n/useI18n.d.ts +0 -13
- package/fe/packages/ui/react/i18n/useI18n.js +0 -18
- package/fe/packages/ui/react/index.d.ts +0 -5
- package/fe/packages/ui/react/index.js +0 -6
- package/fe/packages/ui/react/lib/createStoreHook.js +0 -6
- package/fe/packages/ui/react/lib/export.d.ts +0 -66
- package/fe/packages/ui/react/lib/export.js +0 -138
- package/fe/packages/ui/react/lib/utils.d.ts +0 -34
- package/fe/packages/ui/react/lib/utils.js +0 -70
- package/fe/packages/ui/react/stores/breadcrumb.js +0 -66
- package/fe/packages/ui/react/stores/language.d.ts +0 -4
- package/fe/packages/ui/react/stores/language.js +0 -2
- package/fe/packages/ui/react/types/index.js +0 -1
- package/fe/typings/type.js +0 -1
- package/model/test.d.ts +0 -2
- package/model/types/data/fetchInfo.d.ts +0 -20
- package/model/types/data/schema.d.ts +0 -98
- package/types/app/middleware/project-handler.d.ts +0 -4
- /package/fe/packages/{ui/react → react/ui}/assets/table/no-result.svg +0 -0
- /package/{fe/model/types/data/fetchInfo.js → model/model/test.d.ts} +0 -0
- /package/{fe/packages/common/cache/index.js → model/packages/common/cache/index.d.ts} +0 -0
- /package/{fe/packages/common/index.js → model/packages/common/index.d.ts} +0 -0
- /package/types/app/{middleware → middlewares}/api-params-verify.d.ts +0 -0
- /package/types/app/{middleware → middlewares}/api-sign-verify.d.ts +0 -0
- /package/types/app/{middleware → middlewares}/error-handle.d.ts +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { BuildEntriesConfig, BuildEntriesResult } from "./types.ts";
|
|
2
|
+
/**
|
|
3
|
+
* 构建库入口文件的主函数
|
|
4
|
+
* 支持多格式输出(ESM/CJS)、类型声明文件生成、路径别名、文件复制等功能
|
|
5
|
+
* @param config - 构建配置选项
|
|
6
|
+
* @param config.input - 入口文件或目录列表
|
|
7
|
+
* @param config.format - 输出格式,默认 ['es', 'cjs']
|
|
8
|
+
* @param config.outputStructure - 输出结构,'preserve' 保留源路径,'bundle' 合并输出
|
|
9
|
+
* @param config.alias - 路径别名配置
|
|
10
|
+
* @param config.external - 外部依赖配置
|
|
11
|
+
* @param config.externalNodeBuiltins - 是否将 Node.js 内置模块视为外部依赖,默认 true
|
|
12
|
+
* @param config.bundleDependencies - 是否将 npm 依赖打进产物,默认兼容 externalPackages
|
|
13
|
+
* @param config.externalPackages - 兼容旧配置:是否将所有 npm 包视为外部依赖
|
|
14
|
+
* @param config.ignore - 忽略文件配置
|
|
15
|
+
* @param config.copy - 复制文件配置
|
|
16
|
+
* @param config.extensions - 需要处理的文件扩展名
|
|
17
|
+
* @param config.nonCodeExtensions - 非代码文件扩展名
|
|
18
|
+
* @param config.plugins - Vite 插件配置
|
|
19
|
+
* @param config.dts - 类型声明文件配置
|
|
20
|
+
* @param config.outDir - 输出根目录,默认 'dist'
|
|
21
|
+
* @param config.rootDir - 项目根目录,默认当前工作目录
|
|
22
|
+
* @returns 构建结果信息
|
|
23
|
+
*/
|
|
24
|
+
export declare function buildEntries(config?: BuildEntriesConfig): Promise<BuildEntriesResult>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { CollectedPluginFile, PluginFileHandler } from "./types.ts";
|
|
2
|
+
/**
|
|
3
|
+
* 递归收集 TypeScript 源文件
|
|
4
|
+
* 遍历目录树,收集符合扩展名要求且未被忽略的文件
|
|
5
|
+
* @param entryPath - 入口路径(文件或目录)
|
|
6
|
+
* @param collected - 收集到的文件路径集合
|
|
7
|
+
* @param isIgnored - 判断路径是否被忽略的函数
|
|
8
|
+
* @param extensionsSet - 需要收集的文件扩展名集合
|
|
9
|
+
*/
|
|
10
|
+
export declare function collectTsFiles(entryPath: string, collected: Set<string>, isIgnored: (targetPath: string) => boolean, extensionsSet: Set<string>, allowMissing?: boolean): Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* 递归收集需要由插件处理的文件
|
|
13
|
+
* 根据插件的 test 函数判断文件是否需要处理
|
|
14
|
+
* @param entryPath - 入口路径(文件或目录)
|
|
15
|
+
* @param collected - 收集到的文件信息数组
|
|
16
|
+
* @param isIgnored - 判断路径是否被忽略的函数
|
|
17
|
+
* @param plugins - 插件处理器列表
|
|
18
|
+
*/
|
|
19
|
+
export declare function collectPluginFiles(entryPath: string, collected: CollectedPluginFile[], isIgnored: (targetPath: string) => boolean, plugins: PluginFileHandler[], allowMissing?: boolean): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* 递归收集指定扩展名的文件
|
|
22
|
+
* 用于收集特定类型的文件(如 .d.ts 文件)
|
|
23
|
+
* @param entryPath - 入口路径(文件或目录)
|
|
24
|
+
* @param collected - 收集到的文件路径集合
|
|
25
|
+
* @param extensionsSet - 需要收集的文件扩展名集合
|
|
26
|
+
*/
|
|
27
|
+
export declare function collectFilesWithExtensions(entryPath: string, collected: Set<string>, extensionsSet: Set<string>): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* 确保并返回有效的输入文件列表
|
|
30
|
+
* 处理多个输入路径,过滤忽略的文件,验证是否有匹配的源文件
|
|
31
|
+
* @param inputPaths - 输入路径列表
|
|
32
|
+
* @param rootDir - 项目根目录
|
|
33
|
+
* @param ignorePaths - 需要忽略的路径列表
|
|
34
|
+
* @param extensions - 需要处理的文件扩展名
|
|
35
|
+
* @returns 排序后的文件绝对路径数组
|
|
36
|
+
* @throws 如果没有找到匹配的源文件
|
|
37
|
+
*/
|
|
38
|
+
export declare function ensureInputFiles(inputPaths: string[], rootDir: string, ignorePaths: string[], extensions: string[], allowMissing?: boolean): Promise<string[]>;
|
|
39
|
+
/**
|
|
40
|
+
* 确保并返回需要插件处理的文件列表
|
|
41
|
+
* 收集所有匹配插件 test 函数的文件
|
|
42
|
+
* @param inputPaths - 输入路径列表
|
|
43
|
+
* @param rootDir - 项目根目录
|
|
44
|
+
* @param ignorePaths - 需要忽略的路径列表
|
|
45
|
+
* @param plugins - 插件处理器列表
|
|
46
|
+
* @returns 排序后的文件信息数组
|
|
47
|
+
*/
|
|
48
|
+
export declare function ensurePluginFiles(inputPaths: string[], rootDir: string, ignorePaths: string[], plugins: PluginFileHandler[], allowMissing?: boolean): Promise<CollectedPluginFile[]>;
|
|
49
|
+
/**
|
|
50
|
+
* 将文件路径列表转换为 Vite 入口映射对象
|
|
51
|
+
* 键为相对于根目录的路径(不含扩展名),值为绝对路径
|
|
52
|
+
* @param files - 文件绝对路径列表
|
|
53
|
+
* @param rootDir - 项目根目录
|
|
54
|
+
* @param extensions - 需要移除的文件扩展名列表
|
|
55
|
+
* @returns 入口映射对象 { [entryName]: absolutePath }
|
|
56
|
+
*/
|
|
57
|
+
export declare function toEntryMap(files: string[], rootDir: string, extensions: string[]): Record<string, string>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const DEFAULT_EXTENSIONS: readonly [".ts", ".tsx", ".mts", ".cts", ".js"];
|
|
2
|
+
export declare const DEFAULT_FORMATS: readonly ["es", "cjs"];
|
|
3
|
+
export declare const COMMON_NON_CODE_EXTENSIONS: Set<string>;
|
|
4
|
+
export declare const FORMAT_OUTPUT_DIR: Record<string, string>;
|
|
5
|
+
export declare const DEFAULT_NON_CODE_EXTENSIONS: string[];
|
|
6
|
+
export declare const BUILTIN_MODULES: Set<string>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { Alias } from "vite";
|
|
2
|
+
import type { AliasRewriteRule, NormalizedDtsConfig } from "./types.ts";
|
|
3
|
+
/**
|
|
4
|
+
* 使用 TypeScript 编译器生成类型声明文件
|
|
5
|
+
* 创建临时 tsconfig 并调用 tsc 生成 .d.ts 文件
|
|
6
|
+
* @param files - 需要生成声明文件的源文件列表
|
|
7
|
+
* @param rootDir - 项目根目录
|
|
8
|
+
* @param aliases - 路径别名配置
|
|
9
|
+
* @param outDir - 声明文件输出目录
|
|
10
|
+
* @throws 如果找不到 TypeScript CLI 或编译失败
|
|
11
|
+
*/
|
|
12
|
+
export declare function buildDeclarations(files: string[], rootDir: string, aliases: Alias[], dts: NormalizedDtsConfig): Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* 创建别名重写规则列表
|
|
15
|
+
* 用于在声明文件中将路径别名转换为相对路径
|
|
16
|
+
* @param rootDir - 项目根目录
|
|
17
|
+
* @param aliases - Vite 路径别名配置
|
|
18
|
+
* @returns 按别名长度降序排列的重写规则数组
|
|
19
|
+
*/
|
|
20
|
+
export declare function createAliasRewriteRules(rootDir: string, aliases: Alias[]): AliasRewriteRule[];
|
|
21
|
+
/**
|
|
22
|
+
* 解析别名导入对应的声明文件路径
|
|
23
|
+
* 将别名路径解析为实际的 .d.ts 文件路径
|
|
24
|
+
* @param specifier - 导入标识符(可能包含别名)
|
|
25
|
+
* @param rootDir - 项目根目录
|
|
26
|
+
* @param aliases - 路径别名配置
|
|
27
|
+
* @param extensions - 需要处理的文件扩展名
|
|
28
|
+
* @param outDir - 声明文件输出目录
|
|
29
|
+
* @returns 对应的 .d.ts 文件路径,如果无法解析则返回 null
|
|
30
|
+
*/
|
|
31
|
+
export declare function resolveAliasedDeclarationTarget(specifier: string, rootDir: string, aliases: Alias[], extensions: string[], outDir: string): Promise<string | null>;
|
|
32
|
+
/**
|
|
33
|
+
* 重写声明文件中的别名导入标识符
|
|
34
|
+
* 将别名路径转换为相对于声明文件的相对路径
|
|
35
|
+
* @param specifier - 原始导入标识符
|
|
36
|
+
* @param declarationFilePath - 当前声明文件的绝对路径
|
|
37
|
+
* @param rootDir - 项目根目录
|
|
38
|
+
* @param outDir - 声明文件输出目录
|
|
39
|
+
* @param aliases - 路径别名配置
|
|
40
|
+
* @param rules - 别名重写规则
|
|
41
|
+
* @param extensions - 需要处理的文件扩展名
|
|
42
|
+
* @returns 重写后的导入标识符
|
|
43
|
+
*/
|
|
44
|
+
export declare function rewriteAliasedSpecifier(specifier: string, declarationFilePath: string, rootDir: string, outDir: string, aliases: Alias[], rules: AliasRewriteRule[], extensions: string[], mode: 'source' | 'declaration'): Promise<string>;
|
|
45
|
+
/**
|
|
46
|
+
* 重写输出目录中所有声明文件的别名导入
|
|
47
|
+
* 处理静态导入、动态导入和模块声明中的别名路径
|
|
48
|
+
* @param outDir - 声明文件输出目录
|
|
49
|
+
* @param rootDir - 项目根目录
|
|
50
|
+
* @param aliases - 路径别名配置
|
|
51
|
+
* @param extensions - 需要处理的文件扩展名
|
|
52
|
+
*/
|
|
53
|
+
export declare function rewriteDeclarationAliases(outDir: string, rootDir: string, aliases: Alias[], extensions: string[], mode?: 'source' | 'declaration'): Promise<void>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { Alias } from "vite";
|
|
2
|
+
import type { BuildEntriesConfig, BuildFormat, CopyConfig, ExtensionConfig, IgnoreConfig, NormalizedCopyConfig, NormalizedDtsConfig } from "./types.ts";
|
|
3
|
+
/**
|
|
4
|
+
* 标准化文件扩展名配置
|
|
5
|
+
* 合并默认扩展名和自定义扩展名,确保扩展名以点开头
|
|
6
|
+
* @param extensionOptions - 扩展名配置,包含 input 数组和 mergeDefault 标志
|
|
7
|
+
* @returns 标准化后的扩展名数组(去重)
|
|
8
|
+
*/
|
|
9
|
+
export declare function normalizeExtensions(extensionOptions?: ExtensionConfig): string[];
|
|
10
|
+
/**
|
|
11
|
+
* 标准化忽略配置
|
|
12
|
+
* 提供默认值确保返回完整的配置对象
|
|
13
|
+
* @param ignoreOptions - 忽略配置
|
|
14
|
+
* @returns 包含 input 和 importPolicy 的完整配置对象
|
|
15
|
+
*/
|
|
16
|
+
export declare function normalizeIgnore(ignoreOptions?: IgnoreConfig): Required<IgnoreConfig>;
|
|
17
|
+
/**
|
|
18
|
+
* 标准化路径别名配置
|
|
19
|
+
* 支持对象格式和数组格式,将相对路径转换为绝对路径
|
|
20
|
+
* @param aliasOptions - 别名配置(对象或数组格式)
|
|
21
|
+
* @param rootDir - 项目根目录
|
|
22
|
+
* @returns Vite Alias 数组
|
|
23
|
+
*/
|
|
24
|
+
export declare function normalizeAlias(aliasOptions: BuildEntriesConfig['alias'], rootDir: string): Alias[];
|
|
25
|
+
/**
|
|
26
|
+
* 标准化非代码文件扩展名配置
|
|
27
|
+
* 用于识别需要复制而非编译的资源文件
|
|
28
|
+
* @param extensionOptions - 扩展名配置
|
|
29
|
+
* @returns 标准化后的扩展名数组(去重)
|
|
30
|
+
*/
|
|
31
|
+
export declare function normalizeNonCodeExtensions(extensionOptions?: ExtensionConfig): string[];
|
|
32
|
+
/**
|
|
33
|
+
* 标准化输出格式配置
|
|
34
|
+
* 确保返回有效的格式数组
|
|
35
|
+
* @param formatOptions - 格式配置(单个格式或数组)
|
|
36
|
+
* @returns 格式数组,默认 ['es', 'cjs']
|
|
37
|
+
*/
|
|
38
|
+
export declare function normalizeFormats(formatOptions?: BuildFormat | BuildFormat[]): BuildFormat[];
|
|
39
|
+
/**
|
|
40
|
+
* 标准化类型声明文件配置
|
|
41
|
+
* 支持布尔值、对象配置或 undefined
|
|
42
|
+
* @param dtsOptions - DTS 配置选项
|
|
43
|
+
* @param outputRoot - 输出根目录
|
|
44
|
+
* @returns 标准化的 DTS 配置对象
|
|
45
|
+
*/
|
|
46
|
+
export declare function normalizeDtsConfig(dtsOptions: BuildEntriesConfig['dts'], outputRoot: string): NormalizedDtsConfig;
|
|
47
|
+
/**
|
|
48
|
+
* 标准化格式输出目录映射
|
|
49
|
+
* 默认保持历史行为:es -> esm, cjs -> cjs
|
|
50
|
+
*/
|
|
51
|
+
export declare function normalizeFormatOutDir(formatOutDir: BuildEntriesConfig['formatOutDir']): Partial<Record<BuildFormat, string>>;
|
|
52
|
+
/**
|
|
53
|
+
* 检查并阻止将资源文件扩展名添加到代码扩展名列表
|
|
54
|
+
* 防止将 .css、.svg 等文件当作代码编译
|
|
55
|
+
* @param extensions - 代码文件扩展名列表
|
|
56
|
+
* @param nonCodeExtensions - 非代码文件扩展名列表
|
|
57
|
+
* @throws 如果发现资源文件扩展名混入代码扩展名列表
|
|
58
|
+
*/
|
|
59
|
+
export declare function assertNoCommonAssetExtensions(extensions: string[], nonCodeExtensions: string[]): void;
|
|
60
|
+
/**
|
|
61
|
+
* 标准化复制文件配置
|
|
62
|
+
* 配置需要原样复制的资源文件
|
|
63
|
+
* @param copyOptions - 复制配置
|
|
64
|
+
* @returns 标准化的复制配置对象
|
|
65
|
+
*/
|
|
66
|
+
export declare function normalizeCopy(copyOptions?: CopyConfig): NormalizedCopyConfig;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { Plugin, PluginOption } from "vite";
|
|
2
|
+
import type { BuildContext, BuildEntriesFilePlugin, BuildEntriesFilePluginOptions, InternalPlugin } from "./types.ts";
|
|
3
|
+
/**
|
|
4
|
+
* 创建构建文件插件的基础工厂函数
|
|
5
|
+
* 用于创建可以处理文件复制或转换的 Vite 插件
|
|
6
|
+
* @param pluginOptions - 插件配置选项
|
|
7
|
+
* @returns BuildEntriesFilePlugin 对象
|
|
8
|
+
*/
|
|
9
|
+
export declare function createBuildEntriesFilePlugin(pluginOptions?: BuildEntriesFilePluginOptions): BuildEntriesFilePlugin;
|
|
10
|
+
/**
|
|
11
|
+
* 创建文件复制插件
|
|
12
|
+
* 用于将非代码文件原样复制到输出目录
|
|
13
|
+
* @param options - 插件配置选项
|
|
14
|
+
* @param options.rename - 可选的重命名函数
|
|
15
|
+
* @returns BuildEntriesFilePlugin 对象,kind 为 'copy'
|
|
16
|
+
*/
|
|
17
|
+
export declare function createCopyPlugin(options?: BuildEntriesFilePluginOptions): BuildEntriesFilePlugin;
|
|
18
|
+
/**
|
|
19
|
+
* 创建文件转换插件
|
|
20
|
+
* 用于对文件内容进行自定义转换处理
|
|
21
|
+
* @param options - 插件配置选项
|
|
22
|
+
* @param options.transform - 文件转换函数
|
|
23
|
+
* @returns BuildEntriesFilePlugin 对象
|
|
24
|
+
*/
|
|
25
|
+
export declare function createFilePlugin(options?: BuildEntriesFilePluginOptions): BuildEntriesFilePlugin;
|
|
26
|
+
/**
|
|
27
|
+
* 将 BuildEntriesFilePlugin 转换为实际的 Vite 插件
|
|
28
|
+
* 在 writeBundle 阶段处理文件并输出到目标目录
|
|
29
|
+
* @param plugin - BuildEntriesFilePlugin 实例
|
|
30
|
+
* @param buildContext - 构建上下文信息
|
|
31
|
+
* @returns Vite Plugin 对象
|
|
32
|
+
*/
|
|
33
|
+
export declare function hydrateFilePlugin(plugin: BuildEntriesFilePlugin, buildContext: BuildContext): Plugin;
|
|
34
|
+
/**
|
|
35
|
+
* 准备 Vite 插件列表
|
|
36
|
+
* 将内部插件格式转换为标准 Vite 插件
|
|
37
|
+
* @param plugins - 内部插件列表
|
|
38
|
+
* @param buildContext - 构建上下文信息
|
|
39
|
+
* @returns 标准 Vite 插件数组
|
|
40
|
+
*/
|
|
41
|
+
export declare function prepareVitePlugins(plugins: InternalPlugin[], buildContext: BuildContext): Plugin[];
|
|
42
|
+
/**
|
|
43
|
+
* 标准化插件配置
|
|
44
|
+
* 支持多种配置格式:数组、对象配置或 undefined
|
|
45
|
+
* @param pluginOptions - 插件配置
|
|
46
|
+
* @param defaultPlugins - 默认插件列表
|
|
47
|
+
* @returns 标准化的内部插件数组
|
|
48
|
+
*/
|
|
49
|
+
export declare function normalizePlugins(pluginOptions: {
|
|
50
|
+
input?: PluginOption[];
|
|
51
|
+
mergeDefault?: boolean;
|
|
52
|
+
} | PluginOption[] | undefined, defaultPlugins?: InternalPlugin[]): InternalPlugin[];
|
|
53
|
+
/**
|
|
54
|
+
* 合并默认插件和用户插件
|
|
55
|
+
* 如果用户提供了自定义复制插件,则移除默认的复制插件
|
|
56
|
+
* @param defaultPlugins - 默认插件列表
|
|
57
|
+
* @param inputPlugins - 用户插件列表
|
|
58
|
+
* @returns 合并后的插件数组
|
|
59
|
+
*/
|
|
60
|
+
export declare function mergePlugins(defaultPlugins: InternalPlugin[], inputPlugins: InternalPlugin[]): InternalPlugin[];
|
|
61
|
+
/**
|
|
62
|
+
* 扁平化插件选项数组
|
|
63
|
+
* 递归处理嵌套数组,过滤空值
|
|
64
|
+
* @param pluginOptions - 可能包含嵌套的插件选项数组
|
|
65
|
+
* @returns 扁平化的内部插件数组
|
|
66
|
+
*/
|
|
67
|
+
export declare function flattenPluginOptions(pluginOptions: PluginOption[]): InternalPlugin[];
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { Alias } from "vite";
|
|
2
|
+
import type { ExternalMatcher, ExternalOption, ExtensionConfig } from "./types.ts";
|
|
3
|
+
/**
|
|
4
|
+
* 解析导入路径的实际文件位置
|
|
5
|
+
* 处理相对路径、路径别名和扩展名补全
|
|
6
|
+
* @param importer - 导入文件的绝对路径
|
|
7
|
+
* @param source - 导入标识符
|
|
8
|
+
* @param extensions - 需要尝试的文件扩展名
|
|
9
|
+
* @param aliases - 路径别名配置
|
|
10
|
+
* @returns 解析后的文件绝对路径
|
|
11
|
+
*/
|
|
12
|
+
export declare function resolveImportPath(importer: string, source: string, extensions: string[], aliases: Alias[]): Promise<string>;
|
|
13
|
+
/**
|
|
14
|
+
* 创建路径忽略判断函数
|
|
15
|
+
* 用于检查给定路径是否在忽略列表中
|
|
16
|
+
* @param ignorePaths - 需要忽略的路径列表(相对或绝对)
|
|
17
|
+
* @param rootDir - 项目根目录
|
|
18
|
+
* @returns 判断函数,接收路径返回是否应被忽略
|
|
19
|
+
*/
|
|
20
|
+
export declare function createIgnoreMatcher(ignorePaths: string[], rootDir: string): (targetPath: string) => boolean;
|
|
21
|
+
/**
|
|
22
|
+
* 检查模块标识符是否匹配某个别名
|
|
23
|
+
* @param id - 模块标识符
|
|
24
|
+
* @param aliases - 路径别名配置
|
|
25
|
+
* @returns 是否匹配别名
|
|
26
|
+
*/
|
|
27
|
+
export declare function matchesAlias(id: string, aliases: Alias[]): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* 判断导入是否为裸模块导入(npm 包)
|
|
30
|
+
* @param id - 模块标识符
|
|
31
|
+
* @returns 是否为裸模块导入
|
|
32
|
+
*/
|
|
33
|
+
export declare function isBareImport(id: string): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* 检查模块是否匹配外部依赖规则
|
|
36
|
+
* @param id - 模块标识符
|
|
37
|
+
* @param importer - 导入者文件路径
|
|
38
|
+
* @param matcher - 匹配器(字符串、正则或函数)
|
|
39
|
+
* @returns 是否匹配外部依赖规则
|
|
40
|
+
*/
|
|
41
|
+
export declare function matchesExternalRule(id: string, importer: string | undefined, matcher: ExternalMatcher): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* 创建外部依赖判断函数
|
|
44
|
+
* 用于判断模块是否应该被视为外部依赖(不打包)
|
|
45
|
+
* @param aliases - 路径别名配置
|
|
46
|
+
* @param externalOption - 外部依赖配置
|
|
47
|
+
* @param externalNodeBuiltins - 是否将 Node.js 内置模块视为外部依赖,默认 true
|
|
48
|
+
* @param externalPackages - 是否将所有 npm 包视为外部依赖,默认 false
|
|
49
|
+
* @returns 外部依赖判断函数
|
|
50
|
+
*/
|
|
51
|
+
export declare function createExternalPredicate(aliases: Alias[], externalOption?: ExternalOption, externalNodeBuiltins?: boolean, externalPackages?: boolean): (id: string, importer?: string) => boolean;
|
|
52
|
+
/**
|
|
53
|
+
* 创建扩展名匹配器
|
|
54
|
+
* 用于快速判断文件是否具有指定的扩展名
|
|
55
|
+
* @param extensionOptions - 扩展名配置
|
|
56
|
+
* @returns 包含扩展名数组和测试函数的对象
|
|
57
|
+
*/
|
|
58
|
+
export declare function createExtensionMatcher(extensionOptions?: ExtensionConfig): {
|
|
59
|
+
extensions: string[];
|
|
60
|
+
test: (filePath: string) => boolean;
|
|
61
|
+
};
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import type { Alias, LibraryFormats, Plugin, PluginOption } from "vite";
|
|
2
|
+
export type ImportPolicy = 'error' | 'skip';
|
|
3
|
+
export type BuildFormat = LibraryFormats;
|
|
4
|
+
export type OutputStructure = 'preserve' | 'bundle';
|
|
5
|
+
export type ExtensionConfig = {
|
|
6
|
+
input?: string[];
|
|
7
|
+
mergeDefault?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type IgnoreConfig = {
|
|
10
|
+
input?: string[];
|
|
11
|
+
importPolicy?: ImportPolicy;
|
|
12
|
+
};
|
|
13
|
+
export type CopyConfig = {
|
|
14
|
+
input?: string[];
|
|
15
|
+
ignore?: {
|
|
16
|
+
input?: string[];
|
|
17
|
+
};
|
|
18
|
+
extensions?: ExtensionConfig;
|
|
19
|
+
onlyConfiguredExtensions?: boolean;
|
|
20
|
+
};
|
|
21
|
+
export type PluginsConfig = {
|
|
22
|
+
input?: PluginOption[];
|
|
23
|
+
mergeDefault?: boolean;
|
|
24
|
+
};
|
|
25
|
+
export type FilePluginOutput = {
|
|
26
|
+
type: 'copy';
|
|
27
|
+
fileName?: string;
|
|
28
|
+
sourcePath: string;
|
|
29
|
+
} | {
|
|
30
|
+
type: 'emit';
|
|
31
|
+
fileName?: string;
|
|
32
|
+
content: string;
|
|
33
|
+
};
|
|
34
|
+
export type FilePluginContext = {
|
|
35
|
+
filePath: string;
|
|
36
|
+
relativePath: string;
|
|
37
|
+
rootDir: string;
|
|
38
|
+
outDir: string;
|
|
39
|
+
format: BuildFormat;
|
|
40
|
+
read: () => Promise<string>;
|
|
41
|
+
};
|
|
42
|
+
export type BuildEntriesFilePluginOptions = {
|
|
43
|
+
name?: string;
|
|
44
|
+
apply?: 'build' | 'serve';
|
|
45
|
+
enforce?: 'pre' | 'post';
|
|
46
|
+
kind?: 'copy';
|
|
47
|
+
allowMissing?: boolean;
|
|
48
|
+
onlyConfiguredExtensions?: boolean;
|
|
49
|
+
input?: string[];
|
|
50
|
+
rootDir?: string;
|
|
51
|
+
ignore?: {
|
|
52
|
+
input?: string[];
|
|
53
|
+
};
|
|
54
|
+
extensions?: ExtensionConfig;
|
|
55
|
+
copyExtensions?: ExtensionConfig;
|
|
56
|
+
test?: (filePath: string) => boolean;
|
|
57
|
+
rename?: (relativePath: string, filePath: string) => string;
|
|
58
|
+
transform?: (context: FilePluginContext) => Promise<FilePluginOutput | FilePluginOutput[] | void> | FilePluginOutput | FilePluginOutput[] | void;
|
|
59
|
+
};
|
|
60
|
+
export type BuildEntriesFilePlugin = {
|
|
61
|
+
name: string;
|
|
62
|
+
apply?: 'build' | 'serve';
|
|
63
|
+
enforce?: 'pre' | 'post';
|
|
64
|
+
kind?: 'copy';
|
|
65
|
+
__buildEntriesFilePlugin: BuildEntriesFilePluginOptions;
|
|
66
|
+
};
|
|
67
|
+
export type InternalPlugin = Plugin & Partial<BuildEntriesFilePlugin>;
|
|
68
|
+
export type StringAlias = Alias & {
|
|
69
|
+
find: string;
|
|
70
|
+
};
|
|
71
|
+
export type BuildEntriesConfig = {
|
|
72
|
+
input?: string[];
|
|
73
|
+
format?: BuildFormat | BuildFormat[];
|
|
74
|
+
outputStructure?: OutputStructure;
|
|
75
|
+
formatOutDir?: Partial<Record<BuildFormat, string>>;
|
|
76
|
+
alias?: Record<string, string> | Alias[];
|
|
77
|
+
external?: ExternalOption;
|
|
78
|
+
externalNodeBuiltins?: boolean;
|
|
79
|
+
bundleDependencies?: boolean;
|
|
80
|
+
externalPackages?: boolean;
|
|
81
|
+
allowMissingInput?: boolean;
|
|
82
|
+
ignore?: IgnoreConfig;
|
|
83
|
+
copy?: CopyConfig;
|
|
84
|
+
minify?: boolean;
|
|
85
|
+
dtsOnly?: boolean;
|
|
86
|
+
preserveSideEffectStyleImports?: boolean;
|
|
87
|
+
extensions?: ExtensionConfig;
|
|
88
|
+
nonCodeExtensions?: ExtensionConfig;
|
|
89
|
+
plugins?: PluginOption[] | PluginsConfig;
|
|
90
|
+
dts?: boolean | {
|
|
91
|
+
enabled?: boolean;
|
|
92
|
+
outDir?: string;
|
|
93
|
+
tsconfig?: string;
|
|
94
|
+
tempDir?: string;
|
|
95
|
+
rewriteAliases?: boolean;
|
|
96
|
+
rewriteAliasMode?: 'source' | 'declaration';
|
|
97
|
+
rewriteAlias?: Record<string, string> | Alias[];
|
|
98
|
+
useInputFiles?: boolean;
|
|
99
|
+
clean?: boolean;
|
|
100
|
+
};
|
|
101
|
+
outDir?: string;
|
|
102
|
+
rootDir?: string;
|
|
103
|
+
};
|
|
104
|
+
export type ExternalMatcher = string | RegExp | ((id: string, importer?: string) => boolean);
|
|
105
|
+
export type ExternalOption = ExternalMatcher | ExternalMatcher[];
|
|
106
|
+
export type BuildEntriesResult = {
|
|
107
|
+
alias: Alias[];
|
|
108
|
+
formats: BuildFormat[];
|
|
109
|
+
outputStructure: OutputStructure;
|
|
110
|
+
bundleDependencies: boolean;
|
|
111
|
+
extensions: string[];
|
|
112
|
+
files: string[];
|
|
113
|
+
ignore: Required<IgnoreConfig>;
|
|
114
|
+
copy: NormalizedCopyConfig;
|
|
115
|
+
plugins: string[];
|
|
116
|
+
outputs: Record<string, string>;
|
|
117
|
+
dts: {
|
|
118
|
+
enabled: boolean;
|
|
119
|
+
outDir?: string;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
export type PluginFileHandler = {
|
|
123
|
+
test: (filePath: string) => boolean;
|
|
124
|
+
transform: (context: FilePluginContext) => Promise<FilePluginOutput | FilePluginOutput[] | void> | FilePluginOutput | FilePluginOutput[] | void;
|
|
125
|
+
};
|
|
126
|
+
export type CollectedPluginFile = {
|
|
127
|
+
filePath: string;
|
|
128
|
+
plugin: PluginFileHandler;
|
|
129
|
+
};
|
|
130
|
+
export type BuildContext = {
|
|
131
|
+
inputPaths: string[];
|
|
132
|
+
rootDir: string;
|
|
133
|
+
ignorePaths: string[];
|
|
134
|
+
extensions: string[];
|
|
135
|
+
allowMissingInput: boolean;
|
|
136
|
+
outDir: string;
|
|
137
|
+
format: BuildFormat;
|
|
138
|
+
};
|
|
139
|
+
export type NormalizedCopyConfig = {
|
|
140
|
+
input?: string[];
|
|
141
|
+
ignore?: {
|
|
142
|
+
input?: string[];
|
|
143
|
+
};
|
|
144
|
+
extensions: ExtensionConfig;
|
|
145
|
+
onlyConfiguredExtensions: boolean;
|
|
146
|
+
};
|
|
147
|
+
export type RunBuildOptions = {
|
|
148
|
+
format: BuildFormat;
|
|
149
|
+
outDir: string;
|
|
150
|
+
entry: Record<string, string>;
|
|
151
|
+
outputStructure: OutputStructure;
|
|
152
|
+
emptyOutDir: boolean;
|
|
153
|
+
minify?: boolean;
|
|
154
|
+
rootDir: string;
|
|
155
|
+
preserveSideEffectStyleImports?: boolean;
|
|
156
|
+
plugins: Plugin[];
|
|
157
|
+
aliases: Alias[];
|
|
158
|
+
external: (id: string, importer?: string) => boolean;
|
|
159
|
+
};
|
|
160
|
+
export type NormalizedDtsConfig = {
|
|
161
|
+
enabled: boolean;
|
|
162
|
+
outDir: string;
|
|
163
|
+
tsconfig?: string;
|
|
164
|
+
tempDir?: string;
|
|
165
|
+
rewriteAliases: boolean;
|
|
166
|
+
rewriteAliasMode: 'source' | 'declaration';
|
|
167
|
+
rewriteAlias?: Record<string, string> | Alias[];
|
|
168
|
+
useInputFiles: boolean;
|
|
169
|
+
clean: boolean;
|
|
170
|
+
};
|
|
171
|
+
export type AliasRewriteRule = {
|
|
172
|
+
find: string;
|
|
173
|
+
replacement: string;
|
|
174
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Alias } from "vite";
|
|
2
|
+
import type { StringAlias } from "./types.ts";
|
|
3
|
+
/**
|
|
4
|
+
* 检查路径是否存在
|
|
5
|
+
* @param targetPath - 目标路径
|
|
6
|
+
* @returns 路径是否存在
|
|
7
|
+
*/
|
|
8
|
+
export declare function pathExists(targetPath: string): Promise<boolean>;
|
|
9
|
+
/**
|
|
10
|
+
* 将路径转换为 POSIX 格式(使用正斜杠)
|
|
11
|
+
* 确保跨平台路径一致性
|
|
12
|
+
* @param value - 输入路径
|
|
13
|
+
* @returns POSIX 格式路径
|
|
14
|
+
*/
|
|
15
|
+
export declare function toPosixPath(value: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* 确保相对导入路径格式正确
|
|
18
|
+
* 为不以点开头的相对路径添加 './' 前缀
|
|
19
|
+
* @param value - 相对路径
|
|
20
|
+
* @returns 格式化后的相对导入路径
|
|
21
|
+
*/
|
|
22
|
+
export declare function ensureRelativeImportPath(value: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* 将值转换为数组
|
|
25
|
+
* @param value - 输入值(单个值、数组、null 或 undefined)
|
|
26
|
+
* @returns 数组
|
|
27
|
+
*/
|
|
28
|
+
export declare function toArray<T>(value: T | T[] | null | undefined): T[];
|
|
29
|
+
/**
|
|
30
|
+
* 判断别名是否为字符串类型别名
|
|
31
|
+
* 用于区分字符串别名和正则别名
|
|
32
|
+
* @param alias - Vite Alias 对象
|
|
33
|
+
* @returns 是否为字符串别名
|
|
34
|
+
*/
|
|
35
|
+
export declare function isStringAlias(alias: Alias): alias is StringAlias;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`../../_virtual/_rolldown/runtime.js`);let t=require(`ajv`);t=e.__toESM(t);var n=new t.default,r=`http://json-schema.org/draft-07/schema#`,i=(e,t,i)=>{if(t[e]&&i[e]){i[e].$schema=r;let a=n.compile(i[e]);return[a(t[e]),a]}},a=e=>async(t,r)=>{let{path:a,method:o}=t;if(a.indexOf(`/api`)<0)return r();let s=e.currentUseRouter,c;for(let e of s){let t=e.match(a,`get`);if(t){c=t;break}}let l=c?.path[0]?.path;if(l){let r=e.extends.parsingParamsOnUrl(l,a),{body:s,query:c,headers:u}=t.request,d={params:r,body:s,query:c,headers:u};e.extends.logger?.info(`--[api params verify] [${o} ${a}] body: ${JSON.stringify(s)}--`),e.extends.logger?.info(`--[api params verify] [${o} ${a}] query: ${JSON.stringify(c)}--`),e.extends.logger?.info(`--[api params verify] [${o} ${a}] params: ${JSON.stringify(r)}--`),e.extends.logger?.info(`--[api params verify] [${o} ${a}] headers: ${JSON.stringify(u)}--`);let f=e.routerSchema[l]?.[o.toLowerCase()];if(f){let t=!0,r,a=[`headers`,`body`,`query`,`params`];for(let e=0;e<a.length;e++){let n=a[e];if(t){let e=i(n,{...d},f);t=e?.[0]??!0,r=e?.[1]}}if(!t){let t=`request vaidate fail: ${n.errorsText(r?.errors)}`;e.extends.logger?.error(`--[api valid error] message: ${t}--`),e.extends.generateErrorMessage(t,{showError:!0,code:442})}}}return r()};module.exports=a;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`../../_virtual/_rolldown/runtime.js`);let t=require(`md5`);t=e.__toESM(t);var n=1e3*60*10,r=e=>async(r,i)=>{let{path:a,method:o}=r;if(a.includes(`api`)&&!e.config?.apiSignVerify?.whiteList?.includes(a)){e.extends.logger?.info(`--[api-sign-verify]--`);let{s_sign:i,s_t:s}=r.request.header,{signKey:c}=e.config,l=(0,t.default)(`${c}_${s}`);e.extends.logger?.info(`[${o} ${a}] signature: ${l}`),(!s||!i||i.toLowerCase()!==l||Date.now()-Number(s)>n)&&e.extends.generateErrorMessage(`signature not correct or api timeout`,{showError:!0,code:100014})}await i()};module.exports=r;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=()=>async(e,t)=>{let n=e.headers.projk,{path:r}=e;if(r.indexOf(`/api/proj/`)!==-1&&(!n||[`undefined`,`null`].includes(n))){e.status=200,e.body={code:110,data:null,message:`请求不合法`};return}e.extInfo={key:n},await t()};module.exports=e;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
//#region app/middleware/project-handler.ts
|
|
2
|
-
var e = () => async (e, t) => {
|
|
3
|
-
let n = e.headers.projk, { path: r } = e;
|
|
4
|
-
if (r.indexOf("/api/proj/") !== -1 && (!n || ["undefined", "null"].includes(n))) {
|
|
5
|
-
e.status = 200, e.body = {
|
|
6
|
-
code: 110,
|
|
7
|
-
data: null,
|
|
8
|
-
message: "请求不合法"
|
|
9
|
-
};
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
e.extInfo = { key: n }, await t();
|
|
13
|
-
};
|
|
14
|
-
//#endregion
|
|
15
|
-
export { e as default };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
// & {
|
|
3
|
-
// /**
|
|
4
|
-
// * 按钮事件名
|
|
5
|
-
// */
|
|
6
|
-
// eventKey: 'romve' | 'showComponent';
|
|
7
|
-
// /**
|
|
8
|
-
// * 事件配置 (参数配置)
|
|
9
|
-
// */
|
|
10
|
-
// params: {
|
|
11
|
-
// /**
|
|
12
|
-
// * @example user_id: '$schema::tableKey' | '123' | 123
|
|
13
|
-
// */
|
|
14
|
-
// [paramKey: string]: ParamsValueData;
|
|
15
|
-
// };
|
|
16
|
-
// };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/fe/model/types/model.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { isNonNullable } from "../guards";
|
|
2
|
-
export function toArray(value) {
|
|
3
|
-
if (value === null || value === undefined)
|
|
4
|
-
return [];
|
|
5
|
-
return Array.isArray(value) ? [...value] : [value];
|
|
6
|
-
}
|
|
7
|
-
export const compact = (items) => {
|
|
8
|
-
return items.filter(isNonNullable);
|
|
9
|
-
};
|
|
10
|
-
export const uniqueBy = (items, getKey) => {
|
|
11
|
-
const keys = new Set();
|
|
12
|
-
const result = [];
|
|
13
|
-
for (const item of items) {
|
|
14
|
-
const key = getKey(item);
|
|
15
|
-
if (keys.has(key))
|
|
16
|
-
continue;
|
|
17
|
-
keys.add(key);
|
|
18
|
-
result.push(item);
|
|
19
|
-
}
|
|
20
|
-
return result;
|
|
21
|
-
};
|
|
22
|
-
export const groupBy = (items, getKey) => {
|
|
23
|
-
const result = {};
|
|
24
|
-
for (const item of items) {
|
|
25
|
-
const key = getKey(item);
|
|
26
|
-
result[key] = result[key] ?? [];
|
|
27
|
-
result[key].push(item);
|
|
28
|
-
}
|
|
29
|
-
return result;
|
|
30
|
-
};
|
|
31
|
-
export const chunk = (items, size) => {
|
|
32
|
-
if (!Number.isInteger(size) || size <= 0) {
|
|
33
|
-
throw new RangeError("chunk size must be a positive integer");
|
|
34
|
-
}
|
|
35
|
-
const result = [];
|
|
36
|
-
for (let index = 0; index < items.length; index += size) {
|
|
37
|
-
result.push(items.slice(index, index + size));
|
|
38
|
-
}
|
|
39
|
-
return result;
|
|
40
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|