@baravak/risloo-profile-cli 3.1.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 (200) hide show
  1. package/.github/workflows/push.yml +14 -0
  2. package/.prettierrc +16 -0
  3. package/.yarn/releases/yarn-1.22.19.cjs +147529 -0
  4. package/.yarnrc.yml +1 -0
  5. package/README.md +98 -0
  6. package/bin/risloo.js +9 -0
  7. package/package.json +44 -0
  8. package/src/Gift.js +29 -0
  9. package/src/Profile.js +405 -0
  10. package/src/cli-commands/Executor.js +118 -0
  11. package/src/cli-commands/ExtractExecutor.js +194 -0
  12. package/src/cli-commands/GiftExecutor.js +56 -0
  13. package/src/cli-commands/utilities/BaseOps.js +71 -0
  14. package/src/cli-commands/utilities/Benchmarker.js +88 -0
  15. package/src/cli-commands/utilities/CustomErrors.js +14 -0
  16. package/src/cli-commands/utilities/Response.js +59 -0
  17. package/src/cli-commands/utilities/STATUSES.js +16 -0
  18. package/src/cli-commands/utilities/Status.js +9 -0
  19. package/src/cli.js +125 -0
  20. package/src/handlebars/helpers/abs.js +8 -0
  21. package/src/handlebars/helpers/addCommas.js +8 -0
  22. package/src/handlebars/helpers/array.js +8 -0
  23. package/src/handlebars/helpers/assignGlobal.js +9 -0
  24. package/src/handlebars/helpers/boolean.js +19 -0
  25. package/src/handlebars/helpers/ceil.js +8 -0
  26. package/src/handlebars/helpers/concat.js +8 -0
  27. package/src/handlebars/helpers/cos.js +8 -0
  28. package/src/handlebars/helpers/displacePoint.js +11 -0
  29. package/src/handlebars/helpers/ellipsisChars.js +10 -0
  30. package/src/handlebars/helpers/ellipsisLines.js +11 -0
  31. package/src/handlebars/helpers/first.js +11 -0
  32. package/src/handlebars/helpers/floor.js +8 -0
  33. package/src/handlebars/helpers/forLoop.js +15 -0
  34. package/src/handlebars/helpers/getArrOfProp.js +8 -0
  35. package/src/handlebars/helpers/isArray.js +8 -0
  36. package/src/handlebars/helpers/join.js +10 -0
  37. package/src/handlebars/helpers/last.js +11 -0
  38. package/src/handlebars/helpers/lineWrap.js +28 -0
  39. package/src/handlebars/helpers/math.js +24 -0
  40. package/src/handlebars/helpers/modulo.js +8 -0
  41. package/src/handlebars/helpers/normalizeAngle.js +7 -0
  42. package/src/handlebars/helpers/object.js +8 -0
  43. package/src/handlebars/helpers/objectEntries.js +8 -0
  44. package/src/handlebars/helpers/polarToCartesian.js +14 -0
  45. package/src/handlebars/helpers/prepend.js +10 -0
  46. package/src/handlebars/helpers/profiles/bar.js +45 -0
  47. package/src/handlebars/helpers/profiles/calcGaugeSidePoints.js +34 -0
  48. package/src/handlebars/helpers/profiles/gauge.js +61 -0
  49. package/src/handlebars/helpers/profiles/polygon.js +40 -0
  50. package/src/handlebars/helpers/reverse.js +9 -0
  51. package/src/handlebars/helpers/roundToTwo.js +8 -0
  52. package/src/handlebars/helpers/setVar.js +8 -0
  53. package/src/handlebars/helpers/sin.js +8 -0
  54. package/src/handlebars/helpers/split.js +8 -0
  55. package/src/handlebars/helpers/tan.js +8 -0
  56. package/src/handlebars/helpers/ternary.js +9 -0
  57. package/src/handlebars/helpers/toDeg.js +8 -0
  58. package/src/handlebars/helpers/toRad.js +8 -0
  59. package/src/handlebars/helpers/withGroup.js +20 -0
  60. package/src/handlebars/helpers/wrapOnNewline.js +11 -0
  61. package/src/handlebars/helpers.js +86 -0
  62. package/src/handlebars/importPartials.js +40 -0
  63. package/src/handlebars/init.js +15 -0
  64. package/src/publish/bot.js +91 -0
  65. package/src/publish/json/gift/gift.json +16 -0
  66. package/src/publish/json/profiles/16PF93.json +201 -0
  67. package/src/publish/json/profiles/AEQ93.json +96 -0
  68. package/src/publish/json/profiles/AMS93.json +102 -0
  69. package/src/publish/json/profiles/AMS9A.json +102 -0
  70. package/src/publish/json/profiles/BAOMEIS93.json +99 -0
  71. package/src/publish/json/profiles/BEQI93.json +1589 -0
  72. package/src/publish/json/profiles/CAATS93.json +11355 -0
  73. package/src/publish/json/profiles/CADS93.json +351 -0
  74. package/src/publish/json/profiles/CARSP93.json +96 -0
  75. package/src/publish/json/profiles/CERQ93.json +106 -0
  76. package/src/publish/json/profiles/CRAAS93.json +98 -0
  77. package/src/publish/json/profiles/CSI93.json +143 -0
  78. package/src/publish/json/profiles/DSWLS93.json +93 -0
  79. package/src/publish/json/profiles/EMSS93.json +116 -0
  80. package/src/publish/json/profiles/FACES93.json +106 -0
  81. package/src/publish/json/profiles/FTEPT93.json +102 -0
  82. package/src/publish/json/profiles/GMIT93.json +98 -0
  83. package/src/publish/json/profiles/HPL93.json +102 -0
  84. package/src/publish/json/profiles/IBT93.json +106 -0
  85. package/src/publish/json/profiles/IUS93.json +93 -0
  86. package/src/publish/json/profiles/JCSI93.json +102 -0
  87. package/src/publish/json/profiles/JPFQ93.json +1 -0
  88. package/src/publish/json/profiles/KJGI93.json +100 -0
  89. package/src/publish/json/profiles/LMIQ93.json +109 -0
  90. package/src/publish/json/profiles/MMFAD93.json +103 -0
  91. package/src/publish/json/profiles/MMFAD9A.json +103 -0
  92. package/src/publish/json/profiles/MOCI93.json +100 -0
  93. package/src/publish/json/profiles/OBQ4493.json +96 -0
  94. package/src/publish/json/profiles/PIES93.json +104 -0
  95. package/src/publish/json/profiles/PIES9A.json +104 -0
  96. package/src/publish/json/profiles/PMCIEF93.json +1 -0
  97. package/src/publish/json/profiles/PSWQ93.json +97 -0
  98. package/src/publish/json/profiles/RIASEC93.json +2511 -0
  99. package/src/publish/json/profiles/SAFE93.json +110 -0
  100. package/src/publish/json/profiles/SASQ93.json +92 -0
  101. package/src/publish/json/profiles/SCASP93.json +611 -0
  102. package/src/publish/json/profiles/SDCAQ93.json +96 -0
  103. package/src/publish/json/profiles/STAIY93.json +98 -0
  104. package/src/publish/json/profiles/WAQ93.json +100 -0
  105. package/src/publish/json/profiles/YBOCS93.json +1322 -0
  106. package/src/publish/json/profiles/empty.json +139 -0
  107. package/src/publish/new-version.hbs +11 -0
  108. package/src/publish/test.js +109 -0
  109. package/src/qrcode/qrCodeGenerator.js +14 -0
  110. package/src/qrcode/qrRender.js +229 -0
  111. package/src/samples/16PF93.js +158 -0
  112. package/src/samples/AEQ93.js +121 -0
  113. package/src/samples/AMS93.js +139 -0
  114. package/src/samples/AMS9A.js +9 -0
  115. package/src/samples/BAOMEIS93.js +146 -0
  116. package/src/samples/BEQI93.js +255 -0
  117. package/src/samples/CAATS93.js +218 -0
  118. package/src/samples/CADS93.js +161 -0
  119. package/src/samples/CARSP93.js +134 -0
  120. package/src/samples/CERQ93.js +195 -0
  121. package/src/samples/CRAAS93.js +141 -0
  122. package/src/samples/CSI93.js +315 -0
  123. package/src/samples/DSWLS93.js +112 -0
  124. package/src/samples/EMSS93.js +178 -0
  125. package/src/samples/FACES93.js +225 -0
  126. package/src/samples/FTEPT93.js +167 -0
  127. package/src/samples/GMIT93.js +142 -0
  128. package/src/samples/HPL93.js +132 -0
  129. package/src/samples/IBT93.js +99 -0
  130. package/src/samples/IUS93.js +204 -0
  131. package/src/samples/JCSI93.js +174 -0
  132. package/src/samples/JPFQ93.js +74 -0
  133. package/src/samples/KJGI93.js +136 -0
  134. package/src/samples/LMIQ93.js +188 -0
  135. package/src/samples/MMFAD93.js +135 -0
  136. package/src/samples/MMFAD9A.js +31 -0
  137. package/src/samples/MOCI93.js +128 -0
  138. package/src/samples/OBQ4493.js +132 -0
  139. package/src/samples/PIES93.js +228 -0
  140. package/src/samples/PIES9A.js +32 -0
  141. package/src/samples/PMCIEF93.js +64 -0
  142. package/src/samples/PSWQ93.js +126 -0
  143. package/src/samples/RIASEC93.js +144 -0
  144. package/src/samples/SAFE93.js +64 -0
  145. package/src/samples/SASQ93.js +130 -0
  146. package/src/samples/SCASP93.js +207 -0
  147. package/src/samples/SDCAQ93.js +174 -0
  148. package/src/samples/STAIY93.js +159 -0
  149. package/src/samples/WAQ93.js +208 -0
  150. package/src/samples/YBOCS93.js +583 -0
  151. package/src/samples/empty.js +53 -0
  152. package/views/gift.hbs +160 -0
  153. package/views/profiles/fonts.css +18 -0
  154. package/views/profiles/layout.hbs +27 -0
  155. package/views/profiles/samples/16PF93.hbs +54 -0
  156. package/views/profiles/samples/AEQ93.hbs +31 -0
  157. package/views/profiles/samples/AMS93.hbs +97 -0
  158. package/views/profiles/samples/AMS9A.hbs +1 -0
  159. package/views/profiles/samples/BAOMEIS93.hbs +48 -0
  160. package/views/profiles/samples/BEQI93.hbs +118 -0
  161. package/views/profiles/samples/CAATS93.hbs +251 -0
  162. package/views/profiles/samples/CADS93.hbs +104 -0
  163. package/views/profiles/samples/CARSP93.hbs +26 -0
  164. package/views/profiles/samples/CERQ93.hbs +115 -0
  165. package/views/profiles/samples/CRAAS93.hbs +88 -0
  166. package/views/profiles/samples/CSI93_1.hbs +110 -0
  167. package/views/profiles/samples/CSI93_2.hbs +76 -0
  168. package/views/profiles/samples/DSWLS93.hbs +26 -0
  169. package/views/profiles/samples/EMSS93.hbs +101 -0
  170. package/views/profiles/samples/FACES93_1.hbs +107 -0
  171. package/views/profiles/samples/FACES93_2.hbs +51 -0
  172. package/views/profiles/samples/FTEPT93.hbs +67 -0
  173. package/views/profiles/samples/GMIT93.hbs +45 -0
  174. package/views/profiles/samples/HPL93.hbs +36 -0
  175. package/views/profiles/samples/IBT93.hbs +67 -0
  176. package/views/profiles/samples/IUS93.hbs +123 -0
  177. package/views/profiles/samples/JCSI93.hbs +65 -0
  178. package/views/profiles/samples/JPFQ93.hbs +44 -0
  179. package/views/profiles/samples/KJGI93.hbs +57 -0
  180. package/views/profiles/samples/LMIQ93.hbs +82 -0
  181. package/views/profiles/samples/MMFAD93.hbs +35 -0
  182. package/views/profiles/samples/MMFAD9A.hbs +1 -0
  183. package/views/profiles/samples/MOCI93.hbs +60 -0
  184. package/views/profiles/samples/OBQ4493.hbs +61 -0
  185. package/views/profiles/samples/PIES93.hbs +67 -0
  186. package/views/profiles/samples/PIES9A.hbs +1 -0
  187. package/views/profiles/samples/PMCIEF93.hbs +8 -0
  188. package/views/profiles/samples/PSWQ93.hbs +32 -0
  189. package/views/profiles/samples/RIASEC93.hbs +38 -0
  190. package/views/profiles/samples/SAFE93.hbs +118 -0
  191. package/views/profiles/samples/SASQ93.hbs +45 -0
  192. package/views/profiles/samples/SCASP93.hbs +94 -0
  193. package/views/profiles/samples/SDCAQ93.hbs +68 -0
  194. package/views/profiles/samples/STAIY93.hbs +67 -0
  195. package/views/profiles/samples/WAQ93.hbs +74 -0
  196. package/views/profiles/samples/YBOCS93_1.hbs +96 -0
  197. package/views/profiles/samples/YBOCS93_2.hbs +115 -0
  198. package/views/profiles/samples/YBOCS93_3.hbs +93 -0
  199. package/views/profiles/samples/empty.hbs +10 -0
  200. package/views/profiles/sidebar.hbs +193 -0
