@govuk-pay/pay-js-commons 3.6.0 → 3.7.0

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.
Binary file
Binary file
@@ -17,8 +17,9 @@ module.exports = {
17
17
  Keys match those defined here:
18
18
  https://github.com/alphagov/pay-webhooks/blob/main/src/main/java/uk/gov/pay/webhooks/eventtype/EventTypeName.java
19
19
  */
20
- CARD_PAYMENT_STARTED: 'Payment started',
21
20
  CARD_PAYMENT_SUCCEEDED: 'Payment succeeded',
21
+ CARD_PAYMENT_FAILED: 'Payment failed',
22
+ CARD_PAYMENT_EXPIRED: 'Payment expired',
22
23
  CARD_PAYMENT_CAPTURED: 'Payment captured',
23
24
  CARD_PAYMENT_REFUNDED: 'Payment refunded'
24
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@govuk-pay/pay-js-commons",
3
- "version": "3.6.0",
3
+ "version": "3.7.0",
4
4
  "description": "Reusable js scripts for GOV.UK Pay Node.js projects",
5
5
  "engines": {
6
6
  "node": "^16.14.0"
@@ -18,11 +18,6 @@
18
18
  "jest-tests": "jest src/analytics",
19
19
  "lint": "./node_modules/.bin/standard --fix"
20
20
  },
21
- "husky": {
22
- "hooks": {
23
- "pre-commit": "lint-staged"
24
- }
25
- },
26
21
  "repository": {
27
22
  "type": "git",
28
23
  "url": "git+https://github.com/alphagov/pay-js-commons.git"
@@ -115,13 +110,12 @@
115
110
  "browserify": "^17.0.0",
116
111
  "chai": "^4.2.0",
117
112
  "eslint-plugin-import": "^2.18.0",
118
- "eslint-plugin-promise": "^5.1.0",
119
- "husky": "^8.0.1",
113
+ "eslint-plugin-promise": "^6.0.0",
120
114
  "jest": "^27.0.1",
115
+ "jest-environment-jsdom": "^27.0.1",
121
116
  "js-cookie": "^3.0.0",
122
117
  "jsdom": "^19.0.0",
123
118
  "jsdom-global": "^3.0.2",
124
- "jest-environment-jsdom": "^27.0.1",
125
119
  "karma": "^6.0.0",
126
120
  "karma-browserify": "^8.0.0",
127
121
  "karma-chrome-launcher": "^3.1.0",
@@ -134,7 +128,7 @@
134
128
  "standard": "^16.0.3",
135
129
  "uglify-js": "^3.6.0",
136
130
  "watchify": "^4.0.0",
137
- "xo": "^0.50.0"
131
+ "xo": "^0.51.0"
138
132
  },
139
133
  "directories": {
140
134
  "lib": "lib"
@@ -0,0 +1,55 @@
1
+ $govuk-font-family: -apple-system,BlinkMacSystemFont,helvetica neue,helvetica,ubuntu,roboto,noto,segoe ui,arial,sans-serif; // Override font as so not to use New Transport
2
+ @import "application";
3
+
4
+ // CUSTOM BRANDING
5
+ // Use the variables below to control the style
6
+ // Make sure banner colours meet minimum colour contrast levels
7
+
8
+ $custom-banner-colour: #fff;
9
+ $custom-banner-border-colour: #2F5593;
10
+ $custom-text-colour: #ffffff;
11
+ $logo-image-height: 2em;
12
+
13
+ .custom-branding {
14
+ @if $logo-image-height != null {
15
+ .custom-branding-image {
16
+ max-height: $logo-image-height;
17
+
18
+ @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
19
+ width: 100%;
20
+ }
21
+ }
22
+ }
23
+
24
+ .govuk-header {
25
+ background-color: $custom-banner-colour;
26
+ }
27
+
28
+ .govuk-header__link{
29
+ &:link,
30
+ &:visited {
31
+ color: $custom-text-colour;
32
+ }
33
+ }
34
+
35
+ .govuk-header__link--service-name {
36
+ color: $custom-text-colour;
37
+ }
38
+
39
+ .govuk-header__container {
40
+ border-bottom-color: $custom-banner-border-colour;
41
+ }
42
+
43
+ @include govuk-media-query($from: tablet) {
44
+ .govuk-header__content {
45
+ width: 66%;
46
+ vertical-align: bottom;
47
+ margin-bottom: 7px;
48
+ }
49
+ }
50
+
51
+ .govuk-button {
52
+ padding: 7px 15px 6px;
53
+ padding: .368421053em .842105263em .315789474em;
54
+ }
55
+ }
@@ -1,7 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <code_scheme name="Project" version="173">
3
- <ScalaCodeStyleSettings>
4
- <option name="MULTILINE_STRING_CLOSING_QUOTES_ON_NEW_LINE" value="true" />
5
- </ScalaCodeStyleSettings>
6
- </code_scheme>
7
- </component>
@@ -1,5 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <state>
3
- <option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
4
- </state>
5
- </component>
package/.idea/misc.xml DELETED
@@ -1,13 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="MavenImportPreferences">
4
- <option name="generalSettings">
5
- <MavenGeneralSettings>
6
- <option name="mavenHome" value="$APPLICATION_HOME_DIR$/plugins/maven/lib/maven3" />
7
- </MavenGeneralSettings>
8
- </option>
9
- </component>
10
- <component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="11" project-jdk-type="JavaSDK">
11
- <output url="file://$PROJECT_DIR$/out" />
12
- </component>
13
- </project>
package/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/pay-js-commons.iml" filepath="$PROJECT_DIR$/.idea/pay-js-commons.iml" />
6
- </modules>
7
- </component>
8
- </project>
@@ -1,9 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="JAVA_MODULE" version="4">
3
- <component name="NewModuleRootManager" inherit-compiler-output="true">
4
- <exclude-output />
5
- <content url="file://$MODULE_DIR$" />
6
- <orderEntry type="inheritedJdk" />
7
- <orderEntry type="sourceFolder" forTests="false" />
8
- </component>
9
- </module>
package/.idea/vcs.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="" vcs="Git" />
5
- </component>
6
- </project>