@zapier/zapier-sdk-cli 0.34.9 → 0.34.10
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 +9 -0
- package/dist/cli.cjs +111 -90
- package/dist/cli.mjs +110 -89
- package/dist/index.cjs +5 -2
- package/dist/index.mjs +5 -2
- package/dist/package.json +1 -1
- package/dist/src/plugins/cliOverrides/index.d.ts +2 -1
- package/dist/src/plugins/cliOverrides/index.js +3 -0
- package/dist/src/utils/cli-generator.js +14 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
package/dist/package.json
CHANGED
|
@@ -12,6 +12,9 @@ export const cliOverridesPlugin = ({ context }) => {
|
|
|
12
12
|
fetch: {
|
|
13
13
|
...context.meta.fetch,
|
|
14
14
|
categories: [...(context.meta.fetch.categories || []), "deprecated"],
|
|
15
|
+
deprecation: {
|
|
16
|
+
message: "This command is deprecated and will be removed soon. Use `curl` instead. Learn more: https://docs.zapier.com/sdk/cli-reference#curl",
|
|
17
|
+
},
|
|
15
18
|
},
|
|
16
19
|
},
|
|
17
20
|
},
|
|
@@ -67,6 +67,16 @@ async function promptConfirm(confirmType) {
|
|
|
67
67
|
]);
|
|
68
68
|
return { confirmed, messageAfter };
|
|
69
69
|
}
|
|
70
|
+
function emitDeprecationWarning({ cliCommandName, deprecation, }) {
|
|
71
|
+
if (!deprecation) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
console.warn();
|
|
75
|
+
console.warn(chalk.yellow.bold("⚠️ DEPRECATION WARNING") +
|
|
76
|
+
chalk.yellow(` - \`${cliCommandName}\` is deprecated.`));
|
|
77
|
+
console.warn(chalk.yellow(` ${deprecation.message}`));
|
|
78
|
+
console.warn();
|
|
79
|
+
}
|
|
70
80
|
// ============================================================================
|
|
71
81
|
// Schema Analysis
|
|
72
82
|
// ============================================================================
|
|
@@ -342,6 +352,10 @@ function createCommandConfig(cliCommandName, functionInfo, sdk) {
|
|
|
342
352
|
// The last argument is always the command object with parsed options
|
|
343
353
|
const commandObj = args[args.length - 1];
|
|
344
354
|
const options = commandObj.opts();
|
|
355
|
+
emitDeprecationWarning({
|
|
356
|
+
cliCommandName,
|
|
357
|
+
deprecation: functionInfo.deprecation,
|
|
358
|
+
});
|
|
345
359
|
// Check if this is a list command for pagination
|
|
346
360
|
const isListCommand = functionInfo.type === "list";
|
|
347
361
|
const hasPaginationParams = parameters.some((p) => p.name === "maxItems" || p.name === "pageSize");
|