This repository has been archived by the owner on Nov 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add autogov processor, testing simplification
- Loading branch information
Showing
12 changed files
with
889 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# @internal/backstage-plugin-catalog-backend-module-autogov-processor | ||
|
||
The autogov-processor backend module for the catalog plugin. | ||
|
||
_This plugin was created through the Backstage CLI_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"name": "@liatrio/backstage-plugin-module-autogov-processor", | ||
"description": "The autogov-processor backend module for the catalog plugin.", | ||
"version": "1.2.0", | ||
"main": "src/index.ts", | ||
"types": "src/index.ts", | ||
"license": "Apache-2.0", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/liatrio/backstage-github-autogov-plugin.git", | ||
"directory": "backstage-plugin-autogov-common" | ||
}, | ||
"backstage": { | ||
"role": "backend-plugin-module", | ||
"pluginId": "autogov-processor", | ||
"pluginPackages": [] | ||
}, | ||
"publishConfig": { | ||
"registry": "https://npm.pkg.github.com/", | ||
"access": "public" | ||
}, | ||
"sideEffects": false, | ||
"scripts": { | ||
"start": "backstage-cli package start", | ||
"build": "backstage-cli package build", | ||
"lint": "backstage-cli package lint", | ||
"lint:all": "yarn lint && yarn prettier:check", | ||
"test": "backstage-cli package test", | ||
"clean": "backstage-cli package clean", | ||
"prepack": "backstage-cli package prepack", | ||
"postpack": "backstage-cli package postpack", | ||
"prettier:check": "npx --yes prettier --check .", | ||
"prettier:fix": "npx --yes prettier --write .", | ||
"tsc:full": "tsc --skipLibCheck true --incremental false", | ||
"prepare": "husky" | ||
}, | ||
"dependencies": { | ||
"@backstage/backend-plugin-api": "^1.0.0", | ||
"@backstage/catalog-model": "^1.7.0", | ||
"@backstage/config": "^1.2.0", | ||
"@backstage/integration": "^1.15.1", | ||
"@backstage/plugin-catalog-node": "^1.13.1", | ||
"@backstage/types": "^1.1.1", | ||
"@liatrio/backstage-plugin-autogov-common": "^v1.2.4", | ||
"node-fetch": "2" | ||
}, | ||
"devDependencies": { | ||
"@backstage/backend-test-utils": "^1.0.0", | ||
"@backstage/cli": "^0.27.1", | ||
"@types/node-fetch": "2" | ||
}, | ||
"files": [ | ||
"dist" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/***/ | ||
/** | ||
* The autogov-processor backend module for the catalog plugin. | ||
* | ||
* @packageDocumentation | ||
*/ | ||
|
||
export { catalogModuleAutogovProcessor as default } from './module'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { | ||
coreServices, | ||
createBackendModule, | ||
} from '@backstage/backend-plugin-api'; | ||
import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha'; | ||
import { AutogovProcessor } from './processor'; | ||
|
||
export const catalogModuleAutogovProcessor = createBackendModule({ | ||
pluginId: 'catalog', | ||
moduleId: 'autogov-processor', | ||
register(reg) { | ||
reg.registerInit({ | ||
deps: { | ||
catalog: catalogProcessingExtensionPoint, | ||
config: coreServices.rootConfig, | ||
logger: coreServices.logger, | ||
}, | ||
async init({ catalog, config, logger }) { | ||
logger.info('Initializing Autogov Processor'); | ||
catalog.addProcessor( | ||
AutogovProcessor.fromConfig(config, { | ||
logger, | ||
}), | ||
); | ||
}, | ||
}); | ||
}, | ||
}); |
Oops, something went wrong.