@@ -0,0 +1,96 @@
1
+ {
2
+ "id": "$X1HQ2G3J3",
3
+ "scale": {
4
+ "id": "$PIES-93",
5
+ "title": "پرسشنامه اجتناب شناختی سکستون ودگاس"
6
+ },
7
+ "client": {
8
+ "id": "GH96666D7",
9
+ "name": "مهدی امیرآبادی"
10
+ },
11
+ "center": {
12
+ "detail": {
13
+ "title": "کلینیک شخصی بروبچه‌های ریسلو و رفقا"
14
+ }
15
+ },
16
+ "started_at": 1630907666,
17
+ "cornometer": 1,
18
+ "version": "1",
19
+ "edition": "",
20
+ "edition_version": null,
21
+ "filler": "client",
22
+ "description": "## دستور اجرای آزمون\n\nافراد از این جمله‌ها ممکن است برای توصیف خودشان استفاده کنند. لطفا هر جمله را به دقت بخوانید و ببینید که چقدر به آن جمله اعتقاد دارید یا بر اساس مقیاس فراوانی به آن پاسخ دهید. ",
23
+ "prerequisites": [
24
+ {
25
+ "type": "text",
26
+ "label": "gender",
27
+ "text": "جنسیت",
28
+ "answer": {
29
+ "type": "select",
30
+ "options": ["زن", "مرد"]
31
+ },
32
+ "alias": "gender",
33
+ "force": true,
34
+ "user_answered": "2"
35
+ },
36
+ {
37
+ "type": "text",
38
+ "label": "marital_status",
39
+ "text": "وضعیت تأهل",
40
+ "answer": {
41
+ "type": "select",
42
+ "options": ["مجرد", "متأهل"]
43
+ },
44
+ "alias": "marital_status",
45
+ "force": true,
46
+ "user_answered": "2"
47
+ },
48
+ {
49
+ "type": "text",
50
+ "label": "age",
51
+ "text": "سن",
52
+ "answer": {
53
+ "type": "number"
54
+ },
55
+ "alias": "age",
56
+ "force": true,
57
+ "user_answered": "23"
58
+ },
59
+ {
60
+ "type": "text",
61
+ "label": "education",
62
+ "text": "تحصیلات",
63
+ "answer": {
64
+ "type": "select",
65
+ "options": [
66
+ "ابتدایی اول",
67
+ "ابتدایی دوم",
68
+ "متوسطه اول",
69
+ "متوسطه دوم",
70
+ "دیپلم",
71
+ "کارشناسی",
72
+ "کارشناسی ارشد",
73
+ "پزشکی عمومی",
74
+ "متخصص",
75
+ "دکتری تخصصی",
76
+ "حوزوی مقدمات",
77
+ "حوزوی سطح۱",
78
+ "حوزوی سطح۲",
79
+ "حوزوی سطح۳",
80
+ "حوزوی سطح۴"
81
+ ]
82
+ },
83
+ "alias": "education",
84
+ "force": true,
85
+ "user_answered": "6"
86
+ }
87
+ ],
88
+ "score": {
89
+ "raw": 66,
90
+ "thought_suppression": 10,
91
+ "thought_substitution": 6,
92
+ "distraction_subscale": 17,
93
+ "avoidance_of_threatening_stimuli": 21,
94
+ "transformation_of_images_into_thoughts": 12
95
+ }
96
+ }
@@ -0,0 +1,98 @@
1
+ {
2
+ "id": "$X1HQ2G3J3",
3
+ "scale": {
4
+ "id": "$PIES-93",
5
+ "title": "پرسشنامه سیاهه روانی - اجتماعی نیرومندی من (ایگو) - فرم ۳۲ سؤالی"
6
+ },
7
+ "client": {
8
+ "id": "GH96666D7",
9
+ "name": "مهدی امیرآبادی"
10
+ },
11
+ "center": {
12
+ "detail": {
13
+ "title": "کلینیک شخصی بروبچه‌های ریسلو و رفقا"
14
+ }
15
+ },
16
+ "started_at": 1630907666,
17
+ "cornometer": 1,
18
+ "version": "1",
19
+ "edition": "",
20
+ "edition_version": null,
21
+ "filler": "client",
22
+ "description": "## دستور اجرای آزمون\n\nافراد از این جمله‌ها ممکن است برای توصیف خودشان استفاده کنند. لطفا هر جمله را به دقت بخوانید و ببینید که چقدر به آن جمله اعتقاد دارید یا بر اساس مقیاس فراوانی به آن پاسخ دهید. ",
23
+ "prerequisites": [
24
+ {
25
+ "type": "text",
26
+ "label": "gender",
27
+ "text": "جنسیت",
28
+ "answer": {
29
+ "type": "select",
30
+ "options": ["زن", "مرد"]
31
+ },
32
+ "alias": "gender",
33
+ "force": true,
34
+ "user_answered": "2"
35
+ },
36
+ {
37
+ "type": "text",
38
+ "label": "marital_status",
39
+ "text": "وضعیت تأهل",
40
+ "answer": {
41
+ "type": "select",
42
+ "options": ["مجرد", "متأهل"]
43
+ },
44
+ "alias": "marital_status",
45
+ "force": true,
46
+ "user_answered": "2"
47
+ },
48
+ {
49
+ "type": "text",
50
+ "label": "age",
51
+ "text": "سن",
52
+ "answer": {
53
+ "type": "number"
54
+ },
55
+ "alias": "age",
56
+ "force": true,
57
+ "user_answered": "23"
58
+ },
59
+ {
60
+ "type": "text",
61
+ "label": "education",
62
+ "text": "تحصیلات",
63
+ "answer": {
64
+ "type": "select",
65
+ "options": [
66
+ "ابتدایی اول",
67
+ "ابتدایی دوم",
68
+ "متوسطه اول",
69
+ "متوسطه دوم",
70
+ "دیپلم",
71
+ "کارشناسی",
72
+ "کارشناسی ارشد",
73
+ "پزشکی عمومی",
74
+ "متخصص",
75
+ "دکتری تخصصی",
76
+ "حوزوی مقدمات",
77
+ "حوزوی سطح۱",
78
+ "حوزوی سطح۲",
79
+ "حوزوی سطح۳",
80
+ "حوزوی سطح۴"
81
+ ]
82
+ },
83
+ "alias": "education",
84
+ "force": true,
85
+ "user_answered": "6"
86
+ }
87
+ ],
88
+ "score": {
89
+ "state": {
90
+ "value": 48,
91
+ "interpretation": "mild"
92
+ },
93
+ "trait": {
94
+ "value": 31,
95
+ "interpretation": "none"
96
+ }
97
+ }
98
+ }
@@ -0,0 +1,100 @@
1
+ {
2
+ "id": "$X1HQ2G3J3",
3
+ "scale": {
4
+ "id": "$PIES-93",
5
+ "title": "پرسشنامه سنجش عقل میردریکوندی"
6
+ },
7
+ "client": {
8
+ "id": "GH96666D7",
9
+ "name": "مهدی امیرآبادی"
10
+ },
11
+ "center": {
12
+ "detail": {
13
+ "title": "کلینیک شخصی بروبچه‌های ریسلو و رفقا"
14
+ }
15
+ },
16
+ "started_at": 1630907666,
17
+ "closed_at": 1711907666,
18
+ "scored_at": 1731907666,
19
+ "cornometer": 1,
20
+ "version": "1",
21
+ "edition": "",
22
+ "edition_version": null,
23
+ "filler": "client",
24
+ "description": "## دستور اجرای آزمون\n\nافراد از این جمله‌ها ممکن است برای توصیف خودشان استفاده کنند. لطفا هر جمله را به دقت بخوانید و ببینید که چقدر به آن جمله اعتقاد دارید یا بر اساس مقیاس فراوانی به آن پاسخ دهید. ",
25
+ "prerequisites": [
26
+ {
27
+ "type": "text",
28
+ "label": "gender",
29
+ "text": "جنسیت",
30
+ "answer": {
31
+ "type": "select",
32
+ "options": ["زن", "مرد"]
33
+ },
34
+ "alias": "gender",
35
+ "force": true,
36
+ "user_answered": "2"
37
+ },
38
+ {
39
+ "type": "text",
40
+ "label": "marital_status",
41
+ "text": "وضعیت تأهل",
42
+ "answer": {
43
+ "type": "select",
44
+ "options": ["مجرد", "متأهل"]
45
+ },
46
+ "alias": "marital_status",
47
+ "force": true,
48
+ "user_answered": "2"
49
+ },
50
+ {
51
+ "type": "text",
52
+ "label": "age",
53
+ "text": "سن",
54
+ "answer": {
55
+ "type": "number"
56
+ },
57
+ "alias": "age",
58
+ "force": true,
59
+ "user_answered": "23"
60
+ },
61
+ {
62
+ "type": "text",
63
+ "label": "education",
64
+ "text": "تحصیلات",
65
+ "answer": {
66
+ "type": "select",
67
+ "options": [
68
+ "ابتدایی اول",
69
+ "ابتدایی دوم",
70
+ "متوسطه اول",
71
+ "متوسطه دوم",
72
+ "دیپلم",
73
+ "کارشناسی",
74
+ "کارشناسی ارشد",
75
+ "پزشکی عمومی",
76
+ "متخصص",
77
+ "دکتری تخصصی",
78
+ "حوزوی مقدمات",
79
+ "حوزوی سطح۱",
80
+ "حوزوی سطح۲",
81
+ "حوزوی سطح۳",
82
+ "حوزوی سطح۴"
83
+ ]
84
+ },
85
+ "alias": "education",
86
+ "force": true,
87
+ "user_answered": "6"
88
+ }
89
+ ],
90
+ "score": {
91
+ "raw": 694,
92
+ "relationship_with_god": 64,
93
+ "relationship_with_self": 291,
94
+ "relationship_with_others": 190,
95
+ "relationship_with_wisdom": 50,
96
+ "relationship_with_religion": 43,
97
+ "relationship_with_right_and_wrong": 17,
98
+ "relationship_with_hereafter": 39
99
+ }
100
+ }