chore: Run prettier on studio/data/api folder (#18261)

* Remove studio/data to not be ignored when running prettier.

* Run prettier format on the whole repo.

* Run prettier format after each codegen.
This commit is contained in:
Ivan Vasilov authored and GitHub committed 2023-10-17 10:50:48 +02:00
1 parent cd90837aa5
commit a7f88c8611
5 files changed
+7109 -6865

No files matched your search

-1
View File
@@ -19,4 +19,3 @@ studio/.storybook
studio/.swc
studio/.turbo
studio/node
studio/data
+7103 -6857
View File
File diff suppressed because it is too large. Load diff
@@ -14,13 +14,13 @@ export async function downloadBackup({ ref, backup }: BackupDownloadVariables) {
const { data, error } = await post('/platform/database/{ref}/backups/download', {
params: { path: { ref } },
body: {
id: backup.id, // this is the only one needed actually
id: backup.id, // this is the only one needed actually
inserted_at: backup.inserted_at,
project_id: backup.project_id,
project_id: backup.project_id,
data: {},
s3_bucket: 'deprecated',
s3_path: 'deprecated',
status: 'deprecated'
status: 'deprecated',
},
})
if (error) throw error
+2 -3
View File
@@ -19,7 +19,7 @@ export const getTableColumnsQuery = (table?: string, schema?: string) => {
conditions.push(`schemaname = '${schema}'`)
}
const whereClause = conditions.length > 0 ? `WHERE ${conditions.join(' AND ')}` : '';
const whereClause = conditions.length > 0 ? `WHERE ${conditions.join(' AND ')}` : ''
const sql = /* SQL */ `
@@ -89,7 +89,7 @@ export type TableColumnsVariables = {
projectRef?: string
connectionString?: string
table?: string
schema?: string;
schema?: string
}
export type TableColumnsData = { result: TableColumn[] }
@@ -99,7 +99,6 @@ export const useTableColumnsQuery = <TData extends TableColumnsData = TableColum
{ projectRef, connectionString, table, schema }: TableColumnsVariables,
options: UseQueryOptions<ExecuteSqlData, TableColumnsError, TData> = {}
) => {
return useExecuteSqlQuery(
{
projectRef,
+1 -1
View File
@@ -14,7 +14,7 @@
"build-storybook": "build-storybook",
"prettier:check": "prettier --check .",
"prettier:write": "prettier --write .",
"codegen": "openapi-typescript http://localhost:8080/api-json -o ./data/api.d.ts"
"codegen": "openapi-typescript http://localhost:8080/api-json -o data/api.d.ts && prettier --write data/api.d.ts"
},
"dependencies": {
"@dagrejs/dagre": "^1.0.2",