Skip to content

Commit f7da215

Browse files
authored
feat(api-headless-cms-tasks): re-introduce api-headless-cms-tasks package (#4235)
1 parent 8c68898 commit f7da215

File tree

24 files changed

+154
-28
lines changed

24 files changed

+154
-28
lines changed

apps/api/graphql/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
"@webiny/api-form-builder-so-ddb": "0.0.0",
2121
"@webiny/api-headless-cms": "0.0.0",
2222
"@webiny/api-headless-cms-aco": "0.0.0",
23-
"@webiny/api-headless-cms-bulk-actions": "0.0.0",
2423
"@webiny/api-headless-cms-ddb": "0.0.0",
24+
"@webiny/api-headless-cms-tasks": "0.0.0",
2525
"@webiny/api-i18n": "0.0.0",
2626
"@webiny/api-i18n-content": "0.0.0",
2727
"@webiny/api-i18n-ddb": "0.0.0",

apps/api/graphql/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import { createFormBuilder } from "@webiny/api-form-builder";
2828
import { createFormBuilderStorageOperations } from "@webiny/api-form-builder-so-ddb";
2929
import { createHeadlessCmsContext, createHeadlessCmsGraphQL } from "@webiny/api-headless-cms";
3030
import { createAcoHcmsContext } from "@webiny/api-headless-cms-aco";
31-
import { createHcmsBulkActions } from "@webiny/api-headless-cms-bulk-actions";
31+
import { createHcmsTasks } from "@webiny/api-headless-cms-tasks";
3232
import { createStorageOperations as createHeadlessCmsStorageOperations } from "@webiny/api-headless-cms-ddb";
3333
import securityPlugins from "./security";
3434
import tenantManager from "@webiny/api-tenant-manager";
@@ -108,7 +108,7 @@ export const handler = createHandler({
108108
createAco(),
109109
createAcoPageBuilderContext(),
110110
createAcoHcmsContext(),
111-
createHcmsBulkActions(),
111+
createHcmsTasks(),
112112
createFileModelModifier(({ modifier }) => {
113113
modifier.addField({
114114
id: "customField1",

apps/api/graphql/src/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { AcoContext } from "@webiny/api-aco/types";
99
import { PbAcoContext } from "@webiny/api-page-builder-aco/types";
1010
import { Context as TasksContext } from "@webiny/tasks/types";
1111
import { HcmsAcoContext } from "@webiny/api-headless-cms-aco/types";
12-
import { HcmsBulkActionsContext } from "@webiny/api-headless-cms-bulk-actions/types";
12+
import { HcmsTasksContext } from "@webiny/api-headless-cms-tasks/types";
1313

1414
// When working with the `context` object (for example while defining a new GraphQL resolver function),
1515
// you can import this interface and assign it to it. This will give you full autocomplete functionality
@@ -29,4 +29,4 @@ export interface Context
2929
TasksContext,
3030
PbAcoContext,
3131
HcmsAcoContext,
32-
HcmsBulkActionsContext {}
32+
HcmsTasksContext {}

apps/api/graphql/tsconfig.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"path": "../../../packages/api-headless-cms-aco/tsconfig.build.json"
4646
},
4747
{
48-
"path": "../../../packages/api-headless-cms-bulk-actions/tsconfig.build.json"
48+
"path": "../../../packages/api-headless-cms-tasks/tsconfig.build.json"
4949
},
5050
{
5151
"path": "../../../packages/api-headless-cms-ddb/tsconfig.build.json"
@@ -154,12 +154,8 @@
154154
"@webiny/api-headless-cms": ["../../../packages/api-headless-cms/src"],
155155
"@webiny/api-headless-cms-aco/*": ["../../../packages/api-headless-cms-aco/src/*"],
156156
"@webiny/api-headless-cms-aco": ["../../../packages/api-headless-cms-aco/src"],
157-
"@webiny/api-headless-cms-bulk-actions/*": [
158-
"../../../packages/api-headless-cms-bulk-actions/src/*"
159-
],
160-
"@webiny/api-headless-cms-bulk-actions": [
161-
"../../../packages/api-headless-cms-bulk-actions/src"
162-
],
157+
"@webiny/api-headless-cms-tasks/*": ["../../../packages/api-headless-cms-tasks/src/*"],
158+
"@webiny/api-headless-cms-tasks": ["../../../packages/api-headless-cms-tasks/src"],
163159
"@webiny/api-headless-cms-ddb/*": ["../../../packages/api-headless-cms-ddb/src/*"],
164160
"@webiny/api-headless-cms-ddb": ["../../../packages/api-headless-cms-ddb/src"],
165161
"@webiny/api-record-locking/*": ["../../../packages/api-record-locking/src/*"],
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require("@webiny/project-utils").createBabelConfigForNode({ path: __dirname });
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) Webiny
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# @webiny/api-headless-cms-tasks
2+
[![](https://img.shields.io/npm/dw/@webiny/api-headless-cms-tasks.svg)](https://www.npmjs.com/package/@webiny/api-headless-cms-tasks)
3+
[![](https://img.shields.io/npm/v/@webiny/api-headless-cms-tasks.svg)](https://www.npmjs.com/package/@webiny/api-headless-cms-tasks)
4+
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
5+
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
6+
7+
## Install
8+
```
9+
npm install --save @webiny/api-headless-cms-tasks
10+
```
11+
12+
Or if you prefer yarn:
13+
```
14+
yarn add @webiny/api-headless-cms-tasks
15+
```
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
const base = require("../../jest.config.base");
2+
module.exports = base({ name: "api-headless-cms-tasks", path: __dirname }, []);
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "@webiny/api-headless-cms-tasks",
3+
"version": "0.0.0",
4+
"main": "index.js",
5+
"description": "Background tasks for Webiny Headless CMS",
6+
"keywords": [
7+
"api-headless-cms-tasks:base"
8+
],
9+
"repository": {
10+
"type": "git",
11+
"url": "https://github.com/webiny/webiny-js.git",
12+
"directory": "packages/api-headless-cms-tasks"
13+
},
14+
"license": "MIT",
15+
"dependencies": {
16+
"@webiny/api-headless-cms-bulk-actions": "0.0.0"
17+
},
18+
"devDependencies": {
19+
"@babel/cli": "^7.23.9",
20+
"@babel/core": "^7.24.0",
21+
"@webiny/cli": "0.0.0",
22+
"@webiny/project-utils": "0.0.0",
23+
"ttypescript": "^1.5.12",
24+
"typescript": "4.7.4"
25+
},
26+
"scripts": {
27+
"build": "yarn webiny run build",
28+
"watch": "yarn webiny run watch"
29+
},
30+
"publishConfig": {
31+
"access": "public",
32+
"directory": "dist"
33+
}
34+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { createHcmsBulkActions } from "@webiny/api-headless-cms-bulk-actions";
2+
3+
export const createHcmsTasks = () => [createHcmsBulkActions()];

0 commit comments

Comments
 (0)