switch all backend module IDs to use kebab-case
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -25,8 +25,8 @@ import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node'
|
||||
import { MyCustomProcessor } from './MyCustomProcessor';
|
||||
|
||||
export const catalogModuleExampleCustomProcessor = createBackendModule({
|
||||
moduleId: 'exampleCustomProcessor',
|
||||
pluginId: 'catalog',
|
||||
moduleId: 'example-custom-processor',
|
||||
register(env) {
|
||||
env.registerInit({
|
||||
deps: {
|
||||
|
||||
@@ -10,18 +10,20 @@ description: Naming patterns in the backend system
|
||||
|
||||
These are the naming patterns to adhere to within the backend system. They help us keep exports consistent across packages and make it easier to understand the usage and intent of exports.
|
||||
|
||||
As a rule, all names should be camel case, with the exceptions of plugin and module IDs, which should be kebab case.
|
||||
|
||||
### Plugins
|
||||
|
||||
| Description | Pattern | Examples |
|
||||
| ----------- | ------------ | ----------------------------------- |
|
||||
| export | `<id>Plugin` | `catalogPlugin`, `scaffolderPlugin` |
|
||||
| ID | `'<id>'` | `'catalog'`, `'scaffolder'` |
|
||||
| Description | Pattern | Examples |
|
||||
| ----------- | ----------------- | ------------------------------------- |
|
||||
| export | `<camelId>Plugin` | `catalogPlugin`, `userSettingsPlugin` |
|
||||
| ID | `'<kebab-id>'` | `'catalog'`, `'user-settings'` |
|
||||
|
||||
Example:
|
||||
|
||||
```ts
|
||||
export const catalogPlugin = createBackendPlugin({
|
||||
pluginId: 'catalog',
|
||||
export const userSettingsPlugin = createBackendPlugin({
|
||||
pluginId: 'user-settings',
|
||||
...
|
||||
})
|
||||
```
|
||||
@@ -31,14 +33,14 @@ export const catalogPlugin = createBackendPlugin({
|
||||
| Description | Pattern | Examples |
|
||||
| ----------- | ---------------------------- | ----------------------------------- |
|
||||
| export | `<pluginId>Module<ModuleId>` | `catalogModuleGithubEntityProvider` |
|
||||
| ID | `'<moduleId>'` | `'githubEntityProvider'` |
|
||||
| ID | `'<module-id>'` | `'github-entity-provider'` |
|
||||
|
||||
Example:
|
||||
|
||||
```ts
|
||||
export const catalogModuleGithubEntityProvider = createBackendModule({
|
||||
pluginId: 'catalog',
|
||||
moduleId: 'githubEntityProvider',
|
||||
moduleId: 'github-entity-provider',
|
||||
...
|
||||
})
|
||||
```
|
||||
|
||||
@@ -297,7 +297,7 @@ import { microsoftGraphOrgEntityProviderTransformExtensionPoint } from '@backsta
|
||||
backend.add(
|
||||
createBackendModule({
|
||||
pluginId: 'catalog',
|
||||
moduleId: 'microsoftGraphExtensions',
|
||||
moduleId: 'microsoft-graph-extensions',
|
||||
register(env) {
|
||||
env.registerInit({
|
||||
deps: {
|
||||
@@ -337,7 +337,7 @@ import { createBackendModule } from '@backstage/backend-plugin-api';
|
||||
/* highlight-add-start */
|
||||
const catalogModuleCustomExtensions = createBackendModule({
|
||||
pluginId: 'catalog', // name of the plugin that the module is targeting
|
||||
moduleId: 'customExtensions',
|
||||
moduleId: 'custom-extensions',
|
||||
register(env) {
|
||||
env.registerInit({
|
||||
deps: {
|
||||
@@ -406,7 +406,7 @@ import { createBackendModule } from '@backstage/backend-plugin-api';
|
||||
/* highlight-add-start */
|
||||
const eventsModuleCustomExtensions = createBackendModule({
|
||||
pluginId: 'events', // name of the plugin that the module is targeting
|
||||
moduleId: 'customExtensions',
|
||||
moduleId: 'custom-extensions',
|
||||
register(env) {
|
||||
env.registerInit({
|
||||
deps: {
|
||||
@@ -471,7 +471,7 @@ import { createBackendModule } from '@backstage/backend-plugin-api';
|
||||
/* highlight-add-start */
|
||||
const scaffolderModuleCustomExtensions = createBackendModule({
|
||||
pluginId: 'scaffolder', // name of the plugin that the module is targeting
|
||||
moduleId: 'customExtensions',
|
||||
moduleId: 'custom-extensions',
|
||||
register(env) {
|
||||
env.registerInit({
|
||||
deps: {
|
||||
|
||||
@@ -104,8 +104,8 @@ import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node'
|
||||
import { MyCustomProcessor } from './MyCustomProcessor';
|
||||
|
||||
export const catalogModuleExampleCustomProcessor = createBackendModule({
|
||||
moduleId: 'exampleCustomProcessor',
|
||||
pluginId: 'catalog',
|
||||
moduleId: 'example-custom-processor',
|
||||
register(env) {
|
||||
env.registerInit({
|
||||
deps: {
|
||||
|
||||
@@ -196,7 +196,7 @@ import { GoogleContainerEngineSupplier } from './GoogleContainerEngineSupplier';
|
||||
|
||||
export default createBackendModule({
|
||||
pluginId: 'kubernetes',
|
||||
moduleId: 'gke.supplier',
|
||||
moduleId: 'gke-supplier',
|
||||
register(env) {
|
||||
env.registerInit({
|
||||
deps: {
|
||||
|
||||
@@ -147,8 +147,8 @@ import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node'
|
||||
import { MyCustomProcessor } from './processor';
|
||||
|
||||
export const exampleCustomProcessorCatalogModule = createBackendModule({
|
||||
moduleId: 'exampleCustomProcessor',
|
||||
pluginId: 'catalog',
|
||||
moduleId: 'example-custom-processor',
|
||||
register(env) {
|
||||
env.registerInit({
|
||||
deps: {
|
||||
|
||||
Reference in New Issue
Block a user