@crowdedkingdoms/crowdyjs 13.9.0 → 14.1.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/MIGRATION.md +44 -0
- package/README.md +68 -33
- package/dist/binary-relay.d.ts +1 -1
- package/dist/binary-relay.js +1 -1
- package/dist/client.d.ts +27 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +61 -2
- package/dist/crowdy-client.d.ts +29 -34
- package/dist/crowdy-client.d.ts.map +1 -1
- package/dist/crowdy-client.js +67 -40
- 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/appAccess.d.ts +3 -3
- package/dist/domains/appAccess.d.ts.map +1 -1
- package/dist/domains/appAccess.js +16 -16
- package/dist/domains/apps.d.ts +4 -8
- package/dist/domains/apps.d.ts.map +1 -1
- package/dist/domains/apps.js +19 -23
- package/dist/domains/auth.d.ts +1 -1
- package/dist/domains/billing.d.ts +3 -3
- package/dist/domains/billing.d.ts.map +1 -1
- package/dist/domains/billing.js +9 -9
- package/dist/domains/controlPlane.d.ts +2 -2
- package/dist/domains/controlPlane.d.ts.map +1 -1
- package/dist/domains/controlPlane.js +4 -4
- package/dist/domains/discovery.d.ts +50 -0
- package/dist/domains/discovery.d.ts.map +1 -0
- package/dist/domains/discovery.js +35 -0
- package/dist/domains/marketplace.d.ts +4 -5
- package/dist/domains/marketplace.d.ts.map +1 -1
- package/dist/domains/marketplace.js +25 -26
- package/dist/domains/organizations.d.ts +3 -3
- package/dist/domains/organizations.d.ts.map +1 -1
- package/dist/domains/organizations.js +22 -22
- package/dist/domains/payments.d.ts +3 -3
- package/dist/domains/payments.d.ts.map +1 -1
- package/dist/domains/payments.js +11 -11
- package/dist/domains/platform.d.ts +5 -6
- package/dist/domains/platform.d.ts.map +1 -1
- package/dist/domains/platform.js +6 -7
- package/dist/domains/portal.d.ts +19 -2
- package/dist/domains/portal.d.ts.map +1 -1
- package/dist/domains/portal.js +12 -12
- package/dist/domains/quotas.d.ts +3 -3
- package/dist/domains/quotas.d.ts.map +1 -1
- package/dist/domains/quotas.js +8 -8
- package/dist/domains/serverStatus.d.ts +1 -2
- package/dist/domains/serverStatus.d.ts.map +1 -1
- package/dist/domains/serverStatus.js +1 -2
- package/dist/domains/sharedEnvironment.d.ts +3 -3
- package/dist/domains/sharedEnvironment.d.ts.map +1 -1
- package/dist/domains/sharedEnvironment.js +15 -15
- package/dist/domains/udp.d.ts +1 -1
- package/dist/domains/udp.js +1 -1
- package/dist/domains/usage.d.ts +2 -2
- package/dist/domains/usage.d.ts.map +1 -1
- package/dist/domains/usage.js +5 -5
- package/dist/domains/users.d.ts +1 -1
- package/dist/domains/users.js +1 -1
- package/dist/errors.d.ts +56 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +64 -0
- package/dist/generated/graphql.d.ts +65 -16
- package/dist/generated/graphql.d.ts.map +1 -1
- package/dist/generated/graphql.js +1 -0
- package/dist/index.d.ts +13 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -17
- package/dist/kit/decks.d.ts +1 -1
- package/dist/kit/npcs.d.ts +2 -2
- package/dist/kit/npcs.d.ts.map +1 -1
- package/dist/kit/social.d.ts.map +1 -1
- package/dist/kit/worldsim.d.ts +1 -1
- package/dist/realtime.d.ts +26 -0
- package/dist/realtime.d.ts.map +1 -1
- package/dist/realtime.js +83 -0
- package/dist/rediscover.d.ts +7 -3
- package/dist/rediscover.d.ts.map +1 -1
- package/dist/rediscover.js +7 -3
- package/dist/session.d.ts +21 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +23 -0
- package/package.json +1 -1
|
@@ -641,6 +641,7 @@ export const RuntimePermissionsDocument = { "kind": "Document", "definitions": [
|
|
|
641
641
|
export const UpdateAccessTierDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdateAccessTier" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "tierId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "BigInt" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "UpdateAccessTierInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "updateAccessTier" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "tierId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "tierId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "tierId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "appId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "tierOrder" } }, { "kind": "Field", "name": { "kind": "Name", "value": "isFree" } }, { "kind": "Field", "name": { "kind": "Name", "value": "isDefault" } }, { "kind": "Field", "name": { "kind": "Name", "value": "priceCents" } }, { "kind": "Field", "name": { "kind": "Name", "value": "currency" } }, { "kind": "Field", "name": { "kind": "Name", "value": "billingPeriod" } }, { "kind": "Field", "name": { "kind": "Name", "value": "description" } }, { "kind": "Field", "name": { "kind": "Name", "value": "permissionKeys" } }, { "kind": "Field", "name": { "kind": "Name", "value": "status" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }] } }] } }] };
|
|
642
642
|
export const AppDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "App" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "appId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "BigInt" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "app" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "appId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "appId" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "appId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "orgId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "slug" } }, { "kind": "Field", "name": { "kind": "Name", "value": "description" } }, { "kind": "Field", "name": { "kind": "Name", "value": "visibility" } }, { "kind": "Field", "name": { "kind": "Name", "value": "status" } }, { "kind": "Field", "name": { "kind": "Name", "value": "metadata" } }, { "kind": "Field", "name": { "kind": "Name", "value": "splitMode" } }, { "kind": "Field", "name": { "kind": "Name", "value": "deploymentTarget" } }, { "kind": "Field", "name": { "kind": "Name", "value": "runtimeStatus" } }, { "kind": "Field", "name": { "kind": "Name", "value": "runtimeDenialReason" } }, { "kind": "Field", "name": { "kind": "Name", "value": "gameApiUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "createdAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "org" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "orgId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "slug" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }] } }] } }] };
|
|
643
643
|
export const AppBySlugDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "AppBySlug" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "orgSlug" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "appSlug" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "appBySlug" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "orgSlug" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "orgSlug" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "appSlug" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "appSlug" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "appId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "orgId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "slug" } }, { "kind": "Field", "name": { "kind": "Name", "value": "description" } }, { "kind": "Field", "name": { "kind": "Name", "value": "visibility" } }, { "kind": "Field", "name": { "kind": "Name", "value": "status" } }, { "kind": "Field", "name": { "kind": "Name", "value": "metadata" } }, { "kind": "Field", "name": { "kind": "Name", "value": "splitMode" } }, { "kind": "Field", "name": { "kind": "Name", "value": "gameApiUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "createdAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "org" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "orgId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "slug" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }] } }] } }] };
|
|
644
|
+
export const AppDiscoveryDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "AppDiscovery" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "appIds" } }, "type": { "kind": "NonNullType", "type": { "kind": "ListType", "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "BigInt" } } } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "appDiscovery" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "appIds" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "appIds" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "appId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "datacenterCode" } }, { "kind": "Field", "name": { "kind": "Name", "value": "gameApiUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "gameApiWsUrl" } }] } }] } }] };
|
|
644
645
|
export const AppsForOrgDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "AppsForOrg" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "orgSlug" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "appsForOrg" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "orgSlug" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "orgSlug" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "appId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "orgId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "slug" } }, { "kind": "Field", "name": { "kind": "Name", "value": "description" } }, { "kind": "Field", "name": { "kind": "Name", "value": "visibility" } }, { "kind": "Field", "name": { "kind": "Name", "value": "status" } }, { "kind": "Field", "name": { "kind": "Name", "value": "metadata" } }, { "kind": "Field", "name": { "kind": "Name", "value": "splitMode" } }, { "kind": "Field", "name": { "kind": "Name", "value": "gameApiUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "createdAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }] } }] } }] };
|
|
645
646
|
export const ArchiveAppDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "ArchiveApp" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "appId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "BigInt" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "archiveApp" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "appId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "appId" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "appId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "status" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }] } }] } }] };
|
|
646
647
|
export const AppCodeAdmissionModeDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "AppCodeAdmissionMode" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "appId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "BigInt" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "appCodeAdmissionMode" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "appId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "appId" } } }] }] } }] };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CrowdyJS SDK — client SDK for Crowded Kingdoms.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* - `cks-game-api` for everything game-side (`client.chunks`,
|
|
10
|
-
* `client.voxels`, `client.actors`, `client.teleport`, `client.state`,
|
|
11
|
-
* `client.serverStatus`, `client.udp`).
|
|
4
|
+
* The SDK targets ONE GraphQL endpoint behind a single `CrowdyClient`. Identity
|
|
5
|
+
* (`client.auth`, `client.users`, `client.portal`) and everything game-side
|
|
6
|
+
* (`client.chunks`, `client.voxels`, `client.actors`, `client.teleport`,
|
|
7
|
+
* `client.state`, `client.serverStatus`, `client.udp`) are surfaces of the same
|
|
8
|
+
* API. `managementUrl` was removed in v14 — see MIGRATION.md.
|
|
12
9
|
*
|
|
13
10
|
* Authentication is **passwordless** (as of v8): sign in with an emailed magic
|
|
14
11
|
* link, a federated social provider, or — in dev — the dev bypass. The returned
|
|
@@ -21,9 +18,8 @@
|
|
|
21
18
|
* import { CrowdyClient } from '@crowdedkingdoms/crowdyjs';
|
|
22
19
|
*
|
|
23
20
|
* const client = new CrowdyClient({
|
|
24
|
-
* httpUrl: 'https://
|
|
25
|
-
* wsUrl: 'wss://
|
|
26
|
-
* managementUrl: 'https://dev-management-api.crowdedkingdoms.com',
|
|
21
|
+
* httpUrl: 'https://api.crowdedkingdoms.com/graphql',
|
|
22
|
+
* wsUrl: 'wss://api.crowdedkingdoms.com/graphql',
|
|
27
23
|
* });
|
|
28
24
|
*
|
|
29
25
|
* // passwordless sign-in (magic link): emails a one-time link
|
|
@@ -32,7 +28,7 @@
|
|
|
32
28
|
* const { user } = await client.auth.completeLoginLink(tokenFromUrl);
|
|
33
29
|
* const me = await client.users.me();
|
|
34
30
|
*
|
|
35
|
-
* As of v6 the SDK wraps the **full** public surface
|
|
31
|
+
* As of v6 the SDK wraps the **full** public API surface, namespaced
|
|
36
32
|
* by audience: the game-client surface (`auth`, `users`, `udp`, `world`,
|
|
37
33
|
* `chunks`/`voxels`/`actors`/`avatars`/`state`/`teleport`/`channels`/`teams`/
|
|
38
34
|
* `gameModel`/`host`), the privileged studio-admin surface grouped under
|
|
@@ -45,7 +41,7 @@
|
|
|
45
41
|
* or internal tooling, never an untrusted browser.
|
|
46
42
|
*/
|
|
47
43
|
/** The published package version. Mirrors `package.json`. */
|
|
48
|
-
export declare const VERSION = "
|
|
44
|
+
export declare const VERSION = "14.1.0";
|
|
49
45
|
export { LbCookieStore } from './lb-cookie-store.js';
|
|
50
46
|
export { CrowdyClient, createCrowdyClient, type CrowdyClientConfig, } from './crowdy-client.js';
|
|
51
47
|
export { BrowserLocalStorageTokenStore, SessionStore, type SessionListener, type TokenStore, } from './session.js';
|
|
@@ -57,7 +53,9 @@ export { RealtimeMetrics, payloadBytesOf, type RealtimeMetricsCounters, type Rea
|
|
|
57
53
|
export { WorldClient, ActorClient, type ActorOptions } from './world.js';
|
|
58
54
|
export { CombatKit, DecksKit, EconomyKit, DirectorKit, EngineDetector, FeaturesKit, GameKitClient, InventoryKit, LeaderboardsKit, InstancesKit, LootKit, MarketKit, MatchesKit, AbilitiesKit, LiveopsKit, MovementKit, RacingKit, TerritoryKit, ModerationKit, TelemetryKit, telemetryBlueprint, MatchmakingKit, MinigamesKit, MobsKit, NpcsKit, ObjectsKit, PetsKit, PlotsKit, ProgressionKit, QuestsKit, SocialKit, WorldsimKit, EVENT_CONTACT_DAMAGE, EVENT_ABILITY, EVENT_CONTROL_POINT, EVENT_MOVEMENT_VIOLATION, EVENT_PROPOSAL, EVENT_RACE_TIMING, EVENT_ZONE_CHANGE, EVENT_SCORE, EVENT_TURN, EVENT_WEATHER, FLAG_GROUNDED, FLAG_MOB, FLAG_NPC, FLAG_RESERVED3, POSE_BYTES, decodeEnginePose, encodeEnginePose, engineLanes, enginePoseCodec, parseContactDamage, parseEngineEvent, parseAbilityEvent, parseControlPointEvent, parseMovementViolation, parseProposalEvent, parseRaceTimingEvent, parseScoreEvent, parseTurnEvent, parseWeatherEvent, poseSuffix, andPolicies, combatBlueprint, combatNames, composeBlueprints, decksBlueprint, decksNames, economyBlueprint, economyCurrencyFn, economyNames, featureGate, guildBlueprint, guildNames, inventoryBarterFunctionName, inventoryBlueprint, inventoryCraftFunctionName, inventoryNames, isKitVerdictError, kitInvoke, kitPolicyJson, runOptimisticAction, type OptimisticActionOutcome, type OptimisticActionSpec, leaderboardsBlueprint, leaderboardsNames, lockBlueprint, lockNames, lootBlueprint, lootNames, lootRollFn, liveopsBlueprint, liveopsNames, moderationBlueprint, moderationNames, matchesBlueprint, matchesNames, turnExpired, mergeBlueprints, npcBehaviorFunctionName, npcBlueprint, ownerEqualsCaller, ownerMirrorProperty, ownerEquals, plotBlueprint, plotNames, progressionBlueprint, progressionNames, questsBlueprint, questsNames, toKitInvokeResult, trustedAuthorityFields, worldsimBlueprint, worldsimNames, type CombatBlueprintOptions, type CombatKitOptions, type CombatNames, type ContactDamageEvent, type EnginePose, type EngineInvokeResult, type DecksBlueprintOptions, type DecksKitOptions, type DecksNames, type EconomyBlueprintOptions, type EconomyKitOptions, type EconomyNames, type GameKitDomains, type GameKitOptions, type GuildBlueprintOptions, type GuildNames, type InventoryBarterSpec, type InventoryBlueprintOptions, type InventoryKitOptions, type InventoryNames, type InventoryRecipeSpec, type KitAchievementDef, type KitAchievementUnlock, type KitAutomationSpec, type KitAutomationTriggerSpec, type KitBlueprint, type KitCard, type KitChatMessage, type KitCombatant, type KitCrop, type KitGroupWithChannel, type KitDeployResult, type KitInvokePolicy, type KitInvokeResult, type KitItemStack, type KitLeaderboardEntry, type KitLootRoll, type KitMarketListing, type KitAttackResult, type KitDirectorRun, type KitForecast, type KitInstance, type KitMatch, type KitMatchScore, type KitMobDef, type KitMobSlot, type KitNpc, type KitOwnerIdKind, type KitPet, type KitPetResult, type KitPlot, type KitQueueStatus, type KitRoutedAttack, type KitProgress, type KitQuestDef, type KitQuestProgress, type KitResourceNode, type KitSelectorSpec, type KitShopListing, type KitSkillDef, type KitSkillRank, type KitStatusEffect, type KitTradeOffer, type KitTrustedAuthority, type KitWallet, type KitWaveSpawner, type LeaderboardsBlueprintOptions, type LeaderboardsKitOptions, type LeaderboardsNames, type KitWorldState, type LockAuthority, type LockBlueprintOptions, type LockNames, type LootBlueprintOptions, type LootDropSpec, type LootEntrySpec, type LootKitOptions, type LootNames, type LootTableSpec, type MatchesBlueprintOptions, type MatchesKitOptions, type MatchesNames, type MergedBlueprints, type MatchmakingKitOptions, type MinigamesKitOptions, type MobsKitOptions, type LiveNpcPose, type InstancesKitOptions, type DirectorKitOptions, type KitWaveSpec, type NpcBehaviorSpec, type NpcBehaviorTrigger, type NpcBlueprintOptions, type NpcsKitOptions, type ObjectsKitOptions, type PetsKitOptions, type PlotBlueprintOptions, type PlotNames, type PlotsKitOptions, type ProgressionBlueprintOptions, type ProgressionKitOptions, type ProgressionNames, type QuestAdvanceSpec, type QuestsBlueprintOptions, type QuestsKitOptions, type QuestsNames, type SelectorPermissionPredicate, type SocialKitOptions, type AbilityEvent, type ControlPointEvent, type KitEventWindow, type KitSeason, type LiveopsBlueprintOptions, type LiveopsKitOptions, type LiveopsNames, type AbilitiesKitOptions, type KitAbility, type KitControlPoint, type KitModReport, type KitRaceRun, type KitViolations, type MovementKitOptions, type RacingKitOptions, type TerritoryKitOptions, type ModerationBlueprintOptions, type ModerationKitOptions, type ModerationNames, type MovementViolationEvent, type TelemetryKitOptions, type ProposalEvent, type RaceTimingEvent, type ZoneChangeEvent, type ScoreEvent, type TurnEvent, type WeatherEvent, type WorldsimBlueprintOptions, type WorldsimKitOptions, type WorldsimNames, } from './kit/index.js';
|
|
59
55
|
export type { StateCodec, Ticker, WorldSession, WorldSessionConfig, WorldStoresClient, } from './stores/index.js';
|
|
60
|
-
export { CrowdyError, CrowdyGraphQLError, CrowdyHttpError, CrowdyNetworkError, CrowdyProtocolError, CrowdyRealtimeError, CrowdyTimeoutError, } from './errors.js';
|
|
56
|
+
export { APP_UNAVAILABLE_CODE, CrowdyAppUnavailableError, CrowdyError, CrowdyGraphQLError, CrowdyHttpError, CrowdyNetworkError, CrowdyProtocolError, CrowdyRealtimeError, CrowdyTimeoutError, WRONG_DATACENTER_CODE, } from './errors.js';
|
|
57
|
+
export { moveFromError, moveFromErrors } from './datacenter-redirect.js';
|
|
58
|
+
export type { DatacenterMove } from './datacenter-redirect.js';
|
|
61
59
|
export { SequenceAllocator, decodeBase64, encodeBase64, generateCrowdyUuid, validateChunkCoordinates, validateCrowdyUuid, } from './utils.js';
|
|
62
60
|
export type { BigInt, ChunkCoordinates, VoxelCoordinates, ActorUpdateNotification, ActorUpdateResponse, VoxelUpdateNotification, VoxelUpdateResponse, ClientAudioNotification, ClientTextNotification, ClientEventNotification, ServerEventNotification, GenericErrorResponse, ActorUpdateHandler, ActorUpdateResponseHandler, VoxelUpdateHandler, VoxelUpdateResponseHandler, ClientAudioHandler, ClientTextHandler, ClientEventHandler, ServerEventHandler, GenericErrorHandler, UnsubscribeFn, } from './types.js';
|
|
63
61
|
export { UdpErrorCode } from './types.js';
|
|
@@ -105,4 +103,5 @@ export { createBootstrapRediscover, type BootstrapRediscoverOptions, } from './b
|
|
|
105
103
|
export type { ChunkCoordinatesInput, VoxelCoordinatesInput, ActorUpdateRequestInput, VoxelUpdateRequestInput, ClientAudioPacketInput, ClientTextPacketInput, ClientEventNotificationInput, UdpProxyConnectionStatus, RealtimeConnectionEvent, GameClientBootstrap, PlayerWasmModule, PlayerWasmModuleVersion, DeployPlayerComputeInput, GridOwnership, AssignGridOwnershipInput, TransferGridOwnershipInput, UpdateGamertagInput, CreateActorInput, UpdateActorInput, ActorFilterInput, BatchActorLookupInput, CreateUserAppStateInput, UpdateUserStateInput, UpdateAvatarStateInput, UpdateActorStateInput, UpdateChunkStateInput, UpdateChunkLodsInput, ChunkUpdateInput, UpdateVoxelInput, RollbackVoxelUpdatesInput, GetChunkInput, GetChunkLodsInput, GetChunksByDistanceInput, GetVoxelListInput, ListVoxelsInput, ListVoxelUpdatesByDistanceInput, TeleportRequestInput, LodDataInput, VoxelStateInput, Chunk, ChunkLodsResponse, ChunksByDistanceResponse, ChunkVoxelResponse, ChunkVoxelUpdatesResponse, Voxel, VoxelUpdatesByDistanceResponse, VoxelUpdateHistoryEvent, RollbackVoxelEventResult, Actor, Avatar, AvatarDto, TeleportResponse, UserAppState, ServerStatus, GraphQlServer, ServerVersionInfo, VersionInfo, PageInfo, UdpNotificationsSubscription, GmContainer, GmContainerState, GmContainerType, GmPropertyDef, GmFunction, GmFunctionParam, GmFunctionMutation, GmSession, GmSessionParticipant, GmEdge, GmTraverseResult, GmInvokeResult, GmMutationApplied, GmEvent, GmTypeSchema, GmAppFeature, GmTierFeature, GmAppPolicy, GmSeedResult, GameModelActivePlayerCountSnapshot, GameModelActivePlayerCountChange, UpsertContainerTypeInput, UpsertPropertyDefInput, UpsertFunctionInput, FunctionParamInput, FunctionMutationInput, SeedGameModelInput, SeedContainerInput, SeedContainerTypeInput, SeedPropertyDefInput, SeedFunctionInput, SeedEdgeInput, SeedPropertyInput, CreateSessionInput, JoinSessionInput, SetSessionTurnInput, CreateContainerInput, SetContainerPropertyInput, AddEdgeInput, InvokeFunctionInput, DefineAppFeatureInput, GrantTierFeatureInput, SetGameModelPolicyInput, Scalars, } from './generated/graphql.js';
|
|
106
104
|
export type { CreateAppInput, UpdateAppInput, CreateOrganizationInput, CreateOrgTokenInput, UpdateOrgTokenInput, InviteOrgMemberInput, CreateOrgRoleInput, UpdateOrgRoleInput, CreateAccessTierInput, UpdateAccessTierInput, GrantAppAccessInput, CreateCheckoutInput, CheckoutFilterInput, SetQuotaInput, AppCodeAdmission, AdmitAppCodeInput, } from './generated/graphql.js';
|
|
107
105
|
export { ServerState, AppVisibility, PlayerComputeTarget, GridOwnerKind, GridTenure, GameModelPlayerCountStatus, CodeAdmissionMode, CodeAdmissionSubjectKind, } from './generated/graphql.js';
|
|
106
|
+
export { DiscoveryDomain, type AppEndpoint } from './domains/discovery.js';
|
|
108
107
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,6DAA6D;AAC7D,eAAO,MAAM,OAAO,WAAW,CAAC;AAEhC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,KAAK,kBAAkB,GACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,6BAA6B,EAC7B,YAAY,EACZ,KAAK,eAAe,EACpB,KAAK,UAAU,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,KAAK,mBAAmB,GACzB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,cAAc,EACd,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,uBAAuB,GAC7B,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,GACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,wBAAwB,EACxB,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,2BAA2B,EAC3B,mBAAmB,EACnB,oBAAoB,EACpB,KAAK,gBAAgB,GACtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,eAAe,EACf,cAAc,EACd,KAAK,uBAAu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Ae,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CrowdyJS SDK — client SDK for Crowded Kingdoms.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* - `cks-game-api` for everything game-side (`client.chunks`,
|
|
10
|
-
* `client.voxels`, `client.actors`, `client.teleport`, `client.state`,
|
|
11
|
-
* `client.serverStatus`, `client.udp`).
|
|
4
|
+
* The SDK targets ONE GraphQL endpoint behind a single `CrowdyClient`. Identity
|
|
5
|
+
* (`client.auth`, `client.users`, `client.portal`) and everything game-side
|
|
6
|
+
* (`client.chunks`, `client.voxels`, `client.actors`, `client.teleport`,
|
|
7
|
+
* `client.state`, `client.serverStatus`, `client.udp`) are surfaces of the same
|
|
8
|
+
* API. `managementUrl` was removed in v14 — see MIGRATION.md.
|
|
12
9
|
*
|
|
13
10
|
* Authentication is **passwordless** (as of v8): sign in with an emailed magic
|
|
14
11
|
* link, a federated social provider, or — in dev — the dev bypass. The returned
|
|
@@ -21,9 +18,8 @@
|
|
|
21
18
|
* import { CrowdyClient } from '@crowdedkingdoms/crowdyjs';
|
|
22
19
|
*
|
|
23
20
|
* const client = new CrowdyClient({
|
|
24
|
-
* httpUrl: 'https://
|
|
25
|
-
* wsUrl: 'wss://
|
|
26
|
-
* managementUrl: 'https://dev-management-api.crowdedkingdoms.com',
|
|
21
|
+
* httpUrl: 'https://api.crowdedkingdoms.com/graphql',
|
|
22
|
+
* wsUrl: 'wss://api.crowdedkingdoms.com/graphql',
|
|
27
23
|
* });
|
|
28
24
|
*
|
|
29
25
|
* // passwordless sign-in (magic link): emails a one-time link
|
|
@@ -32,7 +28,7 @@
|
|
|
32
28
|
* const { user } = await client.auth.completeLoginLink(tokenFromUrl);
|
|
33
29
|
* const me = await client.users.me();
|
|
34
30
|
*
|
|
35
|
-
* As of v6 the SDK wraps the **full** public surface
|
|
31
|
+
* As of v6 the SDK wraps the **full** public API surface, namespaced
|
|
36
32
|
* by audience: the game-client surface (`auth`, `users`, `udp`, `world`,
|
|
37
33
|
* `chunks`/`voxels`/`actors`/`avatars`/`state`/`teleport`/`channels`/`teams`/
|
|
38
34
|
* `gameModel`/`host`), the privileged studio-admin surface grouped under
|
|
@@ -45,7 +41,7 @@
|
|
|
45
41
|
* or internal tooling, never an untrusted browser.
|
|
46
42
|
*/
|
|
47
43
|
/** The published package version. Mirrors `package.json`. */
|
|
48
|
-
export const VERSION = '
|
|
44
|
+
export const VERSION = '14.1.0';
|
|
49
45
|
export { LbCookieStore } from './lb-cookie-store.js';
|
|
50
46
|
export { CrowdyClient, createCrowdyClient, } from './crowdy-client.js';
|
|
51
47
|
export { BrowserLocalStorageTokenStore, SessionStore, } from './session.js';
|
|
@@ -56,13 +52,13 @@ export { RELAY_MAX_DATAGRAM_BYTES, WireMessageType, createSignContext, parseRela
|
|
|
56
52
|
export { RealtimeMetrics, payloadBytesOf, } from './metrics.js';
|
|
57
53
|
export { WorldClient, ActorClient } from './world.js';
|
|
58
54
|
export { CombatKit, DecksKit, EconomyKit, DirectorKit, EngineDetector, FeaturesKit, GameKitClient, InventoryKit, LeaderboardsKit, InstancesKit, LootKit, MarketKit, MatchesKit, AbilitiesKit, LiveopsKit, MovementKit, RacingKit, TerritoryKit, ModerationKit, TelemetryKit, telemetryBlueprint, MatchmakingKit, MinigamesKit, MobsKit, NpcsKit, ObjectsKit, PetsKit, PlotsKit, ProgressionKit, QuestsKit, SocialKit, WorldsimKit, EVENT_CONTACT_DAMAGE, EVENT_ABILITY, EVENT_CONTROL_POINT, EVENT_MOVEMENT_VIOLATION, EVENT_PROPOSAL, EVENT_RACE_TIMING, EVENT_ZONE_CHANGE, EVENT_SCORE, EVENT_TURN, EVENT_WEATHER, FLAG_GROUNDED, FLAG_MOB, FLAG_NPC, FLAG_RESERVED3, POSE_BYTES, decodeEnginePose, encodeEnginePose, engineLanes, enginePoseCodec, parseContactDamage, parseEngineEvent, parseAbilityEvent, parseControlPointEvent, parseMovementViolation, parseProposalEvent, parseRaceTimingEvent, parseScoreEvent, parseTurnEvent, parseWeatherEvent, poseSuffix, andPolicies, combatBlueprint, combatNames, composeBlueprints, decksBlueprint, decksNames, economyBlueprint, economyCurrencyFn, economyNames, featureGate, guildBlueprint, guildNames, inventoryBarterFunctionName, inventoryBlueprint, inventoryCraftFunctionName, inventoryNames, isKitVerdictError, kitInvoke, kitPolicyJson, runOptimisticAction, leaderboardsBlueprint, leaderboardsNames, lockBlueprint, lockNames, lootBlueprint, lootNames, lootRollFn, liveopsBlueprint, liveopsNames, moderationBlueprint, moderationNames, matchesBlueprint, matchesNames, turnExpired, mergeBlueprints, npcBehaviorFunctionName, npcBlueprint, ownerEqualsCaller, ownerMirrorProperty, ownerEquals, plotBlueprint, plotNames, progressionBlueprint, progressionNames, questsBlueprint, questsNames, toKitInvokeResult, trustedAuthorityFields, worldsimBlueprint, worldsimNames, } from './kit/index.js';
|
|
59
|
-
export { CrowdyError, CrowdyGraphQLError, CrowdyHttpError, CrowdyNetworkError, CrowdyProtocolError, CrowdyRealtimeError, CrowdyTimeoutError, } from './errors.js';
|
|
55
|
+
export { APP_UNAVAILABLE_CODE, CrowdyAppUnavailableError, CrowdyError, CrowdyGraphQLError, CrowdyHttpError, CrowdyNetworkError, CrowdyProtocolError, CrowdyRealtimeError, CrowdyTimeoutError, WRONG_DATACENTER_CODE, } from './errors.js';
|
|
56
|
+
export { moveFromError, moveFromErrors } from './datacenter-redirect.js';
|
|
60
57
|
export { SequenceAllocator, decodeBase64, encodeBase64, generateCrowdyUuid, validateChunkCoordinates, validateCrowdyUuid, } from './utils.js';
|
|
61
58
|
export { UdpErrorCode } from './types.js';
|
|
62
59
|
// -----------------------------------------------------------------------------
|
|
63
|
-
// Domain wrappers.
|
|
64
|
-
//
|
|
65
|
-
// cks-game-api.
|
|
60
|
+
// Domain wrappers. All share one endpoint; they differ in the token and
|
|
61
|
+
// permissions they require.
|
|
66
62
|
// -----------------------------------------------------------------------------
|
|
67
63
|
export { AuthAPI, } from './domains/auth.js';
|
|
68
64
|
export { UsersAPI } from './domains/users.js';
|
|
@@ -105,3 +101,4 @@ export * from './crowdy-studio/index.js';
|
|
|
105
101
|
export { createMintRediscover, } from './rediscover.js';
|
|
106
102
|
export { createBootstrapRediscover, } from './bootstrap-rediscover.js';
|
|
107
103
|
export { ServerState, AppVisibility, PlayerComputeTarget, GridOwnerKind, GridTenure, GameModelPlayerCountStatus, CodeAdmissionMode, CodeAdmissionSubjectKind, } from './generated/graphql.js';
|
|
104
|
+
export { DiscoveryDomain } from './domains/discovery.js';
|
package/dist/kit/decks.d.ts
CHANGED
package/dist/kit/npcs.d.ts
CHANGED
|
@@ -110,7 +110,7 @@ export declare class NpcsKit {
|
|
|
110
110
|
runId: string;
|
|
111
111
|
appId: string;
|
|
112
112
|
flowId: string | null;
|
|
113
|
-
automationId: string;
|
|
113
|
+
automationId: string | null;
|
|
114
114
|
automationName: string;
|
|
115
115
|
triggerSource: string;
|
|
116
116
|
triggerId: string | null;
|
|
@@ -202,7 +202,7 @@ export declare class NpcsKit {
|
|
|
202
202
|
runId: string;
|
|
203
203
|
appId: string;
|
|
204
204
|
flowId: string | null;
|
|
205
|
-
automationId: string;
|
|
205
|
+
automationId: string | null;
|
|
206
206
|
automationName: string;
|
|
207
207
|
triggerSource: string;
|
|
208
208
|
triggerId: string | null;
|
package/dist/kit/npcs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"npcs.d.ts","sourceRoot":"","sources":["../../src/kit/npcs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,KAAK,EAAE,cAAc,EA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AOzB,wBAAwB;0BACA,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC;;;;;;;;0BAmDgyunB,CAAC;;;;;;;;QA/Cn1unB;;;;WAIG;0BAEU,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,QAC/B,MAAM,KACX,OAAO,CAAC,OAAO,CAAC;QAQnB;;;WAGG;+BAEU,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,YAC3B,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,KAC1C,CAAC,MAAM,IAAI,CAAC;MAsBf;CACH"}
|
package/dist/kit/worldsim.d.ts
CHANGED
package/dist/realtime.d.ts
CHANGED
|
@@ -455,6 +455,32 @@ export declare class RealtimeClient {
|
|
|
455
455
|
* discovery round trip and no reason to consult the rediscover callback. The
|
|
456
456
|
* binary relay has already refused any target outside this estate.
|
|
457
457
|
*/
|
|
458
|
+
/**
|
|
459
|
+
* Follow an HTTP redirect that has already happened.
|
|
460
|
+
*
|
|
461
|
+
* Called when a GraphQL call was refused with `WRONG_DATACENTER` and the
|
|
462
|
+
* transport moved itself. The websocket has to follow in the same step or the
|
|
463
|
+
* session is split across two DATACENTERS rather than merely two instances —
|
|
464
|
+
* strictly worse than the split this file already guards against, because the
|
|
465
|
+
* subscription would be talking to a datacenter that holds none of the app's
|
|
466
|
+
* shards and will refuse it too.
|
|
467
|
+
*
|
|
468
|
+
* Idempotent: moving to the URL already in use returns without touching the
|
|
469
|
+
* connection, so a burst of refused calls produces one move rather than one
|
|
470
|
+
* reconnect each.
|
|
471
|
+
*/
|
|
472
|
+
/**
|
|
473
|
+
* Act on a `WRONG_DATACENTER` carried in a websocket `errors[]`.
|
|
474
|
+
*
|
|
475
|
+
* @returns true when the connection was moved, so the caller can skip
|
|
476
|
+
* reporting the error as an ordinary failure.
|
|
477
|
+
*/
|
|
478
|
+
private applyDatacenterRedirect;
|
|
479
|
+
moveToDatacenter(target: {
|
|
480
|
+
httpUrl: string;
|
|
481
|
+
wsUrl?: string | null;
|
|
482
|
+
datacenter?: string;
|
|
483
|
+
}): void;
|
|
458
484
|
private moveToDirectedEndpoint;
|
|
459
485
|
/** Drop the relay so the next subscribe builds one against the new URL. */
|
|
460
486
|
/**
|
package/dist/realtime.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"realtime.d.ts","sourceRoot":"","sources":["../src/realtime.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAE3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"realtime.d.ts","sourceRoot":"","sources":["../src/realtime.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAE3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,cAAc,GACtB,MAAM,GACN,YAAY,GACZ,WAAW,GACX,cAAc,GACd,cAAc,GACd,QAAQ,CAAC;AAEb;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,WAAW,CACvC,4BAA4B,CAAC,kBAAkB,CA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AqBtB,OAAO,CAAC,aAAa;IAWrB,OAAO,CAAC,gBAAgB;IAUxB,OAAO,CAAC,aAAa;IAMrB,OAAO,CAAC,SAAS;CAOlB;AAuBD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,oBAAoB,CAAC"}
|
package/dist/realtime.js
CHANGED
|
@@ -2,6 +2,7 @@ import { print } from 'graphql';
|
|
|
2
2
|
import { createClient } from 'graphql-ws';
|
|
3
3
|
import { silentLogger } from './logger.js';
|
|
4
4
|
import { CrowdyRealtimeError } from './errors.js';
|
|
5
|
+
import { moveFromErrors } from './datacenter-redirect.js';
|
|
5
6
|
import { payloadBytesOf } from './metrics.js';
|
|
6
7
|
import { UdpNotificationsDocument, } from './generated/graphql.js';
|
|
7
8
|
import { BinaryRelayTransport } from './binary-relay.js';
|
|
@@ -226,6 +227,13 @@ export class RealtimeClient {
|
|
|
226
227
|
settled = true;
|
|
227
228
|
dispose();
|
|
228
229
|
if (message.errors?.length) {
|
|
230
|
+
// Move the connection, then reject. The caller still sees this
|
|
231
|
+
// mutation fail -- a websocket mutation cannot be transparently
|
|
232
|
+
// replayed the way an HTTP POST can, because the reply is
|
|
233
|
+
// correlated to a subscription that is about to be torn down -- but
|
|
234
|
+
// the NEXT one lands in the right datacenter instead of repeating
|
|
235
|
+
// the refusal until something gives up.
|
|
236
|
+
this.applyDatacenterRedirect(message.errors);
|
|
229
237
|
reject(new CrowdyRealtimeError(message.errors[0]?.message ?? 'GraphQL mutation failed', {
|
|
230
238
|
code: 'WS_MUTATION_ERROR',
|
|
231
239
|
retryable: true,
|
|
@@ -465,6 +473,15 @@ export class RealtimeClient {
|
|
|
465
473
|
if (notification)
|
|
466
474
|
this.dispatch(notification);
|
|
467
475
|
if (message.errors?.length) {
|
|
476
|
+
// A redirect arriving over the subscription is acted on immediately
|
|
477
|
+
// rather than counted as a failure. The generic path waits for
|
|
478
|
+
// `rediscoverAfterFailures` consecutive connect failures before it
|
|
479
|
+
// moves, which is right when the SDK is guessing that something is
|
|
480
|
+
// wrong -- and wrong here, because the server has just said exactly
|
|
481
|
+
// what is wrong and exactly where to go. Waiting would cost three
|
|
482
|
+
// reconnects to a datacenter that has already refused us once.
|
|
483
|
+
if (this.applyDatacenterRedirect(message.errors))
|
|
484
|
+
return;
|
|
468
485
|
this.dispatchError(new CrowdyRealtimeError(message.errors[0]?.message ?? 'Subscription error', {
|
|
469
486
|
code: 'SUBSCRIPTION_ERROR',
|
|
470
487
|
retryable: true,
|
|
@@ -594,6 +611,50 @@ export class RealtimeClient {
|
|
|
594
611
|
* discovery round trip and no reason to consult the rediscover callback. The
|
|
595
612
|
* binary relay has already refused any target outside this estate.
|
|
596
613
|
*/
|
|
614
|
+
/**
|
|
615
|
+
* Follow an HTTP redirect that has already happened.
|
|
616
|
+
*
|
|
617
|
+
* Called when a GraphQL call was refused with `WRONG_DATACENTER` and the
|
|
618
|
+
* transport moved itself. The websocket has to follow in the same step or the
|
|
619
|
+
* session is split across two DATACENTERS rather than merely two instances —
|
|
620
|
+
* strictly worse than the split this file already guards against, because the
|
|
621
|
+
* subscription would be talking to a datacenter that holds none of the app's
|
|
622
|
+
* shards and will refuse it too.
|
|
623
|
+
*
|
|
624
|
+
* Idempotent: moving to the URL already in use returns without touching the
|
|
625
|
+
* connection, so a burst of refused calls produces one move rather than one
|
|
626
|
+
* reconnect each.
|
|
627
|
+
*/
|
|
628
|
+
/**
|
|
629
|
+
* Act on a `WRONG_DATACENTER` carried in a websocket `errors[]`.
|
|
630
|
+
*
|
|
631
|
+
* @returns true when the connection was moved, so the caller can skip
|
|
632
|
+
* reporting the error as an ordinary failure.
|
|
633
|
+
*/
|
|
634
|
+
applyDatacenterRedirect(errors) {
|
|
635
|
+
const move = moveFromErrors(errors);
|
|
636
|
+
if (!move)
|
|
637
|
+
return false;
|
|
638
|
+
const before = this.wsUrl;
|
|
639
|
+
this.moveToDatacenter({
|
|
640
|
+
httpUrl: move.gameApiUrl,
|
|
641
|
+
wsUrl: move.gameApiWsUrl ?? null,
|
|
642
|
+
datacenter: move.appDatacenter,
|
|
643
|
+
});
|
|
644
|
+
return this.wsUrl !== before;
|
|
645
|
+
}
|
|
646
|
+
moveToDatacenter(target) {
|
|
647
|
+
const wsUrl = target.wsUrl || httpToWebsocketUrl(target.httpUrl);
|
|
648
|
+
if (!wsUrl)
|
|
649
|
+
return;
|
|
650
|
+
this.moveToDirectedEndpoint({
|
|
651
|
+
httpUrl: target.httpUrl,
|
|
652
|
+
wsUrl,
|
|
653
|
+
reason: target.datacenter
|
|
654
|
+
? `app is served from '${target.datacenter}'`
|
|
655
|
+
: 'app is served from another datacenter',
|
|
656
|
+
});
|
|
657
|
+
}
|
|
597
658
|
moveToDirectedEndpoint(target) {
|
|
598
659
|
if (target.wsUrl === this.wsUrl)
|
|
599
660
|
return;
|
|
@@ -809,6 +870,28 @@ function notificationKind(typename) {
|
|
|
809
870
|
* off before it stops, instead of dropping them and letting them find out.
|
|
810
871
|
*/
|
|
811
872
|
export const SERVER_DRAINING_CODE = 'SERVER_DRAINING';
|
|
873
|
+
/**
|
|
874
|
+
* The websocket form of an http(s) URL, keeping its path.
|
|
875
|
+
*
|
|
876
|
+
* A fallback only. `WRONG_DATACENTER` names `gameApiWsUrl` alongside
|
|
877
|
+
* `gameApiUrl`, and the server's answer is the one to prefer — it knows about
|
|
878
|
+
* ports and paths this cannot see. This exists so a server that someday omits it
|
|
879
|
+
* degrades to a reasonable guess instead of leaving the websocket in the old
|
|
880
|
+
* datacenter, which is the one outcome worse than guessing.
|
|
881
|
+
*/
|
|
882
|
+
function httpToWebsocketUrl(httpUrl) {
|
|
883
|
+
const trimmed = httpUrl?.trim();
|
|
884
|
+
if (!trimmed)
|
|
885
|
+
return null;
|
|
886
|
+
if (trimmed.startsWith('wss://') || trimmed.startsWith('ws://')) {
|
|
887
|
+
return trimmed;
|
|
888
|
+
}
|
|
889
|
+
if (trimmed.startsWith('https://'))
|
|
890
|
+
return `wss://${trimmed.slice(8)}`;
|
|
891
|
+
if (trimmed.startsWith('http://'))
|
|
892
|
+
return `ws://${trimmed.slice(7)}`;
|
|
893
|
+
return null;
|
|
894
|
+
}
|
|
812
895
|
/** Default relay endpoint: the realtime wsUrl with its path set to /realtime. */
|
|
813
896
|
function deriveBinaryRelayUrl(wsUrl) {
|
|
814
897
|
try {
|
package/dist/rediscover.d.ts
CHANGED
|
@@ -16,15 +16,19 @@ export interface MintCapablePortal {
|
|
|
16
16
|
* picks a healthy instance. It must be wired from the IDENTITY client, because
|
|
17
17
|
* minting needs the session token and a game client holds an app-scoped one.
|
|
18
18
|
*
|
|
19
|
-
* If you only have an app token, prefer `realtime.discoveryUrl
|
|
20
|
-
*
|
|
19
|
+
* If you only have an app token, prefer `realtime.discoveryUrl`. Two sources publish it:
|
|
20
|
+
* `gameClientBootstrap` has since ck-api v1.20.0, and `mintAppToken` /
|
|
21
|
+
* `exchangePortalCode` / `refreshAppToken` do since the datacenter rebuild — which
|
|
22
|
+
* matters because a client that entered by portal holds a token and may never call
|
|
23
|
+
* bootstrap. In both cases it is the SHARED origin, resolving to every datacenter, and
|
|
24
|
+
* never the per-datacenter endpoint the app is actually served from,
|
|
21
25
|
* and the client builds re-discovery from it with no callback at all. This
|
|
22
26
|
* helper remains the right choice when you already hold an identity client,
|
|
23
27
|
* since it re-mints rather than reusing a token that may be near expiry.
|
|
24
28
|
*
|
|
25
29
|
* ```ts
|
|
26
30
|
* const gameClient = new CrowdyClient({
|
|
27
|
-
* httpUrl, wsUrl,
|
|
31
|
+
* httpUrl, wsUrl,
|
|
28
32
|
* realtime: {
|
|
29
33
|
* binaryTransport: true,
|
|
30
34
|
* rediscover: createMintRediscover(identityClient.portal),
|
package/dist/rediscover.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rediscover.d.ts","sourceRoot":"","sources":["../src/rediscover.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,wDAAwD;AACxD,MAAM,WAAW,iBAAiB;IAChC,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;CACxD;AAED
|
|
1
|
+
{"version":3,"file":"rediscover.d.ts","sourceRoot":"","sources":["../src/rediscover.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,wDAAwD;AACxD,MAAM,WAAW,iBAAiB;IAChC,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;CACxD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,iBAAiB,EACzB,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE,CAAA;CAAO,GAC1E,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,OAAO,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,GAAG,IAAI,CAAC,CAsBR"}
|
package/dist/rediscover.js
CHANGED
|
@@ -11,15 +11,19 @@
|
|
|
11
11
|
* picks a healthy instance. It must be wired from the IDENTITY client, because
|
|
12
12
|
* minting needs the session token and a game client holds an app-scoped one.
|
|
13
13
|
*
|
|
14
|
-
* If you only have an app token, prefer `realtime.discoveryUrl
|
|
15
|
-
*
|
|
14
|
+
* If you only have an app token, prefer `realtime.discoveryUrl`. Two sources publish it:
|
|
15
|
+
* `gameClientBootstrap` has since ck-api v1.20.0, and `mintAppToken` /
|
|
16
|
+
* `exchangePortalCode` / `refreshAppToken` do since the datacenter rebuild — which
|
|
17
|
+
* matters because a client that entered by portal holds a token and may never call
|
|
18
|
+
* bootstrap. In both cases it is the SHARED origin, resolving to every datacenter, and
|
|
19
|
+
* never the per-datacenter endpoint the app is actually served from,
|
|
16
20
|
* and the client builds re-discovery from it with no callback at all. This
|
|
17
21
|
* helper remains the right choice when you already hold an identity client,
|
|
18
22
|
* since it re-mints rather than reusing a token that may be near expiry.
|
|
19
23
|
*
|
|
20
24
|
* ```ts
|
|
21
25
|
* const gameClient = new CrowdyClient({
|
|
22
|
-
* httpUrl, wsUrl,
|
|
26
|
+
* httpUrl, wsUrl,
|
|
23
27
|
* realtime: {
|
|
24
28
|
* binaryTransport: true,
|
|
25
29
|
* rediscover: createMintRediscover(identityClient.portal),
|
package/dist/session.d.ts
CHANGED
|
@@ -24,6 +24,27 @@ export declare class BrowserLocalStorageTokenStore implements TokenStore {
|
|
|
24
24
|
private readonly key;
|
|
25
25
|
/** @param key - localStorage key under which the token is stored. */
|
|
26
26
|
constructor(key?: string);
|
|
27
|
+
/**
|
|
28
|
+
* The key an IDENTITY session token belongs under: one per origin, shared by every
|
|
29
|
+
* game on it.
|
|
30
|
+
*
|
|
31
|
+
* WHY THIS EXISTS AS A NAMED CONSTANT. Games were storing their credential under
|
|
32
|
+
* `'crowdyjs:app:' + import.meta.env.BASE_URL` — the game's own PATH — so two games on
|
|
33
|
+
* `crowdy.games` had different keys on the SAME origin and could not see each other's
|
|
34
|
+
* login. What was stored was an app token anyway, which is per-game by definition, so
|
|
35
|
+
* there was nothing cross-app to share even if the key had matched. A player who
|
|
36
|
+
* signed in for one game was anonymous to the next and got bounced back to the portal.
|
|
37
|
+
*
|
|
38
|
+
* The schema split makes the fix structural rather than a workaround: the identity
|
|
39
|
+
* session token is now its own object with its own lifetime, so it belongs under one
|
|
40
|
+
* origin-wide key, while app tokens stay per-game. The storage split mirrors the
|
|
41
|
+
* database split.
|
|
42
|
+
*
|
|
43
|
+
* Deliberately NOT parameterised by BASE_URL. That parameter was the bug.
|
|
44
|
+
*/
|
|
45
|
+
static readonly SESSION_KEY = "crowdyjs:session";
|
|
46
|
+
/** The key a game's app-scoped token belongs under. Per game, on purpose. */
|
|
47
|
+
static appKey(basePath: string): string;
|
|
27
48
|
get(): string | null;
|
|
28
49
|
set(token: string): void;
|
|
29
50
|
clear(): void;
|
package/dist/session.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,MAAM,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;AAE7D;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB,iEAAiE;IACjE,GAAG,IAAI,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC9C,2DAA2D;IAC3D,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,qDAAqD;IACrD,KAAK,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/B;AAED;;;;GAIG;AACH,qBAAa,6BAA8B,YAAW,UAAU;IAElD,OAAO,CAAC,QAAQ,CAAC,GAAG;IADhC,qEAAqE;gBACxC,GAAG,SAAmB;IAEnD,GAAG,IAAI,MAAM,GAAG,IAAI;IAKpB,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAKxB,KAAK,IAAI,IAAI;CAId;AAED;;;;;GAKG;AACH,qBAAa,YAAY;IAKX,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC;IAJxC,OAAO,CAAC,KAAK,CAAuB;IACpC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA8B;IAExD,uFAAuF;gBAC1D,UAAU,CAAC,EAAE,UAAU,YAAA;IAEpD;;;;;OAKG;IACG,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAMvC,2EAA2E;IAC3E,Q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