Address review feedback from freben
- Use cli-defaults instead of listing individual CLI modules in create-app template and root package.json - Move nodeTransform config files from cli-module-build to cli-node to avoid cross-module direct imports - Rename cli-module-create-github-app to cli-module-github - Start createCliModule init chain with Promise.resolve() - Deduplicate exitWithError in runCliModule.ts - Extract shared isCommandNodeHidden to @internal/cli - Add explanatory comment for fromArray deduplication field - Restore error for cli role packages missing bin in runCliExtraction Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com> Made-with: Cursor
This commit is contained in:
@@ -21,16 +21,15 @@ import { IpcServer, ServerDataStore } from '../ipc';
|
||||
import debounce from 'lodash/debounce';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { isAbsolute as isAbsolutePath } from 'node:path';
|
||||
import { findOwnPaths, targetPaths } from '@backstage/cli-common';
|
||||
import { targetPaths } from '@backstage/cli-common';
|
||||
|
||||
import spawn from 'cross-spawn';
|
||||
|
||||
const loaderArgs = [
|
||||
'--enable-source-maps',
|
||||
'--require',
|
||||
/* eslint-disable-next-line no-restricted-syntax */
|
||||
findOwnPaths(__dirname).resolve('config/nodeTransform.cjs'),
|
||||
// TODO: Support modules, although there's currently no way to load them since import() is transpiled tp require()
|
||||
require.resolve('@backstage/cli-node/config/nodeTransform.cjs'),
|
||||
// TODO: Support modules, although there's currently no way to load them since import() is transpiled to require()
|
||||
];
|
||||
|
||||
export type RunBackendOptions = {
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
import { execFileSync } from 'node:child_process';
|
||||
import { resolve as resolvePath } from 'node:path';
|
||||
import { findOwnPaths } from '@backstage/cli-common';
|
||||
import { Output, buildPackage } from '../../lib/builder';
|
||||
|
||||
const exportValues = {
|
||||
@@ -56,8 +55,7 @@ function loadFixture(fixture: string) {
|
||||
'node',
|
||||
[
|
||||
'--import',
|
||||
/* eslint-disable-next-line no-restricted-syntax */
|
||||
findOwnPaths(__dirname).resolve('config/nodeTransform.cjs'),
|
||||
require.resolve('@backstage/cli-node/config/nodeTransform.cjs'),
|
||||
resolvePath(__dirname, `__fixtures__/${fixture}`),
|
||||
],
|
||||
{ encoding: 'utf8' },
|
||||
|
||||
Reference in New Issue
Block a user