@crowdedkingdoms/crowdyjs 14.0.0 → 14.2.0-dev.1
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/MIGRATION.md +6 -4
- package/README.md +43 -0
- package/dist/client.d.ts +27 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +69 -2
- package/dist/crowdy-client.d.ts.map +1 -1
- package/dist/crowdy-client.js +25 -0
- package/dist/datacenter-redirect.d.ts +49 -0
- package/dist/datacenter-redirect.d.ts.map +1 -0
- package/dist/datacenter-redirect.js +62 -0
- package/dist/domains/apps.d.ts +32 -4
- package/dist/domains/apps.d.ts.map +1 -1
- package/dist/domains/apps.js +35 -4
- package/dist/domains/controlPlane.d.ts +1 -1
- package/dist/domains/controlPlane.js +1 -1
- package/dist/domains/gameModel.d.ts +9 -1
- package/dist/domains/gameModel.d.ts.map +1 -1
- package/dist/domains/usage.d.ts +1 -1
- package/dist/domains/usage.js +1 -1
- package/dist/errors.d.ts +143 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +168 -0
- package/dist/generated/graphql.d.ts +354 -9
- package/dist/generated/graphql.d.ts.map +1 -1
- package/dist/generated/graphql.js +107 -3
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/kit/npcs.d.ts.map +1 -1
- package/dist/kit/shared.d.ts.map +1 -1
- package/dist/kit/shared.js +5 -0
- package/dist/kit/social.d.ts.map +1 -1
- package/dist/realtime.d.ts +26 -0
- package/dist/realtime.d.ts.map +1 -1
- package/dist/realtime.js +83 -0
- package/package.json +1 -1
package/MIGRATION.md
CHANGED
|
@@ -42,11 +42,13 @@ line and you are done.
|
|
|
42
42
|
An app lives in a single datacenter, and those fields name it. The identity
|
|
43
43
|
client can stay on the shared origin.
|
|
44
44
|
|
|
45
|
-
# CrowdyJS v13 — unified
|
|
45
|
+
# CrowdyJS v13 — unified API (breaking)
|
|
46
46
|
|
|
47
|
-
The platform merged the Management API and Game API into ONE server
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
The platform merged the Management API and Game API into ONE server. v13
|
|
48
|
+
landed on the galaxy database; **gameplay has since moved to PostgreSQL +
|
|
49
|
+
Citus** via `cks-game-api` (galaxy is not the game DB). v13 resyncs the
|
|
50
|
+
committed schema from the unified SDL and removes the surfaces the platform
|
|
51
|
+
retired:
|
|
50
52
|
|
|
51
53
|
- **`client.environments` (and `client.admin.environments`) removed.**
|
|
52
54
|
Dedicated customer environments no longer exist; every app runs on the
|
package/README.md
CHANGED
|
@@ -719,6 +719,49 @@ For any brand-new server field not yet wrapped, `client.graphql.request(...)`
|
|
|
719
719
|
always works. (`client.management` was removed in v14 along with the second
|
|
720
720
|
endpoint; `client.graphql` reaches every surface.)
|
|
721
721
|
|
|
722
|
+
## Maintainers: running the e2e suite
|
|
723
|
+
|
|
724
|
+
`npm run test:e2e` drives a real deployed stack, and the suites self-skip when
|
|
725
|
+
the environment is not configured, so they are safe to leave in `npm test`.
|
|
726
|
+
|
|
727
|
+
```bash
|
|
728
|
+
CROWDY_HTTP_URL='https://ck.<tier>.cp.cks-env.com' \
|
|
729
|
+
CROWDY_WS_URL='wss://ck.<tier>.cp.cks-env.com/graphql' \
|
|
730
|
+
CROWDY_OWNER_EMAIL='owner@example.com' \
|
|
731
|
+
CROWDY_TEST_APP_ID='78221653114368' \
|
|
732
|
+
npm run test:e2e
|
|
733
|
+
```
|
|
734
|
+
|
|
735
|
+
**`CROWDY_HTTP_URL` is the ENTRY origin, not the gameplay origin.** Point it at
|
|
736
|
+
the shared multivalue name (`ck.<tier>…`), the same one a cold client resolves.
|
|
737
|
+
The harness then does what the SDK is built to do: sign in and mint against the
|
|
738
|
+
entry origin, and build every gameplay client on the `gameApiUrl` /
|
|
739
|
+
`gameApiWsUrl` the mint returns, threading `discoveryUrl` into `realtime` so
|
|
740
|
+
instance loss is recoverable.
|
|
741
|
+
|
|
742
|
+
Do not point it at a single datacenter to "make the tests pass". That was the
|
|
743
|
+
old behaviour and it hid two things. A suite pinned to one datacenter never
|
|
744
|
+
exercises residency at all, so a placement regression cannot fail it. And a
|
|
745
|
+
suite that ran *gameplay* against the shared origin was testing a configuration
|
|
746
|
+
no client is ever in: the origin resolves to every datacenter's load balancer,
|
|
747
|
+
so consecutive requests from one client can be answered by different instances,
|
|
748
|
+
and because the UDP proxy connection is per-instance a subscription opened on
|
|
749
|
+
one and a mutation sent to the other never meet. That produced failures in tests
|
|
750
|
+
as simple as self-echo, which has a single client and cannot have a placement
|
|
751
|
+
problem.
|
|
752
|
+
|
|
753
|
+
`test/e2e/app-residency.test.mjs` is the suite that asserts the contract every
|
|
754
|
+
other suite now depends on — that `discovery.apps()` and `mintAppToken` name the
|
|
755
|
+
same datacenter, and that gameplay works against it. On a single-datacenter
|
|
756
|
+
environment its cross-datacenter assertions self-skip and say so, rather than
|
|
757
|
+
passing quietly.
|
|
758
|
+
|
|
759
|
+
Two endpoint shapes are both correct and are not interchangeable:
|
|
760
|
+
`appDiscovery` answers with the datacenter's load balancer (`ck-<dc>.<zone>`),
|
|
761
|
+
while `mintAppToken` under direct connect hands back one instance
|
|
762
|
+
(`ck-api-<dc>-<n>.<zone>`). They agree on the datacenter, not on the host, which
|
|
763
|
+
is why the mint also returns `discoveryUrl`.
|
|
764
|
+
|
|
722
765
|
## Maintainers: schema artifacts and fixtures
|
|
723
766
|
|
|
724
767
|
CrowdyJS is a standalone public package: a clean clone builds with
|
package/dist/client.d.ts
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
import type { TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
10
10
|
import type { SessionStore } from './session.js';
|
|
11
11
|
import type { CrowdyLogger } from './logger.js';
|
|
12
|
+
import { type DatacenterMove } from './datacenter-redirect.js';
|
|
12
13
|
import type { LbCookieStore } from './lb-cookie-store.js';
|
|
13
14
|
/**
|
|
14
15
|
* Configuration for {@link GraphQLClient}, the low-level HTTP transport. You
|
|
@@ -28,6 +29,20 @@ export interface GraphQLClientConfig {
|
|
|
28
29
|
* both are provided.
|
|
29
30
|
*/
|
|
30
31
|
graphqlEndpoint?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Called when the server refuses an operation with `WRONG_DATACENTER`, naming
|
|
34
|
+
* the endpoint the app actually lives at.
|
|
35
|
+
*
|
|
36
|
+
* Return `true` once the client has been moved and the operation is worth
|
|
37
|
+
* retrying; return `false` to leave the endpoint alone and let the original
|
|
38
|
+
* error surface. `CrowdyClient` supplies this for you and moves BOTH the HTTP
|
|
39
|
+
* endpoint and the websocket together — a client with its HTTP on one instance
|
|
40
|
+
* and its subscription on another gets no realtime traffic at all, which is the
|
|
41
|
+
* failure the sticky load-balancer cookie was invented to prevent.
|
|
42
|
+
*
|
|
43
|
+
* You only need to set this when constructing a bare {@link GraphQLClient}.
|
|
44
|
+
*/
|
|
45
|
+
onWrongDatacenter?: (move: DatacenterMove) => boolean | Promise<boolean>;
|
|
31
46
|
/**
|
|
32
47
|
* Per-request timeout in **milliseconds**. When it elapses the request is
|
|
33
48
|
* aborted and a {@link CrowdyTimeoutError} is thrown. Defaults to `60000`
|
|
@@ -74,6 +89,7 @@ export declare class GraphQLClient {
|
|
|
74
89
|
private readonly session;
|
|
75
90
|
private readonly logger;
|
|
76
91
|
private readonly lbCookieStore?;
|
|
92
|
+
private onWrongDatacenter?;
|
|
77
93
|
/**
|
|
78
94
|
* @param config - Endpoint, timeout, and logger options; see
|
|
79
95
|
* {@link GraphQLClientConfig}.
|
|
@@ -82,6 +98,15 @@ export declare class GraphQLClient {
|
|
|
82
98
|
* HTTP auth always tracks the active session.
|
|
83
99
|
*/
|
|
84
100
|
constructor(config: GraphQLClientConfig | undefined, session: SessionStore);
|
|
101
|
+
/**
|
|
102
|
+
* Install the datacenter-redirect handler after construction.
|
|
103
|
+
*
|
|
104
|
+
* `CrowdyClient` needs this because the handler has to move the websocket as
|
|
105
|
+
* well as the HTTP endpoint, and the realtime client is built AFTER the
|
|
106
|
+
* transport it is given. Passing a half-built client into its own constructor
|
|
107
|
+
* is the alternative, and it is worse.
|
|
108
|
+
*/
|
|
109
|
+
setWrongDatacenterHandler(handler: (move: DatacenterMove) => boolean | Promise<boolean>): void;
|
|
85
110
|
/**
|
|
86
111
|
* The resolved GraphQL endpoint URL this client POSTs to.
|
|
87
112
|
*
|
|
@@ -148,6 +173,8 @@ export declare class GraphQLClient {
|
|
|
148
173
|
query<T = any>(query: string, variables?: Record<string, unknown>, options?: {
|
|
149
174
|
signal?: AbortSignal;
|
|
150
175
|
}): Promise<T>;
|
|
176
|
+
/** One HTTP round trip. {@link query} wraps this to handle a redirect. */
|
|
177
|
+
private attempt;
|
|
151
178
|
}
|
|
152
179
|
/**
|
|
153
180
|
* Alias for {@link GraphQLClient}, provided so callers can refer to the HTTP
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAahD,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;I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AAO,GACrC,OAAO,CAAC,OAAO,CAAC;IASnB;;;;;;;;;;;;;;;;;;;OAmBG;IACG,KAAK,CAAC,CAAC,GAAG,GAAG,EACjB,KAAK,EAAE,MAAM,EACb,SAAS,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,EACvC,OAAO,GAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAO,GACrC,OAAO,CAAC,CAAC,CAAC;IA0Cb,0EAA0E;YAC5D,OAAO;CAyEtB;AAED;;;GAGG;AACH,OAAO,EAAE,aAAa,IAAI,gBAAgB,EAAE,CAAC"}
|
package/dist/client.js
CHANGED
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { print } from 'graphql';
|
|
10
10
|
import { silentLogger } from './logger.js';
|
|
11
|
-
import { CrowdyError, CrowdyGraphQLError, CrowdyHttpError, CrowdyNetworkError, CrowdyTimeoutError, } from './errors.js';
|
|
11
|
+
import { APP_UNAVAILABLE_CODE, CrowdyAppUnavailableError, CrowdyError, CrowdyGraphQLError, CrowdyHttpError, CrowdyNetworkError, CrowdyTimeoutError, CrowdyUserCodeFaultError, } from './errors.js';
|
|
12
|
+
import { moveFromErrors } from './datacenter-redirect.js';
|
|
12
13
|
/**
|
|
13
14
|
* Low-level HTTP transport for GraphQL operations against the game or
|
|
14
15
|
* management API. It POSTs operations to a single endpoint, attaches the
|
|
@@ -47,6 +48,18 @@ export class GraphQLClient {
|
|
|
47
48
|
this.session = session;
|
|
48
49
|
this.logger = config.logger ?? silentLogger;
|
|
49
50
|
this.lbCookieStore = config.lbCookieStore;
|
|
51
|
+
this.onWrongDatacenter = config.onWrongDatacenter;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Install the datacenter-redirect handler after construction.
|
|
55
|
+
*
|
|
56
|
+
* `CrowdyClient` needs this because the handler has to move the websocket as
|
|
57
|
+
* well as the HTTP endpoint, and the realtime client is built AFTER the
|
|
58
|
+
* transport it is given. Passing a half-built client into its own constructor
|
|
59
|
+
* is the alternative, and it is worse.
|
|
60
|
+
*/
|
|
61
|
+
setWrongDatacenterHandler(handler) {
|
|
62
|
+
this.onWrongDatacenter = handler;
|
|
50
63
|
}
|
|
51
64
|
/**
|
|
52
65
|
* The resolved GraphQL endpoint URL this client POSTs to.
|
|
@@ -117,6 +130,44 @@ export class GraphQLClient {
|
|
|
117
130
|
* timeout.
|
|
118
131
|
*/
|
|
119
132
|
async query(query, variables = {}, options = {}) {
|
|
133
|
+
try {
|
|
134
|
+
return await this.attempt(query, variables, options);
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
const move = error instanceof CrowdyGraphQLError
|
|
138
|
+
? moveFromErrors(error.graphqlErrors)
|
|
139
|
+
: null;
|
|
140
|
+
if (!move || !this.onWrongDatacenter)
|
|
141
|
+
throw error;
|
|
142
|
+
// ONE retry, and only after the endpoint actually moved.
|
|
143
|
+
//
|
|
144
|
+
// Without a retry the redirect is useless: every call would fail once and
|
|
145
|
+
// the application would have to know to repeat it, which is the SDK's job.
|
|
146
|
+
// Without the "actually moved" check it is worse than useless -- if the
|
|
147
|
+
// handler declines, or moves to where we already are, retrying re-sends to
|
|
148
|
+
// the same instance and is refused identically, forever.
|
|
149
|
+
//
|
|
150
|
+
// The retry is not itself retried. A second WRONG_DATACENTER after a
|
|
151
|
+
// successful move means two datacenters each believe the app is in the
|
|
152
|
+
// other, which is a placement problem an operator has to see rather than
|
|
153
|
+
// one a client should smooth over by looping between them.
|
|
154
|
+
let moved = false;
|
|
155
|
+
try {
|
|
156
|
+
moved = (await this.onWrongDatacenter(move)) === true;
|
|
157
|
+
}
|
|
158
|
+
catch (hookError) {
|
|
159
|
+
this.logger.warn?.('datacenter redirect handler failed; surfacing the original error', hookError);
|
|
160
|
+
throw error;
|
|
161
|
+
}
|
|
162
|
+
if (!moved)
|
|
163
|
+
throw error;
|
|
164
|
+
this.logger.info?.(`moved to ${move.appDatacenter ?? 'the app\u2019s datacenter'} at ` +
|
|
165
|
+
`${move.gameApiUrl} and retrying`);
|
|
166
|
+
return await this.attempt(query, variables, options);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
/** One HTTP round trip. {@link query} wraps this to handle a redirect. */
|
|
170
|
+
async attempt(query, variables, options) {
|
|
120
171
|
const controller = new AbortController();
|
|
121
172
|
const timeoutId = setTimeout(() => controller.abort(), this.timeout);
|
|
122
173
|
const token = this.session.getToken();
|
|
@@ -143,7 +194,23 @@ export class GraphQLClient {
|
|
|
143
194
|
}
|
|
144
195
|
const result = await response.json();
|
|
145
196
|
if (result.errors) {
|
|
146
|
-
|
|
197
|
+
const errors = result.errors;
|
|
198
|
+
// A typed subclass rather than a code an application has to remember to
|
|
199
|
+
// check. `CrowdyAppUnavailableError extends CrowdyGraphQLError`, so every
|
|
200
|
+
// existing catch keeps working and only code that WANTS to tell "your app
|
|
201
|
+
// is offline" apart from "you are not allowed" has to change.
|
|
202
|
+
if (errors.some((e) => e?.extensions?.code === APP_UNAVAILABLE_CODE)) {
|
|
203
|
+
throw new CrowdyAppUnavailableError(errors);
|
|
204
|
+
}
|
|
205
|
+
// `blame` is present only on a fault the platform has attributed — a failure
|
|
206
|
+
// inside app-authored code, or a refusal on the way into it. Detecting the
|
|
207
|
+
// ATTRIBUTION rather than a list of codes is deliberate: the server can add a
|
|
208
|
+
// code without this line, and every existing catch keeps working because the
|
|
209
|
+
// subclass still extends CrowdyGraphQLError.
|
|
210
|
+
if (errors.some((e) => typeof e?.extensions?.blame === 'string')) {
|
|
211
|
+
throw new CrowdyUserCodeFaultError(errors);
|
|
212
|
+
}
|
|
213
|
+
throw new CrowdyGraphQLError(errors);
|
|
147
214
|
}
|
|
148
215
|
return result.data;
|
|
149
216
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crowdy-client.d.ts","sourceRoot":"","sources":["../src/crowdy-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO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;;;;;;OAOG;IACH,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW;IAIjC;;;;;;;;;;;;OAYG;IACH,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,aAAa;IAS3D,gEAAgE;IAChE,KAAK,IAAI,IAAI;CAKd;AAED,wBAAgB,kBAAkB,CAChC,MAAM,GAAE,kBAAuB,GAC9B,YAAY,CAEd"}
|
package/dist/crowdy-client.js
CHANGED
|
@@ -130,6 +130,31 @@ export class CrowdyClient {
|
|
|
130
130
|
}
|
|
131
131
|
: {}),
|
|
132
132
|
}, this.session, this.metrics);
|
|
133
|
+
// The redirect handler is installed here rather than passed into the
|
|
134
|
+
// transport's constructor because it has to move the REALTIME client too, and
|
|
135
|
+
// that does not exist yet at the point the transport is built.
|
|
136
|
+
//
|
|
137
|
+
// Both sides in one step, for the reason spelled out on `onEndpointMove`
|
|
138
|
+
// above: a client with its HTTP in one datacenter and its subscription in
|
|
139
|
+
// another looks connected and receives nothing, and here it is worse than the
|
|
140
|
+
// instance-level version of that split, because the datacenter left behind
|
|
141
|
+
// holds none of the app's shards and would refuse the subscription too.
|
|
142
|
+
this.graphql.setWrongDatacenterHandler((move) => {
|
|
143
|
+
const endpoint = toGraphqlEndpoint(move.gameApiUrl, 'graphql') ?? move.gameApiUrl;
|
|
144
|
+
if (endpoint === this.graphql.getEndpoint()) {
|
|
145
|
+
// Already there. Returning false stops the transport retrying, because a
|
|
146
|
+
// retry to the same instance is refused identically and a handler that
|
|
147
|
+
// reported success here would loop.
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
this.graphql.setEndpoint(endpoint);
|
|
151
|
+
this.realtime.moveToDatacenter({
|
|
152
|
+
httpUrl: move.gameApiUrl,
|
|
153
|
+
wsUrl: toGraphqlEndpoint(move.gameApiWsUrl, 'graphql') ?? null,
|
|
154
|
+
datacenter: move.appDatacenter,
|
|
155
|
+
});
|
|
156
|
+
return true;
|
|
157
|
+
});
|
|
133
158
|
this.auth = new AuthAPI(this.graphql, this.session);
|
|
134
159
|
this.users = new UsersAPI(this.graphql);
|
|
135
160
|
this.apps = new AppsAPI(this.graphql);
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reading a datacenter move out of a GraphQL error, in one place.
|
|
3
|
+
*
|
|
4
|
+
* WHY THIS IS ITS OWN MODULE. The server can raise `WRONG_DATACENTER` on three
|
|
5
|
+
* different transports — an HTTP POST, a websocket mutation, and a subscription —
|
|
6
|
+
* and they surface as three different error types (`CrowdyGraphQLError` and two
|
|
7
|
+
* shapes of `CrowdyRealtimeError`). The decision "is this a move, and where to" is
|
|
8
|
+
* identical in all three, and it is exactly the kind of small predicate that grows
|
|
9
|
+
* a second, slightly different copy the first time somebody fixes a bug in one of
|
|
10
|
+
* them.
|
|
11
|
+
*
|
|
12
|
+
* WHAT THE SERVER GUARANTEES, and what this therefore checks. A `WRONG_DATACENTER`
|
|
13
|
+
* always names an endpoint; an `APP_UNAVAILABLE` never does, because there is
|
|
14
|
+
* nowhere to send the client. So a "move" here means BOTH the code and a usable
|
|
15
|
+
* URL. A `WRONG_DATACENTER` with no URL is a server that has changed its mind
|
|
16
|
+
* about the contract, and the safe reading is "do not move" rather than "move to
|
|
17
|
+
* undefined".
|
|
18
|
+
*/
|
|
19
|
+
/** Where the server says this client should go instead. */
|
|
20
|
+
export interface DatacenterMove {
|
|
21
|
+
/** Absolute HTTP origin or GraphQL URL of the app's own datacenter. */
|
|
22
|
+
gameApiUrl: string;
|
|
23
|
+
/** Matching websocket URL, when the server named one. */
|
|
24
|
+
gameApiWsUrl?: string;
|
|
25
|
+
/** The app the move is about, for logging. */
|
|
26
|
+
appId?: string;
|
|
27
|
+
/** The datacenter being moved to, for logging. */
|
|
28
|
+
appDatacenter?: string;
|
|
29
|
+
}
|
|
30
|
+
interface ErrorLike {
|
|
31
|
+
extensions?: Record<string, unknown> | null;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The move a single GraphQL error asks for, or null if it is not asking for one.
|
|
35
|
+
*
|
|
36
|
+
* @param error An entry from a GraphQL `errors[]` array.
|
|
37
|
+
*/
|
|
38
|
+
export declare function moveFromError(error: ErrorLike | null | undefined): DatacenterMove | null;
|
|
39
|
+
/**
|
|
40
|
+
* The first move asked for anywhere in a GraphQL `errors[]` array.
|
|
41
|
+
*
|
|
42
|
+
* Scans the whole array rather than reading `errors[0]`, because a query naming
|
|
43
|
+
* several apps is refused per app and the misrouted one need not be first — and
|
|
44
|
+
* a client that only inspected the first error would ignore a redirect that was
|
|
45
|
+
* sitting right there.
|
|
46
|
+
*/
|
|
47
|
+
export declare function moveFromErrors(errors: readonly (ErrorLike | null | undefined)[] | null | undefined): DatacenterMove | null;
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=datacenter-redirect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datacenter-redirect.d.ts","sourceRoot":"","sources":["../src/datacenter-redirect.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,2DAA2D;AAC3D,MAAM,WAAW,cAAc;IAC7B,uEAAuE;IACvE,UAAU,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8CAA8C;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,SAAS;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CAC7C;AAMD;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,GAClC,cAAc,GAAG,IAAI,CAiBvB;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,SAAS,CAAC,SAAS,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,GAAG,IAAI,GAAG,SAAS,GACnE,cAAc,GAAG,IAAI,CAMvB"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reading a datacenter move out of a GraphQL error, in one place.
|
|
3
|
+
*
|
|
4
|
+
* WHY THIS IS ITS OWN MODULE. The server can raise `WRONG_DATACENTER` on three
|
|
5
|
+
* different transports — an HTTP POST, a websocket mutation, and a subscription —
|
|
6
|
+
* and they surface as three different error types (`CrowdyGraphQLError` and two
|
|
7
|
+
* shapes of `CrowdyRealtimeError`). The decision "is this a move, and where to" is
|
|
8
|
+
* identical in all three, and it is exactly the kind of small predicate that grows
|
|
9
|
+
* a second, slightly different copy the first time somebody fixes a bug in one of
|
|
10
|
+
* them.
|
|
11
|
+
*
|
|
12
|
+
* WHAT THE SERVER GUARANTEES, and what this therefore checks. A `WRONG_DATACENTER`
|
|
13
|
+
* always names an endpoint; an `APP_UNAVAILABLE` never does, because there is
|
|
14
|
+
* nowhere to send the client. So a "move" here means BOTH the code and a usable
|
|
15
|
+
* URL. A `WRONG_DATACENTER` with no URL is a server that has changed its mind
|
|
16
|
+
* about the contract, and the safe reading is "do not move" rather than "move to
|
|
17
|
+
* undefined".
|
|
18
|
+
*/
|
|
19
|
+
import { WRONG_DATACENTER_CODE } from './errors.js';
|
|
20
|
+
function asString(value) {
|
|
21
|
+
return typeof value === 'string' && value.trim() ? value.trim() : undefined;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The move a single GraphQL error asks for, or null if it is not asking for one.
|
|
25
|
+
*
|
|
26
|
+
* @param error An entry from a GraphQL `errors[]` array.
|
|
27
|
+
*/
|
|
28
|
+
export function moveFromError(error) {
|
|
29
|
+
const extensions = error?.extensions;
|
|
30
|
+
if (!extensions)
|
|
31
|
+
return null;
|
|
32
|
+
if (extensions.code !== WRONG_DATACENTER_CODE)
|
|
33
|
+
return null;
|
|
34
|
+
const gameApiUrl = asString(extensions.gameApiUrl);
|
|
35
|
+
// No endpoint means no move. See the note at the top: this is a contract
|
|
36
|
+
// violation rather than an ordinary case, and guessing would send the client
|
|
37
|
+
// somewhere it was not told to go.
|
|
38
|
+
if (!gameApiUrl)
|
|
39
|
+
return null;
|
|
40
|
+
return {
|
|
41
|
+
gameApiUrl,
|
|
42
|
+
gameApiWsUrl: asString(extensions.gameApiWsUrl),
|
|
43
|
+
appId: asString(extensions.appId),
|
|
44
|
+
appDatacenter: asString(extensions.appDatacenter),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The first move asked for anywhere in a GraphQL `errors[]` array.
|
|
49
|
+
*
|
|
50
|
+
* Scans the whole array rather than reading `errors[0]`, because a query naming
|
|
51
|
+
* several apps is refused per app and the misrouted one need not be first — and
|
|
52
|
+
* a client that only inspected the first error would ignore a redirect that was
|
|
53
|
+
* sitting right there.
|
|
54
|
+
*/
|
|
55
|
+
export function moveFromErrors(errors) {
|
|
56
|
+
for (const error of errors ?? []) {
|
|
57
|
+
const move = moveFromError(error);
|
|
58
|
+
if (move)
|
|
59
|
+
return move;
|
|
60
|
+
}
|
|
61
|
+
return null;
|
|
62
|
+
}
|
package/dist/domains/apps.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GraphQLClient } from '../client.js';
|
|
2
|
-
import { type AppQuery, type AppBySlugQuery, type MyAppsQuery, type AppsForOrgQuery, type MarketplaceAppsQuery, type MarketplaceAppsQueryVariables, type AppsConnectionQuery, type AppsConnectionQueryVariables, type CreateAppMutation, type UpdateAppMutation, type ArchiveAppMutation, type SetAppVisibilityMutation, type AppCodeAdmissionModeQuery, type AppCodeAdmissionsQuery, type SetAppCodeAdmissionModeMutation, type AdmitAppCodeMutation, type RevokeAppCodeAdmissionMutation, type CreateAppInput, type UpdateAppInput, type AdmitAppCodeInput, type AppVisibility, type CodeAdmissionMode } from '../generated/graphql.js';
|
|
2
|
+
import { type AppQuery, type AppBySlugQuery, type MyAppsQuery, type AppsForOrgQuery, type MarketplaceAppsQuery, type MarketplaceAppsQueryVariables, type AppsConnectionQuery, type AppsConnectionQueryVariables, type CreateAppMutation, type UpdateAppMutation, type ArchiveAppMutation, type SetAppVisibilityMutation, type AppCodeAdmissionModeQuery, type AppCodeAdmissionsQuery, type SetAppCodeAdmissionModeMutation, type AdmitAppCodeMutation, type RevokeAppCodeAdmissionMutation, type PlaceableDatacentersQuery, type CreateAppInput, type UpdateAppInput, type AdmitAppCodeInput, type AppVisibility, type CodeAdmissionMode } from '../generated/graphql.js';
|
|
3
3
|
/**
|
|
4
4
|
* The minimal routing tuple the SDK derives from an `App` row: just enough to
|
|
5
5
|
* decide which game-api endpoint should serve a given app. Returned by
|
|
@@ -172,15 +172,43 @@ export declare class AppsAPI {
|
|
|
172
172
|
* @returns An apps connection.
|
|
173
173
|
*/
|
|
174
174
|
marketplaceConnection(args?: AppsConnectionQueryVariables): Promise<AppsConnectionQuery['appsConnection']>;
|
|
175
|
+
/**
|
|
176
|
+
* The datacenters this deployment can create an app in.
|
|
177
|
+
*
|
|
178
|
+
* Call this before {@link create}. `datacenter` is required and permanent: an
|
|
179
|
+
* app is distributed on its app id, so everything it stores lives in one
|
|
180
|
+
* datacenter for the life of the app, and there is no default that could be
|
|
181
|
+
* right — the instance answering a call on the shared origin is whichever one
|
|
182
|
+
* DNS picked.
|
|
183
|
+
*
|
|
184
|
+
* Offer only entries with `placeable === true`. A datacenter that is known and
|
|
185
|
+
* unplaceable holds no capacity for a new app, and {@link create} will refuse
|
|
186
|
+
* it. An entry that is placeable and reports `serving: 'NOT_SERVING'` will hold
|
|
187
|
+
* the app fine; its players cannot connect until an instance is back.
|
|
188
|
+
*
|
|
189
|
+
* An EMPTY `datacenters` list means no topology has been pushed to this
|
|
190
|
+
* deployment and app creation is unavailable — an operator problem, not a
|
|
191
|
+
* caller one. `placementEnforced: false` is a single-node deployment (a
|
|
192
|
+
* developer machine), where the one entry returned is a formality.
|
|
193
|
+
*
|
|
194
|
+
* @returns The choices, plus `placementEnforced` and `servedBy`.
|
|
195
|
+
* @throws {CrowdyGraphQLError} `UNAUTHENTICATED` without a session.
|
|
196
|
+
*/
|
|
197
|
+
placeableDatacenters(): Promise<PlaceableDatacentersQuery['placeableDatacenters']>;
|
|
175
198
|
/**
|
|
176
199
|
* Create a new app under an organization. Requires the `manage_apps` org
|
|
177
200
|
* permission. The new app auto-provisions an open-by-default access tier.
|
|
178
201
|
*
|
|
179
|
-
* @param input - {@link CreateAppInput}: `orgId`, `name`, `slug`,
|
|
180
|
-
* `description`/`visibility`/`metadata`.
|
|
202
|
+
* @param input - {@link CreateAppInput}: `orgId`, `name`, `slug`,
|
|
203
|
+
* `datacenter`, optional `description`/`visibility`/`metadata`.
|
|
204
|
+
* `datacenter` is REQUIRED and permanent — read the accepted codes from
|
|
205
|
+
* {@link placeableDatacenters} rather than hard-coding one, since they are a
|
|
206
|
+
* property of the deployment.
|
|
181
207
|
* @returns The created {@link App}.
|
|
182
208
|
* @throws {CrowdyGraphQLError} `FORBIDDEN`/`SCOPE_MISSING` without
|
|
183
|
-
* `manage_apps`, or `BAD_USER_INPUT` (e.g. duplicate slug
|
|
209
|
+
* `manage_apps`, or `BAD_USER_INPUT` (e.g. duplicate slug, or a datacenter
|
|
210
|
+
* this deployment cannot place an app in — the message names the ones it
|
|
211
|
+
* can).
|
|
184
212
|
*/
|
|
185
213
|
create(input: CreateAppInput): Promise<CreateAppMutation['createApp']>;
|
|
186
214
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../src/domains/apps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,
|
|
1
|
+
{"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../src/domains/apps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAA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,CAAC,sBAAsB,CAAC,CAClD;IAKD;;;;;;;;;;;;;;OAcG;IACG,MAAM,CACV,KAAK,EAAE,cAAc,GACpB,OAAO,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;IAK1C;;;;;;;;OAQG;IACG,MAAM,CACV,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,cAAc,GACpB,OAAO,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;IAQ1C;;;;;;;OAOG;IACG,OAAO,CACX,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;IAK5C;;;;;;;OAOG;IACG,aAAa,CACjB,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,aAAa,GACxB,OAAO,CAAC,wBAAwB,CAAC,kBAAkB,CAAC,CAAC;CAOzD"}
|
package/dist/domains/apps.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppDocument, AppBySlugDocument, MyAppsDocument, AppsForOrgDocument, MarketplaceAppsDocument, AppsConnectionDocument, CreateAppDocument, UpdateAppDocument, ArchiveAppDocument, SetAppVisibilityDocument, AppCodeAdmissionModeDocument, AppCodeAdmissionsDocument, SetAppCodeAdmissionModeDocument, AdmitAppCodeDocument, RevokeAppCodeAdmissionDocument, } from '../generated/graphql.js';
|
|
1
|
+
import { AppDocument, AppBySlugDocument, MyAppsDocument, AppsForOrgDocument, MarketplaceAppsDocument, AppsConnectionDocument, CreateAppDocument, UpdateAppDocument, ArchiveAppDocument, SetAppVisibilityDocument, AppCodeAdmissionModeDocument, AppCodeAdmissionsDocument, SetAppCodeAdmissionModeDocument, AdmitAppCodeDocument, RevokeAppCodeAdmissionDocument, PlaceableDatacentersDocument, } from '../generated/graphql.js';
|
|
2
2
|
function appRouteFromAppRow(row) {
|
|
3
3
|
if (!row || typeof row !== 'object')
|
|
4
4
|
return null;
|
|
@@ -204,15 +204,46 @@ export class AppsAPI {
|
|
|
204
204
|
const data = await this.api.request(AppsConnectionDocument, args);
|
|
205
205
|
return data.appsConnection;
|
|
206
206
|
}
|
|
207
|
+
/**
|
|
208
|
+
* The datacenters this deployment can create an app in.
|
|
209
|
+
*
|
|
210
|
+
* Call this before {@link create}. `datacenter` is required and permanent: an
|
|
211
|
+
* app is distributed on its app id, so everything it stores lives in one
|
|
212
|
+
* datacenter for the life of the app, and there is no default that could be
|
|
213
|
+
* right — the instance answering a call on the shared origin is whichever one
|
|
214
|
+
* DNS picked.
|
|
215
|
+
*
|
|
216
|
+
* Offer only entries with `placeable === true`. A datacenter that is known and
|
|
217
|
+
* unplaceable holds no capacity for a new app, and {@link create} will refuse
|
|
218
|
+
* it. An entry that is placeable and reports `serving: 'NOT_SERVING'` will hold
|
|
219
|
+
* the app fine; its players cannot connect until an instance is back.
|
|
220
|
+
*
|
|
221
|
+
* An EMPTY `datacenters` list means no topology has been pushed to this
|
|
222
|
+
* deployment and app creation is unavailable — an operator problem, not a
|
|
223
|
+
* caller one. `placementEnforced: false` is a single-node deployment (a
|
|
224
|
+
* developer machine), where the one entry returned is a formality.
|
|
225
|
+
*
|
|
226
|
+
* @returns The choices, plus `placementEnforced` and `servedBy`.
|
|
227
|
+
* @throws {CrowdyGraphQLError} `UNAUTHENTICATED` without a session.
|
|
228
|
+
*/
|
|
229
|
+
async placeableDatacenters() {
|
|
230
|
+
const data = await this.api.request(PlaceableDatacentersDocument, {});
|
|
231
|
+
return data.placeableDatacenters;
|
|
232
|
+
}
|
|
207
233
|
/**
|
|
208
234
|
* Create a new app under an organization. Requires the `manage_apps` org
|
|
209
235
|
* permission. The new app auto-provisions an open-by-default access tier.
|
|
210
236
|
*
|
|
211
|
-
* @param input - {@link CreateAppInput}: `orgId`, `name`, `slug`,
|
|
212
|
-
* `description`/`visibility`/`metadata`.
|
|
237
|
+
* @param input - {@link CreateAppInput}: `orgId`, `name`, `slug`,
|
|
238
|
+
* `datacenter`, optional `description`/`visibility`/`metadata`.
|
|
239
|
+
* `datacenter` is REQUIRED and permanent — read the accepted codes from
|
|
240
|
+
* {@link placeableDatacenters} rather than hard-coding one, since they are a
|
|
241
|
+
* property of the deployment.
|
|
213
242
|
* @returns The created {@link App}.
|
|
214
243
|
* @throws {CrowdyGraphQLError} `FORBIDDEN`/`SCOPE_MISSING` without
|
|
215
|
-
* `manage_apps`, or `BAD_USER_INPUT` (e.g. duplicate slug
|
|
244
|
+
* `manage_apps`, or `BAD_USER_INPUT` (e.g. duplicate slug, or a datacenter
|
|
245
|
+
* this deployment cannot place an app in — the message names the ones it
|
|
246
|
+
* can).
|
|
216
247
|
*/
|
|
217
248
|
async create(input) {
|
|
218
249
|
const data = await this.api.request(CreateAppDocument, { input });
|
|
@@ -3,7 +3,7 @@ import { type CpComputePlatformCeilingsQuery, type CpSetComputePlatformCeilingsM
|
|
|
3
3
|
/**
|
|
4
4
|
* Operator (platform-policy) surface — exposed as `client.operator`.
|
|
5
5
|
*
|
|
6
|
-
* As of the unified
|
|
6
|
+
* As of the v13 unified API this surface is reduced to the platform-wide
|
|
7
7
|
* compute ceilings: dedicated customer environments were retired, and the
|
|
8
8
|
* infrastructure control plane (environments, change orders, secrets, release
|
|
9
9
|
* management, audit) moved to the separate infra-control-plane service with
|
|
@@ -2,7 +2,7 @@ import { CpComputePlatformCeilingsDocument, CpSetComputePlatformCeilingsDocument
|
|
|
2
2
|
/**
|
|
3
3
|
* Operator (platform-policy) surface — exposed as `client.operator`.
|
|
4
4
|
*
|
|
5
|
-
* As of the unified
|
|
5
|
+
* As of the v13 unified API this surface is reduced to the platform-wide
|
|
6
6
|
* compute ceilings: dedicated customer environments were retired, and the
|
|
7
7
|
* infrastructure control plane (environments, change orders, secrets, release
|
|
8
8
|
* management, audit) moved to the separate infra-control-plane service with
|
|
@@ -73,7 +73,15 @@ import { type GameModelCreateSessionMutation, type GameModelCreateSessionMutatio
|
|
|
73
73
|
* selfContainerId,
|
|
74
74
|
* paramsJson: JSON.stringify({ amount: 10 }),
|
|
75
75
|
* });
|
|
76
|
-
*
|
|
76
|
+
* // Authority and evaluation failures do NOT throw — they come back in band, because
|
|
77
|
+
* // the result still carries an event id and any writes that did apply.
|
|
78
|
+
* const fault = playerFaultOf(result);
|
|
79
|
+
* if (fault) {
|
|
80
|
+
* // `fault.blame` is the platform's attribution: AUTHOR (this app's code), PLATFORM
|
|
81
|
+
* // (ours) or BUDGET (an allowance). Choose your own wording — the server no longer
|
|
82
|
+
* // sends engine text, deliberately.
|
|
83
|
+
* if (fault.retryable) scheduleRetry();
|
|
84
|
+
* }
|
|
77
85
|
* ```
|
|
78
86
|
*/
|
|
79
87
|
/** One container-change push from {@link GameModelAPI.containerChanged}. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gameModel.d.ts","sourceRoot":"","sources":["../../src/domains/gameModel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAIlD,OAAO,EAGL,KAAK,8BAA8B,EACnC,KAAK,uCAAuC,EAE5C,KAAK,4BAA4B,EACjC,KAAK,qCAAqC,EAE1C,KAAK,+BAA+B,EACpC,KAAK,wCAAwC,EAE7C,KAAK,gCAAgC,EACrC,KAAK,yCAAyC,EAE9C,KAAK,gCAAgC,EACrC,KAAK,yCAAyC,EAE9C,KAAK,4BAA4B,EACjC,KAAK,qCAAqC,EAE1C,KAAK,wBAAwB,EAC7B,KAAK,iCAAiC,EAEtC,KAAK,2BAA2B,EAChC,KAAK,oCAAoC,EAEzC,KAAK,uBAAuB,EAC5B,KAAK,gCAAgC,EAErC,KAAK,uBAAuB,EAC5B,KAAK,gCAAgC,EAErC,qCAAqC,EACrC,8CAA8C,EAE9C,KAAK,+BAA+B,EACpC,KAAK,wCAAwC,EAE7C,KAAK,6CAA6C,EAClD,KAAK,sDAAsD,EAE3D,KAAK,wBAAwB,EAC7B,KAAK,iCAAiC,EAEtC,KAAK,4BAA4B,EACjC,KAAK,qCAAqC,EAE1C,KAAK,sBAAsB,EAC3B,KAAK,+BAA+B,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