@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.
Files changed (45) hide show
  1. package/MIGRATION.md +26 -0
  2. package/README.md +110 -772
  3. package/dist/auth-state.d.ts +6 -16
  4. package/dist/auth-state.d.ts.map +1 -1
  5. package/dist/auth-state.js +9 -26
  6. package/dist/client.d.ts +14 -5
  7. package/dist/client.d.ts.map +1 -1
  8. package/dist/client.js +22 -17
  9. package/dist/crowdy-client.d.ts +21 -3
  10. package/dist/crowdy-client.d.ts.map +1 -1
  11. package/dist/crowdy-client.js +37 -20
  12. package/dist/domains/serverStatus.d.ts +2 -1
  13. package/dist/domains/serverStatus.d.ts.map +1 -1
  14. package/dist/domains/serverStatus.js +5 -1
  15. package/dist/domains/udp.d.ts +19 -2
  16. package/dist/domains/udp.d.ts.map +1 -1
  17. package/dist/domains/udp.js +38 -0
  18. package/dist/errors.d.ts +42 -0
  19. package/dist/errors.d.ts.map +1 -0
  20. package/dist/errors.js +42 -0
  21. package/dist/generated/graphql.d.ts +404 -12
  22. package/dist/generated/graphql.d.ts.map +1 -1
  23. package/dist/generated/graphql.js +2 -0
  24. package/dist/index.d.ts +10 -6
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +8 -6
  27. package/dist/logger.d.ts +8 -0
  28. package/dist/logger.d.ts.map +1 -0
  29. package/dist/logger.js +1 -0
  30. package/dist/realtime.d.ts +86 -0
  31. package/dist/realtime.d.ts.map +1 -0
  32. package/dist/realtime.js +270 -0
  33. package/dist/session.d.ts +27 -0
  34. package/dist/session.d.ts.map +1 -0
  35. package/dist/session.js +61 -0
  36. package/dist/subscriptions.d.ts +1 -48
  37. package/dist/subscriptions.d.ts.map +1 -1
  38. package/dist/subscriptions.js +1 -192
  39. package/dist/utils.d.ts +12 -0
  40. package/dist/utils.d.ts.map +1 -0
  41. package/dist/utils.js +50 -0
  42. package/dist/world.d.ts +35 -0
  43. package/dist/world.d.ts.map +1 -0
  44. package/dist/world.js +88 -0
  45. 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.