@tinycloud/share-sdk 1.4.4 → 1.5.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.
@@ -1,5 +1,5 @@
1
1
  import { CompactUcanAuthorization, UnifiedContentSource } from '@tinycloud/share-envelope';
2
- import { A as AddressedOwnerRootInput, a as AddressedOwnerRootReceipt, b as AddressedPublishAuthority } from './addressed-publish-BPFFqD5s.cjs';
2
+ import { A as AddressedOwnerRootInput, a as AddressedOwnerRootReceipt, b as AddressedPublishAuthority } from './addressed-publish-qp_bEVYu.cjs';
3
3
  import { C as CreateOwnerDelegationParams, g as OwnerDelegationReceipt, D as DelegatedShareKey } from './owner-policy-aPmXIR3e.cjs';
4
4
  import './authorization-CmP1skO8.cjs';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { CompactUcanAuthorization, UnifiedContentSource } from '@tinycloud/share-envelope';
2
- import { A as AddressedOwnerRootInput, a as AddressedOwnerRootReceipt, b as AddressedPublishAuthority } from './addressed-publish-DorqWQJ8.js';
2
+ import { A as AddressedOwnerRootInput, a as AddressedOwnerRootReceipt, b as AddressedPublishAuthority } from './addressed-publish-D4IWNXuw.js';
3
3
  import { C as CreateOwnerDelegationParams, g as OwnerDelegationReceipt, D as DelegatedShareKey } from './owner-policy-aPmXIR3e.js';
4
4
  import './authorization-CmP1skO8.js';
5
5
 
@@ -5472,6 +5472,7 @@ function serialize(value) {
5472
5472
  function canonicalize(value) {
5473
5473
  return serialize(value);
5474
5474
  }
5475
+ var POLICY_ROOT_MAX_LIFETIME_SECONDS = 31 * 24 * 60 * 60;
5475
5476
  async function signCompactUcanAuthorization(input) {
5476
5477
  if (input.notBefore >= input.expiresAt || input.expiresAt - input.notBefore > 60) {
5477
5478
  throw new TypeError("compact invocation lifetime must be between one and 60 seconds");
@@ -6621,7 +6622,7 @@ var SHARE_ROOT_LINK_MAX_LIFETIME_MS = 30 * DAY_MS;
6621
6622
  var SHARE_ROOT_CLOCK_SKEW_MS = 5 * 6e4;
6622
6623
  var SHARE_ROOT_REQUEST_MARGIN_MS = 10 * 6e4;
6623
6624
  var MAX_NODE_ANSWER_BYTES = 64 * 1024;
6624
- var MAX_POLICY_ROOT_MS = 31 * DAY_MS;
6625
+ var MAX_POLICY_ROOT_MS = POLICY_ROOT_MAX_LIFETIME_SECONDS * 1e3;
6625
6626
  var PROFILES = {
6626
6627
  share: { spaceName: "applications", maxLifetimeMs: SHARE_ROOT_MAX_LIFETIME_MS },
6627
6628
  agent: { spaceName: "default", maxLifetimeMs: AGENT_SHARE_ROOT_MAX_LIFETIME_MS }