@ossy/users 3.4.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ossy/users",
3
3
  "description": "User domain - aggregate, events, and validators for the Ossy user model",
4
- "version": "3.4.0",
4
+ "version": "3.5.0",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "main": "./src/index.js",
@@ -36,7 +36,7 @@
36
36
  "dependencies": {
37
37
  "@ossy/config": "^3.0.9",
38
38
  "@ossy/observability": "^3.0.9",
39
- "@ossy/schema": "^3.4.0",
39
+ "@ossy/schema": "^3.5.0",
40
40
  "nanoid": "^5.1.11"
41
41
  },
42
42
  "devDependencies": {
@@ -48,5 +48,5 @@
48
48
  "/src",
49
49
  "README.md"
50
50
  ],
51
- "gitHead": "d36b69444268d172bc3e8e1dc77e67afc63f8650"
51
+ "gitHead": "23167600f991596f122765a53f2b9df08314e115"
52
52
  }
@@ -6,6 +6,7 @@ import { EmailRenderer } from '@ossy/email'
6
6
  import { ConfigService } from '@ossy/config'
7
7
  import { createTranslatorForBuild } from '@ossy/platform/locale'
8
8
  import { createLogger } from '@ossy/observability'
9
+ import { isEmailLike } from '@ossy/schema'
9
10
  import { createEmailChangeToken, EMAIL_CHANGE_TOKEN_TYPE } from './email-change-token.js'
10
11
  import VerifyEmailChangeEmail, {
11
12
  id as verifyEmailChangeEmailId,
@@ -15,8 +16,6 @@ export const metadata = { id: '@ossy/users/tasks/request-email-change' }
15
16
 
16
17
  const log = createLogger('@ossy/users/tasks/request-email-change')
17
18
 
18
- const isEmailLike = (maybeEmail) => /.@.+\.../.test(maybeEmail)
19
-
20
19
  /**
21
20
  * Request an email change for the authenticated user.
22
21
  * If the new email is already used by another account, returns `{ ok: true }`