2016-03-18 11:12:50 +01:00
|
|
|
/**
|
|
|
|
* Export shared utilities
|
|
|
|
*/
|
2023-07-19 17:28:08 +02:00
|
|
|
import parseMultipartData from './parse-multipart';
|
|
|
|
import parseType from './parse-type';
|
|
|
|
import * as policy from './policy';
|
|
|
|
import templateConfiguration from './template-configuration';
|
|
|
|
import { yup, handleYupError, validateYupSchema, validateYupSchemaSync } from './validators';
|
|
|
|
import * as errors from './errors';
|
|
|
|
import {
|
2020-05-08 13:50:00 +02:00
|
|
|
nameToSlug,
|
|
|
|
nameToCollectionName,
|
|
|
|
getCommonBeginning,
|
|
|
|
escapeQuery,
|
2020-06-23 16:31:16 +02:00
|
|
|
stringIncludes,
|
|
|
|
stringEquals,
|
2021-08-20 15:23:02 +02:00
|
|
|
isKebabCase,
|
|
|
|
isCamelCase,
|
2022-02-21 18:04:36 +01:00
|
|
|
toRegressedEnumValue,
|
|
|
|
startsWithANumber,
|
2022-03-15 11:51:43 +01:00
|
|
|
joinBy,
|
2022-03-28 11:17:49 +02:00
|
|
|
toKebabCase,
|
2023-06-06 10:58:36 +02:00
|
|
|
} from './string-formatting';
|
2023-07-19 17:28:08 +02:00
|
|
|
import { removeUndefined, keysDeep } from './object-formatting';
|
|
|
|
import { getConfigUrls, getAbsoluteAdminUrl, getAbsoluteServerUrl } from './config';
|
|
|
|
import { generateTimestampCode } from './code-generator';
|
|
|
|
import * as contentTypes from './content-types';
|
|
|
|
import env from './env-helper';
|
|
|
|
import * as relations from './relations';
|
|
|
|
import setCreatorFields from './set-creator-fields';
|
|
|
|
import * as hooks from './hooks';
|
|
|
|
import providerFactory from './provider-factory';
|
|
|
|
import * as pagination from './pagination';
|
|
|
|
import sanitize from './sanitize';
|
|
|
|
import traverseEntity from './traverse-entity';
|
|
|
|
import { pipeAsync, mapAsync, reduceAsync, forEachAsync } from './async';
|
|
|
|
import convertQueryParams from './convert-query-params';
|
|
|
|
import importDefault from './import-default';
|
|
|
|
import * as template from './template';
|
|
|
|
import * as file from './file';
|
|
|
|
import * as traverse from './traverse';
|
|
|
|
import webhook from './webhook';
|
|
|
|
import { isOperator, isOperatorOfType } from './operators';
|
|
|
|
|
|
|
|
export = {
|
|
|
|
parseMultipartData,
|
|
|
|
parseType,
|
|
|
|
policy,
|
|
|
|
templateConfiguration,
|
|
|
|
yup,
|
|
|
|
handleYupError,
|
|
|
|
validateYupSchema,
|
|
|
|
validateYupSchemaSync,
|
|
|
|
errors,
|
|
|
|
nameToSlug,
|
|
|
|
nameToCollectionName,
|
|
|
|
getCommonBeginning,
|
|
|
|
escapeQuery,
|
|
|
|
stringIncludes,
|
|
|
|
stringEquals,
|
|
|
|
isKebabCase,
|
|
|
|
isCamelCase,
|
|
|
|
toRegressedEnumValue,
|
|
|
|
startsWithANumber,
|
|
|
|
joinBy,
|
|
|
|
toKebabCase,
|
|
|
|
removeUndefined,
|
|
|
|
keysDeep,
|
|
|
|
getConfigUrls,
|
|
|
|
getAbsoluteAdminUrl,
|
|
|
|
getAbsoluteServerUrl,
|
|
|
|
generateTimestampCode,
|
|
|
|
contentTypes,
|
|
|
|
env,
|
|
|
|
relations,
|
|
|
|
setCreatorFields,
|
|
|
|
hooks,
|
|
|
|
providerFactory,
|
|
|
|
pagination,
|
|
|
|
sanitize,
|
|
|
|
traverseEntity,
|
|
|
|
pipeAsync,
|
|
|
|
mapAsync,
|
|
|
|
reduceAsync,
|
|
|
|
forEachAsync,
|
|
|
|
convertQueryParams,
|
|
|
|
importDefault,
|
|
|
|
template,
|
|
|
|
file,
|
|
|
|
traverse,
|
|
|
|
webhook,
|
|
|
|
isOperator,
|
|
|
|
isOperatorOfType,
|
|
|
|
};
|