@defra/forms-engine-plugin 0.0.3 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/.public/assets/fonts/bold-affa96571d-v2.woff +0 -0
  2. package/.public/assets/fonts/bold-b542beb274-v2.woff2 +0 -0
  3. package/.public/assets/fonts/light-94a07e06a1-v2.woff2 +0 -0
  4. package/.public/assets/fonts/light-f591b13f7d-v2.woff +0 -0
  5. package/.public/assets/images/favicon.ico +0 -0
  6. package/.public/assets/images/favicon.svg +1 -0
  7. package/.public/assets/images/govuk-crest.svg +1 -0
  8. package/.public/assets/images/govuk-icon-180.png +0 -0
  9. package/.public/assets/images/govuk-icon-192.png +0 -0
  10. package/.public/assets/images/govuk-icon-512.png +0 -0
  11. package/.public/assets/images/govuk-icon-mask.svg +1 -0
  12. package/.public/assets/images/govuk-opengraph-image.png +0 -0
  13. package/.public/assets/manifest.json +39 -0
  14. package/.public/assets-manifest.json +24 -0
  15. package/.public/javascripts/application.0fd8c18.min.js +3 -0
  16. package/.public/javascripts/application.0fd8c18.min.js.LICENSE.txt +58 -0
  17. package/.public/javascripts/application.0fd8c18.min.js.map +1 -0
  18. package/.public/javascripts/file-upload.b2f18f5.min.js +2 -0
  19. package/.public/javascripts/file-upload.b2f18f5.min.js.map +1 -0
  20. package/.public/javascripts/vendor/accessible-autocomplete.275d332.min.js +2 -0
  21. package/.public/javascripts/vendor/accessible-autocomplete.275d332.min.js.map +1 -0
  22. package/.public/stylesheets/application.e340021.min.css +14 -0
  23. package/.public/stylesheets/application.e340021.min.css.map +1 -0
  24. package/package.json +7 -2
  25. package/.browserslistrc +0 -16
  26. package/.editorconfig +0 -9
  27. package/.eslintrc.cjs +0 -266
  28. package/.github/dependabot.yml +0 -85
  29. package/.github/workflows/check-pull-request.yml +0 -209
  30. package/.github/workflows/pr-notifier.yml +0 -98
  31. package/.github/workflows/publish.yml +0 -111
  32. package/.husky/pre-commit +0 -1
  33. package/.lintstagedrc.js +0 -4
  34. package/.nvmrc +0 -1
  35. package/.prettierignore +0 -8
  36. package/.prettierrc.cjs +0 -26
  37. package/Dockerfile +0 -61
  38. package/Procfile +0 -1
  39. package/babel.config.cjs +0 -55
  40. package/compose/aws.env +0 -4
  41. package/compose/start-localstack.sh +0 -26
  42. package/docker-compose.yaml +0 -86
  43. package/globals.d.ts +0 -1
  44. package/jest.config.cjs +0 -54
  45. package/jest.environment.js +0 -4
  46. package/jest.setup.cjs +0 -14
  47. package/postcss.config.js +0 -26
  48. package/sonar-project.properties +0 -17
  49. package/stylelint.config.js +0 -10
  50. package/test/client/javascripts/file-upload.test.js +0 -1197
  51. package/test/condition/checkboxes.test.js +0 -112
  52. package/test/condition/radios.test.js +0 -112
  53. package/test/condition/text.test.js +0 -103
  54. package/test/fixtures/assets-manifest.json +0 -4
  55. package/test/fixtures/form.js +0 -86
  56. package/test/fixtures/index.js +0 -2
  57. package/test/fixtures/list.js +0 -92
  58. package/test/form/cookies.test.js +0 -338
  59. package/test/form/csrf.test.js +0 -87
  60. package/test/form/definitions/basic.js +0 -101
  61. package/test/form/definitions/blank.js +0 -10
  62. package/test/form/definitions/checkboxes.json +0 -88
  63. package/test/form/definitions/components.json +0 -452
  64. package/test/form/definitions/conditional-reveal.js +0 -140
  65. package/test/form/definitions/conditions-basic.js +0 -187
  66. package/test/form/definitions/conditions-complex.js +0 -338
  67. package/test/form/definitions/conditions-dates.js +0 -78
  68. package/test/form/definitions/conditions-escaping.js +0 -143
  69. package/test/form/definitions/demo-cph-number.js +0 -3099
  70. package/test/form/definitions/feedback.json +0 -45
  71. package/test/form/definitions/fields-optional.js +0 -402
  72. package/test/form/definitions/fields-required.js +0 -402
  73. package/test/form/definitions/file-upload-basic.js +0 -44
  74. package/test/form/definitions/file-upload.js +0 -66
  75. package/test/form/definitions/minimal.js +0 -39
  76. package/test/form/definitions/phase-alpha.json +0 -33
  77. package/test/form/definitions/phase-default.json +0 -26
  78. package/test/form/definitions/radios.json +0 -88
  79. package/test/form/definitions/repeat-mixed.js +0 -54
  80. package/test/form/definitions/repeat.js +0 -70
  81. package/test/form/definitions/status.json +0 -126
  82. package/test/form/definitions/templates.js +0 -183
  83. package/test/form/definitions/test.json +0 -581
  84. package/test/form/definitions/text.json +0 -75
  85. package/test/form/definitions/titles.json +0 -170
  86. package/test/form/definitions.test.js +0 -47
  87. package/test/form/exit-page.test.js +0 -210
  88. package/test/form/feedback.test.js +0 -68
  89. package/test/form/fields-optional.test.js +0 -237
  90. package/test/form/fields-required.test.js +0 -294
  91. package/test/form/file-upload.test.js +0 -313
  92. package/test/form/govuk-notify.test.js +0 -449
  93. package/test/form/journey-basic.test.js +0 -444
  94. package/test/form/persist-files.test.js +0 -227
  95. package/test/form/phase-banner.test.js +0 -71
  96. package/test/form/repeat.test.js +0 -628
  97. package/test/form/summary-submission-email.test.js +0 -95
  98. package/test/form/template.test.js +0 -288
  99. package/test/form/titles.test.js +0 -204
  100. package/test/helpers/component-helpers.js +0 -74
  101. package/test/utils/get-cookie.js +0 -42
  102. package/test/utils/get-form-definitions.js +0 -18
  103. package/tmp.pdf +0 -1
  104. package/tsconfig.json +0 -28
  105. package/webpack.config.js +0 -208
