@tinycloud/sdk-services 3.2.6-beta.2 → 3.2.6-beta.4
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/{BaseService-4wwJq1Gn.d.cts → BaseService-1Ug6y7DC.d.cts} +1 -1
- package/dist/{BaseService-BGr2slUz.d.ts → BaseService-Bn07Vudy.d.ts} +1 -1
- package/dist/encryption/index.cjs +2 -0
- package/dist/encryption/index.cjs.map +1 -1
- package/dist/encryption/index.d.cts +2 -2
- package/dist/encryption/index.d.ts +2 -2
- package/dist/encryption/index.js +2 -0
- package/dist/encryption/index.js.map +1 -1
- package/dist/index.cjs +15 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -11
- package/dist/index.d.ts +14 -11
- package/dist/index.js +15 -7
- package/dist/index.js.map +1 -1
- package/dist/internal/decrypt-transport-response-error.d.cts +1 -1
- package/dist/internal/decrypt-transport-response-error.d.ts +1 -1
- package/dist/kv/index.cjs +2 -0
- package/dist/kv/index.cjs.map +1 -1
- package/dist/kv/index.d.cts +7 -4
- package/dist/kv/index.d.ts +7 -4
- package/dist/kv/index.js +2 -0
- package/dist/kv/index.js.map +1 -1
- package/dist/kv/replication/contractConstants.cjs +115 -0
- package/dist/kv/replication/contractConstants.cjs.map +1 -0
- package/dist/kv/replication/contractConstants.d.cts +77 -0
- package/dist/kv/replication/contractConstants.d.ts +77 -0
- package/dist/kv/replication/contractConstants.js +75 -0
- package/dist/kv/replication/contractConstants.js.map +1 -0
- package/dist/kv/replication/grantPolicyConstants.cjs +42 -0
- package/dist/kv/replication/grantPolicyConstants.cjs.map +1 -0
- package/dist/kv/replication/grantPolicyConstants.d.cts +10 -0
- package/dist/kv/replication/grantPolicyConstants.d.ts +10 -0
- package/dist/kv/replication/grantPolicyConstants.js +14 -0
- package/dist/kv/replication/grantPolicyConstants.js.map +1 -0
- package/dist/kv/replication/grantPolicyTypes.cjs +19 -0
- package/dist/kv/replication/grantPolicyTypes.cjs.map +1 -0
- package/dist/kv/replication/grantPolicyTypes.d.cts +87 -0
- package/dist/kv/replication/grantPolicyTypes.d.ts +87 -0
- package/dist/kv/replication/grantPolicyTypes.js +1 -0
- package/dist/kv/replication/grantPolicyTypes.js.map +1 -0
- package/dist/kv/replication/index.cjs +5 -4
- package/dist/kv/replication/index.cjs.map +1 -1
- package/dist/kv/replication/index.d.cts +6 -3
- package/dist/kv/replication/index.d.ts +6 -3
- package/dist/kv/replication/index.js +5 -4
- package/dist/kv/replication/index.js.map +1 -1
- package/dist/scope-BnyVPZ5E.d.ts +1659 -0
- package/dist/scope-CQ5kmHlt.d.cts +1659 -0
- package/dist/sql/index.cjs +2 -0
- package/dist/sql/index.cjs.map +1 -1
- package/dist/sql/index.d.cts +2 -2
- package/dist/sql/index.d.ts +2 -2
- package/dist/sql/index.js +2 -0
- package/dist/sql/index.js.map +1 -1
- package/dist/{types-D-9A3Sut.d.cts → types-gmdUiorz.d.cts} +2 -0
- package/dist/{types-D-9A3Sut.d.ts → types-gmdUiorz.d.ts} +2 -0
- package/package.json +40 -1
- package/dist/scope-CoKKmMiI.d.ts +0 -957
- package/dist/scope-D7wmjbMH.d.cts +0 -957
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { K as KVReplicationDeps, a as KVReplicationController, R as ReplicationIdentity, P as PendingWriteStore } from '../../scope-
|
|
2
|
-
export { A as AuthorityRefusal, C as CLEAR_PENDING_WARNING, b as KVListPage, c as KVReadThrough, d as KVReplicaHandle, e as KVReplicaSpec, f as KVReplicaStorage, L as LocalGetResult, g as LocalListResult, h as LocalReadMeta, i as LocalReplicaStatus, j as LocalSyncResult, k as PendingWriteRecord, l as PendingWriteState, m as PinnedKey, n as PurgeTarget, o as
|
|
1
|
+
import { K as KVReplicationDeps, a as KVReplicationController, R as ReplicationIdentity, P as PendingWriteStore } from '../../scope-CQ5kmHlt.cjs';
|
|
2
|
+
export { A as AuthorityRefusal, C as CLEAR_PENDING_WARNING, b as KVListPage, c as KVReadThrough, d as KVReplicaHandle, e as KVReplicaSpec, f as KVReplicaStorage, L as LocalGetResult, g as LocalListResult, h as LocalReadMeta, i as LocalReplicaStatus, j as LocalSyncResult, k as PendingWriteRecord, l as PendingWriteState, m as PinnedKey, n as PurgeTarget, o as ReplicaAccountGate, p as ReplicaAdmitHook, q as ReplicaAuthorityState, r as ReplicaBrowserGateAccess, s as ReplicaBrowserGateSnapshot, t as ReplicaBrowserGateTx, u as ReplicaBrowserPageAdmission, v as ReplicaClock, w as ReplicaCoverage, x as ReplicaDeliveryDecision, y as ReplicaDenyInput, z as ReplicaDenyOutcome, B as ReplicaDevice, D as ReplicaEraseReport, E as ReplicaGateAccess, F as ReplicaGateReason, G as ReplicaGateScope, H as ReplicaGateSnapshot, I as ReplicaGateTx, J as ReplicaGatedError, M as ReplicaGatedHandle, N as ReplicaGatedSpec, O as ReplicaGatedStorage, Q as ReplicaGrantInfo, S as ReplicaGuardedStore, T as ReplicaInspectedStatus, U as ReplicaLifecycleGate, V as ReplicaPageAdmission, W as ReplicaPartitionEraser, X as ReplicaPartitionIndexEntry, Y as ReplicaPeerCommit, Z as ReplicaPrivateGateHash, _ as ReplicaPurgeIntent, $ as ReplicaQuotaLedger, a0 as ReplicaQuotaSpec, a1 as ReplicaSessionStamp, a2 as ReplicaStampedReply, a3 as ReplicaState, a4 as ReplicaStatusEntry, a5 as ReplicationAuthority, a6 as ReplicationControl, a7 as ReplicationEvent, a8 as ReplicationOptions, a9 as ReplicationPurgeReport, aa as ReplicationReason, ab as ReplicationScheduler, ac as ResolvedReplicationOptions, ad as SaltedHash, ae as canonicalReplicationIdentity, af as replicationIdentityKey, ag as requiresSecretsOptIn } from '../../scope-CQ5kmHlt.cjs';
|
|
3
|
+
export { ClampConsentAnchor, ConsentDeadlineMs, EffectiveGrantExpiry, EffectiveGrantExpiryInput, MintRemainingMs, NeedsSilentRenewal, ReplicaConsentAnchor, ReplicaConsentSource, ReplicaGrantPolicy } from './grantPolicyTypes.cjs';
|
|
3
4
|
export { kvPrefixCovers } from './prefix.cjs';
|
|
4
|
-
import '../../types-
|
|
5
|
+
import '../../types-gmdUiorz.cjs';
|
|
6
|
+
import './contractConstants.cjs';
|
|
7
|
+
import './grantPolicyConstants.cjs';
|
|
5
8
|
|
|
6
9
|
declare function createKVReplication(deps: KVReplicationDeps): KVReplicationController;
|
|
7
10
|
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { K as KVReplicationDeps, a as KVReplicationController, R as ReplicationIdentity, P as PendingWriteStore } from '../../scope-
|
|
2
|
-
export { A as AuthorityRefusal, C as CLEAR_PENDING_WARNING, b as KVListPage, c as KVReadThrough, d as KVReplicaHandle, e as KVReplicaSpec, f as KVReplicaStorage, L as LocalGetResult, g as LocalListResult, h as LocalReadMeta, i as LocalReplicaStatus, j as LocalSyncResult, k as PendingWriteRecord, l as PendingWriteState, m as PinnedKey, n as PurgeTarget, o as
|
|
1
|
+
import { K as KVReplicationDeps, a as KVReplicationController, R as ReplicationIdentity, P as PendingWriteStore } from '../../scope-BnyVPZ5E.js';
|
|
2
|
+
export { A as AuthorityRefusal, C as CLEAR_PENDING_WARNING, b as KVListPage, c as KVReadThrough, d as KVReplicaHandle, e as KVReplicaSpec, f as KVReplicaStorage, L as LocalGetResult, g as LocalListResult, h as LocalReadMeta, i as LocalReplicaStatus, j as LocalSyncResult, k as PendingWriteRecord, l as PendingWriteState, m as PinnedKey, n as PurgeTarget, o as ReplicaAccountGate, p as ReplicaAdmitHook, q as ReplicaAuthorityState, r as ReplicaBrowserGateAccess, s as ReplicaBrowserGateSnapshot, t as ReplicaBrowserGateTx, u as ReplicaBrowserPageAdmission, v as ReplicaClock, w as ReplicaCoverage, x as ReplicaDeliveryDecision, y as ReplicaDenyInput, z as ReplicaDenyOutcome, B as ReplicaDevice, D as ReplicaEraseReport, E as ReplicaGateAccess, F as ReplicaGateReason, G as ReplicaGateScope, H as ReplicaGateSnapshot, I as ReplicaGateTx, J as ReplicaGatedError, M as ReplicaGatedHandle, N as ReplicaGatedSpec, O as ReplicaGatedStorage, Q as ReplicaGrantInfo, S as ReplicaGuardedStore, T as ReplicaInspectedStatus, U as ReplicaLifecycleGate, V as ReplicaPageAdmission, W as ReplicaPartitionEraser, X as ReplicaPartitionIndexEntry, Y as ReplicaPeerCommit, Z as ReplicaPrivateGateHash, _ as ReplicaPurgeIntent, $ as ReplicaQuotaLedger, a0 as ReplicaQuotaSpec, a1 as ReplicaSessionStamp, a2 as ReplicaStampedReply, a3 as ReplicaState, a4 as ReplicaStatusEntry, a5 as ReplicationAuthority, a6 as ReplicationControl, a7 as ReplicationEvent, a8 as ReplicationOptions, a9 as ReplicationPurgeReport, aa as ReplicationReason, ab as ReplicationScheduler, ac as ResolvedReplicationOptions, ad as SaltedHash, ae as canonicalReplicationIdentity, af as replicationIdentityKey, ag as requiresSecretsOptIn } from '../../scope-BnyVPZ5E.js';
|
|
3
|
+
export { ClampConsentAnchor, ConsentDeadlineMs, EffectiveGrantExpiry, EffectiveGrantExpiryInput, MintRemainingMs, NeedsSilentRenewal, ReplicaConsentAnchor, ReplicaConsentSource, ReplicaGrantPolicy } from './grantPolicyTypes.js';
|
|
3
4
|
export { kvPrefixCovers } from './prefix.js';
|
|
4
|
-
import '../../types-
|
|
5
|
+
import '../../types-gmdUiorz.js';
|
|
6
|
+
import './contractConstants.js';
|
|
7
|
+
import './grantPolicyConstants.js';
|
|
5
8
|
|
|
6
9
|
declare function createKVReplication(deps: KVReplicationDeps): KVReplicationController;
|
|
7
10
|
|
|
@@ -1169,23 +1169,24 @@ function createKVReplication(deps) {
|
|
|
1169
1169
|
if (!local && !opened?.opening && !opened?.authorityRevoked) inspected = await inspectPersistedStatus(prefix);
|
|
1170
1170
|
local ?? (local = inspected.local);
|
|
1171
1171
|
if (inspected.missing && !opened?.reason && !opened?.authorityRevoked && !opened?.opening && !isClosed) return void 0;
|
|
1172
|
-
const
|
|
1172
|
+
const full = local && !("redacted" in local) ? local : void 0;
|
|
1173
|
+
const revoked = opened?.authorityRevoked === true || full?.authority.state === "revoked";
|
|
1173
1174
|
const rootUnsupported = opened?.lastError === "REPLICATION_ROOT_UNSUPPORTED";
|
|
1174
|
-
const state = isClosed ? "closed" : revoked ? "revoked" : rootUnsupported ? "unavailable" : opened?.reason === "grant_missing" ? "grant_missing" :
|
|
1175
|
+
const state = isClosed ? "closed" : revoked ? "revoked" : rootUnsupported ? "unavailable" : opened?.reason === "grant_missing" ? "grant_missing" : full?.coverage === "complete" && full.authority.state === "valid" ? "ready" : opened?.reason || inspected.errorCode ? "unavailable" : "idle";
|
|
1175
1176
|
return {
|
|
1176
1177
|
prefix,
|
|
1177
1178
|
state,
|
|
1178
1179
|
...opened?.reason ? { reason: opened.reason } : inspected.errorCode ? { reason: "replica_unavailable" } : {},
|
|
1179
1180
|
...inspected.errorCode ?? opened?.lastError ? { errorCode: inspected.errorCode ?? opened?.lastError } : {},
|
|
1180
1181
|
...local ?? {},
|
|
1181
|
-
...revoked ? { authority: { state: "revoked", expiresAt:
|
|
1182
|
+
...revoked ? { authority: { state: "revoked", expiresAt: full?.authority.expiresAt ?? null } } : {},
|
|
1182
1183
|
pending: {
|
|
1183
1184
|
inFlight: records.filter((r) => r.state === "in_flight").length,
|
|
1184
1185
|
committed: records.filter((r) => r.state === "committed").length,
|
|
1185
1186
|
ambiguous: records.filter((r) => r.state === "ambiguous").length
|
|
1186
1187
|
},
|
|
1187
1188
|
pinned: pinnedKeys(snapshot, prefix, scheduler.now()),
|
|
1188
|
-
lagMs:
|
|
1189
|
+
lagMs: full?.lastSyncAt ? scheduler.now() - Date.parse(full.lastSyncAt) : null
|
|
1189
1190
|
};
|
|
1190
1191
|
}));
|
|
1191
1192
|
return entries.filter((entry) => entry !== void 0);
|