Skip to content

Commit bdce5bc

Browse files
committed
style: apply eslint --fix to files merged from main
1 parent edfe11f commit bdce5bc

5 files changed

Lines changed: 63 additions & 67 deletions

File tree

pgpm/cli/src/commands/export.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { PgpmPackage } from '@pgpmjs/core';
2-
import { exportMigrations, exportGraphQL, GraphQLClient, graphqlRowToPostgresRow, isExportGranularity, EXPORT_GRANULARITIES, parsePartitionConfig, PartitionConfig } from '@pgpmjs/export';
32
import { getEnvOptions } from '@pgpmjs/env';
3+
import { EXPORT_GRANULARITIES, exportGraphQL, exportMigrations, GraphQLClient, graphqlRowToPostgresRow, isExportGranularity, parsePartitionConfig, PartitionConfig } from '@pgpmjs/export';
44
import { getGitConfigInfo } from '@pgpmjs/types';
55
import { CLIOptions, Inquirerer } from 'inquirerer';
66
import { resolve } from 'path';

pgpm/cli/src/commands/transform.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ import {
77
loadModuleSource,
88
parsePartitionConfig,
99
PartitionConfig,
10-
partitionExportRows,
1110
PartitionedPackageRows,
11+
partitionExportRows,
1212
restructureExportRows,
1313
snapshotCatalog
1414
} from '@pgpmjs/export';
1515
import { Logger } from '@pgpmjs/logger';
1616
import { PartitionCycleError } from '@pgpmjs/transform';
1717
import * as fs from 'fs';
18-
import { CLIOptions, cliExitWithError, Inquirerer, ParsedArgs } from 'inquirerer';
18+
import { cliExitWithError, CLIOptions, Inquirerer, ParsedArgs } from 'inquirerer';
1919
import * as path from 'path';
2020
import { getPgPool } from 'pg-cache';
2121
import type { PgConfig } from 'pg-env';

pgpm/export/src/export-graphql.ts

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,27 @@
77
* Per Dan's guidance: "I would NOT do branching in those existing files.
88
* I would make the GraphQL flow its entire own flow at first."
99
*/
10-
import { Inquirerer } from 'inquirerer';
11-
1210
import { PgpmPackage, PgpmRow, SqlWriteOptions, writePgpmFiles, writePgpmPlan } from '@pgpmjs/core';
1311
import { createClient } from '@pgpmjs/migrate-client';
14-
import { GraphQLClient } from './graphql-client';
12+
import { Inquirerer } from 'inquirerer';
13+
1514
import { exportGraphQLMeta } from './export-graphql-meta';
16-
import { graphqlRowToPostgresRow } from './graphql-naming';
17-
import { PartitionConfig, partitionExportRows } from './partition';
18-
import { ExportGranularity, restructureExportRows } from './restructure';
1915
import {
2016
DB_REQUIRED_EXTENSIONS,
21-
SERVICE_REQUIRED_EXTENSIONS,
22-
META_COMMON_HEADER,
23-
META_COMMON_FOOTER,
24-
META_TABLE_ORDER,
25-
Schema,
2617
detectMissingModules,
2718
installMissingModules,
2819
makeReplacer,
20+
META_COMMON_FOOTER,
21+
META_COMMON_HEADER,
22+
META_TABLE_ORDER,
23+
normalizeOutdir,
2924
preparePackage,
30-
normalizeOutdir
31-
} from './export-utils';
25+
Schema,
26+
SERVICE_REQUIRED_EXTENSIONS} from './export-utils';
27+
import { GraphQLClient } from './graphql-client';
28+
import { graphqlRowToPostgresRow } from './graphql-naming';
29+
import { PartitionConfig, partitionExportRows } from './partition';
30+
import { ExportGranularity, restructureExportRows } from './restructure';
3231

3332
// =============================================================================
3433
// Public API

pgpm/export/src/export-migrations.ts

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
1+
import { PgpmPackage, PgpmRow, SqlWriteOptions, writePgpmFiles, writePgpmPlan } from '@pgpmjs/core';
12
import { PgpmOptions } from '@pgpmjs/types';
23
import { Inquirerer } from 'inquirerer';
34
import { getPgPool } from 'pg-cache';
45

5-
import { PgpmPackage, PgpmRow, SqlWriteOptions, writePgpmFiles, writePgpmPlan } from '@pgpmjs/core';
66
import { exportMeta } from './export-meta';
7-
import { PartitionConfig, partitionExportRows } from './partition';
8-
import { ExportGranularity, restructureExportRows } from './restructure';
97
import {
108
DB_REQUIRED_EXTENSIONS,
11-
SERVICE_REQUIRED_EXTENSIONS,
12-
META_COMMON_HEADER,
13-
META_COMMON_FOOTER,
14-
META_TABLE_ORDER,
159
detectMissingModules,
1610
installMissingModules,
1711
makeReplacer,
12+
META_COMMON_FOOTER,
13+
META_COMMON_HEADER,
14+
META_TABLE_ORDER,
15+
normalizeOutdir,
1816
preparePackage,
19-
normalizeOutdir
20-
} from './export-utils';
17+
SERVICE_REQUIRED_EXTENSIONS} from './export-utils';
18+
import { PartitionConfig, partitionExportRows } from './partition';
19+
import { ExportGranularity, restructureExportRows } from './restructure';
2120

