@zapier/kitcore 0.15.0 → 0.16.0
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/CHANGELOG.md +6 -0
- package/dist/index.cjs +10 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +21 -8
- package/dist/index.d.ts +21 -8
- package/dist/index.mjs +10 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @zapier/kitcore
|
|
2
2
|
|
|
3
|
+
## 0.16.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- cd0616e: Added an optional `callContext` to the `defineProperty` `get` bag, so a property getter can read the current call's context (e.g. its correlation id) when accessed through a method's `imports`. Every method call supplies one, at any depth; it is absent only where no call is in flight — the property bound onto the SDK object itself, and reads from a `setup`-time `imports` bag. Additive — existing property getters are unaffected.
|
|
8
|
+
|
|
3
9
|
## 0.15.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -2506,8 +2506,9 @@ function bindValue({
|
|
|
2506
2506
|
frameworkOrigin = false
|
|
2507
2507
|
}) {
|
|
2508
2508
|
if (entry.pluginType === "property" && entry.getValue) {
|
|
2509
|
+
const getValue = entry.getValue;
|
|
2509
2510
|
Object.defineProperty(target, key, {
|
|
2510
|
-
get:
|
|
2511
|
+
get: ctx ? () => getValue(ctx) : getValue,
|
|
2511
2512
|
enumerable: true,
|
|
2512
2513
|
configurable: true
|
|
2513
2514
|
});
|
|
@@ -3046,9 +3047,14 @@ function buildEagerArtifacts(descriptors, context, states) {
|
|
|
3046
3047
|
plugins[id] = {
|
|
3047
3048
|
pluginType: "property",
|
|
3048
3049
|
name: descriptor.name,
|
|
3049
|
-
getValue: () => get({
|
|
3050
|
-
imports: buildImports({
|
|
3051
|
-
|
|
3050
|
+
getValue: (callContext) => get({
|
|
3051
|
+
imports: buildImports({
|
|
3052
|
+
plugins,
|
|
3053
|
+
importBindings,
|
|
3054
|
+
ctx: callContext
|
|
3055
|
+
}),
|
|
3056
|
+
state: states.get(id),
|
|
3057
|
+
callContext
|
|
3052
3058
|
}),
|
|
3053
3059
|
meta: descriptor.meta,
|
|
3054
3060
|
dynamicMembers: descriptor.dynamicMembers
|