From ccd799f85fd1d3ba56d9a9f203081f0d9b69beb4 Mon Sep 17 00:00:00 2001 From: sealday Date: Fri, 24 May 2024 13:06:59 +0800 Subject: [PATCH] refactor: migrate names (#1050) Reviewed-on: https://git.daoyoucloud.com/daoyoucloud/tachybase/pulls/1050 --- .env.e2e.example | 14 +- .env.example | 10 +- .env.test.example | 12 +- Dockerfile | 22 +- README.md | 2 +- packages/core/actions/package.json | 8 +- packages/core/app/client/.umirc.ts | 10 +- packages/core/app/client/src/pages/index.tsx | 9 +- packages/core/app/package.json | 3 +- .../core/app/src/__tests__/commands.test.ts | 45 +- packages/core/auth/package.json | 8 +- .../{nocobase-build.js => tachybase-build.js} | 0 packages/core/build/package.json | 5 +- packages/core/build/src/buildPlugin.ts | 4 +- .../core/build/src/utils/buildPluginUtils.ts | 2 +- packages/core/build/src/utils/utils.ts | 2 +- packages/core/cache/package.json | 3 +- packages/core/cli/package.json | 2 +- packages/core/cli/src/commands/build.ts | 2 +- .../cli/src/commands/create-nginx-conf.ts | 6 +- packages/core/cli/src/commands/tar.ts | 2 +- packages/core/cli/src/plugin-generator.ts | 2 +- packages/core/cli/src/util.ts | 2 +- .../{nocobase.conf.tpl => tachybase.conf.tpl} | 2 +- packages/core/client/package.json | 3 +- packages/core/client/src/api-client/index.md | 6 +- .../AppSchemaComponentProvider.tsx | 8 +- .../client/src/application/WebSocketClient.ts | 5 +- .../client/src/application/demos/demo1.tsx | 7 +- .../client/src/application/demos/demo2.tsx | 7 +- .../client/src/application/demos/demo3.tsx | 4 +- packages/core/client/src/application/index.md | 2 +- .../schema-initializer/hooks/index.tsx | 6 +- .../schema-settings/hooks/index.tsx | 17 +- .../src/application/utils/globalDeps.ts | 51 +- .../src/application/utils/remotePlugins.ts | 4 +- .../client/src/block-provider/hooks/index.ts | 2 +- .../hooks/useDataBlockSourceId.tsx | 2 +- .../index.tsx | 21 +- .../plugins/LocalePlugin.ts | 2 + .../src/collection-manager/action-hooks.ts | 6 +- .../src/css-variable/CSSVariableProvider.tsx | 14 +- .../data-block/DataBlockRequestProvider.tsx | 17 +- .../core/client/src/document-title/index.md | 2 +- .../client/src/hooks/useAdminSchemaUid.ts | 2 +- packages/core/client/src/i18n/i18n.ts | 5 +- packages/core/client/src/index.ts | 2 +- .../disassociate/__e2e__/templatesOfPage.ts | 4 +- .../form-create/associationForm.test.ts | 5 +- .../lazyLoadAssociationFields.test.ts | 11 +- .../form-create/lazyLoadVariables.test.ts | 2 +- .../form-create/schemaInitializer.test.ts | 9 +- .../form-create/schemaSettings.test.ts | 13 +- .../__e2e__/form-create/templatesOfBug.ts | 18 +- .../createGridCardBlockSchema.test.ts | 4 +- .../grid-card/createGridCardBlockUISchema.ts | 2 +- .../__tests__/createListBlockSchema.test.ts | 2 +- .../list/createListBlockUISchema.ts | 2 +- .../table-selector/__e2e__/templatesOfBug.ts | 4 +- .../createTableSelectorSchema.test.ts | 2 +- .../createTableSelectorUISchema.ts | 5 +- .../table/__e2e__/actions/duplicate.test.ts | 3 +- .../table/__e2e__/actions/filter.test.ts | 5 +- .../table/__e2e__/templatesOfBug.ts | 8 +- .../__tests__/createTableBLockSchema.test.ts | 2 +- .../table/createTableBlockUISchema.ts | 5 +- .../modules/dialog/__e2e__/templatesOfBug.ts | 14 +- .../src/modules/dialog/__e2e__/zIndex.test.ts | 5 +- .../component/DatePicker/__e2e__/utils.ts | 3 +- .../route-switch/antd/admin-layout/index.tsx | 12 +- .../antd/action/Action.Modal.tsx | 2 +- .../schema-component/antd/action/Action.tsx | 8 +- .../antd/date-picker/index.md | 2 +- .../__tests__/error-fallback.test.tsx | 5 +- .../antd/filter/__tests__/filter.test.tsx | 7 +- .../antd/form-dialog/index.tsx | 30 +- ...eLazyLoadDisplayAssociationFieldsOfForm.ts | 13 +- .../form-item/hooks/useParseDefaultValue.ts | 14 +- .../antd/form-item/hooks/useSpecialCase.ts | 13 +- .../schema-component/antd/form-v2/Form.tsx | 2 +- .../antd/form/__tests__/form.test.tsx | 5 +- .../antd/form/demos/demo8.tsx | 9 +- .../antd/input/__tests__/Input.test.tsx | 21 +- .../src/schema-component/antd/menu/Menu.tsx | 2 +- .../antd/page/__tests__/page.test.tsx | 5 +- .../antd/page/demos/demo1.tsx | 6 +- .../schema-component/antd/popover/Popover.tsx | 5 +- .../antd/preview/demos/demo1.tsx | 9 +- .../antd/table/Table.Array.tsx | 2 +- .../antd/upload/demos/apiClient.ts | 2 +- .../antd/upload/demos/demo2.tsx | 9 +- .../schema-component/common/utils/uitls.tsx | 3 +- .../schema-component/hooks/useDesignable.tsx | 19 +- .../buttons/TabPaneInitializers.tsx | 14 +- .../assigned-field/AssignedField.tsx | 14 +- .../client/src/schema-initializer/index.md | 2 +- .../client/src/schema-initializer/utils.ts | 18 +- .../SchemaSettingsDefaultValue.tsx | 2 +- .../VariableInput/VariableInput.tsx | 13 +- .../VariableInput/hooks/useFormVariable.ts | 9 +- .../hooks/useIterationVariable.ts | 8 +- .../core/client/src/schema-settings/index.md | 2 +- .../schema-templates/BlockTemplateDetails.tsx | 6 +- .../schema-templates/BlockTemplatePage.tsx | 6 +- .../src/variables/VariablesProvider.tsx | 11 +- .../core/create-tachybase-app/package.json | 3 +- packages/core/create-tachybase-app/src/cli.js | 4 +- .../create-tachybase-app/src/generator.js | 4 +- .../templates/app/.env.e2e.tpl | 14 +- .../templates/app/.env.test.tpl | 10 +- .../templates/app/.env.tpl | 2 +- .../core/data-source-manager/package.json | 8 +- packages/core/database/package.json | 3 +- .../__tests__/operator/array-operator.test.ts | 4 +- .../__tests__/value-parsers/to-many.test.ts | 4 +- packages/core/database/src/mock-database.ts | 6 +- packages/core/devtools/package.json | 8 +- packages/core/devtools/umiConfig.d.ts | 2 +- packages/core/devtools/umiConfig.js | 12 +- packages/core/evaluators/package.json | 8 +- packages/core/logger/package.json | 10 +- .../logger/src/deprecated/create-logger.ts | 4 +- packages/core/resourcer/package.json | 8 +- packages/core/schema/package.json | 3 +- packages/core/sdk/package.json | 3 +- packages/core/sdk/src/APIClient.ts | 11 +- .../core/sdk/src/__tests__/api-client.test.ts | 11 +- packages/core/server/package.json | 3 +- .../server/src/__tests__/app-command.test.ts | 10 +- .../core/server/src/__tests__/gateway.test.ts | 5 +- packages/core/server/src/application.ts | 27 +- packages/core/server/src/commands/console.ts | 2 +- packages/core/server/src/commands/upgrade.ts | 5 +- packages/core/server/src/gateway/index.ts | 2 +- .../server/src/plugin-manager/constants.ts | 2 +- .../core/server/src/plugin-manager/utils.ts | 2 +- packages/core/server/src/swagger/index.json | 2 +- packages/core/telemetry/package.json | 10 +- packages/core/telemetry/src/metric.ts | 11 +- packages/core/telemetry/src/telemetry.ts | 7 +- packages/core/telemetry/src/trace.ts | 5 +- packages/core/test/package.json | 3 +- .../core/test/playwright/tests/auth.setup.ts | 2 +- packages/core/test/src/e2e/e2eUtils.ts | 19 +- packages/core/test/src/e2e/templatesOfPage.ts | 52 +- packages/core/utils/package.json | 3 +- .../VC.ApproverInterface.tsx | 2 +- .../LauncherInterface.schema.tsx | 2 +- .../launch/apply-button/VC.ApplyButton.tsx | 14 +- .../src/server/ApprovalInstruction.ts | 2 +- .../components/filter-form/VariableInput.tsx | 30 +- .../components/system/Notifications.tsx | 12 +- .../src/client/hooks/useTokenConfiguration.ts | 4 +- .../src/client/pages/AdminLayout.tsx | 32 +- .../src/client/HomePageConfiguration.tsx | 2 +- .../@tachybase/plugin-acl/package.json | 10 +- .../src/client/__e2e__/association.test.ts | 12 +- .../src/client/__e2e__/collection.test.ts | 34 +- .../src/client/__e2e__/configure.test.ts | 12 +- .../src/client/__e2e__/menu.test.ts | 2 +- .../plugin-acl/src/client/__e2e__/utils.ts | 4 +- .../plugin-acl/src/swagger/index.ts | 2 +- .../src/client/__e2e__/utils.ts | 2 +- .../plugin-action-bulk-update/package.json | 5 +- .../src/client/__e2e__/utils.ts | 2 +- .../src/client/__e2e__/utils.ts | 2 +- .../plugin-action-print/package.json | 5 +- .../src/client/__e2e__/utils.ts | 2 +- .../@tachybase/plugin-api-doc/package.json | 14 +- .../src/server/swagger/index.ts | 8 +- .../@tachybase/plugin-api-doc/src/swagger.ts | 2 +- .../plugin-api-keys/docs/en-US/index.md | 2 +- .../plugin-api-keys/docs/en-US/usage.md | 4 +- .../plugin-api-keys/docs/zh-CN/index.md | 2 +- .../plugin-api-keys/docs/zh-CN/usage.md | 4 +- .../@tachybase/plugin-api-keys/package.json | 5 +- .../src/client/Configuration/schema.tsx | 2 +- .../plugin-api-keys/src/swagger/index.ts | 2 +- .../plugins/@tachybase/plugin-auth/README.md | 2 +- .../plugin-auth/src/swagger/index.ts | 2 +- .../plugin-backup-restore/README.md | 8 +- .../plugin-backup-restore/README.zh-CN.md | 8 +- .../plugin-backup-restore/package.json | 10 +- .../src/server/__tests__/dump-action.test.ts | 2 +- .../src/server/__tests__/index.ts | 2 +- .../src/server/app-migrator.ts | 2 +- .../src/server/restorer.ts | 2 +- .../src/swagger/index.ts | 2 +- .../@tachybase/plugin-calendar/package.json | 10 +- .../src/client/__e2e__/templates.ts | 2 +- .../plugins/@tachybase/plugin-cas/README.md | 2 +- .../@tachybase/plugin-cas/README.zh-CN.md | 2 +- .../@tachybase/plugin-cas/package.json | 5 +- .../plugin-china-region/package.json | 5 +- .../src/swagger/index.json | 2 +- .../@tachybase/plugin-client/package.json | 7 +- .../20231215215245-admin-menu-uid.test.ts | 4 +- .../20231215215247-admin-menu-uid.ts | 6 +- .../plugin-client/src/server/server.ts | 2 +- .../plugin-client/src/swagger/index.json | 2 +- .../plugin-collection-manager/package.json | 9 +- .../collection-template/general.test.ts | 2 +- .../fields/manyToOne/schemaSettings.test.ts | 2 +- .../__e2e__/fields/url/schemaSettings.test.ts | 12 +- .../src/swagger/index.ts | 2 +- .../plugin-custom-request/package.json | 5 +- .../CustomRequestConfigurationFields.ts | 2 +- .../component/CreateDatabaseConnectAction.tsx | 4 +- .../__tests__/data-source-with-acl.test.ts | 2 +- .../src/server/__tests__/data-sources.test.ts | 2 +- .../src/swagger/index.ts | 2 +- .../plugin-error-handler/package.json | 8 +- .../@tachybase/plugin-export/package.json | 5 +- .../plugin-export/src/swagger/index.json | 2 +- .../plugin-file-manager/package.json | 5 +- .../src/server/__tests__/attachment.test.ts | 4 +- .../server/__tests__/storages/ali-oss.test.ts | 2 +- .../src/server/__tests__/storages/s3.test.ts | 2 +- .../src/swagger/index.json | 2 +- .../plugin-formula-field/package.json | 5 +- .../client/__e2e__/schemaInitailizer.test.ts | 4 +- .../src/client/GraphCollectionShortcut.tsx | 2 +- .../src/client/utils.tsx | 6 +- .../plugin-iframe-block/package.json | 5 +- .../plugin-iframe-block/src/swagger/index.ts | 2 +- .../@tachybase/plugin-import/README.md | 4 +- .../@tachybase/plugin-import/README.zh-CN.md | 4 +- .../@tachybase/plugin-import/package.json | 5 +- .../plugin-import/src/swagger/index.json | 2 +- .../client/__e2e__/schemaInitailizer.test.ts | 4 +- .../plugin-kanban/src/client/__e2e__/utils.ts | 2 +- .../__tests__/createKanbanBlockSchema.test.ts | 2 +- .../src/client/createKanbanBlockUISchema.ts | 2 +- .../package.json | 5 +- .../src/server/actions/localization.ts | 2 +- .../src/swagger/index.json | 2 +- .../@tachybase/plugin-logger/package.json | 5 +- .../@tachybase/plugin-map/package.json | 5 +- .../src/client/components/AMap/Map.tsx | 2 +- .../src/client/hooks/useMapConfiguration.ts | 2 +- .../plugin-map/src/swagger/index.ts | 2 +- .../core/schema/components/container/style.ts | 4 +- .../core/schema/components/menu/style.ts | 2 +- .../core/schema/components/page/Page.tsx | 12 +- .../core/schema/components/page/style.ts | 8 +- .../schema/components/settings/Settings.tsx | 6 +- .../client/core/schema/scopes/grid-card.ts | 6 +- .../src/client/router/Application.tsx | 18 +- .../20231215215233-mobile-container-uid.ts | 6 +- .../plugin-mobile-client/src/server/plugin.ts | 4 +- .../plugin-mock-collections/package.json | 3 +- .../server/__tests__/multiple-apps.test.ts | 4 +- .../src/swagger/index.ts | 2 +- .../package.json | 4 +- .../server/__tests__/collection-sync.test.ts | 6 +- .../src/server/plugin.ts | 4 +- .../plugin-notifications/package.json | 3 +- .../server/__tests__/notifications.test.ts | 2 +- .../@tachybase/plugin-oidc/README.zh-CN.md | 4 +- .../@tachybase/plugin-oidc/package.json | 5 +- .../plugin-oidc/src/client/Options.tsx | 4 +- .../@tachybase/plugin-oidc/src/constants.ts | 2 +- .../plugin-oidc/src/locale/en-US.json | 4 +- .../plugin-oidc/src/locale/ko_KR.json | 4 +- .../plugin-oidc/src/locale/zh-CN.json | 4 +- .../src/server/__tests__/oidc.test.ts | 8 +- .../plugin-oidc/src/server/oidc-auth.ts | 2 +- .../plugin-oidc/src/swagger/index.ts | 4 +- .../@tachybase/plugin-saml/README.zh-CN.md | 4 +- .../@tachybase/plugin-saml/package.json | 5 +- .../src/server/__tests__/saml.test.ts | 10 +- .../plugin-saml/src/swagger/index.ts | 2 +- .../@tachybase/plugin-sample-hello/.npmignore | 2 - .../@tachybase/plugin-sample-hello/README.md | 28 - .../plugin-sample-hello/client.d.ts | 2 - .../@tachybase/plugin-sample-hello/client.js | 1 - .../plugin-sample-hello/package.json | 22 - .../plugin-sample-hello/server.d.ts | 2 - .../@tachybase/plugin-sample-hello/server.js | 1 - .../plugin-sample-hello/src/client/index.tsx | 68 -- .../plugin-sample-hello/src/index.ts | 2 - .../src/server/actions/.gitkeep | 0 .../src/server/collections/.gitkeep | 0 .../plugin-sample-hello/src/server/index.ts | 32 - .../src/server/models/.gitkeep | 0 .../src/server/repositories/.gitkeep | 0 .../plugin-sequence-field/package.json | 5 +- .../src/client/sequence.tsx | 2 +- .../@tachybase/plugin-sms-auth/package.json | 5 +- .../plugin-snapshot-field/package.json | 5 +- .../src/swagger/index.ts | 2 +- .../src/swagger/index.json | 2 +- .../@tachybase/plugin-theme-editor/README.md | 2 +- .../plugin-theme-editor/README.zh-CN.md | 2 +- .../plugin-theme-editor/src/swagger/index.ts | 2 +- .../plugin-ui-schema-storage/package.json | 5 +- .../src/swagger/index.ts | 2 +- .../@tachybase/plugin-users/package.json | 5 +- .../20230802183100-update-username.ts | 2 +- .../plugin-users/src/server/server.ts | 2 +- .../plugin-users/src/swagger/index.json | 2 +- .../plugin-verification/package.json | 5 +- .../src/swagger/index.json | 2 +- .../src/e2e/e2eCollectionModel.ts | 3 +- .../plugin-workflow-test/src/e2e/e2eUtils.ts | 10 +- .../@tachybase/plugin-workflow/package.json | 4 +- .../manual/instruction/SchemaConfig.tsx | 26 +- .../features/request/RequestInstruction.tsx | 5 +- .../client/features/sql/SQLInstruction.tsx | 8 +- .../client/triggers/schedule/RepeatField.tsx | 8 +- .../plugin-workflow/src/swagger/index.ts | 2 +- packages/presets/base/src/client/index.ts | 4 +- pnpm-lock.yaml | 730 +++++++++--------- storage/.gitignore | 2 +- 314 files changed, 1260 insertions(+), 1510 deletions(-) rename packages/core/build/bin/{nocobase-build.js => tachybase-build.js} (100%) rename packages/core/cli/{nocobase.conf.tpl => tachybase.conf.tpl} (98%) rename packages/core/client/src/{nocobase-buildin-plugin => buildin-plugin}/index.tsx (96%) rename packages/core/client/src/{nocobase-buildin-plugin => buildin-plugin}/plugins/LocalePlugin.ts (99%) delete mode 100644 packages/plugins/@tachybase/plugin-sample-hello/.npmignore delete mode 100644 packages/plugins/@tachybase/plugin-sample-hello/README.md delete mode 100644 packages/plugins/@tachybase/plugin-sample-hello/client.d.ts delete mode 100644 packages/plugins/@tachybase/plugin-sample-hello/client.js delete mode 100644 packages/plugins/@tachybase/plugin-sample-hello/package.json delete mode 100644 packages/plugins/@tachybase/plugin-sample-hello/server.d.ts delete mode 100644 packages/plugins/@tachybase/plugin-sample-hello/server.js delete mode 100644 packages/plugins/@tachybase/plugin-sample-hello/src/client/index.tsx delete mode 100644 packages/plugins/@tachybase/plugin-sample-hello/src/index.ts delete mode 100644 packages/plugins/@tachybase/plugin-sample-hello/src/server/actions/.gitkeep delete mode 100644 packages/plugins/@tachybase/plugin-sample-hello/src/server/collections/.gitkeep delete mode 100644 packages/plugins/@tachybase/plugin-sample-hello/src/server/index.ts delete mode 100644 packages/plugins/@tachybase/plugin-sample-hello/src/server/models/.gitkeep delete mode 100644 packages/plugins/@tachybase/plugin-sample-hello/src/server/repositories/.gitkeep diff --git a/.env.e2e.example b/.env.e2e.example index 17bc58b16..b9b8e75f9 100644 --- a/.env.e2e.example +++ b/.env.e2e.example @@ -6,10 +6,10 @@ DB_POSTGRES_PORT=10103 VERDACCIO_PORT=10104 # VERDACCIO_URL=http://host.docker.internal:10104/ -################# NOCOBASE APPLICATION ################# +################# TACHYBASE APPLICATION ################# # !!! When `APP_ENV=production`, opening http://localhost:13000/ will show "Not Found". -# !!! It is recommended to use nginx to proxy static files. For example https://github.com/nocobase/nocobase/blob/main/docker/nocobase/nocobase.conf +# !!! It is recommended to use nginx to proxy static files. For example https://github.com/tachybase/tachybase/blob/main/docker/tachybase/tachybase.conf APP_ENV=development APP_PORT=20000 APP_KEY=test-key-e2e @@ -31,13 +31,13 @@ LOGGER_BASE_PATH=storage/e2e/logs ################# DATABASE ################# DB_DIALECT=postgres -DB_STORAGE=storage/e2e/db/nocobase.sqlite +DB_STORAGE=storage/e2e/db/tachybase.sqlite DB_TABLE_PREFIX= DB_HOST=localhost DB_PORT=5432 -DB_DATABASE=nocobase-e2e -DB_USER=nocobase -DB_PASSWORD=nocobase +DB_DATABASE=tachybase-e2e +DB_USER=tachybase +DB_PASSWORD=tachybase # DB_LOGGING=on # DB_UNDERSCORED=false @@ -56,7 +56,7 @@ DB_PASSWORD=nocobase INIT_ROOT_EMAIL=admin@tachybase.com INIT_ROOT_PASSWORD=admin123 INIT_ROOT_NICKNAME=Super Admin -INIT_ROOT_USERNAME=nocobase +INIT_ROOT_USERNAME=tachybase # local or ali-oss DEFAULT_STORAGE_TYPE=local diff --git a/.env.example b/.env.example index 492d6dace..dfaced636 100644 --- a/.env.example +++ b/.env.example @@ -6,10 +6,10 @@ DB_POSTGRES_PORT=10103 VERDACCIO_PORT=10104 # VERDACCIO_URL=http://host.docker.internal:10104/ -################# NOCOBASE APPLICATION ################# +################# TACHYBASE APPLICATION ################# # !!! When `APP_ENV=production`, opening http://localhost:13000/ will show "Not Found". -# !!! It is recommended to use nginx to proxy static files. For example https://github.com/nocobase/nocobase/blob/main/docker/nocobase/nocobase.conf +# !!! It is recommended to use nginx to proxy static files. For example https://github.com/tachybase/tachybase/blob/main/docker/tachybase/tachybase.conf APP_ENV=development APP_PORT=13000 APP_KEY=test-key @@ -32,13 +32,13 @@ LOGGER_FORMAT= ################# DATABASE ################# DB_DIALECT=sqlite -DB_STORAGE=storage/db/nocobase.sqlite +DB_STORAGE=storage/db/tachybase.sqlite DB_TABLE_PREFIX= # DB_HOST=localhost # DB_PORT=5432 # DB_DATABASE=postgres -# DB_USER=nocobase -# DB_PASSWORD=nocobase +# DB_USER=tachybase +# DB_PASSWORD=tachybase # DB_LOGGING=on # DB_UNDERSCORED=false diff --git a/.env.test.example b/.env.test.example index 21ee3d961..ae891e731 100644 --- a/.env.test.example +++ b/.env.test.example @@ -1,4 +1,4 @@ -################# NOCOBASE APPLICATION ################# +################# TACHYBASE APPLICATION ################# APP_ENV=development APP_PORT=13000 @@ -12,12 +12,12 @@ PROXY_TARGET_URL= ################# DATABASE ################# DB_DIALECT=sqlite -DB_STORAGE=storage/db/nocobase-test.sqlite +DB_STORAGE=storage/db/tachybase-test.sqlite # DB_HOST=localhost # DB_PORT=5432 -# DB_DATABASE=nocobase-test -# DB_USER=nocobase -# DB_PASSWORD=nocobase +# DB_DATABASE=tachybase-test +# DB_USER=tachybase +# DB_PASSWORD=tachybase # DB_LOGGING=on ################# CACHE ################# @@ -29,7 +29,7 @@ DB_STORAGE=storage/db/nocobase-test.sqlite INIT_ROOT_EMAIL=admin@tachybase.com INIT_ROOT_PASSWORD=admin123 INIT_ROOT_NICKNAME=Super Admin -INIT_ROOT_USERNAME=nocobase +INIT_ROOT_USERNAME=tachybase # local or ali-oss DEFAULT_STORAGE_TYPE=local diff --git a/Dockerfile b/Dockerfile index 8f007ab52..341b1f096 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM node:20-bullseye-slim as base RUN apt-get update && apt-get install -y nginx RUN rm -rf /etc/nginx/sites-enabled/default -COPY ./docker/nocobase/nocobase.conf /etc/nginx/sites-enabled/nocobase.conf +COPY ./docker/tachybase/tachybase.conf /etc/nginx/sites-enabled/tachybase.conf FROM node:20-bullseye as build-template-app ARG NPM_REGISTRY=https://registry.npmjs.org/ @@ -12,25 +12,25 @@ ENV PATH="$PNPM_HOME:$PATH" RUN corepack enable WORKDIR /app -RUN cd /app && npx --registry $NPM_REGISTRY create-tachybase-app@$TACHYBASE_VERSION my-nocobase-app -a -e APP_ENV=production +RUN cd /app && npx --registry $NPM_REGISTRY create-tachybase-app@$TACHYBASE_VERSION my-tachybase-app -a -e APP_ENV=production RUN pnpm config set registry $NPM_REGISTRY -RUN --mount=type=cache,id=pnpm,target=/pnpm/store cd /app/my-nocobase-app && pnpm install --production +RUN --mount=type=cache,id=pnpm,target=/pnpm/store cd /app/my-tachybase-app && pnpm install --production -WORKDIR /app/my-nocobase-app +WORKDIR /app/my-tachybase-app RUN cd /app \ - && rm -rf my-nocobase-app/packages/app/client/src/.umi \ - && rm -rf nocobase.tar.gz \ - && tar -zcf ./nocobase.tar.gz -C /app/my-nocobase-app . + && rm -rf my-tachybase-app/packages/app/client/src/.umi \ + && rm -rf tachybase.tar.gz \ + && tar -zcf ./tachybase.tar.gz -C /app/my-tachybase-app . FROM base AS build-app -COPY --from=build-template-app /app/nocobase.tar.gz /app/nocobase.tar.gz +COPY --from=build-template-app /app/tachybase.tar.gz /app/tachybase.tar.gz -WORKDIR /app/nocobase +WORKDIR /app/tachybase -RUN mkdir -p /app/nocobase/storage/uploads/ && echo "$COMMIT_HASH" >> /app/nocobase/storage/uploads/COMMIT_HASH +RUN mkdir -p /app/tachybase/storage/uploads/ && echo "$COMMIT_HASH" >> /app/tachybase/storage/uploads/COMMIT_HASH -COPY ./docker/nocobase/docker-entrypoint.sh /app/ +COPY ./docker/tachybase/docker-entrypoint.sh /app/ ENV PNPM_HOME="/pnpm" ENV PATH="$PNPM_HOME:$PATH" diff --git a/README.md b/README.md index f2d6dec0d..f16ca53a5 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,4 @@ TachyCode is a scalability-first, open-source no-code development platform. -It is based on the last Apache version fork of the open-source NocoBase. +It is based on the last Apache version fork of the open-source TachyBase. diff --git a/packages/core/actions/package.json b/packages/core/actions/package.json index 73a1eee1e..c6cd2f9ff 100644 --- a/packages/core/actions/package.json +++ b/packages/core/actions/package.json @@ -2,11 +2,6 @@ "name": "@tachybase/actions", "version": "0.21.34", "description": "", - "repository": { - "type": "git", - "url": "git+https://github.com/nocobase/nocobase.git", - "directory": "packages/actions" - }, "license": "Apache-2.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -18,6 +13,5 @@ "koa": "^2.13.4", "lodash": "4.17.21", "sequelize": "^6.26.0" - }, - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" + } } diff --git a/packages/core/app/client/.umirc.ts b/packages/core/app/client/.umirc.ts index 70203b453..2ea785e56 100644 --- a/packages/core/app/client/.umirc.ts +++ b/packages/core/app/client/.umirc.ts @@ -38,10 +38,10 @@ export default defineConfig({ { content: isDevCmd ? '' : ` window['__webpack_public_path__'] = '{{env.APP_PUBLIC_PATH}}'; - window['__nocobase_public_path__'] = '{{env.APP_PUBLIC_PATH}}'; - window['__nocobase_api_base_url__'] = '{{env.API_BASE_URL}}'; - window['__nocobase_ws_url__'] = '{{env.WS_URL}}'; - window['__nocobase_ws_path__'] = '{{env.WS_PATH}}'; + window['__tachybase_public_path__'] = '{{env.APP_PUBLIC_PATH}}'; + window['__tachybase_api_base_url__'] = '{{env.API_BASE_URL}}'; + window['__tachybase_ws_url__'] = '{{env.WS_URL}}'; + window['__tachybase_ws_path__'] = '{{env.WS_PATH}}'; `, }, ], @@ -75,7 +75,7 @@ export default defineConfig({ }, chainWebpack(config, { env }) { if (env === 'production') { - config.plugin('ignore nocobase plugins').use(require('webpack').IgnorePlugin, [ + config.plugin('ignore tachybase plugins').use(require('webpack').IgnorePlugin, [ { resourceRegExp: new RegExp(pluginPrefix.join('|')), }, diff --git a/packages/core/app/client/src/pages/index.tsx b/packages/core/app/client/src/pages/index.tsx index 04d54e036..7b6cdc4dd 100644 --- a/packages/core/app/client/src/pages/index.tsx +++ b/packages/core/app/client/src/pages/index.tsx @@ -1,20 +1,21 @@ import { Application } from '@tachybase/client'; import { TachyBaseClientPresetPlugin } from '@tachybase/preset-tachybase/client'; + import devDynamicImport from '../.plugins/index'; export const app = new Application({ apiClient: { // @ts-ignore - baseURL: window['__nocobase_api_base_url__'] || process.env.API_BASE_URL || '/api/', + baseURL: window['__tachybase_api_base_url__'] || process.env.API_BASE_URL || '/api/', }, // @ts-ignore - publicPath: window['__nocobase_public_path__'] || process.env.APP_PUBLIC_PATH || '/', + publicPath: window['__tachybase_public_path__'] || process.env.APP_PUBLIC_PATH || '/', plugins: [TachyBaseClientPresetPlugin], ws: { // @ts-ignore - url: window['__nocobase_ws_url__'] || process.env.WEBSOCKET_URL || '', + url: window['__tachybase_ws_url__'] || process.env.WEBSOCKET_URL || '', // @ts-ignore - basename: window['__nocobase_ws_path__'] || process.env.WS_PATH || '/ws', + basename: window['__tachybase_ws_path__'] || process.env.WS_PATH || '/ws', }, loadRemotePlugins: true, devDynamicImport, diff --git a/packages/core/app/package.json b/packages/core/app/package.json index a153b6069..6529ad4e9 100644 --- a/packages/core/app/package.json +++ b/packages/core/app/package.json @@ -17,6 +17,5 @@ "@tachybase/cache": "workspace:*", "@tachybase/client": "workspace:*", "@tachybase/logger": "workspace:*" - }, - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" + } } diff --git a/packages/core/app/src/__tests__/commands.test.ts b/packages/core/app/src/__tests__/commands.test.ts index d4e1248d6..ac7ae7cb1 100644 --- a/packages/core/app/src/__tests__/commands.test.ts +++ b/packages/core/app/src/__tests__/commands.test.ts @@ -1,8 +1,9 @@ +import { resolve } from 'path'; import { mockDatabase } from '@tachybase/database'; import { uid } from '@tachybase/utils'; + import axios from 'axios'; import execa from 'execa'; -import { resolve } from 'path'; import { getPortPromise } from 'portfinder'; const delay = (timeout) => { @@ -53,7 +54,7 @@ const run = (command, args, options) => { const createDatabase = async () => { if (process.env.DB_DIALECT === 'sqlite') { - return 'nocobase'; + return 'tachybase'; } const db = mockDatabase(); const name = `d_${uid()}`; @@ -69,7 +70,7 @@ describe.skip('cli', () => { port: 13000, }); console.log(process.env.DB_DIALECT, port); - const dbFile = `storage/tests/db/nocobase-${uid()}.sqlite`; + const dbFile = `storage/tests/db/tachybase-${uid()}.sqlite`; const env = { ...process.env, APP_PORT: `${port}`, @@ -78,15 +79,15 @@ describe.skip('cli', () => { SOCKET_PATH: `storage/tests/gateway-e2e-${uid()}.sock`, PM2_HOME: resolve(process.cwd(), `storage/tests/.pm2-${uid()}`), }; - const subprocess1 = await execa('pnpm', ['nocobase', 'install'], { + const subprocess1 = await execa('pnpm', ['tachybase', 'install'], { env, }); expect(subprocess1.stdout.includes('app installed successfully')).toBeTruthy(); - const subprocess2 = await execa('pnpm', ['nocobase', 'install'], { + const subprocess2 = await execa('pnpm', ['tachybase', 'install'], { env, }); expect(subprocess2.stdout.includes('app is installed')).toBeTruthy(); - const subprocess3 = await execa('pnpm', ['nocobase', 'install', '-f'], { + const subprocess3 = await execa('pnpm', ['tachybase', 'install', '-f'], { env, }); expect(subprocess3.stdout.includes('app reinstalled successfully')).toBeTruthy(); @@ -98,7 +99,7 @@ describe.skip('cli', () => { const port = await getPortPromise({ port: 13000, }); - const dbFile = `storage/tests/db/nocobase-${uid()}.sqlite`; + const dbFile = `storage/tests/db/tachybase-${uid()}.sqlite`; const env = { ...process.env, APP_PORT: `${port}`, @@ -107,13 +108,13 @@ describe.skip('cli', () => { SOCKET_PATH: `storage/tests/gateway-e2e-${uid()}.sock`, PM2_HOME: resolve(process.cwd(), `storage/tests/.pm2-${uid()}`), }; - const subprocess1 = execa('pnpm', ['nocobase', 'dev', '--server'], { + const subprocess1 = execa('pnpm', ['tachybase', 'dev', '--server'], { env, }); const code = await checkServer(port); console.log(code); expect(code).toBe('APP_NOT_INSTALLED_ERROR'); - execa('pnpm', ['nocobase', 'install'], { + execa('pnpm', ['tachybase', 'install'], { env, }); await delay(5000); @@ -128,7 +129,7 @@ describe.skip('cli', () => { const port = await getPortPromise({ port: 13000, }); - const dbFile = `storage/tests/db/nocobase-${uid()}.sqlite`; + const dbFile = `storage/tests/db/tachybase-${uid()}.sqlite`; const env = { ...process.env, APP_PORT: `${port}`, @@ -137,10 +138,10 @@ describe.skip('cli', () => { SOCKET_PATH: `storage/tests/gateway-e2e-${uid()}.sock`, PM2_HOME: resolve(process.cwd(), `storage/tests/.pm2-${uid()}`), }; - await execa('pnpm', ['nocobase', 'install'], { + await execa('pnpm', ['tachybase', 'install'], { env, }); - const subprocess1 = execa('pnpm', ['nocobase', 'dev', '--server'], { + const subprocess1 = execa('pnpm', ['tachybase', 'dev', '--server'], { env, }); const code = await checkServer(port); @@ -154,7 +155,7 @@ describe.skip('cli', () => { const port = await getPortPromise({ port: 13000, }); - const dbFile = `storage/tests/db/nocobase-${uid()}.sqlite`; + const dbFile = `storage/tests/db/tachybase-${uid()}.sqlite`; const env = { ...process.env, APP_PORT: `${port}`, @@ -164,13 +165,13 @@ describe.skip('cli', () => { PM2_HOME: resolve(process.cwd(), `storage/tests/.pm2-${uid()}`), }; console.log('DB_STORAGE:', dbFile); - const subprocess1 = execa('pnpm', ['nocobase', 'dev', '--server', '--quickstart'], { + const subprocess1 = execa('pnpm', ['tachybase', 'dev', '--server', '--quickstart'], { env, }); const code = await checkServer(port); expect(code).toBe(true); subprocess1.cancel(); - const subprocess2 = execa('pnpm', ['nocobase', 'dev', '--server', '--quickstart'], { + const subprocess2 = execa('pnpm', ['tachybase', 'dev', '--server', '--quickstart'], { env, }); const code2 = await checkServer(port); @@ -184,7 +185,7 @@ describe.skip('cli', () => { const port = await getPortPromise({ port: 13000, }); - const dbFile = `storage/tests/db/nocobase-${uid()}.sqlite`; + const dbFile = `storage/tests/db/tachybase-${uid()}.sqlite`; const env = { ...process.env, APP_PORT: `${port}`, @@ -194,13 +195,13 @@ describe.skip('cli', () => { PM2_HOME: resolve(process.cwd(), `storage/tests/.pm2-${uid()}`), }; console.log('DB_STORAGE:', dbFile); - await execa('pnpm', ['nocobase', 'install'], { + await execa('pnpm', ['tachybase', 'install'], { env, }); - const subprocess2 = await execa('pnpm', ['nocobase', 'upgrade'], { + const subprocess2 = await execa('pnpm', ['tachybase', 'upgrade'], { env, }); - expect(subprocess2.stdout.includes('NocoBase has been upgraded')).toBe(true); + expect(subprocess2.stdout.includes('TachyBase has been upgraded')).toBe(true); }); test('quickstart + upgrade', async () => { @@ -209,7 +210,7 @@ describe.skip('cli', () => { const port = await getPortPromise({ port: 13000, }); - const dbFile = `storage/tests/db/nocobase-${uid()}.sqlite`; + const dbFile = `storage/tests/db/tachybase-${uid()}.sqlite`; const env = { ...process.env, APP_PORT: `${port}`, @@ -219,12 +220,12 @@ describe.skip('cli', () => { PM2_HOME: resolve(process.cwd(), `storage/tests/.pm2-${uid()}`), }; console.log('DB_STORAGE:', dbFile); - const subprocess1 = execa('pnpm', ['nocobase', 'dev', '--server', '--quickstart'], { + const subprocess1 = execa('pnpm', ['tachybase', 'dev', '--server', '--quickstart'], { env, }); const code = await checkServer(port); expect(code).toBe(true); - await execa('pnpm', ['nocobase', 'upgrade'], { + await execa('pnpm', ['tachybase', 'upgrade'], { env, }); await delay(5000); diff --git a/packages/core/auth/package.json b/packages/core/auth/package.json index bbecc4d8e..125bbd80c 100644 --- a/packages/core/auth/package.json +++ b/packages/core/auth/package.json @@ -2,11 +2,6 @@ "name": "@tachybase/auth", "version": "0.21.34", "description": "", - "repository": { - "type": "git", - "url": "git+https://github.com/nocobase/nocobase.git", - "directory": "packages/auth" - }, "license": "Apache-2.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -18,6 +13,5 @@ "@tachybase/utils": "workspace:*", "@types/jsonwebtoken": "^8.5.8", "jsonwebtoken": "^8.5.1" - }, - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" + } } diff --git a/packages/core/build/bin/nocobase-build.js b/packages/core/build/bin/tachybase-build.js similarity index 100% rename from packages/core/build/bin/nocobase-build.js rename to packages/core/build/bin/tachybase-build.js diff --git a/packages/core/build/package.json b/packages/core/build/package.json index 2fa354933..fffcf5fd2 100755 --- a/packages/core/build/package.json +++ b/packages/core/build/package.json @@ -7,7 +7,7 @@ "types": "./lib/index.d.ts", "typings": "./index.d.ts", "bin": { - "nocobase-build": "./bin/nocobase-build.js" + "tachybase-build": "./bin/tachybase-build.js" }, "scripts": { "build": "tsup", @@ -40,6 +40,5 @@ "vite-plugin-css-injected-by-js": "^3.2.1", "vite-plugin-lib-inject-css": "1.2.0", "yargs-parser": "13.1.2" - }, - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" + } } diff --git a/packages/core/build/src/buildPlugin.ts b/packages/core/build/src/buildPlugin.ts index 87c7ef721..7a0cfb01c 100644 --- a/packages/core/build/src/buildPlugin.ts +++ b/packages/core/build/src/buildPlugin.ts @@ -27,7 +27,7 @@ const clientGlobalFiles: string[] = ['src/**', '!src/server/**', ...globExcludeF const sourceGlobalFiles: string[] = ['src/**/*.{ts,js,tsx,jsx,mjs}', '!src/**/__tests__']; const external = [ - // nocobase + // tachybase '@tachybase/acl', '@tachybase/actions', '@tachybase/auth', @@ -187,7 +187,7 @@ export async function buildServerDeps(cwd: string, serverFiles: string[], log: P if (excludePackages.length) { tips.push(`These packages ${chalk.yellow(excludePackages.join(', '))} will be ${chalk.italic('exclude')}.`); } - tips.push(`For more information, please refer to: ${chalk.blue('https://docs.nocobase.com/development/deps')}.`); + tips.push(`For more information, please refer to: ${chalk.blue('https://docs.tachybase.com/development/deps')}.`); log(tips.join(' ')); if (!includePackages.length) return; diff --git a/packages/core/build/src/utils/buildPluginUtils.ts b/packages/core/build/src/utils/buildPluginUtils.ts index 1470426b5..ecf2201e4 100644 --- a/packages/core/build/src/utils/buildPluginUtils.ts +++ b/packages/core/build/src/utils/buildPluginUtils.ts @@ -103,7 +103,7 @@ export function checkDependencies(packageJson: Record, log: Log) { chalk.yellow(packages.join(', ')), chalk.yellow('dependencies'), chalk.yellow('devDependencies'), - chalk.blue(chalk.blue('https://docs.nocobase.com/development/deps')), + chalk.blue(chalk.blue('https://docs.tachybase.com/development/deps')), ); } diff --git a/packages/core/build/src/utils/utils.ts b/packages/core/build/src/utils/utils.ts index 2af074868..fd1d3c32e 100644 --- a/packages/core/build/src/utils/utils.ts +++ b/packages/core/build/src/utils/utils.ts @@ -81,7 +81,7 @@ export function getUserConfig(cwd: string) { return config; } -const CACHE_DIR = path.join(NODE_MODULES, '.cache', 'nocobase'); +const CACHE_DIR = path.join(NODE_MODULES, '.cache', 'tachybase'); export function writeToCache(key: string, data: Record) { const cachePath = path.join(CACHE_DIR, `${key}.json`); fs.ensureDirSync(path.dirname(cachePath)); diff --git a/packages/core/cache/package.json b/packages/core/cache/package.json index 4d3398853..27a5330cc 100644 --- a/packages/core/cache/package.json +++ b/packages/core/cache/package.json @@ -14,6 +14,5 @@ "deepmerge": "^4.2.2", "lodash": "4.17.21", "redis": "^4.6.10" - }, - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" + } } diff --git a/packages/core/cli/package.json b/packages/core/cli/package.json index 214b93feb..b258c5ff2 100644 --- a/packages/core/cli/package.json +++ b/packages/core/cli/package.json @@ -14,7 +14,7 @@ "bin", "dist", "templates", - "nocobase.conf.tpl" + "tachybase.conf.tpl" ], "scripts": { "build": "rimraf dist && rollup -c", diff --git a/packages/core/cli/src/commands/build.ts b/packages/core/cli/src/commands/build.ts index af7e4b1ad..41ed585c8 100644 --- a/packages/core/cli/src/commands/build.ts +++ b/packages/core/cli/src/commands/build.ts @@ -27,7 +27,7 @@ export default (cli: Command) => { } process.env['VITE_CJS_IGNORE_WARNING'] = 'true'; - await run('nocobase-build', [ + await run('tachybase-build', [ ...pkgs, options.version ? '--version' : '', !options.dts ? '--no-dts' : '', diff --git a/packages/core/cli/src/commands/create-nginx-conf.ts b/packages/core/cli/src/commands/create-nginx-conf.ts index 2aa820b9f..6e03917b9 100644 --- a/packages/core/cli/src/commands/create-nginx-conf.ts +++ b/packages/core/cli/src/commands/create-nginx-conf.ts @@ -7,14 +7,14 @@ const __dirname = new URL('.', import.meta.url).pathname; export default (cli: Command) => { cli.command('create-nginx-conf').action(async (name, options) => { - const file = resolve(__dirname, '../../nocobase.conf.tpl'); + const file = resolve(__dirname, '../../tachybase.conf.tpl'); const data = readFileSync(file, 'utf-8'); const replaced = data - .replace(/\{\{cwd\}\}/g, '/app/nocobase') + .replace(/\{\{cwd\}\}/g, '/app/tachybase') .replace(/\{\{publicPath\}\}/g, process.env.APP_PUBLIC_PATH!) .replace(/\{\{apiPort\}\}/g, process.env.APP_PORT!); - const targetFile = resolve(process.cwd(), 'storage', 'nocobase.conf'); + const targetFile = resolve(process.cwd(), 'storage', 'tachybase.conf'); writeFileSync(targetFile, replaced); }); }; diff --git a/packages/core/cli/src/commands/tar.ts b/packages/core/cli/src/commands/tar.ts index c2684fa5c..add49e900 100644 --- a/packages/core/cli/src/commands/tar.ts +++ b/packages/core/cli/src/commands/tar.ts @@ -18,6 +18,6 @@ export default (cli: Command) => { }); if (options.watch) return; } - await run('nocobase-build', [...pkgs, '--only-tar', options.version ? '--version' : '']); + await run('tachybase-build', [...pkgs, '--only-tar', options.version ? '--version' : '']); }); }; diff --git a/packages/core/cli/src/plugin-generator.ts b/packages/core/cli/src/plugin-generator.ts index 00284d03c..bfd9721b5 100644 --- a/packages/core/cli/src/plugin-generator.ts +++ b/packages/core/cli/src/plugin-generator.ts @@ -40,7 +40,7 @@ export class PluginGenerator extends Generator { ...this.context, packageName: name, packageVersion, - nocobaseVersion: "0.0.1", + tachybaseVersion: "0.0.1", pascalCaseName: capitalize(camelize(name.split('/').pop())), }; } diff --git a/packages/core/cli/src/util.ts b/packages/core/cli/src/util.ts index 7f4788048..5c5a840f1 100644 --- a/packages/core/cli/src/util.ts +++ b/packages/core/cli/src/util.ts @@ -311,7 +311,7 @@ export function initEnv() { APP_PORT: 13000, API_BASE_PATH: '/api/', DB_DIALECT: 'sqlite', - DB_STORAGE: 'storage/db/nocobase.sqlite', + DB_STORAGE: 'storage/db/tachybase.sqlite', DB_TIMEZONE: '+00:00', DB_UNDERSCORED: parseEnv('DB_UNDERSCORED'), DEFAULT_STORAGE_TYPE: 'local', diff --git a/packages/core/cli/nocobase.conf.tpl b/packages/core/cli/tachybase.conf.tpl similarity index 98% rename from packages/core/cli/nocobase.conf.tpl rename to packages/core/cli/tachybase.conf.tpl index 954e52656..3676725d4 100644 --- a/packages/core/cli/nocobase.conf.tpl +++ b/packages/core/cli/tachybase.conf.tpl @@ -18,7 +18,7 @@ server { root {{cwd}}/node_modules/@tachybase/app/dist/client; index index.html; client_max_body_size 1000M; - access_log /var/log/nginx/nocobase.log apm; + access_log /var/log/nginx/tachybase.log apm; gzip on; gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; diff --git a/packages/core/client/package.json b/packages/core/client/package.json index a7f027435..b99c1c93d 100644 --- a/packages/core/client/package.json +++ b/packages/core/client/package.json @@ -74,6 +74,5 @@ "react": ">=18.0.0", "react-dom": ">=18.0.0", "react-is": ">=18.0.0" - }, - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" + } } diff --git a/packages/core/client/src/api-client/index.md b/packages/core/client/src/api-client/index.md index e4c67d46d..28ca75448 100644 --- a/packages/core/client/src/api-client/index.md +++ b/packages/core/client/src/api-client/index.md @@ -45,7 +45,7 @@ const apiClient = new APIClient(instance); // 常规请求 const response = await apiClient.request({ url }); -// NocoBase 特有的资源操作 +// TachyBase 特有的资源操作 const response = await apiClient.resource('posts').list(); // 请求共享 @@ -100,7 +100,7 @@ run({ -或者是 NocoBase 的 resource & action 请求: +或者是 TachyBase 的 resource & action 请求: ```ts const { data, run } = useRequest({ @@ -137,7 +137,7 @@ run(...params); function useResource(name: string, of?: string | number): IResource; ``` -资源是 NocoBase 的核心概念,包括: +资源是 TachyBase 的核心概念,包括: - 独立资源,如 `posts` - 关系资源,如 `posts.tags` `posts.user` `posts.comments` diff --git a/packages/core/client/src/application/AppSchemaComponentProvider.tsx b/packages/core/client/src/application/AppSchemaComponentProvider.tsx index 2576d3beb..843c7a432 100644 --- a/packages/core/client/src/application/AppSchemaComponentProvider.tsx +++ b/packages/core/client/src/application/AppSchemaComponentProvider.tsx @@ -1,13 +1,15 @@ -import { useLocalStorageState } from 'ahooks'; import React from 'react'; + +import { useLocalStorageState } from 'ahooks'; + import { SchemaComponentProvider } from '../schema-component/core'; import { ISchemaComponentProvider } from '../schema-component/types'; const getKeyByName = (name) => { if (!name) { - return 'nocobase_designable'.toUpperCase(); + return 'tachybase_designable'.toUpperCase(); } - return `nocobase_${name}_designable`.toUpperCase(); + return `tachybase_${name}_designable`.toUpperCase(); }; const SchemaComponentProviderWithLocalStorageState: React.FC = ( diff --git a/packages/core/client/src/application/WebSocketClient.ts b/packages/core/client/src/application/WebSocketClient.ts index 422a3677c..8a92d73b8 100644 --- a/packages/core/client/src/application/WebSocketClient.ts +++ b/packages/core/client/src/application/WebSocketClient.ts @@ -1,5 +1,6 @@ import { define, observable } from '@tachybase/schema'; import { getSubAppName } from '@tachybase/sdk'; + import { Application } from './Application'; export type WebSocketClientOptions = { @@ -89,7 +90,7 @@ export class WebSocketClient { return; } if (this._reconnectTimes === 0) { - console.log('[nocobase-ws]: connecting...'); + console.log('[tachybase-ws]: connecting...'); } if (this._reconnectTimes >= this.reconnectAttempts) { return; @@ -101,7 +102,7 @@ export class WebSocketClient { const ws = new WebSocket(this.getURL(), this.options.protocols); let pingIntervalTimer: any; ws.onopen = () => { - console.log('[nocobase-ws]: connected.'); + console.log('[tachybase-ws]: connected.'); this.serverDown = false; if (this._ws) { this.removeAllListeners(); diff --git a/packages/core/client/src/application/demos/demo1.tsx b/packages/core/client/src/application/demos/demo1.tsx index 9d8902b32..af0820622 100644 --- a/packages/core/client/src/application/demos/demo1.tsx +++ b/packages/core/client/src/application/demos/demo1.tsx @@ -1,5 +1,6 @@ -import { Application, Plugin } from '@tachybase/client'; import React, { FC } from 'react'; +import { Application, Plugin } from '@tachybase/client'; + import { Link, Outlet, useLocation } from 'react-router-dom'; const Root = () => { @@ -52,7 +53,7 @@ class Test2Plugin extends Plugin { } } -class NocobasePresetPlugin extends Plugin { +class TachybasePresetPlugin extends Plugin { async afterAdd() { // mock load remote plugin await this.addRemotePlugin(); @@ -82,7 +83,7 @@ const app = new Application({ router: { type: 'hash', }, - plugins: [NocobasePresetPlugin], + plugins: [TachybasePresetPlugin], components: { Root, Home, Team, About }, }); diff --git a/packages/core/client/src/application/demos/demo2.tsx b/packages/core/client/src/application/demos/demo2.tsx index 1fbf0cbe9..1d9983ce2 100644 --- a/packages/core/client/src/application/demos/demo2.tsx +++ b/packages/core/client/src/application/demos/demo2.tsx @@ -1,5 +1,6 @@ -import { Application, Plugin, RouterManager, useApp } from '@tachybase/client'; import React, { useMemo } from 'react'; +import { Application, Plugin, RouterManager, useApp } from '@tachybase/client'; + import { Link, Navigate, Outlet, useParams } from 'react-router-dom'; const Root = () => { @@ -67,7 +68,7 @@ const AdminSetting = () => { ); }; -class NocobasePresetPlugin extends Plugin { +class TachybasePresetPlugin extends Plugin { async load() { this.router.add('root', { path: '/', @@ -90,7 +91,7 @@ class NocobasePresetPlugin extends Plugin { const app = new Application({ router: { type: 'hash' }, - plugins: [NocobasePresetPlugin], + plugins: [TachybasePresetPlugin], }); export default app.getRootComponent(); diff --git a/packages/core/client/src/application/demos/demo3.tsx b/packages/core/client/src/application/demos/demo3.tsx index a614d96d7..101b90155 100644 --- a/packages/core/client/src/application/demos/demo3.tsx +++ b/packages/core/client/src/application/demos/demo3.tsx @@ -1,10 +1,10 @@ -import { Application, NocoBaseBuildInPlugin } from '@tachybase/client'; +import { Application, BuildinPlugin } from '@tachybase/client'; export const app = new Application({ apiClient: { baseURL: process.env.API_BASE_URL, }, - plugins: [NocoBaseBuildInPlugin], + plugins: [BuildinPlugin], }); export default app.getRootComponent(); diff --git a/packages/core/client/src/application/index.md b/packages/core/client/src/application/index.md index c51ee3ce1..0671a8a7b 100644 --- a/packages/core/client/src/application/index.md +++ b/packages/core/client/src/application/index.md @@ -6,7 +6,7 @@ group: # Application V2 - + ## Usage diff --git a/packages/core/client/src/application/schema-initializer/hooks/index.tsx b/packages/core/client/src/application/schema-initializer/hooks/index.tsx index da3cad0e7..70a4e0baf 100644 --- a/packages/core/client/src/application/schema-initializer/hooks/index.tsx +++ b/packages/core/client/src/application/schema-initializer/hooks/index.tsx @@ -1,5 +1,7 @@ -import { ButtonProps } from 'antd'; import React, { FC, ReactNode, useCallback, useMemo } from 'react'; + +import { ButtonProps } from 'antd'; + import { useCompile } from '../../../schema-component'; import { useApp } from '../../hooks'; import { SchemaInitializerChild, SchemaInitializerItems } from '../components'; @@ -148,7 +150,7 @@ export function useSchemaInitializerRender( } if (!initializer) { - console.error(`[nocobase]: SchemaInitializer "${name}" not found`); + console.error(`[tachybase]: SchemaInitializer "${name}" not found`); return { exists: false, render: () => null, diff --git a/packages/core/client/src/application/schema-settings/hooks/index.tsx b/packages/core/client/src/application/schema-settings/hooks/index.tsx index c6149ef22..def5f5463 100644 --- a/packages/core/client/src/application/schema-settings/hooks/index.tsx +++ b/packages/core/client/src/application/schema-settings/hooks/index.tsx @@ -1,13 +1,12 @@ -import { useMemo } from 'react'; -import { useApp } from '../../hooks'; -import { SchemaSettingOptions } from '../types'; -import React from 'react'; -import { SchemaSettingsWrapper } from '../components'; -import { SchemaSettingsProps } from '../../../schema-settings'; -import { Schema } from '@tachybase/schema'; -import { GeneralField } from '@tachybase/schema'; +import React, { useMemo } from 'react'; +import { GeneralField, Schema } from '@tachybase/schema'; + import { Designable } from '../../../schema-component'; +import { SchemaSettingsProps } from '../../../schema-settings'; +import { useApp } from '../../hooks'; +import { SchemaSettingsWrapper } from '../components'; import { defaultSettingItems } from '../SchemaSettingsDefaults'; +import { SchemaSettingOptions } from '../types'; type UseSchemaSettingsRenderOptions = Omit, 'name' | 'items'> & Omit & { @@ -28,7 +27,7 @@ export function useSchemaSettingsRender(name: string, options?: UseSchem } if (!schemaSetting) { - console.error(`[nocobase]: SchemaSettings "${name}" not found`); + console.error(`[tachybase]: SchemaSettings "${name}" not found`); return { exists: false, render: () => null, diff --git a/packages/core/client/src/application/utils/globalDeps.ts b/packages/core/client/src/application/utils/globalDeps.ts index d7e61eaf9..fc3473322 100644 --- a/packages/core/client/src/application/utils/globalDeps.ts +++ b/packages/core/client/src/application/utils/globalDeps.ts @@ -1,11 +1,6 @@ -import * as antdCssinjs from '@ant-design/cssinjs'; -import * as antdIcons from '@ant-design/icons'; -import * as dndKitAccessibility from '@dnd-kit/accessibility'; -import * as dndKitCore from '@dnd-kit/core'; -import * as dndKitModifiers from '@dnd-kit/modifiers'; -import * as dndKitSortable from '@dnd-kit/sortable'; -import * as dndKitUtilities from '@dnd-kit/utilities'; -import * as emotionCss from '@emotion/css'; +import React from 'react'; +import * as tachybaseComponents from '@tachybase/components'; +import * as tachybaseEvaluators from '@tachybase/evaluators/client'; import * as formilyCore from '@tachybase/schema'; import * as formilyJsonSchema from '@tachybase/schema'; import * as formilyPath from '@tachybase/schema'; @@ -14,26 +9,32 @@ import * as formilyJsonReactive from '@tachybase/schema'; import * as formilyReactiveReact from '@tachybase/schema'; import * as formilyShared from '@tachybase/schema'; import * as formilyValidator from '@tachybase/schema'; -import * as nocobaseEvaluators from '@tachybase/evaluators/client'; -import * as nocobaseClientUtils from '@tachybase/utils/client'; -import * as nocobaseSDK from '@tachybase/sdk'; -import * as nocobaseSchema from '@tachybase/schema'; -import * as nocobaseComponents from '@tachybase/components'; +import * as tachybaseSchema from '@tachybase/schema'; +import * as tachybaseSDK from '@tachybase/sdk'; +import * as tachybaseClientUtils from '@tachybase/utils/client'; import { dayjs } from '@tachybase/utils/client'; + +import * as antdCssinjs from '@ant-design/cssinjs'; +import * as antdIcons from '@ant-design/icons'; +import * as dndKitAccessibility from '@dnd-kit/accessibility'; +import * as dndKitCore from '@dnd-kit/core'; +import * as dndKitModifiers from '@dnd-kit/modifiers'; +import * as dndKitSortable from '@dnd-kit/sortable'; +import * as dndKitUtilities from '@dnd-kit/utilities'; +import * as emotionCss from '@emotion/css'; import * as ahooks from 'ahooks'; import * as antd from 'antd'; import * as antdStyle from 'antd-style'; import axios from 'axios'; import * as i18next from 'i18next'; import lodash from 'lodash'; -import React from 'react'; import ReactDOM from 'react-dom'; import * as reactI18next from 'react-i18next'; import * as ReactRouter from 'react-router'; import * as ReactRouterDom from 'react-router-dom'; import jsxRuntime from 'react/jsx-runtime'; -import * as nocobaseClient from '../../index'; +import * as tachybaseClient from '../../index'; import type { RequireJS } from './requirejs'; /** @@ -69,16 +70,16 @@ export function defineGlobalDeps(requirejs: RequireJS) { requirejs.define('@formily/validator', () => formilyValidator); requirejs.define('@formily/reactive-react', () => formilyReactiveReact); - // nocobase - requirejs.define('@tachybase/utils', () => nocobaseClientUtils); - requirejs.define('@tachybase/utils/client', () => nocobaseClientUtils); - requirejs.define('@tachybase/client', () => nocobaseClient); - requirejs.define('@tachybase/client/client', () => nocobaseClient); - requirejs.define('@tachybase/evaluators', () => nocobaseEvaluators); - requirejs.define('@tachybase/evaluators/client', () => nocobaseEvaluators); - requirejs.define('@tachybase/sdk', () => nocobaseSDK); - requirejs.define('@tachybase/schema', () => nocobaseSchema); - requirejs.define('@tachybase/components', () => nocobaseComponents); + // tachybase + requirejs.define('@tachybase/utils', () => tachybaseClientUtils); + requirejs.define('@tachybase/utils/client', () => tachybaseClientUtils); + requirejs.define('@tachybase/client', () => tachybaseClient); + requirejs.define('@tachybase/client/client', () => tachybaseClient); + requirejs.define('@tachybase/evaluators', () => tachybaseEvaluators); + requirejs.define('@tachybase/evaluators/client', () => tachybaseEvaluators); + requirejs.define('@tachybase/sdk', () => tachybaseSDK); + requirejs.define('@tachybase/schema', () => tachybaseSchema); + requirejs.define('@tachybase/components', () => tachybaseComponents); // dnd-kit 相关 requirejs.define('@dnd-kit/accessibility', () => dndKitAccessibility); diff --git a/packages/core/client/src/application/utils/remotePlugins.ts b/packages/core/client/src/application/utils/remotePlugins.ts index c6f3f850f..17ea0adbf 100644 --- a/packages/core/client/src/application/utils/remotePlugins.ts +++ b/packages/core/client/src/application/utils/remotePlugins.ts @@ -1,7 +1,7 @@ +import type { DevDynamicImport } from '../Application'; import type { Plugin } from '../Plugin'; import type { PluginData } from '../PluginManager'; import type { RequireJS } from './requirejs'; -import type { DevDynamicImport } from '../Application'; /** * @internal @@ -63,7 +63,7 @@ export function processRemotePlugins(pluginData: PluginData[], resolve: (plugins if (emptyPlugins.length > 0) { console.error( - '[nocobase load plugin error]: These plugins do not have an `export.default` exported content or there is an error in the plugins. error plugins: \r\n%s', + '[tachybase load plugin error]: These plugins do not have an `export.default` exported content or there is an error in the plugins. error plugins: \r\n%s', emptyPlugins.join(', \r\n'), ); } diff --git a/packages/core/client/src/block-provider/hooks/index.ts b/packages/core/client/src/block-provider/hooks/index.ts index 12691f046..d52fdf4cf 100644 --- a/packages/core/client/src/block-provider/hooks/index.ts +++ b/packages/core/client/src/block-provider/hooks/index.ts @@ -1313,7 +1313,7 @@ function getTargetField(obj) { /** * 之所以不直接使用 form.reset() 是因为其无法将子表格重置为空 - * 主要用于修复这个问题:https://nocobase.height.app/T-3106 + * 主要用于修复这个问题:https://tachybase.height.app/T-3106 * @param form */ async function resetFormCorrectly(form: Form) { diff --git a/packages/core/client/src/block-provider/hooks/useDataBlockSourceId.tsx b/packages/core/client/src/block-provider/hooks/useDataBlockSourceId.tsx index ff9a527c1..840ac7cb5 100644 --- a/packages/core/client/src/block-provider/hooks/useDataBlockSourceId.tsx +++ b/packages/core/client/src/block-provider/hooks/useDataBlockSourceId.tsx @@ -15,7 +15,7 @@ import { * 是需要从 recordData 还是 parentRecordData 中获取;解决方法是通过更改 schema,在不同类型的关系区块中 * (`通过点击关系字段按钮打开的弹窗中创建的非关系字段区块`和`关系字段区块`)使用不同的 hook。 * - * 更新:上面所说的“需要更改 schema 才能解决的问题”已在这个任务中更改:https://nocobase.height.app/T-3848/description + * 更新:上面所说的“需要更改 schema 才能解决的问题”已在这个任务中更改:https://tachybase.height.app/T-3848/description * * @param param0 * @returns diff --git a/packages/core/client/src/nocobase-buildin-plugin/index.tsx b/packages/core/client/src/buildin-plugin/index.tsx similarity index 96% rename from packages/core/client/src/nocobase-buildin-plugin/index.tsx rename to packages/core/client/src/buildin-plugin/index.tsx index 654ecd340..facaaf49a 100644 --- a/packages/core/client/src/nocobase-buildin-plugin/index.tsx +++ b/packages/core/client/src/buildin-plugin/index.tsx @@ -1,4 +1,4 @@ -import React, { FC } from 'react'; +import React from 'react'; import { observer } from '@tachybase/schema'; import { getSubAppName } from '@tachybase/sdk'; @@ -26,6 +26,11 @@ import { SystemSettingsPlugin } from '../system-settings'; import { CurrentUserProvider, CurrentUserSettingsMenuProvider } from '../user'; import { LocalePlugin } from './plugins/LocalePlugin'; +interface AppStatusProps { + error: Error; + app: Application; +} + const AppSpin = () => { return ( @@ -78,8 +83,8 @@ const useErrorProps = (app: Application, error: any) => { } }; -const AppError: FC<{ error: Error; app: Application }> = observer( - ({ app, error }) => { +const AppError = observer( + ({ app, error }: AppStatusProps) => { const props = useErrorProps(app, error); const { styles } = useStyles(); return ( @@ -207,8 +212,8 @@ const getProps = (app: Application) => { return {}; }; -const AppMaintaining: FC<{ app: Application; error: Error }> = observer( - ({ app }) => { +const AppMaintaining = observer( + ({ app }: AppStatusProps) => { const { icon, status, title, subTitle } = getProps(app); const { styles } = useStyles(); return ( @@ -231,8 +236,8 @@ const AppMaintaining: FC<{ app: Application; error: Error }> = observer( { displayName: 'AppMaintaining' }, ); -const AppMaintainingDialog: FC<{ app: Application; error: Error }> = observer( - ({ app }) => { +const AppMaintainingDialog = observer( + ({ app }: AppStatusProps) => { const { icon, status, title, subTitle } = getProps(app); return ( @@ -259,7 +264,7 @@ const AppNotFound = () => { ); }; -export class NocoBaseBuildInPlugin extends Plugin { +export class BuildinPlugin extends Plugin { async afterAdd() { this.app.addComponents({ AppSpin, diff --git a/packages/core/client/src/nocobase-buildin-plugin/plugins/LocalePlugin.ts b/packages/core/client/src/buildin-plugin/plugins/LocalePlugin.ts similarity index 99% rename from packages/core/client/src/nocobase-buildin-plugin/plugins/LocalePlugin.ts rename to packages/core/client/src/buildin-plugin/plugins/LocalePlugin.ts index e16d3435f..6c27ccd25 100644 --- a/packages/core/client/src/nocobase-buildin-plugin/plugins/LocalePlugin.ts +++ b/packages/core/client/src/buildin-plugin/plugins/LocalePlugin.ts @@ -1,6 +1,8 @@ import { setValidateLanguage } from '@tachybase/schema'; + import { App, ConfigProvider } from 'antd'; import dayjs from 'dayjs'; + import { loadConstrueLocale } from '../../antd-config-provider/loadConstrueLocale'; import { Plugin } from '../../application/Plugin'; import { dayjsLocale } from '../../locale'; diff --git a/packages/core/client/src/collection-manager/action-hooks.ts b/packages/core/client/src/collection-manager/action-hooks.ts index 06018be11..0e50f74b3 100644 --- a/packages/core/client/src/collection-manager/action-hooks.ts +++ b/packages/core/client/src/collection-manager/action-hooks.ts @@ -1,10 +1,12 @@ +import { useCallback, useEffect, useMemo } from 'react'; import { useField, useForm } from '@tachybase/schema'; + import { message } from 'antd'; import _ from 'lodash'; import cloneDeep from 'lodash/cloneDeep'; import omit from 'lodash/omit'; -import { useCallback, useEffect, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; + import { useCollection_deprecated, useCollectionManager_deprecated } from '.'; import { useRequest } from '../api-client'; import { useRecord } from '../record-provider'; @@ -585,7 +587,7 @@ export const useFilterActionProps = () => { const options = useFilterFieldOptions(collection.fields); const service = useResourceActionContext(); return useFilterFieldProps({ - // 目前仅需要支持筛选 title 和 name,其它字段可能会报错。详见:https://nocobase.height.app/T-2745 + // 目前仅需要支持筛选 title 和 name,其它字段可能会报错。详见:https://tachybase.height.app/T-2745 options: options.filter((option) => ['title', 'name'].includes(option.name)), params: service.state?.params?.[0] || service.params, service, diff --git a/packages/core/client/src/css-variable/CSSVariableProvider.tsx b/packages/core/client/src/css-variable/CSSVariableProvider.tsx index fd6fb67b7..90056f766 100644 --- a/packages/core/client/src/css-variable/CSSVariableProvider.tsx +++ b/packages/core/client/src/css-variable/CSSVariableProvider.tsx @@ -1,5 +1,7 @@ -import { TinyColor } from '@ctrl/tinycolor'; import { useEffect, useMemo } from 'react'; + +import { TinyColor } from '@ctrl/tinycolor'; + import { defaultTheme } from '../global-theme'; import { useToken } from '../style'; @@ -20,11 +22,11 @@ export const CSSVariableProvider = ({ children }) => { }, [token.colorBgElevated]); useEffect(() => { - document.body.style.setProperty('--nb-spacing', `${token.marginLG}px`); - document.body.style.setProperty('--nb-designer-offset', `${token.marginXS}px`); - document.body.style.setProperty('--nb-header-height', `${token.sizeXXL - 2}px`); - document.body.style.setProperty('--nb-box-bg', token.colorBgLayout); - document.body.style.setProperty('--nb-box-bg', token.colorBgLayout); + document.body.style.setProperty('--tb-spacing', `${token.marginLG}px`); + document.body.style.setProperty('--tb-designer-offset', `${token.marginXS}px`); + document.body.style.setProperty('--tb-header-height', `${token.sizeXXL - 2}px`); + document.body.style.setProperty('--tb-box-bg', token.colorBgLayout); + document.body.style.setProperty('--tb-box-bg', token.colorBgLayout); document.body.style.setProperty('--controlHeightLG', `${token.controlHeightLG}px`); document.body.style.setProperty('--paddingContentVerticalSM', `${token.paddingContentVerticalSM}px`); document.body.style.setProperty('--marginSM', `${token.marginSM}px`); diff --git a/packages/core/client/src/data-source/data-block/DataBlockRequestProvider.tsx b/packages/core/client/src/data-source/data-block/DataBlockRequestProvider.tsx index c557f8b35..7572dcc09 100644 --- a/packages/core/client/src/data-source/data-block/DataBlockRequestProvider.tsx +++ b/packages/core/client/src/data-source/data-block/DataBlockRequestProvider.tsx @@ -1,13 +1,14 @@ -import { useDeepCompareEffect, useUpdateEffect } from 'ahooks'; -import React, { FC, createContext, useContext, useMemo } from 'react'; +import React, { createContext, FC, useContext, useMemo } from 'react'; -import { UseRequestResult, useAPIClient, useRequest } from '../../api-client'; -import { CollectionRecordProvider, CollectionRecord } from '../collection-record'; -import { AllDataBlockProps, useDataBlockProps } from './DataBlockProvider'; -import { useDataBlockResource } from './DataBlockResourceProvider'; -import { useDataSourceHeaders } from '../utils'; +import { useDeepCompareEffect, useUpdateEffect } from 'ahooks'; + +import { useAPIClient, useRequest, UseRequestResult } from '../../api-client'; import { useDataLoadingMode } from '../../modules/blocks/data-blocks/details-multi/setDataLoadingModeSettingsItem'; import { useSourceKey } from '../../modules/blocks/useSourceKey'; +import { CollectionRecord, CollectionRecordProvider } from '../collection-record'; +import { useDataSourceHeaders } from '../utils'; +import { AllDataBlockProps, useDataBlockProps } from './DataBlockProvider'; +import { useDataBlockResource } from './DataBlockResourceProvider'; export const BlockRequestContext = createContext>(null); BlockRequestContext.displayName = 'BlockRequestContext'; @@ -26,7 +27,7 @@ function useCurrentRequest(options: Omit) { if (record) return Promise.resolve({ data: record }); if (!action) { throw new Error( - `[nocobase]: The 'action' parameter is missing in the 'DataBlockRequestProvider' component`, + `[tachybase]: The 'action' parameter is missing in the 'DataBlockRequestProvider' component`, ); } return resource[action]({ ...params, ...customParams }).then((res) => res.data); diff --git a/packages/core/client/src/document-title/index.md b/packages/core/client/src/document-title/index.md index a5dda5a56..c747a3b38 100644 --- a/packages/core/client/src/document-title/index.md +++ b/packages/core/client/src/document-title/index.md @@ -9,7 +9,7 @@ group: ## DocumentTitleProvider ```tsx | pure - + ``` diff --git a/packages/core/client/src/hooks/useAdminSchemaUid.ts b/packages/core/client/src/hooks/useAdminSchemaUid.ts index b5fb7ad3e..004a18d28 100644 --- a/packages/core/client/src/hooks/useAdminSchemaUid.ts +++ b/packages/core/client/src/hooks/useAdminSchemaUid.ts @@ -1,3 +1,3 @@ export const useAdminSchemaUid = () => { - return 'nocobase-admin-menu'; + return 'default-admin-menu'; }; diff --git a/packages/core/client/src/i18n/i18n.ts b/packages/core/client/src/i18n/i18n.ts index 7bade9b97..efc069c78 100644 --- a/packages/core/client/src/i18n/i18n.ts +++ b/packages/core/client/src/i18n/i18n.ts @@ -1,5 +1,6 @@ import i18next, { TFuncKey, TOptions } from 'i18next'; import { initReactI18next } from 'react-i18next'; + import locale from '../locale'; export function tval(text: TFuncKey | TFuncKey[], options?: TOptions) { @@ -21,7 +22,7 @@ i18n // .use(Backend) .use(initReactI18next) .init({ - lng: localStorage.getItem('NOCOBASE_LOCALE') || 'en-US', + lng: localStorage.getItem('TACHYBASE_LOCALE') || 'en-US', // debug: true, defaultNS: 'client', // fallbackNS: 'client', @@ -40,5 +41,5 @@ i18n }); i18n.on('languageChanged', (lng) => { - localStorage.setItem('NOCOBASE_LOCALE', lng); + localStorage.setItem('TACHYBASE_LOCALE', lng); }); diff --git a/packages/core/client/src/index.ts b/packages/core/client/src/index.ts index 853d4413b..8644d0b0e 100644 --- a/packages/core/client/src/index.ts +++ b/packages/core/client/src/index.ts @@ -33,7 +33,7 @@ export * from './hooks'; export * from './i18n'; export * from './icon'; export { default as locale } from './locale'; -export * from './nocobase-buildin-plugin'; +export * from './buildin-plugin'; export * from './plugin-manager'; export * from './pm'; export * from './powered-by-v2'; diff --git a/packages/core/client/src/modules/actions/disassociate/__e2e__/templatesOfPage.ts b/packages/core/client/src/modules/actions/disassociate/__e2e__/templatesOfPage.ts index 12d30113e..b8ff791c8 100644 --- a/packages/core/client/src/modules/actions/disassociate/__e2e__/templatesOfPage.ts +++ b/packages/core/client/src/modules/actions/disassociate/__e2e__/templatesOfPage.ts @@ -80,7 +80,7 @@ export const disassociatePage: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-uid': 'b678n93qa6y', @@ -270,7 +270,7 @@ export const disassociatePage: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-uid': 'oe1qrytmueq', diff --git a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/associationForm.test.ts b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/associationForm.test.ts index d2c282e88..495d3c2f2 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/associationForm.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/associationForm.test.ts @@ -1,8 +1,9 @@ -import { test, expect } from '@tachybase/test/e2e'; +import { expect, test } from '@tachybase/test/e2e'; + import { T3529 } from './templatesOfBug'; test.describe('association form block', () => { - // https://nocobase.height.app/T-3529 + // https://tachybase.height.app/T-3529 test('should be created instead of updated', async ({ page, mockPage, mockRecord }) => { const nocoPage = await mockPage(T3529).waitForInit(); await mockRecord('general'); diff --git a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/lazyLoadAssociationFields.test.ts b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/lazyLoadAssociationFields.test.ts index 9d6a6553a..529120602 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/lazyLoadAssociationFields.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/lazyLoadAssociationFields.test.ts @@ -6,6 +6,7 @@ import { oneTableSubtableWithMultiLevelAssociationFields, test, } from '@tachybase/test/e2e'; + import { T2200, T2614, T2615, T2845, T2993 } from './templatesOfBug'; test.describe('display association fields', () => { @@ -49,7 +50,7 @@ test.describe('display association fields', () => { ); }); - // https://nocobase.height.app/T-2615 + // https://tachybase.height.app/T-2615 test('should load association data', async ({ page, mockPage, mockRecord }) => { const nocoPage = await mockPage(T2615).waitForInit(); await mockRecord('T2615'); @@ -87,7 +88,7 @@ test.describe('display association fields', () => { ); }); - // https://nocobase.height.app/T-2845 + // https://tachybase.height.app/T-2845 test('should load association data of subform', async ({ page, mockPage, mockRecord }) => { const nocoPage = await mockPage(T2845).waitForInit(); // 和 T2615 使用一样的数据表结构 @@ -136,7 +137,7 @@ test.describe('display association fields', () => { ); }); - // https://nocobase.height.app/T-2614 + // https://tachybase.height.app/T-2614 test('should load association data in subform', async ({ page, mockPage, mockRecord }) => { const nocoPage = await mockPage(T2614).waitForInit(); await mockRecord('T2614'); @@ -164,7 +165,7 @@ test.describe('display association fields', () => { ).toHaveText(`ID:1`); }); - // https://nocobase.height.app/T-2993 + // https://tachybase.height.app/T-2993 test('should load association data of sub details', async ({ page, mockPage, mockRecord }) => { const nocoPage = await mockPage(T2993).waitForInit(); const record = await mockRecord('T2993'); @@ -264,7 +265,7 @@ test.describe('association fields', () => { } }); - // fix https://nocobase.height.app/T-2200 + // fix https://tachybase.height.app/T-2200 test('should be possible to change the value of the association field normally', async ({ page, mockPage }) => { await mockPage(T2200).goto(); diff --git a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/lazyLoadVariables.test.ts b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/lazyLoadVariables.test.ts index cb8e7521e..e736a14fd 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/lazyLoadVariables.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/lazyLoadVariables.test.ts @@ -19,7 +19,7 @@ test.describe('variables with default value', () => { .getByRole('textbox'), ).toHaveValue('1'); - // https://nocobase.height.app/T-2805 ---------------------------------------------------------------------- + // https://tachybase.height.app/T-2805 ---------------------------------------------------------------------- await page .getByLabel('block-item-CollectionField-general-form-general.m2oField0-m2oField0') .getByTestId('select-object-single') diff --git a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/schemaInitializer.test.ts b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/schemaInitializer.test.ts index e8ff78501..13adfb471 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/schemaInitializer.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/schemaInitializer.test.ts @@ -1,6 +1,7 @@ -import { createBlockInPage, expect, oneEmptyForm, test } from '@tachybase/test/e2e'; -import { T3106, T3469 } from './templatesOfBug'; import { uid } from '@tachybase/schema'; +import { createBlockInPage, expect, oneEmptyForm, test } from '@tachybase/test/e2e'; + +import { T3106, T3469 } from './templatesOfBug'; test.describe('where creation form block can be added', () => { test('page', async ({ page, mockPage }) => { @@ -80,7 +81,7 @@ test.describe('configure actions', () => { await expect(page.getByRole('button', { name: 'Submit' })).not.toBeVisible(); }); - // https://nocobase.height.app/T-3106 + // https://tachybase.height.app/T-3106 test('subTable: should clear form value after submit', async ({ page, mockPage }) => { await mockPage(T3106).goto(); @@ -102,7 +103,7 @@ test.describe('configure actions', () => { ).toHaveValue('test name'); }); - // https://nocobase.height.app/T-3469 + // https://tachybase.height.app/T-3469 test('default values for fields should not be cleared after submission', async ({ page, mockPage }) => { await mockPage(T3469).goto(); diff --git a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/schemaSettings.test.ts b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/schemaSettings.test.ts index 984970edc..6f98d6014 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/schemaSettings.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/schemaSettings.test.ts @@ -1,5 +1,4 @@ import { - Page, expect, expectSettingsMenu, oneEmptyForm, @@ -7,8 +6,10 @@ import { oneTableBlockWithActionsAndFormBlocks, oneTableBlockWithAddNewAndViewAndEditAndAssociationFields, oneTableBlockWithAddNewAndViewAndEditAndBasicFields, + Page, test, } from '@tachybase/test/e2e'; + import { T2165, T2174, T3251, T3806 } from './templatesOfBug'; const clickOption = async (page: Page, optionName: string) => { @@ -211,7 +212,7 @@ test.describe('creation form block schema settings', () => { ).toHaveValue('123'); }); - // https://nocobase.height.app/T-2165 + // https://tachybase.height.app/T-2165 test('variable labels should be displayed normally', async ({ page, mockPage }) => { await mockPage(T2165).goto(); @@ -223,7 +224,7 @@ test.describe('creation form block schema settings', () => { await expect(page.getByText('Current form / Phone')).toBeVisible(); }); - // https://nocobase.height.app/T-3251 + // https://tachybase.height.app/T-3251 test('nested conditions', async ({ page, mockPage }) => { await mockPage(T3251).goto(); @@ -255,7 +256,7 @@ test.describe('creation form block schema settings', () => { ).toBeEditable(); }); - // https://nocobase.height.app/T-3806 + // https://tachybase.height.app/T-3806 test('after save as block template', async ({ page, mockPage }) => { await mockPage(T3806).goto(); @@ -731,7 +732,7 @@ test.describe('creation form block schema settings', () => { ).toHaveValue('new value'); }); - // fix https://nocobase.height.app/T-2174 + // fix https://tachybase.height.app/T-2174 test('should show default value option', async ({ page, mockPage, mockRecord }) => { const nocoPage = await mockPage(T2174).waitForInit(); await mockRecord('test2174'); @@ -964,7 +965,7 @@ test.describe('creation form block schema settings', () => { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, properties: { diff --git a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/templatesOfBug.ts b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/templatesOfBug.ts index 12d97ed91..a181e3fdc 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/templatesOfBug.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/templatesOfBug.ts @@ -1,4 +1,4 @@ -import { PageConfig, generalWithM2oSingleSelect, generalWithMultiLevelM2mFields } from '@tachybase/test/e2e'; +import { generalWithM2oSingleSelect, generalWithMultiLevelM2mFields, PageConfig } from '@tachybase/test/e2e'; export const T2165 = { pageSchema: { @@ -339,7 +339,7 @@ export const T2174 = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-index': 1, @@ -932,7 +932,7 @@ export const T2614: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-uid': 'vq4vg5mpbxz', @@ -1770,7 +1770,7 @@ export const T2993: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-index': 1, @@ -2353,7 +2353,7 @@ export const T2615: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, properties: { @@ -3259,7 +3259,7 @@ export const T2845: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-index': 1, @@ -4735,7 +4735,7 @@ export const T2200 = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-uid': 'farfrcvsydq', @@ -5696,7 +5696,7 @@ export const T3469: PageConfig = { }, }; -// https://nocobase.height.app/T-3529 +// https://tachybase.height.app/T-3529 export const T3529: PageConfig = { collections: generalWithMultiLevelM2mFields, pageSchema: { @@ -5756,7 +5756,7 @@ export const T3529: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-uid': 'gcqzwfc98cz', diff --git a/packages/core/client/src/modules/blocks/data-blocks/grid-card/__tests__/createGridCardBlockSchema.test.ts b/packages/core/client/src/modules/blocks/data-blocks/grid-card/__tests__/createGridCardBlockSchema.test.ts index 93a68ce5e..da23d78cd 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/grid-card/__tests__/createGridCardBlockSchema.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/grid-card/__tests__/createGridCardBlockSchema.test.ts @@ -20,7 +20,7 @@ describe('createGridCardBlockSchema', () => { "x-component": "ActionBar", "x-component-props": { "style": { - "marginBottom": "var(--nb-spacing)", + "marginBottom": "var(--tb-spacing)", }, }, "x-initializer": "gridCard:configureActions", @@ -96,7 +96,7 @@ describe('createGridCardBlockSchema', () => { "x-component": "ActionBar", "x-component-props": { "style": { - "marginBottom": "var(--nb-spacing)", + "marginBottom": "var(--tb-spacing)", }, }, "x-initializer": "gridCard:configureActions", diff --git a/packages/core/client/src/modules/blocks/data-blocks/grid-card/createGridCardBlockUISchema.ts b/packages/core/client/src/modules/blocks/data-blocks/grid-card/createGridCardBlockUISchema.ts index 6fe80655e..0340a6443 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/grid-card/createGridCardBlockUISchema.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/grid-card/createGridCardBlockUISchema.ts @@ -45,7 +45,7 @@ export const createGridCardBlockUISchema = (options: { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, }, diff --git a/packages/core/client/src/modules/blocks/data-blocks/list/__tests__/createListBlockSchema.test.ts b/packages/core/client/src/modules/blocks/data-blocks/list/__tests__/createListBlockSchema.test.ts index a61268ec7..a2dd0f0db 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/list/__tests__/createListBlockSchema.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/list/__tests__/createListBlockSchema.test.ts @@ -30,7 +30,7 @@ describe('createListBlockSchema', () => { "x-component": "ActionBar", "x-component-props": { "style": { - "marginBottom": "var(--nb-spacing)", + "marginBottom": "var(--tb-spacing)", }, }, "x-initializer": "list:configureActions", diff --git a/packages/core/client/src/modules/blocks/data-blocks/list/createListBlockUISchema.ts b/packages/core/client/src/modules/blocks/data-blocks/list/createListBlockUISchema.ts index ec6c44b1f..3846b6851 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/list/createListBlockUISchema.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/list/createListBlockUISchema.ts @@ -37,7 +37,7 @@ export const createListBlockUISchema = (options: { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, }, diff --git a/packages/core/client/src/modules/blocks/data-blocks/table-selector/__e2e__/templatesOfBug.ts b/packages/core/client/src/modules/blocks/data-blocks/table-selector/__e2e__/templatesOfBug.ts index 23356307f..74d81ebef 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/table-selector/__e2e__/templatesOfBug.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/table-selector/__e2e__/templatesOfBug.ts @@ -76,7 +76,7 @@ export const tableSelectorDataScopeVariable: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-uid': 'vdvzzbfp53e', @@ -341,7 +341,7 @@ export const tableSelectorDataScopeVariable: PageConfig = { { style: { marginBottom: - 'var(--nb-spacing)', + 'var(--tb-spacing)', }, }, 'x-uid': diff --git a/packages/core/client/src/modules/blocks/data-blocks/table-selector/__tests__/createTableSelectorSchema.test.ts b/packages/core/client/src/modules/blocks/data-blocks/table-selector/__tests__/createTableSelectorSchema.test.ts index 1821c6079..429351792 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/table-selector/__tests__/createTableSelectorSchema.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/table-selector/__tests__/createTableSelectorSchema.test.ts @@ -22,7 +22,7 @@ describe('createTableSelectorSchema', () => { "x-component": "ActionBar", "x-component-props": { "style": { - "marginBottom": "var(--nb-spacing)", + "marginBottom": "var(--tb-spacing)", }, }, "x-initializer": "table:configureActions", diff --git a/packages/core/client/src/modules/blocks/data-blocks/table-selector/createTableSelectorUISchema.ts b/packages/core/client/src/modules/blocks/data-blocks/table-selector/createTableSelectorUISchema.ts index 91bb60c63..e4ccdff17 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/table-selector/createTableSelectorUISchema.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/table-selector/createTableSelectorUISchema.ts @@ -1,5 +1,4 @@ -import { ISchema } from '@tachybase/schema'; -import { uid } from '@tachybase/schema'; +import { ISchema, uid } from '@tachybase/schema'; export const createTableSelectorUISchema = (options: { collectionName: string; @@ -36,7 +35,7 @@ export const createTableSelectorUISchema = (options: { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, }, diff --git a/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/actions/duplicate.test.ts b/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/actions/duplicate.test.ts index 71b6a0f67..707d902d9 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/actions/duplicate.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/actions/duplicate.test.ts @@ -1,7 +1,8 @@ import { expect, test } from '@tachybase/test/e2e'; + import { T2187 } from '../templatesOfBug'; -// fix https://nocobase.height.app/T-2187 +// fix https://tachybase.height.app/T-2187 test('in the Duplicate mode, the Roles field should not have a value after clicking it because it is not selected', async ({ page, mockPage, diff --git a/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/actions/filter.test.ts b/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/actions/filter.test.ts index ee218ad68..548090bfa 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/actions/filter.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/actions/filter.test.ts @@ -1,7 +1,8 @@ import { expect, test } from '@tachybase/test/e2e'; + import { T2183, T2186 } from '../templatesOfBug'; -// fix https://nocobase.height.app/T-2183 +// fix https://tachybase.height.app/T-2183 test('should save conditions', async ({ page, mockPage }) => { await mockPage(T2183).goto(); await page.getByLabel('action-Filter.Action-Filter-filter-users-table').click(); @@ -18,7 +19,7 @@ test('should save conditions', async ({ page, mockPage }) => { await expect(page.getByTestId('select-filter-operator').getByText('is')).toBeVisible(); }); -// fix https://nocobase.height.app/T-2186 +// fix https://tachybase.height.app/T-2186 test('the input box displayed should correspond to the field type', async ({ page, mockPage }) => { await mockPage(T2186).goto(); diff --git a/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/templatesOfBug.ts b/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/templatesOfBug.ts index 9d9bfc692..b8da7b390 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/templatesOfBug.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/templatesOfBug.ts @@ -56,7 +56,7 @@ export const T2183 = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, properties: { @@ -215,7 +215,7 @@ export const T2186 = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, properties: { @@ -374,7 +374,7 @@ export const T2187 = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-uid': 't2drja2eg9p', @@ -771,7 +771,7 @@ export const T3686: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-uid': '42xfns3215b', diff --git a/packages/core/client/src/modules/blocks/data-blocks/table/__tests__/createTableBLockSchema.test.ts b/packages/core/client/src/modules/blocks/data-blocks/table/__tests__/createTableBLockSchema.test.ts index 7d0cd5d96..ed52e093e 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/table/__tests__/createTableBLockSchema.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/table/__tests__/createTableBLockSchema.test.ts @@ -20,7 +20,7 @@ describe('createTableBLockSchemaV2', () => { "x-component": "ActionBar", "x-component-props": { "style": { - "marginBottom": "var(--nb-spacing)", + "marginBottom": "var(--tb-spacing)", }, }, "x-initializer": "table:configureActions", diff --git a/packages/core/client/src/modules/blocks/data-blocks/table/createTableBlockUISchema.ts b/packages/core/client/src/modules/blocks/data-blocks/table/createTableBlockUISchema.ts index 33560ed00..2cafcb0e8 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/table/createTableBlockUISchema.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/table/createTableBlockUISchema.ts @@ -1,5 +1,4 @@ -import { ISchema } from '@tachybase/schema'; -import { uid } from '@tachybase/schema'; +import { ISchema, uid } from '@tachybase/schema'; export const createTableBlockUISchema = (options: { dataSource: string; @@ -41,7 +40,7 @@ export const createTableBlockUISchema = (options: { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, properties: {}, diff --git a/packages/core/client/src/modules/dialog/__e2e__/templatesOfBug.ts b/packages/core/client/src/modules/dialog/__e2e__/templatesOfBug.ts index 78463d75b..caf05e49a 100644 --- a/packages/core/client/src/modules/dialog/__e2e__/templatesOfBug.ts +++ b/packages/core/client/src/modules/dialog/__e2e__/templatesOfBug.ts @@ -1,4 +1,4 @@ -import { PageConfig, generalWithMultiLevelM2oFields } from '@tachybase/test/e2e'; +import { generalWithMultiLevelM2oFields, PageConfig } from '@tachybase/test/e2e'; export const T2797: PageConfig = { pageSchema: { @@ -63,7 +63,7 @@ export const T2797: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-index': 1, @@ -642,7 +642,7 @@ export const T2838: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-index': 1, @@ -1531,7 +1531,7 @@ export const tableWithRoles: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-uid': 'w07zcu825vu', @@ -1746,7 +1746,7 @@ export const tableWithUsers = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-uid': 'e7ukdkylglc', @@ -1992,7 +1992,7 @@ export const tableWithInherit = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-uid': '6j0p8tmwey7', @@ -2223,7 +2223,7 @@ export const tableWithInheritWithoutAssociation = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-uid': '6j0p8tmwey7', diff --git a/packages/core/client/src/modules/dialog/__e2e__/zIndex.test.ts b/packages/core/client/src/modules/dialog/__e2e__/zIndex.test.ts index 331c7eae6..bf0aaf9c9 100644 --- a/packages/core/client/src/modules/dialog/__e2e__/zIndex.test.ts +++ b/packages/core/client/src/modules/dialog/__e2e__/zIndex.test.ts @@ -1,8 +1,9 @@ import { expect, test } from '@tachybase/test/e2e'; + import { T2797, T2838 } from './templatesOfBug'; test.describe('z-index of dialog', () => { - // https://nocobase.height.app/T-2797 + // https://tachybase.height.app/T-2797 test('edit block title', async ({ page, mockPage }) => { await mockPage(T2797).goto(); @@ -17,7 +18,7 @@ test.describe('z-index of dialog', () => { await expect(page.getByLabel('block-item-Input-users-Block')).not.toBeVisible(); }); - // https://nocobase.height.app/T-2838 + // https://tachybase.height.app/T-2838 test('multilevel modal', async ({ page, mockPage, mockRecord }) => { const nocoPage = await mockPage(T2838).waitForInit(); await mockRecord('general'); diff --git a/packages/core/client/src/modules/fields/component/DatePicker/__e2e__/utils.ts b/packages/core/client/src/modules/fields/component/DatePicker/__e2e__/utils.ts index 6d4737f51..69f110796 100644 --- a/packages/core/client/src/modules/fields/component/DatePicker/__e2e__/utils.ts +++ b/packages/core/client/src/modules/fields/component/DatePicker/__e2e__/utils.ts @@ -1,4 +1,5 @@ import { generalWithDatetime, PageConfig } from '@tachybase/test/e2e'; + /** * 1. 一个 Table 区块 * 5. 所有字段都是 datetime 字段 @@ -62,7 +63,7 @@ export const oneTableBlockWithDatetimeFields: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-uid': 'nd5jqapjy3w', diff --git a/packages/core/client/src/route-switch/antd/admin-layout/index.tsx b/packages/core/client/src/route-switch/antd/admin-layout/index.tsx index bc54d0bf9..e42753aab 100644 --- a/packages/core/client/src/route-switch/antd/admin-layout/index.tsx +++ b/packages/core/client/src/route-switch/antd/admin-layout/index.tsx @@ -47,8 +47,8 @@ const useStyles = createStyles(({ css, token }) => { position: fixed; left: 0; right: 0; - height: var(--nb-header-height); - line-height: var(--nb-header-height); + height: var(--tb-header-height); + line-height: var(--tb-header-height); padding: 0; z-index: 100; background-color: ${token.colorBgHeader} !important; @@ -114,10 +114,10 @@ const useStyles = createStyles(({ css, token }) => { background: rgba(0, 0, 0, 0); z-index: 100; .ant-layout-sider-children { - top: var(--nb-header-height); + top: var(--tb-header-height); position: fixed; width: 200px; - height: calc(100vh - var(--nb-header-height)); + height: calc(100vh - var(--tb-header-height)); } `, main: css` @@ -141,8 +141,8 @@ const useStyles = createStyles(({ css, token }) => { `, mainHeader: css` flex-shrink: 0; - height: var(--nb-header-height); - line-height: var(--nb-header-height); + height: var(--tb-header-height); + line-height: var(--tb-header-height); background: transparent; pointer-events: none; `, diff --git a/packages/core/client/src/schema-component/antd/action/Action.Modal.tsx b/packages/core/client/src/schema-component/antd/action/Action.Modal.tsx index 4cba1f75a..a4201d204 100644 --- a/packages/core/client/src/schema-component/antd/action/Action.Modal.tsx +++ b/packages/core/client/src/schema-component/antd/action/Action.Modal.tsx @@ -18,7 +18,7 @@ const useStyles = createStyles(({ css }) => { } .ant-modal-content { - background: var(--nb-box-bg); + background: var(--tb-box-bg); } } `, diff --git a/packages/core/client/src/schema-component/antd/action/Action.tsx b/packages/core/client/src/schema-component/antd/action/Action.tsx index 71e1fb985..7229d9886 100644 --- a/packages/core/client/src/schema-component/antd/action/Action.tsx +++ b/packages/core/client/src/schema-component/antd/action/Action.tsx @@ -1,13 +1,16 @@ +import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { observer, RecursionField, useField, useFieldSchema, useForm } from '@tachybase/schema'; import { isPortalInBody } from '@tachybase/utils/client'; + import { App, Button } from 'antd'; import classnames from 'classnames'; import { default as lodash } from 'lodash'; -import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; + import { StablePopover, useActionContext } from '../..'; import { useDesignable } from '../../'; import { useACLActionParamsContext } from '../../../acl'; +import { withDynamicSchemaProps } from '../../../application/hoc/withDynamicSchemaProps'; import { Icon } from '../../../icon'; import { RecordProvider, useRecord } from '../../../record-provider'; import { useLocalVariables, useVariables } from '../../../variables'; @@ -26,7 +29,6 @@ import { useA } from './hooks'; import { useGetAriaLabelOfAction } from './hooks/useGetAriaLabelOfAction'; import { ComposedAction } from './types'; import { linkageAction } from './utils'; -import { withDynamicSchemaProps } from '../../../application/hoc/withDynamicSchemaProps'; export const Action: ComposedAction = withDynamicSchemaProps( observer((props: any) => { @@ -172,7 +174,7 @@ export const Action: ComposedAction = withDynamicSchemaProps( ); - // fix https://nocobase.height.app/T-3235/description + // fix https://tachybase.height.app/T-3235/description if (addChild) { return wrapSSR( diff --git a/packages/core/client/src/schema-component/antd/date-picker/index.md b/packages/core/client/src/schema-component/antd/date-picker/index.md index 223f14afa..80565937d 100644 --- a/packages/core/client/src/schema-component/antd/date-picker/index.md +++ b/packages/core/client/src/schema-component/antd/date-picker/index.md @@ -45,7 +45,7 @@ group: ## API -基于 antd 的 [DatePicker](https://ant.design/components/date-picker/#API),新增了以下扩展属性,用于支持 NocoBase 的日期字段设置。 +基于 antd 的 [DatePicker](https://ant.design/components/date-picker/#API),新增了以下扩展属性,用于支持 TachyBase 的日期字段设置。 - `dateFormat` 设置日期格式 - `timeFormat` 设置时间格式 diff --git a/packages/core/client/src/schema-component/antd/error-fallback/__tests__/error-fallback.test.tsx b/packages/core/client/src/schema-component/antd/error-fallback/__tests__/error-fallback.test.tsx index aa3b7f1a7..5540642db 100644 --- a/packages/core/client/src/schema-component/antd/error-fallback/__tests__/error-fallback.test.tsx +++ b/packages/core/client/src/schema-component/antd/error-fallback/__tests__/error-fallback.test.tsx @@ -1,5 +1,6 @@ -import { render, screen } from '@tachybase/test/client'; import React from 'react'; +import { render, screen } from '@tachybase/test/client'; + import App1 from '../demos/demo1'; describe('ErrorFallback', () => { @@ -7,7 +8,7 @@ describe('ErrorFallback', () => { render(); expect(screen.getByText(/render failed/i)).toBeInTheDocument(); - expect(screen.getByText(/this is likely a nocobase internals bug\. please open an issue at/i)).toBeInTheDocument(); + expect(screen.getByText(/this is likely a tachybase internals bug\. please open an issue at/i)).toBeInTheDocument(); expect(screen.getByRole('link', { name: /feedback/i })).toBeInTheDocument(); expect(screen.getByText(/try again/i)).toBeInTheDocument(); expect(screen.getByText(/error: error message/i)).toBeInTheDocument(); diff --git a/packages/core/client/src/schema-component/antd/filter/__tests__/filter.test.tsx b/packages/core/client/src/schema-component/antd/filter/__tests__/filter.test.tsx index e2baebc5c..5ecd3428a 100644 --- a/packages/core/client/src/schema-component/antd/filter/__tests__/filter.test.tsx +++ b/packages/core/client/src/schema-component/antd/filter/__tests__/filter.test.tsx @@ -1,5 +1,6 @@ -import { render, screen, userEvent, waitFor, within } from '@tachybase/test/client'; import React from 'react'; +import { render, screen, userEvent, waitFor, within } from '@tachybase/test/client'; + import App2 from '../demos/demo2'; import App3 from '../demos/demo3'; import App4 from '../demos/demo4'; @@ -30,7 +31,7 @@ describe('Filter', () => { expect(inputs[0]).toHaveValue('aa'); expect(inputs[1]).toHaveValue('aaa'); - // 点击下拉框中的选项,Popover 不应该关闭。详见:https://nocobase.height.app/T-1508 + // 点击下拉框中的选项,Popover 不应该关闭。详见:https://tachybase.height.app/T-1508 await userEvent.click(screen.getByText(/any/i)); await userEvent.click(screen.getByText(/all/i)); expect(tooltip).toBeInTheDocument(); @@ -96,7 +97,7 @@ describe('Filter', () => { expect(inputs[0]).toHaveValue(''); expect(inputs[1]).toHaveValue('aaa'); - // 点击下拉框中的选项,Popover 不应该关闭。详见:https://nocobase.height.app/T-1508 + // 点击下拉框中的选项,Popover 不应该关闭。详见:https://tachybase.height.app/T-1508 await userEvent.click(screen.getByText(/any/i)); await userEvent.click(screen.getByText(/all/i)); expect(tooltip).toBeInTheDocument(); diff --git a/packages/core/client/src/schema-component/antd/form-dialog/index.tsx b/packages/core/client/src/schema-component/antd/form-dialog/index.tsx index 311de5938..44687edc5 100644 --- a/packages/core/client/src/schema-component/antd/form-dialog/index.tsx +++ b/packages/core/client/src/schema-component/antd/form-dialog/index.tsx @@ -1,12 +1,26 @@ -import { createForm, Form, IFormProps } from '@tachybase/schema'; -import { FormProvider, Observer, observer, ReactFC } from '@tachybase/schema'; -import { toJS } from '@tachybase/schema'; -import { applyMiddleware, IMiddleware, isBool, isFn, isNum, isStr } from '@tachybase/schema'; -import { Modal, ModalProps, ThemeConfig } from 'antd'; import React, { Fragment, useLayoutEffect, useRef, useState } from 'react'; +import { + applyMiddleware, + createForm, + Form, + FormProvider, + IFormProps, + IMiddleware, + isBool, + isFn, + isNum, + isStr, + Observer, + observer, + ReactFC, + toJS, +} from '@tachybase/schema'; + +import { Modal, ModalProps, ThemeConfig } from 'antd'; import { createPortal } from 'react-dom'; -import { GlobalThemeProvider } from '../../../global-theme'; + import { createPortalProvider, createPortalRoot, loading, usePrefixCls, useToken } from '../__builtins__'; +import { GlobalThemeProvider } from '../../../global-theme'; type FormDialogRenderer = React.ReactElement | ((form: Form) => React.ReactElement); @@ -96,8 +110,8 @@ export function FormDialog(title: any, id: any, renderer?: any, theme?: any): IF return ( { .then((value) => { nextTick(() => { const result = transformVariableValue(value, { targetCollectionField: collectionFieldRef.current }); - // fix https://nocobase.height.app/T-2608 + // fix https://tachybase.height.app/T-2608 if (_.isEmpty(result) && !_.isNumber(result)) { field.value = null; } else { diff --git a/packages/core/client/src/schema-component/antd/form-item/hooks/useParseDefaultValue.ts b/packages/core/client/src/schema-component/antd/form-item/hooks/useParseDefaultValue.ts index 3d62168bd..d13d1afb0 100644 --- a/packages/core/client/src/schema-component/antd/form-item/hooks/useParseDefaultValue.ts +++ b/packages/core/client/src/schema-component/antd/form-item/hooks/useParseDefaultValue.ts @@ -1,9 +1,9 @@ -import { Field } from '@tachybase/schema'; -import { useField, useFieldSchema } from '@tachybase/schema'; -import { reaction } from '@tachybase/schema'; -import { getValuesByPath } from '@tachybase/utils/client'; -import _ from 'lodash'; import { useCallback, useEffect } from 'react'; +import { Field, reaction, useField, useFieldSchema } from '@tachybase/schema'; +import { getValuesByPath } from '@tachybase/utils/client'; + +import _ from 'lodash'; + import { useRecordIndex } from '../../../../../src/record-provider'; import { useCollection_deprecated } from '../../../../collection-manager'; import { useCollectionRecord } from '../../../../data-source/collection-record/CollectionRecordProvider'; @@ -82,7 +82,7 @@ const useParseDefaultValue = () => { }); if (value == null || value === '') { - // fix https://nocobase.height.app/T-2805 + // fix https://tachybase.height.app/T-2805 field.setInitialValue(null); await field.reset({ forceClear: true }); } else if (isSpecialCase()) { @@ -122,7 +122,7 @@ const useParseDefaultValue = () => { const obj = { [variableName]: variable?.ctx || {} }; const path = getPath(fieldSchema.default); const value = getValuesByPath(obj, path); - // fix https://nocobase.height.app/T-2212 + // fix https://tachybase.height.app/T-2212 if (value === undefined) { // 返回一个随机值,确保能触发 run 函数 return Math.random(); diff --git a/packages/core/client/src/schema-component/antd/form-item/hooks/useSpecialCase.ts b/packages/core/client/src/schema-component/antd/form-item/hooks/useSpecialCase.ts index ec8d8ae78..cb7b7e470 100644 --- a/packages/core/client/src/schema-component/antd/form-item/hooks/useSpecialCase.ts +++ b/packages/core/client/src/schema-component/antd/form-item/hooks/useSpecialCase.ts @@ -1,14 +1,15 @@ -import { Field } from '@tachybase/schema'; -import { Schema, useFieldSchema, useForm } from '@tachybase/schema'; -import _ from 'lodash'; import { useCallback, useEffect, useMemo } from 'react'; +import { Field, Schema, useFieldSchema, useForm } from '@tachybase/schema'; + +import _ from 'lodash'; + import { CollectionFieldOptions_deprecated, useCollection_deprecated, useCollectionManager_deprecated, } from '../../../../collection-manager'; -import { isSubMode } from '../../association-field/util'; import { markRecordAsNew } from '../../../../data-source/collection-record/isNewRecord'; +import { isSubMode } from '../../association-field/util'; /** * #### 处理 `子表单` 和 `子表格` 中的特殊情况 @@ -46,7 +47,7 @@ export const useSpecialCase = () => { return { /** * 特殊情况指的是:当前字段是 `对一` 字段且存在于 `对多` 字段的 `子表格` 或 `子表单` 中 - * 详细说明见:https://nocobase.feishu.cn/docx/EmNEdEBOnoQohUx2UmBcqIQ5nyh#CUdLdy6OpoPKjyx9DLPc3lqknVc + * 详细说明见:https://tachybase.feishu.cn/docx/EmNEdEBOnoQohUx2UmBcqIQ5nyh#CUdLdy6OpoPKjyx9DLPc3lqknVc */ isSpecialCase, setDefaultValue, @@ -71,7 +72,7 @@ export function getParentFieldSchema(fieldSchema: Schema) { /** * 特殊情况指的是:当前字段是 `对一` 字段且存在于 `对多` 字段的 `子表格` 或 `子表单` 中 - * 详细说明见:https://nocobase.feishu.cn/docx/EmNEdEBOnoQohUx2UmBcqIQ5nyh#CUdLdy6OpoPKjyx9DLPc3lqknVc + * 详细说明见:https://tachybase.feishu.cn/docx/EmNEdEBOnoQohUx2UmBcqIQ5nyh#CUdLdy6OpoPKjyx9DLPc3lqknVc * @returns */ export function isSpecialCaseField({ diff --git a/packages/core/client/src/schema-component/antd/form-v2/Form.tsx b/packages/core/client/src/schema-component/antd/form-v2/Form.tsx index ca52b089e..f090218ff 100644 --- a/packages/core/client/src/schema-component/antd/form-v2/Form.tsx +++ b/packages/core/client/src/schema-component/antd/form-v2/Form.tsx @@ -332,7 +332,7 @@ function getFieldValuesInCondition({ linkageRules, formValues }) { return conditions .map((condition) => { - // fix https://nocobase.height.app/T-3251 + // fix https://tachybase.height.app/T-3251 if ('$and' in condition || '$or' in condition) { return run(condition); } diff --git a/packages/core/client/src/schema-component/antd/form/__tests__/form.test.tsx b/packages/core/client/src/schema-component/antd/form/__tests__/form.test.tsx index 81eddb28f..ba1215699 100644 --- a/packages/core/client/src/schema-component/antd/form/__tests__/form.test.tsx +++ b/packages/core/client/src/schema-component/antd/form/__tests__/form.test.tsx @@ -1,5 +1,6 @@ -import { render, screen, sleep, userEvent, waitFor } from '@tachybase/test/client'; import React from 'react'; +import { render, screen, sleep, userEvent, waitFor } from '@tachybase/test/client'; + import App1 from '../demos/demo1'; import App2 from '../demos/demo2'; import App3 from '../demos/demo3'; @@ -145,7 +146,7 @@ describe('Form', () => { const closeBtn = screen.getByText('Close'); expect(input).toBeInTheDocument(); - expect(input).toHaveValue('hello nocobase'); + expect(input).toHaveValue('hello tachybase'); expect(closeBtn).toBeInTheDocument(); expect(screen.getByText(/drawer title/i)).toBeInTheDocument(); }); diff --git a/packages/core/client/src/schema-component/antd/form/demos/demo8.tsx b/packages/core/client/src/schema-component/antd/form/demos/demo8.tsx index e4cafa917..4c6aa7ea1 100644 --- a/packages/core/client/src/schema-component/antd/form/demos/demo8.tsx +++ b/packages/core/client/src/schema-component/antd/form/demos/demo8.tsx @@ -1,5 +1,4 @@ -import { FormItem } from '@tachybase/components'; -import { ISchema, observer } from '@tachybase/schema'; +import React, { useEffect, useState } from 'react'; import { Action, ActionContextProvider, @@ -11,8 +10,10 @@ import { useCloseAction, useRequest, } from '@tachybase/client'; +import { FormItem } from '@tachybase/components'; +import { ISchema, observer } from '@tachybase/schema'; + import { Button } from 'antd'; -import React, { useEffect, useState } from 'react'; const useValues = (options) => { const { visible } = useActionContext(); @@ -21,7 +22,7 @@ const useValues = (options) => { Promise.resolve({ data: { id: 1, - name: 'hello nocobase', + name: 'hello tachybase', }, }), { ...options, manual: true }, diff --git a/packages/core/client/src/schema-component/antd/input/__tests__/Input.test.tsx b/packages/core/client/src/schema-component/antd/input/__tests__/Input.test.tsx index ba429118a..00ec677fb 100644 --- a/packages/core/client/src/schema-component/antd/input/__tests__/Input.test.tsx +++ b/packages/core/client/src/schema-component/antd/input/__tests__/Input.test.tsx @@ -1,5 +1,6 @@ -import { fireEvent, render, screen, userEvent, waitFor } from '@tachybase/test/client'; import React from 'react'; +import { fireEvent, render, screen, userEvent, waitFor } from '@tachybase/test/client'; + import App1 from '../demos/input'; import App4 from '../demos/json'; import App2 from '../demos/textarea'; @@ -64,9 +65,9 @@ describe('Input.URL', () => { const { container } = render(); const input = container.querySelector('input') as HTMLInputElement; - await userEvent.type(input, 'https://www.nocobase.com'); - expect(input.value).toBe('https://www.nocobase.com'); - expect(screen.getByText('https://www.nocobase.com')).toBeInTheDocument(); + await userEvent.type(input, 'https://www.tachybase.com'); + expect(input.value).toBe('https://www.tachybase.com'); + expect(screen.getByText('https://www.tachybase.com')).toBeInTheDocument(); }); it('should display the error when the value is invalid', async () => { @@ -98,15 +99,15 @@ describe('Input.JSON', () => { await waitFor(() => { const textarea = container.querySelector('textarea') as HTMLTextAreaElement; const pre = container.querySelector('pre') as HTMLPreElement; - fireEvent.change(textarea, { target: { value: '{"name":"nocobase"}' } }); - fireEvent.blur(textarea, { target: { value: '{"name":"nocobase"}' } }); - expect(JSON.parse(textarea.value)).toEqual({ name: 'nocobase' }); + fireEvent.change(textarea, { target: { value: '{"name":"tachybase"}' } }); + fireEvent.blur(textarea, { target: { value: '{"name":"tachybase"}' } }); + expect(JSON.parse(textarea.value)).toEqual({ name: 'tachybase' }); expect(pre).toMatchInlineSnapshot(`
         {
-        "name": "nocobase"
+        "name": "tachybase"
       }
       
`); @@ -118,8 +119,8 @@ describe('Input.JSON', () => { await waitFor(() => { const textarea = container.querySelector('textarea') as HTMLTextAreaElement; - fireEvent.change(textarea, { target: { value: '{"name":nocobase}' } }); - fireEvent.blur(textarea, { target: { value: '{"name":nocobase}' } }); + fireEvent.change(textarea, { target: { value: '{"name":tachybase}' } }); + fireEvent.blur(textarea, { target: { value: '{"name":tachybase}' } }); expect(screen.getByText(/Unexpected token/)).toBeInTheDocument(); }); }); diff --git a/packages/core/client/src/schema-component/antd/menu/Menu.tsx b/packages/core/client/src/schema-component/antd/menu/Menu.tsx index 219129a72..e8d4165c7 100644 --- a/packages/core/client/src/schema-component/antd/menu/Menu.tsx +++ b/packages/core/client/src/schema-component/antd/menu/Menu.tsx @@ -136,7 +136,7 @@ const SideMenu = ({ const { Component, getMenuItems } = useMenuItem(); const { styles } = useStyles(); - // fix https://nocobase.height.app/T-3331/description + // fix https://tachybase.height.app/T-3331/description // 使用 ref 用来防止闭包问题 const sideMenuSchemaRef = useRef(sideMenuSchema); sideMenuSchemaRef.current = sideMenuSchema; diff --git a/packages/core/client/src/schema-component/antd/page/__tests__/page.test.tsx b/packages/core/client/src/schema-component/antd/page/__tests__/page.test.tsx index ce902bfd9..13486c47b 100644 --- a/packages/core/client/src/schema-component/antd/page/__tests__/page.test.tsx +++ b/packages/core/client/src/schema-component/antd/page/__tests__/page.test.tsx @@ -1,5 +1,6 @@ -import { render, screen, waitFor } from '@tachybase/test/client'; import React from 'react'; +import { render, screen, waitFor } from '@tachybase/test/client'; + import App1 from '../demos/demo1'; describe('Page', () => { @@ -13,7 +14,7 @@ describe('Page', () => { expect(screen.getByText(/page content/i)).toBeInTheDocument(); }); await waitFor(() => { - expect(document.title).toBe('Page Title - NocoBase'); + expect(document.title).toBe('Page Title - TachyBase'); }); }); }); diff --git a/packages/core/client/src/schema-component/antd/page/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/page/demos/demo1.tsx index cb16b6e68..13b187532 100644 --- a/packages/core/client/src/schema-component/antd/page/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/page/demos/demo1.tsx @@ -1,6 +1,6 @@ -import { ISchema } from '@tachybase/schema'; -import { DocumentTitleProvider, Page, SchemaComponent, SchemaComponentProvider, Application } from '@tachybase/client'; import React from 'react'; +import { Application, DocumentTitleProvider, Page, SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; +import { ISchema } from '@tachybase/schema'; const schema: ISchema = { type: 'object', @@ -23,7 +23,7 @@ const schema: ISchema = { const Root = () => { return ( - + diff --git a/packages/core/client/src/schema-component/antd/popover/Popover.tsx b/packages/core/client/src/schema-component/antd/popover/Popover.tsx index d970f40f8..e5f005d76 100644 --- a/packages/core/client/src/schema-component/antd/popover/Popover.tsx +++ b/packages/core/client/src/schema-component/antd/popover/Popover.tsx @@ -1,9 +1,10 @@ -import { Popover as AntdPopover, PopoverProps } from 'antd'; import React, { useCallback, useRef } from 'react'; +import { Popover as AntdPopover, PopoverProps } from 'antd'; + /** * 参见:https://github.com/ant-design/ant-design/issues/44119 - * fix https://nocobase.height.app/T-1508 + * fix https://tachybase.height.app/T-1508 * @param props * @returns */ diff --git a/packages/core/client/src/schema-component/antd/preview/demos/demo1.tsx b/packages/core/client/src/schema-component/antd/preview/demos/demo1.tsx index c56a2b73e..850520afc 100644 --- a/packages/core/client/src/schema-component/antd/preview/demos/demo1.tsx +++ b/packages/core/client/src/schema-component/antd/preview/demos/demo1.tsx @@ -1,9 +1,10 @@ /** * title: Preview */ -import { FormItem } from '@tachybase/components'; -import { SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; import React from 'react'; +import { SchemaComponent, SchemaComponentProvider } from '@tachybase/client'; +import { FormItem } from '@tachybase/components'; + import Preview from '../Preview'; const defaultValue = [ @@ -19,7 +20,7 @@ const defaultValue = [ meta: {}, status: 'uploading', percent: 60, - url: 'https://nocobase.oss-cn-beijing.aliyuncs.com/cd48dc833ab01aa3959ac39309fc39de.jpg', + url: 'https://tachybase.oss-cn-beijing.aliyuncs.com/cd48dc833ab01aa3959ac39309fc39de.jpg', created_at: '2021-08-13T15:00:17.423Z', updated_at: '2021-08-13T15:00:17.423Z', created_by_id: null, @@ -35,7 +36,7 @@ const defaultValue = [ mimetype: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', path: '', meta: {}, - url: 'https://nocobase.oss-cn-beijing.aliyuncs.com/d9f6ad6669902a9a8a1229d9f362235a.docx', + url: 'https://tachybase.oss-cn-beijing.aliyuncs.com/d9f6ad6669902a9a8a1229d9f362235a.docx', created_at: '2021-09-12T01:22:06.229Z', updated_at: '2021-09-12T01:22:06.229Z', created_by_id: null, diff --git a/packages/core/client/src/schema-component/antd/table/Table.Array.tsx b/packages/core/client/src/schema-component/antd/table/Table.Array.tsx index 0695f4540..e5568685a 100644 --- a/packages/core/client/src/schema-component/antd/table/Table.Array.tsx +++ b/packages/core/client/src/schema-component/antd/table/Table.Array.tsx @@ -119,7 +119,7 @@ const useTableColumns = () => { const index = field.value?.indexOf(record); return ( - {/* fix https://nocobase.height.app/T-3232/description */} + {/* fix https://tachybase.height.app/T-3232/description */} {/* 如果作为关系表格区块,则 parentRecordData 应该有值;如果作为普通表格使用(如数据源管理页面的表格)则应该使用 recordData,且 parentRecordData 为空 */} diff --git a/packages/core/client/src/schema-component/antd/upload/demos/apiClient.ts b/packages/core/client/src/schema-component/antd/upload/demos/apiClient.ts index b683af42b..64a5f52bb 100644 --- a/packages/core/client/src/schema-component/antd/upload/demos/apiClient.ts +++ b/packages/core/client/src/schema-component/antd/upload/demos/apiClient.ts @@ -21,7 +21,7 @@ mockRequest.onPost('/attachments:create').reply(async (config) => { extname: '.docx', path: '', size: null, - url: 'https://nocobase.oss-cn-beijing.aliyuncs.com/7edb55e4e3145e5ac59ea3a44ca840e9.docx', + url: 'https://tachybase.oss-cn-beijing.aliyuncs.com/7edb55e4e3145e5ac59ea3a44ca840e9.docx', mimetype: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', meta: {}, storage_id: 2, diff --git a/packages/core/client/src/schema-component/antd/upload/demos/demo2.tsx b/packages/core/client/src/schema-component/antd/upload/demos/demo2.tsx index a491c1387..054532d46 100644 --- a/packages/core/client/src/schema-component/antd/upload/demos/demo2.tsx +++ b/packages/core/client/src/schema-component/antd/upload/demos/demo2.tsx @@ -1,9 +1,10 @@ /** * title: Upload */ -import { FormItem } from '@tachybase/components'; -import { APIClientProvider, SchemaComponent, SchemaComponentProvider, Upload } from '@tachybase/client'; import React from 'react'; +import { APIClientProvider, SchemaComponent, SchemaComponentProvider, Upload } from '@tachybase/client'; +import { FormItem } from '@tachybase/components'; + import apiClient from './apiClient'; const schema = { @@ -25,7 +26,7 @@ const schema = { meta: {}, status: 'uploading', percent: 60, - url: 'https://nocobase.oss-cn-beijing.aliyuncs.com/cd48dc833ab01aa3959ac39309fc39de.jpg', + url: 'https://tachybase.oss-cn-beijing.aliyuncs.com/cd48dc833ab01aa3959ac39309fc39de.jpg', created_at: '2021-08-13T15:00:17.423Z', updated_at: '2021-08-13T15:00:17.423Z', created_by_id: null, @@ -41,7 +42,7 @@ const schema = { mimetype: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', path: '', meta: {}, - url: 'https://nocobase.oss-cn-beijing.aliyuncs.com/d9f6ad6669902a9a8a1229d9f362235a.docx', + url: 'https://tachybase.oss-cn-beijing.aliyuncs.com/d9f6ad6669902a9a8a1229d9f362235a.docx', created_at: '2021-09-12T01:22:06.229Z', updated_at: '2021-09-12T01:22:06.229Z', created_by_id: null, diff --git a/packages/core/client/src/schema-component/common/utils/uitls.tsx b/packages/core/client/src/schema-component/common/utils/uitls.tsx index bd001b040..6abe3a65f 100644 --- a/packages/core/client/src/schema-component/common/utils/uitls.tsx +++ b/packages/core/client/src/schema-component/common/utils/uitls.tsx @@ -1,4 +1,5 @@ import _, { every, findIndex, some } from 'lodash'; + import { VariableOption, VariablesContextType } from '../../../variables/types'; import { isVariable } from '../../../variables/utils/isVariable'; import { transformVariableValue } from '../../../variables/utils/transformVariableValue'; @@ -78,7 +79,7 @@ export const conditionAnalyses = async ({ const conditions = ruleGroup[type]; let results = conditions.map(async (condition) => { - // fix https://nocobase.height.app/T-3152 + // fix https://tachybase.height.app/T-3152 if ('$and' in condition || '$or' in condition) { return await conditionAnalyses({ ruleGroup: condition, variables, localVariables }); } diff --git a/packages/core/client/src/schema-component/hooks/useDesignable.tsx b/packages/core/client/src/schema-component/hooks/useDesignable.tsx index 059d63307..087579fc8 100644 --- a/packages/core/client/src/schema-component/hooks/useDesignable.tsx +++ b/packages/core/client/src/schema-component/hooks/useDesignable.tsx @@ -1,12 +1,21 @@ -import { GeneralField, Query } from '@tachybase/schema'; -import { ISchema, Schema, SchemaOptionsContext, useField, useFieldSchema } from '@tachybase/schema'; -import { uid } from '@tachybase/schema'; +import React, { ComponentType, useCallback, useContext, useEffect, useMemo } from 'react'; +import { + GeneralField, + ISchema, + Query, + Schema, + SchemaOptionsContext, + uid, + useField, + useFieldSchema, +} from '@tachybase/schema'; + import { message } from 'antd'; import cloneDeep from 'lodash/cloneDeep'; import get from 'lodash/get'; import set from 'lodash/set'; -import React, { ComponentType, useCallback, useContext, useEffect, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; + import { APIClient, useAPIClient } from '../../api-client'; import { SchemaComponentContext } from '../context'; @@ -691,7 +700,7 @@ export function useFindComponent() { } const res = get(components, component); if (!res) { - console.error(`[nocobase]: Component "${component}" not found`); + console.error(`[tachybase]: Component "${component}" not found`); } return res; }; diff --git a/packages/core/client/src/schema-initializer/buttons/TabPaneInitializers.tsx b/packages/core/client/src/schema-initializer/buttons/TabPaneInitializers.tsx index af3e4c4d8..eb1e5cb49 100644 --- a/packages/core/client/src/schema-initializer/buttons/TabPaneInitializers.tsx +++ b/packages/core/client/src/schema-initializer/buttons/TabPaneInitializers.tsx @@ -1,11 +1,13 @@ -import { ISchema, useField, useFieldSchema, useForm } from '@tachybase/schema'; import React, { useMemo } from 'react'; -import { SchemaComponent, useAPIClient, useActionContext, useDesignable, useProps, useRecord } from '../..'; -import { SchemaInitializer } from '../../application/schema-initializer/SchemaInitializer'; -import { useGetAriaLabelOfSchemaInitializer } from '../hooks/useGetAriaLabelOfSchemaInitializer'; +import { ISchema, useField, useFieldSchema, useForm } from '@tachybase/schema'; + import { message } from 'antd'; import { saveAs } from 'file-saver'; +import { SchemaComponent, useActionContext, useAPIClient, useDesignable, useProps, useRecord } from '../..'; +import { SchemaInitializer } from '../../application/schema-initializer/SchemaInitializer'; +import { useGetAriaLabelOfSchemaInitializer } from '../hooks/useGetAriaLabelOfSchemaInitializer'; + export const TabPaneInitializers = (props?: any) => { const { designable, insertBeforeEnd } = useDesignable(); const fieldSchema = useFieldSchema(); @@ -120,7 +122,7 @@ export const TabPaneInitializers = (props?: any) => { style: { borderColor: 'var(--colorSettings)', color: 'var(--colorSettings)', - marginRight: 'var(--nb-spacing)', + marginRight: 'var(--tb-spacing)', }, type: 'dashed', useAction: useDumpAction, @@ -136,7 +138,7 @@ export const TabPaneInitializers = (props?: any) => { style: { borderColor: 'var(--colorSettings)', color: 'var(--colorSettings)', - marginRight: 'var(--nb-spacing)', + marginRight: 'var(--tb-spacing)', }, type: 'dashed', 'aria-label': getAriaLabel(), diff --git a/packages/core/client/src/schema-initializer/components/assigned-field/AssignedField.tsx b/packages/core/client/src/schema-initializer/components/assigned-field/AssignedField.tsx index 205ec68b5..4c5cfc513 100644 --- a/packages/core/client/src/schema-initializer/components/assigned-field/AssignedField.tsx +++ b/packages/core/client/src/schema-initializer/components/assigned-field/AssignedField.tsx @@ -1,8 +1,8 @@ -import { Field } from '@tachybase/schema'; -import { useField, useFieldSchema } from '@tachybase/schema'; -import { merge } from '@tachybase/schema'; -import _ from 'lodash'; import React, { useCallback, useEffect, useMemo } from 'react'; +import { Field, merge, useField, useFieldSchema } from '@tachybase/schema'; + +import _ from 'lodash'; + import { useFormBlockContext } from '../../../block-provider'; import { useCollection_deprecated, @@ -10,13 +10,13 @@ import { useCollectionFilterOptions, useCollectionManager_deprecated, } from '../../../collection-manager'; +import { CollectionFieldProvider } from '../../../data-source'; import { useRecord } from '../../../record-provider'; import { useCompile, useComponent } from '../../../schema-component'; -import { VariableInput, getShouldChange } from '../../../schema-settings/VariableInput/VariableInput'; import { Option } from '../../../schema-settings/VariableInput/type'; import { formatVariableScop } from '../../../schema-settings/VariableInput/utils/formatVariableScop'; +import { getShouldChange, VariableInput } from '../../../schema-settings/VariableInput/VariableInput'; import { useLocalVariables, useVariables } from '../../../variables'; -import { CollectionFieldProvider } from '../../../data-source'; interface AssignedFieldProps { value: any; @@ -116,7 +116,7 @@ export const AssignedField = (props: AssignedFieldProps) => { const currentForm = scope.find((item) => item.value === '$nForm'); const fields = getCollectionFields(name); - // fix https://nocobase.height.app/T-1355 + // fix https://tachybase.height.app/T-1355 // 工作流人工节点的 `自定义表单` 区块,与其它表单区块不同,根据它的数据表名称,获取到的字段列表为空,所以需要在这里特殊处理一下 if (!fields?.length && currentForm) { currentForm.children = formatVariableScop(currentFormFields); diff --git a/packages/core/client/src/schema-initializer/index.md b/packages/core/client/src/schema-initializer/index.md index c2c63439a..84cf7fbff 100644 --- a/packages/core/client/src/schema-initializer/index.md +++ b/packages/core/client/src/schema-initializer/index.md @@ -46,7 +46,7 @@ group: ### Built Type -NocoBase 提供了几个内置的组件,可以直接使用。 +TachyBase 提供了几个内置的组件,可以直接使用。 diff --git a/packages/core/client/src/schema-initializer/utils.ts b/packages/core/client/src/schema-initializer/utils.ts index dfa3981b3..8a479c13d 100644 --- a/packages/core/client/src/schema-initializer/utils.ts +++ b/packages/core/client/src/schema-initializer/utils.ts @@ -1,9 +1,9 @@ -import { Field, Form } from '@tachybase/schema'; -import { ISchema, Schema, useFieldSchema, useForm } from '@tachybase/schema'; -import { uid } from '@tachybase/schema'; -import _ from 'lodash'; import { useMemo } from 'react'; +import { Field, Form, ISchema, Schema, uid, useFieldSchema, useForm } from '@tachybase/schema'; + +import _ from 'lodash'; import { useTranslation } from 'react-i18next'; + import { DataBlockInitializer, DataSource, @@ -14,7 +14,7 @@ import { useFormActiveFields, useFormBlockContext, } from '../'; -import { FieldOptions, useCollectionManager_deprecated, useCollection_deprecated } from '../collection-manager'; +import { FieldOptions, useCollection_deprecated, useCollectionManager_deprecated } from '../collection-manager'; import { Collection, CollectionFieldOptions } from '../data-source/collection/Collection'; import { useDataSourceManager } from '../data-source/data-source/DataSourceManagerProvider'; import { isAssocField } from '../filter-provider/utils'; @@ -890,7 +890,7 @@ export const useCollectionDataSourceItems = ({ getTemplatesByCollection, t, }).sort((item) => { - // fix https://nocobase.height.app/T-3551 + // fix https://tachybase.height.app/T-3551 const inherits = _.toArray(collection?.inherits || []); if (item.name === collection?.name || inherits.some((inheritName) => inheritName === item.name)) return -1; }), @@ -898,7 +898,7 @@ export const useCollectionDataSourceItems = ({ })); }, [allCollections, collection?.inherits, collection?.name, componentName, getTemplatesByCollection, t]); - // https://nocobase.height.app/T-3821 + // https://tachybase.height.app/T-3821 // showAssociationFields 的值是固定不变的,所以在 if 语句里使用 hooks 是安全的 if (showAssociationFields) { // eslint-disable-next-line react-hooks/rules-of-hooks @@ -1178,7 +1178,7 @@ export const createFormBlockSchema = (options: { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, properties: actions, @@ -1313,7 +1313,7 @@ export const createTableBlockSchema = (options) => { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, properties: {}, diff --git a/packages/core/client/src/schema-settings/SchemaSettingsDefaultValue.tsx b/packages/core/client/src/schema-settings/SchemaSettingsDefaultValue.tsx index dd8ae6141..eef6bf2e0 100644 --- a/packages/core/client/src/schema-settings/SchemaSettingsDefaultValue.tsx +++ b/packages/core/client/src/schema-settings/SchemaSettingsDefaultValue.tsx @@ -81,7 +81,7 @@ export const SchemaSettingsDefaultValue = function DefaultValueConfigure(props: const currentForm = scope.find((item) => item.value === '$nForm'); const fields = getCollectionFields(name); - // fix https://nocobase.height.app/T-1355 + // fix https://tachybase.height.app/T-1355 // 工作流人工节点的 `自定义表单` 区块,与其它表单区块不同,根据它的数据表名称,获取到的字段列表为空,所以需要在这里特殊处理一下 if (!fields?.length && currentForm) { currentForm.children = formatVariableScop(getFields()); diff --git a/packages/core/client/src/schema-settings/VariableInput/VariableInput.tsx b/packages/core/client/src/schema-settings/VariableInput/VariableInput.tsx index ea4f9bb7d..3cfb6c5db 100644 --- a/packages/core/client/src/schema-settings/VariableInput/VariableInput.tsx +++ b/packages/core/client/src/schema-settings/VariableInput/VariableInput.tsx @@ -1,11 +1,12 @@ -import { Form } from '@tachybase/schema'; -// @ts-ignore -import { Schema } from '@tachybase/schema'; -import _ from 'lodash'; import React, { useCallback } from 'react'; +// @ts-ignore +import { Form, Schema } from '@tachybase/schema'; + +import _ from 'lodash'; import { useTranslation } from 'react-i18next'; + import { CollectionFieldOptions_deprecated } from '../../collection-manager'; -import { Variable, useVariableScope } from '../../schema-component'; +import { useVariableScope, Variable } from '../../schema-component'; import { useValues } from '../../schema-component/antd/filter/useValues'; import { VariableOption, VariablesContextType } from '../../variables/types'; import { isVariable } from '../../variables/utils/isVariable'; @@ -160,7 +161,7 @@ export const getShouldChange = ({ return true; } - // `json` 可以选择任意类型的变量,详见:https://nocobase.feishu.cn/docx/EmNEdEBOnoQohUx2UmBcqIQ5nyh#FPLfdSRDEoXR65xW0mBcdfL5n0c + // `json` 可以选择任意类型的变量,详见:https://tachybase.feishu.cn/docx/EmNEdEBOnoQohUx2UmBcqIQ5nyh#FPLfdSRDEoXR65xW0mBcdfL5n0c if (collectionField.interface === 'json') { return true; } diff --git a/packages/core/client/src/schema-settings/VariableInput/hooks/useFormVariable.ts b/packages/core/client/src/schema-settings/VariableInput/hooks/useFormVariable.ts index caebd64de..ff458e7df 100644 --- a/packages/core/client/src/schema-settings/VariableInput/hooks/useFormVariable.ts +++ b/packages/core/client/src/schema-settings/VariableInput/hooks/useFormVariable.ts @@ -1,6 +1,7 @@ -import { Form } from '@tachybase/schema'; -import { Schema } from '@tachybase/schema'; +import { Form, Schema } from '@tachybase/schema'; + import { useTranslation } from 'react-i18next'; + import { useFormBlockContext } from '../../../block-provider'; import { CollectionFieldOptions_deprecated } from '../../../collection-manager'; import { useBaseVariable } from './useBaseVariable'; @@ -36,7 +37,7 @@ export const useFormVariable = ({ collectionName, collectionField, schema, noDis collectionName: collectionName, noDisabled, returnFields: (fields, option) => { - // fix https://nocobase.height.app/T-2277 + // fix https://tachybase.height.app/T-2277 return fields; // const activeFieldsName = getActiveFieldsName?.('form') || []; @@ -76,7 +77,7 @@ export const useCurrentFormVariable = ({ collectionName: collectionName, noDisabled, returnFields: (fields, option) => { - // fix https://nocobase.height.app/T-2277 + // fix https://tachybase.height.app/T-2277 return fields; // const activeFieldsName = getActiveFieldsName?.('form') || []; diff --git a/packages/core/client/src/schema-settings/VariableInput/hooks/useIterationVariable.ts b/packages/core/client/src/schema-settings/VariableInput/hooks/useIterationVariable.ts index ccca2acae..5d5b8bf0f 100644 --- a/packages/core/client/src/schema-settings/VariableInput/hooks/useIterationVariable.ts +++ b/packages/core/client/src/schema-settings/VariableInput/hooks/useIterationVariable.ts @@ -1,11 +1,13 @@ import { Schema } from '@tachybase/schema'; + import { useTranslation } from 'react-i18next'; + import { CollectionFieldOptions_deprecated } from '../../../collection-manager'; +import { useCollection } from '../../../data-source'; import { CollectionFieldOptions } from '../../../data-source/collection/Collection'; import { useFlag } from '../../../flag-provider'; import { useSubFormValue } from '../../../schema-component/antd/association-field/hooks'; import { useBaseVariable } from './useBaseVariable'; -import { useCollection } from '../../../data-source'; /** * @deprecated @@ -41,7 +43,7 @@ export const useIterationVariable = ({ collectionName: currentCollection, noDisabled, returnFields: (fields, option) => { - // fix https://nocobase.height.app/T-2277 + // fix https://tachybase.height.app/T-2277 return fields; // const activeFieldsName = getActiveFieldsName?.('nester') || []; @@ -88,7 +90,7 @@ export const useCurrentObjectVariable = ({ collectionName: collectionOfCurrentObject?.name || collection?.name, noDisabled, returnFields: (fields, option) => { - // fix https://nocobase.height.app/T-2277 + // fix https://tachybase.height.app/T-2277 return fields; // const activeFieldsName = getActiveFieldsName?.('nester') || []; diff --git a/packages/core/client/src/schema-settings/index.md b/packages/core/client/src/schema-settings/index.md index 63e71a7b9..b5cd8fac0 100644 --- a/packages/core/client/src/schema-settings/index.md +++ b/packages/core/client/src/schema-settings/index.md @@ -500,7 +500,7 @@ const { name } = useSchemaSettingsItem(); ### 内置类型 -NocoBase 提供了几个内置的组件,可以直接使用。 +TachyBase 提供了几个内置的组件,可以直接使用。 diff --git a/packages/core/client/src/schema-templates/BlockTemplateDetails.tsx b/packages/core/client/src/schema-templates/BlockTemplateDetails.tsx index 54d23cc51..06257acc4 100644 --- a/packages/core/client/src/schema-templates/BlockTemplateDetails.tsx +++ b/packages/core/client/src/schema-templates/BlockTemplateDetails.tsx @@ -1,7 +1,9 @@ +import React, { useContext, useState } from 'react'; + import { PageHeader as AntdPageHeader } from '@ant-design/pro-layout'; import { Input, Spin } from 'antd'; -import React, { useContext, useState } from 'react'; import { useNavigate, useParams } from 'react-router-dom'; + import { useAPIClient, useRequest, useSchemaTemplateManager } from '..'; import { RemoteSchemaComponent, SchemaComponentContext } from '../schema-component'; @@ -85,7 +87,7 @@ export const BlockTemplateDetails = () => { ghost={false} title={} /> -
+
diff --git a/packages/core/client/src/schema-templates/BlockTemplatePage.tsx b/packages/core/client/src/schema-templates/BlockTemplatePage.tsx index b5b5bacd1..617b36eac 100644 --- a/packages/core/client/src/schema-templates/BlockTemplatePage.tsx +++ b/packages/core/client/src/schema-templates/BlockTemplatePage.tsx @@ -1,6 +1,8 @@ -import { PageHeader as AntdPageHeader } from '@ant-design/pro-layout'; import React from 'react'; + +import { PageHeader as AntdPageHeader } from '@ant-design/pro-layout'; import { useTranslation } from 'react-i18next'; + import { SchemaComponent } from '../schema-component'; import { uiSchemaTemplatesSchema } from './schemas/uiSchemaTemplates'; @@ -9,7 +11,7 @@ export const BlockTemplatePage = () => { return (
-
+
diff --git a/packages/core/client/src/variables/VariablesProvider.tsx b/packages/core/client/src/variables/VariablesProvider.tsx index 8aa80ed4a..4982dea90 100644 --- a/packages/core/client/src/variables/VariablesProvider.tsx +++ b/packages/core/client/src/variables/VariablesProvider.tsx @@ -1,10 +1,11 @@ +import React, { createContext, useCallback, useEffect, useMemo, useRef } from 'react'; import { raw, untracked } from '@tachybase/schema'; import { getValuesByPath } from '@tachybase/utils/client'; + import _ from 'lodash'; -import React, { createContext, useCallback, useEffect, useMemo, useRef } from 'react'; + import { useAPIClient } from '../api-client'; -import type { CollectionFieldOptions_deprecated } from '../collection-manager'; -import { useCollectionManager_deprecated } from '../collection-manager'; +import { useCollectionManager_deprecated, type CollectionFieldOptions_deprecated } from '../collection-manager'; import { useCompile } from '../schema-component'; import useBuiltInVariables from './hooks/useBuiltinVariables'; import { VariableOption, VariablesContextType } from './types'; @@ -135,7 +136,7 @@ const VariablesProvider = ({ children }) => { clearRequested(url); } - // fix https://nocobase.height.app/T-3144,使用 `raw` 方法是为了避免触发 autorun,以修复 T-3144 的错误 + // fix https://tachybase.height.app/T-3144,使用 `raw` 方法是为了避免触发 autorun,以修复 T-3144 的错误 if (!raw(current)[key]) { // 把接口返回的数据保存起来,避免重复请求 raw(current)[key] = data.data.data; @@ -295,7 +296,7 @@ function shouldToRequest(value) { // value 有可能是一个响应式对象,使用 untracked 可以避免意外触发 autorun untracked(() => { - // fix https://nocobase.height.app/T-2502 + // fix https://tachybase.height.app/T-2502 // 兼容 `对多` 和 `对一` 子表单子表格字段的情况 if (JSON.stringify(value) === '[{}]' || JSON.stringify(value) === '{}') { result = true; diff --git a/packages/core/create-tachybase-app/package.json b/packages/core/create-tachybase-app/package.json index 6a66d2a28..dac294707 100755 --- a/packages/core/create-tachybase-app/package.json +++ b/packages/core/create-tachybase-app/package.json @@ -12,6 +12,5 @@ "chalk": "^4.1.1", "commander": "^9.2.0", "tar": "6.1.11" - }, - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" + } } diff --git a/packages/core/create-tachybase-app/src/cli.js b/packages/core/create-tachybase-app/src/cli.js index a7656786c..32cd0ddc4 100644 --- a/packages/core/create-tachybase-app/src/cli.js +++ b/packages/core/create-tachybase-app/src/cli.js @@ -5,10 +5,10 @@ const { AppGenerator } = require('./generator'); const { concat } = require('./util'); const packageJson = require('../package.json'); -const cli = new Command('create-nocobase'); +const cli = new Command('create-tachybase'); cli - .arguments('', 'directory of new NocoBase app') + .arguments('', 'directory of new TachyBase app') .option('--quickstart', 'quickstart app creation') .option('-a, --all-db-dialect', 'install all database dialect dependencies') .option('-d, --db-dialect ', 'database dialect, current support sqlite/mysql/postgres', 'sqlite') diff --git a/packages/core/create-tachybase-app/src/generator.js b/packages/core/create-tachybase-app/src/generator.js index bc567957e..149eedce4 100644 --- a/packages/core/create-tachybase-app/src/generator.js +++ b/packages/core/create-tachybase-app/src/generator.js @@ -81,7 +81,7 @@ class AppGenerator extends Generator { if (!allDbDialect) { dependencies.push(`"sqlite3": "^5.0.8"`); } - envs.push(`DB_STORAGE=${env.DB_STORAGE || 'storage/db/nocobase.sqlite'}`); + envs.push(`DB_STORAGE=${env.DB_STORAGE || 'storage/db/tachybase.sqlite'}`); break; case 'mysql': if (!allDbDialect) { @@ -169,7 +169,7 @@ class AppGenerator extends Generator { const { name } = this.context; - console.log(`Creating a new NocoBase application at ${chalk.green(name)}`); + console.log(`Creating a new TachyBase application at ${chalk.green(name)}`); console.log('Creating files'); this.copyDirectory({ diff --git a/packages/core/create-tachybase-app/templates/app/.env.e2e.tpl b/packages/core/create-tachybase-app/templates/app/.env.e2e.tpl index c4d53a85c..fb58d51e3 100644 --- a/packages/core/create-tachybase-app/templates/app/.env.e2e.tpl +++ b/packages/core/create-tachybase-app/templates/app/.env.e2e.tpl @@ -1,7 +1,7 @@ -################# NOCOBASE APPLICATION ################# +################# TACHYBASE APPLICATION ################# # !!! When `APP_ENV=production`, opening http://localhost:13000/ will show "Not Found". -# !!! It is recommended to use nginx to proxy static files. For example https://github.com/nocobase/nocobase/blob/main/docker/nocobase/nocobase.conf +# !!! It is recommended to use nginx to proxy static files. For example https://github.com/tachybase/tachybase/blob/main/docker/tachybase/tachybase.conf APP_ENV=development APP_PORT=20000 APP_KEY=test-key-e2e @@ -22,13 +22,13 @@ LOGGER_BASE_PATH=storage/logs-e2e ################# DATABASE ################# DB_DIALECT=sqlite -DB_STORAGE=storage/db/nocobase-e2e.sqlite +DB_STORAGE=storage/db/tachybase-e2e.sqlite DB_TABLE_PREFIX= # DB_HOST=localhost # DB_PORT=5432 -# DB_DATABASE=nocobase-e2e -# DB_USER=nocobase -# DB_PASSWORD=nocobase +# DB_DATABASE=tachybase-e2e +# DB_USER=tachybase +# DB_PASSWORD=tachybase # DB_LOGGING=on # DB_UNDERSCORED=false @@ -37,4 +37,4 @@ DB_TABLE_PREFIX= INIT_ROOT_EMAIL=admin@tachybase.com INIT_ROOT_PASSWORD=admin123 INIT_ROOT_NICKNAME=Super Admin -INIT_ROOT_USERNAME=nocobase +INIT_ROOT_USERNAME=tachybase diff --git a/packages/core/create-tachybase-app/templates/app/.env.test.tpl b/packages/core/create-tachybase-app/templates/app/.env.test.tpl index 11c383a2f..7cbedd9f0 100644 --- a/packages/core/create-tachybase-app/templates/app/.env.test.tpl +++ b/packages/core/create-tachybase-app/templates/app/.env.test.tpl @@ -8,15 +8,15 @@ API_BASE_URL= ################# DATABASE ################# DB_DIALECT=sqlite -DB_STORAGE=storage/db/nocobase-test.sqlite +DB_STORAGE=storage/db/tachybase-test.sqlite # DB_HOST=localhost # DB_PORT=5432 -# DB_DATABASE=nocobase-test -# DB_USER=nocobase -# DB_PASSWORD=nocobase +# DB_DATABASE=tachybase-test +# DB_USER=tachybase +# DB_PASSWORD=tachybase # DB_LOGGING=on INIT_ROOT_EMAIL=admin@tachybase.com INIT_ROOT_PASSWORD=admin123 INIT_ROOT_NICKNAME=Super Admin -INIT_ROOT_USERNAME=nocobase +INIT_ROOT_USERNAME=tachybase diff --git a/packages/core/create-tachybase-app/templates/app/.env.tpl b/packages/core/create-tachybase-app/templates/app/.env.tpl index 52570e42c..5acc1d97b 100644 --- a/packages/core/create-tachybase-app/templates/app/.env.tpl +++ b/packages/core/create-tachybase-app/templates/app/.env.tpl @@ -14,4 +14,4 @@ DB_DIALECT={{{env.DB_DIALECT}}} INIT_ROOT_EMAIL=admin@tachybase.com INIT_ROOT_PASSWORD=admin123 INIT_ROOT_NICKNAME=Super Admin -INIT_ROOT_USERNAME=nocobase +INIT_ROOT_USERNAME=tachybase diff --git a/packages/core/data-source-manager/package.json b/packages/core/data-source-manager/package.json index 887769ddb..be3971fc8 100644 --- a/packages/core/data-source-manager/package.json +++ b/packages/core/data-source-manager/package.json @@ -2,11 +2,6 @@ "name": "@tachybase/data-source-manager", "version": "0.21.34", "description": "", - "repository": { - "type": "git", - "url": "git+https://github.com/nocobase/nocobase.git", - "directory": "packages/auth" - }, "license": "Apache-2.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -22,6 +17,5 @@ "jsonwebtoken": "^8.5.1", "koa-compose": "^4.1.0", "lodash": "4.17.21" - }, - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" + } } diff --git a/packages/core/database/package.json b/packages/core/database/package.json index 2ac67ec56..d064a5be5 100644 --- a/packages/core/database/package.json +++ b/packages/core/database/package.json @@ -30,6 +30,5 @@ "devDependencies": { "@types/glob": "^7.2.0", "@types/lodash": "4.17.0" - }, - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" + } } diff --git a/packages/core/database/src/__tests__/operator/array-operator.test.ts b/packages/core/database/src/__tests__/operator/array-operator.test.ts index c7f98bc5d..2a6703a32 100644 --- a/packages/core/database/src/__tests__/operator/array-operator.test.ts +++ b/packages/core/database/src/__tests__/operator/array-operator.test.ts @@ -195,7 +195,7 @@ describe('array field operator', function () { expect(filter3[0].get('name')).toEqual(t2.get('name')); }); - // fix https://nocobase.height.app/T-2803 + // fix https://tachybase.height.app/T-2803 test('$anyOf with string', async () => { const filter3 = await Test.repository.find({ filter: { @@ -228,7 +228,7 @@ describe('array field operator', function () { expect(filter[0].get('name')).toEqual(t1.get('name')); }); - // fix https://nocobase.height.app/T-2803 + // fix https://tachybase.height.app/T-2803 test('$noneOf with string', async () => { const filter = await Test.repository.find({ filter: { diff --git a/packages/core/database/src/__tests__/value-parsers/to-many.test.ts b/packages/core/database/src/__tests__/value-parsers/to-many.test.ts index 4e36c2ad2..6dfaa94c8 100644 --- a/packages/core/database/src/__tests__/value-parsers/to-many.test.ts +++ b/packages/core/database/src/__tests__/value-parsers/to-many.test.ts @@ -75,14 +75,14 @@ describe('number value parser', () => { }); it('should be attachment', async () => { - await setAttachment('https://www.nocobase.com/images/logo.png'); + await setAttachment('https://www.tachybase.com/images/logo.png'); expect(parser.errors.length).toBe(0); expect(parser.getValue()).toMatchObject([ { title: 'logo.png', extname: '.png', filename: 'logo.png', - url: 'https://www.nocobase.com/images/logo.png', + url: 'https://www.tachybase.com/images/logo.png', }, ]); }); diff --git a/packages/core/database/src/mock-database.ts b/packages/core/database/src/mock-database.ts index 5abf0e5b6..c9c75f9d0 100644 --- a/packages/core/database/src/mock-database.ts +++ b/packages/core/database/src/mock-database.ts @@ -1,7 +1,9 @@ +import path from 'path'; import { merge } from '@tachybase/utils'; + import { customAlphabet } from 'nanoid'; import fetch from 'node-fetch'; -import path from 'path'; + import { Database, IDatabaseOptions } from './database'; export class MockDatabase extends Database { @@ -35,7 +37,7 @@ export function getConfigByEnv() { }; if (process.env.DB_DIALECT == 'postgres') { - options.dialectOptions['application_name'] = 'nocobase.main'; + options.dialectOptions['application_name'] = 'tachybase.main'; } return options; diff --git a/packages/core/devtools/package.json b/packages/core/devtools/package.json index 511a68be8..6d569d3da 100644 --- a/packages/core/devtools/package.json +++ b/packages/core/devtools/package.json @@ -2,11 +2,6 @@ "name": "@tachybase/devtools", "version": "0.21.34", "description": "", - "repository": { - "type": "git", - "url": "git+https://github.com/nocobase/nocobase.git", - "directory": "packages/core/devtools" - }, "license": "Apache-2.0", "main": "./src/index.js", "dependencies": { @@ -48,6 +43,5 @@ "tsx": "^4.7.2", "typescript": "5.4.4", "umi": "^4.1.8" - }, - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" + } } diff --git a/packages/core/devtools/umiConfig.d.ts b/packages/core/devtools/umiConfig.d.ts index c26d8f726..af30e5c4e 100644 --- a/packages/core/devtools/umiConfig.d.ts +++ b/packages/core/devtools/umiConfig.d.ts @@ -19,7 +19,7 @@ export declare function getUmiConfig(): { }; }; -export declare function resolveNocobasePackagesAlias(config: any): {}; +export declare function resolveTachybasePackagesAlias(config: any): {}; export declare class IndexGenerator { constructor(outputPath: string, pluginsPath: string[]): void; generate(): void; diff --git a/packages/core/devtools/umiConfig.js b/packages/core/devtools/umiConfig.js index 94c504351..977b6a77f 100644 --- a/packages/core/devtools/umiConfig.js +++ b/packages/core/devtools/umiConfig.js @@ -101,7 +101,7 @@ function getPackagePaths() { return pkgs; } -function resolveNocobasePackagesAlias(config) { +function resolveTachybasePackagesAlias(config) { const pkgs = getPackagePaths(); for (const [pkg, dir] of pkgs) { config.module.rules.get('ts-in-node_modules').include.add(dir); @@ -114,7 +114,7 @@ function getNodeModulesPath(packageDir) { return path.join(node_modules_dir, packageDir); } class IndexGenerator { - nocobaseDir = getNodeModulesPath('@tachybase'); + tachybaseDir = getNodeModulesPath('@tachybase'); constructor(outputPath, pluginsPath) { this.outputPath = outputPath; @@ -209,10 +209,10 @@ export default function devDynamicImport(packageName: string): Promise { absolute: true, }); - const nocobasePluginFolders = glob - .sync(['plugin-*/package.json'], { cwd: this.nocobaseDir, onlyFiles: true, absolute: true }) + const tachybasePluginFolders = glob + .sync(['plugin-*/package.json'], { cwd: this.tachybaseDir, onlyFiles: true, absolute: true }) .map((item) => fs.realpathSync(item)); - const pluginInfos = Array.from(new Set([...pluginFolders, ...storagePluginFolders, ...nocobasePluginFolders])) + const pluginInfos = Array.from(new Set([...pluginFolders, ...storagePluginFolders, ...tachybasePluginFolders])) .filter((item) => { const dirname = path.dirname(item); const clientJs = path.join(dirname, 'client.js'); @@ -245,5 +245,5 @@ export default function devDynamicImport(packageName: string): Promise { } exports.getUmiConfig = getUmiConfig; -exports.resolveNocobasePackagesAlias = resolveNocobasePackagesAlias; +exports.resolveTachybasePackagesAlias = resolveTachybasePackagesAlias; exports.IndexGenerator = IndexGenerator; diff --git a/packages/core/evaluators/package.json b/packages/core/evaluators/package.json index fa5829ec4..e5448759c 100644 --- a/packages/core/evaluators/package.json +++ b/packages/core/evaluators/package.json @@ -2,11 +2,6 @@ "name": "@tachybase/evaluators", "version": "0.21.34", "description": "", - "repository": { - "type": "git", - "url": "git+https://github.com/nocobase/nocobase.git", - "directory": "packages/evaluators" - }, "license": "Apache-2.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -15,6 +10,5 @@ "@tachybase/utils": "workspace:*", "lodash": "4.17.21", "mathjs": "^10.6.0" - }, - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" + } } diff --git a/packages/core/logger/package.json b/packages/core/logger/package.json index 8b7d05424..63114c8b6 100644 --- a/packages/core/logger/package.json +++ b/packages/core/logger/package.json @@ -1,12 +1,7 @@ { "name": "@tachybase/logger", "version": "0.21.34", - "description": "nocobase logging library", - "repository": { - "type": "git", - "url": "git+https://github.com/nocobase/nocobase.git", - "directory": "packages/logger" - }, + "description": "logging library", "license": "Apache-2.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -18,6 +13,5 @@ "winston": "^3.8.2", "winston-daily-rotate-file": "^4.7.1", "winston-transport": "^4.5.0" - }, - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" + } } diff --git a/packages/core/logger/src/deprecated/create-logger.ts b/packages/core/logger/src/deprecated/create-logger.ts index cfc97dabe..71db9717d 100644 --- a/packages/core/logger/src/deprecated/create-logger.ts +++ b/packages/core/logger/src/deprecated/create-logger.ts @@ -1,5 +1,7 @@ import path from 'path'; + import winston, { format, Logger } from 'winston'; + import 'winston-daily-rotate-file'; const { combine, timestamp, colorize, simple } = format; @@ -27,7 +29,7 @@ const Transports = { return new winston.transports.DailyRotateFile({ dirname, level: getLoggerLevel(), - filename: 'nocobase-%DATE%.log', + filename: 'tachybase-%DATE%.log', datePattern: 'YYYY-MM-DD-HH', maxFiles: '14d', ...options, diff --git a/packages/core/resourcer/package.json b/packages/core/resourcer/package.json index 5f6f51071..b4c657146 100644 --- a/packages/core/resourcer/package.json +++ b/packages/core/resourcer/package.json @@ -2,11 +2,6 @@ "name": "@tachybase/resourcer", "version": "0.21.34", "description": "", - "repository": { - "type": "git", - "url": "git+https://github.com/nocobase/nocobase.git", - "directory": "packages/resourcer" - }, "license": "Apache-2.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -18,6 +13,5 @@ "lodash": "^4.17.21", "path-to-regexp": "^6.1.0", "qs": "^6.9.4" - }, - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" + } } diff --git a/packages/core/schema/package.json b/packages/core/schema/package.json index 305b71c21..79e7977cc 100644 --- a/packages/core/schema/package.json +++ b/packages/core/schema/package.json @@ -14,6 +14,5 @@ "@formily/reactive-react": "2.2.27", "@formily/shared": "2.2.27", "@formily/validator": "2.2.27" - }, - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" + } } diff --git a/packages/core/sdk/package.json b/packages/core/sdk/package.json index 088f84a88..9dfd82643 100644 --- a/packages/core/sdk/package.json +++ b/packages/core/sdk/package.json @@ -11,6 +11,5 @@ "devDependencies": { "axios-mock-adapter": "^1.20.0", "vitest": "^1.4.0" - }, - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" + } } diff --git a/packages/core/sdk/src/APIClient.ts b/packages/core/sdk/src/APIClient.ts index 7d9e98ef6..afd78fd09 100644 --- a/packages/core/sdk/src/APIClient.ts +++ b/packages/core/sdk/src/APIClient.ts @@ -1,5 +1,6 @@ import axios, { AxiosInstance, AxiosRequestConfig, AxiosRequestHeaders, AxiosResponse } from 'axios'; import qs from 'qs'; + import getSubAppName from './getSubAppName'; export interface ActionParams { @@ -24,11 +25,11 @@ export class Auth { protected api: APIClient; protected KEYS = { - locale: 'NOCOBASE_LOCALE', - role: 'NOCOBASE_ROLE', - token: 'NOCOBASE_TOKEN', - authenticator: 'NOCOBASE_AUTH', - theme: 'NOCOBASE_THEME', + locale: 'TACHYBASE_LOCALE', + role: 'TACHYBASE_ROLE', + token: 'TACHYBASE_TOKEN', + authenticator: 'TACHYBASE_AUTH', + theme: 'TACHYBASE_THEME', }; protected options = { diff --git a/packages/core/sdk/src/__tests__/api-client.test.ts b/packages/core/sdk/src/__tests__/api-client.test.ts index 155349bbb..576360592 100644 --- a/packages/core/sdk/src/__tests__/api-client.test.ts +++ b/packages/core/sdk/src/__tests__/api-client.test.ts @@ -1,5 +1,6 @@ import { AxiosResponse } from 'axios'; import MockAdapter from 'axios-mock-adapter'; + import { APIClient, Storage } from '../'; import { Auth } from '../APIClient'; @@ -30,9 +31,9 @@ describe('api-client', () => { const response = await api.auth.signIn({}, 'basic'); expect(response.status).toBe(200); expect(api.auth.getToken()).toBe('123'); - const token = localStorage.getItem('NOCOBASE_TOKEN'); + const token = localStorage.getItem('TACHYBASE_TOKEN'); expect(token).toBe('123'); - const auth = localStorage.getItem('NOCOBASE_AUTH'); + const auth = localStorage.getItem('TACHYBASE_AUTH'); expect(auth).toBe('basic'); }); @@ -82,7 +83,7 @@ describe('api-client', () => { const response = await api.auth.signIn({}); expect(response.status).toBe(200); expect(api.auth.getToken()).toBe('123'); - const token = items.get('NOCOBASE_TOKEN'); + const token = items.get('TACHYBASE_TOKEN'); expect(token).toBe('123'); }); @@ -116,9 +117,9 @@ describe('api-client', () => { const response = await api.auth.signIn({}); expect(response.status).toBe(200); expect(api.auth.getToken()).toBe('123'); - const token = localStorage.getItem('NOCOBASE_TOKEN'); + const token = localStorage.getItem('TACHYBASE_TOKEN'); expect(token).toBe('123'); - const auth = localStorage.getItem('NOCOBASE_AUTH'); + const auth = localStorage.getItem('TACHYBASE_AUTH'); expect(auth).toBe('test'); }); }); diff --git a/packages/core/server/package.json b/packages/core/server/package.json index 1d8ed4bdb..845523cff 100644 --- a/packages/core/server/package.json +++ b/packages/core/server/package.json @@ -67,6 +67,5 @@ "koa-compose": "^4.1.0", "qs": "^6.11.2", "redis": "^4.6.10" - }, - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" + } } diff --git a/packages/core/server/src/__tests__/app-command.test.ts b/packages/core/server/src/__tests__/app-command.test.ts index 53577b6eb..45a7bea9d 100644 --- a/packages/core/server/src/__tests__/app-command.test.ts +++ b/packages/core/server/src/__tests__/app-command.test.ts @@ -1,5 +1,7 @@ import { mockDatabase } from '@tachybase/database'; + import { vi } from 'vitest'; + import Application, { ApplicationOptions } from '../application'; const mockServer = (options?: ApplicationOptions) => { @@ -28,8 +30,8 @@ describe('app command', () => { app.command('testaa').ipc(); app.command('testbb'); - expect(app.cli.parseHandleByIPCServer(['node', 'cli', 'nocobase', 'testaa'])).toBeTruthy(); - expect(app.cli.parseHandleByIPCServer(['node', 'cli', 'nocobase', 'testbb'])).toBeFalsy(); + expect(app.cli.parseHandleByIPCServer(['node', 'cli', 'tachybase', 'testaa'])).toBeTruthy(); + expect(app.cli.parseHandleByIPCServer(['node', 'cli', 'tachybase', 'testbb'])).toBeFalsy(); }); it('should test sub command should handle by IPC Server or not', () => { @@ -37,8 +39,8 @@ describe('app command', () => { subParent.command('testaa').ipc(); subParent.command('testbb'); - expect(app.cli.parseHandleByIPCServer(['node', 'cli', 'nocobase', 'subparent', 'testaa'])).toBeTruthy(); - expect(app.cli.parseHandleByIPCServer(['node', 'cli', 'nocobase', 'subparent', 'testbb'])).toBeFalsy(); + expect(app.cli.parseHandleByIPCServer(['node', 'cli', 'tachybase', 'subparent', 'testaa'])).toBeTruthy(); + expect(app.cli.parseHandleByIPCServer(['node', 'cli', 'tachybase', 'subparent', 'testbb'])).toBeFalsy(); }); it('should correctly parse the command multiple times with varying parameters', async () => { diff --git a/packages/core/server/src/__tests__/gateway.test.ts b/packages/core/server/src/__tests__/gateway.test.ts index 21b0d7ec3..1f8f80542 100644 --- a/packages/core/server/src/__tests__/gateway.test.ts +++ b/packages/core/server/src/__tests__/gateway.test.ts @@ -1,10 +1,13 @@ import { startServerWithRandomPort, supertest, waitSecond } from '@tachybase/test'; + import { vi } from 'vitest'; import ws from 'ws'; + import { AppSupervisor } from '../app-supervisor'; import Application from '../application'; import { Gateway } from '../gateway'; import { errors } from '../gateway/errors'; + describe('gateway', () => { let gateway: Gateway; beforeEach(() => { @@ -193,7 +196,7 @@ describe('gateway', () => { storage: ':memory:', logging: false, }, - plugins: ['nocobase'], + plugins: ['tachybase'], }); await waitSecond(); await app.runAsCLI(['install'], { diff --git a/packages/core/server/src/application.ts b/packages/core/server/src/application.ts index 317354010..dee935578 100644 --- a/packages/core/server/src/application.ts +++ b/packages/core/server/src/application.ts @@ -1,8 +1,12 @@ +import { randomUUID } from 'crypto'; +import { IncomingMessage, ServerResponse } from 'http'; +import { RecordableHistogram } from 'node:perf_hooks'; +import { basename, resolve } from 'path'; import { registerActions } from '@tachybase/actions'; import { actions as authActions, AuthManager, AuthManagerOptions } from '@tachybase/auth'; import { Cache, CacheManager, CacheManagerOptions } from '@tachybase/cache'; +import { DataSourceManager, SequelizeDataSource } from '@tachybase/data-source-manager'; import Database, { CollectionOptions, IDatabaseOptions } from '@tachybase/database'; -import winston from 'winston'; import { createLogger, createSystemLogger, @@ -15,17 +19,19 @@ import { import { ResourceOptions, Resourcer } from '@tachybase/resourcer'; import { Telemetry, TelemetryOptions } from '@tachybase/telemetry'; import { applyMixins, AsyncEmitter, importModule, Toposort, ToposortOptions } from '@tachybase/utils'; + import { Command, CommandOptions, ParseOptions } from 'commander'; -import { randomUUID } from 'crypto'; import glob from 'glob'; -import { IncomingMessage, ServerResponse } from 'http'; import { i18n, InitOptions } from 'i18next'; import Koa, { DefaultContext as KoaDefaultContext, DefaultState as KoaDefaultState } from 'koa'; import compose from 'koa-compose'; import lodash from 'lodash'; -import { RecordableHistogram } from 'node:perf_hooks'; -import { basename, resolve } from 'path'; +import _ from 'lodash'; +import { nanoid } from 'nanoid'; import semver from 'semver'; +import winston from 'winston'; + +import packageJson from '../package.json'; import { createACL } from './acl'; import { AppCommand } from './app-command'; import { AppSupervisor } from './app-supervisor'; @@ -43,14 +49,9 @@ import { } from './helper'; import { ApplicationVersion } from './helpers/application-version'; import { Locale } from './locale'; +import { MainDataSource } from './main-data-source'; import { Plugin } from './plugin'; import { InstallOptions, PluginManager } from './plugin-manager'; -import { nanoid } from 'nanoid'; -import _ from 'lodash'; - -import { DataSourceManager, SequelizeDataSource } from '@tachybase/data-source-manager'; -import packageJson from '../package.json'; -import { MainDataSource } from './main-data-source'; export type PluginType = string | typeof Plugin; export type PluginConfiguration = PluginType | [PluginType, any]; @@ -979,7 +980,7 @@ export class Application exten // }, 'Sync'); await this.emitAsync('afterUpgrade', this, options); await this.restart(); - // this.log.debug(chalk.green(`✨ NocoBase has been upgraded to v${this.getVersion()}`)); + // this.log.debug(chalk.green(`✨ TachyBase has been upgraded to v${this.getVersion()}`)); // if (this._started) { // await measureExecutionTime(async () => { // await this.restart(); @@ -1058,7 +1059,7 @@ export class Application exten }); this._telemetry = new Telemetry({ - serviceName: `nocobase-${this.name}`, + serviceName: `tachybase-${this.name}`, version: this.getVersion(), ...options.telemetry, }); diff --git a/packages/core/server/src/commands/console.ts b/packages/core/server/src/commands/console.ts index 1f2ea878d..6b8ec007f 100644 --- a/packages/core/server/src/commands/console.ts +++ b/packages/core/server/src/commands/console.ts @@ -8,7 +8,7 @@ export default (app: Application) => { .preload() .action(async () => { await app.start(); - const repl = (REPL.start('nocobase > ').context.app = app); + const repl = (REPL.start('tachybase > ').context.app = app); repl.on('exit', async function (err) { if (err) { console.log(err); diff --git a/packages/core/server/src/commands/upgrade.ts b/packages/core/server/src/commands/upgrade.ts index 7a9399f13..fd21ca82e 100644 --- a/packages/core/server/src/commands/upgrade.ts +++ b/packages/core/server/src/commands/upgrade.ts @@ -1,8 +1,5 @@ import Application from '../application'; -/** - * TODO - */ export default (app: Application) => { app .command('upgrade') @@ -10,6 +7,6 @@ export default (app: Application) => { .auth() .action(async (options) => { await app.upgrade(options); - app.log.info(`✨ NocoBase has been upgraded to v${app.getVersion()}`); + app.log.info(`✨ TachyBase has been upgraded to v${app.version.get()}`); }); }; diff --git a/packages/core/server/src/gateway/index.ts b/packages/core/server/src/gateway/index.ts index 6e2ec1958..da49d5db2 100644 --- a/packages/core/server/src/gateway/index.ts +++ b/packages/core/server/src/gateway/index.ts @@ -192,7 +192,7 @@ export class Gateway extends EventEmitter { if (pathname.startsWith(PLUGIN_STATICS_PATH) && !pathname.includes('/server/')) { await compress(req, res); const packageName = getPackageNameByExposeUrl(pathname); - // /static/plugins/@tachybase/plugins-acl/README.md => /User/projects/nocobase/plugins/acl + // /static/plugins/@tachybase/plugins-acl/README.md => /User/projects/tachybase/plugins/acl const publicDir = getPackageDirByExposeUrl(pathname); // /static/plugins/@tachybase/plugins-acl/README.md => README.md const destination = pathname.replace(PLUGIN_STATICS_PATH, '').replace(packageName, ''); diff --git a/packages/core/server/src/plugin-manager/constants.ts b/packages/core/server/src/plugin-manager/constants.ts index 80ee17a2b..80401f62e 100644 --- a/packages/core/server/src/plugin-manager/constants.ts +++ b/packages/core/server/src/plugin-manager/constants.ts @@ -7,7 +7,7 @@ export const pluginPrefix = ( export const requireRegex = /require\s*\(['"`](.*?)['"`]\)/g; export const importRegex = /^import(?:['"\s]*([\w*${}\s,]+)from\s*)?['"\s]['"\s](.*[@\w_-]+)['"\s].*/gm; export const EXTERNAL = [ - // nocobase + // tachybase '@tachybase/acl', '@tachybase/actions', '@tachybase/auth', diff --git a/packages/core/server/src/plugin-manager/utils.ts b/packages/core/server/src/plugin-manager/utils.ts index fa222d8f4..dae514373 100644 --- a/packages/core/server/src/plugin-manager/utils.ts +++ b/packages/core/server/src/plugin-manager/utils.ts @@ -28,7 +28,7 @@ import { PluginData } from './types'; * get temp dir * * @example - * getTempDir() => '/tmp/nocobase' + * getTempDir() => '/tmp/tachybase' */ export async function getTempDir() { const temporaryDirectory = await fs.realpath(os.tmpdir()); diff --git a/packages/core/server/src/swagger/index.json b/packages/core/server/src/swagger/index.json index 34b9378c9..8fc2c540e 100644 --- a/packages/core/server/src/swagger/index.json +++ b/packages/core/server/src/swagger/index.json @@ -1,7 +1,7 @@ { "openapi": "3.0.2", "info": { - "title": "NocoBase API - Core" + "title": "TachyBase API - Core" }, "tags": [ { "name": "$collection", "description": "Data table" }, diff --git a/packages/core/telemetry/package.json b/packages/core/telemetry/package.json index ad85fd28e..12c149cc5 100644 --- a/packages/core/telemetry/package.json +++ b/packages/core/telemetry/package.json @@ -1,12 +1,7 @@ { "name": "@tachybase/telemetry", "version": "0.21.34", - "description": "nocobase telemetry library", - "repository": { - "type": "git", - "url": "git+https://github.com/nocobase/nocobase.git", - "directory": "packages/telemetry" - }, + "description": "telemetry library", "license": "Apache-2.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -19,6 +14,5 @@ "@opentelemetry/sdk-trace-node": "^1.19.0", "@opentelemetry/semantic-conventions": "^1.19.0", "@tachybase/utils": "workspace:*" - }, - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" + } } diff --git a/packages/core/telemetry/src/metric.ts b/packages/core/telemetry/src/metric.ts index c951ab6c1..1e41e664f 100644 --- a/packages/core/telemetry/src/metric.ts +++ b/packages/core/telemetry/src/metric.ts @@ -1,13 +1,14 @@ import { Registry } from '@tachybase/utils'; + +import opentelemetry from '@opentelemetry/api'; +import { Resource } from '@opentelemetry/resources'; import { - MetricReader, - PeriodicExportingMetricReader, ConsoleMetricExporter, MeterProvider, + MetricReader, + PeriodicExportingMetricReader, View, } from '@opentelemetry/sdk-metrics'; -import { Resource } from '@opentelemetry/resources'; -import opentelemetry from '@opentelemetry/api'; export type MetricOptions = { meterName?: string; @@ -28,7 +29,7 @@ export class Metric { constructor(options?: MetricOptions) { const { meterName, readerName, version } = options || {}; this.readerName = readerName || 'console'; - this.meterName = meterName || 'nocobase-meter'; + this.meterName = meterName || 'tachybase-meter'; this.version = version || ''; this.registerReader( 'console', diff --git a/packages/core/telemetry/src/telemetry.ts b/packages/core/telemetry/src/telemetry.ts index fd74b93a8..7bc910b68 100644 --- a/packages/core/telemetry/src/telemetry.ts +++ b/packages/core/telemetry/src/telemetry.ts @@ -1,6 +1,7 @@ -import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; -import { Resource } from '@opentelemetry/resources'; import { InstrumentationOption, registerInstrumentations } from '@opentelemetry/instrumentation'; +import { Resource } from '@opentelemetry/resources'; +import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; + import { Metric, MetricOptions } from './metric'; import { Trace, TraceOptions } from './trace'; @@ -23,7 +24,7 @@ export class Telemetry { const { trace, metric, serviceName, version } = options || {}; this.trace = new Trace({ tracerName: `${serviceName}-trace`, version, ...trace }); this.metric = new Metric({ meterName: `${serviceName}-meter`, version, ...metric }); - this.serviceName = serviceName || 'nocobase'; + this.serviceName = serviceName || 'tachybase'; this.version = version || ''; } diff --git a/packages/core/telemetry/src/trace.ts b/packages/core/telemetry/src/trace.ts index f372594d6..9410e525d 100644 --- a/packages/core/telemetry/src/trace.ts +++ b/packages/core/telemetry/src/trace.ts @@ -1,7 +1,8 @@ import { Registry } from '@tachybase/utils'; + +import { Resource } from '@opentelemetry/resources'; import { BatchSpanProcessor, ConsoleSpanExporter, SpanProcessor } from '@opentelemetry/sdk-trace-base'; import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; -import { Resource } from '@opentelemetry/resources'; export type TraceOptions = { tracerName?: string; @@ -21,7 +22,7 @@ export class Trace { constructor(options?: TraceOptions) { const { processorName, tracerName, version } = options || {}; this.processorName = processorName || 'console'; - this.tracerName = tracerName || 'nocobase-trace'; + this.tracerName = tracerName || 'tachybase-trace'; this.version = version || ''; this.registerProcessor('console', () => new BatchSpanProcessor(new ConsoleSpanExporter())); } diff --git a/packages/core/test/package.json b/packages/core/test/package.json index 85a89bac5..cb2509e75 100644 --- a/packages/core/test/package.json +++ b/packages/core/test/package.json @@ -68,6 +68,5 @@ "vite": "^5.0.0", "vitest": "^1.4.0", "ws": "^8.13.0" - }, - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" + } } diff --git a/packages/core/test/playwright/tests/auth.setup.ts b/packages/core/test/playwright/tests/auth.setup.ts index 6d5081b7f..a2d9c7b05 100644 --- a/packages/core/test/playwright/tests/auth.setup.ts +++ b/packages/core/test/playwright/tests/auth.setup.ts @@ -13,7 +13,7 @@ setup('admin', async ({ page }) => { // 开启配置状态 await page.evaluate(() => { - localStorage.setItem('NOCOBASE_DESIGNABLE', 'true'); + localStorage.setItem('TACHYBASE_DESIGNABLE', 'true'); }); await page.context().storageState({ path: process.env.PLAYWRIGHT_AUTH_FILE, diff --git a/packages/core/test/src/e2e/e2eUtils.ts b/packages/core/test/src/e2e/e2eUtils.ts index bc7465b72..c990b92b7 100644 --- a/packages/core/test/src/e2e/e2eUtils.ts +++ b/packages/core/test/src/e2e/e2eUtils.ts @@ -1,7 +1,8 @@ import { faker } from '@faker-js/faker'; import { uid } from '@formily/shared'; -import { Page, test as base, expect, request } from '@playwright/test'; +import { test as base, expect, Page, request } from '@playwright/test'; import _ from 'lodash'; + import { defineConfig } from './defineConfig'; export * from '@playwright/test'; @@ -180,7 +181,7 @@ interface CreatePageOptions { interface ExtendUtils { /** - * 根据配置,生成一个 NocoBase 的页面 + * 根据配置,生成一个 TachyBase 的页面 * @param pageConfig 页面配置 * @returns */ @@ -543,7 +544,7 @@ const updateUidOfPageSchema = (uiSchema: any) => { }; /** - * 在 NocoBase 中创建一个页面 + * 在 TachyBase 中创建一个页面 */ const createPage = async (options?: CreatePageOptions) => { const { type = 'page', url, name, pageSchema } = options || {}; @@ -571,7 +572,7 @@ const createPage = async (options?: CreatePageOptions) => { const pageUid = uid(); const gridName = uid(); - const result = await api.post(`/api/uiSchemas:insertAdjacent/nocobase-admin-menu?position=beforeEnd`, { + const result = await api.post(`/api/uiSchemas:insertAdjacent/default-admin-menu?position=beforeEnd`, { headers, data: { schema: { @@ -622,7 +623,7 @@ const createPage = async (options?: CreatePageOptions) => { }; /** - * 根据页面 uid 删除一个 NocoBase 的页面 + * 根据页面 uid 删除一个 TachyBase 的页面 */ const deletePage = async (pageUid: string) => { const api = await request.newContext({ @@ -901,14 +902,14 @@ const createRandomData = async (collectionName: string, count = 10, data?: any) function getHeaders(storageState: any) { const headers: any = {}; - const token = getStorageItem('NOCOBASE_TOKEN', storageState); - const auth = getStorageItem('NOCOBASE_AUTH', storageState); + const token = getStorageItem('TACHYBASE_TOKEN', storageState); + const auth = getStorageItem('TACHYBASE_AUTH', storageState); const subAppName = new URL(APP_BASE_URL).pathname.match(/^\/apps\/([^/]*)\/*/)?.[1]; const hostName = new URL(APP_BASE_URL).host; - const locale = getStorageItem('NOCOBASE_LOCALE', storageState); + const locale = getStorageItem('TACHYBASE_LOCALE', storageState); const timezone = '+08:00'; const withAclMeta = 'true'; - const role = getStorageItem('NOCOBASE_ROLE', storageState); + const role = getStorageItem('TACHYBASE_ROLE', storageState); if (token) { headers.Authorization = `Bearer ${token}`; diff --git a/packages/core/test/src/e2e/templatesOfPage.ts b/packages/core/test/src/e2e/templatesOfPage.ts index 1273488fd..918da263f 100644 --- a/packages/core/test/src/e2e/templatesOfPage.ts +++ b/packages/core/test/src/e2e/templatesOfPage.ts @@ -197,7 +197,7 @@ export const oneEmptyTable: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-uid': 'yua2ss66y9j', @@ -742,7 +742,7 @@ export const oneEmptyListBlock: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-uid': 'aqn0xjnaxfk', @@ -894,7 +894,7 @@ export const oneEmptyGridCardBlock: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-uid': 'anvxx86mh91', @@ -1241,7 +1241,7 @@ export const oneEmptyTableBlockWithActions: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, properties: { @@ -1848,7 +1848,7 @@ export const oneTableBlockWithActionsAndFormBlocks: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, properties: { @@ -2705,7 +2705,7 @@ export const oneEmptyTableBlockWithCustomizeActions: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, properties: { @@ -3944,7 +3944,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndBasicFields: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, properties: { @@ -5911,7 +5911,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndBasicFieldsAndSubTable: Pag 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-uid': '0bvmtmgkrx0', @@ -6320,7 +6320,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndChoicesFields: PageConfig = 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, properties: { @@ -7755,7 +7755,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndMediaFields: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, properties: { @@ -8845,7 +8845,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndDatetimeFields: PageConfig 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, properties: { @@ -9822,7 +9822,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndAssociationFields: PageConf 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, properties: { @@ -11445,7 +11445,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndAdvancedFields: PageConfig 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, properties: { @@ -12657,7 +12657,7 @@ export const oneTableBlockWithAddNewAndViewAndEditAndSystemInfoFields: PageConfi 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, properties: { @@ -14440,7 +14440,7 @@ export const oneEmptyTableWithTreeCollection: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-uid': '51cyu58oper', @@ -14723,7 +14723,7 @@ export const oneCollapseAndOneTableWithSameCollection: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-uid': 'nq51lizkoo4', @@ -15443,7 +15443,7 @@ export const oneTableSubformWithMultiLevelAssociationFields: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, properties: { @@ -17157,7 +17157,7 @@ export const oneTableSubtableWithMultiLevelAssociationFields: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, properties: { @@ -18169,7 +18169,7 @@ export const formBlockDefaultValueTemplate: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, properties: { @@ -18970,7 +18970,7 @@ export const oneFormAndOneTableWithSameCollection: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-uid': 'jd5cfyt9rvc', @@ -19161,7 +19161,7 @@ export const twoTableWithSameCollection: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-uid': 'xbzkjfayl3y', @@ -19269,7 +19269,7 @@ export const twoTableWithSameCollection: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-uid': '5g15rd6dqli', @@ -19426,7 +19426,7 @@ export const twoTableWithAssociationFields: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-uid': 'u8xfso0a35t', @@ -19533,7 +19533,7 @@ export const twoTableWithAssociationFields: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-uid': 'oqdv3tu3laz', @@ -19691,7 +19691,7 @@ export const oneEmptyTableBlockBasedOnUsers = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-uid': 'gzu2uanef12', @@ -19844,7 +19844,7 @@ export const checkboxForTableRow = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, properties: { diff --git a/packages/core/utils/package.json b/packages/core/utils/package.json index 52eb0af89..d99dae898 100644 --- a/packages/core/utils/package.json +++ b/packages/core/utils/package.json @@ -20,6 +20,5 @@ "devDependencies": { "@types/lodash": "4.17.0", "@types/node": "^20.12.2" - }, - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" + } } diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/VC.ApproverInterface.tsx b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/VC.ApproverInterface.tsx index 3d7c41120..00be41807 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/VC.ApproverInterface.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/instruction/approver-interface/VC.ApproverInterface.tsx @@ -17,7 +17,7 @@ const useStyles = createStyles(({ css }) => { return { container: css` .ant-drawer-body { - background: var(--nb-box-bg); + background: var(--tb-box-bg); } `, }; diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/LauncherInterface.schema.tsx b/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/LauncherInterface.schema.tsx index eb4052f9c..d41f7dc7d 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/LauncherInterface.schema.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/launcher-interface/LauncherInterface.schema.tsx @@ -17,7 +17,7 @@ const getSchemaLauncherInterface = ({ values, dataSource, name }) => ({ 'x-component-props': { className: css` .ant-drawer-body { - background: const(--nb-box-bg); + background: const(--tb-box-bg); } `, }, diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/apply-button/VC.ApplyButton.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/apply-button/VC.ApplyButton.tsx index 56a7a7587..4e21b576c 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/apply-button/VC.ApplyButton.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/apply-button/VC.ApplyButton.tsx @@ -1,22 +1,24 @@ -import { DownOutlined, PlusOutlined } from '@ant-design/icons'; +import React, { useCallback, useContext, useEffect, useState } from 'react'; import { ActionContextProvider, CollectionProvider_deprecated, + css, + parseCollectionName, RemoteSchemaComponent, SchemaComponent, SchemaComponentContext, - css, - parseCollectionName, useAPIClient, } from '@tachybase/client'; + +import { DownOutlined, PlusOutlined } from '@ant-design/icons'; import { Button, Dropdown } from 'antd'; -import React, { useCallback, useContext, useEffect, useState } from 'react'; + import { useTranslation } from '../../../../locale'; +import { FlowContextProvider } from '../../common/FlowContext.provider'; import { useSubmit } from './hooks/useSubmit'; import { useWithdrawAction } from './hooks/useWithdrawAction'; import { ActionBarProvider } from './Pd.ActionBar'; import { ApplyActionStatusProvider } from './Pd.ActionStatus'; -import { FlowContextProvider } from '../../common/FlowContext.provider'; import { WithdrawActionProvider } from './Pd.ActionWithdraw'; // 审批-发起: 发起按钮 @@ -58,7 +60,7 @@ export const ApplyButton = () => { 'x-component-props': { className: css` .ant-drawer-body { - background: var(--nb-box-bg); + background: var(--tb-box-bg); } `, }, diff --git a/packages/plugins/@hera/plugin-approval/src/server/ApprovalInstruction.ts b/packages/plugins/@hera/plugin-approval/src/server/ApprovalInstruction.ts index 4043382ac..5577e12f4 100644 --- a/packages/plugins/@hera/plugin-approval/src/server/ApprovalInstruction.ts +++ b/packages/plugins/@hera/plugin-approval/src/server/ApprovalInstruction.ts @@ -98,7 +98,7 @@ async function parseAssignees(node, processor) { .getParsedValue(node.config.assignees ?? [], node.id) .flat() .filter(Boolean); - const assignees = /* @__PURE__ */ new Set(); + const assignees = new Set(); const UserRepo = processor.options.plugin.app.db.getRepository('users'); for (const item of configAssignees) { if (typeof item === 'object') { diff --git a/packages/plugins/@hera/plugin-core/src/client/components/filter-form/VariableInput.tsx b/packages/plugins/@hera/plugin-core/src/client/components/filter-form/VariableInput.tsx index e4e81bede..05663d234 100644 --- a/packages/plugins/@hera/plugin-core/src/client/components/filter-form/VariableInput.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/components/filter-form/VariableInput.tsx @@ -1,26 +1,26 @@ -import { Form } from '@tachybase/schema'; -// @ts-ignore -import { Schema } from '@tachybase/schema'; -import { SchemaOptionsContext, useField, useFieldSchema } from '@tachybase/schema'; +import React, { useCallback, useContext, useMemo } from 'react'; import { - CollectionFieldOptions, - useVariableScope, - __UNSAFE__VariablesContextType, - __UNSAFE__VariableOption, - Variable, - isVariable, - useUserVariable, - __UNSAFE__VariableInputOption, __UNSAFE__, - useDateVariable, + __UNSAFE__VariableInputOption, + __UNSAFE__VariableOption, + __UNSAFE__VariablesContextType, + CollectionFieldOptions, + isVariable, useCollectionManager_deprecated, useCompile, + useDateVariable, + useUserVariable, + useVariableScope, + Variable, } from '@tachybase/client'; +// @ts-ignore +import { Form, Schema, SchemaOptionsContext, useField, useFieldSchema } from '@tachybase/schema'; import _ from 'lodash'; -import React, { useCallback, useContext, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; + import { FilterContext } from './context'; + const { useBlockCollection, useValues, useVariableOptions, useContextAssociationFields, useRecordVariable } = __UNSAFE__; @@ -173,7 +173,7 @@ export const getShouldChange = ({ return true; } - // `json` 可以选择任意类型的变量,详见:https://nocobase.feishu.cn/docx/EmNEdEBOnoQohUx2UmBcqIQ5nyh#FPLfdSRDEoXR65xW0mBcdfL5n0c + // `json` 可以选择任意类型的变量,详见:https://tachybase.feishu.cn/docx/EmNEdEBOnoQohUx2UmBcqIQ5nyh#FPLfdSRDEoXR65xW0mBcdfL5n0c if (collectionField.interface === 'json') { return true; } diff --git a/packages/plugins/@hera/plugin-core/src/client/components/system/Notifications.tsx b/packages/plugins/@hera/plugin-core/src/client/components/system/Notifications.tsx index 5259a2381..2e8e1e2ff 100644 --- a/packages/plugins/@hera/plugin-core/src/client/components/system/Notifications.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/components/system/Notifications.tsx @@ -1,13 +1,15 @@ import React from 'react'; import { css, useRequest } from '@tachybase/client'; -import { Badge, Button, Popover, List, message } from 'antd'; -import { BellOutlined } from '@ant-design/icons'; -import { useLinkKey, useInitializationLinkKey } from '../../hooks/useNotifications'; -import { useNavigate } from 'react-router-dom'; import { dayjs } from '@tachybase/utils/client'; +import { BellOutlined } from '@ant-design/icons'; +import { Badge, Button, List, message, Popover } from 'antd'; +import { useNavigate } from 'react-router-dom'; + +import { useInitializationLinkKey, useLinkKey } from '../../hooks/useNotifications'; + export const Notifications = () => { - // 注册链接关联,链接管理使用nocobase代码方式注册数据表 + // 注册链接关联,链接管理使用tachybase代码方式注册数据表 useInitializationLinkKey(); const linkDetail = useLinkKey(); diff --git a/packages/plugins/@hera/plugin-core/src/client/hooks/useTokenConfiguration.ts b/packages/plugins/@hera/plugin-core/src/client/hooks/useTokenConfiguration.ts index 62b740d93..30b77faff 100644 --- a/packages/plugins/@hera/plugin-core/src/client/hooks/useTokenConfiguration.ts +++ b/packages/plugins/@hera/plugin-core/src/client/hooks/useTokenConfiguration.ts @@ -1,9 +1,9 @@ -import { useRequest } from '@tachybase/client'; import { useMemo } from 'react'; +import { useRequest } from '@tachybase/client'; export const TokenConfigurationResourceKey = 'token-configuration'; export const getSSKey = (type) => { - return `NOCOBASE_PLUGIN_TOKEN_CONFIGURATION_${type}`; + return `TACHYBASE_PLUGIN_TOKEN_CONFIGURATION_${type}`; }; export const useMapConfiguration = (type: string) => { diff --git a/packages/plugins/@hera/plugin-core/src/client/pages/AdminLayout.tsx b/packages/plugins/@hera/plugin-core/src/client/pages/AdminLayout.tsx index 5a2206fb4..dd0b2ee90 100644 --- a/packages/plugins/@hera/plugin-core/src/client/pages/AdminLayout.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/pages/AdminLayout.tsx @@ -1,27 +1,29 @@ -import { css } from '@tachybase/client'; -import { useSessionStorageState } from 'ahooks'; -import { App, Layout, Alert } from 'antd'; import React, { createContext, useContext, useEffect, useMemo, useRef, useState } from 'react'; -import { Link, Outlet, useMatch, useNavigate, useParams } from 'react-router-dom'; import { + AdminProvider, + css, CurrentUser, - PinnedPluginList, - SchemaComponent, findByUid, findMenuItem, + PinnedPluginList, + SchemaComponent, useACLRoleContext, useAdminSchemaUid, useDocumentTitle, useRequest, useSystemSettings, useToken, - AdminProvider, } from '@tachybase/client'; -import { OnlineUserDropdown } from '../components/system/OnlineUserProvider'; + +import { useSessionStorageState } from 'ahooks'; +import { Alert, App, Layout } from 'antd'; +import { Link, Outlet, useMatch, useNavigate, useParams } from 'react-router-dom'; + import { MobileLink } from '../components/system/MobileLink'; import { Notifications } from '../components/system/Notifications'; -import { usePageStyle } from '../features/page-style/usePageStyle'; +import { OnlineUserDropdown } from '../components/system/OnlineUserProvider'; import { PageTab } from '../features/page-style/PageTab'; +import { usePageStyle } from '../features/page-style/usePageStyle'; const filterByACL = (schema, options) => { const { allowAll, allowMenuItemIds = [] } = options; @@ -213,8 +215,8 @@ export const InternalAdminLayout = () => { position: fixed; left: 0; right: 0; - height: var(--nb-header-height); - line-height: var(--nb-header-height); + height: var(--tb-header-height); + line-height: var(--tb-header-height); padding: 0; z-index: 100; background-color: ${token.colorBgHeader}; @@ -305,8 +307,8 @@ export const InternalAdminLayout = () => {
{
{ 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, properties: { diff --git a/packages/plugins/@tachybase/plugin-acl/package.json b/packages/plugins/@tachybase/plugin-acl/package.json index 70943a5a4..d99bc1e59 100644 --- a/packages/plugins/@tachybase/plugin-acl/package.json +++ b/packages/plugins/@tachybase/plugin-acl/package.json @@ -6,12 +6,6 @@ "keywords": [ "Users & permissions" ], - "homepage": "https://docs.nocobase.com/handbook/acl", - "repository": { - "type": "git", - "url": "git+https://github.com/nocobase/nocobase.git", - "directory": "packages/plugins/acl" - }, "license": "Apache-2.0", "main": "./dist/server/index.js", "devDependencies": { @@ -39,7 +33,5 @@ "@tachybase/utils": "workspace:*" }, "description.zh-CN": "基于角色、资源和操作的权限控制,可以精确控制界面配置权限、数据操作权限、菜单访问权限、插件权限。", - "displayName.zh-CN": "权限控制", - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", - "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/acl" + "displayName.zh-CN": "权限控制" } diff --git a/packages/plugins/@tachybase/plugin-acl/src/client/__e2e__/association.test.ts b/packages/plugins/@tachybase/plugin-acl/src/client/__e2e__/association.test.ts index 040935f80..9f1161846 100644 --- a/packages/plugins/@tachybase/plugin-acl/src/client/__e2e__/association.test.ts +++ b/packages/plugins/@tachybase/plugin-acl/src/client/__e2e__/association.test.ts @@ -24,7 +24,7 @@ test.describe('view', () => { }); await mockPage(oneTableBlock).goto(); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await expect(page.getByLabel('block-item-CardItem-general-table')).toBeVisible(); @@ -62,7 +62,7 @@ test.describe('view', () => { }); await mockPage(oneTableBlock).goto(); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await expect(page.getByLabel('block-item-CardItem-general-table')).toBeVisible(); @@ -102,7 +102,7 @@ test.describe('update', () => { }); await mockPage(oneTableBlock).goto(); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await expect(page.getByLabel('block-item-CardItem-general-table')).toBeVisible(); @@ -141,7 +141,7 @@ test.describe('update', () => { }); await mockPage(oneTableBlock).goto(); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await expect(page.getByLabel('block-item-CardItem-general-table')).toBeVisible(); @@ -179,7 +179,7 @@ test.describe('create', () => { }); await mockPage(oneTableBlock).goto(); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await expect(page.getByLabel('block-item-CardItem-general-table')).toBeVisible(); @@ -221,7 +221,7 @@ test.describe('create', () => { }); await mockPage(oneTableBlock).goto(); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await expect(page.getByLabel('block-item-CardItem-general-table')).toBeVisible(); diff --git a/packages/plugins/@tachybase/plugin-acl/src/client/__e2e__/collection.test.ts b/packages/plugins/@tachybase/plugin-acl/src/client/__e2e__/collection.test.ts index b1a549863..451baadf4 100644 --- a/packages/plugins/@tachybase/plugin-acl/src/client/__e2e__/collection.test.ts +++ b/packages/plugins/@tachybase/plugin-acl/src/client/__e2e__/collection.test.ts @@ -11,7 +11,7 @@ test.describe('view', () => { }); await mockPage(oneTableBlock).goto(); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await expect(page.getByLabel('block-item-CardItem-general-table')).not.toBeVisible(); @@ -42,7 +42,7 @@ test.describe('view', () => { }); await mockPage(oneTableBlock).goto(); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await expect(page.getByLabel('block-item-CardItem-general-table')).not.toBeVisible(); @@ -77,7 +77,7 @@ test.describe('view', () => { }); await mockPage(oneTableBlock).goto(); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); //特定字段有权限 @@ -99,7 +99,7 @@ test.describe('create', () => { }); await mockPage(oneTableBlock).goto(); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await expect(page.getByLabel('block-item-CardItem-general-table')).toBeVisible(); @@ -134,7 +134,7 @@ test.describe('create', () => { ], }); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await mockPage(oneTableBlock).goto(); @@ -183,7 +183,7 @@ test.describe('create', () => { ], }); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await mockPage(oneTableBlock).goto(); @@ -206,7 +206,7 @@ test.describe('update', () => { }); await mockPage(oneTableBlock).goto(); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await expect(page.getByLabel('action-Action.Link-Edit')).not.toBeVisible(); @@ -237,7 +237,7 @@ test.describe('update', () => { ], }); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await mockPage(oneTableBlock).goto(); @@ -285,7 +285,7 @@ test.describe('update', () => { ], }); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await mockPage(newTableBlock).goto(); @@ -324,7 +324,7 @@ test.describe('update', () => { ], }); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await mockPage(oneTableBlock).goto(); @@ -349,7 +349,7 @@ test.describe('destroy', () => { }); await mockPage(oneTableBlock).goto(); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await expect(page.getByLabel('action-Action-Delete-destroy-general-table')).not.toBeVisible(); @@ -379,7 +379,7 @@ test.describe('destroy', () => { ], }); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await mockPage(oneTableBlock).goto(); @@ -430,7 +430,7 @@ test.describe('destroy', () => { ], }); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await mockPage(newTableBlock).goto(); @@ -471,7 +471,7 @@ test.describe('export', () => { }); await mockPage(oneTableBlock).goto(); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await expect(page.getByLabel('action-Action-Export')).not.toBeVisible(); @@ -504,7 +504,7 @@ test.describe('export', () => { ], }); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await mockPage(oneTableBlock).goto(); @@ -524,7 +524,7 @@ test.describe('import', () => { }); await mockPage(oneTableBlock).goto(); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await expect(page.getByLabel('action-Action-Import')).not.toBeVisible(); @@ -557,7 +557,7 @@ test.describe('import', () => { ], }); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await mockPage(oneTableBlock).goto(); diff --git a/packages/plugins/@tachybase/plugin-acl/src/client/__e2e__/configure.test.ts b/packages/plugins/@tachybase/plugin-acl/src/client/__e2e__/configure.test.ts index fbfd750da..57b2d88d3 100644 --- a/packages/plugins/@tachybase/plugin-acl/src/client/__e2e__/configure.test.ts +++ b/packages/plugins/@tachybase/plugin-acl/src/client/__e2e__/configure.test.ts @@ -9,7 +9,7 @@ test('allows to configure interface', async ({ page, mockPage, mockRole, updateR snippets: ['ui.*'], }); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await expect(page.getByTestId('ui-editor-button')).toBeVisible(); @@ -31,7 +31,7 @@ test('allows to install ,install,disabled plugins ', async ({ page, mockPage, mo snippets: ['pm'], }); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await expect(page.getByTestId('plugin-manager-button')).toBeVisible(); @@ -60,7 +60,7 @@ test('allows to confgiure plugins ', async ({ page, mockPage, mockRole, updateRo }, }); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await page.getByTestId('plugin-settings-button').click(); @@ -87,7 +87,7 @@ test('allows to clear cache,reboot application ', async ({ page, mockPage, mockR snippets: ['app'], }); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await page.getByTestId('user-center-button').hover(); @@ -110,7 +110,7 @@ test('new menu items allow to be asscessed by default ', async ({ page, mockPage snippets: ['ui.*'], }); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await mockPage({ ...oneTableBlock, name: 'new page' }).goto(); @@ -130,7 +130,7 @@ test('plugin settings permissions', async ({ page, mockPage, mockRole, updateRol snippets: ['pm', 'pm.*', '!pm.auth.authenticators', '!pm.collection-manager', '!pm.collection-manager.collections'], }); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await page.getByTestId('plugin-settings-button').hover(); diff --git a/packages/plugins/@tachybase/plugin-acl/src/client/__e2e__/menu.test.ts b/packages/plugins/@tachybase/plugin-acl/src/client/__e2e__/menu.test.ts index 08f16c651..81eb5d36c 100644 --- a/packages/plugins/@tachybase/plugin-acl/src/client/__e2e__/menu.test.ts +++ b/packages/plugins/@tachybase/plugin-acl/src/client/__e2e__/menu.test.ts @@ -15,7 +15,7 @@ test('menu permission ', async ({ page, mockPage, mockRole, updateRole }) => { menuUiSchemas: [uid1], }); await page.evaluate((roleData) => { - window.localStorage.setItem('NOCOBASE_ROLE', roleData.name); + window.localStorage.setItem('TACHYBASE_ROLE', roleData.name); }, roleData); await page.reload(); await expect(page.getByLabel('page1')).toBeVisible(); diff --git a/packages/plugins/@tachybase/plugin-acl/src/client/__e2e__/utils.ts b/packages/plugins/@tachybase/plugin-acl/src/client/__e2e__/utils.ts index 7ca7a4c2b..dc0f584ab 100644 --- a/packages/plugins/@tachybase/plugin-acl/src/client/__e2e__/utils.ts +++ b/packages/plugins/@tachybase/plugin-acl/src/client/__e2e__/utils.ts @@ -60,7 +60,7 @@ export const oneTableBlock: PageConfig = { 'x-initializer': 'table:configureActions', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, _isJSONSchemaObject: true, @@ -2636,7 +2636,7 @@ export const newTableBlock: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, properties: { diff --git a/packages/plugins/@tachybase/plugin-acl/src/swagger/index.ts b/packages/plugins/@tachybase/plugin-acl/src/swagger/index.ts index 38874e155..3721f3a12 100644 --- a/packages/plugins/@tachybase/plugin-acl/src/swagger/index.ts +++ b/packages/plugins/@tachybase/plugin-acl/src/swagger/index.ts @@ -1,7 +1,7 @@ export default { openapi: '3.0.2', info: { - title: 'NocoBase API - ACL plugin', + title: 'TachyBase API - ACL plugin', }, paths: { '/roles:list': { diff --git a/packages/plugins/@tachybase/plugin-action-bulk-edit/src/client/__e2e__/utils.ts b/packages/plugins/@tachybase/plugin-action-bulk-edit/src/client/__e2e__/utils.ts index 93b117a08..ef6178a70 100644 --- a/packages/plugins/@tachybase/plugin-action-bulk-edit/src/client/__e2e__/utils.ts +++ b/packages/plugins/@tachybase/plugin-action-bulk-edit/src/client/__e2e__/utils.ts @@ -372,7 +372,7 @@ export const oneEmptyTableBlockWithCustomizeActions: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, properties: { diff --git a/packages/plugins/@tachybase/plugin-action-bulk-update/package.json b/packages/plugins/@tachybase/plugin-action-bulk-update/package.json index 8a60c35f4..ff5f34131 100644 --- a/packages/plugins/@tachybase/plugin-action-bulk-update/package.json +++ b/packages/plugins/@tachybase/plugin-action-bulk-update/package.json @@ -6,7 +6,6 @@ "keywords": [ "Actions" ], - "homepage": "https://docs.nocobase.com/handbook/action-bulk-update", "license": "Apache-2.0", "main": "dist/server/index.js", "devDependencies": { @@ -22,7 +21,5 @@ "@tachybase/utils": "workspace:*" }, "description.zh-CN": "对全部数据或选中的数据进行批量更新。", - "displayName.zh-CN": "操作:批量更新", - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", - "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-bulk-update" + "displayName.zh-CN": "操作:批量更新" } diff --git a/packages/plugins/@tachybase/plugin-action-bulk-update/src/client/__e2e__/utils.ts b/packages/plugins/@tachybase/plugin-action-bulk-update/src/client/__e2e__/utils.ts index de5d9ddd0..b1322d164 100644 --- a/packages/plugins/@tachybase/plugin-action-bulk-update/src/client/__e2e__/utils.ts +++ b/packages/plugins/@tachybase/plugin-action-bulk-update/src/client/__e2e__/utils.ts @@ -411,7 +411,7 @@ export const oneEmptyTableBlockWithCustomizeUpdate: PageConfig = { 'x-initializer': 'table:configureActions', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, _isJSONSchemaObject: true, diff --git a/packages/plugins/@tachybase/plugin-action-duplicate/src/client/__e2e__/utils.ts b/packages/plugins/@tachybase/plugin-action-duplicate/src/client/__e2e__/utils.ts index e3bf3d460..1314db906 100644 --- a/packages/plugins/@tachybase/plugin-action-duplicate/src/client/__e2e__/utils.ts +++ b/packages/plugins/@tachybase/plugin-action-duplicate/src/client/__e2e__/utils.ts @@ -372,7 +372,7 @@ export const oneEmptyTableBlockWithDuplicateActions: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, properties: {}, diff --git a/packages/plugins/@tachybase/plugin-action-print/package.json b/packages/plugins/@tachybase/plugin-action-print/package.json index 4e9d759b5..d194e20c0 100644 --- a/packages/plugins/@tachybase/plugin-action-print/package.json +++ b/packages/plugins/@tachybase/plugin-action-print/package.json @@ -6,7 +6,6 @@ "keywords": [ "Actions" ], - "homepage": "https://docs.nocobase.com/handbook/action-print", "license": "Apache-2.0", "main": "dist/server/index.js", "devDependencies": { @@ -18,7 +17,5 @@ "@tachybase/test": "workspace:*" }, "description.zh-CN": "调用浏览器的打印功能实现单条数据的打印。", - "displayName.zh-CN": "操作:打印", - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", - "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-print" + "displayName.zh-CN": "操作:打印" } diff --git a/packages/plugins/@tachybase/plugin-action-print/src/client/__e2e__/utils.ts b/packages/plugins/@tachybase/plugin-action-print/src/client/__e2e__/utils.ts index 126bc38ac..5aba2553e 100644 --- a/packages/plugins/@tachybase/plugin-action-print/src/client/__e2e__/utils.ts +++ b/packages/plugins/@tachybase/plugin-action-print/src/client/__e2e__/utils.ts @@ -140,7 +140,7 @@ export const oneTableWithViewAction: PageConfig = { 'x-initializer': 'table:configureActions', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, _isJSONSchemaObject: true, diff --git a/packages/plugins/@tachybase/plugin-api-doc/package.json b/packages/plugins/@tachybase/plugin-api-doc/package.json index d254f4b40..d3f55548e 100644 --- a/packages/plugins/@tachybase/plugin-api-doc/package.json +++ b/packages/plugins/@tachybase/plugin-api-doc/package.json @@ -2,13 +2,7 @@ "name": "@tachybase/plugin-api-doc", "displayName": "API documentation", "version": "0.21.34", - "description": "An OpenAPI documentation generator for NocoBase HTTP API.", - "homepage": "https://docs.nocobase.com/handbook/api-doc", - "repository": { - "type": "git", - "url": "git+https://github.com/nocobase/nocobase.git", - "directory": "packages/plugins/api-doc" - }, + "description": "An OpenAPI documentation generator for TachyBase HTTP API.", "license": "Apache-2.0", "main": "./dist/server/index.js", "types": "./dist/server/index.d.ts", @@ -26,8 +20,6 @@ "@tachybase/server": "workspace:*", "@tachybase/utils": "workspace:*" }, - "description.zh-CN": "NocoBase HTTP API 的 OpenAPI 文档生成器。", - "displayName.zh-CN": "API 文档", - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", - "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/api-doc" + "description.zh-CN": "TachyBase HTTP API 的 OpenAPI 文档生成器。", + "displayName.zh-CN": "API 文档" } diff --git a/packages/plugins/@tachybase/plugin-api-doc/src/server/swagger/index.ts b/packages/plugins/@tachybase/plugin-api-doc/src/server/swagger/index.ts index e4186735c..894414e47 100644 --- a/packages/plugins/@tachybase/plugin-api-doc/src/server/swagger/index.ts +++ b/packages/plugins/@tachybase/plugin-api-doc/src/server/swagger/index.ts @@ -105,19 +105,19 @@ export class SwaggerManager { }); return [ { - name: 'NocoBase API', + name: 'TachyBase API', url: this.getURL('swagger:get'), }, { - name: 'NocoBase API - Core', + name: 'TachyBase API - Core', url: this.getURL('swagger:get?ns=core'), }, { - name: 'NocoBase API - All plugins', + name: 'TachyBase API - All plugins', url: this.getURL('swagger:get?ns=plugins'), }, { - name: 'NocoBase API - Custom collections', + name: 'TachyBase API - Custom collections', url: this.getURL('swagger:get?ns=collections'), }, ...plugins, diff --git a/packages/plugins/@tachybase/plugin-api-doc/src/swagger.ts b/packages/plugins/@tachybase/plugin-api-doc/src/swagger.ts index cc60d8036..578e44871 100644 --- a/packages/plugins/@tachybase/plugin-api-doc/src/swagger.ts +++ b/packages/plugins/@tachybase/plugin-api-doc/src/swagger.ts @@ -1,6 +1,6 @@ export default { info: { - title: 'NocoBase API - API doc plugin', + title: 'TachyBase API - API doc plugin', }, paths: { '/swagger:getUrls': { diff --git a/packages/plugins/@tachybase/plugin-api-keys/docs/en-US/index.md b/packages/plugins/@tachybase/plugin-api-keys/docs/en-US/index.md index cfdea1e40..fd9303548 100644 --- a/packages/plugins/@tachybase/plugin-api-keys/docs/en-US/index.md +++ b/packages/plugins/@tachybase/plugin-api-keys/docs/en-US/index.md @@ -2,7 +2,7 @@ ## Introduction -This plugin allows you to create and manage API keys. The generated API key can be used to access all `NocoBase` APIs. +This plugin allows you to create and manage API keys. The generated API key can be used to access all `TachyBase` APIs. ## Access control diff --git a/packages/plugins/@tachybase/plugin-api-keys/docs/en-US/usage.md b/packages/plugins/@tachybase/plugin-api-keys/docs/en-US/usage.md index 946013210..f7b7dc044 100644 --- a/packages/plugins/@tachybase/plugin-api-keys/docs/en-US/usage.md +++ b/packages/plugins/@tachybase/plugin-api-keys/docs/en-US/usage.md @@ -6,7 +6,7 @@ After enabling the plugin, go to the API keys plugin management page, click `Add ## Using an API key -Add the `Authorization` field to the request header, with the value of `Bearer ${API_KEY}`, to access all `NocoBase` APIs using the API key. +Add the `Authorization` field to the request header, with the value of `Bearer ${API_KEY}`, to access all `TachyBase` APIs using the API key. Here's an example using cURL: @@ -14,7 +14,7 @@ Here's an example using cURL: curl '{domain}/api/roles:check' -H 'Authorization: Bearer {API key}' ``` -> Warning: When using the `Docker` image to use `NocoBase`, make sure you have configured the [APP_KEY](https://docs.nocobase.com/api/env#app_key) environment variable, otherwise the API key will be invalid after each restart. +> Warning: When using the `Docker` image to use `TachyBase`, make sure you have configured the [APP_KEY](https://docs.tachybase.com/api/env#app_key) environment variable, otherwise the API key will be invalid after each restart. ## Deleting an API key diff --git a/packages/plugins/@tachybase/plugin-api-keys/docs/zh-CN/index.md b/packages/plugins/@tachybase/plugin-api-keys/docs/zh-CN/index.md index 9e2fd6a52..cfc0cc342 100644 --- a/packages/plugins/@tachybase/plugin-api-keys/docs/zh-CN/index.md +++ b/packages/plugins/@tachybase/plugin-api-keys/docs/zh-CN/index.md @@ -2,7 +2,7 @@ ## 简介 -该插件允许你创建和管理 API keys,生成的 API key 可以用于访问 `NocoBase` 所有 API。 +该插件允许你创建和管理 API keys,生成的 API key 可以用于访问 `TachyBase` 所有 API。 ## 权限控制 diff --git a/packages/plugins/@tachybase/plugin-api-keys/docs/zh-CN/usage.md b/packages/plugins/@tachybase/plugin-api-keys/docs/zh-CN/usage.md index 8a4c540bb..a499ea2fb 100644 --- a/packages/plugins/@tachybase/plugin-api-keys/docs/zh-CN/usage.md +++ b/packages/plugins/@tachybase/plugin-api-keys/docs/zh-CN/usage.md @@ -6,7 +6,7 @@ ## 使用 API key -在请求头中添加 `Authorization` 字段,值为 `Bearer ${API_KEY}`,即可使用 API key 访问 `NocoBase` 所有 API。 +在请求头中添加 `Authorization` 字段,值为 `Bearer ${API_KEY}`,即可使用 API key 访问 `TachyBase` 所有 API。 cURL 的例子如下 @@ -14,7 +14,7 @@ cURL 的例子如下 curl '{domain}/api/roles:check' -H 'Authorization: Bearer {API key}' ``` -> Warning: 当你使用 `Docker` 镜像来使用 `NocoBase` 时,请确保你配置了 [APP_KEY](https://docs-cn.nocobase.com/api/env#app_key) 环境变量,否则 API key 将在每次重启后失效。 +> Warning: 当你使用 `Docker` 镜像来使用 `TachyBase` 时,请确保你配置了 [APP_KEY](https://docs-cn.tachybase.com/api/env#app_key) 环境变量,否则 API key 将在每次重启后失效。 ## 删除 API key diff --git a/packages/plugins/@tachybase/plugin-api-keys/package.json b/packages/plugins/@tachybase/plugin-api-keys/package.json index d52dd2fe4..e34444616 100644 --- a/packages/plugins/@tachybase/plugin-api-keys/package.json +++ b/packages/plugins/@tachybase/plugin-api-keys/package.json @@ -6,7 +6,6 @@ "keywords": [ "Authentication" ], - "homepage": "https://docs.nocobase.com/handbook/api-keys", "license": "Apache-2.0", "main": "./dist/server/index.js", "devDependencies": { @@ -29,7 +28,5 @@ "@tachybase/utils": "workspace:*" }, "description.zh-CN": "允许用户使用 API 密钥访问应用的 HTTP API", - "displayName.zh-CN": "认证:API 密钥", - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", - "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/api-keys" + "displayName.zh-CN": "认证:API 密钥" } diff --git a/packages/plugins/@tachybase/plugin-api-keys/src/client/Configuration/schema.tsx b/packages/plugins/@tachybase/plugin-api-keys/src/client/Configuration/schema.tsx index dca3b93ce..f0ce28c3b 100644 --- a/packages/plugins/@tachybase/plugin-api-keys/src/client/Configuration/schema.tsx +++ b/packages/plugins/@tachybase/plugin-api-keys/src/client/Configuration/schema.tsx @@ -83,7 +83,7 @@ export const configurationSchema: ISchema = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, properties: { diff --git a/packages/plugins/@tachybase/plugin-api-keys/src/swagger/index.ts b/packages/plugins/@tachybase/plugin-api-keys/src/swagger/index.ts index 18262229a..40c717994 100644 --- a/packages/plugins/@tachybase/plugin-api-keys/src/swagger/index.ts +++ b/packages/plugins/@tachybase/plugin-api-keys/src/swagger/index.ts @@ -1,6 +1,6 @@ export default { info: { - title: 'NocoBase API - API keys plugin', + title: 'TachyBase API - API keys plugin', }, tags: [], paths: { diff --git a/packages/plugins/@tachybase/plugin-auth/README.md b/packages/plugins/@tachybase/plugin-auth/README.md index afc416bde..a36fd8090 100644 --- a/packages/plugins/@tachybase/plugin-auth/README.md +++ b/packages/plugins/@tachybase/plugin-auth/README.md @@ -33,7 +33,7 @@ Actions - Edit ## 开发一个登录插件 ### 接口 -Nocobase内核提供了扩展登录方式的接入和管理。扩展登录插件的核心逻辑处理,需要继承内核的`Auth`类,并对相应的标准接口进行实现。 +Tachybase内核提供了扩展登录方式的接入和管理。扩展登录插件的核心逻辑处理,需要继承内核的`Auth`类,并对相应的标准接口进行实现。 参考`core/auth/auth.ts` ```TypeScript diff --git a/packages/plugins/@tachybase/plugin-auth/src/swagger/index.ts b/packages/plugins/@tachybase/plugin-auth/src/swagger/index.ts index 27ab5cd84..5e81547c0 100644 --- a/packages/plugins/@tachybase/plugin-auth/src/swagger/index.ts +++ b/packages/plugins/@tachybase/plugin-auth/src/swagger/index.ts @@ -1,6 +1,6 @@ export default { info: { - title: 'NocoBase API - Auth plugin', + title: 'TachyBase API - Auth plugin', }, paths: { '/auth:check': { diff --git a/packages/plugins/@tachybase/plugin-backup-restore/README.md b/packages/plugins/@tachybase/plugin-backup-restore/README.md index 3ebd07f18..7ab62aa26 100644 --- a/packages/plugins/@tachybase/plugin-backup-restore/README.md +++ b/packages/plugins/@tachybase/plugin-backup-restore/README.md @@ -2,7 +2,7 @@ English | [中文](./README.zh-CN.md) -NocoBase 应用的备份与还原插件,可用于应用的复制、迁移、升级等场景。 +TachyBase 应用的备份与还原插件,可用于应用的复制、迁移、升级等场景。 ## 安装激活 @@ -10,14 +10,14 @@ NocoBase 应用的备份与还原插件,可用于应用的复制、迁移、 ## 使用方法 -Duplicator 插件提供了 `dump` 和 `restore` 命令,分别用于备份和还原应用数据,可用于单应用的备份和还原,也可以跨应用。如果跨应用还原数据,请保证目标应用 NocoBase 版本与源应用一致,相对应插件也已下载本地。 +Duplicator 插件提供了 `dump` 和 `restore` 命令,分别用于备份和还原应用数据,可用于单应用的备份和还原,也可以跨应用。如果跨应用还原数据,请保证目标应用 TachyBase 版本与源应用一致,相对应插件也已下载本地。 **⚠️ 如果使用了继承(PostgreSQL)、视图、触发器等不兼容的特性,跨数据库还原备份数据可能失败。** ### 备份数据 ```bash -yarn nocobase dump +yarn tachybase dump ``` 选择需要备份的插件表结构及其数据 @@ -66,7 +66,7 @@ dumped file size: 20.8 kB ### 还原数据 ```bash -yarn nocobase restore /your/apps/a/storage/duplicator/dump-20230210T223910.nbdump +yarn tachybase restore /your/apps/a/storage/duplicator/dump-20230210T223910.nbdump ``` 导入前请先备份数据 diff --git a/packages/plugins/@tachybase/plugin-backup-restore/README.zh-CN.md b/packages/plugins/@tachybase/plugin-backup-restore/README.zh-CN.md index 2deed9c0f..edff99e37 100644 --- a/packages/plugins/@tachybase/plugin-backup-restore/README.zh-CN.md +++ b/packages/plugins/@tachybase/plugin-backup-restore/README.zh-CN.md @@ -2,7 +2,7 @@ [English](./README.md) | 中文 -NocoBase 应用的备份与还原插件,可用于应用的复制、迁移、升级等场景。 +TachyBase 应用的备份与还原插件,可用于应用的复制、迁移、升级等场景。 ## 安装激活 @@ -10,14 +10,14 @@ NocoBase 应用的备份与还原插件,可用于应用的复制、迁移、 ## 使用方法 -Duplicator 插件提供了 `dump` 和 `restore` 命令,分别用于备份和还原应用数据,可用于单应用的备份和还原,也可以跨应用。如果跨应用还原数据,请保证目标应用 NocoBase 版本与源应用一致,相对应插件也已下载本地。 +Duplicator 插件提供了 `dump` 和 `restore` 命令,分别用于备份和还原应用数据,可用于单应用的备份和还原,也可以跨应用。如果跨应用还原数据,请保证目标应用 TachyBase 版本与源应用一致,相对应插件也已下载本地。 **⚠️ 如果使用了继承(PostgreSQL)、视图、触发器等不兼容的特性,跨数据库还原备份数据可能失败。** ### 备份数据 ```bash -yarn nocobase dump +yarn tachybase dump ``` 选择需要备份的插件表结构及其数据 @@ -66,7 +66,7 @@ dumped file size: 20.8 kB ### 还原数据 ```bash -yarn nocobase restore /your/apps/a/storage/duplicator/dump-20230210T223910.nbdump +yarn tachybase restore /your/apps/a/storage/duplicator/dump-20230210T223910.nbdump ``` 导入前请先备份数据 diff --git a/packages/plugins/@tachybase/plugin-backup-restore/package.json b/packages/plugins/@tachybase/plugin-backup-restore/package.json index 4cba3c497..95702f585 100644 --- a/packages/plugins/@tachybase/plugin-backup-restore/package.json +++ b/packages/plugins/@tachybase/plugin-backup-restore/package.json @@ -6,12 +6,6 @@ "keywords": [ "System management" ], - "homepage": "https://docs.nocobase.com/handbook/backup-restore", - "repository": { - "type": "git", - "url": "git+https://github.com/nocobase/nocobase.git", - "directory": "packages/plugins/plugin-backup-restore" - }, "license": "Apache-2.0", "main": "./dist/server/index.js", "devDependencies": { @@ -46,7 +40,5 @@ "@tachybase/utils": "workspace:*" }, "description.zh-CN": "备份和还原应用,可用于应用的复制、迁移、升级等场景。", - "displayName.zh-CN": "应用的备份与还原", - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", - "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/backup-restore" + "displayName.zh-CN": "应用的备份与还原" } diff --git a/packages/plugins/@tachybase/plugin-backup-restore/src/server/__tests__/dump-action.test.ts b/packages/plugins/@tachybase/plugin-backup-restore/src/server/__tests__/dump-action.test.ts index 0df76dcb7..92836e0cf 100644 --- a/packages/plugins/@tachybase/plugin-backup-restore/src/server/__tests__/dump-action.test.ts +++ b/packages/plugins/@tachybase/plugin-backup-restore/src/server/__tests__/dump-action.test.ts @@ -14,7 +14,7 @@ describe('dump', () => { let testDir: string; beforeEach(async () => { - testDir = path.resolve(os.tmpdir(), `nocobase-dump-${Date.now()}`); + testDir = path.resolve(os.tmpdir(), `tachybase-dump-${Date.now()}`); await fsPromises.mkdir(testDir, { recursive: true }); app = await createMockServer(); diff --git a/packages/plugins/@tachybase/plugin-backup-restore/src/server/__tests__/index.ts b/packages/plugins/@tachybase/plugin-backup-restore/src/server/__tests__/index.ts index fc4247279..c9d5229f4 100644 --- a/packages/plugins/@tachybase/plugin-backup-restore/src/server/__tests__/index.ts +++ b/packages/plugins/@tachybase/plugin-backup-restore/src/server/__tests__/index.ts @@ -2,7 +2,7 @@ import { createMockServer } from '@tachybase/test'; export default async function createApp() { const app = await createMockServer({ - plugins: ['nocobase'], + plugins: ['tachybase'], }); return app; } diff --git a/packages/plugins/@tachybase/plugin-backup-restore/src/server/app-migrator.ts b/packages/plugins/@tachybase/plugin-backup-restore/src/server/app-migrator.ts index 980846fcf..d16be634e 100644 --- a/packages/plugins/@tachybase/plugin-backup-restore/src/server/app-migrator.ts +++ b/packages/plugins/@tachybase/plugin-backup-restore/src/server/app-migrator.ts @@ -25,7 +25,7 @@ abstract class AppMigrator extends EventEmitter { } tmpDir() { - return path.resolve(os.tmpdir(), `nocobase-${crypto.randomUUID()}`); + return path.resolve(os.tmpdir(), `tachybase-${crypto.randomUUID()}`); } async rmDir(dir: string) { diff --git a/packages/plugins/@tachybase/plugin-backup-restore/src/server/restorer.ts b/packages/plugins/@tachybase/plugin-backup-restore/src/server/restorer.ts index 4f832549e..39ddd0e38 100644 --- a/packages/plugins/@tachybase/plugin-backup-restore/src/server/restorer.ts +++ b/packages/plugins/@tachybase/plugin-backup-restore/src/server/restorer.ts @@ -111,7 +111,7 @@ export class Restorer extends AppMigrator { const version = meta['version']; if (semver.lt(version, '0.18.0-alpha.2')) { - throw new RestoreCheckError(`this backup file can only be imported in nocobase ${version}`); + throw new RestoreCheckError(`this backup file can only be imported in tachybase ${version}`); } } diff --git a/packages/plugins/@tachybase/plugin-backup-restore/src/swagger/index.ts b/packages/plugins/@tachybase/plugin-backup-restore/src/swagger/index.ts index 0f082b075..8e09e536b 100644 --- a/packages/plugins/@tachybase/plugin-backup-restore/src/swagger/index.ts +++ b/packages/plugins/@tachybase/plugin-backup-restore/src/swagger/index.ts @@ -1,6 +1,6 @@ export default { info: { - title: 'NocoBase API - Backup & Restore plugin', + title: 'TachyBase API - Backup & Restore plugin', }, tags: [], paths: { diff --git a/packages/plugins/@tachybase/plugin-calendar/package.json b/packages/plugins/@tachybase/plugin-calendar/package.json index 7c8e29ebc..f327f2746 100644 --- a/packages/plugins/@tachybase/plugin-calendar/package.json +++ b/packages/plugins/@tachybase/plugin-calendar/package.json @@ -7,12 +7,6 @@ "Collections", "Blocks" ], - "homepage": "https://docs.nocobase.com/handbook/calendar", - "repository": { - "type": "git", - "url": "git+https://github.com/nocobase/nocobase.git", - "directory": "packages/plugins/calendar" - }, "license": "Apache-2.0", "main": "./dist/server/index.js", "types": "./dist/server/index.d.ts", @@ -37,7 +31,5 @@ "@tachybase/test": "workspace:*" }, "description.zh-CN": "提供日历数据表模板和区块,用于管理日期数据,通常用于事件、约会、任务等与日期/时间相关的信息。", - "displayName.zh-CN": "日历", - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", - "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/calendar" + "displayName.zh-CN": "日历" } diff --git a/packages/plugins/@tachybase/plugin-calendar/src/client/__e2e__/templates.ts b/packages/plugins/@tachybase/plugin-calendar/src/client/__e2e__/templates.ts index 6f38d19fd..51f6163f2 100644 --- a/packages/plugins/@tachybase/plugin-calendar/src/client/__e2e__/templates.ts +++ b/packages/plugins/@tachybase/plugin-calendar/src/client/__e2e__/templates.ts @@ -79,7 +79,7 @@ export const oneTableWithCalendarCollection: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-uid': 'xi12fv3arso', diff --git a/packages/plugins/@tachybase/plugin-cas/README.md b/packages/plugins/@tachybase/plugin-cas/README.md index 14a603aab..3496501d3 100644 --- a/packages/plugins/@tachybase/plugin-cas/README.md +++ b/packages/plugins/@tachybase/plugin-cas/README.md @@ -7,6 +7,6 @@ > 首先你要开启此插件 1. 在 Authentication 中添加一个 Auth Type 为 CAS 类型的登录方式 - + 2. 然后你将在登录页看到一个名为 CAS Login 的按钮 3. 完成 diff --git a/packages/plugins/@tachybase/plugin-cas/README.zh-CN.md b/packages/plugins/@tachybase/plugin-cas/README.zh-CN.md index 14a603aab..3496501d3 100644 --- a/packages/plugins/@tachybase/plugin-cas/README.zh-CN.md +++ b/packages/plugins/@tachybase/plugin-cas/README.zh-CN.md @@ -7,6 +7,6 @@ > 首先你要开启此插件 1. 在 Authentication 中添加一个 Auth Type 为 CAS 类型的登录方式 - + 2. 然后你将在登录页看到一个名为 CAS Login 的按钮 3. 完成 diff --git a/packages/plugins/@tachybase/plugin-cas/package.json b/packages/plugins/@tachybase/plugin-cas/package.json index 8e1eaea3c..cbf895b10 100644 --- a/packages/plugins/@tachybase/plugin-cas/package.json +++ b/packages/plugins/@tachybase/plugin-cas/package.json @@ -6,7 +6,6 @@ "keywords": [ "Authentication" ], - "homepage": "https://docs.nocobase.com/handbook/auth-cas", "license": "Apache-2.0", "main": "./dist/server/index.js", "devDependencies": { @@ -26,7 +25,5 @@ "@tachybase/test": "workspace:*" }, "description.zh-CN": "通过 CAS 协议认证身份。", - "displayName.zh-CN": "认证:CAS", - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", - "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/auth-cas" + "displayName.zh-CN": "认证:CAS" } diff --git a/packages/plugins/@tachybase/plugin-china-region/package.json b/packages/plugins/@tachybase/plugin-china-region/package.json index 32ab048bc..d68343535 100644 --- a/packages/plugins/@tachybase/plugin-china-region/package.json +++ b/packages/plugins/@tachybase/plugin-china-region/package.json @@ -6,7 +6,6 @@ "keywords": [ "Fields" ], - "homepage": "https://docs.nocobase.com/handbook/china-region", "license": "Apache-2.0", "main": "./dist/server/index.js", "devDependencies": { @@ -22,7 +21,5 @@ "@tachybase/test": "workspace:*" }, "description.zh-CN": "提供中国行政区划数据和字段类型。", - "displayName.zh-CN": "中国行政区划", - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", - "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/china-region" + "displayName.zh-CN": "中国行政区划" } diff --git a/packages/plugins/@tachybase/plugin-china-region/src/swagger/index.json b/packages/plugins/@tachybase/plugin-china-region/src/swagger/index.json index 76f7dc864..93c5f4f79 100644 --- a/packages/plugins/@tachybase/plugin-china-region/src/swagger/index.json +++ b/packages/plugins/@tachybase/plugin-china-region/src/swagger/index.json @@ -1,7 +1,7 @@ { "openapi": "3.0.2", "info": { - "title": "NocoBase API - China region plugin" + "title": "TachyBase API - China region plugin" }, "paths": { "/chinaRegions:list": { diff --git a/packages/plugins/@tachybase/plugin-client/package.json b/packages/plugins/@tachybase/plugin-client/package.json index b3ba691bc..142680c02 100644 --- a/packages/plugins/@tachybase/plugin-client/package.json +++ b/packages/plugins/@tachybase/plugin-client/package.json @@ -2,7 +2,7 @@ "name": "@tachybase/plugin-client", "displayName": "WEB client", "version": "0.21.34", - "description": "Provides a client interface for the NocoBase server", + "description": "Provides a client interface for the TachyBase server", "license": "Apache-2.0", "main": "./dist/server/index.js", "devDependencies": { @@ -18,7 +18,6 @@ "@tachybase/test": "workspace:*", "@tachybase/utils": "workspace:*" }, - "description.zh-CN": "为 NocoBase 服务端提供客户端界面", - "displayName.zh-CN": "WEB 客户端", - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" + "description.zh-CN": "为 TachyBase 服务端提供客户端界面", + "displayName.zh-CN": "WEB 客户端" } diff --git a/packages/plugins/@tachybase/plugin-client/src/server/__tests__/20231215215245-admin-menu-uid.test.ts b/packages/plugins/@tachybase/plugin-client/src/server/__tests__/20231215215245-admin-menu-uid.test.ts index e512435c7..1b4e384ab 100644 --- a/packages/plugins/@tachybase/plugin-client/src/server/__tests__/20231215215245-admin-menu-uid.test.ts +++ b/packages/plugins/@tachybase/plugin-client/src/server/__tests__/20231215215245-admin-menu-uid.test.ts @@ -2,7 +2,7 @@ import { createMockServer, MockServer } from '@tachybase/test'; import Migration from '../migrations/20231215215247-admin-menu-uid'; -describe('nocobase-admin-menu', () => { +describe('default-admin-menu', () => { let app: MockServer; beforeEach(async () => { @@ -37,6 +37,6 @@ describe('nocobase-admin-menu', () => { }); await migration.up(); const schema = await uiSchemas.findOne(); - expect(schema.toJSON()).toMatchObject({ 'x-uid': 'nocobase-admin-menu', name: 'abc' }); + expect(schema.toJSON()).toMatchObject({ 'x-uid': 'default-admin-menu', name: 'abc' }); }); }); diff --git a/packages/plugins/@tachybase/plugin-client/src/server/migrations/20231215215247-admin-menu-uid.ts b/packages/plugins/@tachybase/plugin-client/src/server/migrations/20231215215247-admin-menu-uid.ts index da08ad80a..70ba97b03 100644 --- a/packages/plugins/@tachybase/plugin-client/src/server/migrations/20231215215247-admin-menu-uid.ts +++ b/packages/plugins/@tachybase/plugin-client/src/server/migrations/20231215215247-admin-menu-uid.ts @@ -17,7 +17,7 @@ export default class extends Migration { await this.db.sequelize.transaction(async (transaction) => { await UiSchemas.update( { - 'x-uid': 'nocobase-admin-menu', + 'x-uid': 'default-admin-menu', }, { transaction, @@ -28,7 +28,7 @@ export default class extends Migration { ); await this.db.getModel('uiSchemaTreePath').update( { - descendant: 'nocobase-admin-menu', + descendant: 'default-admin-menu', }, { transaction, @@ -39,7 +39,7 @@ export default class extends Migration { ); await this.db.getModel('uiSchemaTreePath').update( { - ancestor: 'nocobase-admin-menu', + ancestor: 'default-admin-menu', }, { transaction, diff --git a/packages/plugins/@tachybase/plugin-client/src/server/server.ts b/packages/plugins/@tachybase/plugin-client/src/server/server.ts index 0a8b11053..3df345341 100644 --- a/packages/plugins/@tachybase/plugin-client/src/server/server.ts +++ b/packages/plugins/@tachybase/plugin-client/src/server/server.ts @@ -27,7 +27,7 @@ export class ClientPlugin extends Plugin { const uiSchemas = this.db.getRepository('uiSchemas'); await uiSchemas.insert({ type: 'void', - 'x-uid': 'nocobase-admin-menu', + 'x-uid': 'default-admin-menu', 'x-component': 'Menu', 'x-designer': 'Menu.Designer', 'x-initializer': 'MenuItemInitializers', diff --git a/packages/plugins/@tachybase/plugin-client/src/swagger/index.json b/packages/plugins/@tachybase/plugin-client/src/swagger/index.json index bdec656b4..0ff317bc7 100644 --- a/packages/plugins/@tachybase/plugin-client/src/swagger/index.json +++ b/packages/plugins/@tachybase/plugin-client/src/swagger/index.json @@ -1,7 +1,7 @@ { "openapi": "3.0.2", "info": { - "title": "NocoBase API - Client plugin" + "title": "TachyBase API - Client plugin" }, "paths": {} } diff --git a/packages/plugins/@tachybase/plugin-collection-manager/package.json b/packages/plugins/@tachybase/plugin-collection-manager/package.json index 17bc46ad4..517bb0db3 100644 --- a/packages/plugins/@tachybase/plugin-collection-manager/package.json +++ b/packages/plugins/@tachybase/plugin-collection-manager/package.json @@ -2,11 +2,10 @@ "name": "@tachybase/plugin-collection-manager", "displayName": "Data source: Main", "version": "0.21.34", - "description": "NocoBase main database, supports relational databases such as MySQL, PostgreSQL, SQLite and so on.", + "description": "TachyBase main database, supports relational databases such as MySQL, PostgreSQL, SQLite and so on.", "keywords": [ "Data sources" ], - "homepage": "https://docs.nocobase.com/handbook/data-source-main", "license": "Apache-2.0", "main": "./dist/server/index.js", "devDependencies": { @@ -26,8 +25,6 @@ "@tachybase/test": "workspace:*", "@tachybase/utils": "workspace:*" }, - "description.zh-CN": "NocoBase 主数据库,支持 MySQL、PostgreSQL、SQLite 等关系型数据库。", - "displayName.zh-CN": "数据源:主数据库", - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", - "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/data-source-main" + "description.zh-CN": "TachyBase 主数据库,支持 MySQL、PostgreSQL、SQLite 等关系型数据库。", + "displayName.zh-CN": "数据源:主数据库" } diff --git a/packages/plugins/@tachybase/plugin-collection-manager/src/client/__e2e__/collection-template/general.test.ts b/packages/plugins/@tachybase/plugin-collection-manager/src/client/__e2e__/collection-template/general.test.ts index d2c2b22d1..3dfa79e16 100644 --- a/packages/plugins/@tachybase/plugin-collection-manager/src/client/__e2e__/collection-template/general.test.ts +++ b/packages/plugins/@tachybase/plugin-collection-manager/src/client/__e2e__/collection-template/general.test.ts @@ -477,7 +477,7 @@ test.describe('configure fields', () => { } }); - // https://nocobase.height.app/T-2868 + // https://tachybase.height.app/T-2868 test('sequence rules: z-index of configure drawer', async ({ page, mockCollections }) => { const collectionManagerPage = new CollectionManagerPage(page); await collectionManagerPage.goto(); diff --git a/packages/plugins/@tachybase/plugin-collection-manager/src/client/__e2e__/fields/manyToOne/schemaSettings.test.ts b/packages/plugins/@tachybase/plugin-collection-manager/src/client/__e2e__/fields/manyToOne/schemaSettings.test.ts index adabc72a1..37bd312d8 100644 --- a/packages/plugins/@tachybase/plugin-collection-manager/src/client/__e2e__/fields/manyToOne/schemaSettings.test.ts +++ b/packages/plugins/@tachybase/plugin-collection-manager/src/client/__e2e__/fields/manyToOne/schemaSettings.test.ts @@ -665,7 +665,7 @@ test.describe('table column & table', () => { }); test.describe('table column & sub-table', () => { - // https://nocobase.height.app/T-3377 + // https://tachybase.height.app/T-3377 test('title field', async ({ page, mockPage }) => { await mockPage(T3377).goto(); diff --git a/packages/plugins/@tachybase/plugin-collection-manager/src/client/__e2e__/fields/url/schemaSettings.test.ts b/packages/plugins/@tachybase/plugin-collection-manager/src/client/__e2e__/fields/url/schemaSettings.test.ts index 773491950..e383f9108 100644 --- a/packages/plugins/@tachybase/plugin-collection-manager/src/client/__e2e__/fields/url/schemaSettings.test.ts +++ b/packages/plugins/@tachybase/plugin-collection-manager/src/client/__e2e__/fields/url/schemaSettings.test.ts @@ -55,12 +55,12 @@ test.describe('form item & create form', () => { .hover(); })(page, 'url'), supportVariables: ['Constant', 'Current user', 'Date variables', 'Current form'], - constantValue: 'https://nocobase.com', + constantValue: 'https://tachybase.com', variableValue: ['Current user', 'Email'], // 值为 admin@tachybase.com expectConstantValue: async () => { await expect( page.getByLabel('block-item-CollectionField-general-form-general.url-url').getByRole('textbox'), - ).toHaveValue('https://nocobase.com'); + ).toHaveValue('https://tachybase.com'); }, expectVariableValue: async () => { await expect( @@ -95,7 +95,7 @@ test.describe('form item & create form', () => { await page .getByLabel('block-item-CollectionField-general-form-general.url-url') .getByRole('textbox') - .fill('https://nocobase.com'); + .fill('https://tachybase.com'); }, expectReadonly: async () => { // 只读模式下,输入框会被禁用 @@ -109,7 +109,7 @@ test.describe('form item & create form', () => { page.getByLabel('block-item-CollectionField-general-form-general.url-url').getByRole('textbox'), ).not.toBeVisible(); await expect(page.getByLabel('block-item-CollectionField-general-form-general.url-url')).toHaveText( - 'url:https://nocobase.com', + 'url:https://tachybase.com', ); }, }); @@ -155,7 +155,7 @@ test.describe('form item & edit form', () => { await page .getByLabel('block-item-CollectionField-general-form-general.url-url') .getByRole('textbox') - .fill('https://nocobase.com'); + .fill('https://tachybase.com'); }, expectReadonly: async () => { // 只读模式下,输入框会被禁用 @@ -169,7 +169,7 @@ test.describe('form item & edit form', () => { page.getByLabel('block-item-CollectionField-general-form-general.url-url').getByRole('textbox'), ).not.toBeVisible(); await expect(page.getByLabel('block-item-CollectionField-general-form-general.url-url')).toHaveText( - 'url:https://nocobase.com', + 'url:https://tachybase.com', ); }, }); diff --git a/packages/plugins/@tachybase/plugin-collection-manager/src/swagger/index.ts b/packages/plugins/@tachybase/plugin-collection-manager/src/swagger/index.ts index 7a3bf1b9c..6ea71a3bd 100644 --- a/packages/plugins/@tachybase/plugin-collection-manager/src/swagger/index.ts +++ b/packages/plugins/@tachybase/plugin-collection-manager/src/swagger/index.ts @@ -1,7 +1,7 @@ export default { openapi: '3.0.2', info: { - title: 'NocoBase API - Collection manager plugin', + title: 'TachyBase API - Collection manager plugin', }, tags: [ { diff --git a/packages/plugins/@tachybase/plugin-custom-request/package.json b/packages/plugins/@tachybase/plugin-custom-request/package.json index f11d3e51e..a6aef648c 100644 --- a/packages/plugins/@tachybase/plugin-custom-request/package.json +++ b/packages/plugins/@tachybase/plugin-custom-request/package.json @@ -6,7 +6,6 @@ "keywords": [ "Actions" ], - "homepage": "https://docs.nocobase.com/handbook/action-custom-request", "license": "Apache-2.0", "main": "dist/server/index.js", "devDependencies": { @@ -29,7 +28,5 @@ "@tachybase/utils": "workspace:*" }, "description.zh-CN": "向任意 HTTP 服务发送请求,支持将上下文数据发送给目标服务。", - "displayName.zh-CN": "操作:自定义请求", - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", - "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-custom-request" + "displayName.zh-CN": "操作:自定义请求" } diff --git a/packages/plugins/@tachybase/plugin-custom-request/src/client/schemas/CustomRequestConfigurationFields.ts b/packages/plugins/@tachybase/plugin-custom-request/src/client/schemas/CustomRequestConfigurationFields.ts index 14937fa14..ecb3664ba 100644 --- a/packages/plugins/@tachybase/plugin-custom-request/src/client/schemas/CustomRequestConfigurationFields.ts +++ b/packages/plugins/@tachybase/plugin-custom-request/src/client/schemas/CustomRequestConfigurationFields.ts @@ -41,7 +41,7 @@ export const CustomRequestConfigurationFieldsSchema = { value: 'name', label: 'title', }, - placeholder: 'https://www.nocobase.com', + placeholder: 'https://www.tachybase.com', }, }, headers: { diff --git a/packages/plugins/@tachybase/plugin-data-source-manager/src/client/component/CreateDatabaseConnectAction.tsx b/packages/plugins/@tachybase/plugin-data-source-manager/src/client/component/CreateDatabaseConnectAction.tsx index 211d6b0f7..351f10a3d 100644 --- a/packages/plugins/@tachybase/plugin-data-source-manager/src/client/component/CreateDatabaseConnectAction.tsx +++ b/packages/plugins/@tachybase/plugin-data-source-manager/src/client/component/CreateDatabaseConnectAction.tsx @@ -108,8 +108,8 @@ export const CreateDatabaseConnectAction = () => { target="_blank" href={ api.auth.locale === 'zh-CN' - ? 'https://docs-cn.nocobase.com/handbook/data-source-manager' - : 'https://docs.nocobase.com/handbook/data-source-manager' + ? 'https://docs-cn.tachybase.com/handbook/data-source-manager' + : 'https://docs.tachybase.com/handbook/data-source-manager' } rel="noreferrer" > diff --git a/packages/plugins/@tachybase/plugin-data-source-manager/src/server/__tests__/data-source-with-acl.test.ts b/packages/plugins/@tachybase/plugin-data-source-manager/src/server/__tests__/data-source-with-acl.test.ts index 79df68238..f40ba6592 100644 --- a/packages/plugins/@tachybase/plugin-data-source-manager/src/server/__tests__/data-source-with-acl.test.ts +++ b/packages/plugins/@tachybase/plugin-data-source-manager/src/server/__tests__/data-source-with-acl.test.ts @@ -13,7 +13,7 @@ describe('data source with acl', () => { beforeEach(async () => { app = await createMockServer({ - plugins: ['nocobase'], + plugins: ['tachybase'], acl: true, }); diff --git a/packages/plugins/@tachybase/plugin-data-source-manager/src/server/__tests__/data-sources.test.ts b/packages/plugins/@tachybase/plugin-data-source-manager/src/server/__tests__/data-sources.test.ts index 8567b056e..2256554ee 100644 --- a/packages/plugins/@tachybase/plugin-data-source-manager/src/server/__tests__/data-sources.test.ts +++ b/packages/plugins/@tachybase/plugin-data-source-manager/src/server/__tests__/data-sources.test.ts @@ -6,7 +6,7 @@ describe('data source', async () => { beforeEach(async () => { app = await createMockServer({ - plugins: ['nocobase', 'data-source-manager'], + plugins: ['tachybase', 'data-source-manager'], }); }); diff --git a/packages/plugins/@tachybase/plugin-data-visualization/src/swagger/index.ts b/packages/plugins/@tachybase/plugin-data-visualization/src/swagger/index.ts index 8a00381c2..a844d9289 100644 --- a/packages/plugins/@tachybase/plugin-data-visualization/src/swagger/index.ts +++ b/packages/plugins/@tachybase/plugin-data-visualization/src/swagger/index.ts @@ -1,6 +1,6 @@ export default { info: { - title: 'NocoBase API - Data visualization plugin', + title: 'TachyBase API - Data visualization plugin', }, tags: [], paths: {}, diff --git a/packages/plugins/@tachybase/plugin-error-handler/package.json b/packages/plugins/@tachybase/plugin-error-handler/package.json index 4f2a5a913..0a585fedd 100644 --- a/packages/plugins/@tachybase/plugin-error-handler/package.json +++ b/packages/plugins/@tachybase/plugin-error-handler/package.json @@ -3,11 +3,6 @@ "displayName": "Error handler", "version": "0.21.34", "description": "Handling application errors and exceptions.", - "repository": { - "type": "git", - "url": "git+https://github.com/nocobase/nocobase.git", - "directory": "packages/plugin-error-handler" - }, "license": "Apache-2.0", "main": "./dist/server/index.js", "devDependencies": { @@ -23,6 +18,5 @@ "@tachybase/utils": "workspace:*" }, "description.zh-CN": "处理应用程序中的错误和异常。", - "displayName.zh-CN": "错误处理器", - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" + "displayName.zh-CN": "错误处理器" } diff --git a/packages/plugins/@tachybase/plugin-export/package.json b/packages/plugins/@tachybase/plugin-export/package.json index 373f3b261..657788d53 100644 --- a/packages/plugins/@tachybase/plugin-export/package.json +++ b/packages/plugins/@tachybase/plugin-export/package.json @@ -6,7 +6,6 @@ "keywords": [ "Actions" ], - "homepage": "https://docs.nocobase.com/handbook/action-export", "license": "Apache-2.0", "main": "./dist/server/index.js", "devDependencies": { @@ -28,7 +27,5 @@ "@tachybase/utils": "workspace:*" }, "description.zh-CN": "导出筛选后的记录到 Excel 中,可以配置导出哪些字段。", - "displayName.zh-CN": "操作:导出记录", - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", - "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-export" + "displayName.zh-CN": "操作:导出记录" } diff --git a/packages/plugins/@tachybase/plugin-export/src/swagger/index.json b/packages/plugins/@tachybase/plugin-export/src/swagger/index.json index a77c6ed22..29b6a5773 100644 --- a/packages/plugins/@tachybase/plugin-export/src/swagger/index.json +++ b/packages/plugins/@tachybase/plugin-export/src/swagger/index.json @@ -1,7 +1,7 @@ { "openapi": "3.0.2", "info": { - "title": "NocoBase API - Export plugin" + "title": "TachyBase API - Export plugin" }, "tags": [], "paths": { diff --git a/packages/plugins/@tachybase/plugin-file-manager/package.json b/packages/plugins/@tachybase/plugin-file-manager/package.json index c8df38aa8..5862cbc9b 100644 --- a/packages/plugins/@tachybase/plugin-file-manager/package.json +++ b/packages/plugins/@tachybase/plugin-file-manager/package.json @@ -7,7 +7,6 @@ "Collections", "Collection fields" ], - "homepage": "https://docs.nocobase.com/handbook/file-manager", "license": "Apache-2.0", "main": "./dist/server/index.js", "devDependencies": { @@ -41,7 +40,5 @@ "@tachybase/utils": "workspace:*" }, "description.zh-CN": "提供文件存储服务,并提供了文件表模板和附件字段。", - "displayName.zh-CN": "文件管理器", - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", - "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/file-manager" + "displayName.zh-CN": "文件管理器" } diff --git a/packages/plugins/@tachybase/plugin-file-manager/src/server/__tests__/attachment.test.ts b/packages/plugins/@tachybase/plugin-file-manager/src/server/__tests__/attachment.test.ts index 8c529eb70..e41a15b09 100644 --- a/packages/plugins/@tachybase/plugin-file-manager/src/server/__tests__/attachment.test.ts +++ b/packages/plugins/@tachybase/plugin-file-manager/src/server/__tests__/attachment.test.ts @@ -35,11 +35,11 @@ describe('attachment', () => { values: { name: 'test', logo: { - title: 'nocobase-logo', + title: 'tachybase-logo', filename: '682e5ad037dd02a0fe4800a3e91c283b.png', extname: '.png', mimetype: 'image/png', - url: 'https://nocobase.oss-cn-beijing.aliyuncs.com/682e5ad037dd02a0fe4800a3e91c283b.png', + url: 'https://tachybase.oss-cn-beijing.aliyuncs.com/682e5ad037dd02a0fe4800a3e91c283b.png', }, }, }); diff --git a/packages/plugins/@tachybase/plugin-file-manager/src/server/__tests__/storages/ali-oss.test.ts b/packages/plugins/@tachybase/plugin-file-manager/src/server/__tests__/storages/ali-oss.test.ts index 4eb7a5304..d3668cb55 100644 --- a/packages/plugins/@tachybase/plugin-file-manager/src/server/__tests__/storages/ali-oss.test.ts +++ b/packages/plugins/@tachybase/plugin-file-manager/src/server/__tests__/storages/ali-oss.test.ts @@ -100,7 +100,7 @@ describe('storage:ali-oss', () => { values: { ...aliossStorage.defaults(), name: 'ali-oss-2', - path: 'test/nocobase', + path: 'test/tachybase', paranoid: true, default: true, }, diff --git a/packages/plugins/@tachybase/plugin-file-manager/src/server/__tests__/storages/s3.test.ts b/packages/plugins/@tachybase/plugin-file-manager/src/server/__tests__/storages/s3.test.ts index 2e2a179d2..14348f0c7 100644 --- a/packages/plugins/@tachybase/plugin-file-manager/src/server/__tests__/storages/s3.test.ts +++ b/packages/plugins/@tachybase/plugin-file-manager/src/server/__tests__/storages/s3.test.ts @@ -99,7 +99,7 @@ describe('storage:s3', () => { values: { ...s3Storage.defaults(), name: 's3-2', - path: 'test/nocobase', + path: 'test/tachybase', paranoid: true, default: true, }, diff --git a/packages/plugins/@tachybase/plugin-file-manager/src/swagger/index.json b/packages/plugins/@tachybase/plugin-file-manager/src/swagger/index.json index 5ae8bcc4f..70553d1ab 100644 --- a/packages/plugins/@tachybase/plugin-file-manager/src/swagger/index.json +++ b/packages/plugins/@tachybase/plugin-file-manager/src/swagger/index.json @@ -1,7 +1,7 @@ { "openapi": "3.0.2", "info": { - "title": "NocoBase API - File manager plugin" + "title": "TachyBase API - File manager plugin" }, "tags": [], "paths": { diff --git a/packages/plugins/@tachybase/plugin-formula-field/package.json b/packages/plugins/@tachybase/plugin-formula-field/package.json index f251e3c88..24e9ca74a 100644 --- a/packages/plugins/@tachybase/plugin-formula-field/package.json +++ b/packages/plugins/@tachybase/plugin-formula-field/package.json @@ -6,7 +6,6 @@ "keywords": [ "Collection fields" ], - "homepage": "https://docs.nocobase.com/handbook/field-formula", "license": "Apache-2.0", "main": "./dist/server/index.js", "devDependencies": { @@ -24,7 +23,5 @@ "@tachybase/utils": "workspace:*" }, "description.zh-CN": "可以配置并存储同一条记录的多字段值之间的计算结果,支持 Math.js 和 Excel formula functions 两种引擎", - "displayName.zh-CN": "数据表字段:公式", - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", - "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/field-formula" + "displayName.zh-CN": "数据表字段:公式" } diff --git a/packages/plugins/@tachybase/plugin-gantt/src/client/__e2e__/schemaInitailizer.test.ts b/packages/plugins/@tachybase/plugin-gantt/src/client/__e2e__/schemaInitailizer.test.ts index cddf2f8aa..2ac5c608c 100644 --- a/packages/plugins/@tachybase/plugin-gantt/src/client/__e2e__/schemaInitailizer.test.ts +++ b/packages/plugins/@tachybase/plugin-gantt/src/client/__e2e__/schemaInitailizer.test.ts @@ -63,11 +63,11 @@ test.describe('configure fields', () => { await page.getByRole('menuitem', { name: 'Title field' }).click(); await page.getByText('Username').click(); await expect( - page.getByLabel('block-item-CardItem-general-table').getByRole('button', { name: 'nocobase' }), + page.getByLabel('block-item-CardItem-general-table').getByRole('button', { name: 'tachybase' }), ).toBeVisible(); await page.reload(); await expect( - page.getByLabel('block-item-CardItem-general-table').getByRole('button', { name: 'nocobase' }), + page.getByLabel('block-item-CardItem-general-table').getByRole('button', { name: 'tachybase' }), ).toBeVisible(); }); }); diff --git a/packages/plugins/@tachybase/plugin-graph-collection-manager/src/client/GraphCollectionShortcut.tsx b/packages/plugins/@tachybase/plugin-graph-collection-manager/src/client/GraphCollectionShortcut.tsx index a7ca1a03a..448ca98d1 100644 --- a/packages/plugins/@tachybase/plugin-graph-collection-manager/src/client/GraphCollectionShortcut.tsx +++ b/packages/plugins/@tachybase/plugin-graph-collection-manager/src/client/GraphCollectionShortcut.tsx @@ -116,7 +116,7 @@ export const GraphCollectionPane = () => { className={css` height: calc(100vh - 160px); overflow: auto; - margin: calc(var(--nb-spacing) * -1); + margin: calc(var(--tb-spacing) * -1); position: relative; `} id="graph_container" diff --git a/packages/plugins/@tachybase/plugin-graph-collection-manager/src/client/utils.tsx b/packages/plugins/@tachybase/plugin-graph-collection-manager/src/client/utils.tsx index a59ca441e..f9ba02dde 100644 --- a/packages/plugins/@tachybase/plugin-graph-collection-manager/src/client/utils.tsx +++ b/packages/plugins/@tachybase/plugin-graph-collection-manager/src/client/utils.tsx @@ -159,7 +159,7 @@ export const formatInheritEdgeData = (collections) => { ref: 'labelText', refWidth: '100%', refHeight: '100%', - fill: 'var(--nb-box-bg)', + fill: 'var(--tb-box-bg)', }, }, position: { @@ -261,7 +261,7 @@ const formatRelationEdgeData = (data, targetTables, tableData) => { refWidth: '100%', refHeight: '100%', stroke: '#ddd', - fill: 'var(--nb-box-bg)', + fill: 'var(--tb-box-bg)', strokeWidth: 1, rx: 10, ry: 10, @@ -304,7 +304,7 @@ const formatRelationEdgeData = (data, targetTables, tableData) => { refWidth: '100%', refHeight: '100%', stroke: '#ddd', - fill: 'var(--nb-box-bg)', + fill: 'var(--tb-box-bg)', rx: 10, ry: 10, strokeWidth: 1, diff --git a/packages/plugins/@tachybase/plugin-iframe-block/package.json b/packages/plugins/@tachybase/plugin-iframe-block/package.json index bec3df2c2..e24d6ce5f 100644 --- a/packages/plugins/@tachybase/plugin-iframe-block/package.json +++ b/packages/plugins/@tachybase/plugin-iframe-block/package.json @@ -6,7 +6,6 @@ "keywords": [ "Blocks" ], - "homepage": "https://docs.nocobase.com/handbook/block-iframe", "license": "Apache-2.0", "main": "./dist/server/index.js", "devDependencies": { @@ -25,7 +24,5 @@ "@tachybase/test": "workspace:*" }, "description.zh-CN": "在页面上创建和管理iframe,用于嵌入和展示外部网页或内容。", - "displayName.zh-CN": "区块:iframe", - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", - "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/block-iframe" + "displayName.zh-CN": "区块:iframe" } diff --git a/packages/plugins/@tachybase/plugin-iframe-block/src/swagger/index.ts b/packages/plugins/@tachybase/plugin-iframe-block/src/swagger/index.ts index 76c571178..6ff239043 100644 --- a/packages/plugins/@tachybase/plugin-iframe-block/src/swagger/index.ts +++ b/packages/plugins/@tachybase/plugin-iframe-block/src/swagger/index.ts @@ -1,6 +1,6 @@ export default { info: { - title: 'NocoBase API - Iframe block plugin', + title: 'TachyBase API - Iframe block plugin', }, tags: [], paths: {}, diff --git a/packages/plugins/@tachybase/plugin-import/README.md b/packages/plugins/@tachybase/plugin-import/README.md index 0d915185d..679b4e858 100644 --- a/packages/plugins/@tachybase/plugin-import/README.md +++ b/packages/plugins/@tachybase/plugin-import/README.md @@ -115,7 +115,7 @@ Excel 数据导入插件。 | 附件 | | --| -| https://www.nocobase.com/images/logo.png | +| https://www.tachybase.com/images/logo.png | 转 JSON 之后为 @@ -126,7 +126,7 @@ Excel 数据导入插件。 "filename": "logo.png", "title": "logo.png", "extname": ".png", - "url": "https://www.nocobase.com/images/logo.png" + "url": "https://www.tachybase.com/images/logo.png" } ] } diff --git a/packages/plugins/@tachybase/plugin-import/README.zh-CN.md b/packages/plugins/@tachybase/plugin-import/README.zh-CN.md index d3d4cc24b..5358321ec 100644 --- a/packages/plugins/@tachybase/plugin-import/README.zh-CN.md +++ b/packages/plugins/@tachybase/plugin-import/README.zh-CN.md @@ -115,7 +115,7 @@ Excel 数据导入插件。 | 附件 | | --| -| https://www.nocobase.com/images/logo.png | +| https://www.tachybase.com/images/logo.png | 转 JSON 之后为 @@ -126,7 +126,7 @@ Excel 数据导入插件。 "filename": "logo.png", "title": "logo.png", "extname": ".png", - "url": "https://www.nocobase.com/images/logo.png" + "url": "https://www.tachybase.com/images/logo.png" } ] } diff --git a/packages/plugins/@tachybase/plugin-import/package.json b/packages/plugins/@tachybase/plugin-import/package.json index 7bbe2f58c..62cd40645 100644 --- a/packages/plugins/@tachybase/plugin-import/package.json +++ b/packages/plugins/@tachybase/plugin-import/package.json @@ -6,7 +6,6 @@ "keywords": [ "Actions" ], - "homepage": "https://docs.nocobase.com/handbook/action-import", "license": "Apache-2.0", "main": "./dist/server/index.js", "devDependencies": { @@ -34,7 +33,5 @@ "@tachybase/utils": "workspace:*" }, "description.zh-CN": "使用 Excel 模板导入数据,可以配置导入哪些字段,自动生成模板。", - "displayName.zh-CN": "操作:导入记录", - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", - "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-import" + "displayName.zh-CN": "操作:导入记录" } diff --git a/packages/plugins/@tachybase/plugin-import/src/swagger/index.json b/packages/plugins/@tachybase/plugin-import/src/swagger/index.json index be9d451a5..e9b6e6da1 100644 --- a/packages/plugins/@tachybase/plugin-import/src/swagger/index.json +++ b/packages/plugins/@tachybase/plugin-import/src/swagger/index.json @@ -1,7 +1,7 @@ { "openapi": "3.0.2", "info": { - "title": "NocoBase API - Import plugin" + "title": "TachyBase API - Import plugin" }, "tags": [], "paths": { diff --git a/packages/plugins/@tachybase/plugin-kanban/src/client/__e2e__/schemaInitailizer.test.ts b/packages/plugins/@tachybase/plugin-kanban/src/client/__e2e__/schemaInitailizer.test.ts index fcbff8aad..bba01c76d 100644 --- a/packages/plugins/@tachybase/plugin-kanban/src/client/__e2e__/schemaInitailizer.test.ts +++ b/packages/plugins/@tachybase/plugin-kanban/src/client/__e2e__/schemaInitailizer.test.ts @@ -69,7 +69,9 @@ test.describe('configure fields', () => { await page.getByText('Title field').click(); await page.getByRole('option', { name: 'Username' }).click(); //显示新的标题字段符合预期 - await expect(page.getByLabel('block-item-CollectionField-general-kanban-general.manyToOne')).toHaveText(/nocobase/); + await expect(page.getByLabel('block-item-CollectionField-general-kanban-general.manyToOne')).toHaveText( + /tachybase/, + ); }); }); diff --git a/packages/plugins/@tachybase/plugin-kanban/src/client/__e2e__/utils.ts b/packages/plugins/@tachybase/plugin-kanban/src/client/__e2e__/utils.ts index 08ed93b91..74077e349 100644 --- a/packages/plugins/@tachybase/plugin-kanban/src/client/__e2e__/utils.ts +++ b/packages/plugins/@tachybase/plugin-kanban/src/client/__e2e__/utils.ts @@ -137,7 +137,7 @@ export const oneEmptyKanbanBlock: PageConfig = { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, 'x-uid': 'p8urndbswek', diff --git a/packages/plugins/@tachybase/plugin-kanban/src/client/__tests__/createKanbanBlockSchema.test.ts b/packages/plugins/@tachybase/plugin-kanban/src/client/__tests__/createKanbanBlockSchema.test.ts index a06d344a5..1118a811f 100644 --- a/packages/plugins/@tachybase/plugin-kanban/src/client/__tests__/createKanbanBlockSchema.test.ts +++ b/packages/plugins/@tachybase/plugin-kanban/src/client/__tests__/createKanbanBlockSchema.test.ts @@ -26,7 +26,7 @@ test('createKanbanBlockSchema should return an object with expected properties', "x-component": "ActionBar", "x-component-props": { "style": { - "marginBottom": "var(--nb-spacing)", + "marginBottom": "var(--tb-spacing)", }, }, "x-initializer": "kanban:configureActions", diff --git a/packages/plugins/@tachybase/plugin-kanban/src/client/createKanbanBlockUISchema.ts b/packages/plugins/@tachybase/plugin-kanban/src/client/createKanbanBlockUISchema.ts index dcf9e724e..49a821626 100644 --- a/packages/plugins/@tachybase/plugin-kanban/src/client/createKanbanBlockUISchema.ts +++ b/packages/plugins/@tachybase/plugin-kanban/src/client/createKanbanBlockUISchema.ts @@ -35,7 +35,7 @@ export const createKanbanBlockUISchema = (options: { 'x-component': 'ActionBar', 'x-component-props': { style: { - marginBottom: 'var(--nb-spacing)', + marginBottom: 'var(--tb-spacing)', }, }, properties: {}, diff --git a/packages/plugins/@tachybase/plugin-localization-management/package.json b/packages/plugins/@tachybase/plugin-localization-management/package.json index baa259cf4..01a8bfa3e 100644 --- a/packages/plugins/@tachybase/plugin-localization-management/package.json +++ b/packages/plugins/@tachybase/plugin-localization-management/package.json @@ -6,7 +6,6 @@ "keywords": [ "System management" ], - "homepage": "https://docs.nocobase.com/handbook/localization-management", "license": "Apache-2.0", "main": "dist/server/index.js", "devDependencies": { @@ -28,7 +27,5 @@ "@tachybase/test": "workspace:*" }, "description.zh-CN": "支持管理应用程序的本地化资源。", - "displayName.zh-CN": "本地化", - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", - "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/localization-management" + "displayName.zh-CN": "本地化" } diff --git a/packages/plugins/@tachybase/plugin-localization-management/src/server/actions/localization.ts b/packages/plugins/@tachybase/plugin-localization-management/src/server/actions/localization.ts index 8fa6e67cd..2695e6fde 100644 --- a/packages/plugins/@tachybase/plugin-localization-management/src/server/actions/localization.ts +++ b/packages/plugins/@tachybase/plugin-localization-management/src/server/actions/localization.ts @@ -96,7 +96,7 @@ const getSchemaUid = async (db: Database, migrate = false) => { const { adminSchemaUid, mobileSchemaUid } = options; return { adminSchemaUid, mobileSchemaUid }; } - return { adminSchemaUid: 'nocobase-admin-menu', mobileSchemaUid: 'nocobase-mobile-container' }; + return { adminSchemaUid: 'default-admin-menu', mobileSchemaUid: 'default-admin-mobile' }; }; export const getTextsFromMenu = async (db: Database, migrate = false) => { diff --git a/packages/plugins/@tachybase/plugin-localization-management/src/swagger/index.json b/packages/plugins/@tachybase/plugin-localization-management/src/swagger/index.json index 9ce880817..4f0c9d63e 100644 --- a/packages/plugins/@tachybase/plugin-localization-management/src/swagger/index.json +++ b/packages/plugins/@tachybase/plugin-localization-management/src/swagger/index.json @@ -1,7 +1,7 @@ { "openapi": "3.0.2", "info": { - "title": "NocoBase API - Localization management plugin" + "title": "TachyBase API - Localization management plugin" }, "tags": [], "paths": { diff --git a/packages/plugins/@tachybase/plugin-logger/package.json b/packages/plugins/@tachybase/plugin-logger/package.json index 540341970..e0e870f73 100644 --- a/packages/plugins/@tachybase/plugin-logger/package.json +++ b/packages/plugins/@tachybase/plugin-logger/package.json @@ -6,7 +6,6 @@ "keywords": [ "Logging and monitoring" ], - "homepage": "https://docs.nocobase.com/handbook/logger", "license": "Apache-2.0", "main": "dist/server/index.js", "devDependencies": { @@ -25,7 +24,5 @@ "@tachybase/test": "workspace:*" }, "description.zh-CN": "服务端日志,主要包括接口请求日志和系统运行日志,并支持打包和下载日志文件。", - "displayName.zh-CN": "日志", - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", - "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/logger" + "displayName.zh-CN": "日志" } diff --git a/packages/plugins/@tachybase/plugin-map/package.json b/packages/plugins/@tachybase/plugin-map/package.json index 196810451..cdf1c243a 100644 --- a/packages/plugins/@tachybase/plugin-map/package.json +++ b/packages/plugins/@tachybase/plugin-map/package.json @@ -6,7 +6,6 @@ "keywords": [ "Blocks" ], - "homepage": "https://docs.nocobase.com/handbook/map", "license": "Apache-2.0", "main": "./dist/server/index.js", "devDependencies": { @@ -36,7 +35,5 @@ "@tachybase/utils": "workspace:*" }, "description.zh-CN": "地图区块,支持高德地图和 Google 地图,你也可以扩展更多地图类型。", - "displayName.zh-CN": "区块:地图", - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", - "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/map" + "displayName.zh-CN": "区块:地图" } diff --git a/packages/plugins/@tachybase/plugin-map/src/client/components/AMap/Map.tsx b/packages/plugins/@tachybase/plugin-map/src/client/components/AMap/Map.tsx index ec548dbda..02d03dd37 100644 --- a/packages/plugins/@tachybase/plugin-map/src/client/components/AMap/Map.tsx +++ b/packages/plugins/@tachybase/plugin-map/src/client/components/AMap/Map.tsx @@ -105,7 +105,7 @@ export const AMapComponent = React.forwardRef(); const editor = useRef(null); const navigate = useNavigate(); - const id = useRef(`nocobase-map-${type || ''}-${Date.now().toString(32)}`); + const id = useRef(`tachybase-map-${type || ''}-${Date.now().toString(32)}`); const { modal } = App.useApp(); const [commonOptions] = useState({ diff --git a/packages/plugins/@tachybase/plugin-map/src/client/hooks/useMapConfiguration.ts b/packages/plugins/@tachybase/plugin-map/src/client/hooks/useMapConfiguration.ts index 9ef52444e..560da3c79 100644 --- a/packages/plugins/@tachybase/plugin-map/src/client/hooks/useMapConfiguration.ts +++ b/packages/plugins/@tachybase/plugin-map/src/client/hooks/useMapConfiguration.ts @@ -3,7 +3,7 @@ import { useRequest } from '@tachybase/client'; export const MapConfigurationResourceKey = 'map-configuration'; export const getSSKey = (type) => { - return `NOCOBASE_PLUGIN_MAP_CONFIGURATION_${type}`; + return `TACHYBASE_PLUGIN_MAP_CONFIGURATION_${type}`; }; export const useMapConfiguration = (type: string) => { diff --git a/packages/plugins/@tachybase/plugin-map/src/swagger/index.ts b/packages/plugins/@tachybase/plugin-map/src/swagger/index.ts index 5dded0948..ea9dc6eb3 100644 --- a/packages/plugins/@tachybase/plugin-map/src/swagger/index.ts +++ b/packages/plugins/@tachybase/plugin-map/src/swagger/index.ts @@ -1,6 +1,6 @@ export default { info: { - title: 'NocoBase API - Map plugin', + title: 'TachyBase API - Map plugin', }, paths: { '/map-configuration:get': { diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/container/style.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/container/style.ts index ba1b4c3ad..b74b964d4 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/container/style.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/container/style.ts @@ -9,7 +9,7 @@ const useStyles = createStyles(({ token, css }) => { right: unset; left: 2px; } - background: var(--nb-box-bg); + background: var(--tb-box-bg); display: flex; flex-direction: column; width: 100%; @@ -20,7 +20,7 @@ const useStyles = createStyles(({ token, css }) => { tabBar: css` & > .general-schema-designer { - --nb-designer-top: ${token.marginMD}px; + --tb-designer-top: ${token.marginMD}px; } position: fixed; background: ${token.colorBgContainer}; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/menu/style.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/menu/style.ts index 6d1c418d3..8284eef5d 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/menu/style.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/menu/style.ts @@ -12,7 +12,7 @@ const useStyles = createStyles(({ token, css }) => { background: ${token.colorBgContainer}; width: 100%; - margin-bottom: var(--nb-spacing); + margin-bottom: var(--tb-spacing); `, }; }); diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/page/Page.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/page/Page.tsx index e4de87916..0916566e8 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/page/Page.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/page/Page.tsx @@ -1,16 +1,18 @@ -import { RecursionField, useField, useFieldSchema } from '@tachybase/schema'; +import React, { useCallback } from 'react'; import { ActionBarProvider, + css, + cx, FilterBlockProvider, SortableItem, TabsContextProvider, - css, - cx, useDesigner, } from '@tachybase/client'; +import { RecursionField, useField, useFieldSchema } from '@tachybase/schema'; + import { TabsProps } from 'antd'; -import React, { useCallback } from 'react'; import { useSearchParams } from 'react-router-dom'; + import { countGridCol, findSchema } from '../../helpers'; import { PageDesigner } from './Page.Designer'; import useStyles from './style'; @@ -94,7 +96,7 @@ const InternalPage: React.FC = (props) => {
{ globalActionCSS: css` #nb-position-container > & { height: ${token.sizeXXL}px; - border-top: 1px solid var(--nb-box-bg); + border-top: 1px solid var(--tb-box-bg); margin-bottom: 0px !important; - padding: 0 var(--nb-spacing); + padding: 0 var(--tb-spacing); align-items: center; overflow-x: auto; background: ${token.colorBgContainer}; @@ -16,14 +16,14 @@ const useStyles = createStyles(({ token, css }) => { `, mobilePage: css` - background: var(--nb-box-bg); + background: var(--tb-box-bg); display: flex; flex-direction: column; width: 100%; height: 100%; overflow-x: hidden; overflow-y: auto; - padding-bottom: var(--nb-spacing); + padding-bottom: var(--tb-spacing); `, mobilePageHeader: css` diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/settings/Settings.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/settings/Settings.tsx index 4ce854248..35a909396 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/settings/Settings.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/components/settings/Settings.tsx @@ -1,6 +1,8 @@ -import { css, cx, SettingsMenu, SortableItem, useDesigner } from '@tachybase/client'; import React from 'react'; +import { css, cx, SettingsMenu, SortableItem, useDesigner } from '@tachybase/client'; + import { SettingsDesigner } from './Settings.Designer'; + export const InternalSettings = () => { const Designer = useDesigner(); return ( @@ -8,7 +10,7 @@ export const InternalSettings = () => { className={cx( 'nb-mobile-setting', css` - margin-bottom: var(--nb-spacing); + margin-bottom: var(--tb-spacing); `, )} > diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/scopes/grid-card.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/scopes/grid-card.ts index 557e2749e..930941320 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/scopes/grid-card.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/core/schema/scopes/grid-card.ts @@ -1,9 +1,11 @@ import { css } from '@tachybase/client'; -import { useInterfaceContext } from '../../../router/InterfaceProvider'; + import { PaginationProps } from 'antd'; +import { useInterfaceContext } from '../../../router/InterfaceProvider'; + const listCss = css` - padding: 0 var(--nb-spacing); + padding: 0 var(--tb-spacing); & > .nb-action-bar { padding: unset !important; background: unset !important; diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/router/Application.tsx b/packages/plugins/@tachybase/plugin-mobile-client/src/client/router/Application.tsx index f9ef23f7e..e3b271051 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/router/Application.tsx +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/router/Application.tsx @@ -1,18 +1,20 @@ -import { ActionContextProvider, AdminProvider, css, cx, RemoteSchemaComponent, useViewport } from '@tachybase/client'; -import { DrawerProps, ModalProps } from 'antd'; import React, { PropsWithChildren, useMemo } from 'react'; +import { ActionContextProvider, AdminProvider, css, cx, RemoteSchemaComponent, useViewport } from '@tachybase/client'; + +import { DrawerProps, ModalProps } from 'antd'; import { Outlet, useParams } from 'react-router-dom'; + import { MobileCore } from '../core'; import { useInterfaceContext } from './InterfaceProvider'; import { OpenInNewTab } from './OpenInNewTab'; const commonCSSVariables = css` - --nb-spacing: 14px; + --tb-spacing: 14px; `; const commonCSSOverride = css``; const commonDesignerCSS = css` - --nb-designer-top: 2px; - --nb-designer-right: 2px; + --tb-designer-top: 2px; + --tb-designer-right: 2px; .nb-sortable-designer:hover { position: relative; > .general-schema-designer { @@ -31,8 +33,8 @@ const commonDesignerCSS = css` pointer-events: none; > .general-schema-designer-icons { position: absolute; - top: var(--nb-designer-top); - right: var(--nb-designer-right); + top: var(--tb-designer-top); + right: var(--tb-designer-right); line-height: 16px; pointer-events: all; .ant-space-item { @@ -68,7 +70,7 @@ const modalProps = { }; const useMobileSchemaUid = () => { - return 'nocobase-mobile-container'; + return 'default-admin-mobile'; }; const MApplication: React.FC = (props) => { diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/server/migrations/20231215215233-mobile-container-uid.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/server/migrations/20231215215233-mobile-container-uid.ts index 2a678c62b..16183203b 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/server/migrations/20231215215233-mobile-container-uid.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/server/migrations/20231215215233-mobile-container-uid.ts @@ -17,7 +17,7 @@ export default class extends Migration { await this.db.sequelize.transaction(async (transaction) => { await UiSchemas.update( { - 'x-uid': 'nocobase-mobile-container', + 'x-uid': 'default-admin-mobile', }, { transaction, @@ -28,7 +28,7 @@ export default class extends Migration { ); await this.db.getModel('uiSchemaTreePath').update( { - descendant: 'nocobase-mobile-container', + descendant: 'default-admin-mobile', }, { transaction, @@ -39,7 +39,7 @@ export default class extends Migration { ); await this.db.getModel('uiSchemaTreePath').update( { - ancestor: 'nocobase-mobile-container', + ancestor: 'default-admin-mobile', }, { transaction, diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/server/plugin.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/server/plugin.ts index 14a59684e..16227f2c2 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/server/plugin.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/server/plugin.ts @@ -1,5 +1,5 @@ -import { Plugin } from '@tachybase/server'; import { resolve } from 'path'; +import { Plugin } from '@tachybase/server'; export class MobileClientPlugin extends Plugin { afterAdd() {} @@ -18,7 +18,7 @@ export class MobileClientPlugin extends Plugin { const uiSchemas = this.db.getRepository('uiSchemas'); await uiSchemas.insert({ type: 'void', - 'x-uid': 'nocobase-mobile-container', + 'x-uid': 'default-admin-mobile', 'x-component': 'MContainer', 'x-designer': 'MContainer.Designer', 'x-component-props': {}, diff --git a/packages/plugins/@tachybase/plugin-mock-collections/package.json b/packages/plugins/@tachybase/plugin-mock-collections/package.json index e648d2c31..1ebe92ad6 100644 --- a/packages/plugins/@tachybase/plugin-mock-collections/package.json +++ b/packages/plugins/@tachybase/plugin-mock-collections/package.json @@ -17,6 +17,5 @@ "@tachybase/server": "workspace:*", "@tachybase/test": "workspace:*", "@tachybase/utils": "workspace:*" - }, - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" + } } diff --git a/packages/plugins/@tachybase/plugin-multi-app-manager/src/server/__tests__/multiple-apps.test.ts b/packages/plugins/@tachybase/plugin-multi-app-manager/src/server/__tests__/multiple-apps.test.ts index 252f2a887..6cb184e77 100644 --- a/packages/plugins/@tachybase/plugin-multi-app-manager/src/server/__tests__/multiple-apps.test.ts +++ b/packages/plugins/@tachybase/plugin-multi-app-manager/src/server/__tests__/multiple-apps.test.ts @@ -2,7 +2,9 @@ import { Database } from '@tachybase/database'; import { AppSupervisor, Gateway } from '@tachybase/server'; import { createMockServer, MockServer } from '@tachybase/test'; import { uid } from '@tachybase/utils'; + import { vi } from 'vitest'; + import { PluginMultiAppManager } from '../server'; const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); @@ -295,7 +297,7 @@ describe('multiple apps', () => { values: { name: subAppName, options: { - plugins: ['nocobase'], + plugins: ['tachybase'], }, }, context: { diff --git a/packages/plugins/@tachybase/plugin-multi-app-manager/src/swagger/index.ts b/packages/plugins/@tachybase/plugin-multi-app-manager/src/swagger/index.ts index c48a388a2..425226364 100644 --- a/packages/plugins/@tachybase/plugin-multi-app-manager/src/swagger/index.ts +++ b/packages/plugins/@tachybase/plugin-multi-app-manager/src/swagger/index.ts @@ -1,6 +1,6 @@ export default { info: { - title: 'NocoBase API - Multi-app manager plugin', + title: 'TachyBase API - Multi-app manager plugin', }, tags: [], paths: { diff --git a/packages/plugins/@tachybase/plugin-multi-app-share-collection/package.json b/packages/plugins/@tachybase/plugin-multi-app-share-collection/package.json index 03d7435e3..b342e75dc 100644 --- a/packages/plugins/@tachybase/plugin-multi-app-share-collection/package.json +++ b/packages/plugins/@tachybase/plugin-multi-app-share-collection/package.json @@ -25,7 +25,5 @@ "@tachybase/test": "workspace:*", "@tachybase/utils": "workspace:*" }, - "description.zh-CN": "", - "displayName.zh-CN": "多应用数据表共享", - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" + "description.zh-CN": "" } diff --git a/packages/plugins/@tachybase/plugin-multi-app-share-collection/src/server/__tests__/collection-sync.test.ts b/packages/plugins/@tachybase/plugin-multi-app-share-collection/src/server/__tests__/collection-sync.test.ts index 547a20739..11cac12e7 100644 --- a/packages/plugins/@tachybase/plugin-multi-app-share-collection/src/server/__tests__/collection-sync.test.ts +++ b/packages/plugins/@tachybase/plugin-multi-app-share-collection/src/server/__tests__/collection-sync.test.ts @@ -10,7 +10,7 @@ describe.runIf(isPg())('enable plugin', () => { beforeEach(async () => { const app = await createMockServer({ acl: false, - plugins: ['nocobase'], + plugins: ['tachybase'], }); mainApp = app; @@ -41,7 +41,7 @@ describe.runIf(isPg())('collection sync after main', () => { beforeEach(async () => { const app = await createMockServer({ acl: false, - plugins: ['nocobase'], + plugins: ['tachybase'], async beforeInstall(app) { await app.db.sequelize.query(`DROP SCHEMA IF EXISTS sub1 CASCADE`); await app.db.sequelize.query(`DROP SCHEMA IF EXISTS sub2 CASCADE`); @@ -103,7 +103,7 @@ describe.runIf(isPg())('collection sync', () => { beforeEach(async () => { const app = await createMockServer({ acl: false, - plugins: ['nocobase'], + plugins: ['tachybase'], async beforeInstall(app) { await app.db.sequelize.query(`DROP SCHEMA IF EXISTS sub1 CASCADE`); await app.db.sequelize.query(`DROP SCHEMA IF EXISTS sub2 CASCADE`); diff --git a/packages/plugins/@tachybase/plugin-multi-app-share-collection/src/server/plugin.ts b/packages/plugins/@tachybase/plugin-multi-app-share-collection/src/server/plugin.ts index 306b467b7..e77855f6b 100644 --- a/packages/plugins/@tachybase/plugin-multi-app-share-collection/src/server/plugin.ts +++ b/packages/plugins/@tachybase/plugin-multi-app-share-collection/src/server/plugin.ts @@ -270,10 +270,10 @@ export class MultiAppShareCollectionPlugin extends Plugin { return { database: lodash.merge(databaseOptions, { dialectOptions: { - application_name: `nocobase.${appName}`, + application_name: `tachybase.${appName}`, }, }), - plugins: plugins.includes('nocobase') ? ['nocobase'] : plugins, + plugins: plugins.includes('tachybase') ? ['tachybase'] : plugins, resourcer: { prefix: process.env.API_BASE_PATH, }, diff --git a/packages/plugins/@tachybase/plugin-notifications/package.json b/packages/plugins/@tachybase/plugin-notifications/package.json index 587e44fcc..fff493d6a 100644 --- a/packages/plugins/@tachybase/plugin-notifications/package.json +++ b/packages/plugins/@tachybase/plugin-notifications/package.json @@ -16,6 +16,5 @@ "@tachybase/server": "workspace:*", "@tachybase/test": "workspace:*", "@tachybase/utils": "workspace:*" - }, - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" + } } diff --git a/packages/plugins/@tachybase/plugin-notifications/src/server/__tests__/notifications.test.ts b/packages/plugins/@tachybase/plugin-notifications/src/server/__tests__/notifications.test.ts index b167d689b..f4ded39a0 100644 --- a/packages/plugins/@tachybase/plugin-notifications/src/server/__tests__/notifications.test.ts +++ b/packages/plugins/@tachybase/plugin-notifications/src/server/__tests__/notifications.test.ts @@ -42,7 +42,7 @@ describe('notifications', () => { user: 'from@tachybase.com', pass: 'pass', }, - from: 'NocoBase', + from: 'TachyBase', }, }, }, diff --git a/packages/plugins/@tachybase/plugin-oidc/README.zh-CN.md b/packages/plugins/@tachybase/plugin-oidc/README.zh-CN.md index 4fd05ae92..cfb23dc25 100644 --- a/packages/plugins/@tachybase/plugin-oidc/README.zh-CN.md +++ b/packages/plugins/@tachybase/plugin-oidc/README.zh-CN.md @@ -14,13 +14,13 @@ -进入到配置界面,填写**授权重定向URL**. 重定向URL可以在Nocobase,新增认证器时获取,通常情况下为`http(s)://host:port/api/oidc:redirect`. +进入到配置界面,填写**授权重定向URL**. 重定向URL可以在Tachybase,新增认证器时获取,通常情况下为`http(s)://host:port/api/oidc:redirect`. 完成后复制**客户端ID**和**客户端密钥**。 -### 在NocoBase上新增认证器 +### 在TachyBase上新增认证器 插件设置 - 认证 - 新增 - OIDC diff --git a/packages/plugins/@tachybase/plugin-oidc/package.json b/packages/plugins/@tachybase/plugin-oidc/package.json index 192c45d98..91e50463b 100644 --- a/packages/plugins/@tachybase/plugin-oidc/package.json +++ b/packages/plugins/@tachybase/plugin-oidc/package.json @@ -6,7 +6,6 @@ "keywords": [ "Authentication" ], - "homepage": "https://docs.nocobase.com/handbook/auth-oidc", "license": "Apache-2.0", "main": "./dist/server/index.js", "devDependencies": { @@ -31,7 +30,5 @@ "@tachybase/test": "workspace:*" }, "description.zh-CN": "通过 OIDC (OpenID Connect) 协议认证身份。", - "displayName.zh-CN": "认证:OIDC", - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", - "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/auth-oidc" + "displayName.zh-CN": "认证:OIDC" } diff --git a/packages/plugins/@tachybase/plugin-oidc/src/client/Options.tsx b/packages/plugins/@tachybase/plugin-oidc/src/client/Options.tsx index 00be9973e..1e2e904b8 100644 --- a/packages/plugins/@tachybase/plugin-oidc/src/client/Options.tsx +++ b/packages/plugins/@tachybase/plugin-oidc/src/client/Options.tsx @@ -175,7 +175,7 @@ const schema = { 'x-component': 'Checkbox', 'x-decorator': 'FormItem', 'x-decorator-props': { - tooltip: '{{t("Check if NocoBase is running on HTTP protocol")}}', + tooltip: '{{t("Check if TachyBase is running on HTTP protocol")}}', }, }, port: { @@ -184,7 +184,7 @@ const schema = { 'x-component': 'InputNumber', 'x-decorator': 'FormItem', 'x-decorator-props': { - tooltip: '{{t("The port number of the NocoBase service if it is not 80 or 443")}}', + tooltip: '{{t("The port number of the TachyBase service if it is not 80 or 443")}}', }, 'x-component-props': { style: { diff --git a/packages/plugins/@tachybase/plugin-oidc/src/constants.ts b/packages/plugins/@tachybase/plugin-oidc/src/constants.ts index 4cd707033..edaf91a32 100644 --- a/packages/plugins/@tachybase/plugin-oidc/src/constants.ts +++ b/packages/plugins/@tachybase/plugin-oidc/src/constants.ts @@ -2,5 +2,5 @@ import { name } from '../package.json'; export const authType = 'OIDC'; -export const cookieName = 'nocobase_oidc'; +export const cookieName = 'tachybase_oidc'; export const namespace = name; diff --git a/packages/plugins/@tachybase/plugin-oidc/src/locale/en-US.json b/packages/plugins/@tachybase/plugin-oidc/src/locale/en-US.json index 4ce29c41f..6263d942e 100644 --- a/packages/plugins/@tachybase/plugin-oidc/src/locale/en-US.json +++ b/packages/plugins/@tachybase/plugin-oidc/src/locale/en-US.json @@ -27,8 +27,8 @@ "Advanced configuration": "Advanced configuration", "Usage": "Usage", "Redirect URL": "Redirect URL", - "Check if NocoBase is running on HTTP protocol": "Check if NocoBase is running on HTTP protocol", - "The port number of the NocoBase service if it is not 80 or 443": "The port number of the NocoBase service if it is not 80 or 443", + "Check if TachyBase is running on HTTP protocol": "Check if TachyBase is running on HTTP protocol", + "The port number of the TachyBase service if it is not 80 or 443": "The port number of the TachyBase service if it is not 80 or 443", "Pass parameters in the authorization code grant exchange": "Pass parameters in the authorization code grant exchange", "Method to call the user info endpoint": "Method to call the user info endpoint", "Where to put the access token when calling the user info endpoint": "Where to put the access token when calling the user info endpoint", diff --git a/packages/plugins/@tachybase/plugin-oidc/src/locale/ko_KR.json b/packages/plugins/@tachybase/plugin-oidc/src/locale/ko_KR.json index ab7840e2f..d4f528cde 100644 --- a/packages/plugins/@tachybase/plugin-oidc/src/locale/ko_KR.json +++ b/packages/plugins/@tachybase/plugin-oidc/src/locale/ko_KR.json @@ -15,8 +15,8 @@ "Advanced configuration": "고급 설정", "Usage": "사용 방법", "Redirect URL": "리디렉션 URL", - "Check if NocoBase is running on HTTP protocol": "NocoBase가 HTTP 프로토콜에서 실행 중인지 확인", - "The port number of the NocoBase service if it is not 80 or 443": "NocoBase 서비스의 포트 번호, 기본값은 443/80", + "Check if TachyBase is running on HTTP protocol": "TachyBase가 HTTP 프로토콜에서 실행 중인지 확인", + "The port number of the TachyBase service if it is not 80 or 443": "TachyBase 서비스의 포트 번호, 기본값은 443/80", "Pass parameters in the authorization code grant exchange": "권한 부여 코드 교환 중에 매개 변수를 전달", "Method to call the user info endpoint": "사용자 정보 엔드포인트를 호출하는 방법", "Where to put the access token when calling the user info endpoint": "사용자 정보 엔드포인트를 호출할 때 access_token을 어디에 두어야 하는지", diff --git a/packages/plugins/@tachybase/plugin-oidc/src/locale/zh-CN.json b/packages/plugins/@tachybase/plugin-oidc/src/locale/zh-CN.json index ba528657d..b958cffb4 100644 --- a/packages/plugins/@tachybase/plugin-oidc/src/locale/zh-CN.json +++ b/packages/plugins/@tachybase/plugin-oidc/src/locale/zh-CN.json @@ -15,8 +15,8 @@ "Advanced configuration": "高级配置", "Usage": "使用", "Redirect URL": "回调 URL", - "Check if NocoBase is running on HTTP protocol": "NocoBase 应用为HTTP协议时勾选", - "The port number of the NocoBase service if it is not 80 or 443": "NocoBase 应用端口,默认 443/80", + "Check if TachyBase is running on HTTP protocol": "TachyBase 应用为HTTP协议时勾选", + "The port number of the TachyBase service if it is not 80 or 443": "TachyBase 应用端口,默认 443/80", "Pass parameters in the authorization code grant exchange": "使用 code 交换 token 时需要传递的参数", "Method to call the user info endpoint": "访问获取用户信息的 API 的 HTTP 方法", "Where to put the access token when calling the user info endpoint": "访问获取用户信息的 API 时 access_token 的传递方式", diff --git a/packages/plugins/@tachybase/plugin-oidc/src/server/__tests__/oidc.test.ts b/packages/plugins/@tachybase/plugin-oidc/src/server/__tests__/oidc.test.ts index 74616a960..faf4f229d 100644 --- a/packages/plugins/@tachybase/plugin-oidc/src/server/__tests__/oidc.test.ts +++ b/packages/plugins/@tachybase/plugin-oidc/src/server/__tests__/oidc.test.ts @@ -82,7 +82,7 @@ describe('oidc', () => { const res = await agent .set('X-Authenticator', 'oidc-auth') - .set('Cookie', ['nocobase_oidc=token']) + .set('Cookie', ['tachybase_oidc=token']) .get('/auth:signIn?state=token%3Dtoken&name=oidc-auth'); expect(res.statusCode).toBe(401); @@ -108,7 +108,7 @@ describe('oidc', () => { const res = await agent .set('X-Authenticator', 'oidc-auth') - .set('Cookie', ['nocobase_oidc=token']) + .set('Cookie', ['tachybase_oidc=token']) .get('/auth:signIn?state=token%3Dtoken&name=oidc-auth'); expect(res.statusCode).toBe(200); expect(res.body.data.user).toBeDefined(); @@ -145,7 +145,7 @@ describe('oidc', () => { const res = await agent .set('X-Authenticator', 'oidc-auth') - .set('Cookie', ['nocobase_oidc=token']) + .set('Cookie', ['tachybase_oidc=token']) .get('/auth:signIn?state=token%3Dtoken&name=oidc-auth'); expect(res.body.data.user).toBeDefined(); @@ -183,7 +183,7 @@ describe('oidc', () => { const res = await agent .set('X-Authenticator', 'oidc-auth') - .set('Cookie', ['nocobase_oidc=token']) + .set('Cookie', ['tachybase_oidc=token']) .get('/auth:signIn?state=token%3Dtoken&name=oidc-auth'); expect(res.body.data.user).toBeDefined(); diff --git a/packages/plugins/@tachybase/plugin-oidc/src/server/oidc-auth.ts b/packages/plugins/@tachybase/plugin-oidc/src/server/oidc-auth.ts index 8d5dcd6c2..7d76310ed 100644 --- a/packages/plugins/@tachybase/plugin-oidc/src/server/oidc-auth.ts +++ b/packages/plugins/@tachybase/plugin-oidc/src/server/oidc-auth.ts @@ -75,7 +75,7 @@ export class OIDCAuth extends BaseAuth { const token = stateToken || ctx.cookies.get(cookieName); const search = new URLSearchParams(decodeURIComponent(values.state)); if (search.get('token') !== token) { - ctx.logger.error('nocobase_oidc state mismatch', { method: 'validate' }); + ctx.logger.error('tachybase_oidc state mismatch', { method: 'validate' }); return null; } const client = await this.createOIDCClient(); diff --git a/packages/plugins/@tachybase/plugin-oidc/src/swagger/index.ts b/packages/plugins/@tachybase/plugin-oidc/src/swagger/index.ts index 163cf4db9..9d5863957 100644 --- a/packages/plugins/@tachybase/plugin-oidc/src/swagger/index.ts +++ b/packages/plugins/@tachybase/plugin-oidc/src/swagger/index.ts @@ -55,7 +55,7 @@ const user = { export default { info: { - title: 'NocoBase API - OIDC plugin', + title: 'TachyBase API - OIDC plugin', }, paths: { '/oidc:getAuthUrl': { @@ -104,7 +104,7 @@ export default { required: true, }, { - name: 'nocobase_oidc', + name: 'tachybase_oidc', description: 'state校验值', in: 'cookie', schema: { diff --git a/packages/plugins/@tachybase/plugin-saml/README.zh-CN.md b/packages/plugins/@tachybase/plugin-saml/README.zh-CN.md index 9994cde94..e88111d80 100644 --- a/packages/plugins/@tachybase/plugin-saml/README.zh-CN.md +++ b/packages/plugins/@tachybase/plugin-saml/README.zh-CN.md @@ -21,7 +21,7 @@ -### 在Nocobase上新增认证器 +### 在Tachybase上新增认证器 插件设置 - 认证 - 新增 - SAML @@ -39,7 +39,7 @@ 回到Google控制台,在**服务提供商详细信息**页面,输入刚才复制的ACS网址和实体ID,并勾选**已签署响应**。 -在**属性映射**位置,添加映射,映射对应属性,Nocobase可供映射的字段有: +在**属性映射**位置,添加映射,映射对应属性,Tachybase可供映射的字段有: - email(必填) - phone (仅对scope支持phone的平台生效,如阿里云) diff --git a/packages/plugins/@tachybase/plugin-saml/package.json b/packages/plugins/@tachybase/plugin-saml/package.json index ecc8c4ea7..74763d075 100644 --- a/packages/plugins/@tachybase/plugin-saml/package.json +++ b/packages/plugins/@tachybase/plugin-saml/package.json @@ -6,7 +6,6 @@ "keywords": [ "Authentication" ], - "homepage": "https://docs.nocobase.com/handbook/auth-saml", "license": "Apache-2.0", "main": "./dist/server/index.js", "devDependencies": { @@ -29,7 +28,5 @@ "@tachybase/test": "workspace:*" }, "description.zh-CN": "通过 SAML 2.0 协议认证身份。", - "displayName.zh-CN": "认证:SAML 2.0", - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", - "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/auth-saml" + "displayName.zh-CN": "认证:SAML 2.0" } diff --git a/packages/plugins/@tachybase/plugin-saml/src/server/__tests__/saml.test.ts b/packages/plugins/@tachybase/plugin-saml/src/server/__tests__/saml.test.ts index 59dd05e1c..7de2cb945 100644 --- a/packages/plugins/@tachybase/plugin-saml/src/server/__tests__/saml.test.ts +++ b/packages/plugins/@tachybase/plugin-saml/src/server/__tests__/saml.test.ts @@ -66,7 +66,7 @@ describe('saml', () => { nameID: 'test@tachybase.com', email: 'test@tachybase.com', firstName: 'Test', - lastName: 'Nocobase', + lastName: 'Tachybase', issuer: 'issuer', nameIDFormat: 'Email', }, @@ -94,7 +94,7 @@ describe('saml', () => { nameID: 'test@tachybase.com', email: 'test@tachybase.com', firstName: 'Test', - lastName: 'Nocobase', + lastName: 'Tachybase', issuer: 'issuer', nameIDFormat: 'Email', }, @@ -107,7 +107,7 @@ describe('saml', () => { expect(res.statusCode).toBe(200); expect(res.body.data.user).toBeDefined(); - expect(res.body.data.user.nickname).toBe('Test Nocobase'); + expect(res.body.data.user.nickname).toBe('Test Tachybase'); }); it('should sign in via email', async () => { @@ -128,7 +128,7 @@ describe('saml', () => { nameID: 'old@tachybase.com', email: 'old@tachybase.com', firstName: 'Old', - lastName: 'Nocobase', + lastName: 'Tachybase', issuer: 'issuer', nameIDFormat: 'Email', }, @@ -176,7 +176,7 @@ describe('saml', () => { nameID: 'username', email: 'old@tachybase.com', firstName: 'Old', - lastName: 'Nocobase', + lastName: 'Tachybase', issuer: 'issuer', nameIDFormat: '', }, diff --git a/packages/plugins/@tachybase/plugin-saml/src/swagger/index.ts b/packages/plugins/@tachybase/plugin-saml/src/swagger/index.ts index 8e24e44e3..e595423df 100644 --- a/packages/plugins/@tachybase/plugin-saml/src/swagger/index.ts +++ b/packages/plugins/@tachybase/plugin-saml/src/swagger/index.ts @@ -55,7 +55,7 @@ const user = { export default { info: { - title: 'NocoBase API - SAML plugin', + title: 'TachyBase API - SAML plugin', }, paths: { '/saml:getAuthUrl': { diff --git a/packages/plugins/@tachybase/plugin-sample-hello/.npmignore b/packages/plugins/@tachybase/plugin-sample-hello/.npmignore deleted file mode 100644 index c593fe9df..000000000 --- a/packages/plugins/@tachybase/plugin-sample-hello/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -/node_modules -/src \ No newline at end of file diff --git a/packages/plugins/@tachybase/plugin-sample-hello/README.md b/packages/plugins/@tachybase/plugin-sample-hello/README.md deleted file mode 100644 index 971ce5794..000000000 --- a/packages/plugins/@tachybase/plugin-sample-hello/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# Hello sample - -## Register - -```ts -yarn pm add sample-hello -``` - -## Activate - -```bash -yarn pm enable sample-hello -``` - -## Launch the app - -```bash -# for development -yarn dev - -# for production -yarn build -yarn start -``` - -## Demo - -[gif] diff --git a/packages/plugins/@tachybase/plugin-sample-hello/client.d.ts b/packages/plugins/@tachybase/plugin-sample-hello/client.d.ts deleted file mode 100644 index 6c459cbac..000000000 --- a/packages/plugins/@tachybase/plugin-sample-hello/client.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './dist/client'; -export { default } from './dist/client'; diff --git a/packages/plugins/@tachybase/plugin-sample-hello/client.js b/packages/plugins/@tachybase/plugin-sample-hello/client.js deleted file mode 100644 index b6e3be70e..000000000 --- a/packages/plugins/@tachybase/plugin-sample-hello/client.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./dist/client/index.js'); diff --git a/packages/plugins/@tachybase/plugin-sample-hello/package.json b/packages/plugins/@tachybase/plugin-sample-hello/package.json deleted file mode 100644 index 8a93d05b9..000000000 --- a/packages/plugins/@tachybase/plugin-sample-hello/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "@tachybase/plugin-sample-hello", - "displayName": "Hello", - "version": "0.21.34", - "description": "A simple NocoBase plugin example", - "main": "./dist/server/index.js", - "devDependencies": { - "@ant-design/icons": "~5.3.6", - "@tachybase/schema": "workspace:*", - "antd": "5.16.1", - "react": "^18.2.0", - "react-i18next": "^11.15.1" - }, - "peerDependencies": { - "@tachybase/client": "workspace:*", - "@tachybase/server": "workspace:*", - "@tachybase/test": "workspace:*" - }, - "description.zh-CN": "一个简单的 NocoBase 插件", - "displayName.zh-CN": "Hello", - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" -} diff --git a/packages/plugins/@tachybase/plugin-sample-hello/server.d.ts b/packages/plugins/@tachybase/plugin-sample-hello/server.d.ts deleted file mode 100644 index c41081ddc..000000000 --- a/packages/plugins/@tachybase/plugin-sample-hello/server.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './dist/server'; -export { default } from './dist/server'; diff --git a/packages/plugins/@tachybase/plugin-sample-hello/server.js b/packages/plugins/@tachybase/plugin-sample-hello/server.js deleted file mode 100644 index 972842039..000000000 --- a/packages/plugins/@tachybase/plugin-sample-hello/server.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./dist/server/index.js'); diff --git a/packages/plugins/@tachybase/plugin-sample-hello/src/client/index.tsx b/packages/plugins/@tachybase/plugin-sample-hello/src/client/index.tsx deleted file mode 100644 index 32d404eb7..000000000 --- a/packages/plugins/@tachybase/plugin-sample-hello/src/client/index.tsx +++ /dev/null @@ -1,68 +0,0 @@ -import React from 'react'; -import { Plugin, SchemaInitializerItem, SchemaSettings, useSchemaInitializer } from '@tachybase/client'; - -import { TableOutlined } from '@ant-design/icons'; -import { Card } from 'antd'; -import { useTranslation } from 'react-i18next'; - -export const HelloBlockInitializer = (props) => { - const { insert } = useSchemaInitializer(); - const { t } = useTranslation(); - return ( - } - onClick={() => { - insert({ - type: 'void', - 'x-component': 'CardItem', - 'x-settings': 'HelloSettings', - properties: { - hello: { - type: 'void', - 'x-component': 'div', - 'x-content': 'Hello World', - }, - }, - }); - }} - title={t('Hello block')} - /> - ); -}; - -const HelloPluginSettingPage = () => { - return ( - -
Hello plugin setting page
-
- ); -}; - -const helloSettings = new SchemaSettings({ - name: 'HelloSettings', - items: [ - { - name: 'remove', - type: 'remove', - }, - ], -}); - -class HelloPlugin extends Plugin { - async load() { - this.app.schemaInitializerManager.addItem('page:addBlock', 'otherBlocks.hello', { - title: '{{t("Hello block")}}', - Component: HelloBlockInitializer, - }); - this.app.pluginSettingsManager.add('sample-hello', { - title: 'Hello', - icon: 'ApiOutlined', - Component: HelloPluginSettingPage, - sort: 100, - }); - this.schemaSettingsManager.add(helloSettings); - } -} - -export default HelloPlugin; diff --git a/packages/plugins/@tachybase/plugin-sample-hello/src/index.ts b/packages/plugins/@tachybase/plugin-sample-hello/src/index.ts deleted file mode 100644 index 7e74612df..000000000 --- a/packages/plugins/@tachybase/plugin-sample-hello/src/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './server'; -export { default } from './server'; diff --git a/packages/plugins/@tachybase/plugin-sample-hello/src/server/actions/.gitkeep b/packages/plugins/@tachybase/plugin-sample-hello/src/server/actions/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/plugins/@tachybase/plugin-sample-hello/src/server/collections/.gitkeep b/packages/plugins/@tachybase/plugin-sample-hello/src/server/collections/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/plugins/@tachybase/plugin-sample-hello/src/server/index.ts b/packages/plugins/@tachybase/plugin-sample-hello/src/server/index.ts deleted file mode 100644 index c2c5db5f8..000000000 --- a/packages/plugins/@tachybase/plugin-sample-hello/src/server/index.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { InstallOptions, Plugin } from '@tachybase/server'; - -export class HelloPlugin extends Plugin { - beforeLoad() { - // TODO - } - - async load() { - // TODO - // Visit: http://localhost:13000/api/testHello:getInfo - this.app.resource({ - name: 'testHello', - actions: { - async getInfo(ctx, next) { - ctx.body = `Hello hello!`; - next(); - }, - }, - }); - this.app.acl.allow('testHello', 'getInfo'); - } - - async disable() { - // this.app.resourcer.removeResource('testHello'); - } - - async install(options: InstallOptions) { - // TODO - } -} - -export default HelloPlugin; diff --git a/packages/plugins/@tachybase/plugin-sample-hello/src/server/models/.gitkeep b/packages/plugins/@tachybase/plugin-sample-hello/src/server/models/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/plugins/@tachybase/plugin-sample-hello/src/server/repositories/.gitkeep b/packages/plugins/@tachybase/plugin-sample-hello/src/server/repositories/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/plugins/@tachybase/plugin-sequence-field/package.json b/packages/plugins/@tachybase/plugin-sequence-field/package.json index ec4c86128..7ac2bd064 100644 --- a/packages/plugins/@tachybase/plugin-sequence-field/package.json +++ b/packages/plugins/@tachybase/plugin-sequence-field/package.json @@ -6,7 +6,6 @@ "keywords": [ "Collection fields" ], - "homepage": "https://docs.nocobase.com/handbook/field-sequence", "license": "Apache-2.0", "main": "./dist/server/index.js", "devDependencies": { @@ -30,7 +29,5 @@ "@tachybase/utils": "workspace:*" }, "description.zh-CN": "根据配置的规则自动生成编码,支持日期、数字、文本的组合。", - "displayName.zh-CN": "数据表字段:自动编码", - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", - "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/field-sequence" + "displayName.zh-CN": "数据表字段:自动编码" } diff --git a/packages/plugins/@tachybase/plugin-sequence-field/src/client/sequence.tsx b/packages/plugins/@tachybase/plugin-sequence-field/src/client/sequence.tsx index b969fdb0f..d711e8267 100644 --- a/packages/plugins/@tachybase/plugin-sequence-field/src/client/sequence.tsx +++ b/packages/plugins/@tachybase/plugin-sequence-field/src/client/sequence.tsx @@ -210,7 +210,7 @@ export function RuleConfigForm() {