fix: add oidc and saml to local plugins

This commit is contained in:
chenos 2022-11-29 23:39:12 +08:00
parent 49d9f297b2
commit 37b4151da1
2 changed files with 6 additions and 4 deletions

View File

@ -19,6 +19,8 @@
"@nocobase/plugin-error-handler": "0.8.0-alpha.13",
"@nocobase/plugin-export": "0.8.0-alpha.13",
"@nocobase/plugin-file-manager": "0.8.0-alpha.13",
"@nocobase/plugin-oidc": "0.8.0-alpha.13",
"@nocobase/plugin-saml": "0.8.0-alpha.13",
"@nocobase/plugin-import": "0.8.0-alpha.13",
"@nocobase/plugin-sample-hello": "0.8.0-alpha.13",
"@nocobase/plugin-system-settings": "0.8.0-alpha.13",

View File

@ -3,7 +3,7 @@ import path from 'path';
export class PresetNocoBase extends Plugin {
async addBuiltInPlugins() {
const plugins = process.env.PRESET_NOCOBASE_PLUGINS
const builtInPlugins = process.env.PRESET_NOCOBASE_PLUGINS
? process.env.PRESET_NOCOBASE_PLUGINS.split(',')
: [
'error-handler',
@ -22,13 +22,13 @@ export class PresetNocoBase extends Plugin {
'import',
'audit-logs',
];
await this.app.pm.add(plugins, {
await this.app.pm.add(builtInPlugins, {
enabled: true,
builtIn: true,
installed: true,
});
const samples = ['sample-hello'];
await this.app.pm.add(samples, {});
const localPlugins = ['sample-hello', 'oidc', 'saml'];
await this.app.pm.add(localPlugins, {});
await this.app.reload();
}