mirror of
https://github.com/logto-io/logto.git
synced 2024-12-30 20:33:54 -05:00
Finish adapter
This commit is contained in:
parent
bda284c99b
commit
b892c882be
9 changed files with 249 additions and 49 deletions
|
@ -12,17 +12,20 @@
|
|||
"dev": "tsc-watch --onSuccess \"node ./build/index.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@logto/schemas": "^1.0.0",
|
||||
"dayjs": "^1.10.5",
|
||||
"dotenv": "^10.0.0",
|
||||
"koa": "^2.13.1",
|
||||
"koa-logger": "^3.2.1",
|
||||
"koa-mount": "^4.0.0",
|
||||
"koa-router": "^10.0.0",
|
||||
"oidc-provider": "^7.4.1",
|
||||
"slonik": "23.6.3",
|
||||
"slonik-interceptor-field-name-transformation": "^1.5.3",
|
||||
"slonik-interceptor-query-normalisation": "^1.1.10"
|
||||
"slonik-interceptor-preset": "^1.2.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/koa": "^2.13.3",
|
||||
"@types/koa-logger": "^3.1.1",
|
||||
"@types/koa-mount": "^4.0.0",
|
||||
"@types/koa-router": "^7.4.2",
|
||||
"@types/oidc-provider": "^7.4.0",
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
import { createPool } from 'slonik';
|
||||
import { createQueryNormalisationInterceptor } from 'slonik-interceptor-query-normalisation';
|
||||
import { createFieldNameTransformationInterceptor } from 'slonik-interceptor-field-name-transformation';
|
||||
import { createInterceptors } from 'slonik-interceptor-preset';
|
||||
|
||||
const interceptors = [
|
||||
createQueryNormalisationInterceptor(),
|
||||
createFieldNameTransformationInterceptor({ format: 'CAMEL_CASE' }),
|
||||
];
|
||||
const interceptors = [...createInterceptors()];
|
||||
|
||||
const pool = createPool('postgres://localhost/logto', { interceptors });
|
||||
|
||||
|
|
|
@ -5,10 +5,16 @@ type FieldIdentifiers<Key extends string | number | symbol> = {
|
|||
[key in Key]: IdentifierSqlTokenType;
|
||||
};
|
||||
|
||||
export const convertToIdentifiers = <T extends Table>({ table, fields }: T) => ({
|
||||
export const convertToIdentifiers = <T extends Table>(
|
||||
{ table, fields }: T,
|
||||
withPrefix = false
|
||||
) => ({
|
||||
table: sql.identifier([table]),
|
||||
fields: Object.entries<string>(fields).reduce(
|
||||
(previous, [key, value]) => ({ ...previous, [key]: sql.identifier([table, value]) }),
|
||||
(previous, [key, value]) => ({
|
||||
...previous,
|
||||
[key]: sql.identifier(withPrefix ? [table, value] : [value]),
|
||||
}),
|
||||
// eslint-disable-next-line @typescript-eslint/prefer-reduce-type-parameter
|
||||
{} as FieldIdentifiers<keyof T['fields']>
|
||||
),
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
declare module 'slonik-interceptor-field-name-transformation' {
|
||||
import { InterceptorType } from 'slonik';
|
||||
|
||||
export const createFieldNameTransformationInterceptor: (config?: {
|
||||
format: 'CAMEL_CASE';
|
||||
}) => InterceptorType;
|
||||
}
|
10
packages/core/src/include.d/slonik-interceptor-preset.d.ts
vendored
Normal file
10
packages/core/src/include.d/slonik-interceptor-preset.d.ts
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
declare module 'slonik-interceptor-preset' {
|
||||
import { InterceptorType } from 'slonik';
|
||||
|
||||
export const createInterceptors: (config?: {
|
||||
benchmarkQueries: boolean;
|
||||
logQueries: boolean;
|
||||
normaliseQueries: boolean;
|
||||
transformFieldNames: boolean;
|
||||
}) => readonly InterceptorType[];
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
declare module 'slonik-interceptor-query-normalisation' {
|
||||
import { InterceptorType } from 'slonik';
|
||||
|
||||
export const createQueryNormalisationInterceptor: (config?: {
|
||||
stripComments?: boolean;
|
||||
}) => InterceptorType;
|
||||
}
|
|
@ -1,7 +1,12 @@
|
|||
import dotenv from 'dotenv';
|
||||
dotenv.config();
|
||||
|
||||
import Koa from 'koa';
|
||||
import logger from 'koa-logger';
|
||||
import mount from 'koa-mount';
|
||||
import Router from 'koa-router';
|
||||
import { Provider } from 'oidc-provider';
|
||||
import postgresAdapter from './oidc/adapter';
|
||||
|
||||
const router = new Router();
|
||||
|
||||
|
@ -9,6 +14,10 @@ const app = new Koa();
|
|||
const PORT = 3000;
|
||||
|
||||
const oidc = new Provider(`http://localhost:${PORT}/oidc`, {
|
||||
adapter: postgresAdapter,
|
||||
renderError: (ctx, out, error) => {
|
||||
console.log(error);
|
||||
},
|
||||
cookies: {
|
||||
// V2: Rotate this when necessary
|
||||
// https://github.com/panva/node-oidc-provider/blob/main/docs/README.md#cookieskeys
|
||||
|
@ -38,7 +47,8 @@ router.get('/callback', (ctx) => {
|
|||
ctx.body = 'A callback';
|
||||
});
|
||||
|
||||
app.use(mount('/oidc', oidc.app)).use(router.routes()).use(router.allowedMethods());
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
app.use(logger()).use(mount('/oidc', oidc.app)).use(router.routes()).use(router.allowedMethods());
|
||||
|
||||
app.listen(PORT, () => {
|
||||
console.log(`App is listening on port ${PORT}`);
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import dayjs from 'dayjs';
|
||||
import { AdapterFactory } from 'oidc-provider';
|
||||
import { sql } from 'slonik';
|
||||
import { IdentifierSqlTokenType, sql, ValueExpressionType } from 'slonik';
|
||||
import { OidcModelInstances, OidcModelInstanceDBEntry } from '@logto/schemas';
|
||||
import pool from '../database/pool';
|
||||
import { convertToIdentifiers } from '../database/utils';
|
||||
import { conditional } from '../utils';
|
||||
|
||||
const postgresAdapter: AdapterFactory = (modelName) => {
|
||||
export default function postgresAdapter(modelName: string) {
|
||||
const { table, fields } = convertToIdentifiers(OidcModelInstances);
|
||||
|
||||
type WithConsumed<T> = T & { consumed?: boolean };
|
||||
|
@ -14,32 +14,83 @@ const postgresAdapter: AdapterFactory = (modelName) => {
|
|||
...data,
|
||||
...(consumedAt ? { consumed: true } : undefined),
|
||||
});
|
||||
type QueryResult = Pick<OidcModelInstanceDBEntry, 'payload' | 'consumedAt'>;
|
||||
const convertResult = (result: QueryResult | null) =>
|
||||
conditional(result && withConsumed(result.payload, result.consumedAt));
|
||||
|
||||
const findByField = async <T extends ValueExpressionType>(
|
||||
field: IdentifierSqlTokenType,
|
||||
value: T
|
||||
) => {
|
||||
const result = await pool.maybeOne<QueryResult>(sql`
|
||||
select ${fields.payload}, ${fields.consumedAt}
|
||||
from ${table}
|
||||
where ${fields.modelName}=${modelName}
|
||||
and ${field}=${value}
|
||||
`);
|
||||
|
||||
return convertResult(result);
|
||||
};
|
||||
|
||||
const adapter: ReturnType<AdapterFactory> = {
|
||||
upsert: async (id, payload, expiresIn) => {
|
||||
await pool.query(sql`
|
||||
insert into ${table} (${fields.modelName}, ${fields.id}, ${fields.payload}, ${
|
||||
fields.expiresAt
|
||||
})
|
||||
values (${modelName}, ${id}, ${JSON.stringify(payload)}, ${dayjs()
|
||||
.add(expiresIn, 'second')
|
||||
.unix()})
|
||||
on conflict key do update
|
||||
insert into ${table} (${sql.join(
|
||||
[
|
||||
fields.modelName,
|
||||
fields.id,
|
||||
fields.payload,
|
||||
fields.expiresAt,
|
||||
fields.userCode,
|
||||
fields.uid,
|
||||
fields.grantId,
|
||||
],
|
||||
sql`, `
|
||||
)})
|
||||
values (
|
||||
${modelName},
|
||||
${id},
|
||||
${JSON.stringify(payload)},
|
||||
${dayjs().add(expiresIn, 'second').unix()},
|
||||
${payload.userCode ?? null},
|
||||
${payload.uid ?? null},
|
||||
${payload.grantId ?? null}
|
||||
)
|
||||
on conflict (${fields.modelName}, ${fields.id}) do update
|
||||
set
|
||||
${fields.payload}=excluded.${fields.payload},
|
||||
${fields.expiresAt}=excluded.${fields.expiresAt},
|
||||
${fields.userCode}=excluded.${fields.userCode},
|
||||
${fields.uid}=excluded.${fields.uid},
|
||||
${fields.grantId}=excluded.${fields.grantId}
|
||||
`);
|
||||
},
|
||||
find: async (id) => {
|
||||
const result = await pool.maybeOne<
|
||||
Pick<OidcModelInstanceDBEntry, 'payload' | 'consumedAt'>
|
||||
>(sql`
|
||||
select ${fields.payload}, ${fields.consumedAt}
|
||||
from ${table}
|
||||
find: async (id) => findByField(fields.id, id),
|
||||
findByUserCode: async (userCode) => findByField(fields.userCode, userCode),
|
||||
findByUid: async (uid) => findByField(fields.uid, uid),
|
||||
consume: async (id) => {
|
||||
await pool.query(sql`
|
||||
update ${table}
|
||||
set ${fields.consumedAt}=${dayjs().unix()}
|
||||
where ${fields.modelName}=${modelName}
|
||||
and id=${id}
|
||||
and ${fields.id}=${id}
|
||||
`);
|
||||
},
|
||||
destroy: async (id) => {
|
||||
await pool.query(sql`
|
||||
delete from ${table}
|
||||
where ${fields.modelName}=${modelName}
|
||||
and ${fields.id}=${id}
|
||||
`);
|
||||
},
|
||||
revokeByGrantId: async (grantId) => {
|
||||
await pool.query(sql`
|
||||
delete from ${table}
|
||||
where ${fields.modelName}=${modelName}
|
||||
and ${fields.grantId}=${grantId}
|
||||
`);
|
||||
|
||||
return conditional(result && withConsumed(result));
|
||||
},
|
||||
};
|
||||
|
||||
return adapter;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -251,6 +251,11 @@
|
|||
dependencies:
|
||||
vary "^1.1.2"
|
||||
|
||||
"@logto/schemas@^1.0.0":
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@logto/schemas/-/schemas-1.0.0.tgz#5dbeec9caa9b1882b00b7507b8f6f337c8665ca9"
|
||||
integrity sha512-+HQOra9CQgco4PwC3bAuzwAbEtD+Vf6tRLMWbzES5BXM3TMTdUasSQnbG2lRwWdudvmCwYM08Z0ZXipwmEstIg==
|
||||
|
||||
"@mrmlnc/readdir-enhanced@^2.2.1":
|
||||
version "2.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde"
|
||||
|
@ -440,6 +445,13 @@
|
|||
dependencies:
|
||||
"@types/koa" "*"
|
||||
|
||||
"@types/koa-logger@^3.1.1":
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/koa-logger/-/koa-logger-3.1.1.tgz#bf759ba2f25b7562ffa30b09616bb1c1e5070fea"
|
||||
integrity sha512-wp2HaskkPugfwgXgNnc+idnReuJZSTTYQbkcxXjsMhp1kTc342PxDzTL9FXDgBfEvgt9NX1CCGjkwPKX2dlEKQ==
|
||||
dependencies:
|
||||
"@types/koa" "*"
|
||||
|
||||
"@types/koa-mount@^4.0.0":
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/koa-mount/-/koa-mount-4.0.0.tgz#aa0505763c0d20bf4a16cdec0d9ccd2f4f2d2a86"
|
||||
|
@ -618,7 +630,7 @@ acorn@^7.4.0:
|
|||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa"
|
||||
integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==
|
||||
|
||||
ajv@^6.10.0, ajv@^6.11.0, ajv@^6.12.4:
|
||||
ajv@^6.10.0, ajv@^6.10.2, ajv@^6.11.0, ajv@^6.12.4:
|
||||
version "6.12.6"
|
||||
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4"
|
||||
integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==
|
||||
|
@ -667,7 +679,7 @@ ansi-regex@^5.0.0:
|
|||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
|
||||
integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==
|
||||
|
||||
ansi-styles@^3.2.1:
|
||||
ansi-styles@^3.2.0, ansi-styles@^3.2.1:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
|
||||
integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==
|
||||
|
@ -775,6 +787,11 @@ assign-symbols@^1.0.0:
|
|||
resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367"
|
||||
integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=
|
||||
|
||||
astral-regex@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9"
|
||||
integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==
|
||||
|
||||
astral-regex@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31"
|
||||
|
@ -930,7 +947,7 @@ bufferput@^0.1.3:
|
|||
resolved "https://registry.yarnpkg.com/bufferput/-/bufferput-0.1.3.tgz#c6cd4a2cefa395d2287774a17bc9a90b224447d9"
|
||||
integrity sha1-xs1KLO+jldIod3She8mpCyJER9k=
|
||||
|
||||
bytes@3.1.0:
|
||||
bytes@3.1.0, bytes@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6"
|
||||
integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==
|
||||
|
@ -1243,6 +1260,11 @@ cosmiconfig@^7.0.0:
|
|||
path-type "^4.0.0"
|
||||
yaml "^1.10.0"
|
||||
|
||||
crack-json@^1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/crack-json/-/crack-json-1.3.0.tgz#9203e472b7d5dc0a32915b24d7bfb9b8ea996bc0"
|
||||
integrity sha512-JfZ9NPLsU9ejTYgZ7fM+5TIMfTwROTxpi2Twh597GxmiVDwIGZSjaor+zsQBKZ0mmCKOFb9EZZLVeKNf/5UaGg==
|
||||
|
||||
cross-spawn@^7.0.2, cross-spawn@^7.0.3:
|
||||
version "7.0.3"
|
||||
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
|
||||
|
@ -1458,6 +1480,11 @@ dot-prop@^5.2.0:
|
|||
dependencies:
|
||||
is-obj "^2.0.0"
|
||||
|
||||
dotenv@^10.0.0:
|
||||
version "10.0.0"
|
||||
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81"
|
||||
integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==
|
||||
|
||||
duplexer3@^0.1.4:
|
||||
version "0.1.4"
|
||||
resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2"
|
||||
|
@ -2486,6 +2513,11 @@ human-signals@^2.1.0:
|
|||
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"
|
||||
integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==
|
||||
|
||||
humanize-number@0.0.2:
|
||||
version "0.0.2"
|
||||
resolved "https://registry.yarnpkg.com/humanize-number/-/humanize-number-0.0.2.tgz#11c0af6a471643633588588048f1799541489c18"
|
||||
integrity sha1-EcCvakcWQ2M1iFiASPF5lUFInBg=
|
||||
|
||||
hyperid@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/hyperid/-/hyperid-2.1.0.tgz#2f5ed7537e87e8fddd344710a610be501b3d2da6"
|
||||
|
@ -3113,6 +3145,16 @@ koa-convert@^1.2.0:
|
|||
co "^4.6.0"
|
||||
koa-compose "^3.0.0"
|
||||
|
||||
koa-logger@^3.2.1:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/koa-logger/-/koa-logger-3.2.1.tgz#ab9db879526db3837cc9ce4fd983c025b1689f22"
|
||||
integrity sha512-MjlznhLLKy9+kG8nAXKJLM0/ClsQp/Or2vI3a5rbSQmgl8IJBQO0KI5FA70BvW+hqjtxjp49SpH2E7okS6NmHg==
|
||||
dependencies:
|
||||
bytes "^3.1.0"
|
||||
chalk "^2.4.2"
|
||||
humanize-number "0.0.2"
|
||||
passthrough-counter "^1.0.0"
|
||||
|
||||
koa-mount@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/koa-mount/-/koa-mount-4.0.0.tgz#e0265e58198e1a14ef889514c607254ff386329c"
|
||||
|
@ -3240,7 +3282,7 @@ lodash.truncate@^4.4.2:
|
|||
resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193"
|
||||
integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=
|
||||
|
||||
lodash@^4.13.1, lodash@^4.17.21:
|
||||
lodash@^4.13.1, lodash@^4.17.14, lodash@^4.17.21:
|
||||
version "4.17.21"
|
||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
|
||||
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
|
||||
|
@ -3795,6 +3837,11 @@ parse-json@^5.0.0:
|
|||
json-parse-even-better-errors "^2.3.0"
|
||||
lines-and-columns "^1.1.6"
|
||||
|
||||
parse-ms@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/parse-ms/-/parse-ms-2.1.0.tgz#348565a753d4391fa524029956b172cb7753097d"
|
||||
integrity sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==
|
||||
|
||||
parseurl@^1.3.2:
|
||||
version "1.3.3"
|
||||
resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4"
|
||||
|
@ -3810,6 +3857,11 @@ paseto@^2.1.0:
|
|||
resolved "https://registry.yarnpkg.com/paseto/-/paseto-2.1.1.tgz#8d1650dcbbee7bb566d436fd897a62d074199f5c"
|
||||
integrity sha512-gwJ4+A3rnWKpGVzyWNQxhreGXURx4zeIdxeW4ToTGfNksF9jNICcKQqrBP+OYiFMVecmJmUKRllM3JXE1R0S7w==
|
||||
|
||||
passthrough-counter@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/passthrough-counter/-/passthrough-counter-1.0.0.tgz#1967d9e66da572b5c023c787db112a387ab166fa"
|
||||
integrity sha1-GWfZ5m2lcrXAI8eH2xEqOHqxZvo=
|
||||
|
||||
path-dirname@^1.0.0:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0"
|
||||
|
@ -3893,6 +3945,13 @@ pg-cursor@^2.4.1, pg-cursor@^2.5.2:
|
|||
resolved "https://registry.yarnpkg.com/pg-cursor/-/pg-cursor-2.6.0.tgz#a85df1bd1389c75ffa443ee94073da0a1be360ba"
|
||||
integrity sha512-BFLg40CTgBJ+LX9EwqjztUYaKxpxLffMmDTmlQNMCustX/JxMTYimxRkdhZvPYZGp++/2LjuqkKtO5DVVq0FNg==
|
||||
|
||||
pg-formatter@^1.1.2:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/pg-formatter/-/pg-formatter-1.2.0.tgz#8ea370fdbd3736ed4ff3e419f30f59139a311efd"
|
||||
integrity sha512-//8AJYr7Ui4fTKK8RyGxy7SjC/UaHdLdTfMEB5kmN1Sfls5I06w8t2qAcHHF6z/uHF/zxayJ3QWx2i2i73EFog==
|
||||
dependencies:
|
||||
shell-quote "^1.7.2"
|
||||
|
||||
pg-int8@1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/pg-int8/-/pg-int8-1.0.1.tgz#943bd463bf5b71b4170115f80f8efc9a0c0eb78c"
|
||||
|
@ -4082,6 +4141,13 @@ prettier@^2.2.1:
|
|||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.1.tgz#76903c3f8c4449bc9ac597acefa24dc5ad4cbea6"
|
||||
integrity sha512-p+vNbgpLjif/+D+DwAZAbndtRrR0md0MwfmOVN9N+2RgyACMT+7tfaRnT+WDPkqnuVwleyuBIG2XBxKDme3hPA==
|
||||
|
||||
pretty-ms@^6.0.0:
|
||||
version "6.0.1"
|
||||
resolved "https://registry.yarnpkg.com/pretty-ms/-/pretty-ms-6.0.1.tgz#03ec6cfee20329f142645e63efad96bb775d3da4"
|
||||
integrity sha512-ke4njoVmlotekHlHyCZ3wI/c5AMT8peuHs8rKJqekj/oR5G8lND2dVpicFlUz5cbZgE290vvkMuDwfj/OcW1kw==
|
||||
dependencies:
|
||||
parse-ms "^2.1.0"
|
||||
|
||||
progress@^2.0.0:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
|
||||
|
@ -4440,6 +4506,13 @@ semver@^7.2.1, semver@^7.3.4, semver@^7.3.5:
|
|||
dependencies:
|
||||
lru-cache "^6.0.0"
|
||||
|
||||
serialize-error@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-5.0.0.tgz#a7ebbcdb03a5d71a6ed8461ffe0fc1a1afed62ac"
|
||||
integrity sha512-/VtpuyzYf82mHYTtI4QKtwHa79vAdU5OQpNPAmE/0UDdlGT0ZxHwC+J6gXkw29wwoVI8fMPsfcVHOwXtUQYYQA==
|
||||
dependencies:
|
||||
type-fest "^0.8.0"
|
||||
|
||||
serialize-error@^7.0.1:
|
||||
version "7.0.1"
|
||||
resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-7.0.1.tgz#f1360b0447f61ffb483ec4157c737fab7d778e18"
|
||||
|
@ -4486,6 +4559,11 @@ shebang-regex@^3.0.0:
|
|||
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
|
||||
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
|
||||
|
||||
shell-quote@^1.7.2:
|
||||
version "1.7.2"
|
||||
resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2"
|
||||
integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==
|
||||
|
||||
signal-exit@^3.0.2, signal-exit@^3.0.3:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"
|
||||
|
@ -4501,6 +4579,15 @@ slash@^3.0.0:
|
|||
resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"
|
||||
integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==
|
||||
|
||||
slice-ansi@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636"
|
||||
integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==
|
||||
dependencies:
|
||||
ansi-styles "^3.2.0"
|
||||
astral-regex "^1.0.0"
|
||||
is-fullwidth-code-point "^2.0.0"
|
||||
|
||||
slice-ansi@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b"
|
||||
|
@ -4519,6 +4606,38 @@ slonik-interceptor-field-name-transformation@^1.5.3:
|
|||
core-js "^3.6.4"
|
||||
slonik "^22.4.0"
|
||||
|
||||
slonik-interceptor-preset@^1.2.10:
|
||||
version "1.2.10"
|
||||
resolved "https://registry.yarnpkg.com/slonik-interceptor-preset/-/slonik-interceptor-preset-1.2.10.tgz#9a17640393f238daf75355df141df8297ea5fb76"
|
||||
integrity sha512-TKy5roPfJh+f7GIaGuJGhS5U51mqFgrlEA5GmfpO+KuqHeUEvjEwju2pKtrQVqqxewN17YSIvJH7ZxNoA7SoYQ==
|
||||
dependencies:
|
||||
slonik "^22.4.0"
|
||||
slonik-interceptor-field-name-transformation "^1.5.3"
|
||||
slonik-interceptor-query-benchmarking "^1.3.10"
|
||||
slonik-interceptor-query-logging "^1.3.8"
|
||||
slonik-interceptor-query-normalisation "^1.1.10"
|
||||
|
||||
slonik-interceptor-query-benchmarking@^1.3.10:
|
||||
version "1.3.10"
|
||||
resolved "https://registry.yarnpkg.com/slonik-interceptor-query-benchmarking/-/slonik-interceptor-query-benchmarking-1.3.10.tgz#5af5d66be3c33355a53eb7d0a43a0760a996b894"
|
||||
integrity sha512-f9jxhsu+8u0ssf2pdzLx1jSlGODkAitNbGrprJWGOjmnQzZKW4jWaq54DZGwyNv4HotOb9m4Lp0u9XQODKXyng==
|
||||
dependencies:
|
||||
core-js "^3.6.4"
|
||||
pg-formatter "^1.1.2"
|
||||
pretty-ms "^6.0.0"
|
||||
slonik "^22.4.0"
|
||||
table "^5.4.6"
|
||||
wrap-ansi "^6.2.0"
|
||||
|
||||
slonik-interceptor-query-logging@^1.3.8:
|
||||
version "1.3.9"
|
||||
resolved "https://registry.yarnpkg.com/slonik-interceptor-query-logging/-/slonik-interceptor-query-logging-1.3.9.tgz#5df6ee5ee8c5038874d5e6c78651332e691ffb7a"
|
||||
integrity sha512-ACw2DzF8SwPu6YT0T7K2T0ajNo/TXymPe6F/6/NOInBO4I99czhZRmbeYMEXb6zs3m/iVd8795aSqk169EIUdQ==
|
||||
dependencies:
|
||||
crack-json "^1.3.0"
|
||||
pretty-ms "^6.0.0"
|
||||
serialize-error "^5.0.0"
|
||||
|
||||
slonik-interceptor-query-normalisation@^1.1.10:
|
||||
version "1.1.10"
|
||||
resolved "https://registry.yarnpkg.com/slonik-interceptor-query-normalisation/-/slonik-interceptor-query-normalisation-1.1.10.tgz#8b31a8955f4578e94d4013d1c86410bb8a231978"
|
||||
|
@ -4825,6 +4944,16 @@ supports-hyperlinks@^2.0.0:
|
|||
has-flag "^4.0.0"
|
||||
supports-color "^7.0.0"
|
||||
|
||||
table@^5.4.6:
|
||||
version "5.4.6"
|
||||
resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e"
|
||||
integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==
|
||||
dependencies:
|
||||
ajv "^6.10.2"
|
||||
lodash "^4.17.14"
|
||||
slice-ansi "^2.1.0"
|
||||
string-width "^3.0.0"
|
||||
|
||||
table@^6.0.9:
|
||||
version "6.7.1"
|
||||
resolved "https://registry.yarnpkg.com/table/-/table-6.7.1.tgz#ee05592b7143831a8c94f3cee6aae4c1ccef33e2"
|
||||
|
@ -5009,7 +5138,7 @@ type-fest@^0.6.0:
|
|||
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b"
|
||||
integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==
|
||||
|
||||
type-fest@^0.8.1:
|
||||
type-fest@^0.8.0, type-fest@^0.8.1:
|
||||
version "0.8.1"
|
||||
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d"
|
||||
integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==
|
||||
|
@ -5215,6 +5344,15 @@ word-wrap@^1.2.3:
|
|||
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"
|
||||
integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==
|
||||
|
||||
wrap-ansi@^6.2.0:
|
||||
version "6.2.0"
|
||||
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53"
|
||||
integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==
|
||||
dependencies:
|
||||
ansi-styles "^4.0.0"
|
||||
string-width "^4.1.0"
|
||||
strip-ansi "^6.0.0"
|
||||
|
||||
wrap-ansi@^7.0.0:
|
||||
version "7.0.0"
|
||||
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
|
||||
|
|
Loading…
Reference in a new issue