backend-common: add resolvePackagePath

This commit is contained in:
Patrik Oldsberg
2020-09-01 18:58:33 +02:00
parent 320b77e75b
commit c319de51a7
6 changed files with 53 additions and 23 deletions
@@ -15,13 +15,13 @@
*/
import Knex from 'knex';
import path from 'path';
import { utc } from 'moment';
import { resolvePackagePath } from '@backstage/backend-common';
import { AnyJWK, KeyStore, StoredKey } from './types';
const migrationsDir = path.resolve(
require.resolve('@backstage/plugin-auth-backend/package.json'),
'../migrations',
const migrationsDir = resolvePackagePath(
'@backstage/plugin-auth-backend',
'migrations',
);
const TABLE = 'signing_keys';