@things-factory/shell 7.0.0-alpha.8 → 7.0.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.
Files changed (128) hide show
  1. package/_index.html +8 -3
  2. package/client/entries/public/home.js +5 -6
  3. package/client/index.js +1 -6
  4. package/client/route.js +11 -0
  5. package/client/serviceworker/sw-src.js +2 -2
  6. package/client/store.js +3 -3
  7. package/client/themes/app-theme.css +53 -60
  8. package/client/themes/calendar-theme.css +59 -0
  9. package/client/themes/dark.css +51 -0
  10. package/client/themes/grist-theme.css +175 -0
  11. package/client/themes/layout-theme.css +15 -13
  12. package/client/themes/light.css +51 -0
  13. package/client/themes/material-theme.css +23 -0
  14. package/client/themes/md-typescale-styles.css +100 -0
  15. package/client/themes/oops-theme.css +6 -6
  16. package/client/themes/report-theme.css +47 -0
  17. package/client/themes/spacing.css +23 -0
  18. package/client/themes/state-color.css +6 -0
  19. package/config/config.development.js +2 -1
  20. package/config/license.json +5 -5
  21. package/dist-server/graphql-local-client.js +3 -3
  22. package/dist-server/graphql-local-client.js.map +1 -1
  23. package/dist-server/index.d.ts +1 -0
  24. package/dist-server/index.js +1 -0
  25. package/dist-server/index.js.map +1 -1
  26. package/dist-server/initializers/database.js +6 -6
  27. package/dist-server/initializers/database.js.map +1 -1
  28. package/dist-server/middlewares/domain-middleware.js +1 -2
  29. package/dist-server/middlewares/domain-middleware.js.map +1 -1
  30. package/dist-server/middlewares/index.js +1 -2
  31. package/dist-server/middlewares/index.js.map +1 -1
  32. package/dist-server/pubsub.js +1 -2
  33. package/dist-server/pubsub.js.map +1 -1
  34. package/dist-server/routers/global-router.js.map +1 -1
  35. package/dist-server/schema.js +1 -2
  36. package/dist-server/schema.js.map +1 -1
  37. package/dist-server/server-dev.js +3 -7
  38. package/dist-server/server-dev.js.map +1 -1
  39. package/dist-server/server.js +2 -1
  40. package/dist-server/server.js.map +1 -1
  41. package/dist-server/service/attribute-set/attribute-set-item-type.js +5 -5
  42. package/dist-server/service/attribute-set/attribute-set-item-type.js.map +1 -1
  43. package/dist-server/service/attribute-set/attribute-set-mutation.js +2 -2
  44. package/dist-server/service/attribute-set/attribute-set-mutation.js.map +1 -1
  45. package/dist-server/service/attribute-set/attribute-set-query.js +3 -3
  46. package/dist-server/service/attribute-set/attribute-set-query.js.map +1 -1
  47. package/dist-server/service/attribute-set/attribute-set-type.js +6 -6
  48. package/dist-server/service/attribute-set/attribute-set-type.js.map +1 -1
  49. package/dist-server/service/attribute-set/attribute-set.js +2 -2
  50. package/dist-server/service/attribute-set/attribute-set.js.map +1 -1
  51. package/dist-server/service/common-types/list-param.js +9 -9
  52. package/dist-server/service/common-types/list-param.js.map +1 -1
  53. package/dist-server/service/common-types/log.js +2 -2
  54. package/dist-server/service/common-types/log.js.map +1 -1
  55. package/dist-server/service/common-types/object-ref.js +2 -2
  56. package/dist-server/service/common-types/object-ref.js.map +1 -1
  57. package/dist-server/service/common-types/scalar-any.js.map +1 -1
  58. package/dist-server/service/common-types/scalar-date.js.map +1 -1
  59. package/dist-server/service/directive-transaction/transaction.js.map +1 -1
  60. package/dist-server/service/domain/{domain-Mutation.js → domain-mutation.js} +3 -3
  61. package/dist-server/service/domain/domain-mutation.js.map +1 -0
  62. package/dist-server/service/domain/domain-query.js +3 -3
  63. package/dist-server/service/domain/domain-query.js.map +1 -1
  64. package/dist-server/service/domain/domain-types.js +6 -6
  65. package/dist-server/service/domain/domain-types.js.map +1 -1
  66. package/dist-server/service/domain/domain.js +6 -7
  67. package/dist-server/service/domain/domain.js.map +1 -1
  68. package/dist-server/service/domain/index.d.ts +1 -1
  69. package/dist-server/service/domain/index.js +2 -2
  70. package/dist-server/service/domain/index.js.map +1 -1
  71. package/dist-server/service/index.d.ts +1 -1
  72. package/dist-server/service/subscription-data/data-resolver.js +2 -2
  73. package/dist-server/service/subscription-data/data-resolver.js.map +1 -1
  74. package/dist-server/service/subscription-data/data-types.js +2 -2
  75. package/dist-server/service/subscription-data/data-types.js.map +1 -1
  76. package/dist-server/tsconfig.tsbuildinfo +1 -1
  77. package/dist-server/typeorm/encrypt-transform.js +1 -1
  78. package/dist-server/typeorm/encrypt-transform.js.map +1 -1
  79. package/dist-server/typeorm/get-data-encryption-key.js.map +1 -1
  80. package/dist-server/typeorm/json5-transform.js.map +1 -1
  81. package/dist-server/typeorm/round-transform.d.ts +5 -0
  82. package/dist-server/typeorm/round-transform.js +21 -0
  83. package/dist-server/typeorm/round-transform.js.map +1 -0
  84. package/dist-server/utils/condition-builder.js.map +1 -1
  85. package/dist-server/utils/get-domain.d.ts +0 -1
  86. package/dist-server/utils/get-domain.js +7 -8
  87. package/dist-server/utils/get-domain.js.map +1 -1
  88. package/dist-server/utils/get-query-builder-from-list-params.js +1 -2
  89. package/dist-server/utils/get-query-builder-from-list-params.js.map +1 -1
  90. package/dist-server/utils/get-times-for-period.js +2 -3
  91. package/dist-server/utils/get-times-for-period.js.map +1 -1
  92. package/dist-server/utils/list-param-adjuster.js +1 -2
  93. package/dist-server/utils/list-param-adjuster.js.map +1 -1
  94. package/dist-server/utils/list-params-converter.js +1 -2
  95. package/dist-server/utils/list-params-converter.js.map +1 -1
  96. package/dist-server/utils/list-query-builder.js.map +1 -1
  97. package/dist-server/utils/publish-progress.js +1 -2
  98. package/dist-server/utils/publish-progress.js.map +1 -1
  99. package/helps/config/fileUpload.ja.md +24 -0
  100. package/helps/config/fileUpload.ko.md +22 -0
  101. package/helps/config/fileUpload.md +24 -0
  102. package/helps/config/fileUpload.ms.md +24 -0
  103. package/helps/config/fileUpload.zh.md +21 -0
  104. package/package.json +27 -27
  105. package/server/graphql-local-client.ts +4 -4
  106. package/server/index.ts +2 -0
  107. package/server/pubsub.ts +1 -1
  108. package/server/server-dev.ts +10 -11
  109. package/server/server.ts +9 -2
  110. package/server/service/attribute-set/attribute-set-query.ts +1 -1
  111. package/server/service/domain/domain-query.ts +1 -1
  112. package/server/service/domain/index.ts +1 -1
  113. package/server/typeorm/round-transform.ts +20 -0
  114. package/translations/en.json +2 -1
  115. package/translations/ja.json +2 -1
  116. package/translations/ko.json +2 -1
  117. package/translations/ms.json +2 -1
  118. package/translations/zh.json +2 -1
  119. package/views/public/home.html +6 -3
  120. package/views/template.html +2 -2
  121. package/client/elements/custom-alert.js +0 -120
  122. package/client/elements/index.js +0 -4
  123. package/client/elements/oops-note.js +0 -49
  124. package/client/elements/oops-progress.js +0 -81
  125. package/client/elements/oops-spinner.js +0 -31
  126. package/dist-server/service/domain/domain-Mutation.js.map +0 -1
  127. package/helps/components/oops-progress.md +0 -73
  128. /package/dist-server/service/domain/{domain-Mutation.d.ts → domain-mutation.d.ts} +0 -0
