Ingen beskrivning
- TypeScript 69.9%
- JavaScript 30.1%
| Filnamn | Senaste incheckningsmeddelande | Senaste incheckningsdatum |
|---|---|---|
This PR contains the following updates: | Update | Change | |---|---| | lockFileMaintenance | All locks refreshed | 🔧 This Pull Request updates lock files to use the latest dependency versions. --- ### Configuration 📅 **Schedule**: (in timezone Europe/Stockholm) - Branch creation - "before 6am on monday" - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yODguMCIsInVwZGF0ZWRJblZlciI6IjQzLjI4OC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJ0eXBlL2Nob3JlIl19--> Reviewed-on: #18 |
||
| .changeset | ||
| .forgejo/workflows | ||
| .vscode | ||
| src | ||
| .gitignore | ||
| .prettierignore | ||
| .prettierrc | ||
| CHANGELOG.md | ||
| commitlint.config.mjs | ||
| cspell.json | ||
| eslint.config.js | ||
| lefthook.yml | ||
| LICENSE | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| README.md | ||
| RELEASING.md | ||
| renovate.json | ||
| tsconfig.json | ||
Legend State Azure Functions Persist Plugin
A plugin for persisting Legend State between invocations of Azure Functions.
Installation
@legendapp/state is a peer dependency, so install it alongside the plugin. You almost
certainly have it already, since you need it to create the observable you are persisting.
npm i @supernaut/legend-state-persist-azure-functions-plugin @legendapp/state
pnpm add @supernaut/legend-state-persist-azure-functions-plugin @legendapp/state
@azure/functions is an optional peer. It is only used for the InvocationContext type
you may pass in for error logging, so it is erased at build time and you do not need it
installed unless you already have it, which you will inside an Azure Functions app.
Usage
import { observable, syncState, when } from '@legendapp/state';
import { syncObservable } from '@legendapp/state/sync';
import { observablePersistAzureStorage } from '@supernaut/legend-state-persist-azure-functions-plugin';
// Create your state
const store$ = observable({
key: 'value',
});
// Set up persistence with the plugin
syncObservable(state$, {
persist: {
name: 'store',
plugin: observablePersistAzureStorage({
connectionString: myConnectionString,
partitionKey: 'store',
tableName: 'persistedstatetable',
}),
},
});
// ...
// Wait for the persisted state to load
const status$ = syncState(state$);
await when(status$.isPersistLoaded);
Releasing
Releases are driven by Changesets and published from GitHub Actions with npm OIDC. Add a
changeset with pnpm exec changeset in your pull request, then merge the generated
"chore: release" pull request to publish. See RELEASING.md.