@things-factory/guild-overlay 10.1.314 → 10.1.315

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.
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GUILD_PULSE_TOPIC = exports.GUILD_PULSE_KINDS = void 0;
4
+ exports.publishGuildPulse = publishGuildPulse;
5
+ const shell_1 = require("@things-factory/shell");
6
+ /*
7
+ * **What a person hears from the guild** (design §3-2 · §14-1) - their own coins only. The hub on this server publishes
8
+ * straight into the `guildPulse` subscription; nothing is stored. Each kind is one coin movement on the screen:
9
+ *
10
+ * prospect a save that will earn when it is confirmed - an empty coin, a range
11
+ * verified a record confirmed - the held coin turns silver
12
+ * matured holds that ended - coins turn gold, batched
13
+ * issued the month's settlement paid out - the balance rolls up
14
+ * impact someone used what this person made - a star coin
15
+ * skipped confirmed but not paid, with the reason - a bubble, no coin
16
+ * voided taken back - the held coin fades
17
+ */
18
+ exports.GUILD_PULSE_KINDS = ['prospect', 'verified', 'matured', 'issued', 'impact', 'skipped', 'voided'];
19
+ exports.GUILD_PULSE_TOPIC = 'guild-pulse';
20
+ /** Tell one person on this server. The caller has waited for its work to commit (`afterCommitOf`). */
21
+ function publishGuildPulse(domainId, userId, pulse) {
22
+ if (!domainId || !userId)
23
+ return;
24
+ const message = { domainId, userId, guildPulse: { ...pulse, at: pulse.at ?? new Date().toISOString() } };
25
+ shell_1.pubsub.publish(exports.GUILD_PULSE_TOPIC, message);
26
+ }
27
+ //# sourceMappingURL=pulse.js.map
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@things-factory/guild-overlay",
3
- "version": "10.1.314",
3
+ "version": "10.1.315",
4
4
  "main": "dist-server/index.js",
5
5
  "files": [
6
+ "dist-client",
6
7
  "dist-server",
7
8
  "things-factory.config.js",
8
9
  "translations",
@@ -18,7 +19,7 @@
18
19
  "things-factory": true,
19
20
  "license": "MIT",
20
21
  "author": "heartyoh <heartyoh@hatiolab.com>",
21
- "description": "The guild overlay every application loads - it declares the contribution kinds a product sends and hands confirmed contributions to the guild hub, on this server in the same transaction or on another over the webhook outbox (operato-guild)",
22
+ "description": "The guild overlay every application loads - it declares the contribution kinds a product sends and hands confirmed contributions to the guild hub, on this server in the same transaction or on another over the webhook outbox, and draws the game overlay - the wallet chip, the coins and the quest panel (operato-guild)",
22
23
  "publishConfig": {
23
24
  "access": "public",
24
25
  "@things-factory:registry": "https://registry.npmjs.org"
@@ -29,10 +30,13 @@
29
30
  "directory": "packages/guild-overlay"
30
31
  },
31
32
  "scripts": {
32
- "build": "npm run build:server",
33
+ "build": "npm run build:server && npm run build:client",
33
34
  "build:server": "npm run clean:server && npx tsc --p ./server/tsconfig.json",
35
+ "build:client": "npm run clean:client && npm run copy:files && npx tsc --p ./client/tsconfig.json",
36
+ "copy:files": "copyfiles -e \"./client/**/*.{ts,js,json}\" -u 1 \"./client/**/*\" dist-client",
34
37
  "clean:server": "rm -rf dist-server",
35
- "clean": "npm run clean:server",
38
+ "clean:client": "rm -rf dist-client",
39
+ "clean": "npm run clean:server && npm run clean:client",
36
40
  "test": "npm run build:server && node --import ./test/resolve-ts-siblings.mjs --test test/*.test.ts"
37
41
  },
38
42
  "dependencies": {
@@ -44,5 +48,5 @@
44
48
  "@things-factory/webhook": "^10.1.314",
45
49
  "@things-factory/worklist": "^10.1.314"
46
50
  },
47
- "gitHead": "8d74df0a0618131ff17309638a6aa0affbd4c77d"
51
+ "gitHead": "69d8495a54f4c1f91276b66cb50fe7d7cdda8f3f"
48
52
  }
