@bedrock/account
Advanced tools
Comparing version 7.0.0 to 8.0.0
# bedrock-account ChangeLog | ||
## 8.0.0 - 2022-04-29 | ||
### Changed | ||
- **BREAKING**: Update peer deps: | ||
- `@bedrock/core@6` | ||
- `@bedrock/mongodb@10` | ||
- `@bedrock/validation@7`. | ||
## 7.0.0 - 2022-04-06 | ||
@@ -4,0 +12,0 @@ |
@@ -7,7 +7,7 @@ /*! | ||
import assert from 'assert-plus'; | ||
import {createAccountSchema} from '../schemas/bedrock-account.js'; | ||
import {klona} from 'klona'; | ||
import jsonpatch from 'fast-json-patch'; | ||
import {schema as accountSchema} from '../schemas/bedrock-account.js'; | ||
import {validateInstance} from '@bedrock/validation'; | ||
const accountSchema = createAccountSchema(); | ||
const {util: {BedrockError}} = bedrock; | ||
@@ -85,3 +85,3 @@ | ||
// emit `insertEvent` with clone of `account` | ||
account = bedrock.util.clone(account); | ||
account = klona(account); | ||
const eventData = { | ||
@@ -133,4 +133,4 @@ account, | ||
// emit `postInsert` event with updated record data | ||
eventData.account = bedrock.util.clone(record.account); | ||
eventData.meta = bedrock.util.clone(record.meta); | ||
eventData.account = klona(record.account); | ||
eventData.meta = klona(record.meta); | ||
await bedrock.events.emit('bedrock-account.postInsert', eventData); | ||
@@ -137,0 +137,0 @@ |
{ | ||
"name": "@bedrock/account", | ||
"version": "7.0.0", | ||
"version": "8.0.0", | ||
"type": "module", | ||
@@ -30,8 +30,9 @@ "description": "User accounts for Bedrock applications", | ||
"assert-plus": "^1.0.0", | ||
"fast-json-patch": "^3.1.0" | ||
"fast-json-patch": "^3.1.1", | ||
"klona": "^2.0.5" | ||
}, | ||
"peerDependencies": { | ||
"@bedrock/core": "^5.0.0", | ||
"@bedrock/mongodb": "^9.0.0", | ||
"@bedrock/validation": "^6.0.0" | ||
"@bedrock/core": "^6.0.0", | ||
"@bedrock/mongodb": "^10.0.0", | ||
"@bedrock/validation": "^7.0.0" | ||
}, | ||
@@ -38,0 +39,0 @@ "directories": { |
/*! | ||
* Copyright (c) 2018-2022 Digital Bazaar, Inc. All rights reserved. | ||
*/ | ||
import * as bedrock from '@bedrock/core'; | ||
const schema = { | ||
export const schema = { | ||
title: 'User Account', | ||
@@ -23,8 +21,1 @@ required: [ | ||
}; | ||
export function createAccountSchema(extend) { | ||
if(extend) { | ||
return bedrock.util.extend(true, bedrock.util.clone(schema), extend); | ||
} | ||
return schema; | ||
} |
/*! | ||
* Copyright (c) 2018-2022 Digital Bazaar, Inc. All rights reserved. | ||
*/ | ||
import * as bedrock from '@bedrock/core'; | ||
import * as brAccount from '@bedrock/account'; | ||
import * as database from '@bedrock/mongodb'; | ||
import {v4 as uuid} from 'uuid'; | ||
const {util: {uuid}} = bedrock; | ||
export function createAccount(email) { | ||
@@ -11,0 +9,0 @@ const newAccount = { |
@@ -14,10 +14,11 @@ { | ||
"dependencies": { | ||
"@bedrock/core": "^5.0.0", | ||
"@bedrock/account": "file:..", | ||
"@bedrock/mongodb": "^9.0.0", | ||
"@bedrock/test": "^7.0.0", | ||
"@bedrock/validation": "^6.0.0", | ||
"@bedrock/core": "^6.0.0", | ||
"@bedrock/mongodb": "^10.0.0", | ||
"@bedrock/test": "^8.0.0", | ||
"@bedrock/validation": "^7.0.0", | ||
"c8": "^7.11.0", | ||
"cross-env": "^7.0.2", | ||
"fast-json-patch": "^2.0.6" | ||
"fast-json-patch": "^2.0.6", | ||
"uuid": "^8.3.2" | ||
}, | ||
@@ -24,0 +25,0 @@ "c8": { |
@@ -5,4 +5,4 @@ /*! | ||
import {config} from '@bedrock/core'; | ||
import {fileURLToPath} from 'url'; | ||
import path from 'path'; | ||
import {fileURLToPath} from 'node:url'; | ||
import path from 'node:path'; | ||
@@ -9,0 +9,0 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url)); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41258
6
725
+ Addedklona@^2.0.5
+ Added@bedrock/core@6.3.0(transitive)
+ Added@bedrock/mongodb@10.2.0(transitive)
+ Added@bedrock/validation@7.1.1(transitive)
+ Addedasync@3.2.6(transitive)
+ Addedcommander@9.5.0(transitive)
+ Addedcross-spawn@7.0.6(transitive)
+ Addedexeca@5.1.1(transitive)
+ Addedget-stream@6.0.1(transitive)
+ Addedhuman-signals@2.1.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedklona@2.0.6(transitive)
+ Addedmerge-stream@2.0.0(transitive)
+ Addedmimic-fn@2.1.0(transitive)
+ Addednpm-run-path@4.0.1(transitive)
+ Addedonetime@5.1.2(transitive)
+ Addedpasswd-user@4.0.0(transitive)
+ Addedpath-key@3.1.1(transitive)
+ Addedserialize-error@11.0.3(transitive)
+ Addedshebang-command@2.0.0(transitive)
+ Addedshebang-regex@3.0.0(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedstrip-final-newline@2.0.0(transitive)
+ Addedtype-fest@2.19.0(transitive)
+ Addedwhich@2.0.2(transitive)
- Removed@bedrock/core@5.1.1(transitive)
- Removed@bedrock/mongodb@9.0.1(transitive)
- Removed@bedrock/validation@6.0.1(transitive)
- Removed@colors/colors@1.5.0(transitive)
- Removedaddressparser@0.3.2(transitive)
- Removedasync@2.6.43.2.3(transitive)
- Removedcolors@1.0.3(transitive)
- Removedcommander@2.20.3(transitive)
- Removeddelay@5.0.0(transitive)
- Removedemailjs@2.2.0(transitive)
- Removedemailjs-base64@1.1.4(transitive)
- Removedemailjs-mime-codec@2.0.9(transitive)
- Removederrio@1.2.2(transitive)
- Removedeyes@0.1.8(transitive)
- Removedisstream@0.1.2(transitive)
- Removedlodash@4.17.21(transitive)
- Removedlodash._reinterpolate@3.0.0(transitive)
- Removedlodash.get@4.4.2(transitive)
- Removedlodash.set@4.3.2(transitive)
- Removedlodash.template@4.5.0(transitive)
- Removedlodash.templatesettings@4.2.0(transitive)
- Removedlodash.topath@4.5.2(transitive)
- Removedmustache@2.3.2(transitive)
- Removedmute-stream@0.0.8(transitive)
- Removedprompt@1.3.0(transitive)
- Removedramda@0.26.1(transitive)
- Removedread@1.0.7(transitive)
- Removedrevalidator@0.1.8(transitive)
- Removedtext-encoding@0.7.0(transitive)
- Removeduid-number@0.0.6(transitive)
- Removeduuid-random@1.3.2(transitive)
- Removedwinston@2.4.7(transitive)
- Removedwinston-mail@2.0.0(transitive)
Updatedfast-json-patch@^3.1.1