@@ -1,25 +1,26 @@
1
1
  body {
2
- --header-bar-background-color: var(--secondary-color);
2
+ --header-bar-background-color: var(--md-sys-color-primary);
3
3
  --header-bar-icon-size: var(--icon-default-size);
4
4
  --header-bar-title: bold 17.5px var(--theme-font);
5
- --header-bar-color: #fff;
5
+ --header-bar-color: var(--md-sys-color-on-primary);
6
6
  --header-bar-height: 45px;
7
- --header-bar-item-padding: 0px 5px 0 0;
8
7
 
9
- --nav-bar-background-color: var(--primary-color);
8
+ --nav-bar-background-color: var(--md-sys-color-primary-container);
10
9
 
11
- --group-bar-background-color: var(--primary-color);
10
+ --group-bar-background-color: var(--md-sys-color-secondary-container);
12
11
  --group-bar-textbutton: 16px/32px var(--theme-font);
13
12
  --group-bar-textbutton-active: bold var(--group-bar-textbutton);
14
- --group-bar-active-line-color: var(--focus-color);
13
+ --group-bar-active-line-color: var(--md-sys-color-on-secondary-container);
15
14
  --group-bar-line: solid 3px rgba(0, 0, 0, 0.2);
16
15
 
17
- --aside-background-color: var(--secondary-background-color);
16
+ --footer-bar-border-top: 1px solid rgba(0, 0, 0, 0.2);
17
+
18
+ --aside-background-color: var(--md-sys-color-secondary-container);
18
19
  --aside-list-textbtton: 18px var(--theme-font);
19
20
  --aside-list-icon: var(--icon-default-size);
20
- --aside-list-bottom-line: var(--border-dark-color);
21
+ --aside-list-bottom-line: var(--md-sys-color-outline);
21
22
  --aside-list-detail-background-color: #fff;
22
- --aside-list-detail-text: 14px var(--primary-background-color);
23
+ --aside-list-detail-text: 14px var(--md-sys-color-on-secondary-container);
23
24
 
24
25
  --footer-bar-border-top: 1px solid rgba(0, 0, 0, 0.2);
25
26
 
@@ -28,15 +29,16 @@ body {
28
29
  --button-container-background: transparent;
29
30
  --button-container-height: initial;
30
31
  --button-container-align: right;
31
- --button-container-button-background-color: var(--secondary-color);
32
+ --button-container-button-background-color: var(--md-sys-color-secondary);
32
33
  --button-container-button-border-radius: var(--button-border-radius);
33
34
  --button-container-button-margin: var(--button-margin);
34
35
  --button-container-button-font: bold var(--fontsize-large) var(--theme-font);
35
- --button-container-button-color: var(--theme-white-color);
36
+ --button-container-button-color: var(--md-sys-color-on-primary);
36
37
  --button-container-button-height: initial;
37
38
  --button-container-button-border: var(--button-border);
38
39
 
39
- --popup-content-background-color: var(--main-section-background-color);
40
+ --popup-content-background-color: var(--md-sys-color-background);
41
+ --popup-content-color: var(--md-sys-color-on-background);
40
42
  --popup-content-padding: 10px 20px;
41
43
 
42
44
  /* components - floating overlay style */
@@ -55,7 +57,7 @@ body {
55
57
 
56
58
  /* components - resize splitter style */
57
59
  --splitter-background-color: rgba(0, 0, 0, 0.1);
58
- --splitter-hover-background-color: var(--primary-color);
60
+ --splitter-hover-background-color: rgba(0, 0, 0, 0.1);
59
61
  }
60
62
 
61
63
  @media only screen and (max-width: 460px) {
@@ -0,0 +1,51 @@
1
+ .light {
2
+ --md-sys-color-primary: rgb(73 93 146);
3
+ --md-sys-color-surface-tint: rgb(73 93 146);
4
+ --md-sys-color-on-primary: rgb(255 255 255);
5
+ --md-sys-color-primary-container: #e4eaf9;
6
+ --md-sys-color-on-primary-container: rgb(0 24 72);
7
+ --md-sys-color-secondary: rgb(27 101 133);
8
+ --md-sys-color-on-secondary: rgb(255 255 255);
9
+ --md-sys-color-secondary-container: rgb(195 232 255);
10
+ --md-sys-color-on-secondary-container: rgb(0 30 44);
11
+ --md-sys-color-tertiary: rgb(37 106 75);
12
+ --md-sys-color-on-tertiary: rgb(255 255 255);
13
+ --md-sys-color-tertiary-container: rgb(171 242 201);
14
+ --md-sys-color-on-tertiary-container: rgb(0 33 19);
15
+ --md-sys-color-error: #fe594e;
16
+ --md-sys-color-on-error: rgb(255 255 255);
17
+ --md-sys-color-error-container: rgb(255 218 215);
18
+ --md-sys-color-on-error-container: #fe594e;
19
+ --md-sys-color-background: rgb(250 248 255);
20
+ --md-sys-color-on-background: rgb(26 27 33);
21
+ --md-sys-color-surface: rgb(250 248 255);
22
+ --md-sys-color-on-surface: rgb(26 27 33);
23
+ --md-sys-color-surface-variant: rgb(225 226 236);
24
+ --md-sys-color-on-surface-variant: rgb(69 70 79);
25
+ --md-sys-color-outline: rgba(0, 0, 0, 0.25);
26
+ --md-sys-color-outline-variant: rgb(197 198 208);
27
+ --md-sys-color-shadow: rgb(0 0 0);
28
+ --md-sys-color-scrim: rgb(0 0 0);
29
+ --md-sys-color-inverse-surface: rgb(47 48 54);
30
+ --md-sys-color-inverse-on-surface: rgb(241 240 247);
31
+ --md-sys-color-inverse-primary: #c9d4f4;
32
+ --md-sys-color-primary-fixed: rgb(218 226 255);
33
+ --md-sys-color-on-primary-fixed: rgb(0 24 72);
34
+ --md-sys-color-primary-fixed-dim: #c9d4f4;
35
+ --md-sys-color-on-primary-fixed-variant: rgb(49 69 120);
36
+ --md-sys-color-secondary-fixed: rgb(195 232 255);
37
+ --md-sys-color-on-secondary-fixed: rgb(0 30 44);
38
+ --md-sys-color-secondary-fixed-dim: rgb(143 207 243);
39
+ --md-sys-color-on-secondary-fixed-variant: rgb(0 76 104);
40
+ --md-sys-color-tertiary-fixed: #e5f6da;
41
+ --md-sys-color-on-tertiary-fixed: #005234;
42
+ --md-sys-color-tertiary-fixed-dim: #c8eabc;
43
+ --md-sys-color-on-tertiary-fixed-variant: #005234;
44
+ --md-sys-color-surface-dim: rgb(218 217 224);
45
+ --md-sys-color-surface-bright: rgb(250 248 255);
46
+ --md-sys-color-surface-container-lowest: rgb(255 255 255);
47
+ --md-sys-color-surface-container-low: rgb(244 243 250);
48
+ --md-sys-color-surface-container: rgb(238 237 244);
49
+ --md-sys-color-surface-container-high: rgb(232 231 239);
50
+ --md-sys-color-surface-container-highest: rgb(227 226 233);
51
+ }
@@ -0,0 +1,23 @@
1
+ body {
2
+ font-variation-settings: 'FILL' 1;
3
+
4
+ /* shape corner */
5
+ --md-sys-shape-corner-none: 0px;
6
+ --md-sys-shape-corner-small: 5px;
7
+ --md-sys-shape-corner-medium: 10px;
8
+ --md-sys-shape-corner-large: 30px;
9
+ --md-sys-shape-corner-full: 999px;
10
+
11
+ /* md-switch */
12
+ --md-switch-selected-handle-color: var(--md-sys-color-on-primary);
13
+ --md-switch-selected-track-color: var(--md-sys-color-primary);
14
+
15
+ /* md component shapes */
16
+ --md-switch-handle-shape: var(--md-sys-shape-corner-full);
17
+ --md-switch-track-shape: var(--md-sys-shape-corner-full);
18
+ --md-filter-chip-container-shape: var(--md-sys-shape-corner-full);
19
+ --md-text-button-container-shape: var(--md-sys-shape-corner-small);
20
+ --md-filled-button-container-shape: var(--md-sys-shape-corner-small);
21
+ --md-outlined-button-container-shape: var(--md-sys-shape-corner-small);
22
+ --md-elevated-button-container-shape: var(--md-sys-shape-corner-small);
23
+ }
@@ -0,0 +1,100 @@
1
+ @layer {
2
+ .md-typescale-display-small,
3
+ .md-typescale-display-small-prominent {
4
+ font: var(--md-sys-typescale-display-small-weight, var(--md-ref-typeface-weight-regular, 400))
5
+ var(--md-sys-typescale-display-small-size, 2.25rem) / var(--md-sys-typescale-display-small-line-height, 2.75rem)
6
+ var(--md-sys-typescale-display-small-font, var(--md-ref-typeface-brand, Roboto));
7
+ }
8
+ .md-typescale-display-medium,
9
+ .md-typescale-display-medium-prominent {
10
+ font: var(--md-sys-typescale-display-medium-weight, var(--md-ref-typeface-weight-regular, 400))
11
+ var(--md-sys-typescale-display-medium-size, 2.8125rem) /
12
+ var(--md-sys-typescale-display-medium-line-height, 3.25rem)
13
+ var(--md-sys-typescale-display-medium-font, var(--md-ref-typeface-brand, Roboto));
14
+ }
15
+ .md-typescale-display-large,
16
+ .md-typescale-display-large-prominent {
17
+ font: var(--md-sys-typescale-display-large-weight, var(--md-ref-typeface-weight-regular, 400))
18
+ var(--md-sys-typescale-display-large-size, 3.5625rem) / var(--md-sys-typescale-display-large-line-height, 4rem)
19
+ var(--md-sys-typescale-display-large-font, var(--md-ref-typeface-brand, Roboto));
20
+ }
21
+ .md-typescale-headline-small,
22
+ .md-typescale-headline-small-prominent {
23
+ font: var(--md-sys-typescale-headline-small-weight, var(--md-ref-typeface-weight-regular, 400))
24
+ var(--md-sys-typescale-headline-small-size, 1.5rem) / var(--md-sys-typescale-headline-small-line-height, 2rem)
25
+ var(--md-sys-typescale-headline-small-font, var(--md-ref-typeface-brand, Roboto));
26
+ }
27
+ .md-typescale-headline-medium,
28
+ .md-typescale-headline-medium-prominent {
29
+ font: var(--md-sys-typescale-headline-medium-weight, var(--md-ref-typeface-weight-regular, 400))
30
+ var(--md-sys-typescale-headline-medium-size, 1.75rem) /
31
+ var(--md-sys-typescale-headline-medium-line-height, 2.25rem)
32
+ var(--md-sys-typescale-headline-medium-font, var(--md-ref-typeface-brand, Roboto));
33
+ }
34
+ .md-typescale-headline-large,
35
+ .md-typescale-headline-large-prominent {
36
+ font: var(--md-sys-typescale-headline-large-weight, var(--md-ref-typeface-weight-regular, 400))
37
+ var(--md-sys-typescale-headline-large-size, 2rem) / var(--md-sys-typescale-headline-large-line-height, 2.5rem)
38
+ var(--md-sys-typescale-headline-large-font, var(--md-ref-typeface-brand, Roboto));
39
+ }
40
+ .md-typescale-title-small,
41
+ .md-typescale-title-small-prominent {
42
+ font: var(--md-sys-typescale-title-small-weight, var(--md-ref-typeface-weight-medium, 500))
43
+ var(--md-sys-typescale-title-small-size, 0.875rem) / var(--md-sys-typescale-title-small-line-height, 1.25rem)
44
+ var(--md-sys-typescale-title-small-font, var(--md-ref-typeface-plain, Roboto));
45
+ }
46
+ .md-typescale-title-medium,
47
+ .md-typescale-title-medium-prominent {
48
+ font: var(--md-sys-typescale-title-medium-weight, var(--md-ref-typeface-weight-medium, 500))
49
+ var(--md-sys-typescale-title-medium-size, 1rem) / var(--md-sys-typescale-title-medium-line-height, 1.5rem)
50
+ var(--md-sys-typescale-title-medium-font, var(--md-ref-typeface-plain, Roboto));
51
+ }
52
+ .md-typescale-title-large,
53
+ .md-typescale-title-large-prominent {
54
+ font: var(--md-sys-typescale-title-large-weight, var(--md-ref-typeface-weight-regular, 400))
55
+ var(--md-sys-typescale-title-large-size, 1.375rem) / var(--md-sys-typescale-title-large-line-height, 1.75rem)
56
+ var(--md-sys-typescale-title-large-font, var(--md-ref-typeface-brand, Roboto));
57
+ }
58
+ .md-typescale-body-small,
59
+ .md-typescale-body-small-prominent {
60
+ font: var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400))
61
+ var(--md-sys-typescale-body-small-size, 0.75rem) / var(--md-sys-typescale-body-small-line-height, 1rem)
62
+ var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto));
63
+ }
64
+ .md-typescale-body-medium,
65
+ .md-typescale-body-medium-prominent {
66
+ font: var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400))
67
+ var(--md-sys-typescale-body-medium-size, 0.875rem) / var(--md-sys-typescale-body-medium-line-height, 1.25rem)
68
+ var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto));
69
+ }
70
+ .md-typescale-body-large,
71
+ .md-typescale-body-large-prominent {
72
+ font: var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400))
73
+ var(--md-sys-typescale-body-large-size, 1rem) / var(--md-sys-typescale-body-large-line-height, 1.5rem)
74
+ var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto));
75
+ }
76
+ .md-typescale-label-small,
77
+ .md-typescale-label-small-prominent {
78
+ font: var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500))
79
+ var(--md-sys-typescale-label-small-size, 0.6875rem) / var(--md-sys-typescale-label-small-line-height, 1rem)
80
+ var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));
81
+ }
82
+ .md-typescale-label-medium,
83
+ .md-typescale-label-medium-prominent {
84
+ font: var(--md-sys-typescale-label-medium-weight, var(--md-ref-typeface-weight-medium, 500))
85
+ var(--md-sys-typescale-label-medium-size, 0.75rem) / var(--md-sys-typescale-label-medium-line-height, 1rem)
86
+ var(--md-sys-typescale-label-medium-font, var(--md-ref-typeface-plain, Roboto));
87
+ }
88
+ .md-typescale-label-medium-prominent {
89
+ font-weight: var(--md-sys-typescale-label-medium-weight-prominent, var(--md-ref-typeface-weight-bold, 700));
90
+ }
91
+ .md-typescale-label-large,
92
+ .md-typescale-label-large-prominent {
93
+ font: var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500))
94
+ var(--md-sys-typescale-label-large-size, 0.875rem) / var(--md-sys-typescale-label-large-line-height, 1.25rem)
95
+ var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto));
96
+ }
97
+ .md-typescale-label-large-prominent {
98
+ font-weight: var(--md-sys-typescale-label-large-weight-prominent, var(--md-ref-typeface-weight-bold, 700));
99
+ }
100
+ } /*# sourceMappingURL=md-typescale-styles.css.map */
@@ -1,20 +1,20 @@
1
1
  body {
2
2
  /* oops note style */
3
- --oops-note-icon-font: normal 24px var(--mdc-icon-font, 'Material Icons');
4
- --oops-note-icon-color: rgba(var(--secondary-color-rgb), 0.3);
5
- --oops-note-icon-border: 2px solid rgba(var(--secondary-color-rgb), 0.3);
3
+ --oops-note-icon-font: normal 24px var(--md-icon-font, 'Material Symbols Outlined');
4
+ --oops-note-icon-color: var(--md-sys-color-on-surface);
5
+ --oops-note-icon-border: 2px solid var(--md-sys-color-outline);
6
6
  --oops-note-icon-border-radius: 50px;
7
7
  --oops-note-icon-padding: var(--padding-default);
8
8
  --oops-note-title-margin: 7px 0 2px 0;
9
9
  --oops-note-title-font: bold 14px var(--theme-font);
10
- --oops-note-title-color: var(--secondary-color);
10
+ --oops-note-title-color: var(--md-sys-color-secondary);
11
11
  --oops-note-description-font: normal 12px var(--theme-font);
12
- --oops-note-description-color: var(--primary-color);
12
+ --oops-note-description-color: var(--md-sys-color-primary);
13
13
  }
