@zapier/connectors-sdk 0.1.0-experimental.13 → 0.1.0-experimental.14
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 +6 -9
- package/dist/index.js +6 -9
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1164,18 +1164,14 @@ async function handleIfScriptMainBody(wrappedScript, connectionResolvers, io) {
|
|
|
1164
1164
|
} else if (arg === "--filter") {
|
|
1165
1165
|
const value = args[i + 1];
|
|
1166
1166
|
if (value === void 0 || value.length === 0) {
|
|
1167
|
-
throw new Error(
|
|
1168
|
-
`\`--filter\` requires a jq expression, e.g. \`--filter '.results | length'\`.`
|
|
1169
|
-
);
|
|
1167
|
+
throw new Error(`\`--filter\` requires a jq expression argument.`);
|
|
1170
1168
|
}
|
|
1171
1169
|
filter = value;
|
|
1172
1170
|
i++;
|
|
1173
1171
|
} else if (arg.startsWith("--filter=")) {
|
|
1174
1172
|
const value = arg.slice("--filter=".length);
|
|
1175
1173
|
if (value.length === 0) {
|
|
1176
|
-
throw new Error(
|
|
1177
|
-
`\`--filter\` requires a jq expression, e.g. \`--filter '.results | length'\`.`
|
|
1178
|
-
);
|
|
1174
|
+
throw new Error(`\`--filter\` requires a jq expression argument.`);
|
|
1179
1175
|
}
|
|
1180
1176
|
filter = value;
|
|
1181
1177
|
} else if (arg.startsWith("--")) {
|
|
@@ -1257,10 +1253,11 @@ function buildHelpText(definition, connectionResolvers, opts = {}) {
|
|
|
1257
1253
|
}
|
|
1258
1254
|
lines.push("");
|
|
1259
1255
|
lines.push(
|
|
1260
|
-
" --filter <jq> Transform the JSON output through a jq expression
|
|
1256
|
+
" --filter <jq> Transform the JSON output through a jq expression,"
|
|
1257
|
+
);
|
|
1258
|
+
lines.push(
|
|
1259
|
+
" e.g. to trim large results. See the output schema below."
|
|
1261
1260
|
);
|
|
1262
|
-
lines.push(" Useful for trimming large outputs, e.g.");
|
|
1263
|
-
lines.push(" --filter '.results | length'.");
|
|
1264
1261
|
lines.push("");
|
|
1265
1262
|
if (opts.invocation) {
|
|
1266
1263
|
lines.push("Example:");
|
package/dist/index.js
CHANGED
|
@@ -1058,18 +1058,14 @@ async function handleIfScriptMainBody(wrappedScript, connectionResolvers, io) {
|
|
|
1058
1058
|
} else if (arg === "--filter") {
|
|
1059
1059
|
const value = args[i + 1];
|
|
1060
1060
|
if (value === void 0 || value.length === 0) {
|
|
1061
|
-
throw new Error(
|
|
1062
|
-
`\`--filter\` requires a jq expression, e.g. \`--filter '.results | length'\`.`
|
|
1063
|
-
);
|
|
1061
|
+
throw new Error(`\`--filter\` requires a jq expression argument.`);
|
|
1064
1062
|
}
|
|
1065
1063
|
filter = value;
|
|
1066
1064
|
i++;
|
|
1067
1065
|
} else if (arg.startsWith("--filter=")) {
|
|
1068
1066
|
const value = arg.slice("--filter=".length);
|
|
1069
1067
|
if (value.length === 0) {
|
|
1070
|
-
throw new Error(
|
|
1071
|
-
`\`--filter\` requires a jq expression, e.g. \`--filter '.results | length'\`.`
|
|
1072
|
-
);
|
|
1068
|
+
throw new Error(`\`--filter\` requires a jq expression argument.`);
|
|
1073
1069
|
}
|
|
1074
1070
|
filter = value;
|
|
1075
1071
|
} else if (arg.startsWith("--")) {
|
|
@@ -1151,10 +1147,11 @@ function buildHelpText(definition, connectionResolvers, opts = {}) {
|
|
|
1151
1147
|
}
|
|
1152
1148
|
lines.push("");
|
|
1153
1149
|
lines.push(
|
|
1154
|
-
" --filter <jq> Transform the JSON output through a jq expression
|
|
1150
|
+
" --filter <jq> Transform the JSON output through a jq expression,"
|
|
1151
|
+
);
|
|
1152
|
+
lines.push(
|
|
1153
|
+
" e.g. to trim large results. See the output schema below."
|
|
1155
1154
|
);
|
|
1156
|
-
lines.push(" Useful for trimming large outputs, e.g.");
|
|
1157
|
-
lines.push(" --filter '.results | length'.");
|
|
1158
1155
|
lines.push("");
|
|
1159
1156
|
if (opts.invocation) {
|
|
1160
1157
|
lines.push("Example:");
|
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.14",
|
|
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",
|