metamigo-api: runs in docker now

* great typescript module import refactor
* refactor metamigo-cli so it is the entrypoint for the db, api, and
  worker
This commit is contained in:
Abel Luck 2023-06-02 14:05:20 +00:00
parent b45e2e8c11
commit 696ba16cb7
78 changed files with 319 additions and 180 deletions

View file

@ -1,10 +1,10 @@
/* eslint-disable unicorn/no-null,max-params */
import { createHash, randomBytes } from "node:crypto";
import omit from "lodash/omit";
import type { IMetamigoRepositories } from "../records";
import type { UnsavedAccount } from "../records/account";
import type { UserId, UnsavedUser, SavedUser } from "../records/user";
import type { UnsavedSession, SavedSession } from "../records/session";
import omit from "lodash/omit.js";
import type { IMetamigoRepositories } from "../records/index.js";
import type { UnsavedAccount } from "../records/account.js";
import type { UserId, UnsavedUser, SavedUser } from "../records/user.js";
import type { UnsavedSession, SavedSession } from "../records/session.js";
// Sessions expire after 30 days of being idle
export const defaultSessionMaxAge = 30 * 24 * 60 * 60 * 1000;