@@ -1,9 +1,18 @@
1
1
  {
2
- "title.guild": "Contribution rewards (guild)",
3
2
  "label.guild-enabled": "Use contribution rewards",
4
- "text.guild-enabled-hint": "Off, this application sends no contribution facts and adds nothing to its screens.",
5
3
  "label.guild-hub": "Use the hub on this server",
6
- "text.guild-hub-hint": "On, contribution facts go to the hub on this server in the work's own transaction.",
7
4
  "label.guild-hub-peer": "Webhook peer of the hub on another server",
8
- "text.guild-hub-peer-hint": "The peer's name when the hub is on another server. Its address is kept on the webhook destination."
9
- }
5
+ "label.guild-overlay-reduce-motion": "Reduce motion",
6
+ "label.guild-overlay-show": "Show coins",
7
+ "label.guild-overlay-sound": "Sound",
8
+ "text.guild-enabled-hint": "Off, this application sends no contribution facts and adds nothing to its screens.",
9
+ "text.guild-hub-hint": "On, contribution facts go to the hub on this server in the work's own transaction.",
10
+ "text.guild-hub-peer-hint": "The peer's name when the hub is on another server. Its address is kept on the webhook destination.",
11
+ "text.guild-overlay-confirmed": "Record confirmed",
12
+ "text.guild-overlay-confirmed-more": "{label} and {count} more",
13
+ "text.guild-overlay-impact": "Your record was put to use",
14
+ "text.guild-overlay-issued": "{gt} GT acquired",
15
+ "text.guild-overlay-setting-note": "Your coins and balance are shown to you alone.",
16
+ "title.guild": "Contribution rewards (guild)",
17
+ "title.guild-overlay-setting": "Guild coins"
18
+ }
@@ -1,9 +1,18 @@
1
1
  {
2
- "title.guild": "Recompensas de contribución (guild)",
3
2
  "label.guild-enabled": "Usar recompensas de contribución",
4
- "text.guild-enabled-hint": "Desactivado, esta aplicación no envía hechos de contribución ni añade nada a sus pantallas.",
5
3
  "label.guild-hub": "Usar el centro de este servidor",
6
- "text.guild-hub-hint": "Activado, los hechos de contribución van al centro de este servidor en la misma transacción del trabajo.",
7
4
  "label.guild-hub-peer": "Par de webhook del centro en otro servidor",
8
- "text.guild-hub-peer-hint": "El nombre del par cuando el centro está en otro servidor. Su dirección se guarda en el destino del webhook."
9
- }
5
+ "label.guild-overlay-reduce-motion": "Reducir el movimiento",
6
+ "label.guild-overlay-show": "Mostrar monedas",
7
+ "label.guild-overlay-sound": "Sonido",
8
+ "text.guild-enabled-hint": "Desactivado, esta aplicación no envía hechos de contribución ni añade nada a sus pantallas.",
9
+ "text.guild-hub-hint": "Activado, los hechos de contribución van al centro de este servidor en la misma transacción del trabajo.",
10
+ "text.guild-hub-peer-hint": "El nombre del par cuando el centro está en otro servidor. Su dirección se guarda en el destino del webhook.",
11
+ "text.guild-overlay-confirmed": "Registro confirmado",
12
+ "text.guild-overlay-confirmed-more": "{label} y {count} más",
13
+ "text.guild-overlay-impact": "Tu registro se aprovechó",
14
+ "text.guild-overlay-issued": "{gt} GT obtenidos",
15
+ "text.guild-overlay-setting-note": "Tus monedas y tu saldo solo los ves tú.",
16
+ "title.guild": "Recompensas de contribución (guild)",
17
+ "title.guild-overlay-setting": "Monedas del gremio"
18
+ }
@@ -1,9 +1,18 @@
1
1
  {
2
- "title.guild": "貢献報酬(guild)",
3
2
  "label.guild-enabled": "貢献報酬を使う",
4
- "text.guild-enabled-hint": "オフにすると、このアプリは貢献の事実を送らず、画面にも何も加えません。",
5
3
  "label.guild-hub": "このサーバーのハブを使う",
6
- "text.guild-hub-hint": "オンにすると、貢献の事実を同じサーバーのハブに業務と同じトランザクションで渡します。",
7
4
  "label.guild-hub-peer": "別サーバーのハブの webhook 相手名",
8
- "text.guild-hub-peer-hint": "ハブが別サーバーにある場合の相手名です。宛先アドレスは webhook の宛先に置きます。"
9
- }
5
+ "label.guild-overlay-reduce-motion": "動きを減らす",
6
+ "label.guild-overlay-show": "コインを表示",
7
+ "label.guild-overlay-sound": "サウンド",
8
+ "text.guild-enabled-hint": "オフにすると、このアプリは貢献の事実を送らず、画面にも何も加えません。",
9
+ "text.guild-hub-hint": "オンにすると、貢献の事実を同じサーバーのハブに業務と同じトランザクションで渡します。",
10
+ "text.guild-hub-peer-hint": "ハブが別サーバーにある場合の相手名です。宛先アドレスは webhook の宛先に置きます。",
11
+ "text.guild-overlay-confirmed": "記録確認",
12
+ "text.guild-overlay-confirmed-more": "{label} ほか {count} 件",
13
+ "text.guild-overlay-impact": "記録が活用された",
14
+ "text.guild-overlay-issued": "{gt} GT 獲得",
15
+ "text.guild-overlay-setting-note": "コインと残高はあなたにだけ表示されます。",
16
+ "title.guild": "貢献報酬(guild)",
17
+ "title.guild-overlay-setting": "ギルドコイン"
18
+ }
@@ -1,9 +1,18 @@
1
1
  {
2
- "title.guild": "기여 보상(guild)",
3
2
  "label.guild-enabled": "기여 보상 사용",
4
- "text.guild-enabled-hint": "끄면 이 앱은 기여 사실을 보내지 않고 화면에도 아무것도 붙이지 않습니다.",
5
3
  "label.guild-hub": "이 서버의 허브 사용",
6
- "text.guild-hub-hint": "켜면 기여 사실을 같은 서버의 허브에 업무와 같은 트랜잭션으로 넘깁니다.",
7
4
  "label.guild-hub-peer": "다른 서버 허브의 webhook 상대 이름",
8
- "text.guild-hub-peer-hint": "허브가 다른 서버에 있을 때 그 상대 이름. 목적지 주소는 webhook 목적지에 둡니다."
9
- }
5
+ "label.guild-overlay-reduce-motion": "움직임 줄이기",
6
+ "label.guild-overlay-show": "코인 표시",
7
+ "label.guild-overlay-sound": "소리",
8
+ "text.guild-enabled-hint": "끄면 이 앱은 기여 사실을 보내지 않고 화면에도 아무것도 붙이지 않습니다.",
9
+ "text.guild-hub-hint": "켜면 기여 사실을 같은 서버의 허브에 업무와 같은 트랜잭션으로 넘깁니다.",
10
+ "text.guild-hub-peer-hint": "허브가 다른 서버에 있을 때 그 상대 이름. 목적지 주소는 webhook 목적지에 둡니다.",
11
+ "text.guild-overlay-confirmed": "기록 확인",
12
+ "text.guild-overlay-confirmed-more": "{label} 외 {count}건",
13
+ "text.guild-overlay-impact": "내 기록 활용됨",
14
+ "text.guild-overlay-issued": "{gt} GT 획득",
15
+ "text.guild-overlay-setting-note": "내 코인과 잔액은 나에게만 보여요.",
16
+ "title.guild": "기여 보상(guild)",
17
+ "title.guild-overlay-setting": "길드 코인"
18
+ }
@@ -1,9 +1,18 @@
1
1
  {
2
- "title.guild": "Ganjaran sumbangan (guild)",
3
2
  "label.guild-enabled": "Guna ganjaran sumbangan",
4
- "text.guild-enabled-hint": "Jika dimatikan, aplikasi ini tidak menghantar fakta sumbangan dan tidak menambah apa-apa pada skrinnya.",
5
3
  "label.guild-hub": "Guna hab pada pelayan ini",
6
- "text.guild-hub-hint": "Jika dihidupkan, fakta sumbangan diserahkan kepada hab pada pelayan ini dalam transaksi kerja yang sama.",
7
4
  "label.guild-hub-peer": "Rakan webhook bagi hab pada pelayan lain",
8
- "text.guild-hub-peer-hint": "Nama rakan apabila hab berada pada pelayan lain. Alamatnya disimpan pada destinasi webhook."
9
- }
5
+ "label.guild-overlay-reduce-motion": "Kurangkan gerakan",
6
+ "label.guild-overlay-show": "Tunjukkan syiling",
7
+ "label.guild-overlay-sound": "Bunyi",
8
+ "text.guild-enabled-hint": "Jika dimatikan, aplikasi ini tidak menghantar fakta sumbangan dan tidak menambah apa-apa pada skrinnya.",
9
+ "text.guild-hub-hint": "Jika dihidupkan, fakta sumbangan diserahkan kepada hab pada pelayan ini dalam transaksi kerja yang sama.",
10
+ "text.guild-hub-peer-hint": "Nama rakan apabila hab berada pada pelayan lain. Alamatnya disimpan pada destinasi webhook.",
11
+ "text.guild-overlay-confirmed": "Rekod disahkan",
12
+ "text.guild-overlay-confirmed-more": "{label} dan {count} lagi",
13
+ "text.guild-overlay-impact": "Rekod anda digunakan",
14
+ "text.guild-overlay-issued": "{gt} GT diperoleh",
15
+ "text.guild-overlay-setting-note": "Syiling dan baki anda hanya dipaparkan kepada anda.",
16
+ "title.guild": "Ganjaran sumbangan (guild)",
17
+ "title.guild-overlay-setting": "Syiling guild"
18
+ }
@@ -1,9 +1,18 @@
1
1
  {
2
- "title.guild": "贡献奖励(guild)",
3
2
  "label.guild-enabled": "使用贡献奖励",
4
- "text.guild-enabled-hint": "关闭后,本应用不发送贡献事实,界面也不添加任何内容。",
5
3
  "label.guild-hub": "使用本服务器的中心",
6
- "text.guild-hub-hint": "开启后,贡献事实将在同一事务中交给本服务器的中心。",
7
4
  "label.guild-hub-peer": "其他服务器中心的 webhook 对端名称",
8
- "text.guild-hub-peer-hint": "中心在其他服务器时的对端名称。目标地址保存在 webhook 目标中。"
9
- }
5
+ "label.guild-overlay-reduce-motion": "减少动画",
6
+ "label.guild-overlay-show": "显示硬币",
7
+ "label.guild-overlay-sound": "声音",
8
+ "text.guild-enabled-hint": "关闭后,本应用不发送贡献事实,界面也不添加任何内容。",
9
+ "text.guild-hub-hint": "开启后,贡献事实将在同一事务中交给本服务器的中心。",
10
+ "text.guild-hub-peer-hint": "中心在其他服务器时的对端名称。目标地址保存在 webhook 目标中。",
11
+ "text.guild-overlay-confirmed": "记录已确认",
12
+ "text.guild-overlay-confirmed-more": "{label} 等 {count} 项",
13
+ "text.guild-overlay-impact": "你的记录被采用",
14
+ "text.guild-overlay-issued": "获得 {gt} GT",
15
+ "text.guild-overlay-setting-note": "你的硬币和余额只对你显示。",
16
+ "title.guild": "贡献奖励(guild)",
17
+ "title.guild-overlay-setting": "公会硬币"
18
+ }