@zhin.js/plugin-repeater 1.1.21 → 1.1.23
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/lib/config.d.ts +11 -5
- package/lib/config.d.ts.map +1 -1
- package/lib/runtime.d.ts +1 -1
- package/lib/runtime.d.ts.map +1 -1
- package/lib/runtime.js +2 -2
- package/lib/runtime.js.map +1 -1
- package/package.json +7 -7
- package/plugin.js +1 -3
- package/src/runtime.ts +3 -3
package/lib/config.d.ts
CHANGED
|
@@ -9,10 +9,16 @@ export declare const repeaterConfig: Schema<Schema.InputRecord<{
|
|
|
9
9
|
threshold: Schema<number, number> & Schema.Present;
|
|
10
10
|
cooldown: Schema<number, number> & Schema.Present;
|
|
11
11
|
maxLength: Schema<number, number> & Schema.Present;
|
|
12
|
-
}>, {
|
|
13
|
-
threshold: number;
|
|
14
|
-
cooldown: number;
|
|
15
|
-
maxLength: number;
|
|
16
|
-
} & {
|
|
12
|
+
}>, Schema.RecordTypes<{
|
|
13
|
+
threshold: Schema<number, number> & Schema.Present;
|
|
14
|
+
cooldown: Schema<number, number> & Schema.Present;
|
|
15
|
+
maxLength: Schema<number, number> & Schema.Present;
|
|
16
|
+
}>> & {
|
|
17
|
+
readonly output?: Schema.RecordTypes<{
|
|
18
|
+
threshold: Schema<number, number> & Schema.Present;
|
|
19
|
+
cooldown: Schema<number, number> & Schema.Present;
|
|
20
|
+
maxLength: Schema<number, number> & Schema.Present;
|
|
21
|
+
}> | undefined;
|
|
22
|
+
};
|
|
17
23
|
export type RepeaterConfig = Schema.Output<typeof repeaterConfig>;
|
|
18
24
|
//# sourceMappingURL=config.d.ts.map
|
package/lib/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,eAAO,MAAM,uBAAuB;;;;EAIlC,CAAC;AAEH,gIAAgI;AAChI,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,eAAO,MAAM,uBAAuB;;;;EAIlC,CAAC;AAEH,gIAAgI;AAChI,eAAO,MAAM,cAAc;;;;;;;;;;;;;;CAIzB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
package/lib/runtime.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { RepeaterEngine } from './engine.js';
|
|
2
|
-
export declare const repeaterEngineToken: import("zhin.js").
|
|
2
|
+
export declare const repeaterEngineToken: import("zhin.js").PluginStore<RepeaterEngine, unknown>;
|
|
3
3
|
//# sourceMappingURL=runtime.d.ts.map
|
package/lib/runtime.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,eAAO,MAAM,mBAAmB,wDAG/B,CAAC"}
|
package/lib/runtime.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export const repeaterEngineToken =
|
|
1
|
+
import { definePluginStore } from 'zhin.js';
|
|
2
|
+
export const repeaterEngineToken = definePluginStore('zhin.repeater.engine', 'Conversation repeat streak and cooldown state');
|
|
3
3
|
//# sourceMappingURL=runtime.js.map
|
package/lib/runtime.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAG5C,MAAM,CAAC,MAAM,mBAAmB,GAAG,iBAAiB,CAClD,sBAAsB,EACtB,+CAA+C,CAChD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhin.js/plugin-repeater",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.23",
|
|
4
4
|
"description": "Repeater plugin for Zhin.js — auto-repeat when group members echo the same content (Plugin Runtime)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
},
|
|
41
41
|
"license": "MIT",
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@zhin.js/core": "1.1.
|
|
44
|
-
"@zhin.js/skill": "1.1.
|
|
43
|
+
"@zhin.js/core": "1.1.58",
|
|
44
|
+
"@zhin.js/skill": "1.1.15"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"typescript": "^6.0.3",
|
|
48
48
|
"vitest": "^4.1.10",
|
|
49
|
-
"zhin.js": "1.1.
|
|
49
|
+
"zhin.js": "1.1.23"
|
|
50
50
|
},
|
|
51
51
|
"repository": {
|
|
52
52
|
"type": "git",
|
|
@@ -83,9 +83,9 @@
|
|
|
83
83
|
"plugins": []
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
|
-
"@zhin.js/command": "^1.1.
|
|
87
|
-
"@zhin.js/middleware": "^1.1.
|
|
88
|
-
"zhin.js": "^1.1.
|
|
86
|
+
"@zhin.js/command": "^1.1.16",
|
|
87
|
+
"@zhin.js/middleware": "^1.1.15",
|
|
88
|
+
"zhin.js": "^1.1.23"
|
|
89
89
|
},
|
|
90
90
|
"peerDependenciesMeta": {
|
|
91
91
|
"@zhin.js/command": {
|
package/plugin.js
CHANGED
|
@@ -8,8 +8,6 @@ export default definePlugin({
|
|
|
8
8
|
displayName: 'Repeater',
|
|
9
9
|
},
|
|
10
10
|
setup(context) {
|
|
11
|
-
|
|
12
|
-
context.resources.provide(repeaterEngineToken, engine);
|
|
13
|
-
return () => engine.dispose();
|
|
11
|
+
repeaterEngineToken.provide(context, () => new RepeaterEngine());
|
|
14
12
|
},
|
|
15
13
|
});
|
package/src/runtime.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { definePluginStore } from 'zhin.js';
|
|
2
2
|
import type { RepeaterEngine } from './engine.js';
|
|
3
3
|
|
|
4
|
-
export const repeaterEngineToken =
|
|
4
|
+
export const repeaterEngineToken = definePluginStore<RepeaterEngine>(
|
|
5
5
|
'zhin.repeater.engine',
|
|
6
|
-
'
|
|
6
|
+
'Conversation repeat streak and cooldown state',
|
|
7
7
|
);
|