@crowdedkingdoms/crowdyjs 18.31.1-test.1 → 18.32.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 +27 -0
- package/README.md +1 -0
- package/dist/default-origin.d.ts +6 -6
- package/dist/default-origin.d.ts.map +1 -1
- package/dist/default-origin.js +6 -6
- package/dist/generated/graphql-schema.d.ts +8 -6
- package/dist/generated/graphql-schema.d.ts.map +1 -1
- package/dist/generated/graphql.d.ts +2 -0
- package/dist/generated/graphql.d.ts.map +1 -1
- package/dist/generated/graphql.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/stores/chunks.d.ts +15 -2
- package/dist/stores/chunks.d.ts.map +1 -1
- package/dist/stores/chunks.js +25 -14
- package/package.json +1 -1
package/MIGRATION.md
CHANGED
|
@@ -120,6 +120,33 @@ super-admin's session). There is no SDK replacement.
|
|
|
120
120
|
`dev`'s SDL after #417 merged (`npm run schema:sync:paths -- --schema <that schema.gql>`, then
|
|
121
121
|
`npm run codegen`).
|
|
122
122
|
|
|
123
|
+
## 18.32.0: a voxel's time is its chunk's whole-chunk write
|
|
124
|
+
|
|
125
|
+
**What it needs.** ck-api `v2.70.0` (cks-game-api #671): `chunks.get` and `chunks.byDistance`
|
|
126
|
+
select `Chunk.voxelsUpdatedAt`, which an older Game API refuses. Promote the Game API before the
|
|
127
|
+
SDK on each tier.
|
|
128
|
+
|
|
129
|
+
**What changed on the server.** A whole-chunk write (`updateChunk`, a mod's `world.set_chunk`)
|
|
130
|
+
now supersedes every voxel edit recorded at or before it, at every voxel, so the chunk reads back
|
|
131
|
+
as written. `Chunk.voxelsUpdatedAt` says when that was. Chunk-state and LOD writes move only
|
|
132
|
+
`updatedAt`. Before, an edit of any age showed where the chunk stored no state, and a chunk-state
|
|
133
|
+
or LOD write moved the time the stores judged a copy by.
|
|
134
|
+
|
|
135
|
+
**In the ChunkStore.**
|
|
136
|
+
- `CachedChunk.storedAt` is the copy's `voxelsUpdatedAt`: the time of every voxel it has no entry
|
|
137
|
+
for. A change older than it is dropped, as before, but a chunk-state or LOD write no longer
|
|
138
|
+
moves it.
|
|
139
|
+
- A chunk not written whole since v2.70.0 has a null `voxelsUpdatedAt`, so `storedAt` is null.
|
|
140
|
+
A stored copy and the changes merged since its read are then ordered by arrival, and a realtime
|
|
141
|
+
change of any age applies, as the server shows a recorded edit of any age over that chunk's grid.
|
|
142
|
+
- `CachedChunk.rowAt` (new) is the row's `updatedAt`. It orders copies: `hydrate` skips an older
|
|
143
|
+
copy than the one it holds, and `catchUp` reads a chunk again when its row moved, a chunk-state
|
|
144
|
+
write included.
|
|
145
|
+
|
|
146
|
+
**Writing a grid now overwrites.** `chunks.update` with a grid read earlier erases the edits other
|
|
147
|
+
players made since that read, as `world.set_chunk` always did. Read the chunk (or let the store
|
|
148
|
+
merge) before writing a whole chunk back.
|
|
149
|
+
|
|
123
150
|
## 18.31.1: a stored copy's times are clamped too
|
|
124
151
|
|
|
125
152
|
What 18.31.0 needs. A stored copy's `updatedAt` (the row's and each voxel state's) is held to 5
|
package/README.md
CHANGED
|
@@ -34,6 +34,7 @@ so it needs that Game API or newer; promote the Game API before the SDK on each
|
|
|
34
34
|
|
|
35
35
|
| CrowdyJS | Needs the Game API (ck-api) |
|
|
36
36
|
| --- | --- |
|
|
37
|
+
| 18.32.0 | v2.70.0 or later (`chunks.get` and `chunks.byDistance` select `Chunk.voxelsUpdatedAt`) |
|
|
37
38
|
| 18.31.1 | as 18.31.0 |
|
|
38
39
|
| 18.31.0 | v2.69.0 or later (`chunks.get` selects `VoxelState.updatedAt`) |
|
|
39
40
|
| 18.30.0 | as 18.29.0 (`ChunkStore` reads boxes and `since`: v2.67.0) |
|
package/dist/default-origin.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED — do not edit. The operator tooling's
|
|
3
|
-
* `sync-client-origins.mjs --write --tier
|
|
3
|
+
* `sync-client-origins.mjs --write --tier dev` writes this file, and
|
|
4
4
|
* `check-sdk-default-origin.mjs` refuses it when it names the wrong tier or a
|
|
5
5
|
* host that declaration does not carry. Regenerate; never hand-edit.
|
|
6
6
|
*
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
* than no default at all. Every fallback this SDK ever removed named a host that
|
|
11
11
|
* was already dead. A generated file plus a gate is what makes this one different.
|
|
12
12
|
*
|
|
13
|
-
* Source: the operator's per-tier public CK API origin declaration, tier '
|
|
13
|
+
* Source: the operator's per-tier public CK API origin declaration, tier 'dev'
|
|
14
14
|
*/
|
|
15
15
|
/** The tier this build of the SDK is published for. */
|
|
16
|
-
export declare const CROWDY_DEFAULT_TIER = "
|
|
16
|
+
export declare const CROWDY_DEFAULT_TIER = "dev";
|
|
17
17
|
/** The public CK API origin for that tier. */
|
|
18
|
-
export declare const CROWDY_DEFAULT_HTTP_ORIGIN = "https://ck.
|
|
18
|
+
export declare const CROWDY_DEFAULT_HTTP_ORIGIN = "https://ck.dev.crowdedkingdoms.com";
|
|
19
19
|
/** The same host over WebSocket. A scheme is composed; a hostname is looked up. */
|
|
20
|
-
export declare const CROWDY_DEFAULT_WS_ORIGIN = "wss://ck.
|
|
20
|
+
export declare const CROWDY_DEFAULT_WS_ORIGIN = "wss://ck.dev.crowdedkingdoms.com";
|
|
21
21
|
/** The bare hostname, for callers that need to compare rather than dial. */
|
|
22
|
-
export declare const CROWDY_DEFAULT_HOST = "ck.
|
|
22
|
+
export declare const CROWDY_DEFAULT_HOST = "ck.dev.crowdedkingdoms.com";
|
|
23
23
|
//# sourceMappingURL=default-origin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-origin.d.ts","sourceRoot":"","sources":["../src/default-origin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,uDAAuD;AACvD,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"default-origin.d.ts","sourceRoot":"","sources":["../src/default-origin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,uDAAuD;AACvD,eAAO,MAAM,mBAAmB,QAAQ,CAAC;AAEzC,8CAA8C;AAC9C,eAAO,MAAM,0BAA0B,uCAAuC,CAAC;AAE/E,mFAAmF;AACnF,eAAO,MAAM,wBAAwB,qCAAqC,CAAC;AAE3E,4EAA4E;AAC5E,eAAO,MAAM,mBAAmB,+BAA+B,CAAC"}
|
package/dist/default-origin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED — do not edit. The operator tooling's
|
|
3
|
-
* `sync-client-origins.mjs --write --tier
|
|
3
|
+
* `sync-client-origins.mjs --write --tier dev` writes this file, and
|
|
4
4
|
* `check-sdk-default-origin.mjs` refuses it when it names the wrong tier or a
|
|
5
5
|
* host that declaration does not carry. Regenerate; never hand-edit.
|
|
6
6
|
*
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
* than no default at all. Every fallback this SDK ever removed named a host that
|
|
11
11
|
* was already dead. A generated file plus a gate is what makes this one different.
|
|
12
12
|
*
|
|
13
|
-
* Source: the operator's per-tier public CK API origin declaration, tier '
|
|
13
|
+
* Source: the operator's per-tier public CK API origin declaration, tier 'dev'
|
|
14
14
|
*/
|
|
15
15
|
/** The tier this build of the SDK is published for. */
|
|
16
|
-
export const CROWDY_DEFAULT_TIER = '
|
|
16
|
+
export const CROWDY_DEFAULT_TIER = 'dev';
|
|
17
17
|
/** The public CK API origin for that tier. */
|
|
18
|
-
export const CROWDY_DEFAULT_HTTP_ORIGIN = 'https://ck.
|
|
18
|
+
export const CROWDY_DEFAULT_HTTP_ORIGIN = 'https://ck.dev.crowdedkingdoms.com';
|
|
19
19
|
/** The same host over WebSocket. A scheme is composed; a hostname is looked up. */
|
|
20
|
-
export const CROWDY_DEFAULT_WS_ORIGIN = 'wss://ck.
|
|
20
|
+
export const CROWDY_DEFAULT_WS_ORIGIN = 'wss://ck.dev.crowdedkingdoms.com';
|
|
21
21
|
/** The bare hostname, for callers that need to compare rather than dial. */
|
|
22
|
-
export const CROWDY_DEFAULT_HOST = 'ck.
|
|
22
|
+
export const CROWDY_DEFAULT_HOST = 'ck.dev.crowdedkingdoms.com';
|
|
@@ -1791,14 +1791,16 @@ export type Chunk = {
|
|
|
1791
1791
|
lods: Maybe<Array<LodData>>;
|
|
1792
1792
|
/** User id (decimal string) of the last writer of this chunk, or null if unknown. */
|
|
1793
1793
|
owner: Maybe<Scalars['ID']['output']>;
|
|
1794
|
-
/** Timestamp of the most recent write to this chunk. */
|
|
1794
|
+
/** Timestamp of the most recent write to this chunk, a chunk-state or LOD write included (getChunksByDistance `since` reads it). For when the voxels were last written, read `voxelsUpdatedAt`. */
|
|
1795
1795
|
updatedAt: Scalars['DateTime']['output'];
|
|
1796
|
-
/** Sparse list of per-voxel overrides: the states stored with the chunk (e.g. rotation, atlas, flags) and every voxel edit recorded for it since (the voxel_updates log), each with its voxel type, which takes precedence over the type byte in `voxels`. Positions and types are app-defined signed 16-bit values; an entry outside the 16x16x16 grid or the 0-255 type range lives only here. Empty when the chunk has neither. */
|
|
1796
|
+
/** Sparse list of per-voxel overrides: the states stored with the chunk (e.g. rotation, atlas, flags) and every voxel edit recorded for it since (the voxel_updates log), each with its voxel type, which takes precedence over the type byte in `voxels`. A whole-chunk write (updateChunk, a mod's world.set_chunk) supersedes the edits recorded at or before it (`voxelsUpdatedAt`). Positions and types are app-defined signed 16-bit values; an entry outside the 16x16x16 grid or the 0-255 type range lives only here. Empty when the chunk has neither. */
|
|
1797
1797
|
voxelStates: Array<VoxelState>;
|
|
1798
1798
|
/** True when the chunk holds more recorded edits than one read applies (65,536 for getChunk; 262,144 across one getChunksByDistance call), so voxelStates stops short of the newest. Read the whole log with listVoxels, which pages. */
|
|
1799
1799
|
voxelStatesTruncated: Scalars['Boolean']['output'];
|
|
1800
1800
|
/** BASE64-encoded binary blob of the dense voxel-type grid. When present, the DECODED buffer is exactly 4096 bytes: one unsigned byte (voxel type 0-255) per voxel, indexed as x + y*16 + z*256 with x,y,z in 0-15. Null when the chunk has no voxel grid yet. Decode from base64 before reading. */
|
|
1801
1801
|
voxels: Maybe<Scalars['String']['output']>;
|
|
1802
|
+
/** When the chunk's grid and stored voxel states were last written whole (updateChunk, a mod's world.set_chunk). Every voxel edit recorded at or before it is superseded, so `voxelStates` holds the stored states (dated with this time) and the edits recorded after it. Chunk-state and LOD writes do not move it. Null when the chunk has not been written whole since Game API v2.70.0: then an edit recorded at any time applies over the grid, as before. A client that merges realtime voxel updates into a copy treats a voxel with no entry as written at this time. Game API v2.70.0. */
|
|
1803
|
+
voxelsUpdatedAt: Maybe<Scalars['DateTime']['output']>;
|
|
1802
1804
|
};
|
|
1803
1805
|
/** A chunk near you was replaced as a whole (a hub's or mod's world.set_chunk; Buddy v0.45.0): read it again with getChunk, or getChunksByDistance with since. It comes instead of a voxel update per voxel. Received via the udpNotifications subscription. */
|
|
1804
1806
|
export type ChunkChangedNotification = {
|
|
@@ -5397,7 +5399,7 @@ export type Mutation = {
|
|
|
5397
5399
|
updateChannel: Group;
|
|
5398
5400
|
/** Update a channel role's name, rank, and/or permission keys (system roles cannot be renamed/re-ranked). When permissions are supplied they REPLACE the role's existing keys. Requires the 'manage_roles' channel permission (app admins bypass). Note: changing send_messages here does not re-push Buddy until affected members' roles are re-applied via setChannelMemberRoles. */
|
|
5399
5401
|
updateChannelRole: GroupRole;
|
|
5400
|
-
/** Creates or replaces a chunk's dense voxel grid and/or per-voxel states for the given app and coordinates, records each provided voxel state as an individual voxel update, and asynchronously uploads the chunk to the CDN. WRITES world state. Leaves chunkState and LODs untouched. Requires an app token for the app and either the 'manage_apps' permission on the app (resolved via its org; super admins bypass) or the voxel edit permission for this chunk that updateVoxel checks (app access, the tier's update_voxel_data, and update_voxel_data on the most specific grid covering the chunk). Throws FORBIDDEN otherwise, and for a chunk only the app's world grid covers while the app's wilderness is closed (App.wildernessWritesOpen false). */
|
|
5402
|
+
/** Creates or replaces a chunk's dense voxel grid and/or per-voxel states for the given app and coordinates, records each provided voxel state as an individual voxel update, and asynchronously uploads the chunk to the CDN. WRITES world state. A whole-chunk write: every voxel edit recorded for the chunk at or before it is superseded and removed, so the chunk reads back as written (Chunk.voxelsUpdatedAt; Game API v2.70.0). A client that saves a grid it read earlier therefore overwrites edits made since that read. Leaves chunkState and LODs untouched. Requires an app token for the app and either the 'manage_apps' permission on the app (resolved via its org; super admins bypass) or the voxel edit permission for this chunk that updateVoxel checks (app access, the tier's update_voxel_data, and update_voxel_data on the most specific grid covering the chunk). Throws FORBIDDEN otherwise, and for a chunk only the app's world grid covers while the app's wilderness is closed (App.wildernessWritesOpen false). */
|
|
5401
5403
|
updateChunk: Chunk;
|
|
5402
5404
|
/** Replaces the level-of-detail (LOD) set for a chunk, preserving voxels, per-voxel states, chunk state and owner; returns the updated chunk (or null if it could not be written). WRITES world state. Requires a valid bearer token AND the `manage_apps` permission on the org that owns input.appId (super admins bypass). */
|
|
5403
5405
|
updateChunkLods: Maybe<Chunk>;
|
|
@@ -7577,9 +7579,9 @@ export type Query = {
|
|
|
7577
7579
|
inputLogSessions: InputLogSessionConnection;
|
|
7578
7580
|
/** OPERATOR: legal holds, newest first (at most 500), on one organization or account if given; only the ones that apply now unless includeReleased. */
|
|
7579
7581
|
legalHolds: Array<LegalHold>;
|
|
7580
|
-
/** Lists recorded voxel edits for the chunks of a region, grouped per chunk and paginated over chunks: a cube (center +/- maxDistance, by increasing distance) or a box between two corners (lowChunk and highChunk, at most 4,913 chunks, by x, y, z). It reads the edit log alone, so chunks whose grid was never stored are included. Requires a valid bearer token; app-scoped tokens are limited to their own app. Read-only. */
|
|
7582
|
+
/** Lists recorded voxel edits for the chunks of a region, grouped per chunk and paginated over chunks: a cube (center +/- maxDistance, by increasing distance) or a box between two corners (lowChunk and highChunk, at most 4,913 chunks, by x, y, z). It reads the edit log alone, so chunks whose grid was never stored are included. Edits a whole-chunk write has superseded (recorded before Chunk.voxelsUpdatedAt) are left out; the states it stored are listed. Requires a valid bearer token; app-scoped tokens are limited to their own app. Read-only. */
|
|
7581
7583
|
listVoxelUpdatesByDistance: VoxelUpdatesByDistanceResponse;
|
|
7582
|
-
/** Lists the recorded voxel edits of a single chunk (optionally only those at/after `since`), one per voxel position, ordered by position and paged by limit (default and most 65,536) and skip. Requires a valid bearer token; app-scoped tokens are limited to their own app. Read-only. */
|
|
7584
|
+
/** Lists the recorded voxel edits of a single chunk (optionally only those at/after `since`), one per voxel position, ordered by position and paged by limit (default and most 65,536) and skip. Edits a whole-chunk write has superseded (recorded before Chunk.voxelsUpdatedAt) are left out; the states it stored are listed. Requires a valid bearer token; app-scoped tokens are limited to their own app. Read-only. */
|
|
7583
7585
|
listVoxels: Array<Voxel>;
|
|
7584
7586
|
/** One managed player by the id your organization knows it by, or null. An org token with players:manage, or an org admin with manage_players. */
|
|
7585
7587
|
managedPlayer: Maybe<ManagedPlayer>;
|
|
@@ -10044,7 +10046,7 @@ export type VoxelState = {
|
|
|
10044
10046
|
__typename?: 'VoxelState';
|
|
10045
10047
|
/** BASE64-encoded binary state blob for this voxel (decode from base64); null/empty when the voxel has no extra state. */
|
|
10046
10048
|
state: Maybe<Scalars['String']['output']>;
|
|
10047
|
-
/** When this entry was last written: the recorded voxel edit's time, or the chunk's
|
|
10049
|
+
/** When this entry was last written: the recorded voxel edit's time, or for a state stored with the chunk, when the chunk's voxels were last written whole (Chunk.voxelsUpdatedAt; the chunk's last write when that is null). A client that also hears realtime voxel updates keeps, per voxel, the newer of this and a notification's time (a realtime edit is recorded at the time its notification carries, replication servers v0.46.0). Null when the read did not apply recorded edits. Game API v2.69.0; stored states dated by the whole-chunk write since v2.70.0. */
|
|
10048
10050
|
updatedAt: Maybe<Scalars['DateTime']['output']>;
|
|
10049
10051
|
/** Voxel position within the chunk (signed 16-bit per axis, app-defined). */
|
|
10050
10052
|
voxelCoord: VoxelCoordinates;
|