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

0.1.3 • 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
  • Tenant

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,TenantEntitiesProcessor } 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 TenantEntitiesProcessor());

  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';

const backend = createBackend();

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

+ 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, Tenant]
...

Readme

Keywords

none

Package Sidebar

Install

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

Weekly Downloads

108

Version

0.1.3

License

Apache-2.0

Unpacked Size

159 kB

Total Files

85

Last publish

Collaborators

  • veecode-admin
  • lmtxr.veecodes
  • valberjunior