@manabrew/protocol 4.1.2 → 5.0.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.
@@ -1,4 +1,5 @@
1
1
  import type { PlaymatSettings } from "../game/index";
2
+ import type { TokenScript } from "../token";
2
3
  export type CardBackFaceSummary = {
3
4
  name: string;
4
5
  manaCost: string;
@@ -76,6 +77,7 @@ export type DeckCardIdentity = {
76
77
  setCode: string;
77
78
  cardNumber: string;
78
79
  oracleId?: string;
80
+ tokenScript?: TokenScript;
79
81
  foil?: boolean;
80
82
  };
81
83
  export type DeckFormat = "standard" | "pioneer" | "modern" | "legacy" | "vintage" | "pauper" | "commander" | "brawl" | "oathbreaker" | "draft" | "sealed";
@@ -1,4 +1,5 @@
1
1
  import type { TargetRef } from "../prompts/common";
2
+ import type { TokenScript } from "../token";
2
3
  export type CardDto = {
3
4
  id: string;
4
5
  identity: CardIdentity;
@@ -54,6 +55,7 @@ export type CardIdentity = {
54
55
  setCode: string;
55
56
  cardNumber: string;
56
57
  isToken: boolean;
58
+ tokenScript?: TokenScript;
57
59
  };
58
60
  export type CardView = {
59
61
  "visibility": "visible";
@@ -71,6 +73,8 @@ export type CombatAssignmentDto = {
71
73
  attackerId: string;
72
74
  };
73
75
  export type DayTime = "neither" | "day" | "night";
76
+ export type EngineKind = "Manabrew" | "Forge" | "Ironsmith";
77
+ export type GameFormat = "Any" | "Standard" | "Pioneer" | "Modern" | "Legacy" | "Vintage" | "Pauper" | "Commander" | "Brawl" | "Oathbreaker" | "Draft" | "Sealed";
74
78
  export type GameViewDto = {
75
79
  gameId: string;
76
80
  turn: number;
@@ -107,6 +111,7 @@ export type PlayerDto = {
107
111
  };
108
112
  commanderDamage: Record<string, number>;
109
113
  hasCityBlessing: boolean;
114
+ hasEnduringStory: boolean;
110
115
  ringLevel: number;
111
116
  speed: number;
112
117
  };
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- // AUTO-GENERATED by `cargo run -p manabrew-protocol --bin gen-protocol`. Do not edit.
17
+ // AUTO-GENERATED by `cargo run -p manabrew-relay-protocol --bin gen-protocol`. Do not edit.
18
18
  __exportStar(require("./prompts"), exports);
19
19
  __exportStar(require("./transport"), exports);
20
20
  __exportStar(require("./version"), exports);
@@ -1,4 +1,6 @@
1
1
  import type { Deck } from "../deck/index";
2
+ import type { EngineKind } from "../game/index";
3
+ import type { GameFormat } from "../game/index";
2
4
  export type DraftConfig = {
3
5
  set_code?: string;
4
6
  cube_id?: string;
@@ -8,8 +10,6 @@ export type DraftConfig = {
8
10
  seed?: number;
9
11
  fill_with_bots: boolean;
10
12
  };
11
- export type EngineKind = "Manabrew" | "Forge" | "Ironsmith";
12
- export type GameFormat = "Any" | "Standard" | "Pioneer" | "Modern" | "Legacy" | "Vintage" | "Pauper" | "Commander" | "Brawl" | "Oathbreaker" | "Draft" | "Sealed";
13
13
  export type PlayerDeckInfo = {
14
14
  username: string;
15
15
  deck_name: string;
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- // AUTO-GENERATED by `cargo run -p manabrew-protocol --bin gen-protocol`. Do not edit.
17
+ // AUTO-GENERATED by `cargo run -p manabrew-relay-protocol --bin gen-protocol`. Do not edit.
18
18
  __exportStar(require("./chooseAction"), exports);
19
19
  __exportStar(require("./chooseAttackers"), exports);
20
20
  __exportStar(require("./chooseBlockers"), exports);
@@ -0,0 +1 @@
1
+ export type TokenScript = string;
package/dist/token.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- // AUTO-GENERATED by `cargo run -p manabrew-protocol --bin gen-protocol`. Do not edit.
17
+ // AUTO-GENERATED by `cargo run -p manabrew-relay-protocol --bin gen-protocol`. Do not edit.
18
18
  __exportStar(require("./messages"), exports);
19
19
  __exportStar(require("./envelope"), exports);
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "4.1.2";
2
- export declare const PROTOCOL_VERSION = 4;
1
+ export declare const VERSION = "5.0.0";
2
+ export declare const PROTOCOL_VERSION = 5;
package/dist/version.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PROTOCOL_VERSION = exports.VERSION = void 0;
4
- // AUTO-GENERATED by `cargo run -p manabrew-protocol --bin gen-protocol`. Do not edit.
5
- exports.VERSION = "4.1.2";
6
- exports.PROTOCOL_VERSION = 4;
4
+ // AUTO-GENERATED by `cargo run -p manabrew-relay-protocol --bin gen-protocol`. Do not edit.
5
+ exports.VERSION = "5.0.0";
6
+ exports.PROTOCOL_VERSION = 5;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manabrew/protocol",
3
- "version": "4.1.2",
3
+ "version": "5.0.0",
4
4
  "description": "TypeScript types for the Manabrew wire protocol — the engine↔client message contract for the Manabrew Magic: The Gathering client.",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "repository": {