@indiegems/gem-web-sdk 8.1.0 → 9.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.
- package/CHANGELOG.md +8 -0
- package/README.md +1 -0
- package/dist/function.d.ts +1 -1
- package/dist/game.d.ts +1 -1
- package/dist/gem-web-sdk.esm.js +1 -1
- package/dist/gem-web-sdk.function.js +1 -1
- package/dist/gem-web-sdk.game.js +1 -1
- package/dist/gem-web-sdk.min.js +1 -1
- package/dist/gem-web-sdk.sdk.js +1 -1
- package/dist/gem-web-sdk.server.js +1 -1
- package/dist/sdk.d.ts +1 -1
- package/dist/server.d.ts +1 -1
- package/docs/api/api-reference-game.md +36 -25
- package/docs/api/api-reference-server.md +6 -2
- package/docs/api/reference.json +19 -19
- package/docs/changelog.md +8 -0
- package/docs/cross-promotion.md +50 -30
- package/docs/getting-started.md +1 -1
- package/docs/manifest.json +23 -18
- package/docs/match-session.md +1 -1
- package/docs/rewarded-ads.md +464 -0
- package/docs/room-shapes.md +54 -76
- package/docs/rooms-and-matches.md +2 -3
- package/docs/server-bundles.md +2 -2
- package/docs/serverless-functions.md +42 -32
- package/docs/what-a-game-must-do.md +8 -2
- package/package.json +1 -1
- package/schema/bridge.v1.json +30 -6
package/CHANGELOG.md
CHANGED
|
@@ -16,6 +16,14 @@ Its entries are grouped under up to five headings:
|
|
|
16
16
|
- **Rebuild**: a type changed. Recompile against the new version; code that compiles today keeps compiling unless the entry says otherwise.
|
|
17
17
|
- **New capability**: something a game can now do. Nothing changes unless you use it.
|
|
18
18
|
|
|
19
|
+
## 9.0.0
|
|
20
|
+
|
|
21
|
+
Upgrading from 8.1.0. Impact: required.
|
|
22
|
+
|
|
23
|
+
### Must change
|
|
24
|
+
|
|
25
|
+
- FunctionFailure now has two more reasons, output_too_large and argument_too_large. A function that returns more than the output cap, or passes a platform call a value over the per-call size limit, used to fail as trap. It now fails with the matching new reason. Update any code that switches on FunctionFailure so it handles both new reasons. An exhaustive check over the old four reasons will stop compiling until you do. If your game treated trap as the sign of an oversized output or argument, handle the new reasons there too. Then rebuild your game against this release.
|
|
26
|
+
|
|
19
27
|
## 8.1.0
|
|
20
28
|
|
|
21
29
|
Upgrading from 8.0.0. Impact: required.
|
package/README.md
CHANGED
|
@@ -32,6 +32,7 @@ Read them here rather than guessing from the type declarations, which carry sign
|
|
|
32
32
|
| currencies, items, shops and loot | [`docs/inventory-and-catalogs.md`](docs/inventory-and-catalogs.md), [`docs/game-economy-tutorial.md`](docs/game-economy-tutorial.md), [`docs/trading-and-gifting.md`](docs/trading-and-gifting.md) |
|
|
33
33
|
| Gems, Tickets and achievements | [`docs/arcade-economy.md`](docs/arcade-economy.md), [`docs/achievements.md`](docs/achievements.md), [`docs/brand-art.md`](docs/brand-art.md) |
|
|
34
34
|
| daily challenges, async opponents, friends, cross-promotion | [`docs/daily-challenges.md`](docs/daily-challenges.md), [`docs/async-opponents.md`](docs/async-opponents.md), [`docs/friends.md`](docs/friends.md), [`docs/cross-promotion.md`](docs/cross-promotion.md) |
|
|
35
|
+
| a button the player presses for a revive or an extra try — rewarded ads | [`docs/rewarded-ads.md`](docs/rewarded-ads.md) |
|
|
35
36
|
| analytics | [`docs/analytics.md`](docs/analytics.md) |
|
|
36
37
|
| multiplayer — rooms, matches, room shapes | [`docs/rooms-and-matches.md`](docs/rooms-and-matches.md), [`docs/room-shapes.md`](docs/room-shapes.md), [`docs/match-session.md`](docs/match-session.md) |
|
|
37
38
|
| a dedicated server for a match | [`docs/server-bundles.md`](docs/server-bundles.md), [`docs/dedicated-server-flow.md`](docs/dedicated-server-flow.md) |
|
package/dist/function.d.ts
CHANGED
|
@@ -994,7 +994,7 @@ interface FunctionResult {
|
|
|
994
994
|
text(): string;
|
|
995
995
|
json<T = unknown>(): T;
|
|
996
996
|
}
|
|
997
|
-
type FunctionFailure = "trap" | "memory_exceeded" | "cpu_budget_exceeded" | "host_call_limit";
|
|
997
|
+
type FunctionFailure = "trap" | "memory_exceeded" | "cpu_budget_exceeded" | "host_call_limit" | "output_too_large" | "argument_too_large";
|
|
998
998
|
declare class GemFunctionError extends GemApiError {
|
|
999
999
|
readonly invocationId?: string;
|
|
1000
1000
|
readonly functionMessage?: string;
|
package/dist/game.d.ts
CHANGED
|
@@ -1384,7 +1384,7 @@ interface FunctionResult {
|
|
|
1384
1384
|
text(): string;
|
|
1385
1385
|
json<T = unknown>(): T;
|
|
1386
1386
|
}
|
|
1387
|
-
type FunctionFailure = "trap" | "memory_exceeded" | "cpu_budget_exceeded" | "host_call_limit";
|
|
1387
|
+
type FunctionFailure = "trap" | "memory_exceeded" | "cpu_budget_exceeded" | "host_call_limit" | "output_too_large" | "argument_too_large";
|
|
1388
1388
|
declare class GemFunctionError extends GemApiError {
|
|
1389
1389
|
readonly invocationId?: string;
|
|
1390
1390
|
readonly functionMessage?: string;
|