Patch Tuesday 🐸 (#17530)

* Update root deps

* Reformat files with new prettier version

* Update `directus` deps

* Update `@directus/app` deps

* Update `@directus/shared` deps

* Update components snapshots after updates

prop order has changed

* Update `extensions-sdk` deps

* pin version of zod in shared

* Update `@directus/storage` deps

* Update `@directus/storage-driver-azure` deps

* Update `storage-driver-cloudinary` deps

* Update `@directus/storage-driver-cloudinary` deps

* Update `@directus/storage-driver-local` deps

* Update `@directus/storage-driver-s3` deps

* Update `@directus/utils` deps

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
This commit is contained in:
Pascal Jufer
2023-02-16 10:47:39 +01:00
committed by GitHub
parent 89fbac36ce
commit 37faf3bd5d
66 changed files with 1978 additions and 1913 deletions

View File

@@ -5,7 +5,7 @@ export class SchemaHelperCockroachDb extends SchemaHelper {
async changeToType(
table: string,
column: string,
type: typeof KNEX_TYPES[number],
type: (typeof KNEX_TYPES)[number],
options: Options = {}
): Promise<void> {
await this.changeToTypeByCopy(table, column, type, options);

View File

@@ -6,7 +6,7 @@ export class SchemaHelperOracle extends SchemaHelper {
async changeToType(
table: string,
column: string,
type: typeof KNEX_TYPES[number],
type: (typeof KNEX_TYPES)[number],
options: Options = {}
): Promise<void> {
await this.changeToTypeByCopy(table, column, type, options);

View File

@@ -25,7 +25,7 @@ export abstract class SchemaHelper extends DatabaseHelper {
async changeToType(
table: string,
column: string,
type: typeof KNEX_TYPES[number],
type: (typeof KNEX_TYPES)[number],
options: Options = {}
): Promise<void> {
await this.knex.schema.alterTable(table, (builder) => {
@@ -50,7 +50,7 @@ export abstract class SchemaHelper extends DatabaseHelper {
protected async changeToTypeByCopy(
table: string,
column: string,
type: typeof KNEX_TYPES[number],
type: (typeof KNEX_TYPES)[number],
options: Options
): Promise<void> {
const tempName = `${column}__temp`;

View File

@@ -670,8 +670,8 @@ export class FieldsService {
column = table.timestamp(field.field, { useTz: true });
} else if (field.type.startsWith('geometry')) {
column = this.helpers.st.createColumn(table, field);
} else if (KNEX_TYPES.includes(field.type as typeof KNEX_TYPES[number])) {
column = table[field.type as typeof KNEX_TYPES[number]](field.field);
} else if (KNEX_TYPES.includes(field.type as (typeof KNEX_TYPES)[number])) {
column = table[field.type as (typeof KNEX_TYPES)[number]](field.field);
} else {
throw new InvalidPayloadException(`Illegal type passed: "${field.type}"`);
}

View File

@@ -56,7 +56,7 @@ export const TransformationMethods /*: readonly (keyof Sharp)[]*/ = [
] as const;
// Helper types
type AllowedSharpMethods = Pick<Sharp, typeof TransformationMethods[number]>;
type AllowedSharpMethods = Pick<Sharp, (typeof TransformationMethods)[number]>;
export type TransformationMap = {
[M in keyof AllowedSharpMethods]: readonly [M, ...Parameters<AllowedSharpMethods[M]>];

View File

@@ -1,4 +1,4 @@
export type Driver = 'mysql' | 'pg' | 'cockroachdb' | 'sqlite3' | 'oracledb' | 'mssql';
export const DatabaseClients = ['mysql', 'postgres', 'cockroachdb', 'sqlite', 'oracle', 'mssql', 'redshift'] as const;
export type DatabaseClient = typeof DatabaseClients[number];
export type DatabaseClient = (typeof DatabaseClients)[number];