@webiny/api-apw 0.0.0-unstable.1e66d121db → 0.0.0-unstable.611c5af35e

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 (239) hide show
  1. package/ApwChangeRequestNotification.d.ts +27 -0
  2. package/ApwChangeRequestNotification.js +30 -0
  3. package/ApwChangeRequestNotification.js.map +1 -0
  4. package/ApwCommentNotification.d.ts +27 -0
  5. package/ApwCommentNotification.js +30 -0
  6. package/ApwCommentNotification.js.map +1 -0
  7. package/ApwContentReviewNotification.d.ts +26 -0
  8. package/ApwContentReviewNotification.js +30 -0
  9. package/ApwContentReviewNotification.js.map +1 -0
  10. package/ApwContentUrlPlugin.d.ts +19 -0
  11. package/ApwContentUrlPlugin.js +30 -0
  12. package/ApwContentUrlPlugin.js.map +1 -0
  13. package/ContentApwSettingsPlugin.js +0 -5
  14. package/ContentApwSettingsPlugin.js.map +1 -1
  15. package/crud/createChangeRequestMethods.js +4 -11
  16. package/crud/createChangeRequestMethods.js.map +1 -1
  17. package/crud/createCommentMethods.js +4 -12
  18. package/crud/createCommentMethods.js.map +1 -1
  19. package/crud/createContentReviewMethods.js +32 -86
  20. package/crud/createContentReviewMethods.js.map +1 -1
  21. package/crud/createReviewerMethods.js +4 -12
  22. package/crud/createReviewerMethods.js.map +1 -1
  23. package/crud/createWorkflowMethods.js +4 -17
  24. package/crud/createWorkflowMethods.js.map +1 -1
  25. package/crud/index.js +0 -25
  26. package/crud/index.js.map +1 -1
  27. package/crud/utils.js +0 -28
  28. package/crud/utils.js.map +1 -1
  29. package/index.d.ts +3 -3
  30. package/index.js +5 -13
  31. package/index.js.map +1 -1
  32. package/package.json +35 -35
  33. package/plugins/cms/CmsEntryApwSettingsGetterPlugin.js +0 -15
  34. package/plugins/cms/CmsEntryApwSettingsGetterPlugin.js.map +1 -1
  35. package/plugins/cms/apwEntryPlugins.js +0 -8
  36. package/plugins/cms/apwEntryPlugins.js.map +1 -1
  37. package/plugins/cms/index.js +5 -10
  38. package/plugins/cms/index.js.map +1 -1
  39. package/plugins/cms/linkContentReviewToEntry.js +0 -17
  40. package/plugins/cms/linkContentReviewToEntry.js.map +1 -1
  41. package/plugins/cms/linkWorkflowToEntry.js +2 -31
  42. package/plugins/cms/linkWorkflowToEntry.js.map +1 -1
  43. package/plugins/cms/notifications/changeRequestNotification.d.ts +1 -0
  44. package/plugins/cms/notifications/changeRequestNotification.js +31 -0
  45. package/plugins/cms/notifications/changeRequestNotification.js.map +1 -0
  46. package/plugins/cms/notifications/commentNotification.d.ts +1 -0
  47. package/plugins/cms/notifications/commentNotification.js +31 -0
  48. package/plugins/cms/notifications/commentNotification.js.map +1 -0
  49. package/plugins/cms/notifications/contentReviewNotification.d.ts +1 -0
  50. package/plugins/cms/notifications/contentReviewNotification.js +31 -0
  51. package/plugins/cms/notifications/contentReviewNotification.js.map +1 -0
  52. package/plugins/cms/notifications/contentUrl.d.ts +8 -0
  53. package/plugins/cms/notifications/contentUrl.js +53 -0
  54. package/plugins/cms/notifications/contentUrl.js.map +1 -0
  55. package/plugins/cms/triggerContentReview.js +0 -14
  56. package/plugins/cms/triggerContentReview.js.map +1 -1
  57. package/plugins/cms/updateContentReviewStatus.js +0 -18
  58. package/plugins/cms/updateContentReviewStatus.js.map +1 -1
  59. package/plugins/cms/utils.js +2 -47
  60. package/plugins/cms/utils.js.map +1 -1
  61. package/plugins/context.js +0 -31
  62. package/plugins/context.js.map +1 -1
  63. package/plugins/graphql/changeRequest.gql.js +1 -8
  64. package/plugins/graphql/changeRequest.gql.js.map +1 -1
  65. package/plugins/graphql/comment.gql.js +1 -8
  66. package/plugins/graphql/comment.gql.js.map +1 -1
  67. package/plugins/graphql/contentReview.gql.js +1 -20
  68. package/plugins/graphql/contentReview.gql.js.map +1 -1
  69. package/plugins/graphql/reviewer.gql.js +3 -8
  70. package/plugins/graphql/reviewer.gql.js.map +1 -1
  71. package/plugins/graphql/workflow.gql.js +1 -8
  72. package/plugins/graphql/workflow.gql.js.map +1 -1
  73. package/plugins/graphql.js +1 -16
  74. package/plugins/graphql.js.map +1 -1
  75. package/plugins/hooks/createReviewerFromIdentity.js +26 -15
  76. package/plugins/hooks/createReviewerFromIdentity.js.map +1 -1
  77. package/plugins/hooks/deleteChangeRequestsAfterContentReview.js +1 -9
  78. package/plugins/hooks/deleteChangeRequestsAfterContentReview.js.map +1 -1
  79. package/plugins/hooks/deleteCommentsAfterChangeRequest.js +1 -8
  80. package/plugins/hooks/deleteCommentsAfterChangeRequest.js.map +1 -1
  81. package/plugins/hooks/index.js +2 -13
  82. package/plugins/hooks/index.js.map +1 -1
  83. package/plugins/hooks/initializeContentReviewSteps.js +2 -15
  84. package/plugins/hooks/initializeContentReviewSteps.js.map +1 -1
  85. package/plugins/hooks/initializeNotifications.d.ts +2 -0
  86. package/plugins/hooks/initializeNotifications.js +15 -0
  87. package/plugins/hooks/initializeNotifications.js.map +1 -0
  88. package/plugins/hooks/listContentReviews.d.ts +1 -1
  89. package/plugins/hooks/listContentReviews.js +9 -33
  90. package/plugins/hooks/listContentReviews.js.map +1 -1
  91. package/plugins/hooks/notifications/appUrl.d.ts +2 -0
  92. package/plugins/hooks/notifications/appUrl.js +18 -0
  93. package/plugins/hooks/notifications/appUrl.js.map +1 -0
  94. package/plugins/hooks/notifications/changeRequestAfterCreate.d.ts +2 -0
  95. package/plugins/hooks/notifications/changeRequestAfterCreate.js +116 -0
  96. package/plugins/hooks/notifications/changeRequestAfterCreate.js.map +1 -0
  97. package/plugins/hooks/notifications/changeRequestUrl.d.ts +8 -0
  98. package/plugins/hooks/notifications/changeRequestUrl.js +27 -0
  99. package/plugins/hooks/notifications/changeRequestUrl.js.map +1 -0
  100. package/plugins/hooks/notifications/commentAfterCreate.d.ts +2 -0
  101. package/plugins/hooks/notifications/commentAfterCreate.js +127 -0
  102. package/plugins/hooks/notifications/commentAfterCreate.js.map +1 -0
  103. package/plugins/hooks/notifications/commentUrl.d.ts +8 -0
  104. package/plugins/hooks/notifications/commentUrl.js +27 -0
  105. package/plugins/hooks/notifications/commentUrl.js.map +1 -0
  106. package/plugins/hooks/notifications/contentReviewAfterCreate.d.ts +2 -0
  107. package/plugins/hooks/notifications/contentReviewAfterCreate.js +99 -0
  108. package/plugins/hooks/notifications/contentReviewAfterCreate.js.map +1 -0
  109. package/plugins/hooks/notifications/contentReviewUrl.d.ts +7 -0
  110. package/plugins/hooks/notifications/contentReviewUrl.js +26 -0
  111. package/plugins/hooks/notifications/contentReviewUrl.js.map +1 -0
  112. package/plugins/hooks/notifications/contentUrl.d.ts +7 -0
  113. package/plugins/hooks/notifications/contentUrl.js +24 -0
  114. package/plugins/hooks/notifications/contentUrl.js.map +1 -0
  115. package/plugins/hooks/notifications/lastChangeRequestNotificationPlugin.d.ts +11 -0
  116. package/plugins/hooks/notifications/lastChangeRequestNotificationPlugin.js +21 -0
  117. package/plugins/hooks/notifications/lastChangeRequestNotificationPlugin.js.map +1 -0
  118. package/plugins/hooks/notifications/lastCommentNotificationPlugin.d.ts +11 -0
  119. package/plugins/hooks/notifications/lastCommentNotificationPlugin.js +21 -0
  120. package/plugins/hooks/notifications/lastCommentNotificationPlugin.js.map +1 -0
  121. package/plugins/hooks/notifications/lastContentReviewNotificationPlugin.d.ts +11 -0
  122. package/plugins/hooks/notifications/lastContentReviewNotificationPlugin.js +21 -0
  123. package/plugins/hooks/notifications/lastContentReviewNotificationPlugin.js.map +1 -0
  124. package/plugins/hooks/notifications/reviewers.d.ts +15 -0
  125. package/plugins/hooks/notifications/reviewers.js +44 -0
  126. package/plugins/hooks/notifications/reviewers.js.map +1 -0
  127. package/plugins/hooks/notifications/sendChangeRequestNotification.d.ts +2 -0
  128. package/plugins/hooks/notifications/sendChangeRequestNotification.js +41 -0
  129. package/plugins/hooks/notifications/sendChangeRequestNotification.js.map +1 -0
  130. package/plugins/hooks/notifications/sendCommentNotification.d.ts +2 -0
  131. package/plugins/hooks/notifications/sendCommentNotification.js +41 -0
  132. package/plugins/hooks/notifications/sendCommentNotification.js.map +1 -0
  133. package/plugins/hooks/notifications/sendContentReviewNotification.d.ts +2 -0
  134. package/plugins/hooks/notifications/sendContentReviewNotification.js +41 -0
  135. package/plugins/hooks/notifications/sendContentReviewNotification.js.map +1 -0
  136. package/plugins/hooks/updatePendingChangeRequests.js +0 -8
  137. package/plugins/hooks/updatePendingChangeRequests.js.map +1 -1
  138. package/plugins/hooks/updateTotalComments.js +0 -9
  139. package/plugins/hooks/updateTotalComments.js.map +1 -1
  140. package/plugins/hooks/validateChangeRequest.js +25 -16
  141. package/plugins/hooks/validateChangeRequest.js.map +1 -1
  142. package/plugins/hooks/validateComment.js +11 -12
  143. package/plugins/hooks/validateComment.js.map +1 -1
  144. package/plugins/hooks/validateContentReview.js +0 -6
  145. package/plugins/hooks/validateContentReview.js.map +1 -1
  146. package/plugins/pageBuilder/PageApwSettingsGetterPlugin.js +0 -15
  147. package/plugins/pageBuilder/PageApwSettingsGetterPlugin.js.map +1 -1
  148. package/plugins/pageBuilder/apwContentPagePlugins.js +0 -4
  149. package/plugins/pageBuilder/apwContentPagePlugins.js.map +1 -1
  150. package/plugins/pageBuilder/extendPbPageSettingsSchema.js +1 -6
  151. package/plugins/pageBuilder/extendPbPageSettingsSchema.js.map +1 -1
  152. package/plugins/pageBuilder/index.js +5 -8
  153. package/plugins/pageBuilder/index.js.map +1 -1
  154. package/plugins/pageBuilder/linkContentReviewToPage.js +0 -16
  155. package/plugins/pageBuilder/linkContentReviewToPage.js.map +1 -1
  156. package/plugins/pageBuilder/linkWorkflowToPage.js +1 -31
  157. package/plugins/pageBuilder/linkWorkflowToPage.js.map +1 -1
  158. package/plugins/pageBuilder/notifications/changeRequestNotification.d.ts +1 -0
  159. package/plugins/pageBuilder/notifications/changeRequestNotification.js +31 -0
  160. package/plugins/pageBuilder/notifications/changeRequestNotification.js.map +1 -0
  161. package/plugins/pageBuilder/notifications/commentNotification.d.ts +1 -0
  162. package/plugins/pageBuilder/notifications/commentNotification.js +31 -0
  163. package/plugins/pageBuilder/notifications/commentNotification.js.map +1 -0
  164. package/plugins/pageBuilder/notifications/contentReviewNotification.d.ts +1 -0
  165. package/plugins/pageBuilder/notifications/contentReviewNotification.js +31 -0
  166. package/plugins/pageBuilder/notifications/contentReviewNotification.js.map +1 -0
  167. package/plugins/pageBuilder/notifications/contentUrl.d.ts +1 -0
  168. package/plugins/pageBuilder/notifications/contentUrl.js +47 -0
  169. package/plugins/pageBuilder/notifications/contentUrl.js.map +1 -0
  170. package/plugins/pageBuilder/triggerContentReview.js +0 -11
  171. package/plugins/pageBuilder/triggerContentReview.js.map +1 -1
  172. package/plugins/pageBuilder/updateContentReviewStatus.js +0 -12
  173. package/plugins/pageBuilder/updateContentReviewStatus.js.map +1 -1
  174. package/plugins/pageBuilder/utils.js +1 -35
  175. package/plugins/pageBuilder/utils.js.map +1 -1
  176. package/plugins/utils.d.ts +0 -1
  177. package/plugins/utils.js +1 -50
  178. package/plugins/utils.js.map +1 -1
  179. package/scheduler/createScheduleActionMethods.js +1 -20
  180. package/scheduler/createScheduleActionMethods.js.map +1 -1
  181. package/scheduler/handlers/executeAction/index.js +9 -33
  182. package/scheduler/handlers/executeAction/index.js.map +1 -1
  183. package/scheduler/handlers/executeAction/plugins/ApplicationGraphQL.js +0 -5
  184. package/scheduler/handlers/executeAction/plugins/ApplicationGraphQL.js.map +1 -1
  185. package/scheduler/handlers/executeAction/plugins/HeadlessCMSGraphQL.js +0 -21
  186. package/scheduler/handlers/executeAction/plugins/HeadlessCMSGraphQL.js.map +1 -1
  187. package/scheduler/handlers/executeAction/plugins/PageBuilderGraphQL.js +4 -27
  188. package/scheduler/handlers/executeAction/plugins/PageBuilderGraphQL.js.map +1 -1
  189. package/scheduler/handlers/executeAction/security.js +0 -11
  190. package/scheduler/handlers/executeAction/security.js.map +1 -1
  191. package/scheduler/handlers/scheduleAction/index.js +5 -25
  192. package/scheduler/handlers/scheduleAction/index.js.map +1 -1
  193. package/scheduler/handlers/scheduleAction/scheduleAction.utils.js +2 -23
  194. package/scheduler/handlers/scheduleAction/scheduleAction.utils.js.map +1 -1
  195. package/scheduler/handlers/utils.js +3 -40
  196. package/scheduler/handlers/utils.js.map +1 -1
  197. package/scheduler/index.js +0 -3
  198. package/scheduler/index.js.map +1 -1
  199. package/scheduler/types.js +0 -6
  200. package/scheduler/types.js.map +1 -1
  201. package/storageOperations/changeRequestStorageOperations.js +0 -19
  202. package/storageOperations/changeRequestStorageOperations.js.map +1 -1
  203. package/storageOperations/commentStorageOperations.js +0 -21
  204. package/storageOperations/commentStorageOperations.js.map +1 -1
  205. package/storageOperations/contentReviewStorageOperations.js +0 -17
  206. package/storageOperations/contentReviewStorageOperations.js.map +1 -1
  207. package/storageOperations/index.js +0 -14
  208. package/storageOperations/index.js.map +1 -1
  209. package/storageOperations/models/changeRequest.model.js +0 -9
  210. package/storageOperations/models/changeRequest.model.js.map +1 -1
  211. package/storageOperations/models/comment.model.js +0 -8
  212. package/storageOperations/models/comment.model.js.map +1 -1
  213. package/storageOperations/models/contentModelPluginFactory.js +0 -5
  214. package/storageOperations/models/contentModelPluginFactory.js.map +1 -1
  215. package/storageOperations/models/contentReview.model.js +0 -26
  216. package/storageOperations/models/contentReview.model.js.map +1 -1
  217. package/storageOperations/models/index.js +2 -24
  218. package/storageOperations/models/index.js.map +1 -1
  219. package/storageOperations/models/reviewer.model.js +17 -9
  220. package/storageOperations/models/reviewer.model.js.map +1 -1
  221. package/storageOperations/models/utils.js +0 -4
  222. package/storageOperations/models/utils.js.map +1 -1
  223. package/storageOperations/models/workflow.model.js +0 -23
  224. package/storageOperations/models/workflow.model.js.map +1 -1
  225. package/storageOperations/reviewerStorageOperations.js +11 -20
  226. package/storageOperations/reviewerStorageOperations.js.map +1 -1
  227. package/storageOperations/workflowStorageOperations.js +0 -19
  228. package/storageOperations/workflowStorageOperations.js.map +1 -1
  229. package/types.d.ts +21 -9
  230. package/types.js +0 -14
  231. package/types.js.map +1 -1
  232. package/utils/contentApwSettingsPlugin.js +0 -6
  233. package/utils/contentApwSettingsPlugin.js.map +1 -1
  234. package/utils/errors.js +0 -17
  235. package/utils/errors.js.map +1 -1
  236. package/utils/fieldResolver.js +2 -12
  237. package/utils/fieldResolver.js.map +1 -1
  238. package/utils/resolve.js +0 -3
  239. package/utils/resolve.js.map +1 -1
