misc sdk changes (#2934)

* misc sdk changes

* delete the store ☠️

* port comments

* fix build

* fix removing

* fix tests

* beta.20

---------

Co-authored-by: Matt Hill <mattnine@protonmail.com>
This commit is contained in:
Aiden McClelland
2025-05-09 15:10:51 -06:00
committed by GitHub
parent d2c4741f0b
commit 7750e33f82
62 changed files with 1255 additions and 2130 deletions

View File

@@ -15,7 +15,6 @@ import {
RequestActionParams,
MainStatus,
} from "./osBindings"
import { StorePath } from "./util/PathBuilder"
import {
PackageId,
Dependencies,
@@ -93,8 +92,6 @@ export type Effects = {
}): Promise<string>
/** Returns a list of the ids of all installed packages */
getInstalledPackages(): Promise<string[]>
/** grants access to certain paths in the store to dependents */
exposeForDependents(options: { paths: string[] }): Promise<null>
// health
/** sets the result of a health check */
@@ -170,23 +167,6 @@ export type Effects = {
algorithm?: "ecdsa" | "ed25519"
}) => Promise<string>
// store
store: {
/** Get a value in a json like data, can be observed and subscribed */
get<Store = never, ExtractStore = unknown>(options: {
/** If there is no packageId it is assumed the current package */
packageId?: string
/** The path defaults to root level, using the [JsonPath](https://jsonpath.com/) */
path: StorePath
callback?: () => void
}): Promise<ExtractStore>
/** Used to store values that can be accessed and subscribed to */
set<Store = never, ExtractStore = unknown>(options: {
/** Sets the value for the wrapper at the path, it will override, using the [JsonPath](https://jsonpath.com/) */
path: StorePath
value: ExtractStore
}): Promise<null>
}
/** sets the version that this service's data has been migrated to */
setDataVersion(options: { version: string }): Promise<null>
/** returns the version that this service's data has been migrated to */