From 668f96fb25874fd7411071a64eb4f1a3394ac5f6 Mon Sep 17 00:00:00 2001 From: chenos Date: Sun, 8 Jan 2023 20:47:00 +0800 Subject: [PATCH] fix: collections path --- packages/plugins/oidc/src/server/plugin.ts | 2 +- packages/plugins/saml/src/server/plugin.ts | 2 +- packages/plugins/sequence-field/src/server/Plugin.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/plugins/oidc/src/server/plugin.ts b/packages/plugins/oidc/src/server/plugin.ts index f7131bca8..f508ae828 100644 --- a/packages/plugins/oidc/src/server/plugin.ts +++ b/packages/plugins/oidc/src/server/plugin.ts @@ -15,7 +15,7 @@ export class OidcPlugin extends Plugin { async load() { // 导入 collection - await this.importCollections(resolve(__dirname, '../collections')); + await this.importCollections(resolve(__dirname, './collections')); // 获取 User 插件 const userPlugin = this.app.getPlugin('users'); diff --git a/packages/plugins/saml/src/server/plugin.ts b/packages/plugins/saml/src/server/plugin.ts index 6e9eab5d9..685b64e4c 100644 --- a/packages/plugins/saml/src/server/plugin.ts +++ b/packages/plugins/saml/src/server/plugin.ts @@ -13,7 +13,7 @@ export class SAMLPlugin extends Plugin { async load() { // 导入 collection - await this.importCollections(resolve(__dirname, '../collections')); + await this.importCollections(resolve(__dirname, './collections')); // 获取 User 插件 const userPlugin = this.app.getPlugin('users'); diff --git a/packages/plugins/sequence-field/src/server/Plugin.ts b/packages/plugins/sequence-field/src/server/Plugin.ts index f8db40ae0..c11c29a53 100644 --- a/packages/plugins/sequence-field/src/server/Plugin.ts +++ b/packages/plugins/sequence-field/src/server/Plugin.ts @@ -1,9 +1,9 @@ +import { randomInt } from 'crypto'; import path from 'path'; import { promisify } from 'util'; -import { randomInt } from 'crypto'; -import { Registry } from '@nocobase/utils'; import { Plugin } from '@nocobase/server'; +import { Registry } from '@nocobase/utils'; import { Pattern, SequenceField } from './fields/sequence-field'; const asyncRandomInt = promisify(randomInt);