From 37b4151da13e60a4f54ee60becc3152249fc140d Mon Sep 17 00:00:00 2001 From: chenos Date: Tue, 29 Nov 2022 23:39:12 +0800 Subject: [PATCH] fix: add oidc and saml to local plugins --- packages/presets/nocobase/package.json | 2 ++ packages/presets/nocobase/src/index.ts | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/presets/nocobase/package.json b/packages/presets/nocobase/package.json index 8be388f0a..500209339 100644 --- a/packages/presets/nocobase/package.json +++ b/packages/presets/nocobase/package.json @@ -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", diff --git a/packages/presets/nocobase/src/index.ts b/packages/presets/nocobase/src/index.ts index a99fb9fd9..a2645e09a 100644 --- a/packages/presets/nocobase/src/index.ts +++ b/packages/presets/nocobase/src/index.ts @@ -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(); }