diff --git a/packages/cli/package.json b/packages/cli/package.json index 0e41a759c..8c68d17a4 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -65,7 +65,7 @@ "pg-protocol": "^1.6.0", "roarr": "^7.11.0", "semver": "^7.3.8", - "slonik": "30.4.0", + "@silverhand/slonik": "31.0.0-beta.0", "slonik-interceptor-preset": "^1.2.10", "slonik-sql-tag-raw": "^1.1.4", "tar": "^6.1.11", diff --git a/packages/cli/src/commands/database/alteration/index.test.ts b/packages/cli/src/commands/database/alteration/index.test.ts index db289c21a..b05f21732 100644 --- a/packages/cli/src/commands/database/alteration/index.test.ts +++ b/packages/cli/src/commands/database/alteration/index.test.ts @@ -1,6 +1,6 @@ import { createMockUtils } from '@logto/shared/esm'; +import { createMockPool } from '@silverhand/slonik'; import Sinon from 'sinon'; -import { createMockPool } from 'slonik'; import { chooseAlterationsByVersion } from './version.js'; diff --git a/packages/cli/src/commands/database/alteration/index.ts b/packages/cli/src/commands/database/alteration/index.ts index 03a103243..16b47bd53 100644 --- a/packages/cli/src/commands/database/alteration/index.ts +++ b/packages/cli/src/commands/database/alteration/index.ts @@ -1,7 +1,7 @@ import type { AlterationScript } from '@logto/schemas/lib/types/alteration.js'; import { conditionalString } from '@silverhand/essentials'; +import type { DatabasePool } from '@silverhand/slonik'; import chalk from 'chalk'; -import type { DatabasePool } from 'slonik'; import type { CommandModule } from 'yargs'; import { createPoolFromConfig } from '../../../database.js'; diff --git a/packages/cli/src/commands/database/seed/cloud.ts b/packages/cli/src/commands/database/seed/cloud.ts index a6cc6446d..9dc8194a9 100644 --- a/packages/cli/src/commands/database/seed/cloud.ts +++ b/packages/cli/src/commands/database/seed/cloud.ts @@ -9,8 +9,8 @@ import { } from '@logto/schemas'; import { GlobalValues } from '@logto/shared'; import { appendPath } from '@silverhand/essentials'; -import type { CommonQueryMethods } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import { insertInto } from '../../../database.js'; import { consoleLog } from '../../../utils.js'; diff --git a/packages/cli/src/commands/database/seed/index.ts b/packages/cli/src/commands/database/seed/index.ts index 282c17087..84042b5ae 100644 --- a/packages/cli/src/commands/database/seed/index.ts +++ b/packages/cli/src/commands/database/seed/index.ts @@ -1,4 +1,4 @@ -import type { DatabasePool } from 'slonik'; +import type { DatabasePool } from '@silverhand/slonik'; import type { CommandModule } from 'yargs'; import { createPoolAndDatabaseIfNeeded } from '../../../database.js'; diff --git a/packages/cli/src/commands/database/seed/oidc-config.ts b/packages/cli/src/commands/database/seed/oidc-config.ts index 403342228..bc0308ef7 100644 --- a/packages/cli/src/commands/database/seed/oidc-config.ts +++ b/packages/cli/src/commands/database/seed/oidc-config.ts @@ -4,8 +4,8 @@ import type { LogtoOidcConfigType } from '@logto/schemas'; import { LogtoOidcConfigKey, logtoConfigGuards } from '@logto/schemas'; import { generateStandardId } from '@logto/shared'; import { getEnvAsStringArray } from '@silverhand/essentials'; +import type { DatabaseTransactionConnection } from '@silverhand/slonik'; import chalk from 'chalk'; -import type { DatabaseTransactionConnection } from 'slonik'; import { z } from 'zod'; import { getRowsByKeys, updateValueByKey } from '../../../queries/logto-config.js'; diff --git a/packages/cli/src/commands/database/seed/tables.ts b/packages/cli/src/commands/database/seed/tables.ts index 05430a277..233d3312e 100644 --- a/packages/cli/src/commands/database/seed/tables.ts +++ b/packages/cli/src/commands/database/seed/tables.ts @@ -29,8 +29,8 @@ import { import { getTenantRole } from '@logto/schemas'; import { Tenants } from '@logto/schemas/models'; import { generateStandardId } from '@logto/shared'; -import type { DatabaseTransactionConnection } from 'slonik'; -import { sql } from 'slonik'; +import type { DatabaseTransactionConnection } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import { raw } from 'slonik-sql-tag-raw'; import { insertInto } from '../../../database.js'; diff --git a/packages/cli/src/commands/database/seed/tenant-organizations.ts b/packages/cli/src/commands/database/seed/tenant-organizations.ts index 01c99a1b9..ab6a4aaa1 100644 --- a/packages/cli/src/commands/database/seed/tenant-organizations.ts +++ b/packages/cli/src/commands/database/seed/tenant-organizations.ts @@ -12,7 +12,7 @@ import { getTenantOrganizationCreateData, Organizations, } from '@logto/schemas'; -import type { DatabaseTransactionConnection } from 'slonik'; +import type { DatabaseTransactionConnection } from '@silverhand/slonik'; import { insertInto } from '../../../database.js'; import { consoleLog } from '../../../utils.js'; diff --git a/packages/cli/src/commands/database/seed/tenant.ts b/packages/cli/src/commands/database/seed/tenant.ts index 0a2f9ca47..c85c0548b 100644 --- a/packages/cli/src/commands/database/seed/tenant.ts +++ b/packages/cli/src/commands/database/seed/tenant.ts @@ -17,8 +17,8 @@ import { } from '@logto/schemas'; import { generateStandardId } from '@logto/shared'; import { assert } from '@silverhand/essentials'; -import type { CommonQueryMethods, DatabaseTransactionConnection } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods, DatabaseTransactionConnection } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import { raw } from 'slonik-sql-tag-raw'; import { insertInto } from '../../../database.js'; diff --git a/packages/cli/src/database.ts b/packages/cli/src/database.ts index b68007f8d..7cdd88731 100644 --- a/packages/cli/src/database.ts +++ b/packages/cli/src/database.ts @@ -1,8 +1,8 @@ import type { SchemaLike } from '@logto/schemas'; import { assert } from '@silverhand/essentials'; +import { createPool, parseDsn, sql, stringifyDsn } from '@silverhand/slonik'; import decamelize from 'decamelize'; import { DatabaseError } from 'pg-protocol'; -import { createPool, parseDsn, sql, stringifyDsn } from 'slonik'; import { createInterceptors } from 'slonik-interceptor-preset'; import { convertToPrimitiveOrSql } from './sql.js'; diff --git a/packages/cli/src/queries/database.ts b/packages/cli/src/queries/database.ts index 5ba83752c..2f8f715a4 100644 --- a/packages/cli/src/queries/database.ts +++ b/packages/cli/src/queries/database.ts @@ -1,5 +1,5 @@ -import type { CommonQueryMethods } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; export const getDatabaseName = async (pool: CommonQueryMethods, normalized = false) => { const { currentDatabase } = await pool.one<{ currentDatabase: string }>(sql` diff --git a/packages/cli/src/queries/logto-config.ts b/packages/cli/src/queries/logto-config.ts index e8e0f1fcd..1abca8fb1 100644 --- a/packages/cli/src/queries/logto-config.ts +++ b/packages/cli/src/queries/logto-config.ts @@ -1,8 +1,8 @@ import type { LogtoConfig, LogtoConfigKey, logtoConfigGuards } from '@logto/schemas'; import { LogtoConfigs } from '@logto/schemas'; import type { Nullable } from '@silverhand/essentials'; -import type { CommonQueryMethods } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import type { z } from 'zod'; import { convertToIdentifiers } from '../sql.js'; diff --git a/packages/cli/src/queries/system.test.ts b/packages/cli/src/queries/system.test.ts index 6d77c540f..26d68a488 100644 --- a/packages/cli/src/queries/system.test.ts +++ b/packages/cli/src/queries/system.test.ts @@ -1,6 +1,6 @@ import { AlterationStateKey, Systems } from '@logto/schemas'; +import { createMockPool, createMockQueryResult, sql } from '@silverhand/slonik'; import { DatabaseError } from 'pg-protocol'; -import { createMockPool, createMockQueryResult, sql } from 'slonik'; import { convertToIdentifiers } from '../sql.js'; import type { QueryType } from '../test-utils.js'; diff --git a/packages/cli/src/queries/system.ts b/packages/cli/src/queries/system.ts index 1e278614b..e6d274bcc 100644 --- a/packages/cli/src/queries/system.ts +++ b/packages/cli/src/queries/system.ts @@ -1,9 +1,9 @@ import type { AlterationState, System, SystemKey } from '@logto/schemas'; import { systemGuards, Systems, AlterationStateKey } from '@logto/schemas'; import type { Nullable } from '@silverhand/essentials'; +import type { CommonQueryMethods, DatabaseTransactionConnection } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import { DatabaseError } from 'pg-protocol'; -import type { CommonQueryMethods, DatabaseTransactionConnection } from 'slonik'; -import { sql } from 'slonik'; import type { z } from 'zod'; import { convertToIdentifiers } from '../sql.js'; diff --git a/packages/cli/src/sql.ts b/packages/cli/src/sql.ts index b02bcca83..a7f23157a 100644 --- a/packages/cli/src/sql.ts +++ b/packages/cli/src/sql.ts @@ -8,7 +8,7 @@ */ import { type SchemaValue, type SchemaValuePrimitive, type Table } from '@logto/shared'; -import { type IdentifierSqlToken, type SqlToken, sql } from 'slonik'; +import { type IdentifierSqlToken, type SqlToken, sql } from '@silverhand/slonik'; /** * Note `undefined` is removed from the acceptable list, diff --git a/packages/cli/src/test-utils.ts b/packages/cli/src/test-utils.ts index ce1310ed3..574a0c597 100644 --- a/packages/cli/src/test-utils.ts +++ b/packages/cli/src/test-utils.ts @@ -1,7 +1,7 @@ // Copied from core -import type { QueryResult, QueryResultRow } from 'slonik'; -import type { PrimitiveValueExpression } from 'slonik/dist/src/types.js'; +import type { QueryResult, QueryResultRow } from '@silverhand/slonik'; +import type { PrimitiveValueExpression } from '@silverhand/slonik/dist/src/types.js'; export type QueryType = ( sql: string, diff --git a/packages/core/package.json b/packages/core/package.json index 7dd1731bd..739448f0c 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -85,7 +85,7 @@ "roarr": "^7.11.0", "samlify": "2.8.10", "semver": "^7.3.8", - "slonik": "30.4.0", + "@silverhand/slonik": "31.0.0-beta.0", "slonik-interceptor-preset": "^1.2.10", "slonik-sql-tag-raw": "^1.1.4", "snake-case": "^3.0.4", diff --git a/packages/core/src/database/delete-by-id.ts b/packages/core/src/database/delete-by-id.ts index 36d073e26..c98d110a4 100644 --- a/packages/core/src/database/delete-by-id.ts +++ b/packages/core/src/database/delete-by-id.ts @@ -1,4 +1,4 @@ -import { type CommonQueryMethods, sql } from 'slonik'; +import { type CommonQueryMethods, sql } from '@silverhand/slonik'; import { DeletionError } from '#src/errors/SlonikError/index.js'; diff --git a/packages/core/src/database/find-all-entities.ts b/packages/core/src/database/find-all-entities.ts index 157735e60..41e6a64da 100644 --- a/packages/core/src/database/find-all-entities.ts +++ b/packages/core/src/database/find-all-entities.ts @@ -1,5 +1,5 @@ import { type GeneratedSchema, type SchemaLike } from '@logto/schemas'; -import { sql, type CommonQueryMethods } from 'slonik'; +import { sql, type CommonQueryMethods } from '@silverhand/slonik'; import { conditionalSql, convertToIdentifiers, manyRows } from '#src/utils/sql.js'; diff --git a/packages/core/src/database/find-entity-by-id.ts b/packages/core/src/database/find-entity-by-id.ts index ed37f0e11..3454dbddd 100644 --- a/packages/core/src/database/find-entity-by-id.ts +++ b/packages/core/src/database/find-entity-by-id.ts @@ -1,6 +1,6 @@ import type { SchemaLike, GeneratedSchema } from '@logto/schemas'; -import type { CommonQueryMethods } from 'slonik'; -import { sql, NotFoundError } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { sql, NotFoundError } from '@silverhand/slonik'; import RequestError from '#src/errors/RequestError/index.js'; import assertThat from '#src/utils/assert-that.js'; diff --git a/packages/core/src/database/insert-into.ts b/packages/core/src/database/insert-into.ts index 87ba7e6f8..917395921 100644 --- a/packages/core/src/database/insert-into.ts +++ b/packages/core/src/database/insert-into.ts @@ -1,7 +1,7 @@ import type { GeneratedSchema, SchemaLike } from '@logto/schemas'; import { has } from '@silverhand/essentials'; -import type { CommonQueryMethods, IdentifierSqlToken } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods, IdentifierSqlToken } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import { InsertionError } from '#src/errors/SlonikError/index.js'; import assertThat from '#src/utils/assert-that.js'; diff --git a/packages/core/src/database/row-count.ts b/packages/core/src/database/row-count.ts index a56fe4489..66b1ee2dd 100644 --- a/packages/core/src/database/row-count.ts +++ b/packages/core/src/database/row-count.ts @@ -1,7 +1,7 @@ import { type GeneratedSchema } from '@logto/schemas'; import { type SchemaLike } from '@logto/shared'; -import type { CommonQueryMethods, IdentifierSqlToken } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods, IdentifierSqlToken } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import { type SearchOptions, buildSearchSql } from './utils.js'; diff --git a/packages/core/src/database/update-where.ts b/packages/core/src/database/update-where.ts index a4173d53f..d602ab0f4 100644 --- a/packages/core/src/database/update-where.ts +++ b/packages/core/src/database/update-where.ts @@ -2,8 +2,8 @@ import type { SchemaLike, GeneratedSchema, SchemaValue } from '@logto/schemas'; import type { UpdateWhereData } from '@logto/shared'; import type { Truthy } from '@silverhand/essentials'; import { notFalsy } from '@silverhand/essentials'; -import type { CommonQueryMethods } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import { UpdateError } from '#src/errors/SlonikError/index.js'; import assertThat from '#src/utils/assert-that.js'; diff --git a/packages/core/src/database/utils.ts b/packages/core/src/database/utils.ts index 64432e8c2..5c210be81 100644 --- a/packages/core/src/database/utils.ts +++ b/packages/core/src/database/utils.ts @@ -1,6 +1,6 @@ import { type GeneratedSchema } from '@logto/schemas'; import { type SchemaLike, type Table } from '@logto/shared'; -import { type SqlSqlToken, sql } from 'slonik'; +import { type SqlSqlToken, sql } from '@silverhand/slonik'; import { conditionalSql, convertToIdentifiers } from '#src/utils/sql.js'; diff --git a/packages/core/src/env-set/check-alteration-state.ts b/packages/core/src/env-set/check-alteration-state.ts index aa7e82b8c..42eaad7c1 100644 --- a/packages/core/src/env-set/check-alteration-state.ts +++ b/packages/core/src/env-set/check-alteration-state.ts @@ -1,6 +1,6 @@ import { getAvailableAlterations } from '@logto/cli/lib/commands/database/alteration/index.js'; +import type { DatabasePool } from '@silverhand/slonik'; import chalk from 'chalk'; -import type { DatabasePool } from 'slonik'; import { consoleLog } from '#src/utils/console.js'; diff --git a/packages/core/src/env-set/create-pool.ts b/packages/core/src/env-set/create-pool.ts index f0863109f..8da01be56 100644 --- a/packages/core/src/env-set/create-pool.ts +++ b/packages/core/src/env-set/create-pool.ts @@ -1,5 +1,5 @@ import { assert } from '@silverhand/essentials'; -import { createMockPool, createMockQueryResult, createPool, parseDsn } from 'slonik'; +import { createMockPool, createMockQueryResult, createPool, parseDsn } from '@silverhand/slonik'; import { createInterceptors } from 'slonik-interceptor-preset'; const createPoolByEnv = async ( diff --git a/packages/core/src/env-set/index.ts b/packages/core/src/env-set/index.ts index 7fb599dac..25c6ca795 100644 --- a/packages/core/src/env-set/index.ts +++ b/packages/core/src/env-set/index.ts @@ -1,7 +1,7 @@ import { GlobalValues } from '@logto/shared'; import type { Optional } from '@silverhand/essentials'; import { appendPath } from '@silverhand/essentials'; -import type { DatabasePool } from 'slonik'; +import type { DatabasePool } from '@silverhand/slonik'; import { createLogtoConfigLibrary } from '#src/libraries/logto-config.js'; import { createLogtoConfigQueries } from '#src/queries/logto-config.js'; diff --git a/packages/core/src/errors/SlonikError/index.ts b/packages/core/src/errors/SlonikError/index.ts index a816c8d63..f589014b9 100644 --- a/packages/core/src/errors/SlonikError/index.ts +++ b/packages/core/src/errors/SlonikError/index.ts @@ -1,6 +1,6 @@ import type { SchemaLike, GeneratedSchema } from '@logto/schemas'; import type { UpdateWhereData } from '@logto/shared'; -import { SlonikError } from 'slonik'; +import { SlonikError } from '@silverhand/slonik'; import { type OmitAutoSetFields } from '#src/utils/sql.js'; diff --git a/packages/core/src/errors/SlonikError/slonik-error.test.ts b/packages/core/src/errors/SlonikError/slonik-error.test.ts index e5df10ff2..3f65510e0 100644 --- a/packages/core/src/errors/SlonikError/slonik-error.test.ts +++ b/packages/core/src/errors/SlonikError/slonik-error.test.ts @@ -1,4 +1,4 @@ -import { SlonikError } from 'slonik'; +import { SlonikError } from '@silverhand/slonik'; import { DeletionError } from './index.js'; diff --git a/packages/core/src/include.d/slonik-interceptor-preset.d.ts b/packages/core/src/include.d/slonik-interceptor-preset.d.ts index 778cb40c0..56d32a8c9 100644 --- a/packages/core/src/include.d/slonik-interceptor-preset.d.ts +++ b/packages/core/src/include.d/slonik-interceptor-preset.d.ts @@ -1,5 +1,5 @@ declare module 'slonik-interceptor-preset' { - import type { Interceptor } from 'slonik'; + import type { Interceptor } from '@silverhand/slonik'; export const createInterceptors: (config?: { benchmarkQueries: boolean; diff --git a/packages/core/src/middleware/koa-auth/utils.ts b/packages/core/src/middleware/koa-auth/utils.ts index 19f08310f..9796f8d4b 100644 --- a/packages/core/src/middleware/koa-auth/utils.ts +++ b/packages/core/src/middleware/koa-auth/utils.ts @@ -8,8 +8,8 @@ import { LogtoConfigs, } from '@logto/schemas'; import { appendPath } from '@silverhand/essentials'; +import { sql } from '@silverhand/slonik'; import type { JWK } from 'jose'; -import { sql } from 'slonik'; import { EnvSet, getTenantEndpoint } from '#src/env-set/index.js'; import { exportJWK } from '#src/utils/jwks.js'; diff --git a/packages/core/src/middleware/koa-slonik-error-handler.test.ts b/packages/core/src/middleware/koa-slonik-error-handler.test.ts index e843e1e83..04a051aed 100644 --- a/packages/core/src/middleware/koa-slonik-error-handler.test.ts +++ b/packages/core/src/middleware/koa-slonik-error-handler.test.ts @@ -1,5 +1,9 @@ import { Users } from '@logto/schemas'; -import { NotFoundError, SlonikError, UniqueIntegrityConstraintViolationError } from 'slonik'; +import { + NotFoundError, + SlonikError, + UniqueIntegrityConstraintViolationError, +} from '@silverhand/slonik'; import RequestError from '#src/errors/RequestError/index.js'; import { DeletionError, InsertionError, UpdateError } from '#src/errors/SlonikError/index.js'; diff --git a/packages/core/src/middleware/koa-slonik-error-handler.ts b/packages/core/src/middleware/koa-slonik-error-handler.ts index d5f528165..8d8dc5f1b 100644 --- a/packages/core/src/middleware/koa-slonik-error-handler.ts +++ b/packages/core/src/middleware/koa-slonik-error-handler.ts @@ -1,12 +1,12 @@ import type { SchemaLike } from '@logto/schemas'; -import type { Middleware } from 'koa'; import { SlonikError, NotFoundError, InvalidInputError, CheckIntegrityConstraintViolationError, UniqueIntegrityConstraintViolationError, -} from 'slonik'; +} from '@silverhand/slonik'; +import type { Middleware } from 'koa'; import RequestError from '#src/errors/RequestError/index.js'; import { DeletionError, InsertionError, UpdateError } from '#src/errors/SlonikError/index.js'; diff --git a/packages/core/src/queries/application-sign-in-experience.ts b/packages/core/src/queries/application-sign-in-experience.ts index b29cd0af8..3a9e0f157 100644 --- a/packages/core/src/queries/application-sign-in-experience.ts +++ b/packages/core/src/queries/application-sign-in-experience.ts @@ -1,5 +1,5 @@ import { ApplicationSignInExperiences, type ApplicationSignInExperience } from '@logto/schemas'; -import { sql, type CommonQueryMethods } from 'slonik'; +import { sql, type CommonQueryMethods } from '@silverhand/slonik'; import { buildInsertIntoWithPool } from '#src/database/insert-into.js'; import { buildUpdateWhereWithPool } from '#src/database/update-where.js'; diff --git a/packages/core/src/queries/application-user-consent-organizations.ts b/packages/core/src/queries/application-user-consent-organizations.ts index d69d6ab07..f50fc90f8 100644 --- a/packages/core/src/queries/application-user-consent-organizations.ts +++ b/packages/core/src/queries/application-user-consent-organizations.ts @@ -4,7 +4,7 @@ import { Organizations, Users, } from '@logto/schemas'; -import { sql, type CommonQueryMethods } from 'slonik'; +import { sql, type CommonQueryMethods } from '@silverhand/slonik'; import RelationQueries from '#src/utils/RelationQueries.js'; import { convertToIdentifiers } from '#src/utils/sql.js'; diff --git a/packages/core/src/queries/application-user-consent-scopes.ts b/packages/core/src/queries/application-user-consent-scopes.ts index 97291b1c7..394be6c71 100644 --- a/packages/core/src/queries/application-user-consent-scopes.ts +++ b/packages/core/src/queries/application-user-consent-scopes.ts @@ -7,7 +7,7 @@ import { OrganizationScopes, Scopes, } from '@logto/schemas'; -import { sql, type CommonQueryMethods } from 'slonik'; +import { sql, type CommonQueryMethods } from '@silverhand/slonik'; import { buildInsertIntoWithPool } from '#src/database/insert-into.js'; import { DeletionError } from '#src/errors/SlonikError/index.js'; diff --git a/packages/core/src/queries/application.test.ts b/packages/core/src/queries/application.test.ts index 3c9a6ff68..ce1c7a2e9 100644 --- a/packages/core/src/queries/application.test.ts +++ b/packages/core/src/queries/application.test.ts @@ -1,5 +1,5 @@ import { Applications } from '@logto/schemas'; -import { createMockPool, createMockQueryResult, sql } from 'slonik'; +import { createMockPool, createMockQueryResult, sql } from '@silverhand/slonik'; import { snakeCase } from 'snake-case'; import { mockApplication } from '#src/__mocks__/index.js'; diff --git a/packages/core/src/queries/application.ts b/packages/core/src/queries/application.ts index eaf7b406d..31f7dbf42 100644 --- a/packages/core/src/queries/application.ts +++ b/packages/core/src/queries/application.ts @@ -1,7 +1,7 @@ import type { Application, CreateApplication } from '@logto/schemas'; import { ApplicationType, Applications, SearchJointMode } from '@logto/schemas'; -import type { CommonQueryMethods, SqlSqlToken } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods, SqlSqlToken } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import { buildFindEntityByIdWithPool } from '#src/database/find-entity-by-id.js'; import { buildInsertIntoWithPool } from '#src/database/insert-into.js'; diff --git a/packages/core/src/queries/applications-roles.ts b/packages/core/src/queries/applications-roles.ts index 8c70eb49f..e47dcfe74 100644 --- a/packages/core/src/queries/applications-roles.ts +++ b/packages/core/src/queries/applications-roles.ts @@ -1,8 +1,8 @@ import type { ApplicationsRole, CreateApplicationsRole, Role } from '@logto/schemas'; import { Roles, ApplicationsRoles, RolesScopes } from '@logto/schemas'; import { type Nullable } from '@silverhand/essentials'; -import type { CommonQueryMethods } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import { DeletionError } from '#src/errors/SlonikError/index.js'; import { convertToIdentifiers, conditionalSql } from '#src/utils/sql.js'; diff --git a/packages/core/src/queries/connector.test.ts b/packages/core/src/queries/connector.test.ts index c2e00f003..1aa740f0f 100644 --- a/packages/core/src/queries/connector.test.ts +++ b/packages/core/src/queries/connector.test.ts @@ -1,5 +1,5 @@ import { Connectors } from '@logto/schemas'; -import { createMockPool, createMockQueryResult, sql } from 'slonik'; +import { createMockPool, createMockQueryResult, sql } from '@silverhand/slonik'; import { mockConnector } from '#src/__mocks__/index.js'; import { DeletionError } from '#src/errors/SlonikError/index.js'; diff --git a/packages/core/src/queries/connector.ts b/packages/core/src/queries/connector.ts index c5e5b3bad..df4a4cd19 100644 --- a/packages/core/src/queries/connector.ts +++ b/packages/core/src/queries/connector.ts @@ -1,7 +1,7 @@ import type { Connector } from '@logto/schemas'; import { Connectors } from '@logto/schemas'; -import type { CommonQueryMethods } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import { type WellKnownCache } from '#src/caches/well-known.js'; import { buildInsertIntoWithPool } from '#src/database/insert-into.js'; diff --git a/packages/core/src/queries/custom-phrase.ts b/packages/core/src/queries/custom-phrase.ts index 49f59e6fc..aaa1ca29a 100644 --- a/packages/core/src/queries/custom-phrase.ts +++ b/packages/core/src/queries/custom-phrase.ts @@ -1,8 +1,8 @@ import type { CustomPhrase, Translation } from '@logto/schemas'; import { CustomPhrases } from '@logto/schemas'; import { generateStandardId } from '@logto/shared'; -import type { CommonQueryMethods } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import { type WellKnownCache } from '#src/caches/well-known.js'; import { buildInsertIntoWithPool } from '#src/database/insert-into.js'; diff --git a/packages/core/src/queries/daily-active-user.ts b/packages/core/src/queries/daily-active-user.ts index e3b815ab2..ea3c9dcf9 100644 --- a/packages/core/src/queries/daily-active-user.ts +++ b/packages/core/src/queries/daily-active-user.ts @@ -1,5 +1,5 @@ import { DailyActiveUsers } from '@logto/schemas'; -import { sql, type CommonQueryMethods } from 'slonik'; +import { sql, type CommonQueryMethods } from '@silverhand/slonik'; import { buildInsertIntoWithPool } from '#src/database/insert-into.js'; import { convertToIdentifiers } from '#src/utils/sql.js'; diff --git a/packages/core/src/queries/daily-token-usage.ts b/packages/core/src/queries/daily-token-usage.ts index f929a0647..f8520e74a 100644 --- a/packages/core/src/queries/daily-token-usage.ts +++ b/packages/core/src/queries/daily-token-usage.ts @@ -1,7 +1,7 @@ import { DailyTokenUsage } from '@logto/schemas'; import { generateStandardId } from '@logto/shared'; -import type { CommonQueryMethods } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import { getUtcStartOfTheDay } from '#src/oidc/utils.js'; import { convertToIdentifiers } from '#src/utils/sql.js'; diff --git a/packages/core/src/queries/domains.ts b/packages/core/src/queries/domains.ts index 5d29b0694..c312e6a32 100644 --- a/packages/core/src/queries/domains.ts +++ b/packages/core/src/queries/domains.ts @@ -1,6 +1,6 @@ import { type CreateDomain, type Domain, DomainStatus, Domains } from '@logto/schemas'; -import type { CommonQueryMethods } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import { buildFindEntityByIdWithPool } from '#src/database/find-entity-by-id.js'; import { buildInsertIntoWithPool } from '#src/database/insert-into.js'; diff --git a/packages/core/src/queries/hooks.ts b/packages/core/src/queries/hooks.ts index 1362a78ba..b87ee1178 100644 --- a/packages/core/src/queries/hooks.ts +++ b/packages/core/src/queries/hooks.ts @@ -1,7 +1,7 @@ import type { CreateHook } from '@logto/schemas'; import { Hooks } from '@logto/schemas'; -import type { CommonQueryMethods } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import { buildFindAllEntitiesWithPool } from '#src/database/find-all-entities.js'; import { buildFindEntityByIdWithPool } from '#src/database/find-entity-by-id.js'; diff --git a/packages/core/src/queries/log.ts b/packages/core/src/queries/log.ts index 263ee1160..be31bf98b 100644 --- a/packages/core/src/queries/log.ts +++ b/packages/core/src/queries/log.ts @@ -8,9 +8,9 @@ import { type LogKeyUnknown, } from '@logto/schemas'; import { conditional, conditionalArray } from '@silverhand/essentials'; +import { sql } from '@silverhand/slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; import { subDays } from 'date-fns'; -import { sql } from 'slonik'; -import type { CommonQueryMethods } from 'slonik'; import { buildFindEntityByIdWithPool } from '#src/database/find-entity-by-id.js'; import { buildInsertIntoWithPool } from '#src/database/insert-into.js'; diff --git a/packages/core/src/queries/logto-config.test.ts b/packages/core/src/queries/logto-config.test.ts index 10fef41b5..8b36b9099 100644 --- a/packages/core/src/queries/logto-config.test.ts +++ b/packages/core/src/queries/logto-config.test.ts @@ -4,7 +4,7 @@ import { LogtoOidcConfigKey, LogtoTenantConfigKey, } from '@logto/schemas'; -import { createMockPool, createMockQueryResult, sql } from 'slonik'; +import { createMockPool, createMockQueryResult, sql } from '@silverhand/slonik'; import { convertToIdentifiers } from '#src/utils/sql.js'; import { expectSqlAssert, type QueryType } from '#src/utils/test-utils.js'; diff --git a/packages/core/src/queries/logto-config.ts b/packages/core/src/queries/logto-config.ts index 861afa726..6f0f3140e 100644 --- a/packages/core/src/queries/logto-config.ts +++ b/packages/core/src/queries/logto-config.ts @@ -9,8 +9,8 @@ import { type OidcConfigKey, type LogtoJwtTokenKey, } from '@logto/schemas'; -import type { CommonQueryMethods } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import { type z } from 'zod'; import { DeletionError } from '#src/errors/SlonikError/index.js'; diff --git a/packages/core/src/queries/oidc-model-instance.test.ts b/packages/core/src/queries/oidc-model-instance.test.ts index 5a8141d9b..a31f76236 100644 --- a/packages/core/src/queries/oidc-model-instance.test.ts +++ b/packages/core/src/queries/oidc-model-instance.test.ts @@ -1,6 +1,6 @@ import type { CreateOidcModelInstance } from '@logto/schemas'; import { OidcModelInstances } from '@logto/schemas'; -import { createMockPool, createMockQueryResult, sql } from 'slonik'; +import { createMockPool, createMockQueryResult, sql } from '@silverhand/slonik'; import { convertToIdentifiers } from '#src/utils/sql.js'; import type { QueryType } from '#src/utils/test-utils.js'; diff --git a/packages/core/src/queries/oidc-model-instance.ts b/packages/core/src/queries/oidc-model-instance.ts index 7e92592c3..12d913bb6 100644 --- a/packages/core/src/queries/oidc-model-instance.ts +++ b/packages/core/src/queries/oidc-model-instance.ts @@ -2,9 +2,9 @@ import type { OidcModelInstance, OidcModelInstancePayload } from '@logto/schemas import { OidcModelInstances } from '@logto/schemas'; import type { Nullable } from '@silverhand/essentials'; import { conditional } from '@silverhand/essentials'; +import type { CommonQueryMethods, ValueExpression } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import { addSeconds, isBefore } from 'date-fns'; -import type { CommonQueryMethods, ValueExpression } from 'slonik'; -import { sql } from 'slonik'; import { buildInsertIntoWithPool } from '#src/database/insert-into.js'; import { convertToIdentifiers, convertToTimestamp } from '#src/utils/sql.js'; diff --git a/packages/core/src/queries/organization/index.ts b/packages/core/src/queries/organization/index.ts index bdb648d24..757106e99 100644 --- a/packages/core/src/queries/organization/index.ts +++ b/packages/core/src/queries/organization/index.ts @@ -18,7 +18,7 @@ import { OrganizationInvitationRoleRelations, OrganizationInvitationStatus, } from '@logto/schemas'; -import { sql, type CommonQueryMethods } from 'slonik'; +import { sql, type CommonQueryMethods } from '@silverhand/slonik'; import { type SearchOptions, buildSearchSql } from '#src/database/utils.js'; import { TwoRelationsQueries } from '#src/utils/RelationQueries.js'; diff --git a/packages/core/src/queries/organization/relations.ts b/packages/core/src/queries/organization/relations.ts index 74ab7c503..9d84c2a05 100644 --- a/packages/core/src/queries/organization/relations.ts +++ b/packages/core/src/queries/organization/relations.ts @@ -11,7 +11,7 @@ import { type FeaturedUser, type OrganizationScopeEntity, } from '@logto/schemas'; -import { sql, type CommonQueryMethods } from 'slonik'; +import { sql, type CommonQueryMethods } from '@silverhand/slonik'; import { type SearchOptions, buildSearchSql, expandFields } from '#src/database/utils.js'; import RelationQueries, { diff --git a/packages/core/src/queries/passcode.test.ts b/packages/core/src/queries/passcode.test.ts index 59e99e13e..db4913f4b 100644 --- a/packages/core/src/queries/passcode.test.ts +++ b/packages/core/src/queries/passcode.test.ts @@ -1,6 +1,6 @@ import { TemplateType } from '@logto/connector-kit'; import { Passcodes } from '@logto/schemas'; -import { createMockPool, createMockQueryResult, sql } from 'slonik'; +import { createMockPool, createMockQueryResult, sql } from '@silverhand/slonik'; import { snakeCase } from 'snake-case'; import { mockPasscode } from '#src/__mocks__/index.js'; diff --git a/packages/core/src/queries/passcode.ts b/packages/core/src/queries/passcode.ts index c62394cd4..36dfac52e 100644 --- a/packages/core/src/queries/passcode.ts +++ b/packages/core/src/queries/passcode.ts @@ -1,8 +1,8 @@ import type { TemplateType } from '@logto/connector-kit'; import type { Passcode, RequestVerificationCodePayload } from '@logto/schemas'; import { Passcodes } from '@logto/schemas'; -import type { CommonQueryMethods } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import { buildInsertIntoWithPool } from '#src/database/insert-into.js'; import { DeletionError } from '#src/errors/SlonikError/index.js'; diff --git a/packages/core/src/queries/resource.test.ts b/packages/core/src/queries/resource.test.ts index b421da9eb..707a7dc93 100644 --- a/packages/core/src/queries/resource.test.ts +++ b/packages/core/src/queries/resource.test.ts @@ -1,5 +1,5 @@ import { Resources } from '@logto/schemas'; -import { createMockPool, createMockQueryResult, sql } from 'slonik'; +import { createMockPool, createMockQueryResult, sql } from '@silverhand/slonik'; import { mockResource } from '#src/__mocks__/index.js'; import { DeletionError } from '#src/errors/SlonikError/index.js'; diff --git a/packages/core/src/queries/resource.ts b/packages/core/src/queries/resource.ts index a0d65f93d..a121bd808 100644 --- a/packages/core/src/queries/resource.ts +++ b/packages/core/src/queries/resource.ts @@ -1,7 +1,7 @@ import type { Resource, CreateResource } from '@logto/schemas'; import { Resources } from '@logto/schemas'; -import type { CommonQueryMethods } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import { buildFindAllEntitiesWithPool } from '#src/database/find-all-entities.js'; import { buildFindEntityByIdWithPool } from '#src/database/find-entity-by-id.js'; diff --git a/packages/core/src/queries/roles-scopes.ts b/packages/core/src/queries/roles-scopes.ts index 5b929af26..0aabec1f0 100644 --- a/packages/core/src/queries/roles-scopes.ts +++ b/packages/core/src/queries/roles-scopes.ts @@ -1,7 +1,7 @@ import type { CreateRolesScope, RolesScope } from '@logto/schemas'; import { RolesScopes } from '@logto/schemas'; -import type { CommonQueryMethods } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import { DeletionError } from '#src/errors/SlonikError/index.js'; import { convertToIdentifiers } from '#src/utils/sql.js'; diff --git a/packages/core/src/queries/roles.test.ts b/packages/core/src/queries/roles.test.ts index fdd51241f..86e66de43 100644 --- a/packages/core/src/queries/roles.test.ts +++ b/packages/core/src/queries/roles.test.ts @@ -1,5 +1,5 @@ import { Roles } from '@logto/schemas'; -import { createMockPool, createMockQueryResult, sql } from 'slonik'; +import { createMockPool, createMockQueryResult, sql } from '@silverhand/slonik'; import { mockAdminUserRole } from '#src/__mocks__/index.js'; import { DeletionError } from '#src/errors/SlonikError/index.js'; diff --git a/packages/core/src/queries/roles.ts b/packages/core/src/queries/roles.ts index 6181ab68b..ac6e076be 100644 --- a/packages/core/src/queries/roles.ts +++ b/packages/core/src/queries/roles.ts @@ -1,7 +1,7 @@ import type { CreateRole, Role, RoleType } from '@logto/schemas'; import { internalRolePrefix, SearchJointMode, Roles } from '@logto/schemas'; -import type { CommonQueryMethods } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import { buildFindEntityByIdWithPool } from '#src/database/find-entity-by-id.js'; import { buildInsertIntoWithPool } from '#src/database/insert-into.js'; diff --git a/packages/core/src/queries/scope.ts b/packages/core/src/queries/scope.ts index 7ddf2c73e..0ab041f05 100644 --- a/packages/core/src/queries/scope.ts +++ b/packages/core/src/queries/scope.ts @@ -1,7 +1,7 @@ import type { CreateScope, Scope } from '@logto/schemas'; import { Resources, Scopes } from '@logto/schemas'; -import type { CommonQueryMethods } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import { buildFindEntityByIdWithPool } from '#src/database/find-entity-by-id.js'; import { buildInsertIntoWithPool } from '#src/database/insert-into.js'; diff --git a/packages/core/src/queries/sign-in-experience.test.ts b/packages/core/src/queries/sign-in-experience.test.ts index f21e14583..6b974df87 100644 --- a/packages/core/src/queries/sign-in-experience.test.ts +++ b/packages/core/src/queries/sign-in-experience.test.ts @@ -1,4 +1,4 @@ -import { createMockPool, createMockQueryResult } from 'slonik'; +import { createMockPool, createMockQueryResult } from '@silverhand/slonik'; import { mockSignInExperience } from '#src/__mocks__/index.js'; import { MockWellKnownCache } from '#src/test-utils/tenant.js'; diff --git a/packages/core/src/queries/sign-in-experience.ts b/packages/core/src/queries/sign-in-experience.ts index 267df100b..b6abe0e64 100644 --- a/packages/core/src/queries/sign-in-experience.ts +++ b/packages/core/src/queries/sign-in-experience.ts @@ -1,6 +1,6 @@ import type { CreateSignInExperience } from '@logto/schemas'; import { SignInExperiences } from '@logto/schemas'; -import type { CommonQueryMethods } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; import { type WellKnownCache } from '#src/caches/well-known.js'; import { buildFindEntityByIdWithPool } from '#src/database/find-entity-by-id.js'; diff --git a/packages/core/src/queries/sso-connectors.ts b/packages/core/src/queries/sso-connectors.ts index 04b0d0570..4dfde1a20 100644 --- a/packages/core/src/queries/sso-connectors.ts +++ b/packages/core/src/queries/sso-connectors.ts @@ -4,7 +4,7 @@ import { type SsoConnectorKeys, SsoConnectors, } from '@logto/schemas'; -import { sql, type CommonQueryMethods } from 'slonik'; +import { sql, type CommonQueryMethods } from '@silverhand/slonik'; import SchemaQueries from '#src/utils/SchemaQueries.js'; import { convertToIdentifiers } from '#src/utils/sql.js'; diff --git a/packages/core/src/queries/system.ts b/packages/core/src/queries/system.ts index eeb57c354..218f4975f 100644 --- a/packages/core/src/queries/system.ts +++ b/packages/core/src/queries/system.ts @@ -1,6 +1,6 @@ import { type SystemKey, Systems } from '@logto/schemas'; -import type { CommonQueryMethods } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import { convertToIdentifiers } from '#src/utils/sql.js'; diff --git a/packages/core/src/queries/tenant.ts b/packages/core/src/queries/tenant.ts index a680e8e70..d1f15da80 100644 --- a/packages/core/src/queries/tenant.ts +++ b/packages/core/src/queries/tenant.ts @@ -1,5 +1,5 @@ import { Tenants, type TenantModel } from '@logto/schemas/models'; -import { sql, type CommonQueryMethods } from 'slonik'; +import { sql, type CommonQueryMethods } from '@silverhand/slonik'; import { convertToIdentifiers } from '#src/utils/sql.js'; diff --git a/packages/core/src/queries/user-sso-identities.ts b/packages/core/src/queries/user-sso-identities.ts index f0c258ebc..531a6b528 100644 --- a/packages/core/src/queries/user-sso-identities.ts +++ b/packages/core/src/queries/user-sso-identities.ts @@ -5,7 +5,7 @@ import { UserSsoIdentities, } from '@logto/schemas'; import { type Nullable } from '@silverhand/essentials'; -import { sql, type CommonQueryMethods } from 'slonik'; +import { sql, type CommonQueryMethods } from '@silverhand/slonik'; import SchemaQueries from '#src/utils/SchemaQueries.js'; import { manyRows } from '#src/utils/sql.js'; diff --git a/packages/core/src/queries/user.test.ts b/packages/core/src/queries/user.test.ts index 7cef91bc1..a556cf1e4 100644 --- a/packages/core/src/queries/user.test.ts +++ b/packages/core/src/queries/user.test.ts @@ -1,6 +1,6 @@ import { Users } from '@logto/schemas'; +import { createMockPool, createMockQueryResult, sql } from '@silverhand/slonik'; import Sinon from 'sinon'; -import { createMockPool, createMockQueryResult, sql } from 'slonik'; import { mockUser } from '#src/__mocks__/index.js'; import { EnvSet } from '#src/env-set/index.js'; diff --git a/packages/core/src/queries/user.ts b/packages/core/src/queries/user.ts index 690a46092..4aab200be 100644 --- a/packages/core/src/queries/user.ts +++ b/packages/core/src/queries/user.ts @@ -1,8 +1,8 @@ import type { User, CreateUser } from '@logto/schemas'; import { Users } from '@logto/schemas'; import { conditionalArray, pick } from '@silverhand/essentials'; -import type { CommonQueryMethods } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import { buildUpdateWhereWithPool } from '#src/database/update-where.js'; import { EnvSet } from '#src/env-set/index.js'; diff --git a/packages/core/src/queries/users-roles.ts b/packages/core/src/queries/users-roles.ts index ea73c1809..9b7d60606 100644 --- a/packages/core/src/queries/users-roles.ts +++ b/packages/core/src/queries/users-roles.ts @@ -1,7 +1,7 @@ import type { CreateUsersRole, UsersRole } from '@logto/schemas'; import { UsersRoles } from '@logto/schemas'; -import type { CommonQueryMethods } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import { DeletionError } from '#src/errors/SlonikError/index.js'; import { conditionalSql, convertToIdentifiers } from '#src/utils/sql.js'; diff --git a/packages/core/src/queries/verification-status.ts b/packages/core/src/queries/verification-status.ts index 73f167135..2439a9a12 100644 --- a/packages/core/src/queries/verification-status.ts +++ b/packages/core/src/queries/verification-status.ts @@ -1,7 +1,7 @@ import type { VerificationStatus } from '@logto/schemas'; import { VerificationStatuses } from '@logto/schemas'; -import type { CommonQueryMethods } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import { buildInsertIntoWithPool } from '#src/database/insert-into.js'; import { convertToIdentifiers } from '#src/utils/sql.js'; diff --git a/packages/core/src/routes/organization/utils.ts b/packages/core/src/routes/organization/utils.ts index 7c0ff480a..84a741f5f 100644 --- a/packages/core/src/routes/organization/utils.ts +++ b/packages/core/src/routes/organization/utils.ts @@ -1,7 +1,7 @@ import { ForeignKeyIntegrityConstraintViolationError, UniqueIntegrityConstraintViolationError, -} from 'slonik'; +} from '@silverhand/slonik'; import RequestError from '#src/errors/RequestError/index.js'; diff --git a/packages/core/src/sentinel/basic-sentinel.ts b/packages/core/src/sentinel/basic-sentinel.ts index 405f90255..33b1fb8d7 100644 --- a/packages/core/src/sentinel/basic-sentinel.ts +++ b/packages/core/src/sentinel/basic-sentinel.ts @@ -10,8 +10,8 @@ import { } from '@logto/schemas'; import { generateStandardId } from '@logto/shared'; import { type Nullable } from '@silverhand/essentials'; +import { sql, type CommonQueryMethods } from '@silverhand/slonik'; import { addMinutes } from 'date-fns'; -import { sql, type CommonQueryMethods } from 'slonik'; import { buildInsertIntoWithPool } from '#src/database/insert-into.js'; import { convertToIdentifiers } from '#src/utils/sql.js'; diff --git a/packages/core/src/tenants/Queries.ts b/packages/core/src/tenants/Queries.ts index a55282356..12f66adda 100644 --- a/packages/core/src/tenants/Queries.ts +++ b/packages/core/src/tenants/Queries.ts @@ -1,4 +1,4 @@ -import type { CommonQueryMethods } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; import { type WellKnownCache } from '#src/caches/well-known.js'; import createApplicationSignInExperienceQueries from '#src/queries/application-sign-in-experience.js'; diff --git a/packages/core/src/tenants/SystemContex.test.ts b/packages/core/src/tenants/SystemContex.test.ts index b83b79c83..a92edc6ab 100644 --- a/packages/core/src/tenants/SystemContex.test.ts +++ b/packages/core/src/tenants/SystemContex.test.ts @@ -1,6 +1,6 @@ import { CloudflareKey, StorageProviderKey } from '@logto/schemas'; import { createMockUtils, pickDefault } from '@logto/shared/esm'; -import { createMockPool } from 'slonik'; +import { createMockPool } from '@silverhand/slonik'; import { mockHostnameProviderData, mockStorageProviderData } from '#src/__mocks__/system.js'; diff --git a/packages/core/src/tenants/SystemContext.ts b/packages/core/src/tenants/SystemContext.ts index 7714080fb..2c9661aa9 100644 --- a/packages/core/src/tenants/SystemContext.ts +++ b/packages/core/src/tenants/SystemContext.ts @@ -9,7 +9,7 @@ import { type ProtectedAppConfigProviderData, protectedAppConfigProviderDataGuard, } from '@logto/schemas'; -import type { CommonQueryMethods } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; import { type ZodType } from 'zod'; import { createSystemsQuery } from '#src/queries/system.js'; diff --git a/packages/core/src/tenants/utils.ts b/packages/core/src/tenants/utils.ts index 64aa2ac85..f5491da36 100644 --- a/packages/core/src/tenants/utils.ts +++ b/packages/core/src/tenants/utils.ts @@ -2,8 +2,8 @@ import { ServiceLogs, Systems } from '@logto/schemas'; import { Tenants } from '@logto/schemas/models'; import { isKeyInObject } from '@logto/shared'; import { conditional, conditionalString } from '@silverhand/essentials'; -import type { CommonQueryMethods } from 'slonik'; -import { parseDsn, sql, stringifyDsn } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { parseDsn, sql, stringifyDsn } from '@silverhand/slonik'; import { z } from 'zod'; import { EnvSet } from '#src/env-set/index.js'; diff --git a/packages/core/src/test-utils/tenant.ts b/packages/core/src/test-utils/tenant.ts index 0310f5ab5..720142c23 100644 --- a/packages/core/src/test-utils/tenant.ts +++ b/packages/core/src/test-utils/tenant.ts @@ -1,6 +1,6 @@ import { type Sentinel } from '@logto/schemas'; import { TtlCache } from '@logto/shared'; -import { createMockPool, createMockQueryResult } from 'slonik'; +import { createMockPool, createMockQueryResult } from '@silverhand/slonik'; import { WellKnownCache } from '#src/caches/well-known.js'; import type { CloudConnectionLibrary } from '#src/libraries/cloud-connection.js'; diff --git a/packages/core/src/utils/RelationQueries.ts b/packages/core/src/utils/RelationQueries.ts index c7e9767d7..739a7cec1 100644 --- a/packages/core/src/utils/RelationQueries.ts +++ b/packages/core/src/utils/RelationQueries.ts @@ -1,6 +1,6 @@ -import { type Table } from '@logto/shared'; +import { type SchemaLike, type Table } from '@logto/shared'; import { type KeysToCamelCase } from '@silverhand/essentials'; -import { sql, type CommonQueryMethods } from 'slonik'; +import { sql, type CommonQueryMethods } from '@silverhand/slonik'; import snakecaseKeys from 'snakecase-keys'; import { type z } from 'zod'; @@ -15,7 +15,7 @@ type TableInfo< TableName extends string, TableSingular extends string, Key extends string, - Schema, + Schema extends SchemaLike, > = Table & { tableSingular: TableSingular; guard: z.ZodType; @@ -74,7 +74,7 @@ export type GetEntitiesOptions = { * group with the id `group-id-1`. */ export default class RelationQueries< - Schemas extends Array>, + Schemas extends Array>>, Length = AtLeast2['length'], > { protected get table() { @@ -267,8 +267,8 @@ export default class RelationQueries< * @see {@link RelationQueries} for more information. */ export class TwoRelationsQueries< - Schema1 extends TableInfo, - Schema2 extends TableInfo, + Schema1 extends TableInfo>, + Schema2 extends TableInfo>, > extends RelationQueries<[Schema1, Schema2]> { /** * Replace all relations for a specific `Schema1` entity with the given `Schema2` entities. diff --git a/packages/core/src/utils/SchemaQueries.ts b/packages/core/src/utils/SchemaQueries.ts index 9be93e07a..20d114050 100644 --- a/packages/core/src/utils/SchemaQueries.ts +++ b/packages/core/src/utils/SchemaQueries.ts @@ -1,6 +1,6 @@ import { type GeneratedSchema } from '@logto/schemas'; import { type UpdateWhereData, type SchemaLike } from '@logto/shared'; -import { type CommonQueryMethods } from 'slonik'; +import { type CommonQueryMethods } from '@silverhand/slonik'; import { buildDeleteByIdWithPool } from '#src/database/delete-by-id.js'; import { buildFindAllEntitiesWithPool } from '#src/database/find-all-entities.js'; diff --git a/packages/core/src/utils/search.test.ts b/packages/core/src/utils/search.test.ts index 4d5d4786a..67597e590 100644 --- a/packages/core/src/utils/search.test.ts +++ b/packages/core/src/utils/search.test.ts @@ -1,6 +1,6 @@ import { SearchJointMode, SearchMatchMode } from '@logto/schemas'; -import type { ListSqlToken, TaggedTemplateLiteralInvocation } from 'slonik'; -import { sql } from 'slonik'; +import type { ListSqlToken, TaggedTemplateLiteralInvocation } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; // Will add `params` to the exception list diff --git a/packages/core/src/utils/search.ts b/packages/core/src/utils/search.ts index f3c56ca93..414c2fe8f 100644 --- a/packages/core/src/utils/search.ts +++ b/packages/core/src/utils/search.ts @@ -1,7 +1,7 @@ import { SearchJointMode, SearchMatchMode } from '@logto/schemas'; import type { Nullable, Optional } from '@silverhand/essentials'; import { yes, conditionalString, cond } from '@silverhand/essentials'; -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import { snakeCase } from 'snake-case'; import { type SearchOptions } from '#src/database/utils.js'; diff --git a/packages/core/src/utils/sql.test.ts b/packages/core/src/utils/sql.test.ts index fa5601068..09fbe4d60 100644 --- a/packages/core/src/utils/sql.test.ts +++ b/packages/core/src/utils/sql.test.ts @@ -1,6 +1,6 @@ import type { Table } from '@logto/shared'; -import { sql } from 'slonik'; -import { SqlToken } from 'slonik/dist/src/tokens.js'; +import { sql } from '@silverhand/slonik'; +import { SqlToken } from '@silverhand/slonik/dist/src/tokens.js'; import { excludeAutoSetFields, diff --git a/packages/core/src/utils/sql.ts b/packages/core/src/utils/sql.ts index d81101fcd..3b2cd256d 100644 --- a/packages/core/src/utils/sql.ts +++ b/packages/core/src/utils/sql.ts @@ -1,8 +1,8 @@ import type { SchemaValue, SchemaValuePrimitive, Table } from '@logto/shared'; import type { Falsy } from '@silverhand/essentials'; import { notFalsy } from '@silverhand/essentials'; -import type { SqlSqlToken, SqlToken, IdentifierSqlToken, QueryResult } from 'slonik'; -import { sql } from 'slonik'; +import type { SqlSqlToken, SqlToken, IdentifierSqlToken, QueryResult } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; export const conditionalSql = (value: T, buildSql: (value: Exclude) => SqlSqlToken) => notFalsy(value) ? buildSql(value) : sql``; diff --git a/packages/core/src/utils/tenant.ts b/packages/core/src/utils/tenant.ts index d33c66e42..ff3812edd 100644 --- a/packages/core/src/utils/tenant.ts +++ b/packages/core/src/utils/tenant.ts @@ -1,7 +1,7 @@ import { adminTenantId, defaultTenantId } from '@logto/schemas'; import { type UrlSet } from '@logto/shared'; import { conditionalString, trySafe } from '@silverhand/essentials'; -import { type CommonQueryMethods } from 'slonik'; +import { type CommonQueryMethods } from '@silverhand/slonik'; import { redisCache } from '#src/caches/index.js'; import { EnvSet, getTenantEndpoint } from '#src/env-set/index.js'; diff --git a/packages/core/src/utils/test-utils.ts b/packages/core/src/utils/test-utils.ts index 17a98cf3b..eee58a63b 100644 --- a/packages/core/src/utils/test-utils.ts +++ b/packages/core/src/utils/test-utils.ts @@ -1,13 +1,13 @@ +import type { QueryResult, QueryResultRow } from '@silverhand/slonik'; +import { createMockPool, createMockQueryResult } from '@silverhand/slonik'; +import type { + PrimitiveValueExpression, + TaggedTemplateLiteralInvocation, +} from '@silverhand/slonik/dist/src/types.js'; import type { MiddlewareType, Context, Middleware } from 'koa'; import Koa from 'koa'; import type { IRouterParamContext } from 'koa-router'; import Router from 'koa-router'; -import type { QueryResult, QueryResultRow } from 'slonik'; -import { createMockPool, createMockQueryResult } from 'slonik'; -import type { - PrimitiveValueExpression, - TaggedTemplateLiteralInvocation, -} from 'slonik/dist/src/types.js'; import request from 'supertest'; import type { AuthedRouter, AnonymousRouter } from '#src/routes/types.js'; diff --git a/packages/schemas/alterations/1.0.0-1677208902-update-admin-console-config.ts b/packages/schemas/alterations/1.0.0-1677208902-update-admin-console-config.ts index 453d88658..8a438ca2c 100644 --- a/packages/schemas/alterations/1.0.0-1677208902-update-admin-console-config.ts +++ b/packages/schemas/alterations/1.0.0-1677208902-update-admin-console-config.ts @@ -1,5 +1,5 @@ -import type { DatabaseTransactionConnection } from 'slonik'; -import { sql } from 'slonik'; +import type { DatabaseTransactionConnection } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0-1677765137-seed-for-admin-tenant.ts b/packages/schemas/alterations/1.0.0-1677765137-seed-for-admin-tenant.ts index 11dcc3e83..c2a26d5a1 100644 --- a/packages/schemas/alterations/1.0.0-1677765137-seed-for-admin-tenant.ts +++ b/packages/schemas/alterations/1.0.0-1677765137-seed-for-admin-tenant.ts @@ -1,6 +1,6 @@ import { generateStandardId } from '@logto/shared/universal'; -import type { CommonQueryMethods } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0-1677907982-allow-admin-create-multiple-tenants.ts b/packages/schemas/alterations/1.0.0-1677907982-allow-admin-create-multiple-tenants.ts index ca7fa7f54..633c16471 100644 --- a/packages/schemas/alterations/1.0.0-1677907982-allow-admin-create-multiple-tenants.ts +++ b/packages/schemas/alterations/1.0.0-1677907982-allow-admin-create-multiple-tenants.ts @@ -1,5 +1,5 @@ import { generateStandardId } from '@logto/shared/universal'; -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0-1678157950-privacy-policy-url.ts b/packages/schemas/alterations/1.0.0-1678157950-privacy-policy-url.ts index cf6330b4b..1689e7cc1 100644 --- a/packages/schemas/alterations/1.0.0-1678157950-privacy-policy-url.ts +++ b/packages/schemas/alterations/1.0.0-1678157950-privacy-policy-url.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0-1678199795-add-verification-status-table.ts b/packages/schemas/alterations/1.0.0-1678199795-add-verification-status-table.ts index 38e4e0d94..cca035cd0 100644 --- a/packages/schemas/alterations/1.0.0-1678199795-add-verification-status-table.ts +++ b/packages/schemas/alterations/1.0.0-1678199795-add-verification-status-table.ts @@ -1,5 +1,5 @@ -import type { CommonQueryMethods } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0-1678259693-remove-branding-style-config.ts b/packages/schemas/alterations/1.0.0-1678259693-remove-branding-style-config.ts index c945f8e0b..b973e1f5a 100644 --- a/packages/schemas/alterations/1.0.0-1678259693-remove-branding-style-config.ts +++ b/packages/schemas/alterations/1.0.0-1678259693-remove-branding-style-config.ts @@ -1,5 +1,5 @@ -import type { DatabaseTransactionConnection } from 'slonik'; -import { sql } from 'slonik'; +import type { DatabaseTransactionConnection } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0-1678269972-use-restrictive-policies.ts b/packages/schemas/alterations/1.0.0-1678269972-use-restrictive-policies.ts index 9c9355ac3..788096ce7 100644 --- a/packages/schemas/alterations/1.0.0-1678269972-use-restrictive-policies.ts +++ b/packages/schemas/alterations/1.0.0-1678269972-use-restrictive-policies.ts @@ -1,5 +1,5 @@ -import type { CommonQueryMethods } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0-1678284778-restrict-internal-roles.ts b/packages/schemas/alterations/1.0.0-1678284778-restrict-internal-roles.ts index 5c78ea9e8..cab144754 100644 --- a/packages/schemas/alterations/1.0.0-1678284778-restrict-internal-roles.ts +++ b/packages/schemas/alterations/1.0.0-1678284778-restrict-internal-roles.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0-1678425761-m2m-app-for-tenants.ts b/packages/schemas/alterations/1.0.0-1678425761-m2m-app-for-tenants.ts index 8ec500bfb..486098b65 100644 --- a/packages/schemas/alterations/1.0.0-1678425761-m2m-app-for-tenants.ts +++ b/packages/schemas/alterations/1.0.0-1678425761-m2m-app-for-tenants.ts @@ -1,5 +1,5 @@ import { generateStandardId } from '@logto/shared/universal'; -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0-1678450233-support-custom-content.ts b/packages/schemas/alterations/1.0.0-1678450233-support-custom-content.ts index a3333b109..5d11f9ad2 100644 --- a/packages/schemas/alterations/1.0.0-1678450233-support-custom-content.ts +++ b/packages/schemas/alterations/1.0.0-1678450233-support-custom-content.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0-1678716747-service-logs.ts b/packages/schemas/alterations/1.0.0-1678716747-service-logs.ts index 5b476badb..4f952ef03 100644 --- a/packages/schemas/alterations/1.0.0-1678716747-service-logs.ts +++ b/packages/schemas/alterations/1.0.0-1678716747-service-logs.ts @@ -1,5 +1,5 @@ -import type { CommonQueryMethods } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0-1678928481-remove-deprecated-logto-config-item.ts b/packages/schemas/alterations/1.0.0-1678928481-remove-deprecated-logto-config-item.ts index 82c08f877..713ded68a 100644 --- a/packages/schemas/alterations/1.0.0-1678928481-remove-deprecated-logto-config-item.ts +++ b/packages/schemas/alterations/1.0.0-1678928481-remove-deprecated-logto-config-item.ts @@ -1,5 +1,5 @@ -import type { DatabaseTransactionConnection } from 'slonik'; -import { sql } from 'slonik'; +import type { DatabaseTransactionConnection } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0-1678953179-update-get-started-task-config.ts b/packages/schemas/alterations/1.0.0-1678953179-update-get-started-task-config.ts index eebe53a76..72f43fcf7 100644 --- a/packages/schemas/alterations/1.0.0-1678953179-update-get-started-task-config.ts +++ b/packages/schemas/alterations/1.0.0-1678953179-update-get-started-task-config.ts @@ -1,5 +1,5 @@ -import type { DatabaseTransactionConnection } from 'slonik'; -import { sql } from 'slonik'; +import type { DatabaseTransactionConnection } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0-1679209413-drop-connector-database-storage.ts b/packages/schemas/alterations/1.0.0-1679209413-drop-connector-database-storage.ts index 6b766549d..0c97e248e 100644 --- a/packages/schemas/alterations/1.0.0-1679209413-drop-connector-database-storage.ts +++ b/packages/schemas/alterations/1.0.0-1679209413-drop-connector-database-storage.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_beta.10-1-logto-config.ts b/packages/schemas/alterations/1.0.0_beta.10-1-logto-config.ts index 83d6e0068..05b6e2d35 100644 --- a/packages/schemas/alterations/1.0.0_beta.10-1-logto-config.ts +++ b/packages/schemas/alterations/1.0.0_beta.10-1-logto-config.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_beta.10-1663923211-machine-to-machine-app.ts b/packages/schemas/alterations/1.0.0_beta.10-1663923211-machine-to-machine-app.ts index a8bb4d683..ce6403b40 100644 --- a/packages/schemas/alterations/1.0.0_beta.10-1663923211-machine-to-machine-app.ts +++ b/packages/schemas/alterations/1.0.0_beta.10-1663923211-machine-to-machine-app.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_beta.10-1664265197-custom-phrases.ts b/packages/schemas/alterations/1.0.0_beta.10-1664265197-custom-phrases.ts index 5f496d401..92f800039 100644 --- a/packages/schemas/alterations/1.0.0_beta.10-1664265197-custom-phrases.ts +++ b/packages/schemas/alterations/1.0.0_beta.10-1664265197-custom-phrases.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_beta.11-1664347703-rename-language-key-to-tag.ts b/packages/schemas/alterations/1.0.0_beta.11-1664347703-rename-language-key-to-tag.ts index b17b1567e..0909224ca 100644 --- a/packages/schemas/alterations/1.0.0_beta.11-1664347703-rename-language-key-to-tag.ts +++ b/packages/schemas/alterations/1.0.0_beta.11-1664347703-rename-language-key-to-tag.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_beta.11-1664356000-add-created-at-column-to-users.ts b/packages/schemas/alterations/1.0.0_beta.11-1664356000-add-created-at-column-to-users.ts index 1e708b9d6..32a6ff817 100644 --- a/packages/schemas/alterations/1.0.0_beta.11-1664356000-add-created-at-column-to-users.ts +++ b/packages/schemas/alterations/1.0.0_beta.11-1664356000-add-created-at-column-to-users.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_beta.11-1664462389-correct-user-created-at-column-by-user-logs.ts b/packages/schemas/alterations/1.0.0_beta.11-1664462389-correct-user-created-at-column-by-user-logs.ts index 9669dd100..a74f742da 100644 --- a/packages/schemas/alterations/1.0.0_beta.11-1664462389-correct-user-created-at-column-by-user-logs.ts +++ b/packages/schemas/alterations/1.0.0_beta.11-1664462389-correct-user-created-at-column-by-user-logs.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_beta.14-1665300135-sign-in-sign-up.ts b/packages/schemas/alterations/1.0.0_beta.14-1665300135-sign-in-sign-up.ts index 08e172d8a..04eb4204a 100644 --- a/packages/schemas/alterations/1.0.0_beta.14-1665300135-sign-in-sign-up.ts +++ b/packages/schemas/alterations/1.0.0_beta.14-1665300135-sign-in-sign-up.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_beta.14-1667283640-remove-forgot-password.ts b/packages/schemas/alterations/1.0.0_beta.14-1667283640-remove-forgot-password.ts index cfb0534de..a8b827a9a 100644 --- a/packages/schemas/alterations/1.0.0_beta.14-1667283640-remove-forgot-password.ts +++ b/packages/schemas/alterations/1.0.0_beta.14-1667283640-remove-forgot-password.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_beta.14-1667292082-remove-sign-in-method.ts b/packages/schemas/alterations/1.0.0_beta.14-1667292082-remove-sign-in-method.ts index 0cc0ffc57..965150b8d 100644 --- a/packages/schemas/alterations/1.0.0_beta.14-1667292082-remove-sign-in-method.ts +++ b/packages/schemas/alterations/1.0.0_beta.14-1667292082-remove-sign-in-method.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_beta.14-1667374974-user-suspend.ts b/packages/schemas/alterations/1.0.0_beta.14-1667374974-user-suspend.ts index d48f7f6cf..03edab446 100644 --- a/packages/schemas/alterations/1.0.0_beta.14-1667374974-user-suspend.ts +++ b/packages/schemas/alterations/1.0.0_beta.14-1667374974-user-suspend.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_beta.14-1667900481-add-passcode-type-continue.ts b/packages/schemas/alterations/1.0.0_beta.14-1667900481-add-passcode-type-continue.ts index c40fbfd3e..47d2844d7 100644 --- a/packages/schemas/alterations/1.0.0_beta.14-1667900481-add-passcode-type-continue.ts +++ b/packages/schemas/alterations/1.0.0_beta.14-1667900481-add-passcode-type-continue.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_beta.18-1668666590-support-multiple-connector-instances.ts b/packages/schemas/alterations/1.0.0_beta.18-1668666590-support-multiple-connector-instances.ts index b2d9af7d0..fde3a840d 100644 --- a/packages/schemas/alterations/1.0.0_beta.18-1668666590-support-multiple-connector-instances.ts +++ b/packages/schemas/alterations/1.0.0_beta.18-1668666590-support-multiple-connector-instances.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_beta.18-1668666600-remove-connector-enabled.ts b/packages/schemas/alterations/1.0.0_beta.18-1668666600-remove-connector-enabled.ts index aeceedcb0..ca10a7baf 100644 --- a/packages/schemas/alterations/1.0.0_beta.18-1668666600-remove-connector-enabled.ts +++ b/packages/schemas/alterations/1.0.0_beta.18-1668666600-remove-connector-enabled.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_beta.18-1669091623-roles-and-scopes.ts b/packages/schemas/alterations/1.0.0_beta.18-1669091623-roles-and-scopes.ts index 2eecaed34..466454eec 100644 --- a/packages/schemas/alterations/1.0.0_beta.18-1669091623-roles-and-scopes.ts +++ b/packages/schemas/alterations/1.0.0_beta.18-1669091623-roles-and-scopes.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_beta.18-1669702299-sign-up.ts b/packages/schemas/alterations/1.0.0_beta.18-1669702299-sign-up.ts index c5c6b8f80..b1bef3620 100644 --- a/packages/schemas/alterations/1.0.0_beta.18-1669702299-sign-up.ts +++ b/packages/schemas/alterations/1.0.0_beta.18-1669702299-sign-up.ts @@ -1,6 +1,6 @@ import { isSameArray } from '@silverhand/essentials'; -import type { DatabaseTransactionConnection } from 'slonik'; -import { sql } from 'slonik'; +import type { DatabaseTransactionConnection } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_beta.18-1671039448-add-user-name-index.ts b/packages/schemas/alterations/1.0.0_beta.18-1671039448-add-user-name-index.ts index fb30bec7c..62fb6f68d 100644 --- a/packages/schemas/alterations/1.0.0_beta.18-1671039448-add-user-name-index.ts +++ b/packages/schemas/alterations/1.0.0_beta.18-1671039448-add-user-name-index.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_beta.18-1671080370-terms-of-use.ts b/packages/schemas/alterations/1.0.0_beta.18-1671080370-terms-of-use.ts index cd170c3a2..b35bff745 100644 --- a/packages/schemas/alterations/1.0.0_beta.18-1671080370-terms-of-use.ts +++ b/packages/schemas/alterations/1.0.0_beta.18-1671080370-terms-of-use.ts @@ -1,5 +1,5 @@ -import type { DatabaseTransactionConnection } from 'slonik'; -import { sql } from 'slonik'; +import type { DatabaseTransactionConnection } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_beta.18-1671336831-refactor-log-types.ts b/packages/schemas/alterations/1.0.0_beta.18-1671336831-refactor-log-types.ts index 7e689fb06..0574ac4bb 100644 --- a/packages/schemas/alterations/1.0.0_beta.18-1671336831-refactor-log-types.ts +++ b/packages/schemas/alterations/1.0.0_beta.18-1671336831-refactor-log-types.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_beta.18-1671509870-hooks.ts b/packages/schemas/alterations/1.0.0_beta.18-1671509870-hooks.ts index 111188d0d..a25ef1918 100644 --- a/packages/schemas/alterations/1.0.0_beta.18-1671509870-hooks.ts +++ b/packages/schemas/alterations/1.0.0_beta.18-1671509870-hooks.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_beta.18-1672119200-align-passcode-type-with-message-type.ts b/packages/schemas/alterations/1.0.0_beta.18-1672119200-align-passcode-type-with-message-type.ts index fb13927a8..f79cdbf79 100644 --- a/packages/schemas/alterations/1.0.0_beta.18-1672119200-align-passcode-type-with-message-type.ts +++ b/packages/schemas/alterations/1.0.0_beta.18-1672119200-align-passcode-type-with-message-type.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.0-1672815959-user-roles.ts b/packages/schemas/alterations/1.0.0_rc.0-1672815959-user-roles.ts index 5cce8604a..bbb5316c8 100644 --- a/packages/schemas/alterations/1.0.0_rc.0-1672815959-user-roles.ts +++ b/packages/schemas/alterations/1.0.0_rc.0-1672815959-user-roles.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.0-1672820345-scope-resource-id.ts b/packages/schemas/alterations/1.0.0_rc.0-1672820345-scope-resource-id.ts index 35a1af20f..380f97ace 100644 --- a/packages/schemas/alterations/1.0.0_rc.0-1672820345-scope-resource-id.ts +++ b/packages/schemas/alterations/1.0.0_rc.0-1672820345-scope-resource-id.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.0-1672901841-roles-and-scopes-not-null.ts b/packages/schemas/alterations/1.0.0_rc.0-1672901841-roles-and-scopes-not-null.ts index b56cc2275..847b998e2 100644 --- a/packages/schemas/alterations/1.0.0_rc.0-1672901841-roles-and-scopes-not-null.ts +++ b/packages/schemas/alterations/1.0.0_rc.0-1672901841-roles-and-scopes-not-null.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.0-1673001922-support-generic-passcode.ts b/packages/schemas/alterations/1.0.0_rc.0-1673001922-support-generic-passcode.ts index 8c6607b7a..74ad01c60 100644 --- a/packages/schemas/alterations/1.0.0_rc.0-1673001922-support-generic-passcode.ts +++ b/packages/schemas/alterations/1.0.0_rc.0-1673001922-support-generic-passcode.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.0-1673165463-scope-name-index.ts b/packages/schemas/alterations/1.0.0_rc.0-1673165463-scope-name-index.ts index f23bf0b8c..9a266a41f 100644 --- a/packages/schemas/alterations/1.0.0_rc.0-1673165463-scope-name-index.ts +++ b/packages/schemas/alterations/1.0.0_rc.0-1673165463-scope-name-index.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.0-1673349501-sms-sign-in-identifier-to-phone.ts b/packages/schemas/alterations/1.0.0_rc.0-1673349501-sms-sign-in-identifier-to-phone.ts index 375d070f9..645af8841 100644 --- a/packages/schemas/alterations/1.0.0_rc.0-1673349501-sms-sign-in-identifier-to-phone.ts +++ b/packages/schemas/alterations/1.0.0_rc.0-1673349501-sms-sign-in-identifier-to-phone.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.0-1673465463-ac-scope-name.ts b/packages/schemas/alterations/1.0.0_rc.0-1673465463-ac-scope-name.ts index 49cbef454..8501b8148 100644 --- a/packages/schemas/alterations/1.0.0_rc.0-1673465463-ac-scope-name.ts +++ b/packages/schemas/alterations/1.0.0_rc.0-1673465463-ac-scope-name.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.0-1673853579-ac-default-scope.ts b/packages/schemas/alterations/1.0.0_rc.0-1673853579-ac-default-scope.ts index ba498fb1e..11ea3bf9d 100644 --- a/packages/schemas/alterations/1.0.0_rc.0-1673853579-ac-default-scope.ts +++ b/packages/schemas/alterations/1.0.0_rc.0-1673853579-ac-default-scope.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.0-1673863835-ac-scope-role.ts b/packages/schemas/alterations/1.0.0_rc.0-1673863835-ac-scope-role.ts index a94505a07..85e2872e4 100644 --- a/packages/schemas/alterations/1.0.0_rc.0-1673863835-ac-scope-role.ts +++ b/packages/schemas/alterations/1.0.0_rc.0-1673863835-ac-scope-role.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.0-1673882867-fix-alteration-issues.ts b/packages/schemas/alterations/1.0.0_rc.0-1673882867-fix-alteration-issues.ts index e8c9d05f3..a513f6616 100644 --- a/packages/schemas/alterations/1.0.0_rc.0-1673882867-fix-alteration-issues.ts +++ b/packages/schemas/alterations/1.0.0_rc.0-1673882867-fix-alteration-issues.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.0-1673940577-scope-description-not-null.ts b/packages/schemas/alterations/1.0.0_rc.0-1673940577-scope-description-not-null.ts index 4d1490f29..8dc0a1c94 100644 --- a/packages/schemas/alterations/1.0.0_rc.0-1673940577-scope-description-not-null.ts +++ b/packages/schemas/alterations/1.0.0_rc.0-1673940577-scope-description-not-null.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.0-1673941897-application-roles.ts b/packages/schemas/alterations/1.0.0_rc.0-1673941897-application-roles.ts index da3f10f29..8bc217f25 100644 --- a/packages/schemas/alterations/1.0.0_rc.0-1673941897-application-roles.ts +++ b/packages/schemas/alterations/1.0.0_rc.0-1673941897-application-roles.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.0-1674032095.1-dedup-resources-constraint.ts b/packages/schemas/alterations/1.0.0_rc.0-1674032095.1-dedup-resources-constraint.ts index 53083993f..7098b6bfa 100644 --- a/packages/schemas/alterations/1.0.0_rc.0-1674032095.1-dedup-resources-constraint.ts +++ b/packages/schemas/alterations/1.0.0_rc.0-1674032095.1-dedup-resources-constraint.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.0-1674032095.2-oidc-model-pkey.ts b/packages/schemas/alterations/1.0.0_rc.0-1674032095.2-oidc-model-pkey.ts index 080881e19..153e4ac96 100644 --- a/packages/schemas/alterations/1.0.0_rc.0-1674032095.2-oidc-model-pkey.ts +++ b/packages/schemas/alterations/1.0.0_rc.0-1674032095.2-oidc-model-pkey.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.0-1674032095.3-tenant-table.ts b/packages/schemas/alterations/1.0.0_rc.0-1674032095.3-tenant-table.ts index 184afe09e..8fd9395ca 100644 --- a/packages/schemas/alterations/1.0.0_rc.0-1674032095.3-tenant-table.ts +++ b/packages/schemas/alterations/1.0.0_rc.0-1674032095.3-tenant-table.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.0-1674032095.4-add-id-column.ts b/packages/schemas/alterations/1.0.0_rc.0-1674032095.4-add-id-column.ts index e5bfded99..35f293c91 100644 --- a/packages/schemas/alterations/1.0.0_rc.0-1674032095.4-add-id-column.ts +++ b/packages/schemas/alterations/1.0.0_rc.0-1674032095.4-add-id-column.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.0-1674032095.5-multi-tenancy.ts b/packages/schemas/alterations/1.0.0_rc.0-1674032095.5-multi-tenancy.ts index b993328da..0e059e0db 100644 --- a/packages/schemas/alterations/1.0.0_rc.0-1674032095.5-multi-tenancy.ts +++ b/packages/schemas/alterations/1.0.0_rc.0-1674032095.5-multi-tenancy.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import { raw } from 'slonik-sql-tag-raw'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.0-1674032095.6-add-tenant-id-trigger.ts b/packages/schemas/alterations/1.0.0_rc.0-1674032095.6-add-tenant-id-trigger.ts index 9f40d0305..b92be7c28 100644 --- a/packages/schemas/alterations/1.0.0_rc.0-1674032095.6-add-tenant-id-trigger.ts +++ b/packages/schemas/alterations/1.0.0_rc.0-1674032095.6-add-tenant-id-trigger.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.0-1674987042-drop-settings-and-create-systems.ts b/packages/schemas/alterations/1.0.0_rc.0-1674987042-drop-settings-and-create-systems.ts index 6fa64e66e..16850cd95 100644 --- a/packages/schemas/alterations/1.0.0_rc.0-1674987042-drop-settings-and-create-systems.ts +++ b/packages/schemas/alterations/1.0.0_rc.0-1674987042-drop-settings-and-create-systems.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.0-1675316731-update-seed-data.ts b/packages/schemas/alterations/1.0.0_rc.0-1675316731-update-seed-data.ts index 18f192e76..4db3f5b41 100644 --- a/packages/schemas/alterations/1.0.0_rc.0-1675316731-update-seed-data.ts +++ b/packages/schemas/alterations/1.0.0_rc.0-1675316731-update-seed-data.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.1-1675788753-multi-tenancy-rls.ts b/packages/schemas/alterations/1.0.0_rc.1-1675788753-multi-tenancy-rls.ts index 53543b141..4dd22b936 100644 --- a/packages/schemas/alterations/1.0.0_rc.1-1675788753-multi-tenancy-rls.ts +++ b/packages/schemas/alterations/1.0.0_rc.1-1675788753-multi-tenancy-rls.ts @@ -1,6 +1,6 @@ import { generateStandardId } from '@logto/shared/universal'; -import type { CommonQueryMethods } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import { raw } from 'slonik-sql-tag-raw'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.1-1676115897-add-admin-tenant.ts b/packages/schemas/alterations/1.0.0_rc.1-1676115897-add-admin-tenant.ts index 422b33c73..11533fe5c 100644 --- a/packages/schemas/alterations/1.0.0_rc.1-1676115897-add-admin-tenant.ts +++ b/packages/schemas/alterations/1.0.0_rc.1-1676115897-add-admin-tenant.ts @@ -1,6 +1,6 @@ import { generateStandardId } from '@logto/shared/universal'; -import type { CommonQueryMethods } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import { raw } from 'slonik-sql-tag-raw'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.1-1676185899-fix-logs-index.ts b/packages/schemas/alterations/1.0.0_rc.1-1676185899-fix-logs-index.ts index 68bbf4c4e..e6ef78945 100644 --- a/packages/schemas/alterations/1.0.0_rc.1-1676185899-fix-logs-index.ts +++ b/packages/schemas/alterations/1.0.0_rc.1-1676185899-fix-logs-index.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.1-1676190092-migrate-admin-data.ts b/packages/schemas/alterations/1.0.0_rc.1-1676190092-migrate-admin-data.ts index cb2e49446..65434ddf0 100644 --- a/packages/schemas/alterations/1.0.0_rc.1-1676190092-migrate-admin-data.ts +++ b/packages/schemas/alterations/1.0.0_rc.1-1676190092-migrate-admin-data.ts @@ -3,8 +3,8 @@ import { promisify } from 'node:util'; import { generateStandardId } from '@logto/shared/universal'; import inquirer from 'inquirer'; -import type { CommonQueryMethods, SerializableValue } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods, SerializableValue } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.1-1676823841-update-sie-primary-key.ts b/packages/schemas/alterations/1.0.0_rc.1-1676823841-update-sie-primary-key.ts index ddca9f3a5..7ea41d1fc 100644 --- a/packages/schemas/alterations/1.0.0_rc.1-1676823841-update-sie-primary-key.ts +++ b/packages/schemas/alterations/1.0.0_rc.1-1676823841-update-sie-primary-key.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.1-1676874936-support-custom-css.ts b/packages/schemas/alterations/1.0.0_rc.1-1676874936-support-custom-css.ts index 6c25619a2..9c9a08275 100644 --- a/packages/schemas/alterations/1.0.0_rc.1-1676874936-support-custom-css.ts +++ b/packages/schemas/alterations/1.0.0_rc.1-1676874936-support-custom-css.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.1-1676886855-connector-database-read-write.ts b/packages/schemas/alterations/1.0.0_rc.1-1676886855-connector-database-read-write.ts index a5cb136e1..bcb425be8 100644 --- a/packages/schemas/alterations/1.0.0_rc.1-1676886855-connector-database-read-write.ts +++ b/packages/schemas/alterations/1.0.0_rc.1-1676886855-connector-database-read-write.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.1-1676906977-remove-demo-app.ts b/packages/schemas/alterations/1.0.0_rc.1-1676906977-remove-demo-app.ts index 0e744b16c..918a30067 100644 --- a/packages/schemas/alterations/1.0.0_rc.1-1676906977-remove-demo-app.ts +++ b/packages/schemas/alterations/1.0.0_rc.1-1676906977-remove-demo-app.ts @@ -1,7 +1,7 @@ import { generateStandardId } from '@logto/shared/universal'; import chalk from 'chalk'; import inquirer from 'inquirer'; -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.1-1676956206-move-console-sie-to-database.ts b/packages/schemas/alterations/1.0.0_rc.1-1676956206-move-console-sie-to-database.ts index 38c4c930a..9f899f2ef 100644 --- a/packages/schemas/alterations/1.0.0_rc.1-1676956206-move-console-sie-to-database.ts +++ b/packages/schemas/alterations/1.0.0_rc.1-1676956206-move-console-sie-to-database.ts @@ -1,5 +1,5 @@ import { generateDarkColor } from '@logto/core-kit'; -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.0.0_rc.1-1677059985-move-console-application-to-database.ts b/packages/schemas/alterations/1.0.0_rc.1-1677059985-move-console-application-to-database.ts index 4dc1de144..9848ba3e3 100644 --- a/packages/schemas/alterations/1.0.0_rc.1-1677059985-move-console-application-to-database.ts +++ b/packages/schemas/alterations/1.0.0_rc.1-1677059985-move-console-application-to-database.ts @@ -1,5 +1,5 @@ import { generateStandardId } from '@logto/shared/universal'; -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.10.1-1695647183-update-private-key-type.ts b/packages/schemas/alterations/1.10.1-1695647183-update-private-key-type.ts index 50aa05331..1e9d6eef4 100644 --- a/packages/schemas/alterations/1.10.1-1695647183-update-private-key-type.ts +++ b/packages/schemas/alterations/1.10.1-1695647183-update-private-key-type.ts @@ -1,6 +1,6 @@ import { generateStandardId } from '@logto/shared'; -import type { DatabaseTransactionConnection } from 'slonik'; -import { sql } from 'slonik'; +import type { DatabaseTransactionConnection } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.10.1-1696657546-organization-tables.ts b/packages/schemas/alterations/1.10.1-1696657546-organization-tables.ts index 06c192928..1f38e006e 100644 --- a/packages/schemas/alterations/1.10.1-1696657546-organization-tables.ts +++ b/packages/schemas/alterations/1.10.1-1696657546-organization-tables.ts @@ -1,4 +1,4 @@ -import { type CommonQueryMethods, sql } from 'slonik'; +import { type CommonQueryMethods, sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.10.1-1697683802-add-sso-connectors-table.ts b/packages/schemas/alterations/1.10.1-1697683802-add-sso-connectors-table.ts index 60c14ee3d..2d941e586 100644 --- a/packages/schemas/alterations/1.10.1-1697683802-add-sso-connectors-table.ts +++ b/packages/schemas/alterations/1.10.1-1697683802-add-sso-connectors-table.ts @@ -1,4 +1,4 @@ -import { type CommonQueryMethods, sql } from 'slonik'; +import { type CommonQueryMethods, sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.10.1-1698646271-add-organization-created-flag.ts b/packages/schemas/alterations/1.10.1-1698646271-add-organization-created-flag.ts index 80eb5538a..b20326ae7 100644 --- a/packages/schemas/alterations/1.10.1-1698646271-add-organization-created-flag.ts +++ b/packages/schemas/alterations/1.10.1-1698646271-add-organization-created-flag.ts @@ -1,5 +1,5 @@ -import type { DatabaseTransactionConnection } from 'slonik'; -import { sql } from 'slonik'; +import type { DatabaseTransactionConnection } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.10.1-1698820410-add-user-sso-identities-table.ts b/packages/schemas/alterations/1.10.1-1698820410-add-user-sso-identities-table.ts index dde1ba464..dae2e8168 100644 --- a/packages/schemas/alterations/1.10.1-1698820410-add-user-sso-identities-table.ts +++ b/packages/schemas/alterations/1.10.1-1698820410-add-user-sso-identities-table.ts @@ -1,4 +1,4 @@ -import { type CommonQueryMethods, sql } from 'slonik'; +import { type CommonQueryMethods, sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.10.1-1698910485-user-logto-data.ts b/packages/schemas/alterations/1.10.1-1698910485-user-logto-data.ts index 29d5a98df..b111b45e2 100644 --- a/packages/schemas/alterations/1.10.1-1698910485-user-logto-data.ts +++ b/packages/schemas/alterations/1.10.1-1698910485-user-logto-data.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.11.0-1699422979-add-sso-connector-id-col-to-user-sso-identities-table.ts b/packages/schemas/alterations/1.11.0-1699422979-add-sso-connector-id-col-to-user-sso-identities-table.ts index 23a4b80ba..94e973fd5 100644 --- a/packages/schemas/alterations/1.11.0-1699422979-add-sso-connector-id-col-to-user-sso-identities-table.ts +++ b/packages/schemas/alterations/1.11.0-1699422979-add-sso-connector-id-col-to-user-sso-identities-table.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.11.0-1699598903-remove-sso-only-column-in-sso-connectors-table.ts b/packages/schemas/alterations/1.11.0-1699598903-remove-sso-only-column-in-sso-connectors-table.ts index 6f0378c18..c9115d930 100644 --- a/packages/schemas/alterations/1.11.0-1699598903-remove-sso-only-column-in-sso-connectors-table.ts +++ b/packages/schemas/alterations/1.11.0-1699598903-remove-sso-only-column-in-sso-connectors-table.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.12.0-1700031616-update-org-role-foreign-keys.ts b/packages/schemas/alterations/1.12.0-1700031616-update-org-role-foreign-keys.ts index 8dd517951..b9eb81c74 100644 --- a/packages/schemas/alterations/1.12.0-1700031616-update-org-role-foreign-keys.ts +++ b/packages/schemas/alterations/1.12.0-1700031616-update-org-role-foreign-keys.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.12.0-1701054133-add-unique-constraint-to-the-sso-connector-name.ts b/packages/schemas/alterations/1.12.0-1701054133-add-unique-constraint-to-the-sso-connector-name.ts index 859b5166b..6a54a53f7 100644 --- a/packages/schemas/alterations/1.12.0-1701054133-add-unique-constraint-to-the-sso-connector-name.ts +++ b/packages/schemas/alterations/1.12.0-1701054133-add-unique-constraint-to-the-sso-connector-name.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.12.0-1701245520-add-single-sign-on-enabled-flag-to-sie.ts b/packages/schemas/alterations/1.12.0-1701245520-add-single-sign-on-enabled-flag-to-sie.ts index 18267412d..7d6c10503 100644 --- a/packages/schemas/alterations/1.12.0-1701245520-add-single-sign-on-enabled-flag-to-sie.ts +++ b/packages/schemas/alterations/1.12.0-1701245520-add-single-sign-on-enabled-flag-to-sie.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.13.0-1702274830-add-new-third-party-column-to-applications-table.ts b/packages/schemas/alterations/1.13.0-1702274830-add-new-third-party-column-to-applications-table.ts index 76ee320df..bbe52b484 100644 --- a/packages/schemas/alterations/1.13.0-1702274830-add-new-third-party-column-to-applications-table.ts +++ b/packages/schemas/alterations/1.13.0-1702274830-add-new-third-party-column-to-applications-table.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.13.0-1702372401-add-application-permissions-tables.ts b/packages/schemas/alterations/1.13.0-1702372401-add-application-permissions-tables.ts index d40baf18a..78eb1c97a 100644 --- a/packages/schemas/alterations/1.13.0-1702372401-add-application-permissions-tables.ts +++ b/packages/schemas/alterations/1.13.0-1702372401-add-application-permissions-tables.ts @@ -1,4 +1,4 @@ -import { type CommonQueryMethods, sql } from 'slonik'; +import { type CommonQueryMethods, sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.13.0-1702544178-sync-tenant-orgs.ts b/packages/schemas/alterations/1.13.0-1702544178-sync-tenant-orgs.ts index e0a8e083a..c72aba1fb 100644 --- a/packages/schemas/alterations/1.13.0-1702544178-sync-tenant-orgs.ts +++ b/packages/schemas/alterations/1.13.0-1702544178-sync-tenant-orgs.ts @@ -15,7 +15,7 @@ */ import { ConsoleLog, generateStandardId } from '@logto/shared'; -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import { type AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.13.0-1702871078-protected-application-type.ts b/packages/schemas/alterations/1.13.0-1702871078-protected-application-type.ts index 5bb5e3a10..5440eaae4 100644 --- a/packages/schemas/alterations/1.13.0-1702871078-protected-application-type.ts +++ b/packages/schemas/alterations/1.13.0-1702871078-protected-application-type.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.13.0-1702877515-protected-app-configs.ts b/packages/schemas/alterations/1.13.0-1702877515-protected-app-configs.ts index 72d817cab..c5b581512 100644 --- a/packages/schemas/alterations/1.13.0-1702877515-protected-app-configs.ts +++ b/packages/schemas/alterations/1.13.0-1702877515-protected-app-configs.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.13.0-1702978120-application-sign-in-experience-table.ts b/packages/schemas/alterations/1.13.0-1702978120-application-sign-in-experience-table.ts index 3c68a2a7e..9f83ee0ff 100644 --- a/packages/schemas/alterations/1.13.0-1702978120-application-sign-in-experience-table.ts +++ b/packages/schemas/alterations/1.13.0-1702978120-application-sign-in-experience-table.ts @@ -1,4 +1,4 @@ -import { type CommonQueryMethods, sql } from 'slonik'; +import { type CommonQueryMethods, sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.13.0-1703229996-daily-token-usage.ts b/packages/schemas/alterations/1.13.0-1703229996-daily-token-usage.ts index 63a906cea..e5a97a3be 100644 --- a/packages/schemas/alterations/1.13.0-1703229996-daily-token-usage.ts +++ b/packages/schemas/alterations/1.13.0-1703229996-daily-token-usage.ts @@ -1,4 +1,4 @@ -import { type CommonQueryMethods, sql } from 'slonik'; +import { type CommonQueryMethods, sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.13.0-1703230000-update-tenant-roles.ts b/packages/schemas/alterations/1.13.0-1703230000-update-tenant-roles.ts index 036765f47..c5c6b38c8 100644 --- a/packages/schemas/alterations/1.13.0-1703230000-update-tenant-roles.ts +++ b/packages/schemas/alterations/1.13.0-1703230000-update-tenant-roles.ts @@ -1,5 +1,5 @@ import { ConsoleLog } from '@logto/shared'; -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.13.0-1704692973-remove-legacy-resources.ts b/packages/schemas/alterations/1.13.0-1704692973-remove-legacy-resources.ts index 8972fa6a1..ce402cdca 100644 --- a/packages/schemas/alterations/1.13.0-1704692973-remove-legacy-resources.ts +++ b/packages/schemas/alterations/1.13.0-1704692973-remove-legacy-resources.ts @@ -1,5 +1,5 @@ import { generateStandardId } from '@logto/shared/universal'; -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.13.0-1704934999-add-magic-links-table.ts b/packages/schemas/alterations/1.13.0-1704934999-add-magic-links-table.ts index 38c029877..d949bde03 100644 --- a/packages/schemas/alterations/1.13.0-1704934999-add-magic-links-table.ts +++ b/packages/schemas/alterations/1.13.0-1704934999-add-magic-links-table.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.13.0-1704935001-add-organization-invitation-tables.ts b/packages/schemas/alterations/1.13.0-1704935001-add-organization-invitation-tables.ts index 00cd5c7e0..bbebf0f0c 100644 --- a/packages/schemas/alterations/1.13.0-1704935001-add-organization-invitation-tables.ts +++ b/packages/schemas/alterations/1.13.0-1704935001-add-organization-invitation-tables.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.13.0-1705288654-add-application-user-consent-organizations-table.ts b/packages/schemas/alterations/1.13.0-1705288654-add-application-user-consent-organizations-table.ts index db85124eb..e4f429a49 100644 --- a/packages/schemas/alterations/1.13.0-1705288654-add-application-user-consent-organizations-table.ts +++ b/packages/schemas/alterations/1.13.0-1705288654-add-application-user-consent-organizations-table.ts @@ -1,4 +1,4 @@ -import { type CommonQueryMethods, sql } from 'slonik'; +import { type CommonQueryMethods, sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.13.0-1705991158-update-invitation-indices.ts b/packages/schemas/alterations/1.13.0-1705991158-update-invitation-indices.ts index 9ec7e6eae..3f1eb2fb7 100644 --- a/packages/schemas/alterations/1.13.0-1705991158-update-invitation-indices.ts +++ b/packages/schemas/alterations/1.13.0-1705991158-update-invitation-indices.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.13.0-1706449174-update-organization-invitation-column.ts b/packages/schemas/alterations/1.13.0-1706449174-update-organization-invitation-column.ts index 8f01de446..490fd99ef 100644 --- a/packages/schemas/alterations/1.13.0-1706449174-update-organization-invitation-column.ts +++ b/packages/schemas/alterations/1.13.0-1706449174-update-organization-invitation-column.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.13.0-1706510290-protected-app-host-index.ts b/packages/schemas/alterations/1.13.0-1706510290-protected-app-host-index.ts index 97feae7d6..a3e4a8085 100644 --- a/packages/schemas/alterations/1.13.0-1706510290-protected-app-host-index.ts +++ b/packages/schemas/alterations/1.13.0-1706510290-protected-app-host-index.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.13.0-1706512952-restore-get-started-page.ts b/packages/schemas/alterations/1.13.0-1706512952-restore-get-started-page.ts index 070578ca1..f234a0b3e 100644 --- a/packages/schemas/alterations/1.13.0-1706512952-restore-get-started-page.ts +++ b/packages/schemas/alterations/1.13.0-1706512952-restore-get-started-page.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.13.0-1706528755-remove-magic-links.ts b/packages/schemas/alterations/1.13.0-1706528755-remove-magic-links.ts index 27e9b7577..b228d28b5 100644 --- a/packages/schemas/alterations/1.13.0-1706528755-remove-magic-links.ts +++ b/packages/schemas/alterations/1.13.0-1706528755-remove-magic-links.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.13.0-1706585206-protected-app-custom-domain-unique.ts b/packages/schemas/alterations/1.13.0-1706585206-protected-app-custom-domain-unique.ts index e9cda3385..455e98beb 100644 --- a/packages/schemas/alterations/1.13.0-1706585206-protected-app-custom-domain-unique.ts +++ b/packages/schemas/alterations/1.13.0-1706585206-protected-app-custom-domain-unique.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.13.1-1707360939-grant-is-suspended-read-permission.ts b/packages/schemas/alterations/1.13.1-1707360939-grant-is-suspended-read-permission.ts index 8a3918fae..7f588cc5d 100644 --- a/packages/schemas/alterations/1.13.1-1707360939-grant-is-suspended-read-permission.ts +++ b/packages/schemas/alterations/1.13.1-1707360939-grant-is-suspended-read-permission.ts @@ -1,4 +1,4 @@ -import { type CommonQueryMethods, sql } from 'slonik'; +import { type CommonQueryMethods, sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.14.0-1708916601-remove-management-api-scopes-assigned-to-user-role.ts b/packages/schemas/alterations/1.14.0-1708916601-remove-management-api-scopes-assigned-to-user-role.ts index 2794a15b8..92e07f7c8 100644 --- a/packages/schemas/alterations/1.14.0-1708916601-remove-management-api-scopes-assigned-to-user-role.ts +++ b/packages/schemas/alterations/1.14.0-1708916601-remove-management-api-scopes-assigned-to-user-role.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.14.0-1709190131-enhance-dau-data-accuracy.ts b/packages/schemas/alterations/1.14.0-1709190131-enhance-dau-data-accuracy.ts index 8895f037d..8c88d9d9d 100644 --- a/packages/schemas/alterations/1.14.0-1709190131-enhance-dau-data-accuracy.ts +++ b/packages/schemas/alterations/1.14.0-1709190131-enhance-dau-data-accuracy.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.2.0-1681267285-fix-get-started-passwordless-status.ts b/packages/schemas/alterations/1.2.0-1681267285-fix-get-started-passwordless-status.ts index 4ee3556ef..a51c91d46 100644 --- a/packages/schemas/alterations/1.2.0-1681267285-fix-get-started-passwordless-status.ts +++ b/packages/schemas/alterations/1.2.0-1681267285-fix-get-started-passwordless-status.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.3.0-1683292832-update-hooks.ts b/packages/schemas/alterations/1.3.0-1683292832-update-hooks.ts index 62da0404f..4051802e2 100644 --- a/packages/schemas/alterations/1.3.0-1683292832-update-hooks.ts +++ b/packages/schemas/alterations/1.3.0-1683292832-update-hooks.ts @@ -1,5 +1,5 @@ import { generateStandardId } from '@logto/shared'; -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.5.0-1684382842-add-name-tag-created-at-for-tenants-table.ts b/packages/schemas/alterations/1.5.0-1684382842-add-name-tag-created-at-for-tenants-table.ts index 96e406125..5991a7de1 100644 --- a/packages/schemas/alterations/1.5.0-1684382842-add-name-tag-created-at-for-tenants-table.ts +++ b/packages/schemas/alterations/1.5.0-1684382842-add-name-tag-created-at-for-tenants-table.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.5.0-1684739802-create-hook-id-index-for-logs.ts b/packages/schemas/alterations/1.5.0-1684739802-create-hook-id-index-for-logs.ts index ed2c9bde0..3b54dbaef 100644 --- a/packages/schemas/alterations/1.5.0-1684739802-create-hook-id-index-for-logs.ts +++ b/packages/schemas/alterations/1.5.0-1684739802-create-hook-id-index-for-logs.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.5.0-1684822341-init-domains.ts b/packages/schemas/alterations/1.5.0-1684822341-init-domains.ts index 7b3a83540..f5a46c1df 100644 --- a/packages/schemas/alterations/1.5.0-1684822341-init-domains.ts +++ b/packages/schemas/alterations/1.5.0-1684822341-init-domains.ts @@ -1,5 +1,5 @@ -import type { CommonQueryMethods } from 'slonik'; -import { sql } from 'slonik'; +import type { CommonQueryMethods } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.5.0-1684837981-add-manage-tenant-self-scope-to-user-role.ts b/packages/schemas/alterations/1.5.0-1684837981-add-manage-tenant-self-scope-to-user-role.ts index 2969562dc..11b87dde0 100644 --- a/packages/schemas/alterations/1.5.0-1684837981-add-manage-tenant-self-scope-to-user-role.ts +++ b/packages/schemas/alterations/1.5.0-1684837981-add-manage-tenant-self-scope-to-user-role.ts @@ -1,5 +1,5 @@ import { generateStandardId } from '@logto/shared/universal'; -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.5.0-1685285719-support-default-resource.ts b/packages/schemas/alterations/1.5.0-1685285719-support-default-resource.ts index 4df058bce..0425333e3 100644 --- a/packages/schemas/alterations/1.5.0-1685285719-support-default-resource.ts +++ b/packages/schemas/alterations/1.5.0-1685285719-support-default-resource.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.6.0-1685691718-domain-unique.ts b/packages/schemas/alterations/1.6.0-1685691718-domain-unique.ts index 8e2042226..8ee2d008f 100644 --- a/packages/schemas/alterations/1.6.0-1685691718-domain-unique.ts +++ b/packages/schemas/alterations/1.6.0-1685691718-domain-unique.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.7.0-1688375200-sync-cloud-m2m-to-logto-config.ts b/packages/schemas/alterations/1.7.0-1688375200-sync-cloud-m2m-to-logto-config.ts index c2855385c..e595ee18c 100644 --- a/packages/schemas/alterations/1.7.0-1688375200-sync-cloud-m2m-to-logto-config.ts +++ b/packages/schemas/alterations/1.7.0-1688375200-sync-cloud-m2m-to-logto-config.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.7.0-1688613459-remove-m2m-credentials-from-existing-logto-email-connector-config.ts b/packages/schemas/alterations/1.7.0-1688613459-remove-m2m-credentials-from-existing-logto-email-connector-config.ts index b649ce99f..67b788fc7 100644 --- a/packages/schemas/alterations/1.7.0-1688613459-remove-m2m-credentials-from-existing-logto-email-connector-config.ts +++ b/packages/schemas/alterations/1.7.0-1688613459-remove-m2m-credentials-from-existing-logto-email-connector-config.ts @@ -1,6 +1,6 @@ import { GlobalValues } from '@logto/shared'; import { appendPath } from '@silverhand/essentials'; -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.7.0-1688627407-daily-active-users.ts b/packages/schemas/alterations/1.7.0-1688627407-daily-active-users.ts index e171d5e69..a8cfcb7b5 100644 --- a/packages/schemas/alterations/1.7.0-1688627407-daily-active-users.ts +++ b/packages/schemas/alterations/1.7.0-1688627407-daily-active-users.ts @@ -1,4 +1,4 @@ -import { type CommonQueryMethods, sql } from 'slonik'; +import { type CommonQueryMethods, sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.8.0-1692088012-add-is-suspend-column-to-tenants-table.ts b/packages/schemas/alterations/1.8.0-1692088012-add-is-suspend-column-to-tenants-table.ts index 00d70b393..e0f807b16 100644 --- a/packages/schemas/alterations/1.8.0-1692088012-add-is-suspend-column-to-tenants-table.ts +++ b/packages/schemas/alterations/1.8.0-1692088012-add-is-suspend-column-to-tenants-table.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.8.0-1692194751-add-affiliate-scopes.ts b/packages/schemas/alterations/1.8.0-1692194751-add-affiliate-scopes.ts index 9e7d7a804..ef20cbdc2 100644 --- a/packages/schemas/alterations/1.8.0-1692194751-add-affiliate-scopes.ts +++ b/packages/schemas/alterations/1.8.0-1692194751-add-affiliate-scopes.ts @@ -1,5 +1,5 @@ import { generateStandardId } from '@logto/shared/universal'; -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.9.0-1693554904-add-possword-policy.ts b/packages/schemas/alterations/1.9.0-1693554904-add-possword-policy.ts index f2a7a10d3..3d5629a14 100644 --- a/packages/schemas/alterations/1.9.0-1693554904-add-possword-policy.ts +++ b/packages/schemas/alterations/1.9.0-1693554904-add-possword-policy.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.9.0-1694399696-add-type-col-to-roles-table.ts b/packages/schemas/alterations/1.9.0-1694399696-add-type-col-to-roles-table.ts index 5b222e4e1..9819dc0b0 100644 --- a/packages/schemas/alterations/1.9.0-1694399696-add-type-col-to-roles-table.ts +++ b/packages/schemas/alterations/1.9.0-1694399696-add-type-col-to-roles-table.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.9.0-1694418765-specify-check-role-type-function-to-be-public-schema.ts b/packages/schemas/alterations/1.9.0-1694418765-specify-check-role-type-function-to-be-public-schema.ts index aabf5c497..3d66201c8 100644 --- a/packages/schemas/alterations/1.9.0-1694418765-specify-check-role-type-function-to-be-public-schema.ts +++ b/packages/schemas/alterations/1.9.0-1694418765-specify-check-role-type-function-to-be-public-schema.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.9.0-1694484927-remove-deprecated-challenge-flag.ts b/packages/schemas/alterations/1.9.0-1694484927-remove-deprecated-challenge-flag.ts index 180f89839..81042bad9 100644 --- a/packages/schemas/alterations/1.9.0-1694484927-remove-deprecated-challenge-flag.ts +++ b/packages/schemas/alterations/1.9.0-1694484927-remove-deprecated-challenge-flag.ts @@ -1,5 +1,5 @@ -import type { DatabaseTransactionConnection } from 'slonik'; -import { sql } from 'slonik'; +import type { DatabaseTransactionConnection } from '@silverhand/slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.9.0-1694487524-sie-mfa.ts b/packages/schemas/alterations/1.9.0-1694487524-sie-mfa.ts index 50d101bb2..8d77ec79a 100644 --- a/packages/schemas/alterations/1.9.0-1694487524-sie-mfa.ts +++ b/packages/schemas/alterations/1.9.0-1694487524-sie-mfa.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.9.0-1694509714-keep-existing-password-policy.ts b/packages/schemas/alterations/1.9.0-1694509714-keep-existing-password-policy.ts index 480f9b79d..3553f33d7 100644 --- a/packages/schemas/alterations/1.9.0-1694509714-keep-existing-password-policy.ts +++ b/packages/schemas/alterations/1.9.0-1694509714-keep-existing-password-policy.ts @@ -1,5 +1,5 @@ import { yes } from '@silverhand/essentials'; -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.9.0-1694746763-user-verifications.ts b/packages/schemas/alterations/1.9.0-1694746763-user-verifications.ts index e0b8038b5..f90a32d8e 100644 --- a/packages/schemas/alterations/1.9.0-1694746763-user-verifications.ts +++ b/packages/schemas/alterations/1.9.0-1694746763-user-verifications.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.9.2-1694854226-init-sentinel.ts b/packages/schemas/alterations/1.9.2-1694854226-init-sentinel.ts index 41a4a138d..f66c27fbb 100644 --- a/packages/schemas/alterations/1.9.2-1694854226-init-sentinel.ts +++ b/packages/schemas/alterations/1.9.2-1694854226-init-sentinel.ts @@ -1,4 +1,4 @@ -import { type CommonQueryMethods, sql } from 'slonik'; +import { type CommonQueryMethods, sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/1.9.2-1695198741-remove-m2m-app-admin-access-switch.ts b/packages/schemas/alterations/1.9.2-1695198741-remove-m2m-app-admin-access-switch.ts index 38980a56b..03b5b573e 100644 --- a/packages/schemas/alterations/1.9.2-1695198741-remove-m2m-app-admin-access-switch.ts +++ b/packages/schemas/alterations/1.9.2-1695198741-remove-m2m-app-admin-access-switch.ts @@ -1,6 +1,6 @@ import { generateStandardId } from '@logto/shared/universal'; import { deduplicate } from '@silverhand/essentials'; -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/next-1709521416-user-password-encrypt-method.ts b/packages/schemas/alterations/next-1709521416-user-password-encrypt-method.ts index 38c75b868..783e23389 100644 --- a/packages/schemas/alterations/next-1709521416-user-password-encrypt-method.ts +++ b/packages/schemas/alterations/next-1709521416-user-password-encrypt-method.ts @@ -1,4 +1,4 @@ -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/next-1709528944-regenerate-dau-data.ts b/packages/schemas/alterations/next-1709528944-regenerate-dau-data.ts index 1dc1ac5a6..c386b8698 100644 --- a/packages/schemas/alterations/next-1709528944-regenerate-dau-data.ts +++ b/packages/schemas/alterations/next-1709528944-regenerate-dau-data.ts @@ -1,5 +1,5 @@ import { generateStandardId } from '@logto/shared/universal'; -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/next-1710223946-add-fetch-custom-jwt-cloud-scope.ts b/packages/schemas/alterations/next-1710223946-add-fetch-custom-jwt-cloud-scope.ts index 000cf9db6..e619455bd 100644 --- a/packages/schemas/alterations/next-1710223946-add-fetch-custom-jwt-cloud-scope.ts +++ b/packages/schemas/alterations/next-1710223946-add-fetch-custom-jwt-cloud-scope.ts @@ -1,5 +1,5 @@ import { generateStandardId } from '@logto/shared/universal'; -import { sql } from 'slonik'; +import { sql } from '@silverhand/slonik'; import type { AlterationScript } from '../lib/types/alteration.js'; diff --git a/packages/schemas/alterations/utils/1704934999-tables.ts b/packages/schemas/alterations/utils/1704934999-tables.ts index df7c574de..607a89fed 100644 --- a/packages/schemas/alterations/utils/1704934999-tables.ts +++ b/packages/schemas/alterations/utils/1704934999-tables.ts @@ -1,4 +1,4 @@ -import { type CommonQueryMethods, sql } from 'slonik'; +import { type CommonQueryMethods, sql } from '@silverhand/slonik'; const getId = (value: string) => sql.identifier([value]); diff --git a/packages/schemas/package.json b/packages/schemas/package.json index f5f41d35d..257487297 100644 --- a/packages/schemas/package.json +++ b/packages/schemas/package.json @@ -55,7 +55,7 @@ "pluralize": "^8.0.0", "prettier": "^3.0.0", "roarr": "^7.11.0", - "slonik": "30.4.0", + "@silverhand/slonik": "31.0.0-beta.0", "slonik-sql-tag-raw": "^1.1.4", "typescript": "^5.3.3" }, diff --git a/packages/schemas/src/types/alteration.ts b/packages/schemas/src/types/alteration.ts index 7439b3eda..8ae971777 100644 --- a/packages/schemas/src/types/alteration.ts +++ b/packages/schemas/src/types/alteration.ts @@ -1,4 +1,4 @@ -import type { DatabaseTransactionConnection } from 'slonik'; +import type { DatabaseTransactionConnection } from '@silverhand/slonik'; export type AlterationScript = { up: (connection: DatabaseTransactionConnection) => Promise; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c63888f70..3b3645236 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -127,6 +127,9 @@ importers: '@silverhand/essentials': specifier: ^2.9.0 version: 2.9.0 + '@silverhand/slonik': + specifier: 31.0.0-beta.0 + version: 31.0.0-beta.0 chalk: specifier: ^5.0.0 version: 5.1.2 @@ -169,9 +172,6 @@ importers: semver: specifier: ^7.3.8 version: 7.5.2 - slonik: - specifier: 30.4.0 - version: 30.4.0 slonik-interceptor-preset: specifier: ^1.2.10 version: 1.2.10 @@ -3266,6 +3266,9 @@ importers: '@silverhand/essentials': specifier: ^2.9.0 version: 2.9.0 + '@silverhand/slonik': + specifier: 31.0.0-beta.0 + version: 31.0.0-beta.0 '@simplewebauthn/server': specifier: ^9.0.0 version: 9.0.1 @@ -3389,9 +3392,6 @@ importers: semver: specifier: ^7.3.8 version: 7.5.2 - slonik: - specifier: 30.4.0 - version: 30.4.0 slonik-interceptor-preset: specifier: ^1.2.10 version: 1.2.10 @@ -4012,6 +4012,9 @@ importers: '@silverhand/essentials': specifier: ^2.9.0 version: 2.9.0 + '@silverhand/slonik': + specifier: 31.0.0-beta.0 + version: 31.0.0-beta.0 '@silverhand/ts-config': specifier: 5.0.0 version: 5.0.0(typescript@5.3.3) @@ -4051,9 +4054,6 @@ importers: roarr: specifier: ^7.11.0 version: 7.11.0 - slonik: - specifier: 30.4.0 - version: 30.4.0 slonik-sql-tag-raw: specifier: ^1.1.4 version: 1.1.4(roarr@7.11.0)(slonik@30.4.0) @@ -9397,6 +9397,27 @@ packages: resolution: {integrity: sha512-n9mSO/gsLj0GRFXBRNhaQLRK6qbn6pBnKjMQdFwweKgT12ODBXpgkpXohpOBqSofnoaCQWqiDAT6xpCy/5dMIg==} engines: {node: ^18.12.0 || ^20.9.0, pnpm: ^8.0.0} + /@silverhand/slonik@31.0.0-beta.0: + resolution: {integrity: sha512-5T3T9duiUNSwKEKLCBiJ3Ri6FlfkhGelfoqBLXmj4pNy6nMt5sGLFDISm63LdgXj+I+j9ziYCLUgNYqT8fK0MQ==} + engines: {node: ^20.9.0} + dependencies: + '@types/pg': 8.11.2 + fast-safe-stringify: 2.1.1 + get-stack-trace: 2.1.1 + iso8601-duration: 2.1.2 + p-defer: 4.0.0 + pg: 8.11.3 + pg-cursor: 2.10.3(pg@8.11.3) + pg-protocol: 1.6.0 + pg-types: 4.0.2 + postgres-array: 3.0.2 + postgres-interval: 4.0.2 + roarr: 7.21.1 + serialize-error: 11.0.3 + through2: 4.0.2 + transitivePeerDependencies: + - pg-native + /@silverhand/ts-config-react@5.0.0(typescript@5.3.3): resolution: {integrity: sha512-DQpaG49sY36FhpyFIRAmTA5bG9ASFUVXu+yi29bMdLls51r9nEoBuWxWv2Sh3GnSGxKLq4gmFf+U8Zy/qcnX1w==} engines: {node: ^20.9.0} @@ -10211,6 +10232,13 @@ packages: resolution: {integrity: sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw==} dev: true + /@types/pg@8.11.2: + resolution: {integrity: sha512-G2Mjygf2jFMU/9hCaTYxJrwdObdcnuQde1gndooZSOHsNSaCehAuwc7EIuSA34Do8Jx2yZ19KtvW8P0j4EuUXw==} + dependencies: + '@types/node': 20.11.20 + pg-protocol: 1.6.0 + pg-types: 4.0.2 + /@types/pg@8.6.6: resolution: {integrity: sha512-O2xNmXebtwVekJDD+02udOncjVcMZQuTEQEMpKJ0ZRf5E7/9JJX3izhKUcUifBkyKpljyUM6BTgy2trmviKlpw==} dependencies: @@ -14949,6 +14977,9 @@ packages: /iso8601-duration@1.3.0: resolution: {integrity: sha512-K4CiUBzo3YeWk76FuET/dQPH03WE04R94feo5TSKQCXpoXQt9E4yx2CnY737QZnSAI3PI4WlKo/zfqizGx52QQ==} + /iso8601-duration@2.1.2: + resolution: {integrity: sha512-yXteYUiKv6x8seaDzyBwnZtPpmx766KfvQuaVNyPifYOjmPdOo3ajd4phDNa7Y5mTQGnXsNEcXFtVun1FjYXxQ==} + /istanbul-lib-coverage@3.2.0: resolution: {integrity: sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==} engines: {node: '>=8'} @@ -17784,6 +17815,10 @@ packages: resolution: {integrity: sha512-ugZxsxmtTln604yeYd29EGrNhazN2lywetzpKhfmQjW/VJmhpDmWbiX+h0zL8V91R0UXkhb3KtPmyq9PZw3aYw==} engines: {node: '>=8'} + /p-defer@4.0.0: + resolution: {integrity: sha512-Vb3QRvQ0Y5XnF40ZUWW7JfLogicVh/EnA5gBIvKDJoYpeI82+1E3AlB9yOcKFS0AhHrWVnAQO39fbR0G99IVEQ==} + engines: {node: '>=12'} + /p-filter@2.1.0: resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} engines: {node: '>=8'} @@ -18039,9 +18074,17 @@ packages: resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} dev: true + /pg-cloudflare@1.1.1: + resolution: {integrity: sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q==} + requiresBuild: true + optional: true + /pg-connection-string@2.5.0: resolution: {integrity: sha512-r5o/V/ORTA6TmUnyWZR9nCj1klXCO2CEKNRlVuJptZe85QuhFayC7WeMic7ndayT5IRIR0S0xFxFi2ousartlQ==} + /pg-connection-string@2.6.2: + resolution: {integrity: sha512-ch6OwaeaPYcova4kKZ15sbJ2hKb/VP48ZD2gE7i1J+L4MspCtBMAx8nMgz7bksc7IojCIIWuEhHibSMFH8m8oA==} + /pg-copy-streams-binary@2.2.0: resolution: {integrity: sha512-jPCWgTR8004wz5XOI2sc09+IMwE7YMeINYCabwPMCPtlgj2ay81VLCClMkj/u+xOeisRcN8vCrIZ4FrqlaTyBQ==} dependencies: @@ -18063,6 +18106,13 @@ packages: dependencies: obuf: 1.1.2 + /pg-cursor@2.10.3(pg@8.11.3): + resolution: {integrity: sha512-rDyBVoqPVnx/PTmnwQAYgusSeAKlTL++gmpf5klVK+mYMFEqsOc6VHHZnPKc/4lOvr4r6fiMuoxSFuBF1dx4FQ==} + peerDependencies: + pg: ^8 + dependencies: + pg: 8.11.3 + /pg-cursor@2.10.3(pg@8.8.0): resolution: {integrity: sha512-rDyBVoqPVnx/PTmnwQAYgusSeAKlTL++gmpf5klVK+mYMFEqsOc6VHHZnPKc/4lOvr4r6fiMuoxSFuBF1dx4FQ==} peerDependencies: @@ -18101,6 +18151,13 @@ packages: dependencies: pg: 8.8.0 + /pg-pool@3.6.1(pg@8.11.3): + resolution: {integrity: sha512-jizsIzhkIitxCGfPRzJn1ZdcosIt3pz9Sh3V01fm1vZnbnCMgmGl5wvGGdNN2EL9Rmb0EcFoCkixH4Pu+sP9Og==} + peerDependencies: + pg: '>=8.0' + dependencies: + pg: 8.11.3 + /pg-protocol@1.6.0: resolution: {integrity: sha512-M+PDm637OY5WM307051+bsDia5Xej6d9IR4GwJse1qA1DIhiKlksvrneZOYQq42OM+spubpcNYEo2FcKQrDk+Q==} @@ -18138,6 +18195,37 @@ packages: postgres-interval: 3.0.0 postgres-range: 1.1.2 + /pg-types@4.0.2: + resolution: {integrity: sha512-cRL3JpS3lKMGsKaWndugWQoLOCoP+Cic8oseVcbr0qhPzYD5DWXK+RZ9LY9wxRf7RQia4SCwQlXk0q6FCPrVng==} + engines: {node: '>=10'} + dependencies: + pg-int8: 1.0.1 + pg-numeric: 1.0.2 + postgres-array: 3.0.2 + postgres-bytea: 3.0.0 + postgres-date: 2.1.0 + postgres-interval: 3.0.0 + postgres-range: 1.1.2 + + /pg@8.11.3: + resolution: {integrity: sha512-+9iuvG8QfaaUrrph+kpF24cXkH1YOOUeArRNYIxq1viYHZagBxrTno7cecY1Fa44tJeZvaoG+Djpkc3JwehN5g==} + engines: {node: '>= 8.0.0'} + peerDependencies: + pg-native: '>=3.0.1' + peerDependenciesMeta: + pg-native: + optional: true + dependencies: + buffer-writer: 2.0.0 + packet-reader: 1.0.0 + pg-connection-string: 2.6.2 + pg-pool: 3.6.1(pg@8.11.3) + pg-protocol: 1.6.0 + pg-types: 2.2.0 + pgpass: 1.0.4 + optionalDependencies: + pg-cloudflare: 1.1.1 + /pg@8.8.0: resolution: {integrity: sha512-UXYN0ziKj+AeNNP7VDMwrehpACThH7LUl/p8TDFpEUuSejCUIwGSfxpHsPvtM6/WXFy6SU4E5RG4IJV/TZAGjw==} engines: {node: '>= 8.0.0'} @@ -18375,6 +18463,10 @@ packages: resolution: {integrity: sha512-h7i53Dw2Yq3a1uuZ6lbVFAkvMMwssJ8jkzeAg0XaZm1XIFF/t/s+tockdqbWTymyEm07dVenOQbFisEi+kj8uA==} engines: {node: '>=12'} + /postgres-array@3.0.2: + resolution: {integrity: sha512-6faShkdFugNQCLwucjPcY5ARoW1SlbnrZjmGl0IrrqewpvxvhSLHimCVzqeuULCbG0fQv7Dtk1yDbG3xv7Veog==} + engines: {node: '>=12'} + /postgres-bytea@1.0.0: resolution: {integrity: sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==} engines: {node: '>=0.10.0'} @@ -18393,6 +18485,10 @@ packages: resolution: {integrity: sha512-YtMKdsDt5Ojv1wQRvUhnyDJNSr2dGIC96mQVKz7xufp07nfuFONzdaowrMHjlAzY6GDLd4f+LUHHAAM1h4MdUw==} engines: {node: '>=12'} + /postgres-date@2.1.0: + resolution: {integrity: sha512-K7Juri8gtgXVcDfZttFKVmhglp7epKb1K4pgrkLxehjqkrgPhfG6OO8LHLkfaqkbpjNRnra018XwAr1yQFWGcA==} + engines: {node: '>=12'} + /postgres-interval@1.2.0: resolution: {integrity: sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==} engines: {node: '>=0.10.0'} @@ -18412,6 +18508,10 @@ packages: resolution: {integrity: sha512-OWeL7kyEKJiY7mCmVY+c7/6uhAlt/colA/Nl/Mgls/M3jssrQzFra04iNWnD/qAmG7TsCSgWAASCyiaoBOP/sg==} engines: {node: '>=12'} + /postgres-interval@4.0.2: + resolution: {integrity: sha512-EMsphSQ1YkQqKZL2cuG0zHkmjCCzQqQ71l2GXITqRwjhRleCdv00bDk/ktaSi0LnlaPzAc3535KTrjXsTdtx7A==} + engines: {node: '>=12'} + /postgres-range@1.1.2: resolution: {integrity: sha512-CmPJDSpd3/xYJrtw/tI0Cv029B0zMtnesUOHCZmgvypGBLn+eExXcjCS5OY7mpiw6imYEvd2IMD36sAOYA9U1w==} @@ -19688,6 +19788,12 @@ packages: dependencies: lru-cache: 6.0.0 + /serialize-error@11.0.3: + resolution: {integrity: sha512-2G2y++21dhj2R7iHAdd0FIzjGwuKZld+7Pl/bTU6YIkrC2ZMbVUjm+luj6A6V34Rv9XfKJDKpTWu9W4Gse1D9g==} + engines: {node: '>=14.16'} + dependencies: + type-fest: 2.19.0 + /serialize-error@7.0.1: resolution: {integrity: sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==} engines: {node: '>=10'} @@ -21064,6 +21170,10 @@ packages: engines: {node: '>=10'} dev: true + /type-fest@2.19.0: + resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==} + engines: {node: '>=12.20'} + /type-fest@3.13.1: resolution: {integrity: sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==} engines: {node: '>=14.16'}