@webiny/api-page-builder-so-ddb-es 5.20.0-beta.1 → 5.20.0-beta.2

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.
@@ -1,2 +1,3 @@
1
- import { InstallationPlugin } from "@webiny/api-page-builder/plugins/InstallationPlugin";
2
- export declare const installation: () => InstallationPlugin;
1
+ import { PbContext } from "@webiny/api-page-builder/types";
2
+ import { ContextPlugin } from "@webiny/handler/plugins/ContextPlugin";
3
+ export declare const installation: () => ContextPlugin<PbContext>;
@@ -7,16 +7,16 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.installation = void 0;
9
9
 
10
- var _InstallationPlugin = require("@webiny/api-page-builder/plugins/InstallationPlugin");
10
+ var _ContextPlugin = require("@webiny/handler/plugins/ContextPlugin");
11
11
 
12
12
  var _configurations = _interopRequireDefault(require("../configurations"));
13
13
 
14
14
  const installation = () => {
15
- return new _InstallationPlugin.InstallationPlugin({
16
- beforeInstall: async params => {
17
- const {
18
- context
19
- } = params;
15
+ return new _ContextPlugin.ContextPlugin(async context => {
16
+ /**
17
+ * Add the elasticsearch index for the page builder.
18
+ */
19
+ context.pageBuilder.onBeforeInstall.subscribe(async () => {
20
20
  const {
21
21
  elasticsearch
22
22
  } = context;
@@ -66,7 +66,7 @@ const installation = () => {
66
66
  }
67
67
  }
68
68
  });
69
- }
69
+ });
70
70
  });
71
71
  };
72
72
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/api-page-builder-so-ddb-es",
3
- "version": "5.20.0-beta.1",
3
+ "version": "5.20.0-beta.2",
4
4
  "main": "index.js",
5
5
  "keywords": [
6
6
  "@webiny/api-page-builder",
@@ -18,13 +18,13 @@
18
18
  "license": "MIT",
19
19
  "dependencies": {
20
20
  "@babel/runtime": "7.16.3",
21
- "@webiny/api-elasticsearch": "5.20.0-beta.1",
22
- "@webiny/api-page-builder": "5.20.0-beta.1",
23
- "@webiny/api-upgrade": "5.20.0-beta.1",
24
- "@webiny/db-dynamodb": "5.20.0-beta.1",
25
- "@webiny/error": "5.20.0-beta.1",
26
- "@webiny/handler-db": "5.20.0-beta.1",
27
- "@webiny/plugins": "5.20.0-beta.1",
21
+ "@webiny/api-elasticsearch": "5.20.0-beta.2",
22
+ "@webiny/api-page-builder": "5.20.0-beta.2",
23
+ "@webiny/api-upgrade": "5.20.0-beta.2",
24
+ "@webiny/db-dynamodb": "5.20.0-beta.2",
25
+ "@webiny/error": "5.20.0-beta.2",
26
+ "@webiny/handler-db": "5.20.0-beta.2",
27
+ "@webiny/plugins": "5.20.0-beta.2",
28
28
  "dataloader": "2.0.0",
29
29
  "dynamodb-toolbox": "0.3.5",
30
30
  "elastic-ts": "0.7.0",
@@ -38,14 +38,14 @@
38
38
  "@elastic/elasticsearch": "7.12.0",
39
39
  "@elastic/elasticsearch-mock": "0.3.0",
40
40
  "@shelf/jest-elasticsearch": "^1.0.0",
41
- "@webiny/api-dynamodb-to-elasticsearch": "^5.20.0-beta.1",
42
- "@webiny/api-security": "^5.20.0-beta.1",
43
- "@webiny/api-tenancy": "^5.20.0-beta.1",
44
- "@webiny/cli": "^5.20.0-beta.1",
45
- "@webiny/handler": "^5.20.0-beta.1",
46
- "@webiny/handler-aws": "^5.20.0-beta.1",
47
- "@webiny/handler-graphql": "^5.20.0-beta.1",
48
- "@webiny/project-utils": "^5.20.0-beta.1",
41
+ "@webiny/api-dynamodb-to-elasticsearch": "^5.20.0-beta.2",
42
+ "@webiny/api-security": "^5.20.0-beta.2",
43
+ "@webiny/api-tenancy": "^5.20.0-beta.2",
44
+ "@webiny/cli": "^5.20.0-beta.2",
45
+ "@webiny/handler": "^5.20.0-beta.2",
46
+ "@webiny/handler-aws": "^5.20.0-beta.2",
47
+ "@webiny/handler-graphql": "^5.20.0-beta.2",
48
+ "@webiny/project-utils": "^5.20.0-beta.2",
49
49
  "jest": "^26.6.3",
50
50
  "jest-dynalite": "^3.2.0",
51
51
  "jest-environment-node": "^27.0.6",
@@ -61,5 +61,5 @@
61
61
  "build": "yarn webiny run build",
62
62
  "watch": "yarn webiny run watch"
63
63
  },
64
- "gitHead": "40e30fb4c778d0bcc773b3b8231ce8e0861b6d52"
64
+ "gitHead": "86c73ea3b5bf71372f255aa24ee8c6ed98466b7f"
65
65
  }
@@ -23,7 +23,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
23
23
 
24
24
  const upgradeCategories = async context => {
25
25
  const tenant = context.tenancy.getCurrentTenant().id;
26
- const localeCodes = await context.i18n.getLocales().map(locale => locale.code);
26
+ const localeCodes = await context.i18n.getLocales().map(locale => locale.code); // @ts-ignore
27
+
27
28
  const categoryStorageOperations = context.pageBuilder.categories.storageOperations;
28
29
 
29
30
  if (categoryStorageOperations instanceof _CategoryStorageOperations.CategoryStorageOperationsDdbEs === false) {
@@ -23,7 +23,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
23
23
 
24
24
  const upgradeMenus = async context => {
25
25
  const tenant = context.tenancy.getCurrentTenant().id;
26
- const localeCodes = await context.i18n.getLocales().map(locale => locale.code);
26
+ const localeCodes = await context.i18n.getLocales().map(locale => locale.code); // @ts-ignore
27
+
27
28
  const menuStorageOperations = context.pageBuilder.menus.storageOperations;
28
29
 
29
30
  if (menuStorageOperations instanceof _MenuStorageOperations.MenuStorageOperationsDdbEs === false) {
@@ -23,7 +23,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
23
23
 
24
24
  const upgradePageElements = async context => {
25
25
  const tenant = context.tenancy.getCurrentTenant().id;
26
- const localeCodes = await context.i18n.getLocales().map(locale => locale.code);
26
+ const localeCodes = await context.i18n.getLocales().map(locale => locale.code); // @ts-ignore
27
+
27
28
  const pageElementsStorageOperations = context.pageBuilder.pageElements.storageOperations;
28
29
 
29
30
  if (pageElementsStorageOperations instanceof _PageElementStorageOperations.PageElementStorageOperationsDdbEs === false) {