@somewhere-cloud/cli 0.38.33 → 0.38.34
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/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@somewhere-cloud/cli",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.34",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@somewhere-cloud/cli",
|
|
9
|
-
"version": "0.38.
|
|
9
|
+
"version": "0.38.34",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"@modelcontextprotocol/sdk",
|
|
12
12
|
"chokidar",
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"shared/d1-session.ts": "2ae29b74bba68016c86d25fa2a58f8c2fce4aca8fe57fafc253d380c47a3c0ab",
|
|
7
7
|
"shared/types/placeholder-identity.ts": "089a46e2474a21193d3611eddd9c94b6bbe62441b3039ed80fc8499bada447ca",
|
|
8
8
|
"worker/containers/compile/checker-contract.cjs": "3a8355b9477d89d00bca47cf74032c3b3c6458941cf5c57ddae9e2228b51915d",
|
|
9
|
-
"worker/containers/compile/consumer-contract.cjs": "
|
|
9
|
+
"worker/containers/compile/consumer-contract.cjs": "e76505a4ef8155123cffb61853e23dd66d34137ec777f22457e3440b549fb405",
|
|
10
10
|
"worker/containers/compile/declared-data-contract.cjs": "47ab54cbf6fb20b77e00b2f06e0d283733ee1f3774459f2a6f82c77042c1c93a",
|
|
11
11
|
"worker/containers/compile/generated-declarations-render.cjs": "7ffdb34645cc9eccac6eba39dc86b646a41c4de8a1a038d2b5b46f42df9f1157",
|
|
12
12
|
"worker/containers/compile/generated-declarations.cjs": "6e9902e054c5c784fd9b3c3fafc1869e79954100a45014e1132247cd82833ec4",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"worker/src/utils/telegram-attempt-receipts.ts": "a9ba55ae71f63ada44a105f1ceae04b0491bda0d6e77e5762db2dbecdd2981dd",
|
|
58
58
|
"worker/src/utils/telegram.ts": "dfbc9e756b44b445b3c3504c90a1094a94e6f9853ff9c0e0a84fba0e8c4518da"
|
|
59
59
|
},
|
|
60
|
-
"sha256": "
|
|
60
|
+
"sha256": "3728e85d47ff56425e147895e697e4e3fe4ab3ea4ba993f19d6583a3928fe6d9"
|
|
61
61
|
}
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"worker/src/runtime/inbox.ts": "ace614a3e25f21c05f19c89526d564dc678f2b6131993963ef29e1ef1a53c154",
|
|
67
67
|
"worker/src/runtime/jobs.ts": "eeb96f356cdb51dcc72517d43f1d83d461127f2537c4b970bebba70d313979aa",
|
|
68
68
|
"worker/src/runtime/live-bridge.ts": "2909c5d38625b3ea9d21a10906fe7a503644c9d69f521701fd1cfbed38ea7fd5",
|
|
69
|
-
"worker/src/runtime/live-client.ts": "
|
|
69
|
+
"worker/src/runtime/live-client.ts": "ea04138b4394af4c42ae4eab7c303752a78bf5e2d40fc6e21cda3d25bf93f2f4",
|
|
70
70
|
"worker/src/runtime/logs.ts": "0a28e0c3770bcda51a1daa4efdc6af9324568197cf0b3730ee609b376019b265",
|
|
71
71
|
"worker/src/runtime/managed-intent-wire.ts": "f983c34732c20f98a17cdd2a8087b46dd313f37e1d1ad5fb6771cc6f2a40a6a9",
|
|
72
72
|
"worker/src/runtime/notifications.ts": "52360bfd5a14d5e588ce00bc2db623da510f9e9fc57b1275d1ea85a2b6117396",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"worker/src/runtime/queue.ts": "8f0bdda9bb857125d42cfbe0a4a50561daca56cc929f17bc91e1d4ba151cc998",
|
|
80
80
|
"worker/src/runtime/rate-limit.ts": "a63481a2144a46f39228b3e22b2c18df6e4f02d3ae4fac928cd2ee708cc1d1c8",
|
|
81
81
|
"worker/src/runtime/render.ts": "cbb484f18e410d26fcc87db259e1d10a1b18308405256b6c1a26afc2985707ed",
|
|
82
|
-
"worker/src/runtime/rooms-client.ts": "
|
|
82
|
+
"worker/src/runtime/rooms-client.ts": "b057aadecdff768d16e54f079c127a894d4a1ba51edfe4298a5060ab30bb6313",
|
|
83
83
|
"worker/src/runtime/rooms.ts": "081fecc37d0dcf09ee9f25ccf6060a29ade7b273e21225d962c74b9dd004904f",
|
|
84
84
|
"worker/src/runtime/runtime-console-capture.ts": "db26d6b10dd811fe01ca43405a8a8a6209fb46befae13e2bb1354baeed824fdd",
|
|
85
85
|
"worker/src/runtime/runtime-log-lifecycle.ts": "2019cb8c7c828528c64efbd0150875acb728c552ee4f3a6dbed75c2b836f97fa",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"worker/src/runtime/storage.ts": "15c7953b994497c7883b774f79ae93bae96e16373a0826cc733d21005de22ad7",
|
|
89
89
|
"worker/src/runtime/tasks.ts": "75efa2e3083853bfba1dc49745ede8865ddd218b84d568a00da2dbd669f9ab23",
|
|
90
90
|
"worker/src/runtime/verify-signup.ts": "dcac46b4581794fe875e3f85e3d93a2253b470f60a3c7fcee68543d8be8a6fa1",
|
|
91
|
-
"worker/src/runtime/version.ts": "
|
|
91
|
+
"worker/src/runtime/version.ts": "23c41a315eabe0c9b4d099ef65729ff73d2217f0ba97f3981c5035a27f9b8474",
|
|
92
92
|
"worker/src/runtime/visitor-session.generated.ts": "f788a0c4efe22b18c313d8433150931d48a5f872e3bd98549d94138a5b0dfe5d",
|
|
93
93
|
"worker/src/runtime/web.ts": "269590d44ffa6239bb6e79999b58ba42435c230f045daea52bf73d09519afb0e",
|
|
94
94
|
"worker/src/security/browser-secret-scan.ts": "31ebc9dd94eed4d0a9a6b67b3b1e2505d4f7812c557c90337e034c1e3994c039",
|
|
@@ -161,6 +161,6 @@
|
|
|
161
161
|
"worker/src/utils/telegram.ts": "dfbc9e756b44b445b3c3504c90a1094a94e6f9853ff9c0e0a84fba0e8c4518da",
|
|
162
162
|
"worker/src/vendor/neondatabase-serverless/source.generated.ts": "96a3c18fde7d8888fdb53a4d7cd0721c238a234521d2084d1e66868a8df8e69c"
|
|
163
163
|
},
|
|
164
|
-
"sha256": "
|
|
164
|
+
"sha256": "a9942d5c202b93227f3c0579e3fdd7b930bb68af9bd56211ee5ca41ee02a8874",
|
|
165
165
|
"fixtures_sha256": "908827d1430f4af5a83cae59ed476abc51dc9648757eac0089fe6e6db95f66c5"
|
|
166
166
|
}
|
|
@@ -4445,8 +4445,8 @@ var require_consumer_contract = __commonJS({
|
|
|
4445
4445
|
"worker/containers/compile/consumer-contract.cjs"(exports2, module2) {
|
|
4446
4446
|
"use strict";
|
|
4447
4447
|
var CONSUMER_CONTRACT2 = Object.freeze({
|
|
4448
|
-
version:
|
|
4449
|
-
digest: "
|
|
4448
|
+
version: 6,
|
|
4449
|
+
digest: "8318cd690fc6072c5429b9c64791ead8c4af99058b37b7e83d038dda97308832"
|
|
4450
4450
|
});
|
|
4451
4451
|
var MEMBERSHIPS = "memberships: table({ id: id(), team_id: text(), member_id: text() }, { scope: owner(), client: { read: true } }),";
|
|
4452
4452
|
var SHARES = "shares: table({ id: id(), grantee_id: text() }, { scope: owner(), client: { read: true, create: ['grantee_id'], delete: true }, unique: [['user_id', 'grantee_id']] }),";
|
|
@@ -4486,7 +4486,7 @@ export default schema({
|
|
|
4486
4486
|
["refused: a column named mine", one("owner", "notes: table({ id: id(), mine: text() }, { scope: owner(), client: { read: true } }),")]
|
|
4487
4487
|
]);
|
|
4488
4488
|
var DERIVED = ["generateFromFiles", "localDeclarationFromFiles", "declaredTablesFromFiles", "runtimeDeclarationFromFiles", "filesDeclarationFromFiles"];
|
|
4489
|
-
function consumerContractComponents2(data, sourceLintVersion, hash) {
|
|
4489
|
+
function consumerContractComponents2(data, sourceLintVersion, hash, sourceLintImplementation) {
|
|
4490
4490
|
const forms = {};
|
|
4491
4491
|
for (const [name, source] of CONSUMER_CONTRACT_FORMS) {
|
|
4492
4492
|
const files = { "db/schema.ts": source };
|
|
@@ -4504,6 +4504,7 @@ export default schema({
|
|
|
4504
4504
|
endpoint_declaration: hash(String(data.ENDPOINT_DECLARATION)),
|
|
4505
4505
|
files_declaration: hash(String(data.FILES_DECLARATION_FILE)),
|
|
4506
4506
|
source_lint_version: String(sourceLintVersion),
|
|
4507
|
+
source_lint_implementation: hash(sourceLintImplementation),
|
|
4507
4508
|
forms
|
|
4508
4509
|
};
|
|
4509
4510
|
}
|
package/runtime/source-lint.cjs
CHANGED
|
@@ -17718,6 +17718,12 @@ export function watchLive(load, render, onError) {
|
|
|
17718
17718
|
let pongTimer = null;
|
|
17719
17719
|
let reconnectTimer = null;
|
|
17720
17720
|
let drops = 0;
|
|
17721
|
+
// Set by an account_full control (tsk_d1da4622): terminal until the page is deliberately shown again or comes
|
|
17722
|
+
// back online; the automatic safety refresh does not re-ask, so a full account never causes a reconnect storm.
|
|
17723
|
+
let accountFull = null;
|
|
17724
|
+
// Set by an admission_unavailable control: a temporary refusal. The reconnect backs off (never at once) and the
|
|
17725
|
+
// back-off is kept across refused handshakes; only a healthy admission (the socket's first resync) resets it.
|
|
17726
|
+
let refused = null;
|
|
17721
17727
|
|
|
17722
17728
|
function report(err) {
|
|
17723
17729
|
const retrying = failures <= LIVE_RETRY_LIMIT;
|
|
@@ -17759,14 +17765,21 @@ export function watchLive(load, render, onError) {
|
|
|
17759
17765
|
ws.onmessage = function (message) {
|
|
17760
17766
|
if (stopped || generation !== socketGeneration) return;
|
|
17761
17767
|
if (pongTimer !== null) { clearTimeout(pongTimer); pongTimer = null; }
|
|
17762
|
-
drops = 0;
|
|
17763
17768
|
let frame = null;
|
|
17764
17769
|
try { frame = JSON.parse(message.data); } catch (_) { return; }
|
|
17765
17770
|
if (!frame || frame.type !== 'live_control') return;
|
|
17766
17771
|
// resync_required: rows changed, or this socket just went live.
|
|
17767
17772
|
// release_changed / access_revoked / reauthorize_required: the socket
|
|
17768
17773
|
// closes next; the close handler reconnects through a fresh load.
|
|
17769
|
-
|
|
17774
|
+
// Only an admitted socket is sent resync_required, so it is the healthy-admission signal that resets back-off.
|
|
17775
|
+
if (frame.event === 'resync_required') { drops = 0; refused = null; refresh(false); }
|
|
17776
|
+
if (frame.event === 'admission_unavailable') refused = { code: frame.code || 'ROOM_ADMISSION_UNAVAILABLE', message: frame.message || 'Live list admission is temporarily unavailable.' };
|
|
17777
|
+
if (frame.event === 'account_full') {
|
|
17778
|
+
accountFull = { code: frame.code || 'ROOM_ACCOUNT_FULL', message: frame.message || 'This app has reached its limit of people connected at once.' };
|
|
17779
|
+
// Terminal: cancel pending retries and reconnects; an in-flight load will not reconnect either (see refresh).
|
|
17780
|
+
if (retryTimer !== null) { clearTimeout(retryTimer); retryTimer = null; }
|
|
17781
|
+
if (reconnectTimer !== null) { clearTimeout(reconnectTimer); reconnectTimer = null; }
|
|
17782
|
+
}
|
|
17770
17783
|
};
|
|
17771
17784
|
ws.onopen = function () {
|
|
17772
17785
|
if (stopped || generation !== socketGeneration) return;
|
|
@@ -17785,6 +17798,13 @@ export function watchLive(load, render, onError) {
|
|
|
17785
17798
|
if (closed || stopped || generation !== socketGeneration) return;
|
|
17786
17799
|
closed = true;
|
|
17787
17800
|
stopPing();
|
|
17801
|
+
if (accountFull) {
|
|
17802
|
+
socket = null;
|
|
17803
|
+
liveKey = null;
|
|
17804
|
+
failures = LIVE_RETRY_LIMIT + 1;
|
|
17805
|
+
report(liveError(accountFull.code, accountFull.message));
|
|
17806
|
+
return;
|
|
17807
|
+
}
|
|
17788
17808
|
// An error may leave the socket half-open; close it explicitly so no stale
|
|
17789
17809
|
// connection lingers behind the replacement.
|
|
17790
17810
|
try { ws.close(1000, 'replaced'); } catch (_) {}
|
|
@@ -17794,9 +17814,13 @@ export function watchLive(load, render, onError) {
|
|
|
17794
17814
|
// anything that changed while the socket was down. The first drop
|
|
17795
17815
|
// reconnects at once; repeated drops back off and are reported.
|
|
17796
17816
|
drops += 1;
|
|
17797
|
-
|
|
17817
|
+
const wasRefused = refused;
|
|
17818
|
+
refused = null;
|
|
17819
|
+
if (wasRefused) report(liveError(wasRefused.code, wasRefused.message));
|
|
17820
|
+
else if (drops > 3) report(liveError('LIVE_DISCONNECTED', 'The live connection keeps closing; reconnecting.'));
|
|
17798
17821
|
if (reconnectTimer !== null) return;
|
|
17799
|
-
|
|
17822
|
+
// A temporary admission refusal never reconnects at once; the back-off grows across refused handshakes.
|
|
17823
|
+
const delay = wasRefused ? Math.min(1000 * Math.pow(2, drops - 1), 30000) : drops === 1 ? 0 : Math.min(500 * Math.pow(2, drops - 2), 15000);
|
|
17800
17824
|
reconnectTimer = setTimeout(function () { reconnectTimer = null; refresh(true); }, delay);
|
|
17801
17825
|
}
|
|
17802
17826
|
ws.onclose = onClose;
|
|
@@ -17825,6 +17849,8 @@ export function watchLive(load, render, onError) {
|
|
|
17825
17849
|
: 'load() must return the JSON of a function that returns sw.rooms.live(name, read).');
|
|
17826
17850
|
}
|
|
17827
17851
|
failures = 0;
|
|
17852
|
+
// A full account is terminal until a deliberate retry: a load already in flight renders but never reconnects.
|
|
17853
|
+
if (accountFull) return;
|
|
17828
17854
|
const nextKey = String(live.release_id) + ':' + String(live.fingerprint);
|
|
17829
17855
|
if (reconnect || !socket || nextKey !== liveKey) connect(live);
|
|
17830
17856
|
}).catch(function (err) {
|
|
@@ -17847,10 +17873,11 @@ export function watchLive(load, render, onError) {
|
|
|
17847
17873
|
failures = Math.min(failures, LIVE_RETRY_LIMIT);
|
|
17848
17874
|
refresh(!socket && reconnectTimer === null);
|
|
17849
17875
|
}
|
|
17850
|
-
function
|
|
17876
|
+
function deliberateRepair() { accountFull = null; repair(); }
|
|
17877
|
+
function onVisibility() { if (document.visibilityState === 'visible') deliberateRepair(); }
|
|
17851
17878
|
document.addEventListener('visibilitychange', onVisibility);
|
|
17852
|
-
if (typeof window !== 'undefined') window.addEventListener('online',
|
|
17853
|
-
const safety = setInterval(function () { if (document.visibilityState !== 'hidden') repair(); }, LIVE_SAFETY_REFRESH_MS);
|
|
17879
|
+
if (typeof window !== 'undefined') window.addEventListener('online', deliberateRepair);
|
|
17880
|
+
const safety = setInterval(function () { if (document.visibilityState !== 'hidden' && !accountFull) repair(); }, LIVE_SAFETY_REFRESH_MS);
|
|
17854
17881
|
refresh(true);
|
|
17855
17882
|
|
|
17856
17883
|
return function stop() {
|
|
@@ -17861,7 +17888,7 @@ export function watchLive(load, render, onError) {
|
|
|
17861
17888
|
if (reconnectTimer !== null) clearTimeout(reconnectTimer);
|
|
17862
17889
|
clearInterval(safety);
|
|
17863
17890
|
document.removeEventListener('visibilitychange', onVisibility);
|
|
17864
|
-
if (typeof window !== 'undefined') window.removeEventListener('online',
|
|
17891
|
+
if (typeof window !== 'undefined') window.removeEventListener('online', deliberateRepair);
|
|
17865
17892
|
if (socket) { try { socket.close(1000, 'stopped'); } catch (_) {} }
|
|
17866
17893
|
};
|
|
17867
17894
|
}
|
|
@@ -17875,7 +17902,12 @@ const RENEW_MS = 240000;
|
|
|
17875
17902
|
const PING_MS = 30000;
|
|
17876
17903
|
const PING_FRAME = '{"t":"ping"}';
|
|
17877
17904
|
const PONG_FRAME = '{"t":"pong"}';
|
|
17878
|
-
const FINAL_BYE = { row_deleted: 'ROOM_ROW_DELETED', full: 'ROOM_FULL' };
|
|
17905
|
+
const FINAL_BYE = { row_deleted: 'ROOM_ROW_DELETED', full: 'ROOM_FULL', account_full: 'ROOM_ACCOUNT_FULL' };
|
|
17906
|
+
const FINAL_MESSAGE = {
|
|
17907
|
+
ROOM_FULL: 'This room is full.',
|
|
17908
|
+
ROOM_ROW_DELETED: 'This room\\'s row was deleted.',
|
|
17909
|
+
ROOM_ACCOUNT_FULL: 'This app has reached its limit of people connected at once across all its rooms. Try again later.',
|
|
17910
|
+
};
|
|
17879
17911
|
|
|
17880
17912
|
function roomError(code, message, extra) {
|
|
17881
17913
|
const err = new Error(message);
|
|
@@ -18194,7 +18226,7 @@ class Room {
|
|
|
18194
18226
|
if (this._stopped) return;
|
|
18195
18227
|
const finalCode = this._bye && FINAL_BYE[this._bye];
|
|
18196
18228
|
if (finalCode) {
|
|
18197
|
-
return this._finish(roomError(finalCode, finalCode
|
|
18229
|
+
return this._finish(roomError(finalCode, FINAL_MESSAGE[finalCode]));
|
|
18198
18230
|
}
|
|
18199
18231
|
this._setStatus('reconnecting', { code: this._bye || 'dropped' });
|
|
18200
18232
|
// expired / app_updated rejoin at once with a fresh ticket; a drop backs off.
|