@zapier/connectors-sdk 0.1.0-experimental.8 → 0.1.0-experimental.9
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/dist/index.cjs +5 -0
- package/dist/index.js +5 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -574,6 +574,11 @@ function defineConnector(config) {
|
|
|
574
574
|
validateConnectionResolvers(scriptsAsAny, connectionResolvers);
|
|
575
575
|
const wrapped = {};
|
|
576
576
|
for (const [key, definition] of Object.entries(scriptsAsAny)) {
|
|
577
|
+
if (key !== definition.name) {
|
|
578
|
+
throw new Error(
|
|
579
|
+
`defineConnector: script key "${key}" must match its tool name \u2014 got name "${definition.name}". Rename the key to "${definition.name}" or update the tool's name field.`
|
|
580
|
+
);
|
|
581
|
+
}
|
|
577
582
|
wrapped[key] = wrapScriptWithResolvers(definition, connectionResolvers);
|
|
578
583
|
}
|
|
579
584
|
return {
|
package/dist/index.js
CHANGED
|
@@ -468,6 +468,11 @@ function defineConnector(config) {
|
|
|
468
468
|
validateConnectionResolvers(scriptsAsAny, connectionResolvers);
|
|
469
469
|
const wrapped = {};
|
|
470
470
|
for (const [key, definition] of Object.entries(scriptsAsAny)) {
|
|
471
|
+
if (key !== definition.name) {
|
|
472
|
+
throw new Error(
|
|
473
|
+
`defineConnector: script key "${key}" must match its tool name \u2014 got name "${definition.name}". Rename the key to "${definition.name}" or update the tool's name field.`
|
|
474
|
+
);
|
|
475
|
+
}
|
|
471
476
|
wrapped[key] = wrapScriptWithResolvers(definition, connectionResolvers);
|
|
472
477
|
}
|
|
473
478
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zapier/connectors-sdk",
|
|
3
|
-
"version": "0.1.0-experimental.
|
|
3
|
+
"version": "0.1.0-experimental.9",
|
|
4
4
|
"description": "SDK for building Zapier connectors. Provides the authoring primitives and execution surfaces for connector scripts.",
|
|
5
5
|
"license": "Elastic-2.0",
|
|
6
6
|
"type": "module",
|