Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .run/RUNNER.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
<env name="LOG_LEVEL" value="debug" />
<env name="LOGOUT_URL" value="https://authenticator.communities.gov.localhost:3004/sessions/sign-out" />
<env name="MULTIFUND_URL" value="https://frontend.communities.gov.localhost:3008/account" />
<env name="PREVIEW_MODE" value="true" />
<env name="PRIVACY_POLICY_URL" value="https://frontend.communities.gov.localhost:3008/privacy" />
<env name="RSA256_PUBLIC_KEY_BASE64" value="TUlHZk1BMEdDU3FHU0liM0RRRUJBUVVBQTRHTkFEQ0JpUUtCZ1FDdUZBL2xrczcwM2JEeDZYN0duUVIwVlVSOAp6eW8yUEJ6L2E2MVd0TjJCUitYWlV5cjlGaHc4K3E4YVRsbzZ0K2VJa3hENjE4eWpaQkx0cGhZVjUwcTAvOW1OCkk0QStPSURhQ1J0aWd0NDJ4ZUlrbmpydWZ5a280Q0xjV3BFc1dzSkZWSnJnR2xQTHZrMzJHMVJ5WFErOGY1dWsKVmlKbjBKbGlzbWo4bGtzc2pRSURBUUFC" />
<env name="SERVICE_START_PAGE" value="https://frontend.communities.gov.localhost:3008/account" />
Expand Down
5 changes: 1 addition & 4 deletions copilot/fsd-form-runner-adapter/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ secrets:
RSA256_PUBLIC_KEY_BASE64: /copilot/${COPILOT_APPLICATION_NAME}/${COPILOT_ENVIRONMENT_NAME}/secrets/RSA256_PUBLIC_KEY_BASE64
SESSION_COOKIE_PASSWORD: /copilot/${COPILOT_APPLICATION_NAME}/${COPILOT_ENVIRONMENT_NAME}/secrets/SESSION_COOKIE_PASSWORD
INITIALISED_SESSION_KEY: /copilot/${COPILOT_APPLICATION_NAME}/${COPILOT_ENVIRONMENT_NAME}/secrets/SECRET_KEY
FORM_STORE_API_HOST: /copilot/${COPILOT_APPLICATION_NAME}/${COPILOT_ENVIRONMENT_NAME}/secrets/FSD_PRE_AWARD_FORM_STORE_API_HOST

# You can override any of the values defined above by environment.
environments:
dev:
variables:
JWT_AUTH_ENABLED: false
PREVIEW_MODE: true
count:
spot: 2
sidecars:
Expand All @@ -107,7 +107,6 @@ environments:
test:
variables:
JWT_AUTH_ENABLED: false
PREVIEW_MODE: true
count:
spot: 2
sidecars:
Expand All @@ -130,7 +129,6 @@ environments:
uat:
variables:
JWT_AUTH_ENABLED: false
PREVIEW_MODE: true
count:
range: 2-4
cooldown:
Expand Down Expand Up @@ -174,7 +172,6 @@ environments:
SERVICE_START_PAGE: "https://apply.access-funding.communities.gov.uk/account"
ELIGIBILITY_RESULT_URL: "https://apply.access-funding.communities.gov.uk/eligibility-result"
SENTRY_TRACES_SAMPLE_RATE: 0.1
PREVIEW_MODE: false
count:
range: 2-4
cooldown:
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ services:
- "3009:3009"
environment:
- CHOKIDAR_USEPOLLING=true
- PREVIEW_MODE=true
- LAST_COMMIT
- LAST_TAG
- ACCESSIBILITY_STATEMENT_URL=http://localhost:3008/accessibility_statement
Expand All @@ -43,7 +42,6 @@ services:
- SERVICE_START_PAGE=http://localhost:3008/account
- SINGLE_REDIS=true
- FORM_RUNNER_ADAPTER_REDIS_INSTANCE_URI=redis://redis-data:6379
- PREVIEW_MODE=true
- ENABLE_VIRUS_SCAN=true
command: yarn runner start:test
logging:
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ services:
- "3009:3009"
environment:
- CHOKIDAR_USEPOLLING=true
- PREVIEW_MODE=true
- LAST_COMMIT
- LAST_TAG
- JWT_AUTH_ENABLED=false
Expand Down
4 changes: 2 additions & 2 deletions runner/config/custom-environment-variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"authClientAuthUrl": "AUTH_CLIENT_AUTH_URL",
"authClientTokenUrl": "AUTH_CLIENT_TOKEN_URL",
"authClientProfileUrl": "AUTH_CLIENT_PROFILE_URL",
"previewMode": "PREVIEW_MODE",
"enforceCsrf": "ENFORCE_CSRF",
"savePerPage": "SAVE_PER_PAGE",
"awsBucketName": "AWS_BUCKET_NAME",
Expand All @@ -70,5 +69,6 @@
"sentryDsn": "SENTRY_DSN",
"sentryTracesSampleRate": "SENTRY_TRACES_SAMPLE_RATE",
"copilotEnv": "COPILOT_ENV",
"enableVirusScan": "ENABLE_VIRUS_SCAN"
"enableVirusScan": "ENABLE_VIRUS_SCAN",
"formStoreApiHost": "FORM_STORE_API_HOST"
}
3 changes: 2 additions & 1 deletion runner/config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ module.exports = {
*/
port: 3009,
env: "development",
previewMode: false,
enforceCsrf: true,
singleRedis: false,
isE2EModeEnabled: false,
Expand Down Expand Up @@ -115,4 +114,6 @@ module.exports = {
copilotEnv: "",

enableVirusScan: false,

formStoreApiHost: "https://api.communities.gov.localhost:4004/forms"
};
1 change: 0 additions & 1 deletion runner/config/development.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"isTest": true,
"previewMode": true,
"enforceCsrf": false,
"env": "development"
}
1 change: 0 additions & 1 deletion runner/config/test.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"safelist": ["webho.ok"],
"isTest": true,
"previewMode": true,
"enforceCsrf": false,
"initialisedSessionKey": "predictable-key",
"env": "test"
Expand Down
2 changes: 2 additions & 0 deletions runner/src/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import LanguagePlugin from "./plugins/LanguagePlugin";
import {TranslationLoaderService} from "./services/TranslationLoaderService";
import {WebhookService} from "./services/WebhookService";
import {pluginLog} from "./plugins/logging";
import { PreAwardApiService } from "./services/PreAwardApiService";

