@openstax/ts-utils 1.30.1 → 1.30.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38,7 +38,7 @@ export type ApiClientResponse<Ro> = Ro extends any ? {
38
38
  } : never;
39
39
  export type ExpandRoute<T> = T extends ((...args: infer A) => infer R) & {
40
40
  renderUrl: (...args: infer Ar) => Promise<string>;
41
- } ? (...args: A) => R & {
41
+ } ? ((...args: A) => R) & {
42
42
  renderUrl: (...args: Ar) => Promise<string>;
43
43
  } : never;
44
44
  export type MapRoutesToClient<Ru> = [Ru] extends [AnyRoute<Ru>] ? {
@@ -10,9 +10,9 @@ import { v4 as uuid } from 'uuid';
10
10
  import { assertString } from '../../assertions';
11
11
  import { resolveConfigValue } from '../../config';
12
12
  import { ifDefined } from '../../guards';
13
- import { once } from '../../misc/helpers';
13
+ import { memoize } from '../../misc/helpers';
14
14
  /* istanbul ignore next */
15
- const startServer = once((port, uploadDir) => {
15
+ const startServer = memoize((port, uploadDir) => {
16
16
  // TODO - re-evaluate the `preservePath` behavior to match whatever s3 does
17
17
  const upload = multer({ dest: uploadDir, preservePath: true });
18
18
  const fileServerApp = express();