mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-12-02 12:18:15 +08:00
chore: update class names of plugins (#3981)
* chore: update class names of plugins * fix: build * chore: add back sample-hello * fix: test
This commit is contained in:
parent
b69b0caab5
commit
19f905d34c
@ -35,7 +35,7 @@ export class GrantHelper {
|
|||||||
constructor() {}
|
constructor() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class PluginACL extends Plugin {
|
export class PluginACLServer extends Plugin {
|
||||||
// association field actions config
|
// association field actions config
|
||||||
|
|
||||||
associationFieldsActions: AssociationFieldsActions = {};
|
associationFieldsActions: AssociationFieldsActions = {};
|
||||||
@ -715,4 +715,4 @@ export class PluginACL extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default PluginACL;
|
export default PluginACLServer;
|
||||||
|
@ -15,7 +15,7 @@ import {
|
|||||||
export * from './AuditLogsBlockInitializer';
|
export * from './AuditLogsBlockInitializer';
|
||||||
export * from './AuditLogsProvider';
|
export * from './AuditLogsProvider';
|
||||||
|
|
||||||
export class AuditLogsPlugin extends Plugin {
|
export class PluginAuditLogsClient extends Plugin {
|
||||||
async load() {
|
async load() {
|
||||||
this.app.use(AuditLogsProvider);
|
this.app.use(AuditLogsProvider);
|
||||||
this.app.schemaInitializerManager.add(auditLogsTableActionInitializers_deprecated);
|
this.app.schemaInitializerManager.add(auditLogsTableActionInitializers_deprecated);
|
||||||
@ -36,4 +36,4 @@ export class AuditLogsPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default AuditLogsPlugin;
|
export default PluginAuditLogsClient;
|
||||||
|
@ -2,7 +2,7 @@ import { Plugin } from '@nocobase/server';
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { afterCreate, afterDestroy, afterUpdate } from './hooks';
|
import { afterCreate, afterDestroy, afterUpdate } from './hooks';
|
||||||
|
|
||||||
export default class PluginActionLogs extends Plugin {
|
export default class PluginAuditLogsServer extends Plugin {
|
||||||
async beforeLoad() {
|
async beforeLoad() {
|
||||||
this.db.on('afterCreate', afterCreate);
|
this.db.on('afterCreate', afterCreate);
|
||||||
this.db.on('afterUpdate', afterUpdate);
|
this.db.on('afterUpdate', afterUpdate);
|
||||||
|
@ -4,7 +4,7 @@ import { Options } from './Options';
|
|||||||
import { authType } from '../constants';
|
import { authType } from '../constants';
|
||||||
import AuthPlugin from '@nocobase/plugin-auth/client';
|
import AuthPlugin from '@nocobase/plugin-auth/client';
|
||||||
|
|
||||||
export class SamlPlugin extends Plugin {
|
export class PluginCASClient extends Plugin {
|
||||||
async load() {
|
async load() {
|
||||||
const auth = this.app.pm.get(AuthPlugin);
|
const auth = this.app.pm.get(AuthPlugin);
|
||||||
auth.registerType(authType, {
|
auth.registerType(authType, {
|
||||||
@ -16,4 +16,4 @@ export class SamlPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default SamlPlugin;
|
export default PluginCASClient;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Plugin } from '@nocobase/client';
|
import { Plugin } from '@nocobase/client';
|
||||||
import { useChinaRegionDataSource, useChinaRegionLoadData } from './ChinaRegionProvider';
|
import { useChinaRegionDataSource, useChinaRegionLoadData } from './ChinaRegionProvider';
|
||||||
|
|
||||||
export class ChinaRegionPlugin extends Plugin {
|
export class PluginChinaRegionClient extends Plugin {
|
||||||
async load() {
|
async load() {
|
||||||
this.app.addScopes({
|
this.app.addScopes({
|
||||||
useChinaRegionDataSource,
|
useChinaRegionDataSource,
|
||||||
@ -10,4 +10,4 @@ export class ChinaRegionPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ChinaRegionPlugin;
|
export default PluginChinaRegionClient;
|
||||||
|
@ -10,7 +10,7 @@ function getChinaDivisionData(key: string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class PluginChinaRegion extends Plugin {
|
export class PluginChinaRegionServer extends Plugin {
|
||||||
async install() {
|
async install() {
|
||||||
await this.importData();
|
await this.importData();
|
||||||
}
|
}
|
||||||
@ -86,4 +86,4 @@ export class PluginChinaRegion extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default PluginChinaRegion;
|
export default PluginChinaRegionServer;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Plugin } from '@nocobase/client';
|
import { Plugin } from '@nocobase/client';
|
||||||
|
|
||||||
class ClientPlugin extends Plugin {
|
class PluginClient extends Plugin {
|
||||||
async load() {}
|
async load() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ClientPlugin;
|
export default PluginClient;
|
||||||
|
@ -19,7 +19,7 @@ async function getLang(ctx) {
|
|||||||
return lang;
|
return lang;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ClientPlugin extends Plugin {
|
export class PluginClientServer extends Plugin {
|
||||||
async beforeLoad() {}
|
async beforeLoad() {}
|
||||||
|
|
||||||
async install() {
|
async install() {
|
||||||
@ -106,4 +106,4 @@ export class ClientPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ClientPlugin;
|
export default PluginClientServer;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Plugin } from '@nocobase/client';
|
import { Plugin } from '@nocobase/client';
|
||||||
|
|
||||||
class CollectionManagerPlugin extends Plugin {
|
class PluginCollectionManagerClient extends Plugin {
|
||||||
async load() {}
|
async load() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default CollectionManagerPlugin;
|
export default PluginCollectionManagerClient;
|
||||||
|
@ -20,7 +20,7 @@ import collectionActions from './resourcers/collections';
|
|||||||
import sqlResourcer from './resourcers/sql';
|
import sqlResourcer from './resourcers/sql';
|
||||||
import viewResourcer from './resourcers/views';
|
import viewResourcer from './resourcers/views';
|
||||||
|
|
||||||
export class CollectionManagerPlugin extends Plugin {
|
export class PluginCollectionManagerServer extends Plugin {
|
||||||
public schema: string;
|
public schema: string;
|
||||||
|
|
||||||
private loadFilter: Filter = {};
|
private loadFilter: Filter = {};
|
||||||
@ -383,4 +383,4 @@ export class CollectionManagerPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default CollectionManagerPlugin;
|
export default PluginCollectionManagerServer;
|
||||||
|
@ -19,7 +19,7 @@ const CustomRequestProvider: React.FC = (props) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export class CustomRequestPlugin extends Plugin {
|
export class PluginCustomRequestClient extends Plugin {
|
||||||
async load() {
|
async load() {
|
||||||
this.app.use(CustomRequestProvider);
|
this.app.use(CustomRequestProvider);
|
||||||
this.app.schemaSettingsManager.add(customizeCustomRequestActionSettings);
|
this.app.schemaSettingsManager.add(customizeCustomRequestActionSettings);
|
||||||
@ -29,4 +29,4 @@ export class CustomRequestPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default CustomRequestPlugin;
|
export default PluginCustomRequestClient;
|
||||||
|
@ -4,7 +4,7 @@ import { resolve } from 'path';
|
|||||||
import { listByCurrentRole } from './actions/listByCurrentRole';
|
import { listByCurrentRole } from './actions/listByCurrentRole';
|
||||||
import { send } from './actions/send';
|
import { send } from './actions/send';
|
||||||
|
|
||||||
export class CustomRequestPlugin extends Plugin {
|
export class PluginCustomRequestServer extends Plugin {
|
||||||
logger: Logger;
|
logger: Logger;
|
||||||
|
|
||||||
afterAdd() {}
|
afterAdd() {}
|
||||||
@ -51,4 +51,4 @@ export class CustomRequestPlugin extends Plugin {
|
|||||||
async remove() {}
|
async remove() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default CustomRequestPlugin;
|
export default PluginCustomRequestServer;
|
||||||
|
@ -17,7 +17,7 @@ import {
|
|||||||
} from './filter';
|
} from './filter';
|
||||||
import { lang } from './locale';
|
import { lang } from './locale';
|
||||||
|
|
||||||
class DataVisualizationPlugin extends Plugin {
|
class PluginDataVisualiztionClient extends Plugin {
|
||||||
public charts: ChartGroup = new ChartGroup();
|
public charts: ChartGroup = new ChartGroup();
|
||||||
|
|
||||||
async load() {
|
async load() {
|
||||||
@ -44,7 +44,7 @@ class DataVisualizationPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default DataVisualizationPlugin;
|
export default PluginDataVisualiztionClient;
|
||||||
export { Chart } from './chart/chart';
|
export { Chart } from './chart/chart';
|
||||||
export type { ChartProps, ChartType, RenderProps } from './chart/chart';
|
export type { ChartProps, ChartType, RenderProps } from './chart/chart';
|
||||||
export { ChartConfigContext } from './configure';
|
export { ChartConfigContext } from './configure';
|
||||||
|
@ -3,7 +3,7 @@ import { InstallOptions, Plugin } from '@nocobase/server';
|
|||||||
import { query } from './actions/query';
|
import { query } from './actions/query';
|
||||||
import { resolve } from 'path';
|
import { resolve } from 'path';
|
||||||
|
|
||||||
export class DataVisualizationPlugin extends Plugin {
|
export class PluginDataVisualizationServer extends Plugin {
|
||||||
cache: Cache;
|
cache: Cache;
|
||||||
|
|
||||||
afterAdd() {}
|
afterAdd() {}
|
||||||
@ -44,4 +44,4 @@ export class DataVisualizationPlugin extends Plugin {
|
|||||||
async remove() {}
|
async remove() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default DataVisualizationPlugin;
|
export default PluginDataVisualizationServer;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Plugin } from '@nocobase/client';
|
import { Plugin } from '@nocobase/client';
|
||||||
|
|
||||||
class ErrorHandlerPlugin extends Plugin {
|
class PluginErrorHandlerClient extends Plugin {
|
||||||
async load() {}
|
async load() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ErrorHandlerPlugin;
|
export default PluginErrorHandlerClient;
|
||||||
|
@ -1 +1 @@
|
|||||||
export { PluginErrorHandler as default } from './server';
|
export { PluginErrorHandlerServer as default } from './server';
|
||||||
|
@ -6,7 +6,7 @@ import { ErrorHandler } from './error-handler';
|
|||||||
import enUS from './locale/en_US';
|
import enUS from './locale/en_US';
|
||||||
import zhCN from './locale/zh_CN';
|
import zhCN from './locale/zh_CN';
|
||||||
|
|
||||||
export class PluginErrorHandler extends Plugin {
|
export class PluginErrorHandlerServer extends Plugin {
|
||||||
errorHandler: ErrorHandler = new ErrorHandler();
|
errorHandler: ErrorHandler = new ErrorHandler();
|
||||||
i18nNs = 'error-handler';
|
i18nNs = 'error-handler';
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import { Plugin } from '@nocobase/client';
|
|||||||
import { ExportPluginProvider } from './ExportPluginProvider';
|
import { ExportPluginProvider } from './ExportPluginProvider';
|
||||||
import { exportActionSchemaSettings } from './schemaSettings';
|
import { exportActionSchemaSettings } from './schemaSettings';
|
||||||
|
|
||||||
export class ExportPlugin extends Plugin {
|
export class PluginExportClient extends Plugin {
|
||||||
async load() {
|
async load() {
|
||||||
this.app.use(ExportPluginProvider);
|
this.app.use(ExportPluginProvider);
|
||||||
|
|
||||||
@ -29,4 +29,4 @@ export class ExportPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ExportPlugin;
|
export default PluginExportClient;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { InstallOptions, Plugin } from '@nocobase/server';
|
import { InstallOptions, Plugin } from '@nocobase/server';
|
||||||
import { exportXlsx } from './actions';
|
import { exportXlsx } from './actions';
|
||||||
|
|
||||||
export class ExportPlugin extends Plugin {
|
export class PluginExportServer extends Plugin {
|
||||||
beforeLoad() {}
|
beforeLoad() {}
|
||||||
|
|
||||||
async load() {
|
async load() {
|
||||||
@ -15,4 +15,4 @@ export class ExportPlugin extends Plugin {
|
|||||||
async install(options: InstallOptions) {}
|
async install(options: InstallOptions) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ExportPlugin;
|
export default PluginExportServer;
|
||||||
|
@ -6,7 +6,7 @@ import { storageTypes } from './schemas/storageTypes';
|
|||||||
import { AttachmentFieldInterface } from './interfaces/attachment';
|
import { AttachmentFieldInterface } from './interfaces/attachment';
|
||||||
import { FileCollectionTemplate } from './templates';
|
import { FileCollectionTemplate } from './templates';
|
||||||
|
|
||||||
export class FileManagerPlugin extends Plugin {
|
export class PluginFileManagerClient extends Plugin {
|
||||||
storageTypes = new Map();
|
storageTypes = new Map();
|
||||||
|
|
||||||
async load() {
|
async load() {
|
||||||
@ -47,4 +47,4 @@ export class FileManagerPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default FileManagerPlugin;
|
export default PluginFileManagerClient;
|
||||||
|
@ -6,7 +6,7 @@ import { getStorageConfig } from './storages';
|
|||||||
|
|
||||||
export { default as storageTypes } from './storages';
|
export { default as storageTypes } from './storages';
|
||||||
|
|
||||||
export default class PluginFileManager extends Plugin {
|
export default class PluginFileManagerServer extends Plugin {
|
||||||
storageType() {
|
storageType() {
|
||||||
return 'local';
|
return 'local';
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ import { renderExpressionDescription } from './scopes';
|
|||||||
import { FormulaFieldInterface } from './interfaces/formula';
|
import { FormulaFieldInterface } from './interfaces/formula';
|
||||||
import { FormulaComponentFieldSettings } from './FormulaComponentFieldSettings';
|
import { FormulaComponentFieldSettings } from './FormulaComponentFieldSettings';
|
||||||
|
|
||||||
export class FormulaFieldPlugin extends Plugin {
|
export class PluginFormulaFieldClient extends Plugin {
|
||||||
async load() {
|
async load() {
|
||||||
this.app.addComponents({
|
this.app.addComponents({
|
||||||
Formula,
|
Formula,
|
||||||
@ -17,4 +17,4 @@ export class FormulaFieldPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default FormulaFieldPlugin;
|
export default PluginFormulaFieldClient;
|
||||||
|
@ -2,7 +2,7 @@ import { InstallOptions, Plugin } from '@nocobase/server';
|
|||||||
import { resolve } from 'path';
|
import { resolve } from 'path';
|
||||||
import { FormulaField } from './formula-field';
|
import { FormulaField } from './formula-field';
|
||||||
|
|
||||||
export class FormulaFieldPlugin extends Plugin {
|
export class PluginFormulaFieldServer extends Plugin {
|
||||||
afterAdd() {}
|
afterAdd() {}
|
||||||
|
|
||||||
beforeLoad() {
|
beforeLoad() {
|
||||||
@ -30,4 +30,4 @@ export class FormulaFieldPlugin extends Plugin {
|
|||||||
async remove() {}
|
async remove() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default FormulaFieldPlugin;
|
export default PluginFormulaFieldServer;
|
||||||
|
@ -27,7 +27,7 @@ const GanttProvider = React.memo((props) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
GanttProvider.displayName = 'GanttProvider';
|
GanttProvider.displayName = 'GanttProvider';
|
||||||
export class GanttPlugin extends Plugin {
|
export class PluginGanttClient extends Plugin {
|
||||||
async load() {
|
async load() {
|
||||||
this.app.use(GanttProvider);
|
this.app.use(GanttProvider);
|
||||||
this.app.schemaSettingsManager.add(oldGanttSettings);
|
this.app.schemaSettingsManager.add(oldGanttSettings);
|
||||||
@ -46,4 +46,4 @@ export class GanttPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default GanttPlugin;
|
export default PluginGanttClient;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Plugin } from '@nocobase/client';
|
import { Plugin } from '@nocobase/client';
|
||||||
import { GraphCollectionPane } from './GraphCollectionShortcut';
|
import { GraphCollectionPane } from './GraphCollectionShortcut';
|
||||||
import { NAMESPACE } from './locale';
|
import { NAMESPACE } from './locale';
|
||||||
export class GraphCollectionPlugin extends Plugin {
|
export class PluginGraphCollectionPlugin extends Plugin {
|
||||||
async load() {
|
async load() {
|
||||||
this.app.pluginSettingsManager.add(`data-source-manager/main.graph`, {
|
this.app.pluginSettingsManager.add(`data-source-manager/main.graph`, {
|
||||||
title: `{{t("Graphical interface", { ns: "${NAMESPACE}" })}}`,
|
title: `{{t("Graphical interface", { ns: "${NAMESPACE}" })}}`,
|
||||||
@ -13,4 +13,4 @@ export class GraphCollectionPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default GraphCollectionPlugin;
|
export default PluginGraphCollectionPlugin;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import { Plugin } from '@nocobase/server';
|
import { Plugin } from '@nocobase/server';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
export class GraphCollectionManagerPlugin extends Plugin {
|
export class PluginGraphCollectionManagerServer extends Plugin {
|
||||||
async load() {
|
async load() {
|
||||||
await this.importCollections(path.resolve(__dirname, 'collections'));
|
await this.importCollections(path.resolve(__dirname, 'collections'));
|
||||||
this.app.acl.allow('graphPositions', '*');
|
this.app.acl.allow('graphPositions', '*');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default GraphCollectionManagerPlugin;
|
export default PluginGraphCollectionManagerServer;
|
||||||
|
@ -2,7 +2,7 @@ import { Plugin } from '@nocobase/client';
|
|||||||
import { IframeBlockProvider } from './IframeBlockProvider';
|
import { IframeBlockProvider } from './IframeBlockProvider';
|
||||||
import { iframeBlockSchemaSettings, iframeBlockSchemaSettings_deprecated } from './schemaSettings';
|
import { iframeBlockSchemaSettings, iframeBlockSchemaSettings_deprecated } from './schemaSettings';
|
||||||
|
|
||||||
export class IframeBlockPlugin extends Plugin {
|
export class PluginIframeBlockClient extends Plugin {
|
||||||
async load() {
|
async load() {
|
||||||
this.app.schemaSettingsManager.add(iframeBlockSchemaSettings_deprecated);
|
this.app.schemaSettingsManager.add(iframeBlockSchemaSettings_deprecated);
|
||||||
this.app.schemaSettingsManager.add(iframeBlockSchemaSettings);
|
this.app.schemaSettingsManager.add(iframeBlockSchemaSettings);
|
||||||
@ -33,4 +33,4 @@ export class IframeBlockPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default IframeBlockPlugin;
|
export default PluginIframeBlockClient;
|
||||||
|
@ -2,7 +2,7 @@ import { InstallOptions, Plugin } from '@nocobase/server';
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { getHtml } from './actions';
|
import { getHtml } from './actions';
|
||||||
|
|
||||||
export class IframeBlockPlugin extends Plugin {
|
export class PluginIframeBlockServer extends Plugin {
|
||||||
afterAdd() {}
|
afterAdd() {}
|
||||||
|
|
||||||
beforeLoad() {}
|
beforeLoad() {}
|
||||||
@ -30,4 +30,4 @@ export class IframeBlockPlugin extends Plugin {
|
|||||||
async remove() {}
|
async remove() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default IframeBlockPlugin;
|
export default PluginIframeBlockServer;
|
||||||
|
@ -10,7 +10,7 @@ import { Plugin, useCollection_deprecated } from '@nocobase/client';
|
|||||||
import { ImportPluginProvider } from './ImportPluginProvider';
|
import { ImportPluginProvider } from './ImportPluginProvider';
|
||||||
import { importActionSchemaSettings } from './schemaSettings';
|
import { importActionSchemaSettings } from './schemaSettings';
|
||||||
|
|
||||||
export class ImportPlugin extends Plugin {
|
export class PluginImportClient extends Plugin {
|
||||||
async load() {
|
async load() {
|
||||||
this.app.use(ImportPluginProvider);
|
this.app.use(ImportPluginProvider);
|
||||||
|
|
||||||
@ -42,4 +42,4 @@ export class ImportPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ImportPlugin;
|
export default PluginImportClient;
|
||||||
|
@ -4,7 +4,7 @@ import { downloadXlsxTemplate, importXlsx } from './actions';
|
|||||||
import { enUS, zhCN } from './locale';
|
import { enUS, zhCN } from './locale';
|
||||||
import { importMiddleware } from './middleware';
|
import { importMiddleware } from './middleware';
|
||||||
|
|
||||||
export class ImportPlugin extends Plugin {
|
export class PluginImportServer extends Plugin {
|
||||||
beforeLoad() {
|
beforeLoad() {
|
||||||
this.app.i18n.addResources('zh-CN', namespace, zhCN);
|
this.app.i18n.addResources('zh-CN', namespace, zhCN);
|
||||||
this.app.i18n.addResources('en-US', namespace, enUS);
|
this.app.i18n.addResources('en-US', namespace, enUS);
|
||||||
@ -30,4 +30,4 @@ export class ImportPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ImportPlugin;
|
export default PluginImportServer;
|
||||||
|
@ -30,7 +30,7 @@ const KanbanPluginProvider = React.memo((props) => {
|
|||||||
});
|
});
|
||||||
KanbanPluginProvider.displayName = 'KanbanPluginProvider';
|
KanbanPluginProvider.displayName = 'KanbanPluginProvider';
|
||||||
|
|
||||||
class KanbanPlugin extends Plugin {
|
class PluginKanbanClient extends Plugin {
|
||||||
async load() {
|
async load() {
|
||||||
this.app.use(KanbanPluginProvider);
|
this.app.use(KanbanPluginProvider);
|
||||||
this.app.schemaInitializerManager.add(kanbanCardInitializers_deprecated);
|
this.app.schemaInitializerManager.add(kanbanCardInitializers_deprecated);
|
||||||
@ -47,4 +47,4 @@ class KanbanPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default KanbanPlugin;
|
export default PluginKanbanClient;
|
||||||
|
@ -2,7 +2,7 @@ import { Plugin } from '@nocobase/client';
|
|||||||
import { Localization } from './Localization';
|
import { Localization } from './Localization';
|
||||||
import { NAMESPACE } from './locale';
|
import { NAMESPACE } from './locale';
|
||||||
|
|
||||||
export class LocalizationManagementPlugin extends Plugin {
|
export class PluginLocalizationClient extends Plugin {
|
||||||
async load() {
|
async load() {
|
||||||
this.app.pluginSettingsManager.add(NAMESPACE, {
|
this.app.pluginSettingsManager.add(NAMESPACE, {
|
||||||
title: `{{t("Localization", { ns: "${NAMESPACE}" })}}`,
|
title: `{{t("Localization", { ns: "${NAMESPACE}" })}}`,
|
||||||
@ -13,4 +13,4 @@ export class LocalizationManagementPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default LocalizationManagementPlugin;
|
export default PluginLocalizationClient;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Model } from '@nocobase/database';
|
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 { InstallOptions, Plugin } from '@nocobase/server';
|
||||||
import deepmerge from 'deepmerge';
|
import deepmerge from 'deepmerge';
|
||||||
import { resolve } from 'path';
|
import { resolve } from 'path';
|
||||||
@ -9,11 +9,11 @@ import Resources from './resources';
|
|||||||
import { getTextsFromDBRecord } from './utils';
|
import { getTextsFromDBRecord } from './utils';
|
||||||
import { NAMESPACE_COLLECTIONS, NAMESPACE_MENUS } from './constans';
|
import { NAMESPACE_COLLECTIONS, NAMESPACE_MENUS } from './constans';
|
||||||
|
|
||||||
export class LocalizationManagementPlugin extends Plugin {
|
export class PluginLocalizationServer extends Plugin {
|
||||||
resources: Resources;
|
resources: Resources;
|
||||||
|
|
||||||
registerUISchemahook(plugin?: UiSchemaStoragePlugin) {
|
registerUISchemahook(plugin?: PluginUISchemaStorageServer) {
|
||||||
const uiSchemaStoragePlugin = plugin || this.app.getPlugin<UiSchemaStoragePlugin>('ui-schema-storage');
|
const uiSchemaStoragePlugin = plugin || this.app.getPlugin<PluginUISchemaStorageServer>('ui-schema-storage');
|
||||||
if (!uiSchemaStoragePlugin) {
|
if (!uiSchemaStoragePlugin) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -141,7 +141,7 @@ export class LocalizationManagementPlugin extends Plugin {
|
|||||||
async afterEnable() {}
|
async afterEnable() {}
|
||||||
|
|
||||||
async afterDisable() {
|
async afterDisable() {
|
||||||
const uiSchemaStoragePlugin = this.app.getPlugin<UiSchemaStoragePlugin>('ui-schema-storage');
|
const uiSchemaStoragePlugin = this.app.getPlugin<PluginUISchemaStorageServer>('ui-schema-storage');
|
||||||
if (!uiSchemaStoragePlugin) {
|
if (!uiSchemaStoragePlugin) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -151,4 +151,4 @@ export class LocalizationManagementPlugin extends Plugin {
|
|||||||
async remove() {}
|
async remove() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default LocalizationManagementPlugin;
|
export default PluginLocalizationServer;
|
||||||
|
@ -16,7 +16,7 @@ const MapProvider = React.memo((props) => {
|
|||||||
});
|
});
|
||||||
MapProvider.displayName = 'MapProvider';
|
MapProvider.displayName = 'MapProvider';
|
||||||
|
|
||||||
export class MapPlugin extends Plugin {
|
export class PluginMapClient extends Plugin {
|
||||||
async load() {
|
async load() {
|
||||||
this.app.use(MapProvider);
|
this.app.use(MapProvider);
|
||||||
|
|
||||||
@ -50,4 +50,4 @@ export class MapPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default MapPlugin;
|
export default PluginMapClient;
|
||||||
|
@ -4,7 +4,7 @@ import { getConfiguration, setConfiguration } from './actions';
|
|||||||
import { CircleField, LineStringField, PointField, PolygonField } from './fields';
|
import { CircleField, LineStringField, PointField, PolygonField } from './fields';
|
||||||
import { CircleValueParser, LineStringValueParser, PointValueParser, PolygonValueParser } from './value-parsers';
|
import { CircleValueParser, LineStringValueParser, PointValueParser, PolygonValueParser } from './value-parsers';
|
||||||
|
|
||||||
export class MapPlugin extends Plugin {
|
export class PluginMapServer extends Plugin {
|
||||||
afterAdd() {}
|
afterAdd() {}
|
||||||
|
|
||||||
beforeLoad() {
|
beforeLoad() {
|
||||||
@ -52,4 +52,4 @@ export class MapPlugin extends Plugin {
|
|||||||
async remove() {}
|
async remove() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default MapPlugin;
|
export default PluginMapServer;
|
||||||
|
@ -7,7 +7,7 @@ import { mBlockInitializers, mBlockInitializers_deprecated } from './core/schema
|
|||||||
import { AppConfiguration, InterfaceConfiguration } from './configuration';
|
import { AppConfiguration, InterfaceConfiguration } from './configuration';
|
||||||
import { NAMESPACE } from './locale';
|
import { NAMESPACE } from './locale';
|
||||||
|
|
||||||
export class MobileClientPlugin extends Plugin {
|
export class PluginMobileClient extends Plugin {
|
||||||
public mobileRouter: RouterManager;
|
public mobileRouter: RouterManager;
|
||||||
async load() {
|
async load() {
|
||||||
this.setMobileRouter();
|
this.setMobileRouter();
|
||||||
@ -69,4 +69,4 @@ export class MobileClientPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default MobileClientPlugin;
|
export default PluginMobileClient;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { css, usePlugin } from '@nocobase/client';
|
import { css, usePlugin } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { MobileClientPlugin } from '../index';
|
import { PluginMobileClient } from '../index';
|
||||||
import { InterfaceProvider } from './InterfaceProvider';
|
import { InterfaceProvider } from './InterfaceProvider';
|
||||||
|
|
||||||
export const InterfaceRouter: React.FC = React.memo(() => {
|
export const InterfaceRouter: React.FC = React.memo(() => {
|
||||||
const plugin = usePlugin(MobileClientPlugin);
|
const plugin = usePlugin(PluginMobileClient);
|
||||||
const MobileRouter = plugin.getMobileRouterComponent();
|
const MobileRouter = plugin.getMobileRouterComponent();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Plugin } from '@nocobase/server';
|
import { Plugin } from '@nocobase/server';
|
||||||
import { resolve } from 'path';
|
import { resolve } from 'path';
|
||||||
|
|
||||||
export class MobileClientPlugin extends Plugin {
|
export class PluginMobileServer extends Plugin {
|
||||||
afterAdd() {}
|
afterAdd() {}
|
||||||
|
|
||||||
async load() {
|
async load() {
|
||||||
@ -50,4 +50,4 @@ export class MobileClientPlugin extends Plugin {
|
|||||||
async remove() {}
|
async remove() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default MobileClientPlugin;
|
export default PluginMobileServer;
|
||||||
|
@ -3,7 +3,7 @@ import { MultiAppManagerProvider } from './MultiAppManagerProvider';
|
|||||||
import { AppManager } from './AppManager';
|
import { AppManager } from './AppManager';
|
||||||
import { NAMESPACE } from '../locale';
|
import { NAMESPACE } from '../locale';
|
||||||
|
|
||||||
export class MultiAppManagerPlugin extends Plugin {
|
export class PluginMultiAppManagerClient extends Plugin {
|
||||||
async load() {
|
async load() {
|
||||||
this.app.use(MultiAppManagerProvider);
|
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';
|
export { formSchema, tableActionColumnSchema } from './settings/schemas/applications';
|
||||||
|
@ -3,7 +3,7 @@ import { AppSupervisor, Gateway } from '@nocobase/server';
|
|||||||
import { createMockServer, MockServer } from '@nocobase/test';
|
import { createMockServer, MockServer } from '@nocobase/test';
|
||||||
import { uid } from '@nocobase/utils';
|
import { uid } from '@nocobase/utils';
|
||||||
import { vi } from 'vitest';
|
import { vi } from 'vitest';
|
||||||
import { PluginMultiAppManager } from '../server';
|
import { PluginMultiAppManagerServer } from '../server';
|
||||||
|
|
||||||
const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
|
const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ describe('multiple apps', () => {
|
|||||||
it('should register db creator', async () => {
|
it('should register db creator', async () => {
|
||||||
const fn = vi.fn();
|
const fn = vi.fn();
|
||||||
|
|
||||||
const appPlugin = app.getPlugin<PluginMultiAppManager>(PluginMultiAppManager);
|
const appPlugin = app.getPlugin<PluginMultiAppManagerServer>(PluginMultiAppManagerServer);
|
||||||
const defaultDbCreator = appPlugin.appDbCreator;
|
const defaultDbCreator = appPlugin.appDbCreator;
|
||||||
|
|
||||||
appPlugin.setAppDbCreator(async (app) => {
|
appPlugin.setAppDbCreator(async (app) => {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ApplicationModel, registerAppOptions } from './models/application';
|
import { ApplicationModel, registerAppOptions } from './models/application';
|
||||||
|
|
||||||
export { PluginMultiAppManager as default } from './server';
|
export { PluginMultiAppManagerServer as default } from './server';
|
||||||
export { ApplicationModel, registerAppOptions };
|
export { ApplicationModel, registerAppOptions };
|
||||||
|
@ -95,7 +95,7 @@ const defaultDbCreator = async (app: Application) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const defaultAppOptionsFactory = (appName: string, mainApp: Application) => {
|
const defaultAppOptionsFactory = (appName: string, mainApp: Application) => {
|
||||||
const rawDatabaseOptions = PluginMultiAppManager.getDatabaseConfig(mainApp);
|
const rawDatabaseOptions = PluginMultiAppManagerServer.getDatabaseConfig(mainApp);
|
||||||
|
|
||||||
if (rawDatabaseOptions.dialect === 'sqlite') {
|
if (rawDatabaseOptions.dialect === 'sqlite') {
|
||||||
const mainAppStorage = rawDatabaseOptions.storage;
|
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;
|
appDbCreator: AppDbCreator = defaultDbCreator;
|
||||||
appOptionsFactory: AppOptionsFactory = defaultAppOptionsFactory;
|
appOptionsFactory: AppOptionsFactory = defaultAppOptionsFactory;
|
||||||
subAppUpgradeHandler: SubAppUpgradeHandler = defaultSubAppUpgradeHandle;
|
subAppUpgradeHandler: SubAppUpgradeHandler = defaultSubAppUpgradeHandle;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { Plugin } from '@nocobase/client';
|
import { Plugin } from '@nocobase/client';
|
||||||
import { MultiAppShareCollectionProvider } from './MultiAppShareCollectionProvider';
|
import { MultiAppShareCollectionProvider } from './MultiAppShareCollectionProvider';
|
||||||
|
|
||||||
export class MultiAppShareCollectionPlugin extends Plugin {
|
export class PluginMultiAppShareCollectionClient extends Plugin {
|
||||||
async load() {
|
async load() {
|
||||||
this.app.use(MultiAppShareCollectionProvider);
|
this.app.use(MultiAppShareCollectionProvider);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default MultiAppShareCollectionPlugin;
|
export default PluginMultiAppShareCollectionClient;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Plugin } from '@nocobase/client';
|
import { Plugin } from '@nocobase/client';
|
||||||
|
|
||||||
class NotificationPlugin extends Plugin {
|
class PluginNotificationClient extends Plugin {
|
||||||
async load() {}
|
async load() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default NotificationPlugin;
|
export default PluginNotificationClient;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Plugin } from '@nocobase/server';
|
import { Plugin } from '@nocobase/server';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
export default class PluginNotifications extends Plugin {
|
export default class PluginNotificationsServer extends Plugin {
|
||||||
async load() {
|
async load() {
|
||||||
await this.app.db.import({
|
await this.app.db.import({
|
||||||
directory: path.resolve(__dirname, 'collections'),
|
directory: path.resolve(__dirname, 'collections'),
|
||||||
|
@ -4,7 +4,7 @@ import { authType } from '../constants';
|
|||||||
import { OIDCButton } from './OIDCButton';
|
import { OIDCButton } from './OIDCButton';
|
||||||
import { Options } from './Options';
|
import { Options } from './Options';
|
||||||
|
|
||||||
export class OidcPlugin extends Plugin {
|
export class PluginOIDCClient extends Plugin {
|
||||||
async load() {
|
async load() {
|
||||||
const auth = this.app.pm.get(AuthPlugin);
|
const auth = this.app.pm.get(AuthPlugin);
|
||||||
auth.registerType(authType, {
|
auth.registerType(authType, {
|
||||||
@ -16,4 +16,4 @@ export class OidcPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default OidcPlugin;
|
export default PluginOIDCClient;
|
||||||
|
@ -5,7 +5,7 @@ import { authType } from '../constants';
|
|||||||
import { OIDCAuth } from './oidc-auth';
|
import { OIDCAuth } from './oidc-auth';
|
||||||
import { resolve } from 'path';
|
import { resolve } from 'path';
|
||||||
|
|
||||||
export class OidcPlugin extends Plugin {
|
export class PluginOIDCServer extends Plugin {
|
||||||
afterAdd() {}
|
afterAdd() {}
|
||||||
|
|
||||||
beforeLoad() {}
|
beforeLoad() {}
|
||||||
@ -60,4 +60,4 @@ export class OidcPlugin extends Plugin {
|
|||||||
async remove() {}
|
async remove() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default OidcPlugin;
|
export default PluginOIDCServer;
|
||||||
|
@ -4,7 +4,7 @@ import { authType } from '../constants';
|
|||||||
import { SAMLButton } from './SAMLButton';
|
import { SAMLButton } from './SAMLButton';
|
||||||
import { Options } from './Options';
|
import { Options } from './Options';
|
||||||
|
|
||||||
export class SamlPlugin extends Plugin {
|
export class PluginSAMLClient extends Plugin {
|
||||||
async load() {
|
async load() {
|
||||||
const auth = this.app.pm.get(AuthPlugin);
|
const auth = this.app.pm.get(AuthPlugin);
|
||||||
auth.registerType(authType, {
|
auth.registerType(authType, {
|
||||||
@ -16,4 +16,4 @@ export class SamlPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default SamlPlugin;
|
export default PluginSAMLClient;
|
||||||
|
@ -6,7 +6,7 @@ import { SAMLAuth } from './saml-auth';
|
|||||||
import { authType } from '../constants';
|
import { authType } from '../constants';
|
||||||
import { resolve } from 'path';
|
import { resolve } from 'path';
|
||||||
|
|
||||||
export class SAMLPlugin extends Plugin {
|
export class PluginSAMLServer extends Plugin {
|
||||||
afterAdd() {}
|
afterAdd() {}
|
||||||
|
|
||||||
beforeLoad() {}
|
beforeLoad() {}
|
||||||
@ -47,4 +47,4 @@ export class SAMLPlugin extends Plugin {
|
|||||||
async remove() {}
|
async remove() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default SAMLPlugin;
|
export default PluginSAMLServer;
|
||||||
|
@ -2,11 +2,11 @@ import { Plugin } from '@nocobase/client';
|
|||||||
import { SequenceFieldProvider } from './SequenceFieldProvider';
|
import { SequenceFieldProvider } from './SequenceFieldProvider';
|
||||||
import { SequenceFieldInterface } from './sequence';
|
import { SequenceFieldInterface } from './sequence';
|
||||||
|
|
||||||
export class SequenceFieldPlugin extends Plugin {
|
export class PluginSequenceFieldClient extends Plugin {
|
||||||
async load() {
|
async load() {
|
||||||
this.app.use(SequenceFieldProvider);
|
this.app.use(SequenceFieldProvider);
|
||||||
this.app.dataSourceManager.addFieldInterfaces([SequenceFieldInterface]);
|
this.app.dataSourceManager.addFieldInterfaces([SequenceFieldInterface]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default SequenceFieldPlugin;
|
export default PluginSequenceFieldClient;
|
||||||
|
@ -8,7 +8,7 @@ import { Pattern, SequenceField } from './fields/sequence-field';
|
|||||||
|
|
||||||
const asyncRandomInt = promisify(randomInt);
|
const asyncRandomInt = promisify(randomInt);
|
||||||
|
|
||||||
export default class SequenceFieldPlugin extends Plugin {
|
export default class PluginSequenceFieldServer extends Plugin {
|
||||||
patternTypes = new Registry<Pattern>();
|
patternTypes = new Registry<Pattern>();
|
||||||
|
|
||||||
async load() {
|
async load() {
|
||||||
|
@ -4,7 +4,7 @@ import { SigninPage } from './SigninPage';
|
|||||||
import { Options } from './Options';
|
import { Options } from './Options';
|
||||||
import { authType } from '../constants';
|
import { authType } from '../constants';
|
||||||
|
|
||||||
export class SmsAuthPlugin extends Plugin {
|
export class PluginSMSAuthClient extends Plugin {
|
||||||
async load() {
|
async load() {
|
||||||
const auth = this.app.pm.get(AuthPlugin);
|
const auth = this.app.pm.get(AuthPlugin);
|
||||||
auth.registerType(authType, {
|
auth.registerType(authType, {
|
||||||
@ -16,4 +16,4 @@ export class SmsAuthPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default SmsAuthPlugin;
|
export default PluginSMSAuthClient;
|
||||||
|
@ -4,7 +4,7 @@ import { resolve } from 'path';
|
|||||||
import { authType } from '../constants';
|
import { authType } from '../constants';
|
||||||
import { SMSAuth } from './sms-auth';
|
import { SMSAuth } from './sms-auth';
|
||||||
|
|
||||||
export class SmsAuthPlugin extends Plugin {
|
export class PluginSMSAuthServer extends Plugin {
|
||||||
afterAdd() {}
|
afterAdd() {}
|
||||||
|
|
||||||
async load() {
|
async load() {
|
||||||
@ -49,4 +49,4 @@ export class SmsAuthPlugin extends Plugin {
|
|||||||
async remove() {}
|
async remove() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default SmsAuthPlugin;
|
export default PluginSMSAuthServer;
|
||||||
|
@ -6,7 +6,7 @@ import {
|
|||||||
} from './SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializers';
|
} from './SnapshotBlock/SnapshotBlockInitializers/SnapshotBlockInitializers';
|
||||||
import { SnapshotFieldInterface } from './interface';
|
import { SnapshotFieldInterface } from './interface';
|
||||||
|
|
||||||
export class SnapshotFieldPlugin extends Plugin {
|
export class PluginSnapshotFieldClient extends Plugin {
|
||||||
async load() {
|
async load() {
|
||||||
this.app.use(SnapshotFieldProvider);
|
this.app.use(SnapshotFieldProvider);
|
||||||
this.app.schemaInitializerManager.add(snapshotBlockInitializers_deprecated);
|
this.app.schemaInitializerManager.add(snapshotBlockInitializers_deprecated);
|
||||||
@ -15,4 +15,4 @@ export class SnapshotFieldPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default SnapshotFieldPlugin;
|
export default PluginSnapshotFieldClient;
|
||||||
|
@ -3,7 +3,7 @@ import { InstallOptions, Plugin } from '@nocobase/server';
|
|||||||
import { resolve } from 'path';
|
import { resolve } from 'path';
|
||||||
import { SnapshotField } from './fields/snapshot-field';
|
import { SnapshotField } from './fields/snapshot-field';
|
||||||
|
|
||||||
export class SnapshotFieldPlugin extends Plugin {
|
export class PluginSnapshotFieldServer extends Plugin {
|
||||||
afterAdd() {}
|
afterAdd() {}
|
||||||
|
|
||||||
async beforeLoad() {
|
async beforeLoad() {
|
||||||
@ -130,4 +130,4 @@ export class SnapshotFieldPlugin extends Plugin {
|
|||||||
async remove() {}
|
async remove() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default SnapshotFieldPlugin;
|
export default PluginSnapshotFieldServer;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Plugin } from '@nocobase/client';
|
import { Plugin } from '@nocobase/client';
|
||||||
|
|
||||||
class SystemSettingPlugin extends Plugin {
|
class PluginSystemSettingClient extends Plugin {
|
||||||
async load() {}
|
async load() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default SystemSettingPlugin;
|
export default PluginSystemSettingClient;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { InstallOptions, Plugin } from '@nocobase/server';
|
import { InstallOptions, Plugin } from '@nocobase/server';
|
||||||
import { resolve } from 'path';
|
import { resolve } from 'path';
|
||||||
|
|
||||||
export class SystemSettingsPlugin extends Plugin {
|
export class PluginSystemSettingsServer extends Plugin {
|
||||||
getInitAppLang(options) {
|
getInitAppLang(options) {
|
||||||
return options?.cliArgs?.[0]?.opts?.lang || process.env.INIT_APP_LANG || 'en-US';
|
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;
|
||||||
|
@ -75,7 +75,7 @@ const CustomThemeProvider = React.memo((props) => {
|
|||||||
});
|
});
|
||||||
CustomThemeProvider.displayName = 'CustomThemeProvider';
|
CustomThemeProvider.displayName = 'CustomThemeProvider';
|
||||||
|
|
||||||
export class ThemeEditorPlugin extends Plugin {
|
export class PluginThemeEditorClient extends Plugin {
|
||||||
async load() {
|
async load() {
|
||||||
this.app.use(CustomThemeProvider);
|
this.app.use(CustomThemeProvider);
|
||||||
this.app.pluginSettingsManager.add(NAMESPACE, {
|
this.app.pluginSettingsManager.add(NAMESPACE, {
|
||||||
@ -87,4 +87,4 @@ export class ThemeEditorPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ThemeEditorPlugin;
|
export default PluginThemeEditorClient;
|
||||||
|
@ -2,7 +2,7 @@ import { InstallOptions, Plugin } from '@nocobase/server';
|
|||||||
import path, { resolve } from 'path';
|
import path, { resolve } from 'path';
|
||||||
import { compact, compactDark, dark, defaultTheme } from './builtinThemes';
|
import { compact, compactDark, dark, defaultTheme } from './builtinThemes';
|
||||||
|
|
||||||
export class ThemeEditorPlugin extends Plugin {
|
export class PluginThemeEditorServer extends Plugin {
|
||||||
theme: any;
|
theme: any;
|
||||||
|
|
||||||
afterAdd() {}
|
afterAdd() {}
|
||||||
@ -48,4 +48,4 @@ export class ThemeEditorPlugin extends Plugin {
|
|||||||
async remove() {}
|
async remove() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ThemeEditorPlugin;
|
export default PluginThemeEditorServer;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Plugin } from '@nocobase/client';
|
import { Plugin } from '@nocobase/client';
|
||||||
|
|
||||||
class UiRoutesStoragePlugin extends Plugin {
|
class PluginUIRoutesStorageClient extends Plugin {
|
||||||
async load() { }
|
async load() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default UiRoutesStoragePlugin;
|
export default PluginUIRoutesStorageClient;
|
||||||
|
@ -3,7 +3,7 @@ import { Plugin } from '@nocobase/server';
|
|||||||
import { resolve } from 'path';
|
import { resolve } from 'path';
|
||||||
import { getAccessible } from './actions/getAccessible';
|
import { getAccessible } from './actions/getAccessible';
|
||||||
|
|
||||||
export class UiRoutesStoragePlugin extends Plugin {
|
export class PluginUIRoutesStorageServer extends Plugin {
|
||||||
async install() {
|
async install() {
|
||||||
const repository = this.app.db.getRepository('uiRoutes');
|
const repository = this.app.db.getRepository('uiRoutes');
|
||||||
const routes = [
|
const routes = [
|
||||||
@ -93,4 +93,4 @@ export class UiRoutesStoragePlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default UiRoutesStoragePlugin;
|
export default PluginUIRoutesStorageServer;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Plugin } from '@nocobase/client';
|
import { Plugin } from '@nocobase/client';
|
||||||
|
|
||||||
class UiSchemaStoragePlugin extends Plugin {
|
class PluginUISchemaStorageClient extends Plugin {
|
||||||
async load() { }
|
async load() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default UiSchemaStoragePlugin;
|
export default PluginUISchemaStorageClient;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
export * from './server';
|
export * from './server';
|
||||||
import { UiSchemaStoragePlugin } from './server';
|
import { PluginUISchemaStorageServer } from './server';
|
||||||
|
|
||||||
export default UiSchemaStoragePlugin;
|
export default PluginUISchemaStorageServer;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { UiSchemaStoragePlugin } from './server';
|
import { PluginUISchemaStorageServer } from './server';
|
||||||
export * from './repository';
|
export * from './repository';
|
||||||
export * from './server';
|
export * from './server';
|
||||||
|
|
||||||
export default UiSchemaStoragePlugin;
|
export default PluginUISchemaStorageServer;
|
||||||
|
@ -8,7 +8,7 @@ import UiSchemaRepository from './repository';
|
|||||||
import { ServerHooks } from './server-hooks';
|
import { ServerHooks } from './server-hooks';
|
||||||
import { ServerHookModel } from './server-hooks/model';
|
import { ServerHookModel } from './server-hooks/model';
|
||||||
|
|
||||||
export class UiSchemaStoragePlugin extends Plugin {
|
export class PluginUISchemaStorageServer extends Plugin {
|
||||||
serverHooks: ServerHooks;
|
serverHooks: ServerHooks;
|
||||||
|
|
||||||
registerRepository() {
|
registerRepository() {
|
||||||
@ -88,4 +88,4 @@ export class UiSchemaStoragePlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default UiSchemaStoragePlugin;
|
export default PluginUISchemaStorageServer;
|
||||||
|
@ -2,7 +2,7 @@ import { Plugin } from '@nocobase/client';
|
|||||||
import { VerificationProviders } from './VerificationProviders';
|
import { VerificationProviders } from './VerificationProviders';
|
||||||
import { NAMESPACE } from './locale';
|
import { NAMESPACE } from './locale';
|
||||||
|
|
||||||
export class VerificationPlugin extends Plugin {
|
export class PluginVerificationClient extends Plugin {
|
||||||
async load() {
|
async load() {
|
||||||
this.app.pluginSettingsManager.add(NAMESPACE, {
|
this.app.pluginSettingsManager.add(NAMESPACE, {
|
||||||
icon: 'CheckCircleOutlined',
|
icon: 'CheckCircleOutlined',
|
||||||
@ -13,4 +13,4 @@ export class VerificationPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default VerificationPlugin;
|
export default PluginVerificationClient;
|
||||||
|
@ -23,7 +23,7 @@ export interface Interceptor {
|
|||||||
validate?(ctx: Context, receiver: string): boolean | Promise<boolean>;
|
validate?(ctx: Context, receiver: string): boolean | Promise<boolean>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class VerificationPlugin extends Plugin {
|
export default class PluginVerficationServer extends Plugin {
|
||||||
providers: Registry<typeof Provider> = new Registry();
|
providers: Registry<typeof Provider> = new Registry();
|
||||||
interceptors: Registry<Interceptor> = new Registry();
|
interceptors: Registry<Interceptor> = new Registry();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user