@travetto/auth-model 7.0.0-rc.2 → 7.0.0-rc.4

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/auth-model",
3
- "version": "7.0.0-rc.2",
3
+ "version": "7.0.0-rc.4",
4
4
  "description": "Authentication model support for the Travetto framework",
5
5
  "keywords": [
6
6
  "authentication",
@@ -25,11 +25,11 @@
25
25
  "directory": "module/auth-model"
26
26
  },
27
27
  "dependencies": {
28
- "@travetto/auth": "^7.0.0-rc.2",
29
- "@travetto/model": "^7.0.0-rc.2"
28
+ "@travetto/auth": "^7.0.0-rc.4",
29
+ "@travetto/model": "^7.0.0-rc.4"
30
30
  },
31
31
  "peerDependencies": {
32
- "@travetto/test": "^7.0.0-rc.2"
32
+ "@travetto/test": "^7.0.0-rc.4"
33
33
  },
34
34
  "peerDependenciesMeta": {
35
35
  "@travetto/test": {
package/src/model.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Util, Class, TimeUtil, Runtime, castTo } from '@travetto/runtime';
1
+ import { Util, Class, TimeUtil, castTo } from '@travetto/runtime';
2
2
  import { ModelCrudSupport, ModelType, NotFoundError, OptionalId, ModelStorageUtil } from '@travetto/model';
3
3
  import { Principal, Authenticator, Authorizer, AuthenticationError } from '@travetto/auth';
4
4
 
@@ -97,12 +97,6 @@ export class ModelAuthService<T extends ModelType> implements Authenticator<T>,
97
97
  }
98
98
  }
99
99
 
100
- async postConstruct(): Promise<void> {
101
- if (ModelStorageUtil.isSupported(this.#modelService) && Runtime.dynamic) {
102
- await this.#modelService.createModel?.(this.#cls);
103
- }
104
- }
105
-
106
100
  /**
107
101
  * Register a user
108
102
  * @param user The user to register
@@ -11,7 +11,7 @@ import { ModelAuthService, RegisteredPrincipal } from '../../src/model.ts';
11
11
 
12
12
  export const TestModelSvcSymbol = Symbol.for('@travetto/auth:test-model-svc');
13
13
 
14
- @Model({ autoCreate: false })
14
+ @Model({ autoCreate: 'production' })
15
15
  class User implements RegisteredPrincipal {
16
16
  id: string;
17
17
  @Transient()