@sprucelabs/spruce-test-fixtures 65.0.25 → 66.0.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.
@@ -123,10 +123,12 @@ fake.login = (phone = '555-000-0000') => {
123
123
  }
124
124
  ViewFixture.resetAuth();
125
125
  try {
126
- const auth = Class.views.getAuthenticator();
127
- auth.setSessionToken(
128
- //@ts-ignore
129
- Class.fakedClient.auth.token, Class.fakedPerson);
126
+ if (Class.fakedPerson) {
127
+ const auth = Class.permissions.getAuthenticator();
128
+ auth.setSessionToken(
129
+ //@ts-ignore
130
+ Class.fakedClient.auth.token, Class.fakedPerson);
131
+ }
130
132
  }
131
133
  catch (_a) {
132
134
  //hits if not in skill because cant find nameplace
@@ -1,5 +1,54 @@
1
1
  import { AuthenticatorImpl, Storage } from '@sprucelabs/heartwood-view-controllers';
2
2
  export default class SpyAuthenticator extends AuthenticatorImpl {
3
3
  constructor(storage: Storage);
4
- getEventEmitter(): any;
4
+ getEventEmitter(): import("@sprucelabs/mercury-types").MercuryEventEmitter<{
5
+ eventSignatures: {
6
+ "did-login": {
7
+ emitPayloadSchema: {
8
+ id: string;
9
+ fields: {
10
+ token: {
11
+ type: "text";
12
+ isRequired: true;
13
+ };
14
+ person: {
15
+ type: "schema";
16
+ isRequired: true;
17
+ options: {
18
+ schema: import("@sprucelabs/heartwood-view-controllers").SpruceSchemas.Spruce.v2020_07_22.PersonSchema;
19
+ };
20
+ };
21
+ };
22
+ };
23
+ };
24
+ "will-logout": {
25
+ emitPayloadSchema: {
26
+ id: string;
27
+ fields: {
28
+ person: {
29
+ type: "schema";
30
+ isRequired: true;
31
+ options: {
32
+ schema: import("@sprucelabs/heartwood-view-controllers").SpruceSchemas.Spruce.v2020_07_22.PersonSchema;
33
+ };
34
+ };
35
+ };
36
+ };
37
+ };
38
+ "did-logout": {
39
+ emitPayloadSchema: {
40
+ id: string;
41
+ fields: {
42
+ person: {
43
+ type: "schema";
44
+ isRequired: true;
45
+ options: {
46
+ schema: import("@sprucelabs/heartwood-view-controllers").SpruceSchemas.Spruce.v2020_07_22.PersonSchema;
47
+ };
48
+ };
49
+ };
50
+ };
51
+ };
52
+ };
53
+ }>;
5
54
  }
@@ -4,6 +4,6 @@ export default class SpyAuthenticator extends AuthenticatorImpl {
4
4
  super(storage);
5
5
  }
6
6
  getEventEmitter() {
7
- return this.eventEmitter;
7
+ return this.emitter;
8
8
  }
9
9
  }
@@ -109,10 +109,12 @@ fake.login = (phone = '555-000-0000') => {
109
109
  }
110
110
  ViewFixture_1.default.resetAuth();
111
111
  try {
112
- const auth = Class.views.getAuthenticator();
113
- auth.setSessionToken(
114
- //@ts-ignore
115
- Class.fakedClient.auth.token, Class.fakedPerson);
112
+ if (Class.fakedPerson) {
113
+ const auth = Class.permissions.getAuthenticator();
114
+ auth.setSessionToken(
115
+ //@ts-ignore
116
+ Class.fakedClient.auth.token, Class.fakedPerson);
117
+ }
116
118
  }