@@ -1,98 +0,0 @@
1
- name: Post PR to Slack
2
-
3
- on:
4
- pull_request:
5
- types:
6
- - opened
7
- - converted_to_draft
8
- - ready_for_review
9
- - reopened
10
- - closed
11
-
12
- pull_request_review:
13
- types:
14
- - submitted
15
-
16
- env:
17
- CONFIG: |
18
- {
19
- "opened": {
20
- "icon": "${{ github.event.pull_request.draft && '📝' || '🆕' }}",
21
- "status": "${{ github.event.pull_request.draft && 'opened as draft' || 'opened' }}"
22
- },
23
- "converted_to_draft": {
24
- "icon": "📝",
25
- "status": "converted to draft"
26
- },
27
- "ready_for_review": {
28
- "icon": "👀",
29
- "status": "ready for review"
30
- },
31
- "reopened": {
32
- "icon": "🔄",
33
- "status": "reopened"
34
- },
35
- "submitted": {
36
- "icon": "${{ github.event.review.state == 'approved' && '✅' || '💬' }}",
37
- "status": "${{ github.event.review.state == 'approved' && 'code review approved' || 'code review comments' }}"
38
- },
39
- "closed": {
40
- "icon": "${{ github.event.pull_request.merged && '🚀' || '🗑️' }}",
41
- "status": "${{ github.event.pull_request.merged && 'merged' || 'closed' }}"
42
- }
43
- }
44
-
45
- jobs:
46
- notify:
47
- name: Slack notify
48
- runs-on: ubuntu-24.04
49
- if: ${{ !contains(github.event.pull_request.head.ref || github.head_ref || github.ref, 'dependabot/') }}
50
-
51
- steps:
52
- - name: Build Slack JSON
53
- uses: actions/github-script@v7
54
- id: payload
55
- if: github.event.action != 'submitted' || github.event.review.state == 'approved'
56
-
57
- env:
58
- ACTION_ICON: ${{ fromJSON(env.CONFIG)[github.event.action].icon }}
59
- ACTION_STATUS: ${{ fromJSON(env.CONFIG)[github.event.action].status }}
60
-
61
- with:
62
- github-token: ${{ secrets.GITHUB_TOKEN }}
63
- script: |
64
- const title = ${{ toJson(github.event.pull_request.title) }}
65
- const username = ${{ toJson(github.event.pull_request.user.login) }}
66
- const profileUrl = ${{ toJson(github.event.pull_request.user.html_url) }}
67
-
68
- const { pull_request } = context.payload
69
- const { owner, repo } = context.repo
70
-
71
- // Format as Slack mrkdwn
72
- const titleFormatted = `<${pull_request.html_url}|*${title}* #${pull_request.number}>`
73
- const profileFormatted = `<${profileUrl}|@${username}>`
74
-
75
- // Payload output is JSON encoded
76
- return {
77
- channel: '${{ vars.SLACK_CHANNEL_ID }}',
78
- blocks: [
79
- {
80
- type: 'section',
81
- text: {
82
- type: 'mrkdwn',
83
- text: `${owner}/*${repo}*: ${titleFormatted} by ${profileFormatted} ${{ env.ACTION_ICON }} ${{ env.ACTION_STATUS }}`
84
- }
85
- }
86
- ],
87
- unfurl_links: false,
88
- unfurl_media: false
89
- }
90
-
91
- - name: Post to Slack
92
- uses: slackapi/slack-github-action@v2.0.0
93
- if: github.event.action != 'submitted' || github.event.review.state == 'approved'
94
-
95
- with:
96
- method: chat.postMessage
97
- token: ${{ secrets.SLACK_BOT_TOKEN }}
98
- payload: ${{ steps.payload.outputs.result }}
@@ -1,111 +0,0 @@
1
- name: Publish Engine plugin
2
-
3
- on:
4
- workflow_dispatch: {}
5
-
6
- push:
7
- branches:
8
- - main
9
- paths:
10
- - '.browserslistrc'
11
- - 'babel.config.*'
12
- - 'src/**'
13
- - '!**/*.test.*'
14
-
15
- concurrency:
16
- group: publish-engine-plugin
17
-
18
- permissions:
19
- contents: write
20
- packages: write
21
-
22
- jobs:
23
- build:
24
- name: Build
25
- runs-on: ubuntu-24.04
26
-
27
- steps:
28
- - name: Check out code
29
- uses: actions/checkout@v4
30
-
31
- - name: Cache dependencies
32
- uses: actions/cache@v4
33
- id: npm-install-cache
34
- with:
35
- enableCrossOsArchive: true
36
- key: npm-install-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
37
- path: node_modules
38
-
39
- - name: Cache build
40
- uses: actions/cache@v4
41
- with:
42
- enableCrossOsArchive: true
43
- key: npm-build-${{ runner.os }}-${{ github.sha }}
44
- path: |
45
- .server
46
- .public
47
-
48
- - name: Setup Node.js
49
- uses: actions/setup-node@v4
50
- with:
51
- cache: 'npm'
52
- node-version-file: .nvmrc
53
-
54
- - name: Install dependencies
55
- if: steps.npm-install-cache.outputs.cache-hit != 'true'
56
- run: npm ci
57
-
58
- - name: Run build
59
- run: npm run build
60
-
61
- publish:
62
- name: Publish
63
- runs-on: ubuntu-24.04
64
- needs: [build]
65
- environment: production
66
-
67
- steps:
68
- - name: Check out code
69
- uses: actions/checkout@v4
70
- with:
71
- fetch-depth: 0
72
- ref: main
73
-
74
- - name: Restore dependencies
75
- uses: actions/cache/restore@v4
76
- with:
77
- enableCrossOsArchive: true
78
- fail-on-cache-miss: true
79
- key: npm-install-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
80
- path: node_modules
81
-
82
- - name: Restore build
83
- uses: actions/cache/restore@v4
84
- with:
85
- enableCrossOsArchive: true
86
- fail-on-cache-miss: true
87
- key: npm-build-${{ runner.os }}-${{ github.sha }}
88
- path: |
89
- .server
90
- .public
91
-
92
- - name: Setup Node.js
93
- uses: actions/setup-node@v4
94
- with:
95
- node-version-file: .nvmrc
96
- registry-url: https://registry.npmjs.org
97
- scope: '@defra'
98
-
99
- - name: Update package versions
100
- run: npm version patch --git-tag-version false --save
101
-
102
- - name: Commit and push updates
103
- run: |
104
- git config user.name github-actions
105
- git config user.email github-actions@github.com
106
- git commit -am "v$(npm pkg get version | tr -d \") [skip ci]" && git push
107
-
108
- - name: Publish to npm
109
- run: npm publish --access public
110
- env:
111
- NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
package/.husky/pre-commit DELETED
@@ -1 +0,0 @@
1
- lint-staged
package/.lintstagedrc.js DELETED
@@ -1,4 +0,0 @@
1
- export default {
2
- '*.{cjs,js,mjs,ts}': 'eslint --fix',
3
- '*.{cjs,js,json,md,mjs,scss,ts}': 'prettier --write'
4
- }
package/.nvmrc DELETED
@@ -1 +0,0 @@
1
- lts/jod
package/.prettierignore DELETED
@@ -1,8 +0,0 @@
1
- # Ignore
2
- node_modules
3
- coverage
4
- dist
5
- public
6
-
7
- # Ignore all HTML files:
8
- *.html
package/.prettierrc.cjs DELETED
@@ -1,26 +0,0 @@
1
- /**
2
- * Prettier config
3
- *
4
- * @type {import('prettier').Config}
5
- */
6
- module.exports = {
7
- semi: false,
8
- singleQuote: true,
9
- trailingComma: 'none',
10
- overrides: [
11
- {
12
- files: '*.md',
13
- options: {
14
- embeddedLanguageFormatting: 'off',
15
- singleQuote: false
16
- }
17
- },
18
- {
19
- files: '*.scss',
20
- options: {
21
- printWidth: 120,
22
- singleQuote: false
23
- }
24
- }
25
- ]
26
- }
package/Dockerfile DELETED
@@ -1,61 +0,0 @@
1
- ARG PARENT_VERSION=latest-22
2
- ARG PORT=3000
3
- ARG PORT_DEBUG=9229
4
-
5
- FROM defradigital/node-development:${PARENT_VERSION} AS development
6
-
7
- ENV TZ="Europe/London"
8
-
9
- ARG PARENT_VERSION
10
- LABEL uk.gov.defra.ffc.parent-image=defradigital/node-development:${PARENT_VERSION}
11
-
12
- ARG PORT
13
- ARG PORT_DEBUG
14
- ENV PORT ${PORT}
15
- EXPOSE ${PORT} ${PORT_DEBUG}
16
-
17
- WORKDIR /home/node/app
18
-
19
- COPY --chown=node:node packag*.json ./
20
-
21
- RUN npm ci
22
-
23
- COPY --chown=node:node ./ ./
24
-
25
- CMD [ "npm", "run", "dev" ]
26
-
27
- FROM development as productionBuild
28
-
29
- WORKDIR /home/node/app
30
-
31
- ENV NODE_ENV production
32
-
33
- RUN npm run build
34
-
35
- FROM defradigital/node:${PARENT_VERSION} AS production
36
-
37
- ENV TZ="Europe/London"
38
-
39
- # Add curl to template.
40
- # CDP PLATFORM HEALTHCHECK REQUIREMENT
41
- USER root
42
- RUN apk update && \
43
- apk add curl
44
- USER node
45
-
46
- ARG PARENT_VERSION
47
- LABEL uk.gov.defra.ffc.parent-image=defradigital/node:${PARENT_VERSION}
48
-
49
- WORKDIR /home/node/app
50
-
51
- COPY --from=productionBuild /home/node/app/package*.json ./
52
- COPY --from=productionBuild /home/node/app/.public ./.public
53
- COPY --from=productionBuild /home/node/app/.server ./.server
54
-
55
- RUN npm ci --omit=dev
56
-
57
- ARG PORT
58
- ENV PORT ${PORT}
59
- EXPOSE ${PORT}
60
-
61
- CMD [ "npm", "start", "--ignore-scripts" ]
package/Procfile DELETED
@@ -1 +0,0 @@
1
- web: npm run start
package/babel.config.cjs DELETED
@@ -1,55 +0,0 @@
1
- const { NODE_ENV } = process.env
2
-
3
- /**
4
- * Babel config
5
- * @satisfies {import('@babel/core').TransformOptions}
6
- */
7
- module.exports = {
8
- browserslistEnv: 'node',
9
- plugins: [
10
- [
11
- 'module-resolver',
12
- {
13
- root: ['./'],
14
- alias: {
15
- '~': '.'
16
- }
17
- }
18
- ],
19
- '@babel/plugin-syntax-import-attributes'
20
- ],
21
- presets: [
22
- [
23
- '@babel/preset-env',
24
- {
25
- // Apply bug fixes to avoid transforms
26
- bugfixes: true,
27
-
28
- // Apply ES module transforms for Jest
29
- // https://jestjs.io/docs/ecmascript-modules
30
- modules: NODE_ENV === 'test' ? 'auto' : false
31
- }
32
- ],
33
- [
34
- '@babel/preset-typescript',
35
- {
36
- allowDeclareFields: true
37
- }
38
- ]
39
- ],
40
- env: {
41
- test: {
42
- plugins: [
43
- [
44
- 'replace-import-extension',
45
- {
46
- extMapping: {
47
- '.cjs': '',
48
- '.js': ''
49
- }
50
- }
51
- ]
52
- ]
53
- }
54
- }
55
- }
package/compose/aws.env DELETED
@@ -1,4 +0,0 @@
1
- AWS_REGION=eu-west-2
2
- AWS_DEFAULT_REGION=eu-west-2
3
- AWS_ACCESS_KEY_ID=test
4
- AWS_SECRET_ACCESS_KEY=test
@@ -1,26 +0,0 @@
1
- #!/bin/bash
2
- export AWS_REGION=eu-west-2
3
- export AWS_DEFAULT_REGION=eu-west-2
4
- export AWS_ACCESS_KEY_ID=test
5
- export AWS_SECRET_ACCESS_KEY=test
6
-
7
- aws --endpoint-url=http://localhost:4566 s3 mb s3://cdp-uploader-quarantine
8
- aws --endpoint-url=http://localhost:4566 s3 mb s3://my-bucket
9
-
10
- # queues
11
- aws --endpoint-url=http://localhost:4566 sqs create-queue --queue-name cdp-clamav-results
12
- aws --endpoint-url=http://localhost:4566 sqs create-queue --queue-name cdp-uploader-scan-results-callback.fifo --attributes "{\"FifoQueue\":\"true\",\"ContentBasedDeduplication\": \"true\"}"
13
-
14
- # test harness
15
- aws --endpoint-url=http://localhost:4566 sqs create-queue --queue-name mock-clamav
16
- aws --endpoint-url=http://localhost:4566 s3api put-bucket-notification-configuration\
17
- --bucket cdp-uploader-quarantine \
18
- --notification-configuration '
19
- {
20
- "QueueConfigurations": [
21
- {
22
- "QueueArn": "arn:aws:sqs:eu-west-2:000000000000:mock-clamav",
23
- "Events": ["s3:ObjectCreated:*"]
24
- }
25
- ]
26
- }'
@@ -1,86 +0,0 @@
1
- services:
2
- redis:
3
- image: redis:7.0.7
4
- restart: unless-stopped
5
- ports:
6
- - '6379:6379'
7
- environment:
8
- - REDIS_PASSWORD=my-password
9
- - REDIS_PORT=6379
10
- networks:
11
- - cdpuploader
12
-
13
- redisinsight:
14
- image: redislabs/redisinsight:latest
15
- ports:
16
- - '5540:5540'
17
- volumes:
18
- - redisinsight:/data
19
- depends_on:
20
- - redis
21
-
22
- localstack:
23
- image: localstack/localstack:3.0.2
24
- ports:
25
- - '127.0.0.1:4566:4566' # LocalStack Gateway
26
- - '127.0.0.1:4510-4559:4510-4559' # external services port range
27
- env_file:
28
- - 'compose/aws.env'
29
- environment:
30
- DEBUG: ${DEBUG:-1}
31
- LS_LOG: WARN # Localstack DEBUG Level
32
- SERVICES: s3,sqs,sns,firehose
33
- LOCALSTACK_HOST: 127.0.0.1
34
- volumes:
35
- - '${TMPDIR:-/tmp}/localstack:/var/lib/localstack'
36
- - ./compose/start-localstack.sh:/etc/localstack/init/ready.d/start-localstack.sh
37
- healthcheck:
38
- test: ['CMD', 'curl', 'localhost:4566']
39
- interval: 5s
40
- start_period: 5s
41
- retries: 3
42
- networks:
43
- cdpuploader:
44
- ipv4_address: 10.0.2.20
45
-
46
- cdp-uploader:
47
- image: defradigital/cdp-uploader:${CDP_UPLOADER_VERSION:-latest}
48
- ports:
49
- - '127.0.0.1:7337:7337'
50
- links:
51
- - 'localstack:localstack'
52
- - 'redis:redis'
53
- depends_on:
54
- localstack:
55
- condition: service_healthy
56
- env_file:
57
- - 'compose/aws.env'
58
- environment:
59
- VIRTUAL_HOST: ~^uploader\..*\.sslip\.io
60
- VIRTUAL_PATH: /
61
- VIRTUAL_PORT: 7337
62
- PORT: 7337
63
- NODE_ENV: development
64
- REDIS_HOST: redis
65
- LOCALSTACK_ENDPOINT: http://localhost.localstack.cloud:4566
66
- S3_ENDPOINT: http://localhost.localstack.cloud:4566
67
- SQS_ENDPOINT: http://localhost.localstack.cloud:4566
68
- USE_SINGLE_INSTANCE_CACHE: true
69
- MOCK_VIRUS_SCAN_ENABLED: true
70
- MOCK_VIRUS_RESULT_DELAY: 3
71
- dns:
72
- # Set the DNS server to be the LocalStack container
73
- - 10.0.2.20
74
- networks:
75
- - cdpuploader
76
-
77
- volumes:
78
- redisinsight:
79
-
80
- networks:
81
- cdpuploader:
82
- driver: bridge
83
- ipam:
84
- config:
85
- # Specify the subnet range for IP address allocation
86
- - subnet: 10.0.2.0/24
package/globals.d.ts DELETED
@@ -1 +0,0 @@
1
- import 'jest-extended'
package/jest.config.cjs DELETED
@@ -1,54 +0,0 @@
1
- const { CI } = process.env
2
-
3
- /**
4
- * Jest config
5
- * @type {import('@jest/types').Config.InitialOptions}
6
- */
7
- module.exports = {
8
- resetMocks: true,
9
- resetModules: true,
10
- restoreMocks: true,
11
- clearMocks: true,
12
- silent: true,
13
- testMatch: [
14
- '<rootDir>/src/**/*.test.{cjs,js,mjs,ts}',
15
- '<rootDir>/test/**/*.test.{cjs,js,mjs,ts}'
16
- ],
17
- reporters: CI
18
- ? [['github-actions', { silent: false }], 'summary']
19
- : ['default', 'summary'],
20
- collectCoverageFrom: ['<rootDir>/src/**/*.{cjs,js,mjs,ts}'],
21
- coveragePathIgnorePatterns: [
22
- '<rootDir>/node_modules/',
23
- '<rootDir>/.server',
24
- '<rootDir>/src/client/(?!javascripts)',
25
- '<rootDir>/src/client/javascripts/application.js',
26
- '<rootDir>/test'
27
- ],
28
- coverageDirectory: '<rootDir>/coverage',
29
- setupFiles: ['<rootDir>/jest.setup.cjs'],
30
- setupFilesAfterEnv: ['<rootDir>/jest.environment.js', 'jest-extended/all'],
31
- transform: {
32
- '^.+\\.(cjs|js|mjs|ts)$': [
33
- 'babel-jest',
34
- {
35
- browserslistEnv: 'node',
36
- plugins: ['transform-import-meta'],
37
- rootMode: 'upward'
38
- }
39
- ]
40
- },
41
-
42
- // Enable Babel transforms for node_modules
43
- // See: https://jestjs.io/docs/ecmascript-modules
44
- transformIgnorePatterns: [
45
- `node_modules/(?!${[
46
- '@defra/forms-model/.*',
47
- 'nanoid', // Supports ESM only
48
- 'slug', // Supports ESM only
49
- '@defra/hapi-tracing' // Supports ESM only|
50
- ].join('|')}/)`
51
- ],
52
- testTimeout: 10000,
53
- forceExit: true
54
- }
@@ -1,4 +0,0 @@
1
- import '@testing-library/jest-dom'
2
- import JSDOM from 'global-jsdom'
3
-
4
- JSDOM()
package/jest.setup.cjs DELETED
@@ -1,14 +0,0 @@
1
- process.env.MANAGER_URL = 'http://localhost:3001'
2
- process.env.REDIS_HOST = 'dummy'
3
- process.env.REDIS_KEY_PREFIX = 'forms-designer'
4
- process.env.REDIS_PASSWORD = 'dummy'
5
- process.env.REDIS_USERNAME = 'dummy'
6
- process.env.SESSION_COOKIE_PASSWORD = 'test-env-session-cookie-password'
7
- process.env.NOTIFY_TEMPLATE_ID = 'dummy'
8
- process.env.NOTIFY_API_KEY = 'dummy'
9
- process.env.FEEDBACK_LINK = 'https://test.defra.gov.uk/'
10
- process.env.DESIGNER_URL = 'https://forms-designer'
11
- process.env.SUBMISSION_URL = 'https://test-submission-api.cdp-int.defra.cloud'
12
- process.env.UPLOADER_URL = 'https://test-uploader.cdp-int.defra.cloud'
13
- process.env.UPLOADER_BUCKET_NAME = 'dummy-bucket'
14
- process.env.GOOGLE_ANALYTICS_TRACKING_ID = 'G-123456789'
package/postcss.config.js DELETED
@@ -1,26 +0,0 @@
1
- import autoprefixer from 'autoprefixer'
2
- import cssnano from 'cssnano'
3
- import cssnanoPresetDefault from 'cssnano-preset-default'
4
-
5
- /**
6
- * @type {Config}
7
- */
8
- export default {
9
- plugins: [
10
- // Add vendor prefixes
11
- autoprefixer({
12
- env: 'stylesheets'
13
- }),
14
-
15
- // Apply CSS optimisations
16
- cssnano({
17
- preset: cssnanoPresetDefault({
18
- env: 'stylesheets'
19
- })
20
- })
21
- ]
22
- }
23
-
24
- /**
25
- * @import { Config } from 'postcss-load-config'
26
- */
@@ -1,17 +0,0 @@
1
- sonar.projectKey=DEFRA_forms-runner
2
- sonar.projectName=forms-runner
3
- sonar.organization=defra
4
-
5
- sonar.links.homepage=https://github.com/DEFRA/forms-runner/blob/main/README.md
6
- sonar.links.ci=https://github.com/DEFRA/forms-runner/actions
7
- sonar.links.scm=https://github.com/DEFRA/forms-runner
8
- sonar.links.issue=https://github.com/DEFRA/forms-runner/issues
9
-
10
- sonar.javascript.lcov.reportPaths=coverage/lcov.info
11
- sonar.sourceEncoding=UTF-8
12
-
13
- sonar.sources=src
14
- sonar.exclusions=**/*.test.*,src/server/forms/*
15
- sonar.tests=src,test
16
- sonar.test.inclusions=**/*.test.*
17
- sonar.cpd.exclusions=**/*.test.*
@@ -1,10 +0,0 @@
1
- export default {
2
- extends: 'stylelint-config-gds/scss',
3
- ignoreFiles: ['**/dist/**'],
4
- overrides: [
5
- {
6
- customSyntax: 'postcss-scss',
7
- files: ['**/*.scss']
8
- }
9
- ]
10
- }