@junobuild/core 0.0.7 → 0.0.8
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.
- package/dist/browser/canisterStatus-CMO3J52U.js +2 -0
- package/dist/browser/chunk-A53P2AD6.js +35 -0
- package/dist/browser/chunk-A53P2AD6.js.map +7 -0
- package/dist/browser/index.js +33 -0
- package/dist/browser/index.js.map +7 -0
- package/dist/node/index.mjs +73 -0
- package/dist/node/index.mjs.map +7 -0
- package/dist/types/constants/auth.constants.d.ts +1 -0
- package/dist/types/index.d.ts +6 -3
- package/dist/types/services/auth-timout.services.d.ts +3 -0
- package/dist/types/stores/auth.store.d.ts +2 -1
- package/dist/types/types/env.types.d.ts +6 -0
- package/dist/types/types/post-message.d.ts +5 -0
- package/dist/types/types/subscription.types.d.ts +1 -0
- package/dist/types/utils/auth.utils.d.ts +2 -0
- package/dist/types/utils/events.utils.d.ts +4 -0
- package/dist/types/workers/auth.worker.d.ts +6 -0
- package/dist/workers/auth.worker.js +32 -0
- package/dist/workers/auth.worker.js.map +7 -0
- package/package.json +8 -7
- package/dist/cjs/index.cjs.js +0 -71
- package/dist/cjs/index.cjs.js.map +0 -7
- package/dist/esm/canisterStatus-UMNLFNN3.js +0 -2
- package/dist/esm/chunk-QVUY65GN.js +0 -63
- package/dist/esm/chunk-QVUY65GN.js.map +0 -7
- package/dist/esm/index.js +0 -3
- package/dist/esm/index.js.map +0 -7
- /package/dist/{esm/canisterStatus-UMNLFNN3.js.map → browser/canisterStatus-CMO3J52U.js.map} +0 -0
package/dist/types/index.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import type { User } from './types/auth.types';
|
|
1
2
|
import type { Environment } from './types/env.types';
|
|
3
|
+
import type { Unsubscribe } from './types/subscription.types';
|
|
2
4
|
export { signIn, signOut } from './services/auth.services';
|
|
3
5
|
export * from './services/doc.services';
|
|
4
6
|
export * from './services/storage.services';
|
|
5
7
|
export * from './types/auth.types';
|
|
6
8
|
export * from './types/doc.types';
|
|
9
|
+
export * from './types/env.types';
|
|
7
10
|
export { ListOrder, ListPaginate, ListParams, ListResults } from './types/list.types';
|
|
8
11
|
export * from './types/satellite.types';
|
|
9
12
|
export * from './types/storage.types';
|
|
10
|
-
|
|
11
|
-
export declare const initJuno: (env: Environment) => Promise<
|
|
12
|
-
export declare const authSubscribe: (callback: (authUser: User | null) => void) =>
|
|
13
|
+
export * from './types/subscription.types';
|
|
14
|
+
export declare const initJuno: (env: Environment) => Promise<Unsubscribe[]>;
|
|
15
|
+
export declare const authSubscribe: (callback: (authUser: User | null) => void) => Unsubscribe;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { User } from '../types/auth.types';
|
|
2
|
+
import type { Unsubscribe } from '../types/subscription.types';
|
|
2
3
|
import { Store } from './store';
|
|
3
4
|
export declare class AuthStore extends Store<User | null> {
|
|
4
5
|
private static instance;
|
|
@@ -7,7 +8,7 @@ export declare class AuthStore extends Store<User | null> {
|
|
|
7
8
|
static getInstance(): AuthStore;
|
|
8
9
|
set(authUser: User | null): void;
|
|
9
10
|
get(): User | null;
|
|
10
|
-
subscribe(callback: (data: User | null) => void):
|
|
11
|
+
subscribe(callback: (data: User | null) => void): Unsubscribe;
|
|
11
12
|
isLoggedIn(): boolean;
|
|
12
13
|
reset(): void;
|
|
13
14
|
}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { Satellite } from './satellite.types';
|
|
2
|
+
export type EnvironmentWorkerPath = string;
|
|
3
|
+
export type EnvironmentWorker = true | EnvironmentWorkerPath;
|
|
4
|
+
export interface EnvironmentWorkers {
|
|
5
|
+
auth?: EnvironmentWorker;
|
|
6
|
+
}
|
|
2
7
|
export type Environment = {
|
|
3
8
|
localIdentityCanisterId?: string;
|
|
9
|
+
workers?: EnvironmentWorkers;
|
|
4
10
|
} & Required<Pick<Satellite, 'satelliteId'>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type Unsubscribe = () => void;
|