castle-web-cli 0.4.154 → 0.4.156
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/dist/castle-host/host.js
CHANGED
|
@@ -289,16 +289,19 @@ function unavailableOutcome() {
|
|
|
289
289
|
}
|
|
290
290
|
async function deckStorageLoad(ctx, gql) {
|
|
291
291
|
const deckId = requireDeckId(ctx, "deckStorage.load");
|
|
292
|
-
const data = await graphql(gql, DECK_STORAGE_QUERY,
|
|
292
|
+
const data = await graphql(gql, DECK_STORAGE_QUERY,
|
|
293
|
+
// Same reason as shared storage: a play session is not a save slot. With one
|
|
294
|
+
// the key becomes per-play, so a deck's own save data is gone next time.
|
|
295
|
+
{ deckId, sessionId: null }, "deckStorage.load");
|
|
293
296
|
return { blob: data.deckStorage ?? {} };
|
|
294
297
|
}
|
|
295
298
|
async function deckStorageUpdate(ctx, params, gql) {
|
|
296
299
|
const deckId = requireDeckId(ctx, "deckStorage.update");
|
|
297
300
|
const data = await graphql(gql, UPDATE_DECK_STORAGE_MUTATION, {
|
|
298
301
|
deckId,
|
|
299
|
-
sessionId:
|
|
302
|
+
sessionId: null,
|
|
300
303
|
updates: asUpdates(params.updates),
|
|
301
|
-
}, "deckStorage.update");
|
|
304
|
+
}, "deckStorage.update", { unload: params.unload === true });
|
|
302
305
|
return { blob: data.updateDeckStorage ?? {} };
|
|
303
306
|
}
|
|
304
307
|
async function sharedDeckStorageLoad(ctx, params, gql) {
|
|
@@ -320,7 +323,7 @@ async function sharedDeckStorageUpdate(ctx, params, gql) {
|
|
|
320
323
|
// 'user'-scope writes are forced to the current player — the deck cannot
|
|
321
324
|
// write another player's bucket.
|
|
322
325
|
const userId = scope === "user" ? requireUserId(ctx, "sharedDeckStorage.update") : null;
|
|
323
|
-
await graphql(gql, UPDATE_SHARED_DECK_STORAGE_MUTATION, { deckId, sessionId: null, userId, updates: asUpdates(params.updates) }, "sharedDeckStorage.update");
|
|
326
|
+
await graphql(gql, UPDATE_SHARED_DECK_STORAGE_MUTATION, { deckId, sessionId: null, userId, updates: asUpdates(params.updates) }, "sharedDeckStorage.update", { unload: params.unload === true });
|
|
324
327
|
return { ok: true };
|
|
325
328
|
}
|
|
326
329
|
async function leaderboardFetch(ctx, params, caps) {
|
|
@@ -494,8 +497,8 @@ async function timeGetServerTime(gql) {
|
|
|
494
497
|
castleEpochData: data.serverTime.castleEpochData,
|
|
495
498
|
};
|
|
496
499
|
}
|
|
497
|
-
async function graphql(gql, query, variables, command) {
|
|
498
|
-
const result = await gql(query, variables);
|
|
500
|
+
async function graphql(gql, query, variables, command, options) {
|
|
501
|
+
const result = await gql(query, variables, options);
|
|
499
502
|
if (result.errors && result.errors.length > 0) {
|
|
500
503
|
const first = result.errors[0];
|
|
501
504
|
const code = first?.extensions?.code;
|
package/dist/init.js
CHANGED
|
@@ -46,7 +46,7 @@ export const BARE_DOCS_KIT = 'blank';
|
|
|
46
46
|
// Registry version of castle-web-sdk to inject when scaffolding from a
|
|
47
47
|
// globally-installed castle-web (not from inside the workspace). Bumped
|
|
48
48
|
// alongside cli/sdk version bumps.
|
|
49
|
-
const PUBLISHED_SDK_VERSION = '0.4.
|
|
49
|
+
const PUBLISHED_SDK_VERSION = '0.4.21';
|
|
50
50
|
// Range, not a pin: `castle-web-fonts` is its own package precisely so a tenth
|
|
51
51
|
// face can ship without a cli release, and a caret range means an existing
|
|
52
52
|
// deck's next install picks it up. Nothing here has to move when it does.
|
package/kits/blank/castle.json
CHANGED