@tinycloud/node-sdk 3.8.0-beta.0 → 3.8.0-beta.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/dist/{TinyCloudNode-BtKzLDJX.d.ts → TinyCloudNode-Ckqu_fqH.d.ts} +1 -1
- package/dist/{TinyCloudNode-ggmlnSfI.d.cts → TinyCloudNode-DDfx8Fx5.d.cts} +1 -1
- package/dist/{authority-_SYAE-uV.d.cts → authority-BwM_s3Ya.d.cts} +2 -2
- package/dist/{authority-sJ6buHMj.d.ts → authority-DcyJpajL.d.ts} +2 -2
- package/dist/core.cjs +7 -4
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.cts +2 -2
- package/dist/core.d.ts +2 -2
- package/dist/core.js +7 -4
- package/dist/core.js.map +1 -1
- package/dist/encryption-keys.d.cts +1 -1
- package/dist/encryption-keys.d.ts +1 -1
- package/dist/index.cjs +10 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/dist/replication/authority.cjs +4 -1
- package/dist/replication/authority.cjs.map +1 -1
- package/dist/replication/authority.d.cts +2 -2
- package/dist/replication/authority.d.ts +2 -2
- package/dist/replication/authority.js +4 -1
- package/dist/replication/authority.js.map +1 -1
- package/package.json +4 -4
|
@@ -275,7 +275,7 @@ interface NodeUserAuthorizationConfig {
|
|
|
275
275
|
* unrestricted `get` covering it is already requested. Storage and
|
|
276
276
|
* scheduling never reach this layer.
|
|
277
277
|
*/
|
|
278
|
-
replication?: Pick<ReplicationOptions, "enabled" | "prefixes" | "allowSecrets">;
|
|
278
|
+
replication?: Pick<ReplicationOptions, "enabled" | "prefixes" | "allowSecrets" | "syncScope">;
|
|
279
279
|
/** Extra top-level resource URIs and their abilities added to the sign-in ReCap (e.g. named-key prefixes). */
|
|
280
280
|
additionalRawAbilities?: Record<string, string[]>;
|
|
281
281
|
/**
|
|
@@ -275,7 +275,7 @@ interface NodeUserAuthorizationConfig {
|
|
|
275
275
|
* unrestricted `get` covering it is already requested. Storage and
|
|
276
276
|
* scheduling never reach this layer.
|
|
277
277
|
*/
|
|
278
|
-
replication?: Pick<ReplicationOptions, "enabled" | "prefixes" | "allowSecrets">;
|
|
278
|
+
replication?: Pick<ReplicationOptions, "enabled" | "prefixes" | "allowSecrets" | "syncScope">;
|
|
279
279
|
/** Extra top-level resource URIs and their abilities added to the sign-in ReCap (e.g. named-key prefixes). */
|
|
280
280
|
additionalRawAbilities?: Record<string, string[]>;
|
|
281
281
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReplicationOptions, PermissionEntry, TinyCloudSession, KVReplicaStorage, ServiceContext, IWasmBindings, WasmRecapEntry } from '@tinycloud/sdk-core';
|
|
2
2
|
import { ReplicaConsentAnchor, AuthorityRefusal, ReplicationAuthority } from '@tinycloud/sdk-services';
|
|
3
3
|
import { ReplicaSessionStamp, ReplicaDenyInput } from '@tinycloud/sdk-services/kv/replication';
|
|
4
|
-
import { T as TinyCloudNode } from './TinyCloudNode-
|
|
4
|
+
import { T as TinyCloudNode } from './TinyCloudNode-DDfx8Fx5.cjs';
|
|
5
5
|
|
|
6
6
|
/** Constructor-time validation; the space-dependent secrets check runs at sign-in and open. */
|
|
7
7
|
declare function assertValidReplicationConfig(replication: (ReplicationOptions & {
|
|
@@ -12,7 +12,7 @@ declare function hasUnrestrictedGetCoverage(entries: readonly PermissionEntry[],
|
|
|
12
12
|
declare function augmentSignInEntriesWithReplication(input: {
|
|
13
13
|
entries: readonly PermissionEntry[];
|
|
14
14
|
primarySpaceId: string;
|
|
15
|
-
replication?: Pick<ReplicationOptions, "prefixes" | "allowSecrets">;
|
|
15
|
+
replication?: Pick<ReplicationOptions, "prefixes" | "allowSecrets" | "syncScope">;
|
|
16
16
|
}): PermissionEntry[];
|
|
17
17
|
|
|
18
18
|
/** Report a completed deny from the already-loaded authority; delivery was revoked synchronously. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReplicationOptions, PermissionEntry, TinyCloudSession, KVReplicaStorage, ServiceContext, IWasmBindings, WasmRecapEntry } from '@tinycloud/sdk-core';
|
|
2
2
|
import { ReplicaConsentAnchor, AuthorityRefusal, ReplicationAuthority } from '@tinycloud/sdk-services';
|
|
3
3
|
import { ReplicaSessionStamp, ReplicaDenyInput } from '@tinycloud/sdk-services/kv/replication';
|
|
4
|
-
import { T as TinyCloudNode } from './TinyCloudNode-
|
|
4
|
+
import { T as TinyCloudNode } from './TinyCloudNode-Ckqu_fqH.js';
|
|
5
5
|
|
|
6
6
|
/** Constructor-time validation; the space-dependent secrets check runs at sign-in and open. */
|
|
7
7
|
declare function assertValidReplicationConfig(replication: (ReplicationOptions & {
|
|
@@ -12,7 +12,7 @@ declare function hasUnrestrictedGetCoverage(entries: readonly PermissionEntry[],
|
|
|
12
12
|
declare function augmentSignInEntriesWithReplication(input: {
|
|
13
13
|
entries: readonly PermissionEntry[];
|
|
14
14
|
primarySpaceId: string;
|
|
15
|
-
replication?: Pick<ReplicationOptions, "prefixes" | "allowSecrets">;
|
|
15
|
+
replication?: Pick<ReplicationOptions, "prefixes" | "allowSecrets" | "syncScope">;
|
|
16
16
|
}): PermissionEntry[];
|
|
17
17
|
|
|
18
18
|
/** Report a completed deny from the already-loaded authority; delivery was revoked synchronously. */
|
package/dist/core.cjs
CHANGED
|
@@ -375,7 +375,7 @@ function augmentSignInEntriesWithReplication(input) {
|
|
|
375
375
|
}
|
|
376
376
|
eligiblePaths.push(path);
|
|
377
377
|
}
|
|
378
|
-
if (eligiblePaths.length === replication.prefixes.length && eligiblePaths.length > 0 && hasUnrestrictedGetCoverage(input.entries, input.primarySpaceId, "")) {
|
|
378
|
+
if (replication.syncScope !== "prefixes" && eligiblePaths.length === replication.prefixes.length && eligiblePaths.length > 0 && hasUnrestrictedGetCoverage(input.entries, input.primarySpaceId, "")) {
|
|
379
379
|
return [{
|
|
380
380
|
service: KV_SERVICE,
|
|
381
381
|
space: input.primarySpaceId,
|
|
@@ -4260,7 +4260,8 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
4260
4260
|
replication: config.replication?.enabled === true ? {
|
|
4261
4261
|
enabled: true,
|
|
4262
4262
|
prefixes: config.replication.prefixes,
|
|
4263
|
-
allowSecrets: config.replication.allowSecrets === true
|
|
4263
|
+
allowSecrets: config.replication.allowSecrets === true,
|
|
4264
|
+
syncScope: config.replication.syncScope
|
|
4264
4265
|
} : void 0
|
|
4265
4266
|
});
|
|
4266
4267
|
this.tc = new import_sdk_core11.TinyCloud(this.auth, {
|
|
@@ -6682,7 +6683,8 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
6682
6683
|
replication: this.config.replication?.enabled === true ? {
|
|
6683
6684
|
enabled: true,
|
|
6684
6685
|
prefixes: this.config.replication.prefixes,
|
|
6685
|
-
allowSecrets: this.config.replication.allowSecrets === true
|
|
6686
|
+
allowSecrets: this.config.replication.allowSecrets === true,
|
|
6687
|
+
syncScope: this.config.replication.syncScope
|
|
6686
6688
|
} : void 0
|
|
6687
6689
|
});
|
|
6688
6690
|
this.tc = new import_sdk_core11.TinyCloud(this.auth, {
|
|
@@ -6744,7 +6746,8 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
6744
6746
|
replication: this.config.replication?.enabled === true ? {
|
|
6745
6747
|
enabled: true,
|
|
6746
6748
|
prefixes: this.config.replication.prefixes,
|
|
6747
|
-
allowSecrets: this.config.replication.allowSecrets === true
|
|
6749
|
+
allowSecrets: this.config.replication.allowSecrets === true,
|
|
6750
|
+
syncScope: this.config.replication.syncScope
|
|
6748
6751
|
} : void 0
|
|
6749
6752
|
});
|
|
6750
6753
|
this.tc = new import_sdk_core11.TinyCloud(this.auth, {
|