2221
interface ExportMigrationsToDiskOptions {
2322
project: PgpmPackage;
@@ -191,16 +190,16 @@ const exportMigrationsToDisk = async ({
191190
// it was set on and therefore cannot be relied upon across connections.
192191
const results = excludeCategories && excludeCategories.length > 0
193192
? await pgPool.query(
194-
`select * from db_migrate.sql_actions
193+
`select * from db_migrate.sql_actions
195194
where database_id = $1
196195
and (category is null or category != ALL($2::text[]))
197196
order by id`,
198-
[databaseId, excludeCategories]
199-
)
197+
[databaseId, excludeCategories]
198+
)
200199
: await pgPool.query(
201-
`select * from db_migrate.sql_actions where database_id = $1 order by id`,
202-
[databaseId]
203-
);
200+
`select * from db_migrate.sql_actions where database_id = $1 order by id`,
201+
[databaseId]
202+
);
204203

205204
// Registry fixtures — meta_registration actions that insert into
206205
// metaschema_public.* (e.g. pg_partman partition registration) — FK-reference
@@ -333,10 +332,10 @@ const exportMigrationsToDisk = async ({
333332
const metaReplacer = makeReplacer({
334333
schemas: metaSchemasForReplacement,
335334
name: metaExtensionName,
336-
// Use extensionName for schema prefix — the services metadata references
337-
// schemas owned by the application package (e.g. agent_db_auth_public),
338-
// not the services package (agent_db_services_auth_public)
339-
schemaPrefix: name
335+
// Use extensionName for schema prefix — the services metadata references
336+
// schemas owned by the application package (e.g. agent_db_auth_public),
337+
// not the services package (agent_db_services_auth_public)
338+
schemaPrefix: name
340339
});
341340

342341
// Create separate files for each table type

pgpm/export/src/index.ts

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,40 @@
1+
export type { CatalogQueryable, CatalogSnapshot } from './catalog-check';
2+
export { diffCatalogSnapshots, snapshotCatalog } from './catalog-check';
13
export * from './export-data';
2-
export * from './export-meta';
3-
export * from './export-migrations';
44
export * from './export-graphql';
55
export * from './export-graphql-meta';
6-
export { EXPORT_GRANULARITIES, isExportGranularity, restructureExportRows } from './restructure';
7-
export type { ExportGranularity, RestructureExportRowsOptions, RestructureExportRowsResult } from './restructure';
8-
export { loadModuleSource, stripTransactionWrapper } from './module-source';
9-
export type { ModuleSource, ModuleSourceChange } from './module-source';
10-
export { parsePartitionConfig, partitionExportRows } from './partition';
11-
export type { PartitionConfig, PartitionedPackageRows, PartitionExportRowsResult } from './partition';
12-
export { diffCatalogSnapshots, snapshotCatalog } from './catalog-check';
13-
export type { CatalogQueryable, CatalogSnapshot } from './catalog-check';
14-
export { GraphQLClient } from './graphql-client';
15-
export { getGraphQLQueryName, getGraphQLTypeName, graphqlRowToPostgresRow, buildFieldsFragment, mapGraphQLTypeToFieldType, unwrapGraphQLType, GraphQLTypeInfo } from './graphql-naming';
6+
export * from './export-meta';
7+
export * from './export-migrations';
8+
export type {
9+
FieldType,
10+
MakeReplacerOptions,
11+
MetaExportTableEntry,
12+
MissingModulesResult,
13+
PreparePackageOptions,
14+
ReplacerResult,
15+
Schema,
16+
TableConfig} from './export-utils';
1617
export {
1718
DB_REQUIRED_EXTENSIONS,
18-
SERVICE_REQUIRED_EXTENSIONS,
19-
META_COMMON_HEADER,
19+
detectMissingModules,
20+
installMissingModules,
21+
makeReplacer,
22+
mapPgTypeToFieldType,
2023
META_COMMON_FOOTER,
21-
META_TABLE_ORDER,
24+
META_COMMON_HEADER,
2225
META_TABLE_CONFIG,
26+
META_TABLE_ORDER,
2327
META_TABLE_OVERRIDES,
24-
mapPgTypeToFieldType,
25-
makeReplacer,
26-
preparePackage,
2728
normalizeOutdir,
28-
detectMissingModules,
29-
installMissingModules
30-
} from './export-utils';
31-
export type {
32-
FieldType,
33-
TableConfig,
34-
MetaExportTableEntry,
35-
Schema,
36-
MakeReplacerOptions,
37-
ReplacerResult,
38-
PreparePackageOptions,
39-
MissingModulesResult
40-
} from './export-utils';
41-
export { PG_TYPE_MAP, TypeMapEntry, lookupByPgUdt, lookupByGqlType } from './type-map';
29+
preparePackage,
30+
SERVICE_REQUIRED_EXTENSIONS} from './export-utils';
31+
export { GraphQLClient } from './graphql-client';
32+
export { buildFieldsFragment, getGraphQLQueryName, getGraphQLTypeName, graphqlRowToPostgresRow, GraphQLTypeInfo,mapGraphQLTypeToFieldType, unwrapGraphQLType } from './graphql-naming';
4233
export { intervalToPostgres, parsePgInterval, PgInterval } from './interval-utils';
34+
export type { ModuleSource, ModuleSourceChange } from './module-source';
35+
export { loadModuleSource, stripTransactionWrapper } from './module-source';
36+
export type { PartitionConfig, PartitionedPackageRows, PartitionExportRowsResult } from './partition';
37+
export { parsePartitionConfig, partitionExportRows } from './partition';
38+
export type { ExportGranularity, RestructureExportRowsOptions, RestructureExportRowsResult } from './restructure';
39+
export { EXPORT_GRANULARITIES, isExportGranularity, restructureExportRows } from './restructure';
40+
export { lookupByGqlType,lookupByPgUdt, PG_TYPE_MAP, TypeMapEntry } from './type-map';

0 commit comments

Comments
 (0)