const Sentry = require('@sentry/node');

Expand Down Expand Up @@ -133,6 +134,7 @@ async function createServer(routeConfig: RouteConfig) {
await server.register(pluginAuth);
await server.register(LanguagePlugin);

server.registerService([PreAwardApiService]);
server.registerService([AdapterCacheService, NotifyService, PayService, WebhookService, AddressService, TranslationLoaderService]);
if (config.isE2EModeEnabled && config.isE2EModeEnabled == "true") {
console.log("E2E Mode enabled")
Expand Down
5 changes: 1 addition & 4 deletions runner/src/server/plugins/ConfigureFormsPlugin.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import path from "path";
import {plugin} from "./engine/MainPlugin";

import {loadForms} from "./engine/service/ConfigurationFormsService";
import {idFromFilename} from "../../../../digital-form-builder/runner/src/server/plugins/engine/helpers";
import {
FormConfiguration
Expand All @@ -15,7 +14,7 @@ const relativeTo = __dirname;

export const ConfigureFormsPlugin: ConfigureEnginePluginType = (
formFileName, formFilePath, options?: EngineOptions) => {
let configs: FormConfiguration[];
let configs: FormConfiguration[] = [];

if (formFileName && formFilePath) {
configs = [
Expand All @@ -24,8 +23,6 @@ export const ConfigureFormsPlugin: ConfigureEnginePluginType = (
id: idFromFilename(formFileName)
}
];
} else {
configs = loadForms();
}

const modelOptions = {
Expand Down
6 changes: 3 additions & 3 deletions runner/src/server/plugins/engine/MainPlugin.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Options} from "./types/PluginOptions";
import {HapiServer} from "../../types";
import {RegisterFormPublishApi} from "./api";
import {RegisterFormsApi} from "./api";


const LOGGER_DATA = {
Expand All @@ -18,7 +18,7 @@ export const plugin = {
let countError = 0;
for (const config of configs) {
try {
await adapterCacheService.setFormConfiguration(config.id, config, server);
await adapterCacheService.setFormConfiguration(config.id, config);
countOk++;
} catch (e) {
countError++;
Expand All @@ -32,6 +32,6 @@ export const plugin = {
...LOGGER_DATA,
message: `[FORM-CACHE] number of forms loaded into cache ok[${countOk}] error[${countError}]`
})
new RegisterFormPublishApi().register(server, options);
new RegisterFormsApi().register(server);
}
};
Loading
Loading