@sprucelabs/spruce-mmp-vc-plugin 2.1.388 → 2.1.389
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.
|
@@ -3,6 +3,7 @@ import { MmpVcPlugin } from './mmp.types';
|
|
|
3
3
|
export default class AdjustMmpVcPlugin implements ViewControllerPlugin, MmpVcPlugin<AdjustMmpVcPluginSetupOptions, AdjustTrackEventOptions> {
|
|
4
4
|
private device;
|
|
5
5
|
private isSetup;
|
|
6
|
+
private log;
|
|
6
7
|
constructor(options: ViewControllerPluginOptions);
|
|
7
8
|
setup(options: AdjustMmpVcPluginSetupOptions): void;
|
|
8
9
|
trackEvent(eventName: string, options?: AdjustTrackEventOptions): void;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
const schema_1 = require("@sprucelabs/schema");
|
|
7
|
-
const
|
|
4
|
+
const spruce_skill_utils_1 = require("@sprucelabs/spruce-skill-utils");
|
|
8
5
|
class AdjustMmpVcPlugin {
|
|
9
6
|
constructor(options) {
|
|
10
7
|
this.isSetup = false;
|
|
8
|
+
this.log = (0, spruce_skill_utils_1.buildLog)('AdjustMmpVcPlugin');
|
|
11
9
|
const { device } = options;
|
|
12
10
|
this.device = device;
|
|
13
11
|
}
|
|
@@ -24,9 +22,8 @@ class AdjustMmpVcPlugin {
|
|
|
24
22
|
}
|
|
25
23
|
trackEvent(eventName, options) {
|
|
26
24
|
if (!this.isSetup) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
});
|
|
25
|
+
this.log.warn('AdjustMmpVcPlugin not setup, skipping trackEvent');
|
|
26
|
+
return;
|
|
30
27
|
}
|
|
31
28
|
(0, schema_1.assertOptions)({ eventName }, ['eventName']);
|
|
32
29
|
this.device.sendCommand('mmp_track_event:adjust', {
|
|
@@ -3,6 +3,7 @@ import { MmpVcPlugin } from './mmp.types';
|
|
|
3
3
|
export default class AdjustMmpVcPlugin implements ViewControllerPlugin, MmpVcPlugin<AdjustMmpVcPluginSetupOptions, AdjustTrackEventOptions> {
|
|
4
4
|
private device;
|
|
5
5
|
private isSetup;
|
|
6
|
+
private log;
|
|
6
7
|
constructor(options: ViewControllerPluginOptions);
|
|
7
8
|
setup(options: AdjustMmpVcPluginSetupOptions): void;
|
|
8
9
|
trackEvent(eventName: string, options?: AdjustTrackEventOptions): void;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { assertOptions } from '@sprucelabs/schema';
|
|
2
|
-
import
|
|
2
|
+
import { buildLog } from '@sprucelabs/spruce-skill-utils';
|
|
3
3
|
export default class AdjustMmpVcPlugin {
|
|
4
4
|
constructor(options) {
|
|
5
5
|
this.isSetup = false;
|
|
6
|
+
this.log = buildLog('AdjustMmpVcPlugin');
|
|
6
7
|
const { device } = options;
|
|
7
8
|
this.device = device;
|
|
8
9
|
}
|
|
@@ -19,9 +20,8 @@ export default class AdjustMmpVcPlugin {
|
|
|
19
20
|
}
|
|
20
21
|
trackEvent(eventName, options) {
|
|
21
22
|
if (!this.isSetup) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
});
|
|
23
|
+
this.log.warn('AdjustMmpVcPlugin not setup, skipping trackEvent');
|
|
24
|
+
return;
|
|
25
25
|
}
|
|
26
26
|
assertOptions({ eventName }, ['eventName']);
|
|
27
27
|
this.device.sendCommand('mmp_track_event:adjust', Object.assign({ eventName }, options));
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"sprucebot",
|
|
14
14
|
"sprucelabs"
|
|
15
15
|
],
|
|
16
|
-
"version": "2.1.
|
|
16
|
+
"version": "2.1.389",
|
|
17
17
|
"scripts": {
|
|
18
18
|
"build.ci": "yarn run build.tsc && yarn run build.resolve-paths && yarn run lint",
|
|
19
19
|
"build.copy-files": "mkdir -p build && rsync -avzq --exclude='*.ts' ./src/ ./build/",
|
|
@@ -43,7 +43,6 @@
|
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@sprucelabs/esm-postbuild": "^6.0.461",
|
|
45
45
|
"@sprucelabs/jest-json-reporter": "^8.0.477",
|
|
46
|
-
"@sprucelabs/jest-sheets-reporter": "^3.0.155",
|
|
47
46
|
"@sprucelabs/resolve-path-aliases": "^2.0.456",
|
|
48
47
|
"@sprucelabs/semantic-release": "^5.0.2",
|
|
49
48
|
"@sprucelabs/spruce-test-fixtures": "^62.3.44",
|