bevy-ts 0.1.0-alpha.7 → 0.1.0-alpha.8

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.
Files changed (2) hide show
  1. package/package.json +6 -6
  2. package/protocol.d.ts +89 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bevy-ts",
3
- "version": "0.1.0-alpha.7",
3
+ "version": "0.1.0-alpha.8",
4
4
  "description": "TypeScript for Bevy: components, systems and hot reload without recompiling Rust",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "repository": {
@@ -59,11 +59,11 @@
59
59
  "examples"
60
60
  ],
61
61
  "optionalDependencies": {
62
- "@bevy-ts/darwin-arm64": "0.1.0-alpha.7",
63
- "@bevy-ts/darwin-x64": "0.1.0-alpha.7",
64
- "@bevy-ts/linux-arm64": "0.1.0-alpha.7",
65
- "@bevy-ts/linux-x64": "0.1.0-alpha.7",
66
- "@bevy-ts/win32-x64": "0.1.0-alpha.7"
62
+ "@bevy-ts/darwin-arm64": "0.1.0-alpha.8",
63
+ "@bevy-ts/darwin-x64": "0.1.0-alpha.8",
64
+ "@bevy-ts/linux-arm64": "0.1.0-alpha.8",
65
+ "@bevy-ts/linux-x64": "0.1.0-alpha.8",
66
+ "@bevy-ts/win32-x64": "0.1.0-alpha.8"
67
67
  },
68
68
  "devDependencies": {
69
69
  "json-schema-to-typescript": "^15.0.4",
package/protocol.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // @generated by packages/bevy-ts/scripts/gen-protocol.mjs from protocol/bevy-ts.openrpc.json. Do not edit.
2
2
 
3
3
  /** The protocol version these types describe. */
4
- export const PROTOCOL_VERSION: "1.20.0";
4
+ export const PROTOCOL_VERSION: "1.21.0";
5
5
 
6
6
  /**
7
7
  * An entity id: Entity::to_bits.
@@ -52,6 +52,13 @@ export type TsxNodeId = string;
52
52
  * via the `definition` "TsxProvenance".
53
53
  */
54
54
  export type TsxProvenance = "controlled" | "initial" | "default" | "bound" | "override";
55
+ /**
56
+ * (1.21) Why a level entry is a placeholder: no live code registers the type (`unregistered`), its code threw or the TS build failed (`failed`), or saved fields or props do not fit live code (`mismatch`).
57
+ *
58
+ * This interface was referenced by `ProtocolTypes`'s JSON-Schema
59
+ * via the `definition` "MissingReason".
60
+ */
61
+ export type MissingReason = "unregistered" | "failed" | "mismatch";
55
62
  /**
56
63
  * A ViewportInput type.
57
64
  *
@@ -842,6 +849,16 @@ export interface TsxTreeNode {
842
849
  * Written in that file, rather than coming from a prefab, an included level or the scene's TSX.
843
850
  */
844
851
  written: boolean;
852
+ /**
853
+ * (1.21) One per placeholder entry on the entity: a component the level writes whose code is missing, failed or does not fit. Absent when there is none.
854
+ */
855
+ missing?: {
856
+ /**
857
+ * The name the level writes.
858
+ */
859
+ component: string;
860
+ reason: MissingReason;
861
+ }[];
845
862
  };
846
863
  /**
847
864
  * (1.15) The root the node is in.
@@ -2029,7 +2046,7 @@ export interface LevelNodeResult {
2029
2046
  source?: SourceLocation[];
2030
2047
  overrides: LevelOverride[];
2031
2048
  /**
2032
- * The scene component the entity instances, if any.
2049
+ * The scene component the entity instances, if any; still named when it is a placeholder (1.21).
2033
2050
  */
2034
2051
  prefab?: string | null;
2035
2052
  /**
@@ -2040,6 +2057,10 @@ export interface LevelNodeResult {
2040
2057
  * (1.12) Components the file adds that the entity's prefab does not give, named as LevelOverride.component names them.
2041
2058
  */
