mirror of
https://github.com/directus/directus.git
synced 2026-01-30 14:58:07 -05:00
Fix build
This commit is contained in:
@@ -43,5 +43,3 @@ export const FILTER_VARIABLES = ['$NOW', '$CURRENT_USER', '$CURRENT_ROLE'];
|
||||
export const ALIAS_TYPES = ['alias', 'o2m', 'm2m', 'm2a', 'files', 'files', 'translations'];
|
||||
|
||||
export const COLUMN_TRANSFORMS = ['year', 'month', 'day', 'weekday', 'hour', 'minute', 'second'];
|
||||
|
||||
export const REGEX_BETWEEN_PARENS = /\(([^)]+)\)/;
|
||||
|
||||
@@ -20,7 +20,7 @@ import { getSchema } from './utils/get-schema';
|
||||
|
||||
import * as services from './services';
|
||||
import { schedule, validate } from 'node-cron';
|
||||
import { REGEX_BETWEEN_PARENS } from './constants';
|
||||
import { REGEX_BETWEEN_PARENS } from '@directus/shared/constants';
|
||||
import { rollup } from 'rollup';
|
||||
// @TODO Remove this once a new version of @rollup/plugin-virtual has been released
|
||||
// @ts-expect-error
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { REGEX_BETWEEN_PARENS } from '../constants';
|
||||
import { REGEX_BETWEEN_PARENS } from '@directus/shared/constants';
|
||||
|
||||
/**
|
||||
* Takes in a column name, and transforms the original name with the generated column name based on
|
||||
|
||||
@@ -25,7 +25,7 @@ export default function applyQuery(
|
||||
dbQuery.orderBy(
|
||||
query.sort.map((sort) => ({
|
||||
...sort,
|
||||
column: getColumn(knex, collection, sort.column, false) as any,
|
||||
column: getColumn(knex, collection, sort.column) as any,
|
||||
}))
|
||||
);
|
||||
}
|
||||
@@ -304,7 +304,8 @@ export function applyFilter(
|
||||
const [table, column] = key.split('.');
|
||||
|
||||
// Is processed through Knex.Raw, so should be safe to string-inject into these where queries
|
||||
const selectionRaw = getColumn(knex, table, column, false) as any;
|
||||
const selectionRaw = getColumn(knex, table, column) as any;
|
||||
|
||||
// Knex supports "raw" in the columnName parameter, but isn't typed as such. Too bad..
|
||||
// See https://github.com/knex/knex/issues/4518 @TODO remove as any once knex is updated
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Knex } from 'knex';
|
||||
import { FunctionsHelper } from '../database/functions';
|
||||
import { REGEX_BETWEEN_PARENS } from '../constants';
|
||||
import { REGEX_BETWEEN_PARENS } from '@directus/shared/constants';
|
||||
import { applyFunctionToColumnName } from './apply-function-to-column-name';
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { REGEX_BETWEEN_PARENS } from '../constants';
|
||||
import { REGEX_BETWEEN_PARENS } from '@directus/shared/constants';
|
||||
|
||||
/**
|
||||
* Strip the function declarations from a list of fields
|
||||
|
||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -59830,7 +59830,7 @@
|
||||
"mime": "2.5.2",
|
||||
"mitt": "3.0.0",
|
||||
"nanoid": "3.1.23",
|
||||
"p-queue": "*",
|
||||
"p-queue": "^6.6.2",
|
||||
"pinia": "2.0.0-beta.5",
|
||||
"prettier": "2.3.2",
|
||||
"pretty-ms": "7.0.1",
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
export * from './extensions';
|
||||
export * from './fields';
|
||||
export * from './regex';
|
||||
export * from './symbols';
|
||||
|
||||
1
packages/shared/src/constants/regex.ts
Normal file
1
packages/shared/src/constants/regex.ts
Normal file
@@ -0,0 +1 @@
|
||||
export const REGEX_BETWEEN_PARENS = /\(([^)]+)\)/;
|
||||
Reference in New Issue
Block a user