@sprucelabs/spruce-test-fixtures 62.4.70 → 62.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -24,6 +24,7 @@ export { default as FakeThemeManager } from './tests/FakeThemeManager';
24
24
  export { default as SpyScope } from './tests/fixtures/SpyScope';
25
25
  export { default as FakeAuthorizer } from './tests/FakeAuthorizer';
26
26
  export { default as SpyViewControllerFactory } from './tests/SpyViewControllerFactory';
27
+ export { default as SpyAuthenticator } from './tests/fixtures/SpyAuthenticator';
27
28
  /**
28
29
  * @deprecated phoneNumberIncrementer -> phoneNumberIncrementor
29
30
  */
@@ -24,6 +24,7 @@ export { default as FakeThemeManager } from './tests/FakeThemeManager.js';
24
24
  export { default as SpyScope } from './tests/fixtures/SpyScope.js';
25
25
  export { default as FakeAuthorizer } from './tests/FakeAuthorizer.js';
26
26
  export { default as SpyViewControllerFactory } from './tests/SpyViewControllerFactory.js';
27
+ export { default as SpyAuthenticator } from './tests/fixtures/SpyAuthenticator.js';
27
28
  /**
28
29
  * @deprecated phoneNumberIncrementer -> phoneNumberIncrementor
29
30
  */
@@ -1,9 +1,10 @@
1
1
  import FakeAuthorizer from '../FakeAuthorizer';
2
2
  import MercuryFixture from './MercuryFixture';
3
+ import SpyAuthenticator from './SpyAuthenticator';
3
4
  export default class PermissionFixture {
4
5
  private connectToApi;
5
6
  constructor(mercury: MercuryFixture);
6
7
  static beforeEach(): void;
7
8
  getAuthorizer(): FakeAuthorizer;
8
- getAuthenticator(): import("@sprucelabs/heartwood-view-controllers").Authenticator;
9
+ getAuthenticator(): SpyAuthenticator;
9
10
  }
@@ -0,0 +1,5 @@
1
+ import { AuthenticatorImpl, Storage } from '@sprucelabs/heartwood-view-controllers';
2
+ export default class SpyAuthenticator extends AuthenticatorImpl {
3
+ constructor(storage: Storage);
4
+ getEventEmitter(): any;
5
+ }
@@ -0,0 +1,9 @@
1
+ import { AuthenticatorImpl, } from '@sprucelabs/heartwood-view-controllers';
2
+ export default class SpyAuthenticator extends AuthenticatorImpl {
3
+ constructor(storage) {
4
+ super(storage);
5
+ }
6
+ getEventEmitter() {
7
+ return this.eventEmitter;
8
+ }
9
+ }
@@ -11,6 +11,7 @@ import SpyViewControllerFactory from '../SpyViewControllerFactory';
11
11
  import FixtureFactory from './FixtureFactory';
12
12
  import PermissionFixture from './PermissionFixture';
13
13
  import PersonFixture from './PersonFixture';
14
+ import SpyAuthenticator from './SpyAuthenticator';
14
15
  import SpyScope from './SpyScope';
15
16
  type Factory = TestConnectFactory;
16
17
  type Client = MercuryClient;
