@tinycloud/operations 0.5.4-beta.0 → 0.5.4-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.
@@ -5748,12 +5748,12 @@ async function importRequestBoundDelegation(context, input) {
5748
5748
  { host }
5749
5749
  );
5750
5750
  } catch (error) {
5751
- if (typeof error === "object" && error !== null && "reason" in error && error.reason === "expired") {
5752
- return expiredDelegation();
5753
- }
5751
+ const reason = typeof error === "object" && error !== null && "reason" in error ? error.reason : void 0;
5752
+ if (reason === "expired") return expiredDelegation();
5754
5753
  return operationFailure(
5755
5754
  "DELEGATION_REJECTED",
5756
- "The delegation was rejected by the TinyCloud runtime."
5755
+ "The delegation was rejected by the TinyCloud runtime.",
5756
+ typeof reason === "string" ? { reason } : void 0
5757
5757
  );
5758
5758
  }
5759
5759
  const effectivePermissions = canonicalizeCapabilities(activated.effectivePermissions);
@@ -8959,13 +8959,14 @@ module.exports = __toCommonJS(cli_runtime_exports);
8959
8959
  var import_node_crypto3 = require("crypto");
8960
8960
  var import_node_path4 = require("path");
8961
8961
  init_cli_name();
8962
- var import_node_sdk = require("@tinycloud/node-sdk");
8962
+ var import_node_sdk2 = require("@tinycloud/node-sdk");
8963
8963
  init_jcs();
8964
8964
  init_errors2();
8965
8965
  init_authority();
8966
8966
  init_artifacts();
8967
8967
 
8968
8968
  // src/redaction.ts
8969
+ var import_node_sdk = require("@tinycloud/node-sdk");
8969
8970
  init_recovery();
8970
8971
 
8971
8972
  // src/safe-values.ts
@@ -9075,6 +9076,10 @@ var SAFE_ERROR_DETAIL_POLICIES = {
9075
9076
  expectedHost: safeOriginHost,
9076
9077
  artifactHost: safeOriginHost
9077
9078
  },
9079
+ // `RuntimeDelegationRejectedError.reason` from validated activation.
9080
+ DELEGATION_REJECTED: {
9081
+ reason: (value) => import_node_sdk.RUNTIME_DELEGATION_REJECTIONS.some((reason) => reason === value) ? value : void 0
9082
+ },
9078
9083
  STORAGE_QUOTA_EXCEEDED: {
9079
9084
  account: safeStorageAccount
9080
9085
  }
@@ -9761,11 +9766,11 @@ function requirementsBelongToAuthenticatedOwner(requirements, authenticatedSpace
9761
9766
  }
9762
9767
  function canonicalPkhOwner(space) {
9763
9768
  if (typeof space !== "string") return void 0;
9764
- const parsedSpace = (0, import_node_sdk.parseSpaceUri)(space);
9769
+ const parsedSpace = (0, import_node_sdk2.parseSpaceUri)(space);
9765
9770
  if (parsedSpace === null) return void 0;
9766
9771
  try {
9767
- const pkh = (0, import_node_sdk.parsePkhDid)(parsedSpace.owner);
9768
- return pkh === null ? void 0 : (0, import_node_sdk.parseSpaceUri)((0, import_node_sdk.makePkhSpaceId)(pkh.address, pkh.chainId, parsedSpace.name))?.owner;
9772
+ const pkh = (0, import_node_sdk2.parsePkhDid)(parsedSpace.owner);
9773
+ return pkh === null ? void 0 : (0, import_node_sdk2.parseSpaceUri)((0, import_node_sdk2.makePkhSpaceId)(pkh.address, pkh.chainId, parsedSpace.name))?.owner;
9769
9774
  } catch {
9770
9775
  return void 0;
9771
9776
  }