2042
2059
  patches?: string[];
2060
+ /**
2061
+ * (1.21) The entity's placeholder entries; absent when there is none.
2062
+ */
2063
+ missing?: MissingComponent[];
2043
2064
  }
2044
2065
  /**
2045
2066
  * One @prop of a scene component instance: its type, the value it takes, and whether the level sets it.
@@ -2074,6 +2095,68 @@ export interface SourceLocation1 {
2074
2095
  line: number;
2075
2096
  column: number;
2076
2097
  }
2098
+ /**
2099
+ * (1.21) A component a level writes whose code is missing, failed or does not fit. Its saved text is kept in the file.
2100
+ *
2101
+ * This interface was referenced by `ProtocolTypes`'s JSON-Schema
2102
+ * via the `definition` "MissingComponent".
2103
+ */
2104
+ export interface MissingComponent {
2105
+ /**
2106
+ * The name the level writes (`game::Loot`).
2107
+ */
2108
+ component: string;
2109
+ reason: MissingReason;
2110
+ /**
2111
+ * One line of why.
2112
+ */
2113
+ message?: string;
2114
+ /**
2115
+ * Saved fields and props as written, each value its saved text; a prop keeps its `@`. A mismatch lists only the misfits.
2116
+ */
2117
+ fields: {
2118
+ [k: string]: string;
2119
+ };
2120
+ location: SourceLocation2;
2121
+ expected?: SourceLocation3;
2122
+ /**
2123
+ * mismatch: why each listed field or prop does not fit.
2124
+ */
2125
+ misfit?: {
2126
+ [k: string]: string;
2127
+ };
2128
+ /**
2129
+ * A missing scene component: the entries below it with no base of their own, kept and not spawned.
2130
+ */
2131
+ overrides?: {
2132
+ /**
2133
+ * The name path below the instance.
2134
+ */
2135
+ path: string[];
2136
+ /**
2137
+ * Its patches' saved text, keyed `Component.field`.
2138
+ */
2139
+ fields: {
2140
+ [k: string]: string;
2141
+ };
2142
+ }[];
2143
+ }
2144
+ /**
2145
+ * Where the level writes it.
2146
+ */
2147
+ export interface SourceLocation2 {
2148
+ file: string;
2149
+ line: number;
2150
+ column: number;
2151
+ }
2152
+ /**
2153
+ * Where its code was expected: the throw, the file that did not build, or the declaration this process last saw live. Absent when unknown, as after a restart.
2154
+ */
2155
+ export interface SourceLocation3 {
2156
+ file: string;
2157
+ line: number;
2158
+ column: number;
2159
+ }
2077
2160
  /**
2078
2161
  * This interface was referenced by `ProtocolTypes`'s JSON-Schema
2079
2162
  * via the `definition` "LevelWriteParams".
@@ -2096,7 +2179,7 @@ export interface LevelWriteResult {
2096
2179
  file: string;
2097
2180
  status: "written" | "rebased" | "conflict" | "refused";
2098
2181
  /**
2099
- * conflict: `target removed` or `changed on disk`; refused: `not-found`, `prefab-internal`, `exists`, `invalid`, `internal` or `io`.
2182
+ * conflict: `target removed` or `changed on disk`; refused: `not-found`, `prefab-internal`, `exists`, `invalid`, `internal` or `io`; (1.21) `missing`: a set, revert, set_prop or revert_prop on a placeholder component, `unknown`: a write of a type no live code registers.
2100
2183
  */
2101
2184
  reason?: string | null;
2102
2185
  message?: string | null;
@@ -2178,6 +2261,9 @@ export interface LevelWatchMessage {
2178
2261
  */
2179
2262
  id?: number | null;
2180
2263
  reason?: string | null;
2264
+ /**
2265
+ * failed: the errors; loaded (1.21): the level's diagnostics, a `warning:` per placeholder entry among them.
2266
+ */
2181
2267
  diagnostics?: LevelDiagnostic[];
2182
2268
  opener?: LevelOpener1;
2183
2269
  }