From 19f905d34c4f845468c25b73c5074a6eeb0ef5dd Mon Sep 17 00:00:00 2001 From: YANG QIA <2013xile@gmail.com> Date: Tue, 9 Apr 2024 12:12:24 +0800 Subject: [PATCH] chore: update class names of plugins (#3981) * chore: update class names of plugins * fix: build * chore: add back sample-hello * fix: test --- .../@nocobase/plugin-acl/src/server/server.ts | 4 ++-- .../@nocobase/plugin-audit-logs/src/client/index.ts | 4 ++-- .../@nocobase/plugin-audit-logs/src/server/index.ts | 2 +- .../@nocobase/plugin-cas/src/client/index.tsx | 4 ++-- .../plugin-china-region/src/client/index.tsx | 4 ++-- .../plugin-china-region/src/server/index.ts | 4 ++-- .../@nocobase/plugin-client/src/client/index.ts | 4 ++-- .../@nocobase/plugin-client/src/server/server.ts | 4 ++-- .../plugin-collection-manager/src/client/index.ts | 4 ++-- .../plugin-collection-manager/src/server/server.ts | 4 ++-- .../plugin-custom-request/src/client/index.tsx | 4 ++-- .../plugin-custom-request/src/server/plugin.ts | 4 ++-- .../plugin-data-visualization/src/client/index.tsx | 4 ++-- .../plugin-data-visualization/src/server/plugin.ts | 4 ++-- .../plugin-error-handler/src/client/index.ts | 4 ++-- .../plugin-error-handler/src/server/index.ts | 2 +- .../plugin-error-handler/src/server/server.ts | 2 +- .../@nocobase/plugin-export/src/client/index.ts | 4 ++-- .../@nocobase/plugin-export/src/server/index.ts | 4 ++-- .../plugin-file-manager/src/client/index.tsx | 4 ++-- .../plugin-file-manager/src/server/server.ts | 2 +- .../plugin-formula-field/src/client/index.tsx | 4 ++-- .../plugin-formula-field/src/server/plugin.ts | 4 ++-- .../@nocobase/plugin-gantt/src/client/index.tsx | 4 ++-- .../src/client/index.tsx | 4 ++-- .../src/server/index.ts | 4 ++-- .../plugin-iframe-block/src/client/index.ts | 4 ++-- .../plugin-iframe-block/src/server/plugin.ts | 4 ++-- .../@nocobase/plugin-import/src/client/index.ts | 4 ++-- .../@nocobase/plugin-import/src/server/index.ts | 4 ++-- .../@nocobase/plugin-kanban/src/client/index.tsx | 4 ++-- .../src/client/index.tsx | 4 ++-- .../src/server/plugin.ts | 12 ++++++------ .../@nocobase/plugin-map/src/client/index.tsx | 4 ++-- .../@nocobase/plugin-map/src/server/plugin.ts | 4 ++-- .../plugin-mobile-client/src/client/index.tsx | 4 ++-- .../src/client/router/InterfaceRouter.tsx | 4 ++-- .../plugin-mobile-client/src/server/plugin.ts | 4 ++-- .../plugin-multi-app-manager/src/client/index.ts | 4 ++-- .../src/server/__tests__/multiple-apps.test.ts | 4 ++-- .../plugin-multi-app-manager/src/server/index.ts | 2 +- .../plugin-multi-app-manager/src/server/server.ts | 4 ++-- .../src/client/index.tsx | 4 ++-- .../plugin-notifications/src/client/index.ts | 4 ++-- .../plugin-notifications/src/server/server.ts | 2 +- .../@nocobase/plugin-oidc/src/client/index.tsx | 4 ++-- .../@nocobase/plugin-oidc/src/server/plugin.ts | 4 ++-- .../@nocobase/plugin-saml/src/client/index.tsx | 4 ++-- .../@nocobase/plugin-saml/src/server/plugin.ts | 4 ++-- .../plugin-sequence-field/src/client/index.tsx | 4 ++-- .../plugin-sequence-field/src/server/Plugin.ts | 2 +- .../@nocobase/plugin-sms-auth/src/client/index.tsx | 4 ++-- .../@nocobase/plugin-sms-auth/src/server/plugin.ts | 4 ++-- .../plugin-snapshot-field/src/client/index.tsx | 4 ++-- .../plugin-snapshot-field/src/server/plugin.ts | 4 ++-- .../plugin-system-settings/src/client/index.ts | 4 ++-- .../plugin-system-settings/src/server/server.ts | 4 ++-- .../plugin-theme-editor/src/client/index.tsx | 4 ++-- .../plugin-theme-editor/src/server/plugin.ts | 4 ++-- .../plugin-ui-routes-storage/src/client/index.ts | 6 +++--- .../plugin-ui-routes-storage/src/server/server.ts | 4 ++-- .../plugin-ui-schema-storage/src/client/index.ts | 6 +++--- .../@nocobase/plugin-ui-schema-storage/src/index.ts | 4 ++-- .../plugin-ui-schema-storage/src/server/index.ts | 4 ++-- .../plugin-ui-schema-storage/src/server/server.ts | 4 ++-- .../plugin-verification/src/client/index.tsx | 4 ++-- .../plugin-verification/src/server/Plugin.ts | 2 +- 67 files changed, 132 insertions(+), 132 deletions(-) diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/server.ts b/packages/plugins/@nocobase/plugin-acl/src/server/server.ts index ab72c5613..75a653671 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/server.ts @@ -35,7 +35,7 @@ export class GrantHelper { constructor() {} } -export class PluginACL extends Plugin { +export class PluginACLServer extends Plugin { // association field actions config associationFieldsActions: AssociationFieldsActions = {}; @@ -715,4 +715,4 @@ export class PluginACL extends Plugin { } } -export default PluginACL; +export default PluginACLServer; diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/client/index.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/client/index.ts index 3cb402f30..e271c71a1 100644 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-audit-logs/src/client/index.ts @@ -15,7 +15,7 @@ import { export * from './AuditLogsBlockInitializer'; export * from './AuditLogsProvider'; -export class AuditLogsPlugin extends Plugin { +export class PluginAuditLogsClient extends Plugin { async load() { this.app.use(AuditLogsProvider); this.app.schemaInitializerManager.add(auditLogsTableActionInitializers_deprecated); @@ -36,4 +36,4 @@ export class AuditLogsPlugin extends Plugin { } } -export default AuditLogsPlugin; +export default PluginAuditLogsClient; diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/server/index.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/server/index.ts index 7093d6227..6d971ae1b 100644 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/server/index.ts +++ b/packages/plugins/@nocobase/plugin-audit-logs/src/server/index.ts @@ -2,7 +2,7 @@ import { Plugin } from '@nocobase/server'; import path from 'path'; import { afterCreate, afterDestroy, afterUpdate } from './hooks'; -export default class PluginActionLogs extends Plugin { +export default class PluginAuditLogsServer extends Plugin { async beforeLoad() { this.db.on('afterCreate', afterCreate); this.db.on('afterUpdate', afterUpdate); diff --git a/packages/plugins/@nocobase/plugin-cas/src/client/index.tsx b/packages/plugins/@nocobase/plugin-cas/src/client/index.tsx index bf5cb1e8e..b58778116 100644 --- a/packages/plugins/@nocobase/plugin-cas/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-cas/src/client/index.tsx @@ -4,7 +4,7 @@ import { Options } from './Options'; import { authType } from '../constants'; import AuthPlugin from '@nocobase/plugin-auth/client'; -export class SamlPlugin extends Plugin { +export class PluginCASClient extends Plugin { async load() { const auth = this.app.pm.get(AuthPlugin); auth.registerType(authType, { @@ -16,4 +16,4 @@ export class SamlPlugin extends Plugin { } } -export default SamlPlugin; +export default PluginCASClient; diff --git a/packages/plugins/@nocobase/plugin-china-region/src/client/index.tsx b/packages/plugins/@nocobase/plugin-china-region/src/client/index.tsx index dfd369179..b51130321 100644 --- a/packages/plugins/@nocobase/plugin-china-region/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-china-region/src/client/index.tsx @@ -1,7 +1,7 @@ import { Plugin } from '@nocobase/client'; import { useChinaRegionDataSource, useChinaRegionLoadData } from './ChinaRegionProvider'; -export class ChinaRegionPlugin extends Plugin { +export class PluginChinaRegionClient extends Plugin { async load() { this.app.addScopes({ useChinaRegionDataSource, @@ -10,4 +10,4 @@ export class ChinaRegionPlugin extends Plugin { } } -export default ChinaRegionPlugin; +export default PluginChinaRegionClient; diff --git a/packages/plugins/@nocobase/plugin-china-region/src/server/index.ts b/packages/plugins/@nocobase/plugin-china-region/src/server/index.ts index 49cb059d7..7afbf2ef1 100644 --- a/packages/plugins/@nocobase/plugin-china-region/src/server/index.ts +++ b/packages/plugins/@nocobase/plugin-china-region/src/server/index.ts @@ -10,7 +10,7 @@ function getChinaDivisionData(key: string) { } } -export class PluginChinaRegion extends Plugin { +export class PluginChinaRegionServer extends Plugin { async install() { await this.importData(); } @@ -86,4 +86,4 @@ export class PluginChinaRegion extends Plugin { } } -export default PluginChinaRegion; +export default PluginChinaRegionServer; diff --git a/packages/plugins/@nocobase/plugin-client/src/client/index.ts b/packages/plugins/@nocobase/plugin-client/src/client/index.ts index 110db2de1..2ccffaa32 100644 --- a/packages/plugins/@nocobase/plugin-client/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-client/src/client/index.ts @@ -1,7 +1,7 @@ import { Plugin } from '@nocobase/client'; -class ClientPlugin extends Plugin { +class PluginClient extends Plugin { async load() {} } -export default ClientPlugin; +export default PluginClient; diff --git a/packages/plugins/@nocobase/plugin-client/src/server/server.ts b/packages/plugins/@nocobase/plugin-client/src/server/server.ts index e32c07126..56faddc19 100644 --- a/packages/plugins/@nocobase/plugin-client/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-client/src/server/server.ts @@ -19,7 +19,7 @@ async function getLang(ctx) { return lang; } -export class ClientPlugin extends Plugin { +export class PluginClientServer extends Plugin { async beforeLoad() {} async install() { @@ -106,4 +106,4 @@ export class ClientPlugin extends Plugin { } } -export default ClientPlugin; +export default PluginClientServer; diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/client/index.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/client/index.ts index 3913f2beb..6503ef854 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/client/index.ts @@ -1,7 +1,7 @@ import { Plugin } from '@nocobase/client'; -class CollectionManagerPlugin extends Plugin { +class PluginCollectionManagerClient extends Plugin { async load() {} } -export default CollectionManagerPlugin; +export default PluginCollectionManagerClient; diff --git a/packages/plugins/@nocobase/plugin-collection-manager/src/server/server.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/server.ts index 0136f7f61..08b791346 100644 --- a/packages/plugins/@nocobase/plugin-collection-manager/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/server.ts @@ -20,7 +20,7 @@ import collectionActions from './resourcers/collections'; import sqlResourcer from './resourcers/sql'; import viewResourcer from './resourcers/views'; -export class CollectionManagerPlugin extends Plugin { +export class PluginCollectionManagerServer extends Plugin { public schema: string; private loadFilter: Filter = {}; @@ -383,4 +383,4 @@ export class CollectionManagerPlugin extends Plugin { } } -export default CollectionManagerPlugin; +export default PluginCollectionManagerServer; diff --git a/packages/plugins/@nocobase/plugin-custom-request/src/client/index.tsx b/packages/plugins/@nocobase/plugin-custom-request/src/client/index.tsx index c1c9817f8..7adcd775e 100644 --- a/packages/plugins/@nocobase/plugin-custom-request/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-custom-request/src/client/index.tsx @@ -19,7 +19,7 @@ const CustomRequestProvider: React.FC = (props) => { ); }; -export class CustomRequestPlugin extends Plugin { +export class PluginCustomRequestClient extends Plugin { async load() { this.app.use(CustomRequestProvider); this.app.schemaSettingsManager.add(customizeCustomRequestActionSettings); @@ -29,4 +29,4 @@ export class CustomRequestPlugin extends Plugin { } } -export default CustomRequestPlugin; +export default PluginCustomRequestClient; diff --git a/packages/plugins/@nocobase/plugin-custom-request/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-custom-request/src/server/plugin.ts index e73662c7b..c6c037672 100644 --- a/packages/plugins/@nocobase/plugin-custom-request/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-custom-request/src/server/plugin.ts @@ -4,7 +4,7 @@ import { resolve } from 'path'; import { listByCurrentRole } from './actions/listByCurrentRole'; import { send } from './actions/send'; -export class CustomRequestPlugin extends Plugin { +export class PluginCustomRequestServer extends Plugin { logger: Logger; afterAdd() {} @@ -51,4 +51,4 @@ export class CustomRequestPlugin extends Plugin { async remove() {} } -export default CustomRequestPlugin; +export default PluginCustomRequestServer; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/client/index.tsx b/packages/plugins/@nocobase/plugin-data-visualization/src/client/index.tsx index b311511f5..3d83086d5 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/client/index.tsx @@ -17,7 +17,7 @@ import { } from './filter'; import { lang } from './locale'; -class DataVisualizationPlugin extends Plugin { +class PluginDataVisualiztionClient extends Plugin { public charts: ChartGroup = new ChartGroup(); async load() { @@ -44,7 +44,7 @@ class DataVisualizationPlugin extends Plugin { } } -export default DataVisualizationPlugin; +export default PluginDataVisualiztionClient; export { Chart } from './chart/chart'; export type { ChartProps, ChartType, RenderProps } from './chart/chart'; export { ChartConfigContext } from './configure'; diff --git a/packages/plugins/@nocobase/plugin-data-visualization/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-data-visualization/src/server/plugin.ts index 4c4bd08b4..f981c89eb 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-data-visualization/src/server/plugin.ts @@ -3,7 +3,7 @@ import { InstallOptions, Plugin } from '@nocobase/server'; import { query } from './actions/query'; import { resolve } from 'path'; -export class DataVisualizationPlugin extends Plugin { +export class PluginDataVisualizationServer extends Plugin { cache: Cache; afterAdd() {} @@ -44,4 +44,4 @@ export class DataVisualizationPlugin extends Plugin { async remove() {} } -export default DataVisualizationPlugin; +export default PluginDataVisualizationServer; diff --git a/packages/plugins/@nocobase/plugin-error-handler/src/client/index.ts b/packages/plugins/@nocobase/plugin-error-handler/src/client/index.ts index 057d6ad21..799b36e4b 100644 --- a/packages/plugins/@nocobase/plugin-error-handler/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-error-handler/src/client/index.ts @@ -1,7 +1,7 @@ import { Plugin } from '@nocobase/client'; -class ErrorHandlerPlugin extends Plugin { +class PluginErrorHandlerClient extends Plugin { async load() {} } -export default ErrorHandlerPlugin; +export default PluginErrorHandlerClient; diff --git a/packages/plugins/@nocobase/plugin-error-handler/src/server/index.ts b/packages/plugins/@nocobase/plugin-error-handler/src/server/index.ts index 949a8a31b..fbb76acde 100644 --- a/packages/plugins/@nocobase/plugin-error-handler/src/server/index.ts +++ b/packages/plugins/@nocobase/plugin-error-handler/src/server/index.ts @@ -1 +1 @@ -export { PluginErrorHandler as default } from './server'; +export { PluginErrorHandlerServer as default } from './server'; diff --git a/packages/plugins/@nocobase/plugin-error-handler/src/server/server.ts b/packages/plugins/@nocobase/plugin-error-handler/src/server/server.ts index 3e52c4f98..1bcfebd5f 100644 --- a/packages/plugins/@nocobase/plugin-error-handler/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-error-handler/src/server/server.ts @@ -6,7 +6,7 @@ import { ErrorHandler } from './error-handler'; import enUS from './locale/en_US'; import zhCN from './locale/zh_CN'; -export class PluginErrorHandler extends Plugin { +export class PluginErrorHandlerServer extends Plugin { errorHandler: ErrorHandler = new ErrorHandler(); i18nNs = 'error-handler'; diff --git a/packages/plugins/@nocobase/plugin-export/src/client/index.ts b/packages/plugins/@nocobase/plugin-export/src/client/index.ts index f503debb0..98eba2a31 100644 --- a/packages/plugins/@nocobase/plugin-export/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-export/src/client/index.ts @@ -6,7 +6,7 @@ import { Plugin } from '@nocobase/client'; import { ExportPluginProvider } from './ExportPluginProvider'; import { exportActionSchemaSettings } from './schemaSettings'; -export class ExportPlugin extends Plugin { +export class PluginExportClient extends Plugin { async load() { this.app.use(ExportPluginProvider); @@ -29,4 +29,4 @@ export class ExportPlugin extends Plugin { } } -export default ExportPlugin; +export default PluginExportClient; diff --git a/packages/plugins/@nocobase/plugin-export/src/server/index.ts b/packages/plugins/@nocobase/plugin-export/src/server/index.ts index 1e70d13ac..f20248563 100644 --- a/packages/plugins/@nocobase/plugin-export/src/server/index.ts +++ b/packages/plugins/@nocobase/plugin-export/src/server/index.ts @@ -1,7 +1,7 @@ import { InstallOptions, Plugin } from '@nocobase/server'; import { exportXlsx } from './actions'; -export class ExportPlugin extends Plugin { +export class PluginExportServer extends Plugin { beforeLoad() {} async load() { @@ -15,4 +15,4 @@ export class ExportPlugin extends Plugin { async install(options: InstallOptions) {} } -export default ExportPlugin; +export default PluginExportServer; diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/client/index.tsx b/packages/plugins/@nocobase/plugin-file-manager/src/client/index.tsx index f8bbea241..1c17a5fbf 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-file-manager/src/client/index.tsx @@ -6,7 +6,7 @@ import { storageTypes } from './schemas/storageTypes'; import { AttachmentFieldInterface } from './interfaces/attachment'; import { FileCollectionTemplate } from './templates'; -export class FileManagerPlugin extends Plugin { +export class PluginFileManagerClient extends Plugin { storageTypes = new Map(); async load() { @@ -47,4 +47,4 @@ export class FileManagerPlugin extends Plugin { } } -export default FileManagerPlugin; +export default PluginFileManagerClient; diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/server/server.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/server.ts index 8a56dd553..59eb66f45 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-file-manager/src/server/server.ts @@ -6,7 +6,7 @@ import { getStorageConfig } from './storages'; export { default as storageTypes } from './storages'; -export default class PluginFileManager extends Plugin { +export default class PluginFileManagerServer extends Plugin { storageType() { return 'local'; } diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/client/index.tsx b/packages/plugins/@nocobase/plugin-formula-field/src/client/index.tsx index 93bafce59..264528385 100644 --- a/packages/plugins/@nocobase/plugin-formula-field/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-formula-field/src/client/index.tsx @@ -4,7 +4,7 @@ import { renderExpressionDescription } from './scopes'; import { FormulaFieldInterface } from './interfaces/formula'; import { FormulaComponentFieldSettings } from './FormulaComponentFieldSettings'; -export class FormulaFieldPlugin extends Plugin { +export class PluginFormulaFieldClient extends Plugin { async load() { this.app.addComponents({ Formula, @@ -17,4 +17,4 @@ export class FormulaFieldPlugin extends Plugin { } } -export default FormulaFieldPlugin; +export default PluginFormulaFieldClient; diff --git a/packages/plugins/@nocobase/plugin-formula-field/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-formula-field/src/server/plugin.ts index 4d46c30f0..a0e75d437 100644 --- a/packages/plugins/@nocobase/plugin-formula-field/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-formula-field/src/server/plugin.ts @@ -2,7 +2,7 @@ import { InstallOptions, Plugin } from '@nocobase/server'; import { resolve } from 'path'; import { FormulaField } from './formula-field'; -export class FormulaFieldPlugin extends Plugin { +export class PluginFormulaFieldServer extends Plugin { afterAdd() {} beforeLoad() { @@ -30,4 +30,4 @@ export class FormulaFieldPlugin extends Plugin { async remove() {} } -export default FormulaFieldPlugin; +export default PluginFormulaFieldServer; diff --git a/packages/plugins/@nocobase/plugin-gantt/src/client/index.tsx b/packages/plugins/@nocobase/plugin-gantt/src/client/index.tsx index c7673242b..a8806282b 100644 --- a/packages/plugins/@nocobase/plugin-gantt/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-gantt/src/client/index.tsx @@ -27,7 +27,7 @@ const GanttProvider = React.memo((props) => { }); GanttProvider.displayName = 'GanttProvider'; -export class GanttPlugin extends Plugin { +export class PluginGanttClient extends Plugin { async load() { this.app.use(GanttProvider); this.app.schemaSettingsManager.add(oldGanttSettings); @@ -46,4 +46,4 @@ export class GanttPlugin extends Plugin { } } -export default GanttPlugin; +export default PluginGanttClient; diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/index.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/index.tsx index 869c5ccd6..9c709b6f3 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/index.tsx @@ -1,7 +1,7 @@ import { Plugin } from '@nocobase/client'; import { GraphCollectionPane } from './GraphCollectionShortcut'; import { NAMESPACE } from './locale'; -export class GraphCollectionPlugin extends Plugin { +export class PluginGraphCollectionPlugin extends Plugin { async load() { this.app.pluginSettingsManager.add(`data-source-manager/main.graph`, { title: `{{t("Graphical interface", { ns: "${NAMESPACE}" })}}`, @@ -13,4 +13,4 @@ export class GraphCollectionPlugin extends Plugin { } } -export default GraphCollectionPlugin; +export default PluginGraphCollectionPlugin; diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/server/index.ts b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/server/index.ts index c6b2d2649..a91f7b446 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/server/index.ts +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/server/index.ts @@ -1,11 +1,11 @@ import { Plugin } from '@nocobase/server'; import path from 'path'; -export class GraphCollectionManagerPlugin extends Plugin { +export class PluginGraphCollectionManagerServer extends Plugin { async load() { await this.importCollections(path.resolve(__dirname, 'collections')); this.app.acl.allow('graphPositions', '*'); } } -export default GraphCollectionManagerPlugin; +export default PluginGraphCollectionManagerServer; diff --git a/packages/plugins/@nocobase/plugin-iframe-block/src/client/index.ts b/packages/plugins/@nocobase/plugin-iframe-block/src/client/index.ts index a30d4869d..0f5190c80 100644 --- a/packages/plugins/@nocobase/plugin-iframe-block/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-iframe-block/src/client/index.ts @@ -2,7 +2,7 @@ import { Plugin } from '@nocobase/client'; import { IframeBlockProvider } from './IframeBlockProvider'; import { iframeBlockSchemaSettings, iframeBlockSchemaSettings_deprecated } from './schemaSettings'; -export class IframeBlockPlugin extends Plugin { +export class PluginIframeBlockClient extends Plugin { async load() { this.app.schemaSettingsManager.add(iframeBlockSchemaSettings_deprecated); this.app.schemaSettingsManager.add(iframeBlockSchemaSettings); @@ -33,4 +33,4 @@ export class IframeBlockPlugin extends Plugin { } } -export default IframeBlockPlugin; +export default PluginIframeBlockClient; diff --git a/packages/plugins/@nocobase/plugin-iframe-block/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-iframe-block/src/server/plugin.ts index 5b7e19399..ca1fc9921 100644 --- a/packages/plugins/@nocobase/plugin-iframe-block/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-iframe-block/src/server/plugin.ts @@ -2,7 +2,7 @@ import { InstallOptions, Plugin } from '@nocobase/server'; import path from 'path'; import { getHtml } from './actions'; -export class IframeBlockPlugin extends Plugin { +export class PluginIframeBlockServer extends Plugin { afterAdd() {} beforeLoad() {} @@ -30,4 +30,4 @@ export class IframeBlockPlugin extends Plugin { async remove() {} } -export default IframeBlockPlugin; +export default PluginIframeBlockServer; diff --git a/packages/plugins/@nocobase/plugin-import/src/client/index.ts b/packages/plugins/@nocobase/plugin-import/src/client/index.ts index b1922c29a..1268c0986 100644 --- a/packages/plugins/@nocobase/plugin-import/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-import/src/client/index.ts @@ -10,7 +10,7 @@ import { Plugin, useCollection_deprecated } from '@nocobase/client'; import { ImportPluginProvider } from './ImportPluginProvider'; import { importActionSchemaSettings } from './schemaSettings'; -export class ImportPlugin extends Plugin { +export class PluginImportClient extends Plugin { async load() { this.app.use(ImportPluginProvider); @@ -42,4 +42,4 @@ export class ImportPlugin extends Plugin { } } -export default ImportPlugin; +export default PluginImportClient; diff --git a/packages/plugins/@nocobase/plugin-import/src/server/index.ts b/packages/plugins/@nocobase/plugin-import/src/server/index.ts index 0f455be11..118d180e5 100644 --- a/packages/plugins/@nocobase/plugin-import/src/server/index.ts +++ b/packages/plugins/@nocobase/plugin-import/src/server/index.ts @@ -4,7 +4,7 @@ import { downloadXlsxTemplate, importXlsx } from './actions'; import { enUS, zhCN } from './locale'; import { importMiddleware } from './middleware'; -export class ImportPlugin extends Plugin { +export class PluginImportServer extends Plugin { beforeLoad() { this.app.i18n.addResources('zh-CN', namespace, zhCN); this.app.i18n.addResources('en-US', namespace, enUS); @@ -30,4 +30,4 @@ export class ImportPlugin extends Plugin { } } -export default ImportPlugin; +export default PluginImportServer; diff --git a/packages/plugins/@nocobase/plugin-kanban/src/client/index.tsx b/packages/plugins/@nocobase/plugin-kanban/src/client/index.tsx index 0482a87f5..8802f03af 100644 --- a/packages/plugins/@nocobase/plugin-kanban/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-kanban/src/client/index.tsx @@ -30,7 +30,7 @@ const KanbanPluginProvider = React.memo((props) => { }); KanbanPluginProvider.displayName = 'KanbanPluginProvider'; -class KanbanPlugin extends Plugin { +class PluginKanbanClient extends Plugin { async load() { this.app.use(KanbanPluginProvider); this.app.schemaInitializerManager.add(kanbanCardInitializers_deprecated); @@ -47,4 +47,4 @@ class KanbanPlugin extends Plugin { } } -export default KanbanPlugin; +export default PluginKanbanClient; diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/client/index.tsx b/packages/plugins/@nocobase/plugin-localization-management/src/client/index.tsx index 6ab0e4eb4..2e1fdd9a4 100644 --- a/packages/plugins/@nocobase/plugin-localization-management/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-localization-management/src/client/index.tsx @@ -2,7 +2,7 @@ import { Plugin } from '@nocobase/client'; import { Localization } from './Localization'; import { NAMESPACE } from './locale'; -export class LocalizationManagementPlugin extends Plugin { +export class PluginLocalizationClient extends Plugin { async load() { this.app.pluginSettingsManager.add(NAMESPACE, { title: `{{t("Localization", { ns: "${NAMESPACE}" })}}`, @@ -13,4 +13,4 @@ export class LocalizationManagementPlugin extends Plugin { } } -export default LocalizationManagementPlugin; +export default PluginLocalizationClient; diff --git a/packages/plugins/@nocobase/plugin-localization-management/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-localization-management/src/server/plugin.ts index e9cd28ae5..40dd9579e 100644 --- a/packages/plugins/@nocobase/plugin-localization-management/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-localization-management/src/server/plugin.ts @@ -1,5 +1,5 @@ import { Model } from '@nocobase/database'; -import { UiSchemaStoragePlugin } from '@nocobase/plugin-ui-schema-storage'; +import PluginUISchemaStorageServer from '@nocobase/plugin-ui-schema-storage'; import { InstallOptions, Plugin } from '@nocobase/server'; import deepmerge from 'deepmerge'; import { resolve } from 'path'; @@ -9,11 +9,11 @@ import Resources from './resources'; import { getTextsFromDBRecord } from './utils'; import { NAMESPACE_COLLECTIONS, NAMESPACE_MENUS } from './constans'; -export class LocalizationManagementPlugin extends Plugin { +export class PluginLocalizationServer extends Plugin { resources: Resources; - registerUISchemahook(plugin?: UiSchemaStoragePlugin) { - const uiSchemaStoragePlugin = plugin || this.app.getPlugin('ui-schema-storage'); + registerUISchemahook(plugin?: PluginUISchemaStorageServer) { + const uiSchemaStoragePlugin = plugin || this.app.getPlugin('ui-schema-storage'); if (!uiSchemaStoragePlugin) { return; } @@ -141,7 +141,7 @@ export class LocalizationManagementPlugin extends Plugin { async afterEnable() {} async afterDisable() { - const uiSchemaStoragePlugin = this.app.getPlugin('ui-schema-storage'); + const uiSchemaStoragePlugin = this.app.getPlugin('ui-schema-storage'); if (!uiSchemaStoragePlugin) { return; } @@ -151,4 +151,4 @@ export class LocalizationManagementPlugin extends Plugin { async remove() {} } -export default LocalizationManagementPlugin; +export default PluginLocalizationServer; diff --git a/packages/plugins/@nocobase/plugin-map/src/client/index.tsx b/packages/plugins/@nocobase/plugin-map/src/client/index.tsx index 583e7704c..b05969a62 100644 --- a/packages/plugins/@nocobase/plugin-map/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-map/src/client/index.tsx @@ -16,7 +16,7 @@ const MapProvider = React.memo((props) => { }); MapProvider.displayName = 'MapProvider'; -export class MapPlugin extends Plugin { +export class PluginMapClient extends Plugin { async load() { this.app.use(MapProvider); @@ -50,4 +50,4 @@ export class MapPlugin extends Plugin { } } -export default MapPlugin; +export default PluginMapClient; diff --git a/packages/plugins/@nocobase/plugin-map/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-map/src/server/plugin.ts index e067b3c6e..415ba2bbb 100644 --- a/packages/plugins/@nocobase/plugin-map/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-map/src/server/plugin.ts @@ -4,7 +4,7 @@ import { getConfiguration, setConfiguration } from './actions'; import { CircleField, LineStringField, PointField, PolygonField } from './fields'; import { CircleValueParser, LineStringValueParser, PointValueParser, PolygonValueParser } from './value-parsers'; -export class MapPlugin extends Plugin { +export class PluginMapServer extends Plugin { afterAdd() {} beforeLoad() { @@ -52,4 +52,4 @@ export class MapPlugin extends Plugin { async remove() {} } -export default MapPlugin; +export default PluginMapServer; diff --git a/packages/plugins/@nocobase/plugin-mobile-client/src/client/index.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/index.tsx index 0b54b8d78..6914f94d5 100644 --- a/packages/plugins/@nocobase/plugin-mobile-client/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-mobile-client/src/client/index.tsx @@ -7,7 +7,7 @@ import { mBlockInitializers, mBlockInitializers_deprecated } from './core/schema import { AppConfiguration, InterfaceConfiguration } from './configuration'; import { NAMESPACE } from './locale'; -export class MobileClientPlugin extends Plugin { +export class PluginMobileClient extends Plugin { public mobileRouter: RouterManager; async load() { this.setMobileRouter(); @@ -69,4 +69,4 @@ export class MobileClientPlugin extends Plugin { } } -export default MobileClientPlugin; +export default PluginMobileClient; diff --git a/packages/plugins/@nocobase/plugin-mobile-client/src/client/router/InterfaceRouter.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/router/InterfaceRouter.tsx index bd4ec7bcc..1fe1af5ce 100644 --- a/packages/plugins/@nocobase/plugin-mobile-client/src/client/router/InterfaceRouter.tsx +++ b/packages/plugins/@nocobase/plugin-mobile-client/src/client/router/InterfaceRouter.tsx @@ -1,10 +1,10 @@ import { css, usePlugin } from '@nocobase/client'; import React from 'react'; -import { MobileClientPlugin } from '../index'; +import { PluginMobileClient } from '../index'; import { InterfaceProvider } from './InterfaceProvider'; export const InterfaceRouter: React.FC = React.memo(() => { - const plugin = usePlugin(MobileClientPlugin); + const plugin = usePlugin(PluginMobileClient); const MobileRouter = plugin.getMobileRouterComponent(); return ( diff --git a/packages/plugins/@nocobase/plugin-mobile-client/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/server/plugin.ts index a895263ae..91197d090 100644 --- a/packages/plugins/@nocobase/plugin-mobile-client/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-mobile-client/src/server/plugin.ts @@ -1,7 +1,7 @@ import { Plugin } from '@nocobase/server'; import { resolve } from 'path'; -export class MobileClientPlugin extends Plugin { +export class PluginMobileServer extends Plugin { afterAdd() {} async load() { @@ -50,4 +50,4 @@ export class MobileClientPlugin extends Plugin { async remove() {} } -export default MobileClientPlugin; +export default PluginMobileServer; diff --git a/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/index.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/index.ts index bf4d7694c..35f13d809 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-multi-app-manager/src/client/index.ts @@ -3,7 +3,7 @@ import { MultiAppManagerProvider } from './MultiAppManagerProvider'; import { AppManager } from './AppManager'; import { NAMESPACE } from '../locale'; -export class MultiAppManagerPlugin extends Plugin { +export class PluginMultiAppManagerClient extends Plugin { async load() { this.app.use(MultiAppManagerProvider); @@ -16,5 +16,5 @@ export class MultiAppManagerPlugin extends Plugin { } } -export default MultiAppManagerPlugin; +export default PluginMultiAppManagerClient; export { formSchema, tableActionColumnSchema } from './settings/schemas/applications'; diff --git a/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/__tests__/multiple-apps.test.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/__tests__/multiple-apps.test.ts index d18ef82de..2eb2ebb22 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/__tests__/multiple-apps.test.ts +++ b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/__tests__/multiple-apps.test.ts @@ -3,7 +3,7 @@ import { AppSupervisor, Gateway } from '@nocobase/server'; import { createMockServer, MockServer } from '@nocobase/test'; import { uid } from '@nocobase/utils'; import { vi } from 'vitest'; -import { PluginMultiAppManager } from '../server'; +import { PluginMultiAppManagerServer } from '../server'; const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); @@ -48,7 +48,7 @@ describe('multiple apps', () => { it('should register db creator', async () => { const fn = vi.fn(); - const appPlugin = app.getPlugin(PluginMultiAppManager); + const appPlugin = app.getPlugin(PluginMultiAppManagerServer); const defaultDbCreator = appPlugin.appDbCreator; appPlugin.setAppDbCreator(async (app) => { diff --git a/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/index.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/index.ts index 4676c4b42..25fa8016b 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/index.ts +++ b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/index.ts @@ -1,4 +1,4 @@ import { ApplicationModel, registerAppOptions } from './models/application'; -export { PluginMultiAppManager as default } from './server'; +export { PluginMultiAppManagerServer as default } from './server'; export { ApplicationModel, registerAppOptions }; diff --git a/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/server.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/server.ts index 3aa6e3299..3839f0473 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/server.ts @@ -95,7 +95,7 @@ const defaultDbCreator = async (app: Application) => { }; const defaultAppOptionsFactory = (appName: string, mainApp: Application) => { - const rawDatabaseOptions = PluginMultiAppManager.getDatabaseConfig(mainApp); + const rawDatabaseOptions = PluginMultiAppManagerServer.getDatabaseConfig(mainApp); if (rawDatabaseOptions.dialect === 'sqlite') { const mainAppStorage = rawDatabaseOptions.storage; @@ -119,7 +119,7 @@ const defaultAppOptionsFactory = (appName: string, mainApp: Application) => { }; }; -export class PluginMultiAppManager extends Plugin { +export class PluginMultiAppManagerServer extends Plugin { appDbCreator: AppDbCreator = defaultDbCreator; appOptionsFactory: AppOptionsFactory = defaultAppOptionsFactory; subAppUpgradeHandler: SubAppUpgradeHandler = defaultSubAppUpgradeHandle; diff --git a/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/client/index.tsx b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/client/index.tsx index 2763bf264..736bb7aeb 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/client/index.tsx @@ -1,10 +1,10 @@ import { Plugin } from '@nocobase/client'; import { MultiAppShareCollectionProvider } from './MultiAppShareCollectionProvider'; -export class MultiAppShareCollectionPlugin extends Plugin { +export class PluginMultiAppShareCollectionClient extends Plugin { async load() { this.app.use(MultiAppShareCollectionProvider); } } -export default MultiAppShareCollectionPlugin; +export default PluginMultiAppShareCollectionClient; diff --git a/packages/plugins/@nocobase/plugin-notifications/src/client/index.ts b/packages/plugins/@nocobase/plugin-notifications/src/client/index.ts index ea8c0651c..7d9f465ed 100644 --- a/packages/plugins/@nocobase/plugin-notifications/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-notifications/src/client/index.ts @@ -1,7 +1,7 @@ import { Plugin } from '@nocobase/client'; -class NotificationPlugin extends Plugin { +class PluginNotificationClient extends Plugin { async load() {} } -export default NotificationPlugin; +export default PluginNotificationClient; diff --git a/packages/plugins/@nocobase/plugin-notifications/src/server/server.ts b/packages/plugins/@nocobase/plugin-notifications/src/server/server.ts index 03a5943c4..c34f57b15 100644 --- a/packages/plugins/@nocobase/plugin-notifications/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-notifications/src/server/server.ts @@ -1,7 +1,7 @@ import { Plugin } from '@nocobase/server'; import path from 'path'; -export default class PluginNotifications extends Plugin { +export default class PluginNotificationsServer extends Plugin { async load() { await this.app.db.import({ directory: path.resolve(__dirname, 'collections'), diff --git a/packages/plugins/@nocobase/plugin-oidc/src/client/index.tsx b/packages/plugins/@nocobase/plugin-oidc/src/client/index.tsx index ec108556b..6f3f069fe 100644 --- a/packages/plugins/@nocobase/plugin-oidc/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-oidc/src/client/index.tsx @@ -4,7 +4,7 @@ import { authType } from '../constants'; import { OIDCButton } from './OIDCButton'; import { Options } from './Options'; -export class OidcPlugin extends Plugin { +export class PluginOIDCClient extends Plugin { async load() { const auth = this.app.pm.get(AuthPlugin); auth.registerType(authType, { @@ -16,4 +16,4 @@ export class OidcPlugin extends Plugin { } } -export default OidcPlugin; +export default PluginOIDCClient; diff --git a/packages/plugins/@nocobase/plugin-oidc/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-oidc/src/server/plugin.ts index 4d4dba980..3c09e38d5 100644 --- a/packages/plugins/@nocobase/plugin-oidc/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-oidc/src/server/plugin.ts @@ -5,7 +5,7 @@ import { authType } from '../constants'; import { OIDCAuth } from './oidc-auth'; import { resolve } from 'path'; -export class OidcPlugin extends Plugin { +export class PluginOIDCServer extends Plugin { afterAdd() {} beforeLoad() {} @@ -60,4 +60,4 @@ export class OidcPlugin extends Plugin { async remove() {} } -export default OidcPlugin; +export default PluginOIDCServer; diff --git a/packages/plugins/@nocobase/plugin-saml/src/client/index.tsx b/packages/plugins/@nocobase/plugin-saml/src/client/index.tsx index 7aed83a9b..71f4c07ef 100644 --- a/packages/plugins/@nocobase/plugin-saml/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-saml/src/client/index.tsx @@ -4,7 +4,7 @@ import { authType } from '../constants'; import { SAMLButton } from './SAMLButton'; import { Options } from './Options'; -export class SamlPlugin extends Plugin { +export class PluginSAMLClient extends Plugin { async load() { const auth = this.app.pm.get(AuthPlugin); auth.registerType(authType, { @@ -16,4 +16,4 @@ export class SamlPlugin extends Plugin { } } -export default SamlPlugin; +export default PluginSAMLClient; diff --git a/packages/plugins/@nocobase/plugin-saml/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-saml/src/server/plugin.ts index c33a18e55..c8ebc71db 100644 --- a/packages/plugins/@nocobase/plugin-saml/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-saml/src/server/plugin.ts @@ -6,7 +6,7 @@ import { SAMLAuth } from './saml-auth'; import { authType } from '../constants'; import { resolve } from 'path'; -export class SAMLPlugin extends Plugin { +export class PluginSAMLServer extends Plugin { afterAdd() {} beforeLoad() {} @@ -47,4 +47,4 @@ export class SAMLPlugin extends Plugin { async remove() {} } -export default SAMLPlugin; +export default PluginSAMLServer; diff --git a/packages/plugins/@nocobase/plugin-sequence-field/src/client/index.tsx b/packages/plugins/@nocobase/plugin-sequence-field/src/client/index.tsx index 511c4a872..3ea74f545 100644 --- a/packages/plugins/@nocobase/plugin-sequence-field/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-sequence-field/src/client/index.tsx @@ -2,11 +2,11 @@ import { Plugin } from '@nocobase/client'; import { SequenceFieldProvider } from './SequenceFieldProvider'; import { SequenceFieldInterface } from './sequence'; -export class SequenceFieldPlugin extends Plugin { +export class PluginSequenceFieldClient extends Plugin { async load() { this.app.use(SequenceFieldProvider); this.app.dataSourceManager.addFieldInterfaces([SequenceFieldInterface]); } } -export default SequenceFieldPlugin; +export default PluginSequenceFieldClient; diff --git a/packages/plugins/@nocobase/plugin-sequence-field/src/server/Plugin.ts b/packages/plugins/@nocobase/plugin-sequence-field/src/server/Plugin.ts index c11c29a53..fc0b36b7b 100644 --- a/packages/plugins/@nocobase/plugin-sequence-field/src/server/Plugin.ts +++ b/packages/plugins/@nocobase/plugin-sequence-field/src/server/Plugin.ts @@ -8,7 +8,7 @@ import { Pattern, SequenceField } from './fields/sequence-field'; const asyncRandomInt = promisify(randomInt); -export default class SequenceFieldPlugin extends Plugin { +export default class PluginSequenceFieldServer extends Plugin { patternTypes = new Registry(); async load() { diff --git a/packages/plugins/@nocobase/plugin-sms-auth/src/client/index.tsx b/packages/plugins/@nocobase/plugin-sms-auth/src/client/index.tsx index 351b380fb..c1602a4de 100644 --- a/packages/plugins/@nocobase/plugin-sms-auth/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-sms-auth/src/client/index.tsx @@ -4,7 +4,7 @@ import { SigninPage } from './SigninPage'; import { Options } from './Options'; import { authType } from '../constants'; -export class SmsAuthPlugin extends Plugin { +export class PluginSMSAuthClient extends Plugin { async load() { const auth = this.app.pm.get(AuthPlugin); auth.registerType(authType, { @@ -16,4 +16,4 @@ export class SmsAuthPlugin extends Plugin { } } -export default SmsAuthPlugin; +export default PluginSMSAuthClient; diff --git a/packages/plugins/@nocobase/plugin-sms-auth/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-sms-auth/src/server/plugin.ts index b58045dca..536821db8 100644 --- a/packages/plugins/@nocobase/plugin-sms-auth/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-sms-auth/src/server/plugin.ts @@ -4,7 +4,7 @@ import { resolve } from 'path'; import { authType } from '../constants'; import { SMSAuth } from './sms-auth'; -export class SmsAuthPlugin extends Plugin { +export class PluginSMSAuthServer extends Plugin { afterAdd() {} async load() { @@ -49,4 +49,4 @@ export class SmsAuthPlugin extends Plugin { async remove() {} } -export default SmsAuthPlugin; +export default PluginSMSAuthServer; diff --git a/packages/plugins/@nocobase/plugin-snapshot-field/src/client/index.tsx b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/index.tsx index 147849327..60aea3d8d 100644 --- a/packages/plugins/@nocobase/plugin-snapshot-field/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-snapshot-field/src/client/index.tsx @@ -6,7 +6,7 @@ import { } from './SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializers'; import { SnapshotFieldInterface } from './interface'; -export class SnapshotFieldPlugin extends Plugin { +export class PluginSnapshotFieldClient extends Plugin { async load() { this.app.use(SnapshotFieldProvider); this.app.schemaInitializerManager.add(snapshotBlockInitializers_deprecated); @@ -15,4 +15,4 @@ export class SnapshotFieldPlugin extends Plugin { } } -export default SnapshotFieldPlugin; +export default PluginSnapshotFieldClient; diff --git a/packages/plugins/@nocobase/plugin-snapshot-field/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-snapshot-field/src/server/plugin.ts index de6ce6e10..5a2a1c79f 100644 --- a/packages/plugins/@nocobase/plugin-snapshot-field/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-snapshot-field/src/server/plugin.ts @@ -3,7 +3,7 @@ import { InstallOptions, Plugin } from '@nocobase/server'; import { resolve } from 'path'; import { SnapshotField } from './fields/snapshot-field'; -export class SnapshotFieldPlugin extends Plugin { +export class PluginSnapshotFieldServer extends Plugin { afterAdd() {} async beforeLoad() { @@ -130,4 +130,4 @@ export class SnapshotFieldPlugin extends Plugin { async remove() {} } -export default SnapshotFieldPlugin; +export default PluginSnapshotFieldServer; diff --git a/packages/plugins/@nocobase/plugin-system-settings/src/client/index.ts b/packages/plugins/@nocobase/plugin-system-settings/src/client/index.ts index 64cc5c927..5e286846c 100644 --- a/packages/plugins/@nocobase/plugin-system-settings/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-system-settings/src/client/index.ts @@ -1,7 +1,7 @@ import { Plugin } from '@nocobase/client'; -class SystemSettingPlugin extends Plugin { +class PluginSystemSettingClient extends Plugin { async load() {} } -export default SystemSettingPlugin; +export default PluginSystemSettingClient; diff --git a/packages/plugins/@nocobase/plugin-system-settings/src/server/server.ts b/packages/plugins/@nocobase/plugin-system-settings/src/server/server.ts index 428cce345..9e3ebdc57 100644 --- a/packages/plugins/@nocobase/plugin-system-settings/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-system-settings/src/server/server.ts @@ -1,7 +1,7 @@ import { InstallOptions, Plugin } from '@nocobase/server'; import { resolve } from 'path'; -export class SystemSettingsPlugin extends Plugin { +export class PluginSystemSettingsServer extends Plugin { getInitAppLang(options) { return options?.cliArgs?.[0]?.opts?.lang || process.env.INIT_APP_LANG || 'en-US'; } @@ -48,4 +48,4 @@ export class SystemSettingsPlugin extends Plugin { } } -export default SystemSettingsPlugin; +export default PluginSystemSettingsServer; diff --git a/packages/plugins/@nocobase/plugin-theme-editor/src/client/index.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/index.tsx index c7bb746fa..b196a2574 100644 --- a/packages/plugins/@nocobase/plugin-theme-editor/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/client/index.tsx @@ -75,7 +75,7 @@ const CustomThemeProvider = React.memo((props) => { }); CustomThemeProvider.displayName = 'CustomThemeProvider'; -export class ThemeEditorPlugin extends Plugin { +export class PluginThemeEditorClient extends Plugin { async load() { this.app.use(CustomThemeProvider); this.app.pluginSettingsManager.add(NAMESPACE, { @@ -87,4 +87,4 @@ export class ThemeEditorPlugin extends Plugin { } } -export default ThemeEditorPlugin; +export default PluginThemeEditorClient; diff --git a/packages/plugins/@nocobase/plugin-theme-editor/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/server/plugin.ts index 8203f3b48..e21eb823b 100644 --- a/packages/plugins/@nocobase/plugin-theme-editor/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/server/plugin.ts @@ -2,7 +2,7 @@ import { InstallOptions, Plugin } from '@nocobase/server'; import path, { resolve } from 'path'; import { compact, compactDark, dark, defaultTheme } from './builtinThemes'; -export class ThemeEditorPlugin extends Plugin { +export class PluginThemeEditorServer extends Plugin { theme: any; afterAdd() {} @@ -48,4 +48,4 @@ export class ThemeEditorPlugin extends Plugin { async remove() {} } -export default ThemeEditorPlugin; +export default PluginThemeEditorServer; diff --git a/packages/plugins/@nocobase/plugin-ui-routes-storage/src/client/index.ts b/packages/plugins/@nocobase/plugin-ui-routes-storage/src/client/index.ts index 6cc67d5b5..374e44956 100644 --- a/packages/plugins/@nocobase/plugin-ui-routes-storage/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-ui-routes-storage/src/client/index.ts @@ -1,7 +1,7 @@ import { Plugin } from '@nocobase/client'; -class UiRoutesStoragePlugin extends Plugin { - async load() { } +class PluginUIRoutesStorageClient extends Plugin { + async load() {} } -export default UiRoutesStoragePlugin; +export default PluginUIRoutesStorageClient; diff --git a/packages/plugins/@nocobase/plugin-ui-routes-storage/src/server/server.ts b/packages/plugins/@nocobase/plugin-ui-routes-storage/src/server/server.ts index 554570286..89b7c2817 100644 --- a/packages/plugins/@nocobase/plugin-ui-routes-storage/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-ui-routes-storage/src/server/server.ts @@ -3,7 +3,7 @@ import { Plugin } from '@nocobase/server'; import { resolve } from 'path'; import { getAccessible } from './actions/getAccessible'; -export class UiRoutesStoragePlugin extends Plugin { +export class PluginUIRoutesStorageServer extends Plugin { async install() { const repository = this.app.db.getRepository('uiRoutes'); const routes = [ @@ -93,4 +93,4 @@ export class UiRoutesStoragePlugin extends Plugin { } } -export default UiRoutesStoragePlugin; +export default PluginUIRoutesStorageServer; diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/client/index.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/client/index.ts index 1104fdfc9..a4e84f60a 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/client/index.ts @@ -1,7 +1,7 @@ import { Plugin } from '@nocobase/client'; -class UiSchemaStoragePlugin extends Plugin { - async load() { } +class PluginUISchemaStorageClient extends Plugin { + async load() {} } -export default UiSchemaStoragePlugin; +export default PluginUISchemaStorageClient; diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/index.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/index.ts index ea38e0f2d..8a8327a7a 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/index.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/index.ts @@ -1,4 +1,4 @@ export * from './server'; -import { UiSchemaStoragePlugin } from './server'; +import { PluginUISchemaStorageServer } from './server'; -export default UiSchemaStoragePlugin; +export default PluginUISchemaStorageServer; diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/index.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/index.ts index 248e3b132..14323dc3f 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/index.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/index.ts @@ -1,5 +1,5 @@ -import { UiSchemaStoragePlugin } from './server'; +import { PluginUISchemaStorageServer } from './server'; export * from './repository'; export * from './server'; -export default UiSchemaStoragePlugin; +export default PluginUISchemaStorageServer; diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server.ts b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server.ts index 4f04cb968..a5fe4fe44 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/src/server/server.ts @@ -8,7 +8,7 @@ import UiSchemaRepository from './repository'; import { ServerHooks } from './server-hooks'; import { ServerHookModel } from './server-hooks/model'; -export class UiSchemaStoragePlugin extends Plugin { +export class PluginUISchemaStorageServer extends Plugin { serverHooks: ServerHooks; registerRepository() { @@ -88,4 +88,4 @@ export class UiSchemaStoragePlugin extends Plugin { } } -export default UiSchemaStoragePlugin; +export default PluginUISchemaStorageServer; diff --git a/packages/plugins/@nocobase/plugin-verification/src/client/index.tsx b/packages/plugins/@nocobase/plugin-verification/src/client/index.tsx index 87d4b8be9..66766071f 100644 --- a/packages/plugins/@nocobase/plugin-verification/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-verification/src/client/index.tsx @@ -2,7 +2,7 @@ import { Plugin } from '@nocobase/client'; import { VerificationProviders } from './VerificationProviders'; import { NAMESPACE } from './locale'; -export class VerificationPlugin extends Plugin { +export class PluginVerificationClient extends Plugin { async load() { this.app.pluginSettingsManager.add(NAMESPACE, { icon: 'CheckCircleOutlined', @@ -13,4 +13,4 @@ export class VerificationPlugin extends Plugin { } } -export default VerificationPlugin; +export default PluginVerificationClient; diff --git a/packages/plugins/@nocobase/plugin-verification/src/server/Plugin.ts b/packages/plugins/@nocobase/plugin-verification/src/server/Plugin.ts index f80b0f837..f2c2cb659 100644 --- a/packages/plugins/@nocobase/plugin-verification/src/server/Plugin.ts +++ b/packages/plugins/@nocobase/plugin-verification/src/server/Plugin.ts @@ -23,7 +23,7 @@ export interface Interceptor { validate?(ctx: Context, receiver: string): boolean | Promise; } -export default class VerificationPlugin extends Plugin { +export default class PluginVerficationServer extends Plugin { providers: Registry = new Registry(); interceptors: Registry = new Registry();