@@ -72,7 +73,7 @@ export default class ViewFixture {
72
73
  /**
73
74
  * @deprecated this.views.getAuthorizer() -> this.permissions.getAuthorizer()
74
75
  */
75
- getAuthenticator(): import("@sprucelabs/heartwood-view-controllers").Authenticator;
76
+ getAuthenticator(): SpyAuthenticator;
76
77
  /**
77
78
  * @deprecated this.views.getAuthorizer() -> this.permissions.getAuthorizer()
78
79
  */
@@ -19,6 +19,7 @@ import FakeSkillViewController from '../Fake.svc.js';
19
19
  import TestRouter from '../routers/TestRouter.js';
20
20
  import SpyViewControllerFactory from '../SpyViewControllerFactory.js';
21
21
  import { doesScopeIncludeLocation, doesScopeIncludeOrganization, } from './scopeUtils.js';
22
+ import SpyAuthenticator from './SpyAuthenticator.js';
22
23
  import SpyScope from './SpyScope.js';
23
24
  class ViewFixture {
24
25
  static lockProxyCacheForPerson(id) {
@@ -202,6 +203,7 @@ class ViewFixture {
202
203
  }
203
204
  static resetAuth() {
204
205
  AuthenticatorImpl.reset();
206
+ AuthenticatorImpl.Class = SpyAuthenticator;
205
207
  AuthenticatorImpl.setStorage(new StubStorage());
206
208
  ClientProxyDecorator.getInstance().clearProxyTokenGenerator();
207
209
  }
package/build/index.d.ts CHANGED
@@ -24,6 +24,7 @@ export { default as FakeThemeManager } from './tests/FakeThemeManager';
24
24
  export { default as SpyScope } from './tests/fixtures/SpyScope';
25
25
  export { default as FakeAuthorizer } from './tests/FakeAuthorizer';
26
26
  export { default as SpyViewControllerFactory } from './tests/SpyViewControllerFactory';
27
+ export { default as SpyAuthenticator } from './tests/fixtures/SpyAuthenticator';
27
28
  /**
28
29
  * @deprecated phoneNumberIncrementer -> phoneNumberIncrementor
29
30
  */
package/build/index.js CHANGED
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
17
17
  return (mod && mod.__esModule) ? mod : { "default": mod };
18
18
  };
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.phoneNumberIncrementor = exports.phoneNumberIncrementer = exports.SpyViewControllerFactory = exports.FakeAuthorizer = exports.SpyScope = exports.FakeThemeManager = exports.ClientProxyDecorator = exports.eventFaker = exports.fake = exports.install = exports.login = exports.seed = exports.TestRouter = exports.vcDiskUtil = exports.FakeSkillViewController = exports.MercuryFixture = exports.ViewControllerFixture = exports.RoleFixture = exports.ViewFixture = exports.LocationFixture = exports.SkillFixture = exports.PersonFixture = exports.StoreFixture = exports.OrganizationFixture = exports.AbstractSpruceFixtureTest = void 0;
20
+ exports.phoneNumberIncrementor = exports.phoneNumberIncrementer = exports.SpyAuthenticator = exports.SpyViewControllerFactory = exports.FakeAuthorizer = exports.SpyScope = exports.FakeThemeManager = exports.ClientProxyDecorator = exports.eventFaker = exports.fake = exports.install = exports.login = exports.seed = exports.TestRouter = exports.vcDiskUtil = exports.FakeSkillViewController = exports.MercuryFixture = exports.ViewControllerFixture = exports.RoleFixture = exports.ViewFixture = exports.LocationFixture = exports.SkillFixture = exports.PersonFixture = exports.StoreFixture = exports.OrganizationFixture = exports.AbstractSpruceFixtureTest = void 0;
21
21
  var AbstractSpruceFixtureTest_1 = require("./tests/AbstractSpruceFixtureTest");
22
22
  Object.defineProperty(exports, "AbstractSpruceFixtureTest", { enumerable: true, get: function () { return __importDefault(AbstractSpruceFixtureTest_1).default; } });
23
23
  __exportStar(require("./types/fixture.types"), exports);
@@ -67,6 +67,8 @@ var FakeAuthorizer_1 = require("./tests/FakeAuthorizer");
67
67
  Object.defineProperty(exports, "FakeAuthorizer", { enumerable: true, get: function () { return __importDefault(FakeAuthorizer_1).default; } });
68
68
  var SpyViewControllerFactory_1 = require("./tests/SpyViewControllerFactory");
69
69
  Object.defineProperty(exports, "SpyViewControllerFactory", { enumerable: true, get: function () { return __importDefault(SpyViewControllerFactory_1).default; } });
70
+ var SpyAuthenticator_1 = require("./tests/fixtures/SpyAuthenticator");
71
+ Object.defineProperty(exports, "SpyAuthenticator", { enumerable: true, get: function () { return __importDefault(SpyAuthenticator_1).default; } });
70
72
  /**
71
73
  * @deprecated phoneNumberIncrementer -> phoneNumberIncrementor
72
74
  */
@@ -1,9 +1,10 @@
1
1
  import FakeAuthorizer from '../FakeAuthorizer';
2
2
  import MercuryFixture from './MercuryFixture';
3
+ import SpyAuthenticator from './SpyAuthenticator';
3
4
  export default class PermissionFixture {
4
5
  private connectToApi;
5
6
  constructor(mercury: MercuryFixture);
6
7
  static beforeEach(): void;
7
8
  getAuthorizer(): FakeAuthorizer;
8
- getAuthenticator(): import("@sprucelabs/heartwood-view-controllers").Authenticator;
9
+ getAuthenticator(): SpyAuthenticator;
9
10
  }
@@ -0,0 +1,5 @@
1
+ import { AuthenticatorImpl, Storage } from '@sprucelabs/heartwood-view-controllers';
2
+ export default class SpyAuthenticator extends AuthenticatorImpl {
3
+ constructor(storage: Storage);
4
+ getEventEmitter(): any;
5
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const heartwood_view_controllers_1 = require("@sprucelabs/heartwood-view-controllers");
4
+ class SpyAuthenticator extends heartwood_view_controllers_1.AuthenticatorImpl {
5
+ constructor(storage) {
6
+ super(storage);
7
+ }
8
+ getEventEmitter() {
9
+ return this.eventEmitter;
10
+ }
11
+ }
12
+ exports.default = SpyAuthenticator;
@@ -11,6 +11,7 @@ import SpyViewControllerFactory from '../SpyViewControllerFactory';
11
11
  import FixtureFactory from './FixtureFactory';
12
12
  import PermissionFixture from './PermissionFixture';
13
13
  import PersonFixture from './PersonFixture';
14
+ import SpyAuthenticator from './SpyAuthenticator';
14
15
  import SpyScope from './SpyScope';
15
16
  type Factory = TestConnectFactory;
16
17
  type Client = MercuryClient;
@@ -72,7 +73,7 @@ export default class ViewFixture {
72
73
  /**
73
74
  * @deprecated this.views.getAuthorizer() -> this.permissions.getAuthorizer()
74
75
  */
75
- getAuthenticator(): import("@sprucelabs/heartwood-view-controllers").Authenticator;
76
+ getAuthenticator(): SpyAuthenticator;
76
77
  /**
77
78
  * @deprecated this.views.getAuthorizer() -> this.permissions.getAuthorizer()
78
79
  */
@@ -15,6 +15,7 @@ const Fake_svc_1 = __importDefault(require("../Fake.svc"));
15
15
  const TestRouter_1 = __importDefault(require("../routers/TestRouter"));
16
16
  const SpyViewControllerFactory_1 = __importDefault(require("../SpyViewControllerFactory"));
17
17
  const scopeUtils_1 = require("./scopeUtils");
18
+ const SpyAuthenticator_1 = __importDefault(require("./SpyAuthenticator"));
18
19
  const SpyScope_1 = __importDefault(require("./SpyScope"));
19
20
  class ViewFixture {
20
21
  static lockProxyCacheForPerson(id) {
@@ -198,6 +199,7 @@ class ViewFixture {
198
199
  }
199
200
  static resetAuth() {
200
201
  heartwood_view_controllers_1.AuthenticatorImpl.reset();
202
+ heartwood_view_controllers_1.AuthenticatorImpl.Class = SpyAuthenticator_1.default;
201
203
  heartwood_view_controllers_1.AuthenticatorImpl.setStorage(new heartwood_view_controllers_1.StubStorage());
202
204
  __1.ClientProxyDecorator.getInstance().clearProxyTokenGenerator();
203
205
  }
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "@sprucelabs/spruce-test-fixtures"
14
14
  ]
15
15
  },
16
- "version": "62.4.70",
16
+ "version": "62.5.1",
17
17
  "files": [
18
18
  "build/**/*",
19
19
  "!build/__tests__",
@@ -61,26 +61,26 @@
61
61
  "lint.tsc": "tsc -p . --noEmit"
62
62
  },
63
63
  "dependencies": {
64
- "@sprucelabs/data-stores": "^28.3.249",
64
+ "@sprucelabs/data-stores": "^28.3.250",
65
65
  "@sprucelabs/error": "^6.0.553",
66
- "@sprucelabs/heartwood-view-controllers": "^112.2.2",
67
- "@sprucelabs/mercury-client": "^42.0.634",
68
- "@sprucelabs/mercury-core-events": "^25.0.81",
69
- "@sprucelabs/mercury-event-emitter": "^42.0.634",
70
- "@sprucelabs/schema": "^30.0.586",
71
- "@sprucelabs/spruce-core-schemas": "^40.1.572",
72
- "@sprucelabs/spruce-event-utils": "^40.1.351",
73
- "@sprucelabs/spruce-permission-utils": "^8.1.67",
74
- "@sprucelabs/spruce-skill-booter": "^62.4.70",
75
- "@sprucelabs/spruce-skill-utils": "^31.0.651",
76
- "@sprucelabs/test-utils": "^5.1.522",
66
+ "@sprucelabs/heartwood-view-controllers": "^112.3.1",
67
+ "@sprucelabs/mercury-client": "^42.0.637",
68
+ "@sprucelabs/mercury-core-events": "^25.0.82",
69
+ "@sprucelabs/mercury-event-emitter": "^42.0.637",
70
+ "@sprucelabs/schema": "^30.0.587",
71
+ "@sprucelabs/spruce-core-schemas": "^40.1.573",
72
+ "@sprucelabs/spruce-event-utils": "^40.1.352",
73
+ "@sprucelabs/spruce-permission-utils": "^8.1.69",
74
+ "@sprucelabs/spruce-skill-booter": "^62.5.1",
75
+ "@sprucelabs/spruce-skill-utils": "^31.0.652",
76
+ "@sprucelabs/test-utils": "^5.1.523",
77
77
  "dotenv": "^16.4.7",
78
78
  "unique-names-generator": "^4.7.1"
79
79
  },
80
80
  "devDependencies": {
81
81
  "@sprucelabs/esm-postbuild": "^6.0.531",
82
82
  "@sprucelabs/jest-json-reporter": "^8.0.555",
83
- "@sprucelabs/mercury-types": "^47.0.626",
83
+ "@sprucelabs/mercury-types": "^47.0.627",
84
84
  "@sprucelabs/resolve-path-aliases": "^2.0.522",
85
85
  "@sprucelabs/semantic-release": "^5.0.2",
86
86
  "@sprucelabs/test": "^9.0.63",
@@ -114,5 +114,5 @@
114
114
  "^#spruce/(.*)$": "<rootDir>/build/.spruce/$1"
115
115
  }
116
116
  },
117
- "gitHead": "cde5bba128fd8f8e3a420a06d11398cb3afb47cd"
117
+ "gitHead": "a2fa8ef9e640c5cddbfaaae0a5fa4e2a4542442f"
118
118
  }