117
119
  catch {
118
120
  //hits if not in skill because cant find nameplace
@@ -1,5 +1,54 @@
1
1
  import { AuthenticatorImpl, Storage } from '@sprucelabs/heartwood-view-controllers';
2
2
  export default class SpyAuthenticator extends AuthenticatorImpl {
3
3
  constructor(storage: Storage);
4
- getEventEmitter(): any;
4
+ getEventEmitter(): import("@sprucelabs/mercury-types").MercuryEventEmitter<{
5
+ eventSignatures: {
6
+ "did-login": {
7
+ emitPayloadSchema: {
8
+ id: string;
9
+ fields: {
10
+ token: {
11
+ type: "text";
12
+ isRequired: true;
13
+ };
14
+ person: {
15
+ type: "schema";
16
+ isRequired: true;
17
+ options: {
18
+ schema: import("@sprucelabs/heartwood-view-controllers").SpruceSchemas.Spruce.v2020_07_22.PersonSchema;
19
+ };
20
+ };
21
+ };
22
+ };
23
+ };
24
+ "will-logout": {
25
+ emitPayloadSchema: {
26
+ id: string;
27
+ fields: {
28
+ person: {
29
+ type: "schema";
30
+ isRequired: true;
31
+ options: {
32
+ schema: import("@sprucelabs/heartwood-view-controllers").SpruceSchemas.Spruce.v2020_07_22.PersonSchema;
33
+ };
34
+ };
35
+ };
36
+ };
37
+ };
38
+ "did-logout": {
39
+ emitPayloadSchema: {
40
+ id: string;
41
+ fields: {
42
+ person: {
43
+ type: "schema";
44
+ isRequired: true;
45
+ options: {
46
+ schema: import("@sprucelabs/heartwood-view-controllers").SpruceSchemas.Spruce.v2020_07_22.PersonSchema;
47
+ };
48
+ };
49
+ };
50
+ };
51
+ };
52
+ };
53
+ }>;
5
54
  }
@@ -6,7 +6,7 @@ class SpyAuthenticator extends heartwood_view_controllers_1.AuthenticatorImpl {
6
6
  super(storage);
7
7
  }
8
8
  getEventEmitter() {
9
- return this.eventEmitter;
9
+ return this.emitter;
10
10
  }
11
11
  }
12
12
  exports.default = SpyAuthenticator;
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "@sprucelabs/spruce-test-fixtures"
14
14
  ]
15
15
  },
16
- "version": "65.0.25",
16
+ "version": "66.0.0",
17
17
  "files": [
18
18
  "build/**/*",
19
19
  "!build/__tests__",
@@ -63,15 +63,15 @@
63
63
  "dependencies": {
64
64
  "@sprucelabs/data-stores": "^28.5.39",
65
65
  "@sprucelabs/error": "^6.0.570",
66
- "@sprucelabs/heartwood-view-controllers": "^116.0.40",
66
+ "@sprucelabs/heartwood-view-controllers": "^117.0.0",
67
67
  "@sprucelabs/mercury-client": "^42.0.707",
68
68
  "@sprucelabs/mercury-core-events": "^25.1.15",
69
69
  "@sprucelabs/mercury-event-emitter": "^42.0.707",
70
70
  "@sprucelabs/schema": "^31.0.28",
71
71
  "@sprucelabs/spruce-core-schemas": "^40.1.616",
72
72
  "@sprucelabs/spruce-event-utils": "^40.2.13",
73
- "@sprucelabs/spruce-permission-utils": "^11.0.39",
74
- "@sprucelabs/spruce-skill-booter": "^65.0.25",
73
+ "@sprucelabs/spruce-permission-utils": "^12.0.0",
74
+ "@sprucelabs/spruce-skill-booter": "^66.0.0",
75
75
  "@sprucelabs/spruce-skill-utils": "^31.2.29",
76
76
  "@sprucelabs/test-utils": "^5.2.2",
77
77
  "dotenv": "^16.4.7",
@@ -114,5 +114,5 @@
114
114
  "^#spruce/(.*)$": "<rootDir>/build/.spruce/$1"
115
115
  }
116
116
  },
117
- "gitHead": "298ff40e54b21caa04ca174f5aba8d03640f9e07"
117
+ "gitHead": "2b30f777860656d31a876eb1e417f206f906f5c7"
118
118
  }