@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.
- package/ApwChangeRequestNotification.d.ts +27 -0
- package/ApwChangeRequestNotification.js +30 -0
- package/ApwChangeRequestNotification.js.map +1 -0
- package/ApwCommentNotification.d.ts +27 -0
- package/ApwCommentNotification.js +30 -0
- package/ApwCommentNotification.js.map +1 -0
- package/ApwContentReviewNotification.d.ts +26 -0
- package/ApwContentReviewNotification.js +30 -0
- package/ApwContentReviewNotification.js.map +1 -0
- package/ApwContentUrlPlugin.d.ts +19 -0
- package/ApwContentUrlPlugin.js +30 -0
- package/ApwContentUrlPlugin.js.map +1 -0
- package/ContentApwSettingsPlugin.js +0 -5
- package/ContentApwSettingsPlugin.js.map +1 -1
- package/crud/createChangeRequestMethods.js +4 -11
- package/crud/createChangeRequestMethods.js.map +1 -1
- package/crud/createCommentMethods.js +4 -12
- package/crud/createCommentMethods.js.map +1 -1
- package/crud/createContentReviewMethods.js +32 -86
- package/crud/createContentReviewMethods.js.map +1 -1
- package/crud/createReviewerMethods.js +4 -12
- package/crud/createReviewerMethods.js.map +1 -1
- package/crud/createWorkflowMethods.js +4 -17
- package/crud/createWorkflowMethods.js.map +1 -1
- package/crud/index.js +0 -25
- package/crud/index.js.map +1 -1
- package/crud/utils.js +0 -28
- package/crud/utils.js.map +1 -1
- package/index.d.ts +3 -3
- package/index.js +5 -13
- package/index.js.map +1 -1
- package/package.json +35 -35
- package/plugins/cms/CmsEntryApwSettingsGetterPlugin.js +0 -15
- package/plugins/cms/CmsEntryApwSettingsGetterPlugin.js.map +1 -1
- package/plugins/cms/apwEntryPlugins.js +0 -8
- package/plugins/cms/apwEntryPlugins.js.map +1 -1
- package/plugins/cms/index.js +5 -10
- package/plugins/cms/index.js.map +1 -1
- package/plugins/cms/linkContentReviewToEntry.js +0 -17
- package/plugins/cms/linkContentReviewToEntry.js.map +1 -1
- package/plugins/cms/linkWorkflowToEntry.js +2 -31
- package/plugins/cms/linkWorkflowToEntry.js.map +1 -1
- package/plugins/cms/notifications/changeRequestNotification.d.ts +1 -0
- package/plugins/cms/notifications/changeRequestNotification.js +31 -0
- package/plugins/cms/notifications/changeRequestNotification.js.map +1 -0
- package/plugins/cms/notifications/commentNotification.d.ts +1 -0
- package/plugins/cms/notifications/commentNotification.js +31 -0
- package/plugins/cms/notifications/commentNotification.js.map +1 -0
- package/plugins/cms/notifications/contentReviewNotification.d.ts +1 -0
- package/plugins/cms/notifications/contentReviewNotification.js +31 -0
- package/plugins/cms/notifications/contentReviewNotification.js.map +1 -0
- package/plugins/cms/notifications/contentUrl.d.ts +8 -0
- package/plugins/cms/notifications/contentUrl.js +53 -0
- package/plugins/cms/notifications/contentUrl.js.map +1 -0
- package/plugins/cms/triggerContentReview.js +0 -14
- package/plugins/cms/triggerContentReview.js.map +1 -1
- package/plugins/cms/updateContentReviewStatus.js +0 -18
- package/plugins/cms/updateContentReviewStatus.js.map +1 -1
- package/plugins/cms/utils.js +2 -47
- package/plugins/cms/utils.js.map +1 -1
- package/plugins/context.js +0 -31
- package/plugins/context.js.map +1 -1
- package/plugins/graphql/changeRequest.gql.js +1 -8
- package/plugins/graphql/changeRequest.gql.js.map +1 -1
- package/plugins/graphql/comment.gql.js +1 -8
- package/plugins/graphql/comment.gql.js.map +1 -1
- package/plugins/graphql/contentReview.gql.js +1 -20
- package/plugins/graphql/contentReview.gql.js.map +1 -1
- package/plugins/graphql/reviewer.gql.js +3 -8
- package/plugins/graphql/reviewer.gql.js.map +1 -1
- package/plugins/graphql/workflow.gql.js +1 -8
- package/plugins/graphql/workflow.gql.js.map +1 -1
- package/plugins/graphql.js +1 -16
- package/plugins/graphql.js.map +1 -1
- package/plugins/hooks/createReviewerFromIdentity.js +26 -15
- package/plugins/hooks/createReviewerFromIdentity.js.map +1 -1
- package/plugins/hooks/deleteChangeRequestsAfterContentReview.js +1 -9
- package/plugins/hooks/deleteChangeRequestsAfterContentReview.js.map +1 -1
- package/plugins/hooks/deleteCommentsAfterChangeRequest.js +1 -8
- package/plugins/hooks/deleteCommentsAfterChangeRequest.js.map +1 -1
- package/plugins/hooks/index.js +2 -13
- package/plugins/hooks/index.js.map +1 -1
- package/plugins/hooks/initializeContentReviewSteps.js +2 -15
- package/plugins/hooks/initializeContentReviewSteps.js.map +1 -1
- package/plugins/hooks/initializeNotifications.d.ts +2 -0
- package/plugins/hooks/initializeNotifications.js +15 -0
- package/plugins/hooks/initializeNotifications.js.map +1 -0
- package/plugins/hooks/listContentReviews.d.ts +1 -1
- package/plugins/hooks/listContentReviews.js +9 -33
- package/plugins/hooks/listContentReviews.js.map +1 -1
- package/plugins/hooks/notifications/appUrl.d.ts +2 -0
- package/plugins/hooks/notifications/appUrl.js +18 -0
- package/plugins/hooks/notifications/appUrl.js.map +1 -0
- package/plugins/hooks/notifications/changeRequestAfterCreate.d.ts +2 -0
- package/plugins/hooks/notifications/changeRequestAfterCreate.js +116 -0
- package/plugins/hooks/notifications/changeRequestAfterCreate.js.map +1 -0
- package/plugins/hooks/notifications/changeRequestUrl.d.ts +8 -0
- package/plugins/hooks/notifications/changeRequestUrl.js +27 -0
- package/plugins/hooks/notifications/changeRequestUrl.js.map +1 -0
- package/plugins/hooks/notifications/commentAfterCreate.d.ts +2 -0
- package/plugins/hooks/notifications/commentAfterCreate.js +127 -0
- package/plugins/hooks/notifications/commentAfterCreate.js.map +1 -0
- package/plugins/hooks/notifications/commentUrl.d.ts +8 -0
- package/plugins/hooks/notifications/commentUrl.js +27 -0
- package/plugins/hooks/notifications/commentUrl.js.map +1 -0
- package/plugins/hooks/notifications/contentReviewAfterCreate.d.ts +2 -0
- package/plugins/hooks/notifications/contentReviewAfterCreate.js +99 -0
- package/plugins/hooks/notifications/contentReviewAfterCreate.js.map +1 -0
- package/plugins/hooks/notifications/contentReviewUrl.d.ts +7 -0
- package/plugins/hooks/notifications/contentReviewUrl.js +26 -0
- package/plugins/hooks/notifications/contentReviewUrl.js.map +1 -0
- package/plugins/hooks/notifications/contentUrl.d.ts +7 -0
- package/plugins/hooks/notifications/contentUrl.js +24 -0
- package/plugins/hooks/notifications/contentUrl.js.map +1 -0
- package/plugins/hooks/notifications/lastChangeRequestNotificationPlugin.d.ts +11 -0
- package/plugins/hooks/notifications/lastChangeRequestNotificationPlugin.js +21 -0
- package/plugins/hooks/notifications/lastChangeRequestNotificationPlugin.js.map +1 -0
- package/plugins/hooks/notifications/lastCommentNotificationPlugin.d.ts +11 -0
- package/plugins/hooks/notifications/lastCommentNotificationPlugin.js +21 -0
- package/plugins/hooks/notifications/lastCommentNotificationPlugin.js.map +1 -0
- package/plugins/hooks/notifications/lastContentReviewNotificationPlugin.d.ts +11 -0
- package/plugins/hooks/notifications/lastContentReviewNotificationPlugin.js +21 -0
- package/plugins/hooks/notifications/lastContentReviewNotificationPlugin.js.map +1 -0
- package/plugins/hooks/notifications/reviewers.d.ts +15 -0
- package/plugins/hooks/notifications/reviewers.js +44 -0
- package/plugins/hooks/notifications/reviewers.js.map +1 -0
- package/plugins/hooks/notifications/sendChangeRequestNotification.d.ts +2 -0
- package/plugins/hooks/notifications/sendChangeRequestNotification.js +41 -0
- package/plugins/hooks/notifications/sendChangeRequestNotification.js.map +1 -0
- package/plugins/hooks/notifications/sendCommentNotification.d.ts +2 -0
- package/plugins/hooks/notifications/sendCommentNotification.js +41 -0
- package/plugins/hooks/notifications/sendCommentNotification.js.map +1 -0
- package/plugins/hooks/notifications/sendContentReviewNotification.d.ts +2 -0
- package/plugins/hooks/notifications/sendContentReviewNotification.js +41 -0
- package/plugins/hooks/notifications/sendContentReviewNotification.js.map +1 -0
- package/plugins/hooks/updatePendingChangeRequests.js +0 -8
- package/plugins/hooks/updatePendingChangeRequests.js.map +1 -1
- package/plugins/hooks/updateTotalComments.js +0 -9
- package/plugins/hooks/updateTotalComments.js.map +1 -1
- package/plugins/hooks/validateChangeRequest.js +25 -16
- package/plugins/hooks/validateChangeRequest.js.map +1 -1
- package/plugins/hooks/validateComment.js +11 -12
- package/plugins/hooks/validateComment.js.map +1 -1
- package/plugins/hooks/validateContentReview.js +0 -6
- package/plugins/hooks/validateContentReview.js.map +1 -1
- package/plugins/pageBuilder/PageApwSettingsGetterPlugin.js +0 -15
- package/plugins/pageBuilder/PageApwSettingsGetterPlugin.js.map +1 -1
- package/plugins/pageBuilder/apwContentPagePlugins.js +0 -4
- package/plugins/pageBuilder/apwContentPagePlugins.js.map +1 -1
- package/plugins/pageBuilder/extendPbPageSettingsSchema.js +1 -6
- package/plugins/pageBuilder/extendPbPageSettingsSchema.js.map +1 -1
- package/plugins/pageBuilder/index.js +5 -8
- package/plugins/pageBuilder/index.js.map +1 -1
- package/plugins/pageBuilder/linkContentReviewToPage.js +0 -16
- package/plugins/pageBuilder/linkContentReviewToPage.js.map +1 -1
- package/plugins/pageBuilder/linkWorkflowToPage.js +1 -31
- package/plugins/pageBuilder/linkWorkflowToPage.js.map +1 -1
- package/plugins/pageBuilder/notifications/changeRequestNotification.d.ts +1 -0
- package/plugins/pageBuilder/notifications/changeRequestNotification.js +31 -0
- package/plugins/pageBuilder/notifications/changeRequestNotification.js.map +1 -0
- package/plugins/pageBuilder/notifications/commentNotification.d.ts +1 -0
- package/plugins/pageBuilder/notifications/commentNotification.js +31 -0
- package/plugins/pageBuilder/notifications/commentNotification.js.map +1 -0
- package/plugins/pageBuilder/notifications/contentReviewNotification.d.ts +1 -0
- package/plugins/pageBuilder/notifications/contentReviewNotification.js +31 -0
- package/plugins/pageBuilder/notifications/contentReviewNotification.js.map +1 -0
- package/plugins/pageBuilder/notifications/contentUrl.d.ts +1 -0
- package/plugins/pageBuilder/notifications/contentUrl.js +47 -0
- package/plugins/pageBuilder/notifications/contentUrl.js.map +1 -0
- package/plugins/pageBuilder/triggerContentReview.js +0 -11
- package/plugins/pageBuilder/triggerContentReview.js.map +1 -1
- package/plugins/pageBuilder/updateContentReviewStatus.js +0 -12
- package/plugins/pageBuilder/updateContentReviewStatus.js.map +1 -1
- package/plugins/pageBuilder/utils.js +1 -35
- package/plugins/pageBuilder/utils.js.map +1 -1
- package/plugins/utils.d.ts +0 -1
- package/plugins/utils.js +1 -50
- package/plugins/utils.js.map +1 -1
- package/scheduler/createScheduleActionMethods.js +1 -20
- package/scheduler/createScheduleActionMethods.js.map +1 -1
- package/scheduler/handlers/executeAction/index.js +9 -33
- package/scheduler/handlers/executeAction/index.js.map +1 -1
- package/scheduler/handlers/executeAction/plugins/ApplicationGraphQL.js +0 -5
- package/scheduler/handlers/executeAction/plugins/ApplicationGraphQL.js.map +1 -1
- package/scheduler/handlers/executeAction/plugins/HeadlessCMSGraphQL.js +0 -21
- package/scheduler/handlers/executeAction/plugins/HeadlessCMSGraphQL.js.map +1 -1
- package/scheduler/handlers/executeAction/plugins/PageBuilderGraphQL.js +4 -27
- package/scheduler/handlers/executeAction/plugins/PageBuilderGraphQL.js.map +1 -1
- package/scheduler/handlers/executeAction/security.js +0 -11
- package/scheduler/handlers/executeAction/security.js.map +1 -1
- package/scheduler/handlers/scheduleAction/index.js +5 -25
- package/scheduler/handlers/scheduleAction/index.js.map +1 -1
- package/scheduler/handlers/scheduleAction/scheduleAction.utils.js +2 -23
- package/scheduler/handlers/scheduleAction/scheduleAction.utils.js.map +1 -1
- package/scheduler/handlers/utils.js +3 -40
- package/scheduler/handlers/utils.js.map +1 -1
- package/scheduler/index.js +0 -3
- package/scheduler/index.js.map +1 -1
- package/scheduler/types.js +0 -6
- package/scheduler/types.js.map +1 -1
- package/storageOperations/changeRequestStorageOperations.js +0 -19
- package/storageOperations/changeRequestStorageOperations.js.map +1 -1
- package/storageOperations/commentStorageOperations.js +0 -21
- package/storageOperations/commentStorageOperations.js.map +1 -1
- package/storageOperations/contentReviewStorageOperations.js +0 -17
- package/storageOperations/contentReviewStorageOperations.js.map +1 -1
- package/storageOperations/index.js +0 -14
- package/storageOperations/index.js.map +1 -1
- package/storageOperations/models/changeRequest.model.js +0 -9
- package/storageOperations/models/changeRequest.model.js.map +1 -1
- package/storageOperations/models/comment.model.js +0 -8
- package/storageOperations/models/comment.model.js.map +1 -1
- package/storageOperations/models/contentModelPluginFactory.js +0 -5
- package/storageOperations/models/contentModelPluginFactory.js.map +1 -1
- package/storageOperations/models/contentReview.model.js +0 -26
- package/storageOperations/models/contentReview.model.js.map +1 -1
- package/storageOperations/models/index.js +2 -24
- package/storageOperations/models/index.js.map +1 -1
- package/storageOperations/models/reviewer.model.js +17 -9
- package/storageOperations/models/reviewer.model.js.map +1 -1
- package/storageOperations/models/utils.js +0 -4
- package/storageOperations/models/utils.js.map +1 -1
- package/storageOperations/models/workflow.model.js +0 -23
- package/storageOperations/models/workflow.model.js.map +1 -1
- package/storageOperations/reviewerStorageOperations.js +11 -20
- package/storageOperations/reviewerStorageOperations.js.map +1 -1
- package/storageOperations/workflowStorageOperations.js +0 -19
- package/storageOperations/workflowStorageOperations.js.map +1 -1
- package/types.d.ts +21 -9
- package/types.js +0 -14
- package/types.js.map +1 -1
- package/utils/contentApwSettingsPlugin.js +0 -6
- package/utils/contentApwSettingsPlugin.js.map +1 -1
- package/utils/errors.js +0 -17
- package/utils/errors.js.map +1 -1
- package/utils/fieldResolver.js +2 -12
- package/utils/fieldResolver.js.map +1 -1
- package/utils/resolve.js +0 -3
- package/utils/resolve.js.map +1 -1
package/utils/fieldResolver.js
CHANGED
@@ -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;
|
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":"
|
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;
|
package/utils/resolve.js.map
CHANGED
@@ -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":"
|
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"}
|