dsh-plugin-teamflow 0.1.8 → 0.2.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.
- package/CHANGELOG.md +252 -159
- package/README.en.md +63 -57
- package/README.md +51 -74
- package/lib/client.js +1123 -291
- package/lib/descriptors.mjs +14 -1
- package/lib/host.mjs +4893 -696
- package/lib/store.mjs +77 -6
- package/package.json +134 -134
package/lib/descriptors.mjs
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
//#region descriptors.ts
|
|
2
|
+
/** 恒等 parse:接受任意 JSON 值,原样返回。 */
|
|
3
|
+
const JSON_SCHEMA = { parse: (value) => value };
|
|
2
4
|
/** 统一 strict codec(本插件所有参数/结果均为自由 JSON)。 */
|
|
3
5
|
const strict = {
|
|
4
6
|
mode: "strict",
|
|
5
7
|
typeSymbol: "dsh-plugin-teamflow/types#Json",
|
|
6
|
-
schema:
|
|
8
|
+
schema: JSON_SCHEMA,
|
|
9
|
+
/** 首次跨边界使用时物化 schema(宿主按需调用,只调一次并缓存)。 */
|
|
10
|
+
create: () => JSON_SCHEMA
|
|
7
11
|
};
|
|
8
12
|
const p = (name) => ({
|
|
9
13
|
name,
|
|
@@ -21,6 +25,15 @@ const TEAMFLOW_DESCRIPTORS = Object.freeze([
|
|
|
21
25
|
parameters: [],
|
|
22
26
|
result: strict
|
|
23
27
|
},
|
|
28
|
+
{
|
|
29
|
+
id: "dsh-plugin-teamflow#teamflow/setLocale",
|
|
30
|
+
service: "teamflow",
|
|
31
|
+
namespace: "teamflow",
|
|
32
|
+
method: "setLocale",
|
|
33
|
+
invocation: { kind: "direct" },
|
|
34
|
+
parameters: [p("locale")],
|
|
35
|
+
result: strict
|
|
36
|
+
},
|
|
24
37
|
{
|
|
25
38
|
id: "dsh-plugin-teamflow#teamflow/list",
|
|
26
39
|
service: "teamflow",
|