@alwith/module-store 0.1.0 → 0.1.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.
- package/LICENSE +2 -2
- package/README.md +1 -1
- package/dist/index.d.ts +19 -19
- package/package.json +1 -1
package/LICENSE
CHANGED
|
@@ -11,8 +11,8 @@ reduces rights granted by those licenses or by mandatory applicable law.
|
|
|
11
11
|
2. Permission to develop and distribute applications
|
|
12
12
|
Subject to this license, ALwith grants you a worldwide, non-exclusive, royalty-free
|
|
13
13
|
copyright license to use, reproduce, integrate and modify the supplied Software
|
|
14
|
-
to develop, test, host and operate your own applications,
|
|
15
|
-
|
|
14
|
+
to develop, test, host and operate your own applications, for personal,
|
|
15
|
+
internal business or commercial use. You may brand,
|
|
16
16
|
sell and distribute those applications, including the Software embedded in them,
|
|
17
17
|
to your customers and end users. No per-application registration, approval or
|
|
18
18
|
royalty is required by this software license.
|
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ No user data or preferences are migrated by this extraction.
|
|
|
13
13
|
|
|
14
14
|
See [LICENSE](LICENSE) and [third-party notices](THIRD_PARTY_NOTICES.md).
|
|
15
15
|
ALwith-owned code is proprietary, not open source. You may build, customize, host,
|
|
16
|
-
charge for and distribute your own
|
|
16
|
+
charge for and distribute your own applications under the included
|
|
17
17
|
license, without per-application registration. This does not grant hosted-service
|
|
18
18
|
access or rights to separately distributed Rust libraries or Runtime binaries.
|
|
19
19
|
The npm artifact includes compiled/minified JS, declarations and necessary assets,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
export interface AlwithStore {
|
|
2
|
-
get<T>(key: string)
|
|
3
|
-
set(key: string, value: unknown)
|
|
4
|
-
has(key: string)
|
|
5
|
-
delete(key: string)
|
|
6
|
-
keys()
|
|
7
|
-
values<T>()
|
|
8
|
-
entries<T>()
|
|
9
|
-
clear()
|
|
10
|
-
reload()
|
|
11
|
-
length()
|
|
12
|
-
onKeyChange<T>(key: string, listener: (value: T | undefined) => void)
|
|
13
|
-
onChange<T>(listener: (key: string, value: T | undefined) => void)
|
|
2
|
+
get: <T>(key: string) => Promise<T | undefined>;
|
|
3
|
+
set: (key: string, value: unknown) => Promise<void>;
|
|
4
|
+
has: (key: string) => Promise<boolean>;
|
|
5
|
+
delete: (key: string) => Promise<void>;
|
|
6
|
+
keys: () => Promise<string[]>;
|
|
7
|
+
values: <T>() => Promise<T[]>;
|
|
8
|
+
entries: <T>() => Promise<[key: string, value: T][]>;
|
|
9
|
+
clear: () => Promise<void>;
|
|
10
|
+
reload: () => Promise<void>;
|
|
11
|
+
length: () => Promise<number>;
|
|
12
|
+
onKeyChange: <T>(key: string, listener: (value: T | undefined) => void) => Promise<() => void>;
|
|
13
|
+
onChange: <T>(listener: (key: string, value: T | undefined) => void) => Promise<() => void>;
|
|
14
14
|
}
|
|
15
15
|
export type StoreScope = "data" | "cache";
|
|
16
16
|
export interface StorePort {
|
|
17
|
-
storeEntries(scope: StoreScope, store: string)
|
|
18
|
-
storeSet(scope: StoreScope, store: string, key: string, value: unknown)
|
|
19
|
-
storeDelete(scope: StoreScope, store: string, key: string)
|
|
20
|
-
storeClear(scope: StoreScope, store: string)
|
|
21
|
-
storeReload(scope: StoreScope, store: string)
|
|
22
|
-
onStoreChanged(handler: (change: {
|
|
17
|
+
storeEntries: (scope: StoreScope, store: string) => Promise<Record<string, unknown>>;
|
|
18
|
+
storeSet: (scope: StoreScope, store: string, key: string, value: unknown) => Promise<void>;
|
|
19
|
+
storeDelete: (scope: StoreScope, store: string, key: string) => Promise<void>;
|
|
20
|
+
storeClear: (scope: StoreScope, store: string) => Promise<void>;
|
|
21
|
+
storeReload: (scope: StoreScope, store: string) => Promise<void>;
|
|
22
|
+
onStoreChanged: (handler: (change: {
|
|
23
23
|
store: string;
|
|
24
24
|
key: string;
|
|
25
25
|
value: unknown;
|
|
26
|
-
}) => void)
|
|
26
|
+
}) => void) => Promise<() => void>;
|
|
27
27
|
}
|
|
28
28
|
export declare function createStoreClient(createHostPort: () => StorePort): {
|
|
29
29
|
openStore: (name: string, scope?: StoreScope) => AlwithStore;
|