@@ -1,18 +1,13 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.getTransformer = exports.getFieldValues = void 0;
9
-
10
8
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
12
9
  var _pick = _interopRequireDefault(require("lodash/pick"));
13
-
14
10
  var _apiHeadlessCms = require("@webiny/api-headless-cms");
15
-
16
11
  const getFieldValues = async params => {
17
12
  const {
18
13
  entry,
@@ -24,14 +19,13 @@ const getFieldValues = async params => {
24
19
  /**
25
20
  * Transform field value for each transformers.
26
21
  */
27
-
28
22
  for (const transformer of transformers) {
29
23
  const {
30
24
  fieldId,
31
25
  model,
32
26
  field
33
- } = transformer; // Get transformed value (eg. data decompression)
34
-
27
+ } = transformer;
28
+ // Get transformed value (eg. data decompression)
35
29
  values[fieldId] = await (0, _apiHeadlessCms.entryFieldFromStorageTransform)({
36
30
  context,
37
31
  model,
@@ -39,16 +33,12 @@ const getFieldValues = async params => {
39
33
  value: values[fieldId]
40
34
  });
41
35
  }
42
-
43
36
  return values;
44
37
  };
45
-
46
38
  exports.getFieldValues = getFieldValues;
47
-
48
39
  const getTransformer = (model, fieldId) => ({
49
40
  fieldId: fieldId,
50
41
  model: model,
51
42
  field: model.fields.find(field => field.fieldId === fieldId)
52
43
  });
53
-
54
44
  exports.getTransformer = getTransformer;
@@ -1 +1 @@
1
- {"version":3,"names":["getFieldValues","params","entry","context","transformers","fields","values","pick","transformer","fieldId","model","field","entryFieldFromStorageTransform","value","getTransformer","find"],"sources":["fieldResolver.ts"],"sourcesContent":["import pick from \"lodash/pick\";\nimport { CmsContext, CmsEntry, CmsModel } from \"@webiny/api-headless-cms/types\";\nimport { entryFieldFromStorageTransform } from \"@webiny/api-headless-cms\";\nimport { ApwBaseFields } from \"~/types\";\n\ninterface Transformer {\n fieldId: keyof ApwBaseFields;\n model: any;\n field: any;\n}\n\ninterface GetFieldValuesParams {\n entry: CmsEntry;\n fields: string[];\n transformers?: Transformer[];\n context: CmsContext;\n}\n\nexport const getFieldValues = async <T extends ApwBaseFields>(\n params: GetFieldValuesParams\n): Promise<T> => {\n const { entry, context, transformers = [], fields } = params;\n const values = {\n ...pick(entry, fields),\n ...entry.values\n } as T;\n /**\n * Transform field value for each transformers.\n */\n for (const transformer of transformers) {\n const { fieldId, model, field } = transformer;\n // Get transformed value (eg. data decompression)\n values[fieldId] = await entryFieldFromStorageTransform({\n context,\n model,\n field,\n value: values[fieldId]\n });\n }\n\n return values;\n};\n\nexport const getTransformer = (model: CmsModel, fieldId: string): Transformer => ({\n fieldId: fieldId as unknown as keyof ApwBaseFields,\n model: model,\n field: model.fields.find(field => field.fieldId === fieldId)\n});\n"],"mappings":";;;;;;;;;;;AAAA;;AAEA;;AAgBO,MAAMA,cAAc,GAAG,MAC1BC,MAD0B,IAEb;EACb,MAAM;IAAEC,KAAF;IAASC,OAAT;IAAkBC,YAAY,GAAG,EAAjC;IAAqCC;EAArC,IAAgDJ,MAAtD;EACA,MAAMK,MAAM,+DACL,IAAAC,aAAA,EAAKL,KAAL,EAAYG,MAAZ,CADK,GAELH,KAAK,CAACI,MAFD,CAAZ;EAIA;AACJ;AACA;;EACI,KAAK,MAAME,WAAX,IAA0BJ,YAA1B,EAAwC;IACpC,MAAM;MAAEK,OAAF;MAAWC,KAAX;MAAkBC;IAAlB,IAA4BH,WAAlC,CADoC,CAEpC;;IACAF,MAAM,CAACG,OAAD,CAAN,GAAkB,MAAM,IAAAG,8CAAA,EAA+B;MACnDT,OADmD;MAEnDO,KAFmD;MAGnDC,KAHmD;MAInDE,KAAK,EAAEP,MAAM,CAACG,OAAD;IAJsC,CAA/B,CAAxB;EAMH;;EAED,OAAOH,MAAP;AACH,CAvBM;;;;AAyBA,MAAMQ,cAAc,GAAG,CAACJ,KAAD,EAAkBD,OAAlB,MAAoD;EAC9EA,OAAO,EAAEA,OADqE;EAE9EC,KAAK,EAAEA,KAFuE;EAG9EC,KAAK,EAAED,KAAK,CAACL,MAAN,CAAaU,IAAb,CAAkBJ,KAAK,IAAIA,KAAK,CAACF,OAAN,KAAkBA,OAA7C;AAHuE,CAApD,CAAvB"}
1
+ {"version":3,"names":["getFieldValues","params","entry","context","transformers","fields","values","pick","transformer","fieldId","model","field","entryFieldFromStorageTransform","value","getTransformer","find"],"sources":["fieldResolver.ts"],"sourcesContent":["import pick from \"lodash/pick\";\nimport { CmsContext, CmsEntry, CmsModel } from \"@webiny/api-headless-cms/types\";\nimport { entryFieldFromStorageTransform } from \"@webiny/api-headless-cms\";\nimport { ApwBaseFields } from \"~/types\";\n\ninterface Transformer {\n fieldId: keyof ApwBaseFields;\n model: any;\n field: any;\n}\n\ninterface GetFieldValuesParams {\n entry: CmsEntry;\n fields: string[];\n transformers?: Transformer[];\n context: CmsContext;\n}\n\nexport const getFieldValues = async <T extends ApwBaseFields>(\n params: GetFieldValuesParams\n): Promise<T> => {\n const { entry, context, transformers = [], fields } = params;\n const values = {\n ...pick(entry, fields),\n ...entry.values\n } as T;\n /**\n * Transform field value for each transformers.\n */\n for (const transformer of transformers) {\n const { fieldId, model, field } = transformer;\n // Get transformed value (eg. data decompression)\n values[fieldId] = await entryFieldFromStorageTransform({\n context,\n model,\n field,\n value: values[fieldId]\n });\n }\n\n return values;\n};\n\nexport const getTransformer = (model: CmsModel, fieldId: string): Transformer => ({\n fieldId: fieldId as unknown as keyof ApwBaseFields,\n model: model,\n field: model.fields.find(field => field.fieldId === fieldId)\n});\n"],"mappings":";;;;;;;;AAAA;AAEA;AAgBO,MAAMA,cAAc,GAAG,MAC1BC,MAA4B,IACf;EACb,MAAM;IAAEC,KAAK;IAAEC,OAAO;IAAEC,YAAY,GAAG,EAAE;IAAEC;EAAO,CAAC,GAAGJ,MAAM;EAC5D,MAAMK,MAAM,+DACL,IAAAC,aAAI,EAACL,KAAK,EAAEG,MAAM,CAAC,GACnBH,KAAK,CAACI,MAAM,CACb;EACN;AACJ;AACA;EACI,KAAK,MAAME,WAAW,IAAIJ,YAAY,EAAE;IACpC,MAAM;MAAEK,OAAO;MAAEC,KAAK;MAAEC;IAAM,CAAC,GAAGH,WAAW;IAC7C;IACAF,MAAM,CAACG,OAAO,CAAC,GAAG,MAAM,IAAAG,8CAA8B,EAAC;MACnDT,OAAO;MACPO,KAAK;MACLC,KAAK;MACLE,KAAK,EAAEP,MAAM,CAACG,OAAO;IACzB,CAAC,CAAC;EACN;EAEA,OAAOH,MAAM;AACjB,CAAC;AAAC;AAEK,MAAMQ,cAAc,GAAG,CAACJ,KAAe,EAAED,OAAe,MAAmB;EAC9EA,OAAO,EAAEA,OAAyC;EAClDC,KAAK,EAAEA,KAAK;EACZC,KAAK,EAAED,KAAK,CAACL,MAAM,CAACU,IAAI,CAACJ,KAAK,IAAIA,KAAK,CAACF,OAAO,KAAKA,OAAO;AAC/D,CAAC,CAAC;AAAC"}
package/utils/resolve.js CHANGED
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _handlerGraphql = require("@webiny/handler-graphql");
9
-
10
8
  var _default = async fn => {
11
9
  try {
12
10
  return new _handlerGraphql.Response(await fn());
@@ -14,5 +12,4 @@ var _default = async fn => {
14
12
  return new _handlerGraphql.ErrorResponse(e);
15
13
  }
16
14
  };
17
-
18
15
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"names":["fn","Response","e","ErrorResponse"],"sources":["resolve.ts"],"sourcesContent":["import { Response, ErrorResponse } from \"@webiny/handler-graphql\";\n\nexport default async (fn: () => Promise<any>) => {\n try {\n return new Response(await fn());\n } catch (e) {\n return new ErrorResponse(e);\n }\n};\n"],"mappings":";;;;;;;AAAA;;eAEe,MAAOA,EAAP,IAAkC;EAC7C,IAAI;IACA,OAAO,IAAIC,wBAAJ,CAAa,MAAMD,EAAE,EAArB,CAAP;EACH,CAFD,CAEE,OAAOE,CAAP,EAAU;IACR,OAAO,IAAIC,6BAAJ,CAAkBD,CAAlB,CAAP;EACH;AACJ,C"}
1
+ {"version":3,"names":["fn","Response","e","ErrorResponse"],"sources":["resolve.ts"],"sourcesContent":["import { Response, ErrorResponse } from \"@webiny/handler-graphql\";\n\nexport default async (fn: () => Promise<any>) => {\n try {\n return new Response(await fn());\n } catch (e) {\n return new ErrorResponse(e);\n }\n};\n"],"mappings":";;;;;;AAAA;AAAkE,eAEnD,MAAOA,EAAsB,IAAK;EAC7C,IAAI;IACA,OAAO,IAAIC,wBAAQ,CAAC,MAAMD,EAAE,EAAE,CAAC;EACnC,CAAC,CAAC,OAAOE,CAAC,EAAE;IACR,OAAO,IAAIC,6BAAa,CAACD,CAAC,CAAC;EAC/B;AACJ,CAAC;AAAA"}