@zapier/zapier-sdk 0.105.0 → 0.106.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 +43 -0
- package/dist/{chunk-Y2OATBGZ.cjs → chunk-ABXNGDBT.cjs} +1 -1
- package/dist/{chunk-NF7CPRHH.mjs → chunk-LQLWI2QK.mjs} +1 -1
- package/dist/experimental.cjs +357 -357
- package/dist/experimental.d.mts +9774 -3144
- package/dist/experimental.d.ts +9774 -3144
- package/dist/experimental.mjs +2 -2
- package/dist/{index-DFhYYVH_.d.mts → index-CPD7PuKo.d.mts} +9059 -2415
- package/dist/{index-DFhYYVH_.d.ts → index-CPD7PuKo.d.ts} +9059 -2415
- package/dist/index.cjs +279 -279
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# @zapier/zapier-sdk
|
|
2
2
|
|
|
3
|
+
## 0.106.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 4b9d735: Callers who use the SDK's own methods rather than authoring plugins are
|
|
8
|
+
unaffected by everything below.
|
|
9
|
+
|
|
10
|
+
`createSdk` now checks that a plugin declared by id is satisfied by a provider
|
|
11
|
+
whose types match, not only that some provider exists. Building a graph from
|
|
12
|
+
`declareMethod` / `declareProperty` references and `defineMethod` /
|
|
13
|
+
`defineProperty` providers used to compile on the strength of the id string
|
|
14
|
+
alone, so a provider that contradicted the reference reached the consumer and
|
|
15
|
+
broke at runtime.
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
const doubleRef = declareMethod<"double", { value: number }, number>({
|
|
19
|
+
id: "double",
|
|
20
|
+
});
|
|
21
|
+
// Written for a display surface: it formats instead of computing.
|
|
22
|
+
const formatsIt = defineMethod({
|
|
23
|
+
name: "double",
|
|
24
|
+
run: ({ input }: { input: { value: number } }) => `${input.value * 2}`,
|
|
25
|
+
});
|
|
26
|
+
// Compiled clean before. Rejected at createSdk now.
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
A provider may accept **wider** input and must return a **subtype** of the
|
|
30
|
+
declared output, since the comparison is on the call a consumer makes. **This
|
|
31
|
+
can surface an error in a graph that compiled before**, which is the point:
|
|
32
|
+
correct the provider, or widen the reference to what the provider offers.
|
|
33
|
+
|
|
34
|
+
Added `ContractEntry`, `MethodContract`, `DeclarationSummary`, and
|
|
35
|
+
`OptionalDeclarationSummary`, for annotating a plugin by hand instead of letting
|
|
36
|
+
`define*` infer it. If you already annotate one, update it: `LeafSummary` now
|
|
37
|
+
requires the surfaced binding as a fourth argument, and a two-argument
|
|
38
|
+
`PluginSummary` still compiles while declaring no contract, which drops that
|
|
39
|
+
plugin out of the check silently.
|
|
40
|
+
|
|
41
|
+
### Patch Changes
|
|
42
|
+
|
|
43
|
+
- Updated dependencies [4b9d735]
|
|
44
|
+
- @zapier/kitcore@0.20.0
|
|
45
|
+
|
|
3
46
|
## 0.105.0
|
|
4
47
|
|
|
5
48
|
### Minor Changes
|
|
@@ -2675,7 +2675,7 @@ function logRouteOverride({
|
|
|
2675
2675
|
}
|
|
2676
2676
|
|
|
2677
2677
|
// src/sdk-version.ts
|
|
2678
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.
|
|
2678
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.106.0" : void 0) || "unknown";
|
|
2679
2679
|
|
|
2680
2680
|
// src/utils/open-url.ts
|
|
2681
2681
|
var nodePrefix = "node:";
|
|
@@ -2674,7 +2674,7 @@ function logRouteOverride({
|
|
|
2674
2674
|
}
|
|
2675
2675
|
|
|
2676
2676
|
// src/sdk-version.ts
|
|
2677
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.
|
|
2677
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.106.0" : void 0) || "unknown";
|
|
2678
2678
|
|
|
2679
2679
|
// src/utils/open-url.ts
|
|
2680
2680
|
var nodePrefix = "node:";
|