Add bin entry points for standalone CLI module execution

Each CLI module package now includes a bin script and cli.ts entry
point, allowing modules to be executed directly via npx without
being wired into the main @backstage/cli package.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
This commit is contained in:
Patrik Oldsberg
2026-03-14 11:47:47 +01:00
parent 401c1f7e24
commit 64a96d9d9f
34 changed files with 715 additions and 22 deletions
+33
View File
@@ -0,0 +1,33 @@
#!/usr/bin/env node
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const path = require('node:path');
/* eslint-disable-next-line no-restricted-syntax */
const isLocal = require('node:fs').existsSync(
path.resolve(__dirname, '../src'),
);
if (!isLocal) {
const { runCliModule } = require('@backstage/cli-node');
const cliModule = require('..').default;
const pkg = require('../package.json');
runCliModule({ module: cliModule, name: pkg.name, version: pkg.version });
} else {
require('@backstage/cli/config/nodeTransform.cjs');
require('../src/cli');
}
+4 -2
View File
@@ -20,7 +20,8 @@
"main": "src/index.ts",
"types": "src/index.ts",
"files": [
"dist"
"dist",
"bin"
],
"scripts": {
"build": "backstage-cli package build",
@@ -47,5 +48,6 @@
"@types/fs-extra": "^11.0.0",
"@types/proper-lockfile": "^4",
"cross-fetch": "^4.0.0"
}
},
"bin": "bin/cli-module-auth"
}
+26
View File
@@ -0,0 +1,26 @@
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { runCliModule } from '@backstage/cli-node';
import cliModule from './index';
const pkg = require('../package.json') as { name: string; version: string };
runCliModule({
module: cliModule,
name: pkg.name,
version: pkg.version,
});
+33
View File
@@ -0,0 +1,33 @@
#!/usr/bin/env node
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const path = require('node:path');
/* eslint-disable-next-line no-restricted-syntax */
const isLocal = require('node:fs').existsSync(
path.resolve(__dirname, '../src'),
);
if (!isLocal) {
const { runCliModule } = require('@backstage/cli-node');
const cliModule = require('..').default;
const pkg = require('../package.json');
runCliModule({ module: cliModule, name: pkg.name, version: pkg.version });
} else {
require('@backstage/cli/config/nodeTransform.cjs');
require('../src/cli');
}
+4 -2
View File
@@ -20,7 +20,8 @@
"main": "src/index.ts",
"types": "src/index.ts",
"files": [
"dist"
"dist",
"bin"
],
"scripts": {
"build": "backstage-cli package build",
@@ -88,5 +89,6 @@
"cross-spawn": "^7.0.6",
"rollup": "^4.59.0",
"ts-morph": "^24.0.0"
}
},
"bin": "bin/cli-module-build"
}
+26
View File
@@ -0,0 +1,26 @@
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { runCliModule } from '@backstage/cli-node';
import cliModule from './index';
const pkg = require('../package.json') as { name: string; version: string };
runCliModule({
module: cliModule,
name: pkg.name,
version: pkg.version,
});
+33
View File
@@ -0,0 +1,33 @@
#!/usr/bin/env node
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const path = require('node:path');
/* eslint-disable-next-line no-restricted-syntax */
const isLocal = require('node:fs').existsSync(
path.resolve(__dirname, '../src'),
);
if (!isLocal) {
const { runCliModule } = require('@backstage/cli-node');
const cliModule = require('..').default;
const pkg = require('../package.json');
runCliModule({ module: cliModule, name: pkg.name, version: pkg.version });
} else {
require('@backstage/cli/config/nodeTransform.cjs');
require('../src/cli');
}
+4 -2
View File
@@ -20,7 +20,8 @@
"main": "src/index.ts",
"types": "src/index.ts",
"files": [
"dist"
"dist",
"bin"
],
"scripts": {
"build": "backstage-cli package build",
@@ -46,5 +47,6 @@
},
"devDependencies": {
"@backstage/cli": "workspace:^"
}
},
"bin": "bin/cli-module-config"
}
+26
View File
@@ -0,0 +1,26 @@
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { runCliModule } from '@backstage/cli-node';
import cliModule from './index';
const pkg = require('../package.json') as { name: string; version: string };
runCliModule({
module: cliModule,
name: pkg.name,
version: pkg.version,
});
@@ -0,0 +1,33 @@
#!/usr/bin/env node
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const path = require('node:path');
/* eslint-disable-next-line no-restricted-syntax */
const isLocal = require('node:fs').existsSync(
path.resolve(__dirname, '../src'),
);
if (!isLocal) {
const { runCliModule } = require('@backstage/cli-node');
const cliModule = require('..').default;
const pkg = require('../package.json');
runCliModule({ module: cliModule, name: pkg.name, version: pkg.version });
} else {
require('@backstage/cli/config/nodeTransform.cjs');
require('../src/cli');
}
@@ -20,7 +20,8 @@
"main": "src/index.ts",
"types": "src/index.ts",
"files": [
"dist"
"dist",
"bin"
],
"scripts": {
"build": "backstage-cli package build",
@@ -46,5 +47,6 @@
"devDependencies": {
"@backstage/cli": "workspace:^",
"@types/fs-extra": "^11.0.0"
}
},
"bin": "bin/cli-module-create-github-app"
}
@@ -0,0 +1,26 @@
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { runCliModule } from '@backstage/cli-node';
import cliModule from './index';
const pkg = require('../package.json') as { name: string; version: string };
runCliModule({
module: cliModule,
name: pkg.name,
version: pkg.version,
});
+33
View File
@@ -0,0 +1,33 @@
#!/usr/bin/env node
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const path = require('node:path');
/* eslint-disable-next-line no-restricted-syntax */
const isLocal = require('node:fs').existsSync(
path.resolve(__dirname, '../src'),
);
if (!isLocal) {
const { runCliModule } = require('@backstage/cli-node');
const cliModule = require('..').default;
const pkg = require('../package.json');
runCliModule({ module: cliModule, name: pkg.name, version: pkg.version });
} else {
require('@backstage/cli/config/nodeTransform.cjs');
require('../src/cli');
}
+4 -2
View File
@@ -20,7 +20,8 @@
"main": "src/index.ts",
"types": "src/index.ts",
"files": [
"dist"
"dist",
"bin"
],
"scripts": {
"build": "backstage-cli package build",
@@ -40,5 +41,6 @@
"devDependencies": {
"@backstage/cli": "workspace:^",
"@types/fs-extra": "^11.0.0"
}
},
"bin": "bin/cli-module-info"
}
+26
View File
@@ -0,0 +1,26 @@
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { runCliModule } from '@backstage/cli-node';
import cliModule from './index';
const pkg = require('../package.json') as { name: string; version: string };
runCliModule({
module: cliModule,
name: pkg.name,
version: pkg.version,
});
+33
View File
@@ -0,0 +1,33 @@
#!/usr/bin/env node
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const path = require('node:path');
/* eslint-disable-next-line no-restricted-syntax */
const isLocal = require('node:fs').existsSync(
path.resolve(__dirname, '../src'),
);
if (!isLocal) {
const { runCliModule } = require('@backstage/cli-node');
const cliModule = require('..').default;
const pkg = require('../package.json');
runCliModule({ module: cliModule, name: pkg.name, version: pkg.version });
} else {
require('@backstage/cli/config/nodeTransform.cjs');
require('../src/cli');
}
+4 -2
View File
@@ -20,7 +20,8 @@
"main": "src/index.ts",
"types": "src/index.ts",
"files": [
"dist"
"dist",
"bin"
],
"scripts": {
"build": "backstage-cli package build",
@@ -44,5 +45,6 @@
"@backstage/cli": "workspace:^",
"@types/fs-extra": "^11.0.0",
"@types/shell-quote": "^1.7.5"
}
},
"bin": "bin/cli-module-lint"
}
+26
View File
@@ -0,0 +1,26 @@
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { runCliModule } from '@backstage/cli-node';
import cliModule from './index';
const pkg = require('../package.json') as { name: string; version: string };
runCliModule({
module: cliModule,
name: pkg.name,
version: pkg.version,
});
+33
View File
@@ -0,0 +1,33 @@
#!/usr/bin/env node
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const path = require('node:path');
/* eslint-disable-next-line no-restricted-syntax */
const isLocal = require('node:fs').existsSync(
path.resolve(__dirname, '../src'),
);
if (!isLocal) {
const { runCliModule } = require('@backstage/cli-node');
const cliModule = require('..').default;
const pkg = require('../package.json');
runCliModule({ module: cliModule, name: pkg.name, version: pkg.version });
} else {
require('@backstage/cli/config/nodeTransform.cjs');
require('../src/cli');
}
+4 -2
View File
@@ -20,7 +20,8 @@
"main": "src/index.ts",
"types": "src/index.ts",
"files": [
"dist"
"dist",
"bin"
],
"scripts": {
"build": "backstage-cli package build",
@@ -41,5 +42,6 @@
"devDependencies": {
"@backstage/cli": "workspace:^",
"@types/fs-extra": "^11.0.0"
}
},
"bin": "bin/cli-module-maintenance"
}
@@ -0,0 +1,26 @@
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { runCliModule } from '@backstage/cli-node';
import cliModule from './index';
const pkg = require('../package.json') as { name: string; version: string };
runCliModule({
module: cliModule,
name: pkg.name,
version: pkg.version,
});
+33
View File
@@ -0,0 +1,33 @@
#!/usr/bin/env node
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const path = require('node:path');
/* eslint-disable-next-line no-restricted-syntax */
const isLocal = require('node:fs').existsSync(
path.resolve(__dirname, '../src'),
);
if (!isLocal) {
const { runCliModule } = require('@backstage/cli-node');
const cliModule = require('..').default;
const pkg = require('../package.json');
runCliModule({ module: cliModule, name: pkg.name, version: pkg.version });
} else {
require('@backstage/cli/config/nodeTransform.cjs');
require('../src/cli');
}
+4 -2
View File
@@ -20,7 +20,8 @@
"main": "src/index.ts",
"types": "src/index.ts",
"files": [
"dist"
"dist",
"bin"
],
"scripts": {
"build": "backstage-cli package build",
@@ -44,5 +45,6 @@
"@backstage/test-utils": "workspace:^",
"@types/fs-extra": "^11.0.0",
"msw": "^1.0.0"
}
},
"bin": "bin/cli-module-migrate"
}
+26
View File
@@ -0,0 +1,26 @@
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { runCliModule } from '@backstage/cli-node';
import cliModule from './index';
const pkg = require('../package.json') as { name: string; version: string };
runCliModule({
module: cliModule,
name: pkg.name,
version: pkg.version,
});
+33
View File
@@ -0,0 +1,33 @@
#!/usr/bin/env node
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const path = require('node:path');
/* eslint-disable-next-line no-restricted-syntax */
const isLocal = require('node:fs').existsSync(
path.resolve(__dirname, '../src'),
);
if (!isLocal) {
const { runCliModule } = require('@backstage/cli-node');
const cliModule = require('..').default;
const pkg = require('../package.json');
runCliModule({ module: cliModule, name: pkg.name, version: pkg.version });
} else {
require('@backstage/cli/config/nodeTransform.cjs');
require('../src/cli');
}
+4 -2
View File
@@ -20,7 +20,8 @@
"main": "src/index.ts",
"types": "src/index.ts",
"files": [
"dist"
"dist",
"bin"
],
"scripts": {
"build": "backstage-cli package build",
@@ -35,5 +36,6 @@
},
"devDependencies": {
"@backstage/cli": "workspace:^"
}
},
"bin": "bin/cli-module-new"
}
+26
View File
@@ -0,0 +1,26 @@
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { runCliModule } from '@backstage/cli-node';
import cliModule from './index';
const pkg = require('../package.json') as { name: string; version: string };
runCliModule({
module: cliModule,
name: pkg.name,
version: pkg.version,
});
+33
View File
@@ -0,0 +1,33 @@
#!/usr/bin/env node
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const path = require('node:path');
/* eslint-disable-next-line no-restricted-syntax */
const isLocal = require('node:fs').existsSync(
path.resolve(__dirname, '../src'),
);
if (!isLocal) {
const { runCliModule } = require('@backstage/cli-node');
const cliModule = require('..').default;
const pkg = require('../package.json');
runCliModule({ module: cliModule, name: pkg.name, version: pkg.version });
} else {
require('@backstage/cli/config/nodeTransform.cjs');
require('../src/cli');
}
+4 -2
View File
@@ -20,7 +20,8 @@
"main": "src/index.ts",
"types": "src/index.ts",
"files": [
"dist"
"dist",
"bin"
],
"scripts": {
"build": "backstage-cli package build",
@@ -35,5 +36,6 @@
},
"devDependencies": {
"@backstage/cli": "workspace:^"
}
},
"bin": "bin/cli-module-test-jest"
}
+26
View File
@@ -0,0 +1,26 @@
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { runCliModule } from '@backstage/cli-node';
import cliModule from './index';
const pkg = require('../package.json') as { name: string; version: string };
runCliModule({
module: cliModule,
name: pkg.name,
version: pkg.version,
});
@@ -0,0 +1,33 @@
#!/usr/bin/env node
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const path = require('node:path');
/* eslint-disable-next-line no-restricted-syntax */
const isLocal = require('node:fs').existsSync(
path.resolve(__dirname, '../src'),
);
if (!isLocal) {
const { runCliModule } = require('@backstage/cli-node');
const cliModule = require('..').default;
const pkg = require('../package.json');
runCliModule({ module: cliModule, name: pkg.name, version: pkg.version });
} else {
require('@backstage/cli/config/nodeTransform.cjs');
require('../src/cli');
}
@@ -20,7 +20,8 @@
"main": "src/index.ts",
"types": "src/index.ts",
"files": [
"dist"
"dist",
"bin"
],
"scripts": {
"build": "backstage-cli package build",
@@ -35,5 +36,6 @@
},
"devDependencies": {
"@backstage/cli": "workspace:^"
}
},
"bin": "bin/cli-module-translations"
}
@@ -0,0 +1,26 @@
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { runCliModule } from '@backstage/cli-node';
import cliModule from './index';
const pkg = require('../package.json') as { name: string; version: string };
runCliModule({
module: cliModule,
name: pkg.name,
version: pkg.version,
});
+22
View File
@@ -2819,6 +2819,8 @@ __metadata:
proper-lockfile: "npm:^4.1.2"
yaml: "npm:^2.0.0"
zod: "npm:^3.25.76"
bin:
cli-module-auth: bin/cli-module-auth
languageName: unknown
linkType: soft
@@ -2881,6 +2883,8 @@ __metadata:
webpack: "npm:^5.105.4"
webpack-dev-server: "npm:^5.2.3"
yn: "npm:^4.0.0"
bin:
cli-module-build: bin/cli-module-build
languageName: unknown
linkType: soft
@@ -2901,6 +2905,8 @@ __metadata:
json-schema: "npm:^0.4.0"
react-dev-utils: "npm:^12.0.0-next.60"
yaml: "npm:^2.0.0"
bin:
cli-module-config: bin/cli-module-config
languageName: unknown
linkType: soft
@@ -2921,6 +2927,8 @@ __metadata:
inquirer: "npm:^8.2.0"
react-dev-utils: "npm:^12.0.0-next.60"
yaml: "npm:^2.0.0"
bin:
cli-module-create-github-app: bin/cli-module-create-github-app
languageName: unknown
linkType: soft
@@ -2935,6 +2943,8 @@ __metadata:
cleye: "npm:^2.3.0"
fs-extra: "npm:^11.2.0"
minimatch: "npm:^10.2.1"
bin:
cli-module-info: bin/cli-module-info
languageName: unknown
linkType: soft
@@ -2953,6 +2963,8 @@ __metadata:
fs-extra: "npm:^11.2.0"
globby: "npm:^11.0.0"
shell-quote: "npm:^1.8.1"
bin:
cli-module-lint: bin/cli-module-lint
languageName: unknown
linkType: soft
@@ -2968,6 +2980,8 @@ __metadata:
cleye: "npm:^2.3.0"
eslint: "npm:^8.6.0"
fs-extra: "npm:^11.2.0"
bin:
cli-module-maintenance: bin/cli-module-maintenance
languageName: unknown
linkType: soft
@@ -2986,6 +3000,8 @@ __metadata:
cleye: "npm:^2.3.0"
fs-extra: "npm:^11.2.0"
msw: "npm:^1.0.0"
bin:
cli-module-migrate: bin/cli-module-migrate
languageName: unknown
linkType: soft
@@ -2995,6 +3011,8 @@ __metadata:
dependencies:
"@backstage/cli": "workspace:^"
"@backstage/cli-node": "workspace:^"
bin:
cli-module-new: bin/cli-module-new
languageName: unknown
linkType: soft
@@ -3004,6 +3022,8 @@ __metadata:
dependencies:
"@backstage/cli": "workspace:^"
"@backstage/cli-node": "workspace:^"
bin:
cli-module-test-jest: bin/cli-module-test-jest
languageName: unknown
linkType: soft
@@ -3013,6 +3033,8 @@ __metadata:
dependencies:
"@backstage/cli": "workspace:^"
"@backstage/cli-node": "workspace:^"
bin:
cli-module-translations: bin/cli-module-translations
languageName: unknown
linkType: soft