@hmcts/opal-frontend-common-node 0.0.2

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 (56) hide show
  1. package/.editorconfig +16 -0
  2. package/.github/renovate.json +11 -0
  3. package/.github/workflows/npm_build.yml +67 -0
  4. package/.prettierignore +12 -0
  5. package/.prettierrc +7 -0
  6. package/.vscode/settings.json +6 -0
  7. package/LICENSE +21 -0
  8. package/README.md +109 -0
  9. package/eslint.config.js +22 -0
  10. package/package.json +117 -0
  11. package/sonar-project.properties +9 -0
  12. package/src/app-insights/app-insights-configuration.ts +18 -0
  13. package/src/app-insights/index.ts +39 -0
  14. package/src/csrf-token/index.ts +36 -0
  15. package/src/global.d.ts +2 -0
  16. package/src/health/index.ts +32 -0
  17. package/src/helmet/index.ts +60 -0
  18. package/src/index.ts +10 -0
  19. package/src/interfaces/app-insights-config.ts +7 -0
  20. package/src/interfaces/index.ts +23 -0
  21. package/src/interfaces/launch-darkly-config.ts +7 -0
  22. package/src/interfaces/routes-config.ts +8 -0
  23. package/src/interfaces/securityToken.ts +8 -0
  24. package/src/interfaces/session-config.ts +5 -0
  25. package/src/interfaces/session-expiry-config.ts +7 -0
  26. package/src/interfaces/session-storage-config.ts +12 -0
  27. package/src/interfaces/sso-config.ts +9 -0
  28. package/src/interfaces/transfer-server-state.ts +10 -0
  29. package/src/interfaces/userState.ts +18 -0
  30. package/src/launch-darkly/index.ts +17 -0
  31. package/src/properties-volume/index.ts +12 -0
  32. package/src/proxy/index.ts +1 -0
  33. package/src/proxy/opal-api-proxy/index.ts +19 -0
  34. package/src/routes/index.ts +91 -0
  35. package/src/session/index.ts +5 -0
  36. package/src/session/session-expiry/index.ts +31 -0
  37. package/src/session/session-storage/index.ts +68 -0
  38. package/src/session/session-user-state/index.ts +24 -0
  39. package/src/session.d.ts +10 -0
  40. package/src/sso/index.ts +7 -0
  41. package/src/sso/sso-authenticated.ts +15 -0
  42. package/src/sso/sso-login-callback.ts +30 -0
  43. package/src/sso/sso-login.ts +31 -0
  44. package/src/sso/sso-logout-callback.ts +17 -0
  45. package/src/sso/sso-logout.ts +41 -0
  46. package/src/stubs/sso/index.ts +7 -0
  47. package/src/stubs/sso/sso-authenticated.stub.ts +16 -0
  48. package/src/stubs/sso/sso-login-callback.stub.ts +29 -0
  49. package/src/stubs/sso/sso-login.stub.ts +16 -0
  50. package/src/stubs/sso/sso-logout-callback.stub.ts +16 -0
  51. package/src/stubs/sso/sso-logout.stub.ts +6 -0
  52. package/src/type.d.ts +7 -0
  53. package/src/utils/base64.ts +7 -0
  54. package/src/utils/index.ts +3 -0
  55. package/src/utils/jwt.ts +35 -0
  56. package/tsconfig.json +72 -0
package/tsconfig.json ADDED
@@ -0,0 +1,72 @@
1
+ {
2
+ "compileOnSave": false,
3
+ "compilerOptions": {
4
+ "outDir": "./dist",
5
+ "strict": true,
6
+ "noImplicitOverride": true,
7
+ "target": "ES2022",
8
+ "module": "ES2022",
9
+ "lib": ["ES2022", "dom"],
10
+ "noPropertyAccessFromIndexSignature": true,
11
+ "noImplicitReturns": true,
12
+ "noFallthroughCasesInSwitch": true,
13
+ "skipLibCheck": true,
14
+ "isolatedModules": true,
15
+ "esModuleInterop": true,
16
+ "sourceMap": true,
17
+ "declaration": true,
18
+ "declarationMap": true,
19
+ "emitDeclarationOnly": false,
20
+ "moduleResolution": "node",
21
+ "typeRoots": ["node_modules/@types"],
22
+ "paths": {
23
+ "@hmcts/opal-frontend-common-node": [
24
+ "./src/index.ts",
25
+ ],
26
+ "@hmcts/opal-frontend-common-node/launch-darkly/*": [
27
+ "./src/launch-darkly/*",
28
+ ],
29
+ "@hmcts/opal-frontend-common-node/app-insights/*": [
30
+ "./src/app-insights/*",
31
+ ],
32
+ "@hmcts/opal-frontend-common-node/interfaces/*": [
33
+ "./src/interfaces/*",
34
+ ],
35
+ "@hmcts/opal-frontend-common-node/health/*": [
36
+ "./src/health/*",
37
+ ],
38
+ "@hmcts/opal-frontend-common-node/helmet/*": [
39
+ "./src/helmet/*",
40
+ ],
41
+ "@hmcts/opal-frontend-common-node/properties-volume/*": [
42
+ "./src/properties-volume/*",
43
+ ],
44
+ "@hmcts/opal-frontend-common-node/csrf-token/*": [
45
+ "./src/csrf-token/*",
46
+ ],
47
+ "@hmcts/opal-frontend-common-node/proxy/*": [
48
+ "./src/proxy/*",
49
+ ],
50
+ "@hmcts/opal-frontend-common-node/proxy/opal-api-proxy/*": [
51
+ "./src/proxy/opal-api-proxy/*",
52
+ ],
53
+ "@hmcts/opal-frontend-common-node/routes/*": [
54
+ "./src/routes/*",
55
+ ],
56
+ "@hmcts/opal-frontend-common-node/session/*": [
57
+ "./src/session/*",
58
+ ],
59
+ "@hmcts/opal-frontend-common-node/session/session-expiry/*": [
60
+ "./src/session/session-expiry/*",
61
+ ],
62
+ "@hmcts/opal-frontend-common-node/session/session-user-state/*": [
63
+ "./src/session/session-user-state/*",
64
+ ],
65
+ "@hmcts/opal-frontend-common-node/session/session-storage/*": [
66
+ "./src/session/session-storage/*",
67
+ ],
68
+ }
69
+ },
70
+ "include": ["src", "src/index.ts"],
71
+ "exclude": ["node_modules", "dist", "src/**/*.spec.ts"]
72
+ }