Skip to content

Commit

Permalink
chore: refactor notifications and re-enable vault tests
Browse files Browse the repository at this point in the history
  • Loading branch information
karolsojko committed Sep 25, 2023
1 parent 4aa7314 commit ad33732
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 25 deletions.
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
"dependencies": {
"@standardnotes/common": "^1.50.0",
"@standardnotes/domain-core": "^1.32.0",
"@standardnotes/domain-core": "^1.33.1",
"@standardnotes/models": "workspace:*",
"@standardnotes/responses": "workspace:*",
"@standardnotes/utils": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"dependencies": {
"@electron/remote": "^2.0.9",
"@standardnotes/domain-core": "^1.32.0",
"@standardnotes/domain-core": "^1.33.1",
"@standardnotes/electron-clear-data": "1.1.1",
"@standardnotes/web": "workspace:*",
"axios": "^1.1.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/encryption/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"dependencies": {
"@standardnotes/common": "^1.50.0",
"@standardnotes/domain-core": "^1.32.0",
"@standardnotes/domain-core": "^1.33.1",
"@standardnotes/models": "workspace:*",
"@standardnotes/responses": "workspace:*",
"@standardnotes/sncrypto-common": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/features/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"dependencies": {
"@standardnotes/common": "^1.50.0",
"@standardnotes/domain-core": "^1.32.0",
"@standardnotes/domain-core": "^1.33.1",
"reflect-metadata": "^0.1.13"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/models/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"dependencies": {
"@standardnotes/common": "^1.50.0",
"@standardnotes/domain-core": "^1.32.0",
"@standardnotes/domain-core": "^1.33.1",
"@standardnotes/features": "workspace:*",
"@standardnotes/responses": "workspace:*",
"@standardnotes/sncrypto-common": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion packages/services/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"dependencies": {
"@standardnotes/api": "workspace:^",
"@standardnotes/common": "^1.50.0",
"@standardnotes/domain-core": "^1.32.0",
"@standardnotes/domain-core": "^1.33.1",
"@standardnotes/encryption": "workspace:^",
"@standardnotes/features": "workspace:^",
"@standardnotes/files": "workspace:^",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,19 @@ export class SharedVaultService
switch (event.eventPayload.props.type.value) {
case NotificationType.TYPES.SelfRemovedFromSharedVault: {
const vault = this._getVault.execute<SharedVaultListingInterface>({
sharedVaultUuid: event.eventPayload.props.sharedVaultUuid.value,
sharedVaultUuid: event.eventPayload.props.primaryIdentifier.value,
})
if (!vault.isFailed()) {
await this._deleteThirdPartyVault.execute(vault.getValue())
}
break
}
case NotificationType.TYPES.UserRemovedFromSharedVault: {
this.vaultUsers.invalidateVaultUsersCache(event.eventPayload.props.sharedVaultUuid.value).catch(console.error)
this.vaultUsers.invalidateVaultUsersCache(event.eventPayload.props.primaryIdentifier.value).catch(console.error)
break
}
case NotificationType.TYPES.SharedVaultItemRemoved: {
const item = this.items.findItem((event.eventPayload.props.itemUuid as Uuid).value)
const item = this.items.findItem((event.eventPayload.props.secondaryIdentifier as Uuid).value)
if (item) {
void this._discardItemsLocally.execute([item])
}
Expand All @@ -126,7 +126,7 @@ export class SharedVaultService
case NotificationType.TYPES.SharedVaultFileRemoved:
case NotificationType.TYPES.SharedVaultFileUploaded: {
const vaultOrError = this._getVault.execute<SharedVaultListingInterface>({
sharedVaultUuid: event.eventPayload.props.sharedVaultUuid.value,
sharedVaultUuid: event.eventPayload.props.primaryIdentifier.value,
})
if (!vaultOrError.isFailed()) {
await this._syncLocalVaultsWithRemoteSharedVaults.execute([vaultOrError.getValue()])
Expand Down
2 changes: 1 addition & 1 deletion packages/snjs/mocha/TestRegistry/VaultTests.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const VaultTests = {
enabled: false,
enabled: true,
exclusive: false,
files: [
'vaults/vaults.test.js',
Expand Down
2 changes: 1 addition & 1 deletion packages/snjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@babel/preset-env": "*",
"@standardnotes/api": "workspace:*",
"@standardnotes/common": "^1.50.0",
"@standardnotes/domain-core": "^1.32.0",
"@standardnotes/domain-core": "^1.33.1",
"@standardnotes/domain-events": "^2.122.0",
"@standardnotes/encryption": "workspace:*",
"@standardnotes/features": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-services/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"dependencies": {
"@standardnotes/common": "^1.50.0",
"@standardnotes/domain-core": "^1.32.0",
"@standardnotes/domain-core": "^1.33.1",
"@standardnotes/features": "workspace:^",
"@standardnotes/filepicker": "workspace:^",
"@standardnotes/models": "workspace:^",
Expand Down
24 changes: 12 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4138,7 +4138,7 @@ __metadata:
resolution: "@standardnotes/api@workspace:packages/api"
dependencies:
"@standardnotes/common": ^1.50.0
"@standardnotes/domain-core": ^1.32.0
"@standardnotes/domain-core": ^1.33.1
"@standardnotes/models": "workspace:*"
"@standardnotes/responses": "workspace:*"
"@standardnotes/utils": "workspace:*"
Expand Down Expand Up @@ -4288,7 +4288,7 @@ __metadata:
"@babel/core": "*"
"@babel/preset-env": "*"
"@electron/remote": ^2.0.9
"@standardnotes/domain-core": ^1.32.0
"@standardnotes/domain-core": ^1.33.1
"@standardnotes/electron-clear-data": 1.1.1
"@standardnotes/web": "workspace:*"
"@types/fs-extra": ^11.0.1
Expand Down Expand Up @@ -4340,12 +4340,12 @@ __metadata:
languageName: node
linkType: hard

"@standardnotes/domain-core@npm:^1.32.0":
version: 1.32.0
resolution: "@standardnotes/domain-core@npm:1.32.0"
"@standardnotes/domain-core@npm:^1.33.1":
version: 1.33.1
resolution: "@standardnotes/domain-core@npm:1.33.1"
dependencies:
uuid: ^9.0.0
checksum: 7d1263782caae6e7aefb245243f3ddc830efec707e2903d3dcb52bd5404d2c9464d3a24c2d4e04671fd9577b9c02bb8e9270b2571fe853b9469889c4b76c67a4
checksum: 4caba6cd6fa667158aa326e43762bc466b726dfbd89e04cfc6fd6b89dce573b1be231350470fc7f1d027868bfd096096de7733256d35a7be699d693e84d29f2a
languageName: node
linkType: hard

Expand Down Expand Up @@ -4392,7 +4392,7 @@ __metadata:
dependencies:
"@standardnotes/common": ^1.50.0
"@standardnotes/config": 2.4.3
"@standardnotes/domain-core": ^1.32.0
"@standardnotes/domain-core": ^1.33.1
"@standardnotes/models": "workspace:*"
"@standardnotes/responses": "workspace:*"
"@standardnotes/sncrypto-common": "workspace:*"
Expand Down Expand Up @@ -4427,7 +4427,7 @@ __metadata:
resolution: "@standardnotes/features@workspace:packages/features"
dependencies:
"@standardnotes/common": ^1.50.0
"@standardnotes/domain-core": ^1.32.0
"@standardnotes/domain-core": ^1.33.1
"@types/jest": ^29.2.3
"@typescript-eslint/eslint-plugin": "*"
eslint: "*"
Expand Down Expand Up @@ -4633,7 +4633,7 @@ __metadata:
resolution: "@standardnotes/models@workspace:packages/models"
dependencies:
"@standardnotes/common": ^1.50.0
"@standardnotes/domain-core": ^1.32.0
"@standardnotes/domain-core": ^1.33.1
"@standardnotes/features": "workspace:*"
"@standardnotes/responses": "workspace:*"
"@standardnotes/sncrypto-common": "workspace:^"
Expand Down Expand Up @@ -4729,7 +4729,7 @@ __metadata:
dependencies:
"@standardnotes/api": "workspace:^"
"@standardnotes/common": ^1.50.0
"@standardnotes/domain-core": ^1.32.0
"@standardnotes/domain-core": ^1.33.1
"@standardnotes/encryption": "workspace:^"
"@standardnotes/features": "workspace:^"
"@standardnotes/files": "workspace:^"
Expand Down Expand Up @@ -4830,7 +4830,7 @@ __metadata:
"@babel/preset-env": "*"
"@standardnotes/api": "workspace:*"
"@standardnotes/common": ^1.50.0
"@standardnotes/domain-core": ^1.32.0
"@standardnotes/domain-core": ^1.33.1
"@standardnotes/domain-events": ^2.122.0
"@standardnotes/encryption": "workspace:*"
"@standardnotes/features": "workspace:*"
Expand Down Expand Up @@ -4955,7 +4955,7 @@ __metadata:
resolution: "@standardnotes/ui-services@workspace:packages/ui-services"
dependencies:
"@standardnotes/common": ^1.50.0
"@standardnotes/domain-core": ^1.32.0
"@standardnotes/domain-core": ^1.33.1
"@standardnotes/features": "workspace:^"
"@standardnotes/filepicker": "workspace:^"
"@standardnotes/models": "workspace:^"
Expand Down

0 comments on commit ad33732

Please sign in to comment.