From 53b09d838d93d9a30c4cf56a49b82e87e0ac274c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 19 Mar 2024 09:34:13 +0000 Subject: [PATCH] Version Packages --- .changeset/long-gifts-shout.md | 5 ----- .changeset/seven-spiders-smash.md | 5 ----- CHANGELOG.md | 10 +++++++++ package.json | 2 +- src/lib/RoadieAgentReceiver.ts | 21 ++++++++++--------- src/lib/entityProvider/constants.ts | 2 +- src/lib/entityProvider/createEntityEmitter.ts | 8 ++++--- src/lib/scaffolderAction/constants.ts | 2 +- .../scaffolderAction/scaffolderActionAgent.ts | 2 +- 9 files changed, 30 insertions(+), 27 deletions(-) delete mode 100644 .changeset/long-gifts-shout.md delete mode 100644 .changeset/seven-spiders-smash.md diff --git a/.changeset/long-gifts-shout.md b/.changeset/long-gifts-shout.md deleted file mode 100644 index 9c493a2..0000000 --- a/.changeset/long-gifts-shout.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@roadiehq/roadie-agent': patch ---- - -Bump dependencies diff --git a/.changeset/seven-spiders-smash.md b/.changeset/seven-spiders-smash.md deleted file mode 100644 index b1912f1..0000000 --- a/.changeset/seven-spiders-smash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@roadiehq/roadie-agent': minor ---- - -Implement agent library methods to construct self-hosted Scaffolder Actions. diff --git a/CHANGELOG.md b/CHANGELOG.md index bbeeca5..1608da0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ ## [0.0.1-alpha](https://github.com/RoadieHQ/roadie-agent/compare/v0.0.1-alpha2...v0.0.1-alpha) (2022-12-05) +## 1.1.0 + +### Minor Changes + +- 2815bd3: Implement agent library methods to construct self-hosted Scaffolder Actions. + +### Patch Changes + +- 683689d: Bump dependencies + ## 1.0.0 ### Major Changes diff --git a/package.json b/package.json index 0f686c9..224683f 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "homepage": "https://roadie.io", "author": "RoadieHQ", "keywords": [], - "version": "1.0.0", + "version": "1.1.0", "engines": { "node": ">=18" }, diff --git a/src/lib/RoadieAgentReceiver.ts b/src/lib/RoadieAgentReceiver.ts index 5164525..4ed49fd 100644 --- a/src/lib/RoadieAgentReceiver.ts +++ b/src/lib/RoadieAgentReceiver.ts @@ -12,7 +12,10 @@ import { createEntityEmitter } from '@/entityProvider/createEntityEmitter'; export class RoadieAgentReceiver { private server: Express; - private readonly agentConfigurations: Map; + private readonly agentConfigurations: Map< + string, + AvailableAgentConfiguration + >; private readonly handlerConfig: HandlerConfig; private readonly logger: BaseLogger; private readonly brokerClientUrl: string; @@ -55,7 +58,6 @@ export class RoadieAgentReceiver { break; case 'tech-insights-data-source': - throw new Error( `Roadie Agent functionality of type ${configuration.type} not yet implemented.`, ); @@ -72,7 +74,8 @@ export class RoadieAgentReceiver { // Specifying routes explicitly app.get(`/agent-provider/${configuration.name}`, (req, res) => { const entityEmitter = createEntityEmitter( - configuration.name, this.brokerClientUrl, + configuration.name, + this.brokerClientUrl, ); this.logger.info( `Received entity emitting trigger for endpoint ${configuration.name}`, @@ -101,18 +104,16 @@ export class RoadieAgentReceiver { actionId, brokerClientUrl: this.brokerClientUrl, payload: { - body, getPresign, putPresign, + body, + getPresign, + putPresign, }, }); void scaffolderAction.start(); res.json({ - message: - `Triggered custom scaffolder action event for Roadie Agent ${configuration.name}`, + message: `Triggered custom scaffolder action event for Roadie Agent ${configuration.name}`, }); - }) - ; + }); } - - } diff --git a/src/lib/entityProvider/constants.ts b/src/lib/entityProvider/constants.ts index 129bf8b..e4dbfe9 100644 --- a/src/lib/entityProvider/constants.ts +++ b/src/lib/entityProvider/constants.ts @@ -1 +1 @@ -export const AGENT_ENTITY_PROVIDER_PATH = `api/catalog/roadie-agent/`; \ No newline at end of file +export const AGENT_ENTITY_PROVIDER_PATH = `api/catalog/roadie-agent/`; diff --git a/src/lib/entityProvider/createEntityEmitter.ts b/src/lib/entityProvider/createEntityEmitter.ts index ccb759a..83c3f8c 100644 --- a/src/lib/entityProvider/createEntityEmitter.ts +++ b/src/lib/entityProvider/createEntityEmitter.ts @@ -3,8 +3,10 @@ import { AGENT_ENTITY_PROVIDER_PATH } from '@/entityProvider/constants'; import fetch from 'node-fetch'; import { getLogger } from '@/logger'; -export const createEntityEmitter = (target: string, brokerClientUrl: string) => { - +export const createEntityEmitter = ( + target: string, + brokerClientUrl: string, +) => { const logger = getLogger('RoadieAgentEntityEmitter'); logger.info(`Creating new entity emitter for target ${target}`); @@ -33,4 +35,4 @@ export const createEntityEmitter = (target: string, brokerClientUrl: string) => ); } }; -}; \ No newline at end of file +}; diff --git a/src/lib/scaffolderAction/constants.ts b/src/lib/scaffolderAction/constants.ts index 43c02d5..8b8a5ef 100644 --- a/src/lib/scaffolderAction/constants.ts +++ b/src/lib/scaffolderAction/constants.ts @@ -1,2 +1,2 @@ export const AGENT_SCAFFOLDER_LOG_PATH = `api/scaffolder/custom-action-log`; -export const AGENT_SCAFFOLDER_FINALIZE_PATH = `api/scaffolder/custom-action-finalize`; \ No newline at end of file +export const AGENT_SCAFFOLDER_FINALIZE_PATH = `api/scaffolder/custom-action-finalize`; diff --git a/src/lib/scaffolderAction/scaffolderActionAgent.ts b/src/lib/scaffolderAction/scaffolderActionAgent.ts index f1b4ce8..515ab89 100644 --- a/src/lib/scaffolderAction/scaffolderActionAgent.ts +++ b/src/lib/scaffolderAction/scaffolderActionAgent.ts @@ -1,4 +1,4 @@ -import { ScaffolderActionAgentConfiguration } from '$/types'; +import { ScaffolderActionAgentConfiguration } from '$/types'; export type RoadieAgentScaffolderActionConfiguration = Omit< ScaffolderActionAgentConfiguration,