fix: address review feedback for actions CLI module
Fix argument parsing bugs in the execute command where actionId at index 0 was incorrectly skipped when --instance was absent, and flag values matching the actionId string were erroneously removed. Add --help support to the execute command for CLI report generation. Add missing bin script and cli-report.md for cli-module-actions. Add resolveAuth tests. Bump backend-defaults changeset to minor for the security-relevant auth change. Replace cross-fetch with native fetch in cli-module-auth to avoid punycode deprecation warnings during CLI report generation. Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com> Made-with: Cursor
This commit is contained in:
@@ -35,7 +35,6 @@
|
||||
"@backstage/cli-node": "workspace:^",
|
||||
"@backstage/errors": "workspace:^",
|
||||
"cleye": "^2.3.0",
|
||||
"cross-fetch": "^4.0.0",
|
||||
"fs-extra": "^11.2.0",
|
||||
"glob": "^7.1.7",
|
||||
"inquirer": "^8.2.0",
|
||||
|
||||
@@ -14,12 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import fetch from 'cross-fetch';
|
||||
import { httpJson } from './http';
|
||||
|
||||
jest.mock('cross-fetch');
|
||||
const mockFetch = jest.fn() as jest.MockedFunction<typeof global.fetch>;
|
||||
|
||||
const mockFetch = fetch as jest.MockedFunction<typeof fetch>;
|
||||
beforeEach(() => {
|
||||
global.fetch = mockFetch;
|
||||
});
|
||||
|
||||
describe('http', () => {
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import fetch from 'cross-fetch';
|
||||
import { ResponseError } from '@backstage/errors';
|
||||
|
||||
/** @public */
|
||||
|
||||
Reference in New Issue
Block a user