@veecode-platform/plugin-veecode-platform-module
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

VeeCode Platform Module Plugin

The Veecode Platform Module plugin is a backend plugin module that extends the backstage catalog, adding new features to the application's standard behavior.

Such as new kinds, new schemas and a new apiversion.

Kinds:

  • Environment
  • Cluster
  • Database
  • Vault

ApiVersion

  • veecode.backstage.io/v1alpha1

Get started

cd packages/backend
yarn add @veecode-platform/plugin-veecode-platform-module

⭐ Legacy Backend

Now, in the file packages > backend > src > plugins > catalog.ts:

...
+ import { ClusterEntitiesProcessor, DatabaseEntitiesProcessor, EnvironmentEntitiesProcessor, VaultEntitiesProcessor } from '@veecode-platform/plugin-veecode-platform-module';
...

export default async function createPlugin(
  env: PluginEnvironment,
): Promise<Router> {
  const builder = await CatalogBuilder.create(env);
  ... 
  
+  builder.addProcessor( new ClusterEntitiesProcessor());
+  builder.addProcessor( new EnvironmentEntitiesProcessor());
+  builder.addProcessor( new DatabaseEntitiesProcessor());
+  builder.addProcessor( new VaultEntitiesProcessor());

  builder.addProcessor(new ScaffolderEntitiesProcessor());
  const { processingEngine, router } = await builder.build();
  await processingEngine.start();
  return router;
}

...

🆕 New Backend

In packages > backend > src > index.ts:

import { createBackend } from '@backstage/backend-defaults';
+ import { catalogModuleVeeCodeProcessor } from '@veecode-platform/plugin-veecode-platform-module/alpha';

const backend = createBackend();

backend.add(import('@backstage/plugin-app-backend/alpha'));
backend.add(import('@backstage/plugin-proxy-backend/alpha'));
backend.add(import('@backstage/plugin-scaffolder-backend/alpha'));
backend.add(import('@backstage/plugin-techdocs-backend/alpha'));
...

+ backend.add(catalogModuleVeeCodeProcessor);


backend.start();

By adding the processors to the application's backend, we extend our configuration to the default behavior of the backstage.

Remember that in order to access the customized types, you just need to grant access in app-config.yaml:

catalog:
  import:
    entityFilename: catalog-info.yaml
    pullRequestBranchName: backstage-integration
  rules:
+    - allow: [Component, System, API, Resource, Location, Database, Cluster, Environment, Vault]
...

Readme

Keywords

none

Package Sidebar

Install

npm i @veecode-platform/plugin-veecode-platform-module

Weekly Downloads

6

Version

0.1.2

License

Apache-2.0

Unpacked Size

135 kB

Total Files

48

Last publish

Collaborators

  • valberjunior
  • lmtxr.veecodes
  • veecode-admin