@vnejs/plugins.views.achievement 0.1.14 → 0.1.16
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/dist/modules/achievement.d.ts +2 -2
- package/dist/modules/achievement.js +2 -2
- package/dist/modules/exec.d.ts +3 -3
- package/dist/modules/exec.js +3 -3
- package/dist/modules/logs.d.ts +2 -2
- package/dist/modules/logs.js +2 -2
- package/package.json +2 -6
- package/src/modules/achievement.ts +2 -2
- package/src/modules/exec.ts +4 -4
- package/src/modules/logs.ts +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModuleCore } from "@vnejs/module.core";
|
|
2
2
|
import type { AchievementPluginConstants, AchievementPluginEvents, AchievementPluginParams, AchievementPluginSettings } from "../types.js";
|
|
3
3
|
import type { AchievementUnlockPayload } from "../utils/achievement.js";
|
|
4
|
-
export declare class Achievement extends
|
|
4
|
+
export declare class Achievement extends ModuleCore<AchievementPluginEvents, AchievementPluginConstants, AchievementPluginSettings, AchievementPluginParams> {
|
|
5
5
|
name: string;
|
|
6
6
|
subscribe: () => void;
|
|
7
7
|
onAchievementClear: () => Promise<unknown> | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModuleCore } from "@vnejs/module.core";
|
|
2
2
|
const STORAGE_VALUE = 1;
|
|
3
|
-
export class Achievement extends
|
|
3
|
+
export class Achievement extends ModuleCore {
|
|
4
4
|
name = "achievement";
|
|
5
5
|
subscribe = () => {
|
|
6
6
|
this.on(this.EVENTS.ACHIEVEMENT.CLEAR, this.onAchievementClear);
|
package/dist/modules/exec.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { LineExecHandlerArg, LineLoadHandlerArg } from "@vnejs/
|
|
1
|
+
import { ModuleCore } from "@vnejs/module.core";
|
|
2
|
+
import type { LineExecHandlerArg, LineLoadHandlerArg } from "@vnejs/module.core";
|
|
3
3
|
import type { AchievementPluginConstants, AchievementPluginEvents, AchievementPluginParams, AchievementPluginSettings } from "../types.js";
|
|
4
|
-
export declare class AchievementExec extends
|
|
4
|
+
export declare class AchievementExec extends ModuleCore<AchievementPluginEvents, AchievementPluginConstants, AchievementPluginSettings, AchievementPluginParams> {
|
|
5
5
|
name: string;
|
|
6
6
|
init: () => Promise<[unknown[] | undefined, unknown[] | undefined]>;
|
|
7
7
|
onLineExec: ({ keywords, line }?: LineExecHandlerArg) => Promise<void>;
|
package/dist/modules/exec.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModuleCore } from "@vnejs/module.core";
|
|
2
2
|
import { tokenizeExecLine } from "@vnejs/helpers";
|
|
3
|
-
export class AchievementExec extends
|
|
3
|
+
export class AchievementExec extends ModuleCore {
|
|
4
4
|
name = "achievement.exec";
|
|
5
5
|
init = () => Promise.all([
|
|
6
6
|
this.emit(this.EVENTS.SCENARIO.LINE_EXEC_REG, { module: "achievement", handler: this.onLineExec }),
|
|
@@ -9,7 +9,7 @@ export class AchievementExec extends Module {
|
|
|
9
9
|
onLineExec = async ({ keywords = [], line = "" } = {}) => {
|
|
10
10
|
const [action = "", ...tokens] = tokenizeExecLine(line).map(String);
|
|
11
11
|
await this.emitActionExec(action, tokens, keywords);
|
|
12
|
-
this.
|
|
12
|
+
this.emitNext();
|
|
13
13
|
};
|
|
14
14
|
onLineLoad = ({ line = "", priority = this.CONST.MEDIA.PRIORITIES.BACKGROUND } = {}) => {
|
|
15
15
|
const [action = "", ...tokens] = tokenizeExecLine(line).map(String);
|
package/dist/modules/logs.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModuleCore } from "@vnejs/module.core";
|
|
2
2
|
import type { AchievementPluginConstants, AchievementPluginEvents, AchievementPluginParams, AchievementPluginSettings } from "../types.js";
|
|
3
3
|
import type { AchievementUnlockedPayload } from "../utils/achievement.js";
|
|
4
|
-
export declare class AchievementLogs extends
|
|
4
|
+
export declare class AchievementLogs extends ModuleCore<AchievementPluginEvents, AchievementPluginConstants, AchievementPluginSettings, AchievementPluginParams> {
|
|
5
5
|
name: string;
|
|
6
6
|
subscribe: () => void;
|
|
7
7
|
onAchievementUnlocked: ({ id }?: AchievementUnlockedPayload) => undefined;
|
package/dist/modules/logs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export class AchievementLogs extends
|
|
1
|
+
import { ModuleCore } from "@vnejs/module.core";
|
|
2
|
+
export class AchievementLogs extends ModuleCore {
|
|
3
3
|
name = "achievement.logs";
|
|
4
4
|
subscribe = () => {
|
|
5
5
|
this.on(this.EVENTS.ACHIEVEMENT.UNLOCKED, this.onAchievementUnlocked, this.CONST.LOGS.FILTER_FROM_RESULT_OPTIONS);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vnejs/plugins.views.achievement",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -34,12 +34,8 @@
|
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@vnejs/helpers": "~0.1.0",
|
|
37
|
-
"@vnejs/module": "~0.1.0",
|
|
37
|
+
"@vnejs/module.core": "~0.1.0",
|
|
38
38
|
"@vnejs/module.components": "~0.1.0",
|
|
39
|
-
"@vnejs/plugins.core.components.contract": "~0.1.0",
|
|
40
|
-
"@vnejs/plugins.core.logs.contract": "~0.1.0",
|
|
41
|
-
"@vnejs/plugins.core.scenario.contract": "~0.1.0",
|
|
42
|
-
"@vnejs/plugins.core.storage.contract": "~0.1.0",
|
|
43
39
|
"@vnejs/shared": "~0.1.0",
|
|
44
40
|
"@vnejs/uis.react": "~0.1.0",
|
|
45
41
|
"@vnejs/uis.utils": "~0.1.0"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModuleCore } from "@vnejs/module.core";
|
|
2
2
|
|
|
3
3
|
import type { AchievementPluginConstants, AchievementPluginEvents, AchievementPluginParams, AchievementPluginSettings } from "../types.js";
|
|
4
4
|
import type { AchievementUnlockPayload } from "../utils/achievement.js";
|
|
5
5
|
|
|
6
6
|
const STORAGE_VALUE = 1;
|
|
7
7
|
|
|
8
|
-
export class Achievement extends
|
|
8
|
+
export class Achievement extends ModuleCore<AchievementPluginEvents, AchievementPluginConstants, AchievementPluginSettings, AchievementPluginParams> {
|
|
9
9
|
name = "achievement";
|
|
10
10
|
|
|
11
11
|
subscribe = () => {
|
package/src/modules/exec.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModuleCore } from "@vnejs/module.core";
|
|
2
2
|
import { tokenizeExecLine } from "@vnejs/helpers";
|
|
3
3
|
|
|
4
|
-
import type { LineExecHandlerArg, LineLoadHandlerArg } from "@vnejs/
|
|
4
|
+
import type { LineExecHandlerArg, LineLoadHandlerArg } from "@vnejs/module.core";
|
|
5
5
|
|
|
6
6
|
import type { AchievementPluginConstants, AchievementPluginEvents, AchievementPluginParams, AchievementPluginSettings } from "../types.js";
|
|
7
7
|
|
|
8
|
-
export class AchievementExec extends
|
|
8
|
+
export class AchievementExec extends ModuleCore<AchievementPluginEvents, AchievementPluginConstants, AchievementPluginSettings, AchievementPluginParams> {
|
|
9
9
|
name = "achievement.exec";
|
|
10
10
|
|
|
11
11
|
init = () =>
|
|
@@ -19,7 +19,7 @@ export class AchievementExec extends Module<AchievementPluginEvents, Achievement
|
|
|
19
19
|
|
|
20
20
|
await this.emitActionExec(action, tokens, keywords);
|
|
21
21
|
|
|
22
|
-
this.
|
|
22
|
+
this.emitNext();
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
onLineLoad = ({ line = "", priority = this.CONST.MEDIA.PRIORITIES.BACKGROUND }: LineLoadHandlerArg = {}) => {
|
package/src/modules/logs.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModuleCore } from "@vnejs/module.core";
|
|
2
2
|
|
|
3
3
|
import type { AchievementPluginConstants, AchievementPluginEvents, AchievementPluginParams, AchievementPluginSettings } from "../types.js";
|
|
4
4
|
import type { AchievementUnlockedPayload } from "../utils/achievement.js";
|
|
5
5
|
|
|
6
|
-
export class AchievementLogs extends
|
|
6
|
+
export class AchievementLogs extends ModuleCore<AchievementPluginEvents, AchievementPluginConstants, AchievementPluginSettings, AchievementPluginParams> {
|
|
7
7
|
name = "achievement.logs";
|
|
8
8
|
|
|
9
9
|
subscribe = () => {
|