@crowdedkingdomstudios/crowdyjs 2.1.1 → 3.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/MIGRATION.md +26 -0
- package/README.md +110 -772
- package/dist/auth-state.d.ts +6 -16
- package/dist/auth-state.d.ts.map +1 -1
- package/dist/auth-state.js +9 -26
- package/dist/client.d.ts +14 -5
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +22 -17
- package/dist/crowdy-client.d.ts +21 -3
- package/dist/crowdy-client.d.ts.map +1 -1
- package/dist/crowdy-client.js +37 -20
- package/dist/domains/serverStatus.d.ts +2 -1
- package/dist/domains/serverStatus.d.ts.map +1 -1
- package/dist/domains/serverStatus.js +5 -1
- package/dist/domains/udp.d.ts +19 -2
- package/dist/domains/udp.d.ts.map +1 -1
- package/dist/domains/udp.js +38 -0
- package/dist/errors.d.ts +42 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +42 -0
- package/dist/generated/graphql.d.ts +404 -12
- package/dist/generated/graphql.d.ts.map +1 -1
- package/dist/generated/graphql.js +2 -0
- package/dist/index.d.ts +10 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -6
- package/dist/logger.d.ts +8 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +1 -0
- package/dist/realtime.d.ts +86 -0
- package/dist/realtime.d.ts.map +1 -0
- package/dist/realtime.js +270 -0
- package/dist/session.d.ts +27 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +61 -0
- package/dist/subscriptions.d.ts +1 -48
- package/dist/subscriptions.d.ts.map +1 -1
- package/dist/subscriptions.js +1 -192
- package/dist/utils.d.ts +12 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +50 -0
- package/dist/world.d.ts +35 -0
- package/dist/world.d.ts.map +1 -0
- package/dist/world.js +88 -0
- package/package.json +13 -3
package/MIGRATION.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# CrowdyJS v3 Migration Notes
|
|
2
|
+
|
|
3
|
+
CrowdyJS v3 is a breaking rewrite focused on browser game clients.
|
|
4
|
+
|
|
5
|
+
## Main Changes
|
|
6
|
+
|
|
7
|
+
- Use `createCrowdyClient()` or `new CrowdyClient()` with `httpUrl` and `wsUrl`.
|
|
8
|
+
- Use `client.auth.login({ email, password })` instead of `client.login(email, password)`.
|
|
9
|
+
- Use `client.udp.subscribe({ actorUpdate })` instead of `client.onActorUpdate(...)`.
|
|
10
|
+
- Use `client.udp.sendActorUpdate(...)` or `client.udp.sendActorUpdateAndWait(...)` instead of root-level send methods.
|
|
11
|
+
- Use `client.udp.disconnect()` instead of `client.disconnectUdpProxy()`.
|
|
12
|
+
- Use `client.session` for token restore, manual token injection, and token persistence.
|
|
13
|
+
- Use `client.realtime.onStatus()` for connection state and reconnect visibility.
|
|
14
|
+
- Import generated operation documents from `@crowdedkingdomstudios/crowdyjs/generated`.
|
|
15
|
+
|
|
16
|
+
## API Field Renames
|
|
17
|
+
|
|
18
|
+
- `CreateGridInput.app_id` is now `CreateGridInput.appId`.
|
|
19
|
+
- `TeleportRequestInput.UUID` is now `TeleportRequestInput.uuid`.
|
|
20
|
+
- `connectUdpProxy` takes no input.
|
|
21
|
+
|
|
22
|
+
## Error Handling
|
|
23
|
+
|
|
24
|
+
GraphQL failures now throw `CrowdyGraphQLError`, preserving every GraphQL error
|
|
25
|
+
including `path` and `extensions.code`. Realtime failures use
|
|
26
|
+
`CrowdyRealtimeError` and subscription-level `RealtimeConnectionEvent` payloads.
|