@steve31415/baselib 2.2.0 → 2.2.1

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.
@@ -1,5 +1,4 @@
1
1
  import type { Logger } from '../log-browser.js';
2
- import type { ReloadSafety } from './reload-safety.js';
3
2
  export type BuildUpdateState = {
4
3
  kind: 'current';
5
4
  } | {
@@ -9,9 +8,13 @@ export type BuildUpdateState = {
9
8
  kind: 'reloading';
10
9
  buildId: string;
11
10
  };
11
+ export interface ReloadSafetyState {
12
+ readonly isSafe: () => boolean;
13
+ readonly subscribe: (listener: () => void) => () => void;
14
+ }
12
15
  export interface BuildUpdateDeps {
13
16
  currentBuildId: string;
14
- safety: ReloadSafety;
17
+ safety: ReloadSafetyState;
15
18
  logger: Pick<Logger, 'info' | 'warn'>;
16
19
  fetchFn?: (input: string, init?: RequestInit) => Promise<Response>;
17
20
  reload?: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steve31415/baselib",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "Plasticine new-world shared platform library: logging, auth, service-to-service auth, db, HTTP, sync, app updates",
5
5
  "type": "module",
6
6
  "license": "MIT",