mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2025-12-13 17:56:20 +00:00
fix: imports from src in config files lead to crash
This commit is contained in:
committed by
Rainer Killinger
parent
e65a81fcfa
commit
f6003d7f87
@@ -3,7 +3,7 @@
|
||||
import {SCConfigFile} from '@openstapps/core';
|
||||
import {RecursivePartial} from '@openstapps/logger/lib/common';
|
||||
import moment from 'moment';
|
||||
import {inRangeInclusive} from '../src/common';
|
||||
import {inRangeInclusive} from './default';
|
||||
|
||||
const ssRange = [4, 9];
|
||||
const wsRange = [10, 3];
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import {SCConfigFile} from '@openstapps/core';
|
||||
import {RecursivePartial} from '@openstapps/logger/lib/common';
|
||||
import moment from 'moment';
|
||||
import {inRangeInclusive} from '../src/common';
|
||||
import {inRangeInclusive} from './default';
|
||||
|
||||
const ssRange = [4, 9];
|
||||
const wsRange = [10, 3];
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import {SCConfigFile} from '@openstapps/core';
|
||||
import {RecursivePartial} from '@openstapps/logger/lib/common';
|
||||
import moment from 'moment';
|
||||
import {inRangeInclusive} from '../src/common';
|
||||
import {inRangeInclusive} from './default';
|
||||
|
||||
const ssRange = [4, 9];
|
||||
const wsRange = [10, 3];
|
||||
|
||||
@@ -12,6 +12,16 @@ import {
|
||||
import {readFileSync} from 'fs';
|
||||
import {resolve} from 'path';
|
||||
|
||||
/**
|
||||
* Evaluates if a number is within the given range
|
||||
*
|
||||
* @param num The number that should be checked
|
||||
* @param range Array of two numbers representing a range (inclusive interval)
|
||||
*/
|
||||
export function inRangeInclusive(num: number, range: number[]): boolean {
|
||||
return num >= range[0] && num <= range[1];
|
||||
}
|
||||
|
||||
const userGroupSetting: SCUserGroupSetting = {
|
||||
categories: ['profile'],
|
||||
defaultValue: 'students',
|
||||
|
||||
@@ -18,16 +18,6 @@ import {Validator} from '@openstapps/core-tools/lib/validate';
|
||||
import config from 'config';
|
||||
import {BackendTransport} from './notification/backend-transport';
|
||||
|
||||
/**
|
||||
* Evaluates if a number is within the given range
|
||||
*
|
||||
* @param num The number that should be checked
|
||||
* @param range Array of two numbers representing a range (inclusive interval)
|
||||
*/
|
||||
export function inRangeInclusive(num: number, range: number[]): boolean {
|
||||
return num >= range[0] && num <= range[1];
|
||||
}
|
||||
|
||||
/**
|
||||
* Instance of the transport for sending mails
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {inRangeInclusive} from '../src/common';
|
||||
import {inRangeInclusive} from '../config/default';
|
||||
import {expect} from 'chai';
|
||||
|
||||
describe('Common', function () {
|
||||
|
||||
Reference in New Issue
Block a user