@@ -7,7 +7,7 @@ const libClient = require('../client.js');
77const { getAllFiles, showConsoleLink } = require('../utils.js');
88const { Command } = require('commander');
99const { sdkForProject, sdkForConsole } = require('../sdks')
10- const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser')
10+ const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } = require('../parser')
1111const { localConfig, globalConfig } = require("../config");
1212const { File } = require('undici');
1313const { ReadableStream } = require('stream/web');
@@ -72,13 +72,6 @@ const {{ service.name | caseLower }}{{ method.name | caseUcfirst }} = async ({
7272 {%- if method .type == ' location' -%}, destination{%- endif -%}
7373 {% if hasConsolePreview(method .name ,service .name ) %}, console{%- endif -%}
7474}) => {
75- {% if method .deprecated %}
76- {% if method .since and method .replaceWith %}
77- console.warn('Warning: This command is deprecated since {{ method .since }}.{% if method .replaceWith %} Please use "{{ method .replaceWith | replace({' .' : ' ' }) | caseKebab }}" instead.{% endif %}');
78- {% else %}
79- console.warn('Warning: This command is deprecated.');
80- {% endif %}
81- {% endif %}
8275 let client = !sdk ? await {% if service .name == " projects" %}sdkForConsole(){% else %}sdkForProject(){% endif %} :
8376 sdk;
8477 let apiPath = '{{ method .path }}'{% for parameter in method .parameters .path %}.replace('{{ ' {' }}{{ parameter .name | caseCamel }}{{ ' }' }}', {{ parameter .name | caseCamel | escapeKeyword }}){% endfor %};
0 commit comments