14
14
  @media only screen and (max-width: 460px) {
15
15
  body {
16
16
  --oops-note-icon-padding: var(--padding-narrow);
17
- --oops-note-icon-font: normal 18px var(--mdc-icon-font, 'Material Icons');
17
+ --oops-note-icon-font: normal 18px var(--md-icon-font, 'Material Symbols Outlined');
18
18
  --oops-note-title-font: bold 13px var(--theme-font);
19
19
  --oops-note-title-margin: var(--margin-narrow) 0 2px 0;
20
20
  --oops-note-description-font: normal 0px var(--theme-font);
@@ -0,0 +1,47 @@
1
+ body {
2
+ --report-background-color: var(--md-sys-color-background);
3
+ --report-padding: 15px;
4
+ --report-title-margin: 0 0 0 10px;
5
+ --report-title-border: none;
6
+ --report-title-color: var(--md-sys-color-secondary);
7
+ --report-title-icon-color: var(--md-sys-color-primary);
8
+ --report-title-icon-margin: 0 3px 2px 0;
9
+ --report-title-icon-size: 14px;
10
+ --report-title-with-grid-padding: 0;
11
+ --report-component-border-radius: var(--border-radius);
12
+
13
+ --report-header-background-color: var(--md-sys-color-surface);
14
+ --report-header-border: 1px solid var(--report-header-border-color);
15
+ --report-header-border-color: var(--md-sys-color-outline);
16
+ --report-header-padding: 5px 0 5px 5px;
17
+ --report-header-color: var(--secondary-text-color);
18
+ --report-header-font: normal 1em/1.5 var(--theme-font);
19
+ --report-header-fontsize: 13px;
20
+
21
+ --report-record-background-color: #fff;
22
+ --report-record-odd-background-color: #f6f6f6;
23
+ --report-record-field-padding: 7px 10px;
24
+ --report-record-field-border-bottom: 1px solid rgba(0, 0, 0, 0.1);
25
+ --report-record-wide-fontsize: 13px;
26
+ --report-record-focused-background-color: #ffde3b47;
27
+ --report-record-focused-border: 1px dashed rgba(0, 0, 0, 0.5);
28
+
29
+ --report-totalized-background-color: #efefef;
30
+ --report-totalized-border: 1px solid rgba(0, 0, 0, 0.1);
31
+ --report-totalized-color: var(--secondary-text-color);
32
+
33
+ --report-grouped-background-color: #607d8bbf;
34
+ --report-grouped-border: 1px solid rgba(0, 0, 0, 0.2);
35
+ --report-grouped-color: #fff;
36
+ }
37
+
38
+ @media print {
39
+ body {
40
+ --report-header-padding: 5px;
41
+ --report-record-field-padding: 5px;
42
+ --report-record-wide-fontsize: 10px;
43
+ --report-grouped-background-color: #d7d7d7;
44
+ --report-grouped-color: #000;
45
+ --report-totalized-color: #000;
46
+ }
47
+ }
@@ -0,0 +1,23 @@
1
+ :root {
2
+ /* spacing */
3
+ --spacing-none: 0px;
4
+ --spacing-tiny: 2px;
5
+ --spacing-small: 4px;
6
+ --spacing-medium: 8px;
7
+ --spacing-large: 12px;
8
+ --spacing-huge: 24px;
9
+
10
+ /* icon size */
11
+ --icon-size-tiny: 14px;
12
+ --icon-size-small: 18px;
13
+ --icon-size-medium: 24px;
14
+ --icon-size-large: 32px;
15
+ --icon-size-huge: 48px;
16
+
17
+ /* form element height */
18
+ --form-element-height-tiny: 18px;
19
+ --form-element-height-small: 24px;
20
+ --form-element-height-medium: 30px;
21
+ --form-element-height-large: 40px;
22
+ --form-element-height-huge: 55px;
23
+ }
@@ -0,0 +1,6 @@
1
+ :root {
2
+ --status-danger-color: var(--md-sys-color-error, #d14946);
3
+ --status-warning-color: #ee8d03;
4
+ --status-info-color: #398ace;
5
+ --status-success-color: #35a24a;
6
+ }
@@ -46,7 +46,8 @@ module.exports = {
46
46
  * ie.
47
47
  * fileUpload: {
48
48
  * maxFileSize: '100mb',
49
- * maxFiles: 10
49
+ * maxFiles: 10,
50
+ * mimeTypes: ['image/*', 'application/pdf']
50
51
  * }
51
52
  **/
52
53
 
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "Customer": "hatiolab.com",
3
- "Product": "Things Factory",
3
+ "Product": "Things Factory Framework",
4
4
  "License Type": "Evaluation",
5
- "Purchase Date": "2024.02.29",
6
- "Expiration Date": "2024.05.29",
5
+ "Purchase Date": "2024.05.29",
6
+ "Expiration Date": "2024.08.29",
7
7
  "Host Address": "UNLIMITED",
8
8
  "Max Target Count": 0,
9
9
  "Max Domain Count": 0,
10
10
  "Permissions For Board Usage": "Viewer, Modeller",
11
11
  "Permissions For Tailor Tool": "Runner, Studio",
12
- "Key": "5eyJDdXN0b21lciI6ImhhdGlvbGFiLmNvbSIsIlByb2R1Y3QiOiJUaGluZ3MgRmFjdG9yeSIsIkxpY2Vuc2UgVHlwZSI6IkV2YWx1YXRpb24iLCJQdXJjaGFzZSBEYXRlIjoiMjAyNC4wMi4yOSIsIkV4cGlyYXRpb24gRGF0ZSI6IjIwMjQuMDUuMjkiLCJIb3N0IEFkZHJlc3MiOiJVTkxJTUlURUQiLCJNYXggVGFyZ2V0IENvdW50IjowLCJNYXggRG9tYWluIENvdW50IjowLCJQZXJtaXNzaW9ucyBGb3IgQm9hcmQgVXNhZ2UiOiJWaWV3ZXIsIE1vZGVsbGVyIiwiUGVybWlzc2lvbnMgRm9yIFRhaWxvciBUb29sIjoiUnVubmVyLCBTdHVkaW8iLCJLZXkiOiJBeGdxSlFzNEhqRUFCRGNMRVFBbUZpTU1Cam9FR2dnTkRTY21DQlkvR2hVU0ZpWlRJd3NnU3dZdklqZ1dFeHNJRXpzZURCTWlBMVVTTGhVNUZnd3VBUXNuTXhnREpSOFNLd0lKVUJNdkRFY0ZMeDhDR1NnQUZnZ2xIeXNyQWhrU0V3b1dBdzhKSWdjTkVqZ0lGaFVlRUJBUkpVb0xHaHhNRGc0eUpCWTRHZ3NaUEFjSUp3RXVXUjRlTGtrYkNFQVFJRE1qRWhrOUVpMFJJZ05aRXdrUVFnWXZRQUlkSnlZeENDVWZLeXNCSmxjZkNSRkhHeDBmRENKS0FRZ1dGUjRZRWpZaEVDTWNIRDB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Eh3Z0RBQm9vRmhnSkJBQUhFVGNhUnhvYUhBSU9EaXN6SmtvakZoVThGeFFuSlJwVkh3a0pPeHdlS2lNS0tDb1BBVDhpTVJNU05sVWpIQkE2QkJvZkFDQkpJeGdWRmg4eEtBRXVGQ0FKR1FjZkNBTUFIQ2N6R1FJVkpoOGFJaDFaRWdrVVRCOEpCUUFaTlRjVUR5YzNGeDRrR1NVakNCVTdGQW91TlNZbUdnY0JQd1FMRUNZdEpBb3VERWNFSGlzeklpTUxDQTRwSWkwckpCMVdDZ29jUWdZSU1pVU5FeFlVQWhVZkt5Y21DRWtYR2d4TEJnb0lFUXdTQUJVQVFCc0dJZ1EyV1NNY0dFZ1BDU29DSmlZV0dRa3BCQXNyQVFCSkZnd0tQZ1F2SGhBakl5b1RBQVFXQ3hJaUNVd0pDQmxGSHdzeUF3eE5PdzhCQlJvUEVqYzZXaU1jQ0VnRkNESVVGamNBRWdBRkh3WWVJalpXQ2g0WkNCOExLamdOVFRjTEFUc1BCaDgySFJFU0dncElIdzFFTEE9PSJ9101775"
13
+ }
@@ -20,9 +20,6 @@ const defaultOptions = {
20
20
  errorPolicy: 'all'
21
21
  }
22
22
  };
23
- const cache = new client_1.InMemoryCache({
24
- addTypename: false
25
- });
26
23
  /**
27
24
  * GraphqlLocalClient is a utility class for initializing an Apollo Client for a local GraphQL schema.
28
25
  * It provides a static `init` method for setting up the client with a schema and an app context.
@@ -35,6 +32,9 @@ class GraphqlLocalClient {
35
32
  * @param {object} app - The application context to be passed in as part of the execution context.
36
33
  */
37
34
  static init(schema, app) {
35
+ const cache = new client_1.InMemoryCache({
36
+ addTypename: false
37
+ });
38
38
  GraphqlLocalClient.client = new client_1.ApolloClient({
39
39
  defaultOptions,
40
40
  cache,
@@ -1 +1 @@
1
- {"version":3,"file":"graphql-local-client.js","sourceRoot":"","sources":["../server/graphql-local-client.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,2CAAmF;AACnF,uDAAuD;AAEvD,MAAM,cAAc,GAAQ;IAC1B,UAAU,EAAE;QACV,WAAW,EAAE,UAAU;QACvB,WAAW,EAAE,QAAQ;KACtB;IACD,KAAK,EAAE;QACL,WAAW,EAAE,UAAU;QACvB,WAAW,EAAE,KAAK;KACnB;IACD,MAAM,EAAE;QACN,WAAW,EAAE,KAAK;KACnB;CACF,CAAA;AAED,MAAM,KAAK,GAAG,IAAI,sBAAa,CAAC;IAC9B,WAAW,EAAE,KAAK;CACnB,CAAC,CAAA;AAEF;;;GAGG;AACH,MAAa,kBAAkB;IAQ7B;;;;;OAKG;IACH,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG;QACrB,kBAAkB,CAAC,MAAM,GAAG,IAAI,qBAAY,CAAC;YAC3C,cAAc;YACd,KAAK;YACL,IAAI,EAAE,IAAI,mBAAU,CAAC;gBACnB,MAAM;gBACN,OAAO,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;oBACpC,uCACK,GAAG,CAAC,UAAU,EAAE,KACnB,GAAG,IACJ;gBACH,CAAC;aACF,CAAC;SACH,CAAC,CAAA;IACJ,CAAC;CACF;AA7BD,gDA6BC","sourcesContent":["/**\n * Apollo Client configuration for a local GraphQL schema.\n * This class provides a static method `init` to initialize the client with a schema and an app context.\n */\nimport { ApolloClient, InMemoryCache, NormalizedCacheObject } from '@apollo/client'\nimport { SchemaLink } from '@apollo/client/link/schema'\n\nconst defaultOptions: any = {\n watchQuery: {\n fetchPolicy: 'no-cache',\n errorPolicy: 'ignore'\n },\n query: {\n fetchPolicy: 'no-cache',\n errorPolicy: 'all'\n },\n mutate: {\n errorPolicy: 'all'\n }\n}\n\nconst cache = new InMemoryCache({\n addTypename: false\n})\n\n/**\n * GraphqlLocalClient is a utility class for initializing an Apollo Client for a local GraphQL schema.\n * It provides a static `init` method for setting up the client with a schema and an app context.\n */\nexport class GraphqlLocalClient {\n /**\n * Apollo Client instance for local GraphQL schema.\n * @static\n * @type {ApolloClient<NormalizedCacheObject>}\n */\n static client: ApolloClient<NormalizedCacheObject>\n\n /**\n * Initializes the Apollo Client for a local GraphQL schema.\n * @static\n * @param {object} schema - The GraphQL schema to use.\n * @param {object} app - The application context to be passed in as part of the execution context.\n */\n static init(schema, app) {\n GraphqlLocalClient.client = new ApolloClient({\n defaultOptions,\n cache,\n link: new SchemaLink({\n schema,\n context: (obj, args, context, info) => {\n return {\n ...obj.getContext(),\n app\n }\n }\n })\n })\n }\n}\n"]}
1
+ {"version":3,"file":"graphql-local-client.js","sourceRoot":"","sources":["../server/graphql-local-client.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,2CAAmF;AACnF,uDAAuD;AAEvD,MAAM,cAAc,GAAQ;IAC1B,UAAU,EAAE;QACV,WAAW,EAAE,UAAU;QACvB,WAAW,EAAE,QAAQ;KACtB;IACD,KAAK,EAAE;QACL,WAAW,EAAE,UAAU;QACvB,WAAW,EAAE,KAAK;KACnB;IACD,MAAM,EAAE;QACN,WAAW,EAAE,KAAK;KACnB;CACF,CAAA;AAED;;;GAGG;AACH,MAAa,kBAAkB;IAQ7B;;;;;OAKG;IACH,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG;QACrB,MAAM,KAAK,GAAG,IAAI,sBAAa,CAAC;YAC9B,WAAW,EAAE,KAAK;SACnB,CAAC,CAAA;QAEF,kBAAkB,CAAC,MAAM,GAAG,IAAI,qBAAY,CAAC;YAC3C,cAAc;YACd,KAAK;YACL,IAAI,EAAE,IAAI,mBAAU,CAAC;gBACnB,MAAM;gBACN,OAAO,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;oBACpC,uCACK,GAAG,CAAC,UAAU,EAAE,KACnB,GAAG,IACJ;gBACH,CAAC;aACF,CAAC;SACH,CAAC,CAAA;IACJ,CAAC;CACF;AAjCD,gDAiCC","sourcesContent":["/**\n * Apollo Client configuration for a local GraphQL schema.\n * This class provides a static method `init` to initialize the client with a schema and an app context.\n */\nimport { ApolloClient, InMemoryCache, NormalizedCacheObject } from '@apollo/client'\nimport { SchemaLink } from '@apollo/client/link/schema'\n\nconst defaultOptions: any = {\n watchQuery: {\n fetchPolicy: 'no-cache',\n errorPolicy: 'ignore'\n },\n query: {\n fetchPolicy: 'no-cache',\n errorPolicy: 'all'\n },\n mutate: {\n errorPolicy: 'all'\n }\n}\n\n/**\n * GraphqlLocalClient is a utility class for initializing an Apollo Client for a local GraphQL schema.\n * It provides a static `init` method for setting up the client with a schema and an app context.\n */\nexport class GraphqlLocalClient {\n /**\n * Apollo Client instance for local GraphQL schema.\n * @static\n * @type {ApolloClient<NormalizedCacheObject>}\n */\n static client: ApolloClient<NormalizedCacheObject>\n\n /**\n * Initializes the Apollo Client for a local GraphQL schema.\n * @static\n * @param {object} schema - The GraphQL schema to use.\n * @param {object} app - The application context to be passed in as part of the execution context.\n */\n static init(schema, app) {\n const cache = new InMemoryCache({\n addTypename: false\n })\n\n GraphqlLocalClient.client = new ApolloClient({\n defaultOptions,\n cache,\n link: new SchemaLink({\n schema,\n context: (obj, args, context, info) => {\n return {\n ...obj.getContext(),\n app\n }\n }\n })\n })\n }\n}\n"]}
@@ -9,3 +9,4 @@ export * from './graphql-local-client';
9
9
  export * from './service';
10
10
  export * from './typeorm/encrypt-transform';
11
11
  export * from './typeorm/json5-transform';
12
+ export * from './typeorm/round-transform';
@@ -12,4 +12,5 @@ tslib_1.__exportStar(require("./graphql-local-client"), exports);
12
12
  tslib_1.__exportStar(require("./service"), exports);
13
13
  tslib_1.__exportStar(require("./typeorm/encrypt-transform"), exports);
14
14
  tslib_1.__exportStar(require("./typeorm/json5-transform"), exports);
15
+ tslib_1.__exportStar(require("./typeorm/round-transform"), exports);
15
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":";;;AAAA,uDAA4B;AAC5B,yEAA8C;AAC9C,kEAAuC;AACvC,kDAAuB;AACvB,mDAAwB;AACxB,iEAAsC;AACtC,wDAA6B;AAC7B,iEAAsC;AACtC,oDAAyB;AACzB,sEAA2C;AAC3C,oEAAyC","sourcesContent":["export * from './migrations'\nexport * from './initializers/naming-strategy'\nexport * from './initializers/database'\nexport * from './utils'\nexport * from './pubsub'\nexport * from './pubsub-log-transport'\nexport * from './middlewares'\nexport * from './graphql-local-client'\nexport * from './service'\nexport * from './typeorm/encrypt-transform'\nexport * from './typeorm/json5-transform'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":";;;AAAA,uDAA4B;AAC5B,yEAA8C;AAC9C,kEAAuC;AACvC,kDAAuB;AACvB,mDAAwB;AACxB,iEAAsC;AACtC,wDAA6B;AAC7B,iEAAsC;AACtC,oDAAyB;AAEzB,sEAA2C;AAC3C,oEAAyC;AACzC,oEAAyC","sourcesContent":["export * from './migrations'\nexport * from './initializers/naming-strategy'\nexport * from './initializers/database'\nexport * from './utils'\nexport * from './pubsub'\nexport * from './pubsub-log-transport'\nexport * from './middlewares'\nexport * from './graphql-local-client'\nexport * from './service'\n\nexport * from './typeorm/encrypt-transform'\nexport * from './typeorm/json5-transform'\nexport * from './typeorm/round-transform'\n"]}
@@ -1,6 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.databaseInitializer = exports.getRepository = exports.getDataSourceNames = exports.removeDataSource = exports.addDataSource = exports.getDataSource = void 0;
3
+ exports.databaseInitializer = void 0;
4
+ exports.getDataSource = getDataSource;
5
+ exports.addDataSource = addDataSource;
6
+ exports.removeDataSource = removeDataSource;
7
+ exports.getDataSourceNames = getDataSourceNames;
8
+ exports.getRepository = getRepository;
4
9
  const typeorm_1 = require("typeorm");
5
10
  const env_1 = require("@things-factory/env");
6
11
  const path = require('path');
@@ -20,7 +25,6 @@ const dataSources = {};
20
25
  function getDataSource(name) {
21
26
  return dataSources[name || 'default'];
22
27
  }
23
- exports.getDataSource = getDataSource;
24
28
  /**
25
29
  * Adds a new DataSource with the specified name.
26
30
  * @param {string} name - The name of the DataSource to add.
@@ -29,7 +33,6 @@ exports.getDataSource = getDataSource;
29
33
  function addDataSource(name, dataSource) {
30
34
  dataSources[name] = dataSource;
31
35
  }
32
- exports.addDataSource = addDataSource;
33
36
  /**
34
37
  * Removes a DataSource with the specified name.
35
38
  * @param {string} name - The name of the DataSource to remove.
@@ -37,7 +40,6 @@ exports.addDataSource = addDataSource;
37
40
  function removeDataSource(name) {
38
41
  delete dataSources[name];
39
42
  }
40
- exports.removeDataSource = removeDataSource;
41
43
  /**
42
44
  * Returns an array of all registered DataSource names.
43
45
  * @returns {string[]} - An array of DataSource names.
@@ -45,7 +47,6 @@ exports.removeDataSource = removeDataSource;
45
47
  function getDataSourceNames() {
46
48
  return Object.keys(dataSources);
47
49
  }
48
- exports.getDataSourceNames = getDataSourceNames;
49
50
  /**
50
51
  * Returns a repository for the specified entity.
51
52
  * @param {EntityTarget<X>} target - The target entity for which to get the repository.
@@ -54,7 +55,6 @@ exports.getDataSourceNames = getDataSourceNames;
54
55
  function getRepository(target) {
55
56
  return getDataSource('default').getRepository(target);
56
57
  }
57
- exports.getRepository = getRepository;
58
58
  /**
59
59
  * Initializes the database connections and data sources.
60
60
  */
@@ -1 +1 @@
1
- {"version":3,"file":"database.js","sourceRoot":"","sources":["../../server/initializers/database.ts"],"names":[],"mappings":";;;AAAA,qCAAgF;AAEhF,6CAAiE;AAEjE,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAE5B,IAAI,SAAS,CAAA;AACb,IAAI;IACF,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,iBAAW,EAAE,WAAW,CAAC,CAAC,CAAA;CAC5D;AAAC,OAAO,CAAC,EAAE;IACV,SAAS,GAAG,OAAO,CAAC,iCAAiC,CAAC,CAAA;CACvD;AAED,MAAM,WAAW,GAAmC,EAAE,CAAA;AAEtD;;;;GAIG;AACH,S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E;YAC9B,MAAM,aAAa,GAAG,IAAI,oBAAU,iCAC/B,SAAS,GACT,YAAM,CAAC,GAAG,CAAC,cAAc,CAAC,EAC7B,CAAA;YACF,MAAM,aAAa,CAAC,UAAU,EAAE,CAAA;YAChC,aAAa,CAAC,IAAI,EAAE,aAAa,CAAC,CAAA;YAElC,YAAM,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAA;SAClD;aAAM;YACL,aAAa,CAAC,IAAI,EAAE,UAAU,CAAC,CAAA;SAChC;KACF;IAAC,OAAO,CAAC,EAAE;QACV,YAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;KAChB;AACH,CAAC,CAAA;AAlCY,QAAA,mBAAmB,uBAkC/B","sourcesContent":["import { createConnection, DataSource, EntityTarget, Repository } from 'typeorm'\n\nimport { appRootPath, config, logger } from '@things-factory/env'\n\nconst path = require('path')\n\nvar ormconfig\ntry {\n ormconfig = require(path.resolve(appRootPath, 'ormconfig'))\n} catch (e) {\n ormconfig = require('@things-factory/shell/ormconfig')\n}\n\nconst dataSources: { [name: string]: DataSource } = {}\n\n/**\n * Returns the specified DataSource by name.\n * @param {string} name - The name of the DataSource.\n * @returns {DataSource} - The DataSource with the specified name.\n */\nexport function getDataSource(name?: string): DataSource {\n return dataSources[name || 'default']\n}\n\n/**\n * Adds a new DataSource with the specified name.\n * @param {string} name - The name of the DataSource to add.\n * @param {DataSource} dataSource - The DataSource to add.\n */\nexport function addDataSource(name: string, dataSource: DataSource) {\n dataSources[name] = dataSource\n}\n\n/**\n * Removes a DataSource with the specified name.\n * @param {string} name - The name of the DataSource to remove.\n */\nexport function removeDataSource(name: string) {\n delete dataSources[name]\n}\n\n/**\n * Returns an array of all registered DataSource names.\n * @returns {string[]} - An array of DataSource names.\n */\nexport function getDataSourceNames() {\n return Object.keys(dataSources)\n}\n\n/**\n * Returns a repository for the specified entity.\n * @param {EntityTarget<X>} target - The target entity for which to get the repository.\n * @returns {Repository<X>} - The repository for the specified entity.\n */\nexport function getRepository<X>(target: EntityTarget<X>): Repository<X> {\n return getDataSource('default').getRepository<X>(target)\n}\n\n/**\n * Initializes the database connections and data sources.\n */\nexport const databaseInitializer = async () => {\n try {\n const readConnectionConfig = config.get('ormconfig')\n\n const dataSource = await createConnection({\n ...ormconfig,\n ...readConnectionConfig\n })\n\n addDataSource('default', dataSource)\n\n logger.info('Default DataSource established')\n\n if (readConnectionConfig.type == 'sqlite' && readConnectionConfig.synchronize == false) {\n await dataSource.query('PRAGMA foreign_keys=OFF')\n await dataSource.synchronize()\n await dataSource.query('PRAGMA foreign_keys=ON')\n }\n\n if (config.get('ormconfig4Tx')) {\n const dataSource4Tx = new DataSource({\n ...ormconfig,\n ...config.get('ormconfig4Tx')\n })\n await dataSource4Tx.initialize()\n addDataSource('tx', dataSource4Tx)\n\n logger.info('Transaction DataSource established')\n } else {\n addDataSource('tx', dataSource)\n }\n } catch (e) {\n logger.error(e)\n }\n}\n"]}
1
+ {"version":3,"file":"database.js","sourceRoot":"","sources":["../../server/initializers/database.ts"],"names":[],"mappings":";;;AAoBA,sCAEC;AAOD,sCAEC;AAMD,4CAEC;AAMD,gDAEC;AAOD,sCAEC;AAxDD,qCAAgF;AAEhF,6CAAiE;AAEjE,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAE5B,IAAI,SAAS,CAAA;AACb,IAAI,CAAC;IACH,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,iBAAW,EAAE,WAAW,CAAC,CAAC,CAAA;AAC7D,CAAC;AAAC,OAAO,CAAC,EAAE,CAAC;IACX,SAAS,GAAG,OAAO,CAAC,iCAAiC,CAAC,CAAA;AACxD,CAAC;AAED,MAAM,WAAW,GAAmC,EAAE,CAAA;AAEtD;;;;GAIG;AACH,SAAgB,aAAa,CAAC,IAAa;IACzC,OAAO,WAAW,CAAC,IAAI,IAAI,SAAS,CAAC,CAAA;AACvC,CAAC;AAED;;;;GAIG;AACH,SAAgB,aAAa,CAAC,I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I,EAAE,aAAa,CAAC,CAAA;YAElC,YAAM,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAA;QACnD,CAAC;aAAM,CAAC;YACN,aAAa,CAAC,IAAI,EAAE,UAAU,CAAC,CAAA;QACjC,CAAC;IACH,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,YAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC;AACH,CAAC,CAAA;AAlCY,QAAA,mBAAmB,uBAkC/B","sourcesContent":["import { createConnection, DataSource, EntityTarget, Repository } from 'typeorm'\n\nimport { appRootPath, config, logger } from '@things-factory/env'\n\nconst path = require('path')\n\nvar ormconfig\ntry {\n ormconfig = require(path.resolve(appRootPath, 'ormconfig'))\n} catch (e) {\n ormconfig = require('@things-factory/shell/ormconfig')\n}\n\nconst dataSources: { [name: string]: DataSource } = {}\n\n/**\n * Returns the specified DataSource by name.\n * @param {string} name - The name of the DataSource.\n * @returns {DataSource} - The DataSource with the specified name.\n */\nexport function getDataSource(name?: string): DataSource {\n return dataSources[name || 'default']\n}\n\n/**\n * Adds a new DataSource with the specified name.\n * @param {string} name - The name of the DataSource to add.\n * @param {DataSource} dataSource - The DataSource to add.\n */\nexport function addDataSource(name: string, dataSource: DataSource) {\n dataSources[name] = dataSource\n}\n\n/**\n * Removes a DataSource with the specified name.\n * @param {string} name - The name of the DataSource to remove.\n */\nexport function removeDataSource(name: string) {\n delete dataSources[name]\n}\n\n/**\n * Returns an array of all registered DataSource names.\n * @returns {string[]} - An array of DataSource names.\n */\nexport function getDataSourceNames() {\n return Object.keys(dataSources)\n}\n\n/**\n * Returns a repository for the specified entity.\n * @param {EntityTarget<X>} target - The target entity for which to get the repository.\n * @returns {Repository<X>} - The repository for the specified entity.\n */\nexport function getRepository<X>(target: EntityTarget<X>): Repository<X> {\n return getDataSource('default').getRepository<X>(target)\n}\n\n/**\n * Initializes the database connections and data sources.\n */\nexport const databaseInitializer = async () => {\n try {\n const readConnectionConfig = config.get('ormconfig')\n\n const dataSource = await createConnection({\n ...ormconfig,\n ...readConnectionConfig\n })\n\n addDataSource('default', dataSource)\n\n logger.info('Default DataSource established')\n\n if (readConnectionConfig.type == 'sqlite' && readConnectionConfig.synchronize == false) {\n await dataSource.query('PRAGMA foreign_keys=OFF')\n await dataSource.synchronize()\n await dataSource.query('PRAGMA foreign_keys=ON')\n }\n\n if (config.get('ormconfig4Tx')) {\n const dataSource4Tx = new DataSource({\n ...ormconfig,\n ...config.get('ormconfig4Tx')\n })\n await dataSource4Tx.initialize()\n addDataSource('tx', dataSource4Tx)\n\n logger.info('Transaction DataSource established')\n } else {\n addDataSource('tx', dataSource)\n }\n } catch (e) {\n logger.error(e)\n }\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.domainMiddleware = void 0;
3
+ exports.domainMiddleware = domainMiddleware;
4
4
  const tslib_1 = require("tslib");
5
5
  const request_ip_1 = tslib_1.__importDefault(require("request-ip"));
6
6
  const utils_1 = require("../utils");
@@ -51,5 +51,4 @@ async function domainMiddleware(context, next) {
51
51
  context.state.domain = domain;
52
52
  return next();
53
53
  }
54
- exports.domainMiddleware = domainMiddleware;
55
54
  //# sourceMappingURL=domain-middleware.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"domain-middleware.js","sourceRoot":"","sources":["../../server/middlewares/domain-middleware.ts"],"names":[],"mappings":";;;;AAAA,oEAAkC;AAClC,oCAA2C;AAEpC,KAAK,UAAU,gBAAgB,CAAC,OAAY,EAAE,IAAS;IAC5D,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAC9B,IAAI,CAAC,MAAM,EAAE;QACX;;;;WAIG;QACH,MAAM,GAAG,MAAM,IAAA,wBAAgB,EAAC,OAAO,CAAC,CAAA;KACzC;IAED,IAAI,MAAM,EAAE;QACV,MAAM,EAAE,GAAG,oBAAS,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG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AC,IAAI,EAAE;gBACT,OAAO,CAAC,KAAK,CAAC,oBAAoB,GAAG,UAAU,CAAA;aAChD;SACF;KACF;IAED,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAA;IAE7B,OAAO,IAAI,EAAE,CAAA;AACf,CAAC;AAxDD,4CAwDC","sourcesContent":["import requestIp from 'request-ip'\nimport { getDomainFromURL } from '../utils'\n\nexport async function domainMiddleware(context: any, next: any) {\n var { domain } = context.state\n if (!domain) {\n /*\n * The domainType should be checked only when signin and checkin.\n * For purposes such as API calls, the target domainType may be different from the system domainType.\n * So, we don't check domainType here.\n */\n domain = await getDomainFromURL(context)\n }\n\n if (domain) {\n const ip = requestIp.getClientIp(context.req)\n const { whitelist = [], blacklist = [], protectedlist = [], privileges = [] } = domain.iplist || {}\n\n if (Array.isArray(whitelist) && whitelist.length > 0) {\n /* whitelist 우선 */\n const whitelisted =\n Array.isArray(whitelist) &&\n whitelist.some(item => {\n return new RegExp(item).test(ip)\n })\n\n if (!whitelisted) {\n context.status = 403\n return\n }\n } else {\n const blacklisted =\n Array.isArray(blacklist) &&\n blacklist.some(item => {\n return new RegExp(item).test(ip)\n })\n\n if (blacklisted) {\n context.status = 403\n return\n }\n }\n\n if (Array.isArray(protectedlist) && protectedlist.length > 0) {\n const safe = protectedlist.some(item => {\n return new RegExp(item).test(ip)\n })\n\n context.state.unsafeIP = !safe\n\n if (!safe) {\n context.state.prohibitedPrivileges = privileges\n }\n }\n }\n\n context.state.domain = domain\n\n return next()\n}\n"]}
1
+ {"version":3,"file":"domain-middleware.js","sourceRoot":"","sources":["../../server/middlewares/domain-middleware.ts"],"names":[],"mappings":";;AAGA,4CAwDC;;AA3DD,oEAAkC;AAClC,oCAA2C;AAEpC,KAAK,UAAU,gBAAgB,CAAC,OAAY,EAAE,IAAS;IAC5D,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAC9B,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ;;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AI,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;gBACrC,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;YAClC,CAAC,CAAC,CAAA;YAEF,OAAO,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAA;YAE9B,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,OAAO,CAAC,KAAK,CAAC,oBAAoB,GAAG,UAAU,CAAA;YACjD,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAA;IAE7B,OAAO,IAAI,EAAE,CAAA;AACf,CAAC","sourcesContent":["import requestIp from 'request-ip'\nimport { getDomainFromURL } from '../utils'\n\nexport async function domainMiddleware(context: any, next: any) {\n var { domain } = context.state\n if (!domain) {\n /*\n * The domainType should be checked only when signin and checkin.\n * For purposes such as API calls, the target domainType may be different from the system domainType.\n * So, we don't check domainType here.\n */\n domain = await getDomainFromURL(context)\n }\n\n if (domain) {\n const ip = requestIp.getClientIp(context.req)\n const { whitelist = [], blacklist = [], protectedlist = [], privileges = [] } = domain.iplist || {}\n\n if (Array.isArray(whitelist) && whitelist.length > 0) {\n /* whitelist 우선 */\n const whitelisted =\n Array.isArray(whitelist) &&\n whitelist.some(item => {\n return new RegExp(item).test(ip)\n })\n\n if (!whitelisted) {\n context.status = 403\n return\n }\n } else {\n const blacklisted =\n Array.isArray(blacklist) &&\n blacklist.some(item => {\n return new RegExp(item).test(ip)\n })\n\n if (blacklisted) {\n context.status = 403\n return\n }\n }\n\n if (Array.isArray(protectedlist) && protectedlist.length > 0) {\n const safe = protectedlist.some(item => {\n return new RegExp(item).test(ip)\n })\n\n context.state.unsafeIP = !safe\n\n if (!safe) {\n context.state.prohibitedPrivileges = privileges\n }\n }\n }\n\n context.state.domain = domain\n\n return next()\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.initMiddlewares = void 0;
3
+ exports.initMiddlewares = initMiddlewares;
4
4
  const tslib_1 = require("tslib");
5
5
  const env_1 = require("@things-factory/env");
6
6
  const domain_middleware_1 = require("./domain-middleware");
@@ -36,6 +36,5 @@ function initMiddlewares(app) {
36
36
  await next();
37
37
  });
38
38
  }
39
- exports.initMiddlewares = initMiddlewares;
40
39
  tslib_1.__exportStar(require("./domain-middleware"), exports);
41
40
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/middlewares/index.ts"],"names":[],"mappings":";;;;AAAA,6CAAoD;AAEpD,2DAAsD;AAEtD,SAAgB,eAAe,CAAC,GAAG;IACjC,GAAG,CAAC,eAAe,GAAG,YAAM,CAAC,GAAG,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAA;IAEtD,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE;QAC/B,YAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACnB,CAAC,CAAC,CAAA;IAEF;;;OAGG;IACH,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;QAC9B,IAAI;YACF,MAAM,IAAI,EAAE,CAAA;SACb;QAAC,OAAO,GAAG,EAAE;YACZ,OAAO,CAAC,MAAM,GAAG,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,MAAM,KAAI,GAAG,CAAA;YACnC,OAAO,CAAC,IAAI,GAAG,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,OAAO,CAAA;YAE3B,yCAAyC;YACzC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,CAAA;SACxC;IACH,CAAC,CAAC,CAAA;IAEF;;;OAGG;IACH,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;QAC9B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAA;QAEhC,IAAI,MAAM,IAAI,MAAM,IAAI,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE;YACnD,OAAO,MAAM,IAAA,oCAAgB,EAAC,OAAO,EAAE,IAAI,CAAC,CAAA;SAC7C;QAED,MAAM,IAAI,EAAE,CAAA;IACd,CAAC,CAAC,CAAA;AACJ,CAAC;AApCD,0CAoCC;AAED,8DAAmC","sourcesContent":["import { config, logger } from '@things-factory/env'\n\nimport { domainMiddleware } from './domain-middleware'\n\nexport function initMiddlewares(app) {\n app.subdomainOffset = config.get('subdomainOffset', 2)\n\n app.on('error', (err, context) => {\n logger.error(err)\n })\n\n /*\n * Catching downstream errors\n * - recommend to use context.throw, context.assert\n */\n app.use(async (context, next) => {\n try {\n await next()\n } catch (err) {\n context.status = err?.status || 500\n context.body = err?.message\n\n // emitting error to app.on('error', ...)\n context.app.emit('error', err, context)\n }\n })\n\n /*\n * post:graphql 에 대해서는 domain을 확인한다.\n * graphql app을 router에 적용하지 못하기 때문임.\n */\n app.use(async (context, next) => {\n const { method, path } = context\n\n if (method == 'POST' && path.startsWith('/graphql')) {\n return await domainMiddleware(context, next)\n }\n\n await next()\n })\n}\n\nexport * from './domain-middleware'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/middlewares/index.ts"],"names":[],"mappings":";;AAIA,0CAoCC;;AAxCD,6CAAoD;AAEpD,2DAAsD;AAEtD,SAAgB,eAAe,CAAC,GAAG;IACjC,GAAG,CAAC,eAAe,GAAG,YAAM,CAAC,GAAG,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAA;IAEtD,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE;QAC/B,YAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACnB,CAAC,CAAC,CAAA;IAEF;;;OAGG;IACH,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;QAC9B,IAAI,CAAC;YACH,MAAM,IAAI,EAAE,CAAA;QACd,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,MAAM,GAAG,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,MAAM,KAAI,GAAG,CAAA;YACnC,OAAO,CAAC,IAAI,GAAG,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,OAAO,CAAA;YAE3B,yCAAyC;YACzC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,CAAA;QACzC,CAAC;IACH,CAAC,CAAC,CAAA;IAEF;;;OAGG;IACH,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;QAC9B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAA;QAEhC,IAAI,MAAM,IAAI,MAAM,IAAI,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YACpD,OAAO,MAAM,IAAA,oCAAgB,EAAC,OAAO,EAAE,IAAI,CAAC,CAAA;QAC9C,CAAC;QAED,MAAM,IAAI,EAAE,CAAA;IACd,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,8DAAmC","sourcesContent":["import { config, logger } from '@things-factory/env'\n\nimport { domainMiddleware } from './domain-middleware'\n\nexport function initMiddlewares(app) {\n app.subdomainOffset = config.get('subdomainOffset', 2)\n\n app.on('error', (err, context) => {\n logger.error(err)\n })\n\n /*\n * Catching downstream errors\n * - recommend to use context.throw, context.assert\n */\n app.use(async (context, next) => {\n try {\n await next()\n } catch (err) {\n context.status = err?.status || 500\n context.body = err?.message\n\n // emitting error to app.on('error', ...)\n context.app.emit('error', err, context)\n }\n })\n\n /*\n * post:graphql 에 대해서는 domain을 확인한다.\n * graphql app을 router에 적용하지 못하기 때문임.\n */\n app.use(async (context, next) => {\n const { method, path } = context\n\n if (method == 'POST' && path.startsWith('/graphql')) {\n return await domainMiddleware(context, next)\n }\n\n await next()\n })\n}\n\nexport * from './domain-middleware'\n"]}
@@ -17,7 +17,6 @@ const mqtt_1 = require("mqtt");
17
17
  const env_1 = require("@things-factory/env");
18
18
  const { middleware, host, port, nodes, topic, options } = env_1.config.get('pubsub', {});
19
19
  let pubsub;
20
- exports.pubsub = pubsub;
21
20
  switch (middleware) {
22
21
  case 'mqtt':
23
22
  //@ts-ignore
@@ -56,7 +55,7 @@ switch (middleware) {
56
55
  port }, options));
57
56
  }
58
57
  catch (e) {
59
- env_1.logger.error('graphql-kafka-subscriptions module is not installed, so application can not go further.');
58
+ env_1.logger.error('graphql-kafka-subscriptions module is not installed, so application can not go further.', e);
60
59
  throw e;
61
60
  }
62
61
  break;
@@ -1 +1 @@
1
- {"version":3,"file":"pubsub.js","sourceRoot":"","sources":["../server/pubsub.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,2EAAuD;AACvD,6EAAyD;AACzD,+CAA2C;AAC3C,8DAA2B;AAC3B,+BAA8B;AAE9B,6CAAoD;AAGpD,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,YAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;AAElF,IAAI,MAAc,CAAA;AAwFT,wBAAM;AAtFf,QAAQ,UAAU,EAAE;IAClB,KAAK,MAAM;QACT,YAAY;QACZ,iBAAA,MAAM,GAAG,IAAI,uCAAU,CAAC;YACtB,MAAM,EAAE,IAAA,cAAO,EAAC,SAAS,GAAG,IAAI,kBAC9B,eAAe,EAAE,IAAI,IAClB,OAAO,EACH;SACV,CAAC,CAAA;QACF,MAAK;IACP,KAAK,OAAO;QACV,MAAM,WAAW,mBACf,IAAI;YACJ,IAAI,EACJ,aAAa,EAAE,KAAK,CAAC,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AA;AAED;;GAEG;AAEH,kCAAkC;AAClC,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;AAExE,sBAAsB;AACtB,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;AAE5E,oDAAoD;AACpD,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;AAC9E,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA","sourcesContent":["/**\n * @module pubsub\n * @description\n * This module provides a Pub/Sub (Publish/Subscribe) mechanism for handling messages and events.\n * Developers can use various middleware options such as MQTT, Redis, Redis Cluster, or Kafka\n * to implement Pub/Sub functionality.\n */\n\nimport { MQTTPubSub } from 'graphql-mqtt-subscriptions'\nimport { RedisPubSub } from 'graphql-redis-subscriptions'\nimport { createPubSub } from 'graphql-yoga'\nimport Redis from 'ioredis'\nimport { connect } from 'mqtt'\n\nimport { config, logger } from '@things-factory/env'\nimport { PubSub } from 'type-graphql'\n\nconst { middleware, host, port, nodes, topic, options } = config.get('pubsub', {})\n\nlet pubsub: PubSub\n\nswitch (middleware) {\n case 'mqtt':\n //@ts-ignore\n pubsub = new MQTTPubSub({\n client: connect('mqtt://' + host, {\n reconnectPeriod: 1000,\n ...options\n }) as any\n })\n break\n case 'redis':\n const redisOption = {\n host,\n port,\n retryStrategy: times => {\n // reconnect after\n return Math.min(times * 50, 2000)\n },\n ...options\n }\n //@ts-ignore\n pubsub = new RedisPubSub({\n publisher: new Redis(redisOption),\n subscriber: new Redis(redisOption)\n })\n break\n case 'redisCluster':\n const cluster = new Redis.Cluster(nodes, options)\n //@ts-ignore\n pubsub = new RedisPubSub({\n publisher: cluster,\n subscriber: cluster\n })\n break\n case 'kafka':\n try {\n /*\n * https://github.com/hatiolab/things-factory/issues/1239\n */\n const { KafkaPubSub } = require('graphql-kafka-subscriptions')\n pubsub = new KafkaPubSub({\n topic,\n host,\n port,\n ...options\n })\n } catch (e) {\n logger.error('graphql-kafka-subscriptions module is not installed, so application can not go further.')\n throw e\n }\n break\n default:\n pubsub = createPubSub()\n break\n}\n\n// kafka pubsub keeps connection and app port with 'ctrl+c' termination.\nconst exitHandler = async evt => {\n //@ts-ignore\n if (pubsub.close) {\n try {\n //@ts-ignore\n await pubsub.close()\n } catch (err) {\n logger.error(err)\n }\n }\n}\n\n/*\n * exit events hint from https://stackoverflow.com/a/14032965/14539284\n */\n\n//do something when app is closing\nprocess.on('exit', exitHandler.bind(null, { name: 'exit', exit: true }))\n\n//catches ctrl+c event\nprocess.on('SIGINT', exitHandler.bind(null, { name: 'SIGINT', exit: true }))\n\n// catches \"kill pid\" (for example: nodemon restart)\nprocess.on('SIGUSR1', exitHandler.bind(null, { name: 'SIGUSR1', exit: true }))\nprocess.on('SIGUSR2', exitHandler.bind(null, { name: 'SIGUSR2', exit: true }))\n\n//catches uncaught exceptions\n// process.on('uncaughtException', exitHandler.bind(null, { name: 'uncaughtException', exit: true }))\n\nexport { pubsub }\n"]}
1
+ {"version":3,"file":"pubsub.js","sourceRoot":"","sources":["../server/pubsub.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,2EAAuD;AACvD,6EAAyD;AACzD,+CAA2C;AAC3C,8DAA2B;AAC3B,+BAA8B;AAE9B,6CAAoD;AAGpD,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,KA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ish/Subscribe) mechanism for handling messages and events.\n * Developers can use various middleware options such as MQTT, Redis, Redis Cluster, or Kafka\n * to implement Pub/Sub functionality.\n */\n\nimport { MQTTPubSub } from 'graphql-mqtt-subscriptions'\nimport { RedisPubSub } from 'graphql-redis-subscriptions'\nimport { createPubSub } from 'graphql-yoga'\nimport Redis from 'ioredis'\nimport { connect } from 'mqtt'\n\nimport { config, logger } from '@things-factory/env'\nimport { PubSub } from 'type-graphql'\n\nconst { middleware, host, port, nodes, topic, options } = config.get('pubsub', {})\n\nlet pubsub: PubSub\n\nswitch (middleware) {\n case 'mqtt':\n //@ts-ignore\n pubsub = new MQTTPubSub({\n client: connect('mqtt://' + host, {\n reconnectPeriod: 1000,\n ...options\n }) as any\n })\n break\n case 'redis':\n const redisOption = {\n host,\n port,\n retryStrategy: times => {\n // reconnect after\n return Math.min(times * 50, 2000)\n },\n ...options\n }\n //@ts-ignore\n pubsub = new RedisPubSub({\n publisher: new Redis(redisOption),\n subscriber: new Redis(redisOption)\n })\n break\n case 'redisCluster':\n const cluster = new Redis.Cluster(nodes, options)\n //@ts-ignore\n pubsub = new RedisPubSub({\n publisher: cluster,\n subscriber: cluster\n })\n break\n case 'kafka':\n try {\n /*\n * https://github.com/hatiolab/things-factory/issues/1239\n */\n const { KafkaPubSub } = require('graphql-kafka-subscriptions')\n pubsub = new KafkaPubSub({\n topic,\n host,\n port,\n ...options\n })\n } catch (e) {\n logger.error('graphql-kafka-subscriptions module is not installed, so application can not go further.', e)\n throw e\n }\n break\n default:\n pubsub = createPubSub()\n break\n}\n\n// kafka pubsub keeps connection and app port with 'ctrl+c' termination.\nconst exitHandler = async evt => {\n //@ts-ignore\n if (pubsub.close) {\n try {\n //@ts-ignore\n await pubsub.close()\n } catch (err) {\n logger.error(err)\n }\n }\n}\n\n/*\n * exit events hint from https://stackoverflow.com/a/14032965/14539284\n */\n\n//do something when app is closing\nprocess.on('exit', exitHandler.bind(null, { name: 'exit', exit: true }))\n\n//catches ctrl+c event\nprocess.on('SIGINT', exitHandler.bind(null, { name: 'SIGINT', exit: true }))\n\n// catches \"kill pid\" (for example: nodemon restart)\nprocess.on('SIGUSR1', exitHandler.bind(null, { name: 'SIGUSR1', exit: true }))\nprocess.on('SIGUSR2', exitHandler.bind(null, { name: 'SIGUSR2', exit: true }))\n\n//catches uncaught exceptions\n// process.on('uncaughtException', exitHandler.bind(null, { name: 'uncaughtException', exit: true }))\n\nexport { pubsub }\n"]}