@agoric/internal
Advanced tools
Comparing version 0.1.1-dev-45bc8a1.0 to 0.1.1-dev-5455d71.0
{ | ||
"name": "@agoric/internal", | ||
"version": "0.1.1-dev-45bc8a1.0+45bc8a1", | ||
"version": "0.1.1-dev-5455d71.0+5455d71", | ||
"description": "Externally unsupported utilities internal to agoric-sdk", | ||
@@ -21,7 +21,8 @@ "type": "module", | ||
"dependencies": { | ||
"@endo/eventual-send": "^0.15.5", | ||
"@endo/promise-kit": "^0.2.43" | ||
"@endo/eventual-send": "^0.16.3", | ||
"@endo/marshal": "^0.7.3", | ||
"@endo/promise-kit": "^0.2.47" | ||
}, | ||
"devDependencies": { | ||
"@endo/init": "^0.5.43", | ||
"@endo/init": "^0.5.47", | ||
"ava": "^4.3.1" | ||
@@ -37,3 +38,3 @@ }, | ||
}, | ||
"gitHead": "45bc8a1896c5f51b6fb41863b50fd16c18cfcdff" | ||
"gitHead": "5455d71e07527caa169a4bd4c01583ceee58d722" | ||
} |
// @ts-check | ||
import { E } from '@endo/eventual-send'; | ||
import { deeplyFulfilled, isObject } from '@endo/marshal'; | ||
import { isPromise } from '@endo/promise-kit'; | ||
@@ -175,2 +176,3 @@ | ||
value: (...args) => apply(obj[name], obj, args), | ||
enumerable: true, | ||
}, | ||
@@ -182,1 +184,26 @@ ]), | ||
harden(bindAllMethods); | ||
/** | ||
* @template {{}} T | ||
* @typedef {{ [K in keyof T]: DeeplyAwaited<T[K]> }} DeeplyAwaitedObject | ||
*/ | ||
/** | ||
* Caveats: | ||
* - doesn't recur within Promise results | ||
* - resulting type has wrapper in its name | ||
* | ||
* @template T | ||
* @typedef {T extends PromiseLike ? Awaited<T> : T extends {} ? DeeplyAwaitedObject<T> : Awaited<T>} DeeplyAwaited | ||
*/ | ||
/** | ||
* A more constrained version of {deeplyFulfilled} for type safety until https://github.com/endojs/endo/issues/1257 | ||
* Useful in starting contracts that need all terms to be fulfilled in order to be durable. | ||
* | ||
* @type {<T extends {}>(unfulfilledTerms: T) => DeeplyAwaited<T>} | ||
*/ | ||
export const deeplyFulfilledObject = obj => { | ||
assert(isObject(obj), 'param must be an object'); | ||
return deeplyFulfilled(obj); | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
20703
196
3
+ Added@endo/marshal@^0.7.3
+ Added@endo/eventual-send@0.16.9(transitive)
+ Added@endo/marshal@0.7.6(transitive)
+ Added@endo/nat@4.1.31(transitive)
- Removed@endo/eventual-send@0.15.5(transitive)
Updated@endo/eventual-send@^0.16.3
Updated@endo/promise-kit@^0.2.47