@tinycloud/sdk-services 3.2.5 → 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 +16 -8
- 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 +16 -8
- 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
package/dist/index.cjs
CHANGED
|
@@ -233,6 +233,8 @@ var TelemetryEvents = {
|
|
|
233
233
|
REPLICATION_SYNC: "replication.sync",
|
|
234
234
|
REPLICATION_STATE: "replication.state",
|
|
235
235
|
REPLICATION_DIVERGENCE: "replication.divergence",
|
|
236
|
+
REPLICATION_GRANT: "replication.grant",
|
|
237
|
+
REPLICATION_LIFECYCLE: "replication.lifecycle",
|
|
236
238
|
/** Emitted once, on the first write rejected because storage is full. */
|
|
237
239
|
STORAGE_FULL: "storage.full"
|
|
238
240
|
};
|
|
@@ -269,21 +271,27 @@ var SAFE_NUMBER_FIELDS = /* @__PURE__ */ new Set([
|
|
|
269
271
|
"fetched",
|
|
270
272
|
"pages",
|
|
271
273
|
"lagMs",
|
|
272
|
-
"pendingCleared"
|
|
274
|
+
"pendingCleared",
|
|
275
|
+
"partitions",
|
|
276
|
+
"remaining",
|
|
277
|
+
"expiryMs"
|
|
273
278
|
]);
|
|
274
|
-
var SAFE_BOOLEAN_FIELDS = /* @__PURE__ */ new Set(["authenticated", "ok", "persisted"]);
|
|
279
|
+
var SAFE_BOOLEAN_FIELDS = /* @__PURE__ */ new Set(["authenticated", "ok", "persisted", "purgePending"]);
|
|
275
280
|
var SAFE_REPLICATION_FIELDS = {
|
|
276
281
|
source: ["replica", "network", "none"],
|
|
277
|
-
reason: ["hit", "absent", "deleted", "content_missing", "coverage_incomplete", "not_covered", "pending_write", "grant_missing", "grant_expired", "grant_revoked", "grant_not_yet_valid", "stale", "replica_error", "runtime_unsupported", "replica_unavailable", "unsupported_option", "network_cursor", "cursor_restart", "aborted", "REPLICA_BEHIND_OWN_WRITES", "REPLICA_UNPROVEN_SINCE_START", "NETWORK_REQUESTED"],
|
|
282
|
+
reason: ["hit", "absent", "deleted", "content_missing", "coverage_incomplete", "not_covered", "pending_write", "grant_missing", "grant_expired", "grant_revoked", "grant_not_yet_valid", "stale", "replica_error", "runtime_unsupported", "replica_unavailable", "unsupported_option", "network_cursor", "cursor_restart", "aborted", "REPLICA_BEHIND_OWN_WRITES", "REPLICA_UNPROVEN_SINCE_START", "NETWORK_REQUESTED", "replica_gated", "sign_out", "account_switch", "consent_expired", "startup"],
|
|
278
283
|
op: ["get", "list", "put", "delete", "batchPut"],
|
|
279
|
-
trigger: ["start", "interval", "stale_read", "manual"],
|
|
284
|
+
trigger: ["start", "interval", "stale_read", "manual", "peer"],
|
|
285
|
+
origin: ["peer"],
|
|
280
286
|
outcome: ["found", "not_found", "error", "committed", "failed", "ambiguous", "ok", "busy", "aborted"],
|
|
281
|
-
class: ["offline", "authority", "storage", "node"],
|
|
282
|
-
state: ["opened", "grant_installed", "grant_missing", "runtime_unsupported", "unavailable", "revoked", "recreated", "purged", "purge_failed", "pending_store_error", "pinned", "pending_cleared", "closed", "idle", "ready"],
|
|
287
|
+
class: ["offline", "authority", "storage", "node", "lifecycle"],
|
|
288
|
+
state: ["opened", "grant_installed", "grant_missing", "runtime_unsupported", "unavailable", "revoked", "recreated", "purged", "purge_failed", "pending_store_error", "pinned", "pending_cleared", "closed", "idle", "ready", "gated"],
|
|
289
|
+
action: ["minted", "renewed", "renewal_refused", "renewal_deferred", "capped", "expired", "consent_deadline_reached", "denied", "deny_stale", "deny_failed", "database_deleted", "marker_set", "marker_cleared", "unguarded", "drained", "erased", "erase_failed", "activation_blocked", "activated", "recovered"],
|
|
290
|
+
gate: ["not_established", "stamp_stale", "principal_mismatch", "purge_pending", "logout_pending", "gate_unavailable"],
|
|
283
291
|
kind: ["value", "missing_local", "extra_local", "keys", "order"],
|
|
284
292
|
coverage: ["empty", "bootstrapping", "complete"],
|
|
285
293
|
authority: ["valid", "expired", "revoked", "not-yet-valid"],
|
|
286
|
-
code: ["NETWORK_ERROR", "TIMEOUT", "ABORTED", "REPLICA_BUSY", "REPLICA_BEHIND_OWN_WRITES", "REPLICA_UNPROVEN_SINCE_START", "NETWORK_REQUESTED", "INTEGRITY_ERROR", "STORAGE_ERROR", "REPLICA_CLOSED", "RUNTIME_UNSUPPORTED", "GRANT_EXPIRED", "GRANT_REVOKED", "GRANT_NOT_YET_VALID", "GRANT_MISSING", "GRANT_INVALID", "SOURCE_CHANGED", "PROTOCOL_ERROR", "SCOPE_VIOLATION", "NODE_ERROR", "CONTENT_MISMATCH", "STORAGE_FULL"],
|
|
294
|
+
code: ["NETWORK_ERROR", "TIMEOUT", "ABORTED", "REPLICA_BUSY", "REPLICA_BEHIND_OWN_WRITES", "REPLICA_UNPROVEN_SINCE_START", "NETWORK_REQUESTED", "INTEGRITY_ERROR", "STORAGE_ERROR", "REPLICA_CLOSED", "RUNTIME_UNSUPPORTED", "GRANT_EXPIRED", "GRANT_REVOKED", "GRANT_NOT_YET_VALID", "GRANT_MISSING", "GRANT_INVALID", "SOURCE_CHANGED", "PROTOCOL_ERROR", "SCOPE_VIOLATION", "NODE_ERROR", "CONTENT_MISMATCH", "STORAGE_FULL", "REPLICA_GATED", "RESET_REQUIRED", "STORAGE_BUDGET", "CONSENT_EXPIRED"],
|
|
287
295
|
pendingState: ["in_flight", "committed", "ambiguous"],
|
|
288
296
|
strategy: ["session", "minted", "installed"],
|
|
289
297
|
verify: ["match", "diverged", "error", "aborted"]
|
|
@@ -1036,7 +1044,7 @@ var ServiceContext = class {
|
|
|
1036
1044
|
}
|
|
1037
1045
|
assertActive() {
|
|
1038
1046
|
if (this._retired) {
|
|
1039
|
-
throw new Error("Service graph has been retired
|
|
1047
|
+
throw new Error("Service graph has been retired: its session was replaced or signed out.");
|
|
1040
1048
|
}
|
|
1041
1049
|
}
|
|
1042
1050
|
wrapInvokeAny(invokeAny) {
|