Skip to content

Commit

Permalink
Merge pull request #44 from RoadieHQ/changeset-release/main
Browse files Browse the repository at this point in the history
Version Packages - plugins
  • Loading branch information
Xantier committed Mar 19, 2024
2 parents 3062167 + 53b09d8 commit 87f2eca
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 27 deletions.
5 changes: 0 additions & 5 deletions .changeset/long-gifts-shout.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/seven-spiders-smash.md

This file was deleted.

10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"homepage": "https://roadie.io",
"author": "RoadieHQ",
"keywords": [],
"version": "1.0.0",
"version": "1.1.0",
"engines": {
"node": ">=18"
},
Expand Down
21 changes: 11 additions & 10 deletions src/lib/RoadieAgentReceiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ import { createEntityEmitter } from '@/entityProvider/createEntityEmitter';

export class RoadieAgentReceiver {
private server: Express;
private readonly agentConfigurations: Map<string, AvailableAgentConfiguration>;
private readonly agentConfigurations: Map<
string,
AvailableAgentConfiguration
>;
private readonly handlerConfig: HandlerConfig;
private readonly logger: BaseLogger;
private readonly brokerClientUrl: string;
Expand Down Expand Up @@ -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.`,
);
Expand All @@ -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}`,
Expand Down Expand Up @@ -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}`,
});
})
;
});
}


}
2 changes: 1 addition & 1 deletion src/lib/entityProvider/constants.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const AGENT_ENTITY_PROVIDER_PATH = `api/catalog/roadie-agent/`;
export const AGENT_ENTITY_PROVIDER_PATH = `api/catalog/roadie-agent/`;
8 changes: 5 additions & 3 deletions src/lib/entityProvider/createEntityEmitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down Expand Up @@ -33,4 +35,4 @@ export const createEntityEmitter = (target: string, brokerClientUrl: string) =>
);
}
};
};
};
2 changes: 1 addition & 1 deletion src/lib/scaffolderAction/constants.ts
Original file line number Diff line number Diff line change
@@ -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`;
export const AGENT_SCAFFOLDER_FINALIZE_PATH = `api/scaffolder/custom-action-finalize`;
2 changes: 1 addition & 1 deletion src/lib/scaffolderAction/scaffolderActionAgent.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ScaffolderActionAgentConfiguration } from '$/types';
import { ScaffolderActionAgentConfiguration } from '$/types';

export type RoadieAgentScaffolderActionConfiguration = Omit<
ScaffolderActionAgentConfiguration,
Expand Down

0 comments on commit 87f2eca

Please sign in to comment.