feat: add snjs package
This commit is contained in:
21
packages/snjs/lib/Migrations/Versions/2_0_15.ts
Normal file
21
packages/snjs/lib/Migrations/Versions/2_0_15.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { ApplicationStage } from '@standardnotes/services'
|
||||
import { Migration } from '@Lib/Migrations/Migration'
|
||||
|
||||
export class Migration2_0_15 extends Migration {
|
||||
static override version(): string {
|
||||
return '2.0.15'
|
||||
}
|
||||
|
||||
protected registerStageHandlers(): void {
|
||||
this.registerStageHandler(ApplicationStage.LoadedDatabase_12, async () => {
|
||||
await this.createNewDefaultItemsKeyIfNecessary()
|
||||
this.markDone()
|
||||
})
|
||||
}
|
||||
|
||||
private async createNewDefaultItemsKeyIfNecessary() {
|
||||
if (this.services.protocolService.needsNewRootKeyBasedItemsKey()) {
|
||||
await this.services.protocolService.createNewDefaultItemsKey()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user