@webiny/api-website-builder-scheduler 0.0.0-unstable.7c2def32a7 → 0.0.0-unstable.9609e4e0c9
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/features/PublishActionHandler/PublishPageActionHandler.js +1 -1
- package/features/PublishActionHandler/PublishPageActionHandler.js.map +1 -1
- package/features/UnpublishActionHandler/UnpublishPageActionHandler.js +1 -1
- package/features/UnpublishActionHandler/UnpublishPageActionHandler.js.map +1 -1
- package/package.json +13 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/PublishActionHandler/PublishPageActionHandler.js","sources":["../../../src/features/PublishActionHandler/PublishPageActionHandler.ts"],"sourcesContent":["import {\n ScheduledActionHandler,\n ScheduledActionType,\n type IScheduledAction,\n ScheduledActionTypePublish\n} from \"@webiny/api-scheduler/exports/api/scheduler.js\";\nimport { PublishPageUseCase } from \"@webiny/api-website-builder/exports/api/website-builder/page.js\";\nimport type { IScheduledActionPayload } from \"~/types.js\";\nimport { extractModelIdFromNamespace } from \"~/utils/namespace.js\";\nimport { SCHEDULED_ACTION_TYPE_PAGE } from \"~/constants.js\";\n\n/**\n * Handles the scheduled \"publish\" action for Website Builder pages.\n */\nclass PublishPageActionHandlerImpl implements ScheduledActionHandler.Interface {\n constructor(private publishPageUseCase: PublishPageUseCase.Interface) {}\n\n public canHandle(namespace: string, actionType: ScheduledActionType): boolean {\n return (\n extractModelIdFromNamespace(namespace) === SCHEDULED_ACTION_TYPE_PAGE &&\n actionType === ScheduledActionTypePublish\n );\n }\n\n public async handle(action: IScheduledAction<IScheduledActionPayload>): Promise<void> {\n const result = await this.publishPageUseCase.execute({ id: action.targetId });\n if (result.isFail()) {\n console.error(`Failed to publish page \"${action.targetId}\":`, result.error);\n
|
|
1
|
+
{"version":3,"file":"features/PublishActionHandler/PublishPageActionHandler.js","sources":["../../../src/features/PublishActionHandler/PublishPageActionHandler.ts"],"sourcesContent":["import {\n ScheduledActionHandler,\n ScheduledActionType,\n type IScheduledAction,\n ScheduledActionTypePublish\n} from \"@webiny/api-scheduler/exports/api/scheduler.js\";\nimport { PublishPageUseCase } from \"@webiny/api-website-builder/exports/api/website-builder/page.js\";\nimport type { IScheduledActionPayload } from \"~/types.js\";\nimport { extractModelIdFromNamespace } from \"~/utils/namespace.js\";\nimport { SCHEDULED_ACTION_TYPE_PAGE } from \"~/constants.js\";\n\n/**\n * Handles the scheduled \"publish\" action for Website Builder pages.\n */\nclass PublishPageActionHandlerImpl implements ScheduledActionHandler.Interface {\n constructor(private publishPageUseCase: PublishPageUseCase.Interface) {}\n\n public canHandle(namespace: string, actionType: ScheduledActionType): boolean {\n return (\n extractModelIdFromNamespace(namespace) === SCHEDULED_ACTION_TYPE_PAGE &&\n actionType === ScheduledActionTypePublish\n );\n }\n\n public async handle(action: IScheduledAction<IScheduledActionPayload>): Promise<void> {\n const result = await this.publishPageUseCase.execute({ id: action.targetId });\n if (result.isFail()) {\n console.error(`Failed to publish page \"${action.targetId}\":`, result.error);\n // The use case's own error (code and data kept), so the scheduler records it as\n // `ExecutionFailedError.originalError` (R103).\n throw result.error;\n }\n }\n}\n\nexport const PublishPageActionHandler = ScheduledActionHandler.createImplementation({\n implementation: PublishPageActionHandlerImpl,\n dependencies: [PublishPageUseCase]\n});\n"],"names":["PublishPageActionHandlerImpl","publishPageUseCase","namespace","actionType","extractModelIdFromNamespace","SCHEDULED_ACTION_TYPE_PAGE","ScheduledActionTypePublish","action","result","console","PublishPageActionHandler","ScheduledActionHandler","PublishPageUseCase"],"mappings":";;;;AAcA,MAAMA;IACF,YAAoBC,kBAAgD,CAAE;aAAlDA,kBAAkB,GAAlBA;IAAmD;IAEhE,UAAUC,SAAiB,EAAEC,UAA+B,EAAW;QAC1E,OACIC,4BAA4BF,eAAeG,8BAC3CF,eAAeG;IAEvB;IAEA,MAAa,OAAOC,MAAiD,EAAiB;QAClF,MAAMC,SAAS,MAAM,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC;YAAE,IAAID,OAAO,QAAQ;QAAC;QAC3E,IAAIC,OAAO,MAAM,IAAI;YACjBC,QAAQ,KAAK,CAAC,CAAC,wBAAwB,EAAEF,OAAO,QAAQ,CAAC,EAAE,CAAC,EAAEC,OAAO,KAAK;YAG1E,MAAMA,OAAO,KAAK;QACtB;IACJ;AACJ;AAEO,MAAME,2BAA2BC,uBAAuB,oBAAoB,CAAC;IAChF,gBAAgBX;IAChB,cAAc;QAACY;KAAmB;AACtC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/UnpublishActionHandler/UnpublishPageActionHandler.js","sources":["../../../src/features/UnpublishActionHandler/UnpublishPageActionHandler.ts"],"sourcesContent":["import {\n type IScheduledAction,\n ScheduledActionHandler,\n ScheduledActionTypeUnpublish\n} from \"@webiny/api-scheduler/exports/api/scheduler.js\";\nimport { UnpublishPageUseCase } from \"@webiny/api-website-builder/exports/api/website-builder/page.js\";\nimport type { IScheduledActionPayload } from \"~/types.js\";\nimport { extractModelIdFromNamespace } from \"~/utils/namespace.js\";\nimport { SCHEDULED_ACTION_TYPE_PAGE } from \"~/constants.js\";\nimport type { ScheduledActionType } from \"@webiny/api-scheduler/shared/abstractions.js\";\n\n/**\n * Handles the scheduled \"unpublish\" action for Website Builder pages.\n */\nclass UnpublishPageActionHandlerImpl implements ScheduledActionHandler.Interface {\n constructor(private unpublishPageUseCase: UnpublishPageUseCase.Interface) {}\n\n canHandle(namespace: string, actionType: ScheduledActionType): boolean {\n return (\n extractModelIdFromNamespace(namespace) === SCHEDULED_ACTION_TYPE_PAGE &&\n actionType === ScheduledActionTypeUnpublish\n );\n }\n\n async handle(action: IScheduledAction<IScheduledActionPayload>): Promise<void> {\n const result = await this.unpublishPageUseCase.execute({ id: action.targetId });\n if (result.isFail()) {\n console.error(`Failed to unpublish page \"${action.targetId}\":`, result.error);\n
|
|
1
|
+
{"version":3,"file":"features/UnpublishActionHandler/UnpublishPageActionHandler.js","sources":["../../../src/features/UnpublishActionHandler/UnpublishPageActionHandler.ts"],"sourcesContent":["import {\n type IScheduledAction,\n ScheduledActionHandler,\n ScheduledActionTypeUnpublish\n} from \"@webiny/api-scheduler/exports/api/scheduler.js\";\nimport { UnpublishPageUseCase } from \"@webiny/api-website-builder/exports/api/website-builder/page.js\";\nimport type { IScheduledActionPayload } from \"~/types.js\";\nimport { extractModelIdFromNamespace } from \"~/utils/namespace.js\";\nimport { SCHEDULED_ACTION_TYPE_PAGE } from \"~/constants.js\";\nimport type { ScheduledActionType } from \"@webiny/api-scheduler/shared/abstractions.js\";\n\n/**\n * Handles the scheduled \"unpublish\" action for Website Builder pages.\n */\nclass UnpublishPageActionHandlerImpl implements ScheduledActionHandler.Interface {\n constructor(private unpublishPageUseCase: UnpublishPageUseCase.Interface) {}\n\n canHandle(namespace: string, actionType: ScheduledActionType): boolean {\n return (\n extractModelIdFromNamespace(namespace) === SCHEDULED_ACTION_TYPE_PAGE &&\n actionType === ScheduledActionTypeUnpublish\n );\n }\n\n async handle(action: IScheduledAction<IScheduledActionPayload>): Promise<void> {\n const result = await this.unpublishPageUseCase.execute({ id: action.targetId });\n if (result.isFail()) {\n console.error(`Failed to unpublish page \"${action.targetId}\":`, result.error);\n // The use case's own error (code and data kept), so the scheduler records it as\n // `ExecutionFailedError.originalError` (R103).\n throw result.error;\n }\n }\n}\n\nexport const UnpublishPageActionHandler = ScheduledActionHandler.createImplementation({\n implementation: UnpublishPageActionHandlerImpl,\n dependencies: [UnpublishPageUseCase]\n});\n"],"names":["UnpublishPageActionHandlerImpl","unpublishPageUseCase","namespace","actionType","extractModelIdFromNamespace","SCHEDULED_ACTION_TYPE_PAGE","ScheduledActionTypeUnpublish","action","result","console","UnpublishPageActionHandler","ScheduledActionHandler","UnpublishPageUseCase"],"mappings":";;;;AAcA,MAAMA;IACF,YAAoBC,oBAAoD,CAAE;aAAtDA,oBAAoB,GAApBA;IAAuD;IAE3E,UAAUC,SAAiB,EAAEC,UAA+B,EAAW;QACnE,OACIC,4BAA4BF,eAAeG,8BAC3CF,eAAeG;IAEvB;IAEA,MAAM,OAAOC,MAAiD,EAAiB;QAC3E,MAAMC,SAAS,MAAM,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC;YAAE,IAAID,OAAO,QAAQ;QAAC;QAC7E,IAAIC,OAAO,MAAM,IAAI;YACjBC,QAAQ,KAAK,CAAC,CAAC,0BAA0B,EAAEF,OAAO,QAAQ,CAAC,EAAE,CAAC,EAAEC,OAAO,KAAK;YAG5E,MAAMA,OAAO,KAAK;QACtB;IACJ;AACJ;AAEO,MAAME,6BAA6BC,uBAAuB,oBAAoB,CAAC;IAClF,gBAAgBX;IAChB,cAAc;QAACY;KAAqB;AACxC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/api-website-builder-scheduler",
|
|
3
|
-
"version": "0.0.0-unstable.
|
|
3
|
+
"version": "0.0.0-unstable.9609e4e0c9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.js",
|
|
@@ -17,22 +17,22 @@
|
|
|
17
17
|
},
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@webiny/api": "0.0.0-unstable.
|
|
21
|
-
"@webiny/api-scheduler": "0.0.0-unstable.
|
|
22
|
-
"@webiny/api-website-builder": "0.0.0-unstable.
|
|
23
|
-
"@webiny/feature": "0.0.0-unstable.
|
|
20
|
+
"@webiny/api": "0.0.0-unstable.9609e4e0c9",
|
|
21
|
+
"@webiny/api-scheduler": "0.0.0-unstable.9609e4e0c9",
|
|
22
|
+
"@webiny/api-website-builder": "0.0.0-unstable.9609e4e0c9",
|
|
23
|
+
"@webiny/feature": "0.0.0-unstable.9609e4e0c9"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@webiny/api-core": "0.0.0-unstable.
|
|
27
|
-
"@webiny/api-headless-cms": "0.0.0-unstable.
|
|
28
|
-
"@webiny/api-headless-cms-testing": "0.0.0-unstable.
|
|
29
|
-
"@webiny/api-opensearch": "0.0.0-unstable.
|
|
30
|
-
"@webiny/background-tasks": "0.0.0-unstable.
|
|
31
|
-
"@webiny/build-tools": "0.0.0-unstable.
|
|
26
|
+
"@webiny/api-core": "0.0.0-unstable.9609e4e0c9",
|
|
27
|
+
"@webiny/api-headless-cms": "0.0.0-unstable.9609e4e0c9",
|
|
28
|
+
"@webiny/api-headless-cms-testing": "0.0.0-unstable.9609e4e0c9",
|
|
29
|
+
"@webiny/api-opensearch": "0.0.0-unstable.9609e4e0c9",
|
|
30
|
+
"@webiny/background-tasks": "0.0.0-unstable.9609e4e0c9",
|
|
31
|
+
"@webiny/build-tools": "0.0.0-unstable.9609e4e0c9",
|
|
32
32
|
"@webiny/di": "2.0.0",
|
|
33
|
-
"@webiny/wcp": "0.0.0-unstable.
|
|
33
|
+
"@webiny/wcp": "0.0.0-unstable.9609e4e0c9",
|
|
34
34
|
"typescript": "7.0.2",
|
|
35
|
-
"vitest": "
|
|
35
|
+
"vitest": "5.0.5"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|