@webiny/api-page-builder-so-ddb-es 0.0.0-ee-vpcs.549378cf03
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/LICENSE +21 -0
- package/README.md +30 -0
- package/configurations.d.ts +9 -0
- package/configurations.js +49 -0
- package/configurations.js.map +1 -0
- package/definitions/blockCategoryEntity.d.ts +9 -0
- package/definitions/blockCategoryEntity.js +61 -0
- package/definitions/blockCategoryEntity.js.map +1 -0
- package/definitions/categoryEntity.d.ts +9 -0
- package/definitions/categoryEntity.js +61 -0
- package/definitions/categoryEntity.js.map +1 -0
- package/definitions/menuEntity.d.ts +9 -0
- package/definitions/menuEntity.js +61 -0
- package/definitions/menuEntity.js.map +1 -0
- package/definitions/pageBlockEntity.d.ts +9 -0
- package/definitions/pageBlockEntity.js +64 -0
- package/definitions/pageBlockEntity.js.map +1 -0
- package/definitions/pageElasticsearchEntity.d.ts +9 -0
- package/definitions/pageElasticsearchEntity.js +40 -0
- package/definitions/pageElasticsearchEntity.js.map +1 -0
- package/definitions/pageElementEntity.d.ts +9 -0
- package/definitions/pageElementEntity.js +67 -0
- package/definitions/pageElementEntity.js.map +1 -0
- package/definitions/pageEntity.d.ts +9 -0
- package/definitions/pageEntity.js +97 -0
- package/definitions/pageEntity.js.map +1 -0
- package/definitions/settingsEntity.d.ts +9 -0
- package/definitions/settingsEntity.js +77 -0
- package/definitions/settingsEntity.js.map +1 -0
- package/definitions/systemEntity.d.ts +9 -0
- package/definitions/systemEntity.js +40 -0
- package/definitions/systemEntity.js.map +1 -0
- package/definitions/table.d.ts +9 -0
- package/definitions/table.js +24 -0
- package/definitions/table.js.map +1 -0
- package/definitions/tableElasticsearch.d.ts +9 -0
- package/definitions/tableElasticsearch.js +24 -0
- package/definitions/tableElasticsearch.js.map +1 -0
- package/elasticsearch/createElasticsearchIndex.d.ts +9 -0
- package/elasticsearch/createElasticsearchIndex.js +60 -0
- package/elasticsearch/createElasticsearchIndex.js.map +1 -0
- package/elasticsearch/indices/base.d.ts +2 -0
- package/elasticsearch/indices/base.js +15 -0
- package/elasticsearch/indices/base.js.map +1 -0
- package/elasticsearch/indices/index.d.ts +1 -0
- package/elasticsearch/indices/index.js +16 -0
- package/elasticsearch/indices/index.js.map +1 -0
- package/elasticsearch/indices/japanese.d.ts +2 -0
- package/elasticsearch/indices/japanese.js +16 -0
- package/elasticsearch/indices/japanese.js.map +1 -0
- package/index.d.ts +2 -0
- package/index.js +233 -0
- package/index.js.map +1 -0
- package/operations/blockCategory/dataLoader.d.ts +16 -0
- package/operations/blockCategory/dataLoader.js +79 -0
- package/operations/blockCategory/dataLoader.js.map +1 -0
- package/operations/blockCategory/fields.d.ts +2 -0
- package/operations/blockCategory/fields.js +28 -0
- package/operations/blockCategory/fields.js.map +1 -0
- package/operations/blockCategory/index.d.ts +8 -0
- package/operations/blockCategory/index.js +208 -0
- package/operations/blockCategory/index.js.map +1 -0
- package/operations/blockCategory/keys.d.ts +9 -0
- package/operations/blockCategory/keys.js +25 -0
- package/operations/blockCategory/keys.js.map +1 -0
- package/operations/category/dataLoader.d.ts +16 -0
- package/operations/category/dataLoader.js +79 -0
- package/operations/category/dataLoader.js.map +1 -0
- package/operations/category/fields.d.ts +2 -0
- package/operations/category/fields.js +28 -0
- package/operations/category/fields.js.map +1 -0
- package/operations/category/index.d.ts +8 -0
- package/operations/category/index.js +208 -0
- package/operations/category/index.js.map +1 -0
- package/operations/category/keys.d.ts +9 -0
- package/operations/category/keys.js +25 -0
- package/operations/category/keys.js.map +1 -0
- package/operations/menu/fields.d.ts +2 -0
- package/operations/menu/fields.js +27 -0
- package/operations/menu/fields.js.map +1 -0
- package/operations/menu/index.d.ts +8 -0
- package/operations/menu/index.js +217 -0
- package/operations/menu/index.js.map +1 -0
- package/operations/pageBlock/dataLoader.d.ts +16 -0
- package/operations/pageBlock/dataLoader.js +79 -0
- package/operations/pageBlock/dataLoader.js.map +1 -0
- package/operations/pageBlock/fields.d.ts +2 -0
- package/operations/pageBlock/fields.js +25 -0
- package/operations/pageBlock/fields.js.map +1 -0
- package/operations/pageBlock/index.d.ts +8 -0
- package/operations/pageBlock/index.js +208 -0
- package/operations/pageBlock/index.js.map +1 -0
- package/operations/pageBlock/keys.d.ts +9 -0
- package/operations/pageBlock/keys.js +25 -0
- package/operations/pageBlock/keys.js.map +1 -0
- package/operations/pageElement/fields.d.ts +2 -0
- package/operations/pageElement/fields.js +19 -0
- package/operations/pageElement/fields.js.map +1 -0
- package/operations/pageElement/index.d.ts +8 -0
- package/operations/pageElement/index.js +207 -0
- package/operations/pageElement/index.js.map +1 -0
- package/operations/pages/elasticsearchQueryBody.d.ts +12 -0
- package/operations/pages/elasticsearchQueryBody.js +237 -0
- package/operations/pages/elasticsearchQueryBody.js.map +1 -0
- package/operations/pages/fields.d.ts +4 -0
- package/operations/pages/fields.js +54 -0
- package/operations/pages/fields.js.map +1 -0
- package/operations/pages/helpers.d.ts +35 -0
- package/operations/pages/helpers.js +83 -0
- package/operations/pages/helpers.js.map +1 -0
- package/operations/pages/index.d.ts +11 -0
- package/operations/pages/index.js +829 -0
- package/operations/pages/index.js.map +1 -0
- package/operations/pages/keys.d.ts +24 -0
- package/operations/pages/keys.js +79 -0
- package/operations/pages/keys.js.map +1 -0
- package/operations/settings/index.d.ts +6 -0
- package/operations/settings/index.js +178 -0
- package/operations/settings/index.js.map +1 -0
- package/operations/system/index.d.ts +6 -0
- package/operations/system/index.js +104 -0
- package/operations/system/index.js.map +1 -0
- package/package.json +65 -0
- package/plugins/definitions/BlockCategoryDynamoDbElasticFieldPlugin.d.ts +4 -0
- package/plugins/definitions/BlockCategoryDynamoDbElasticFieldPlugin.js +17 -0
- package/plugins/definitions/BlockCategoryDynamoDbElasticFieldPlugin.js.map +1 -0
- package/plugins/definitions/CategoryDynamoDbElasticFieldPlugin.d.ts +4 -0
- package/plugins/definitions/CategoryDynamoDbElasticFieldPlugin.js +17 -0
- package/plugins/definitions/CategoryDynamoDbElasticFieldPlugin.js.map +1 -0
- package/plugins/definitions/IndexPageDataPlugin.d.ts +17 -0
- package/plugins/definitions/IndexPageDataPlugin.js +32 -0
- package/plugins/definitions/IndexPageDataPlugin.js.map +1 -0
- package/plugins/definitions/MenuDynamoDbElasticFieldPlugin.d.ts +4 -0
- package/plugins/definitions/MenuDynamoDbElasticFieldPlugin.js +17 -0
- package/plugins/definitions/MenuDynamoDbElasticFieldPlugin.js.map +1 -0
- package/plugins/definitions/PageBlockDynamoDbFieldPlugin.d.ts +4 -0
- package/plugins/definitions/PageBlockDynamoDbFieldPlugin.js +17 -0
- package/plugins/definitions/PageBlockDynamoDbFieldPlugin.js.map +1 -0
- package/plugins/definitions/PageDynamoDbElasticsearchFieldPlugin.d.ts +4 -0
- package/plugins/definitions/PageDynamoDbElasticsearchFieldPlugin.js +17 -0
- package/plugins/definitions/PageDynamoDbElasticsearchFieldPlugin.js.map +1 -0
- package/plugins/definitions/PageElasticsearchBodyModifierPlugin.d.ts +4 -0
- package/plugins/definitions/PageElasticsearchBodyModifierPlugin.js +17 -0
- package/plugins/definitions/PageElasticsearchBodyModifierPlugin.js.map +1 -0
- package/plugins/definitions/PageElasticsearchFieldPlugin.d.ts +4 -0
- package/plugins/definitions/PageElasticsearchFieldPlugin.js +17 -0
- package/plugins/definitions/PageElasticsearchFieldPlugin.js.map +1 -0
- package/plugins/definitions/PageElasticsearchIndexPlugin.d.ts +4 -0
- package/plugins/definitions/PageElasticsearchIndexPlugin.js +17 -0
- package/plugins/definitions/PageElasticsearchIndexPlugin.js.map +1 -0
- package/plugins/definitions/PageElasticsearchQueryModifierPlugin.d.ts +4 -0
- package/plugins/definitions/PageElasticsearchQueryModifierPlugin.js +17 -0
- package/plugins/definitions/PageElasticsearchQueryModifierPlugin.js.map +1 -0
- package/plugins/definitions/PageElasticsearchSortModifierPlugin.d.ts +4 -0
- package/plugins/definitions/PageElasticsearchSortModifierPlugin.js +17 -0
- package/plugins/definitions/PageElasticsearchSortModifierPlugin.js.map +1 -0
- package/plugins/definitions/PageElementDynamoDbElasticFieldPlugin.d.ts +4 -0
- package/plugins/definitions/PageElementDynamoDbElasticFieldPlugin.js +17 -0
- package/plugins/definitions/PageElementDynamoDbElasticFieldPlugin.js.map +1 -0
- package/plugins/definitions/SearchLatestPagesPlugin.d.ts +4 -0
- package/plugins/definitions/SearchLatestPagesPlugin.js +17 -0
- package/plugins/definitions/SearchLatestPagesPlugin.js.map +1 -0
- package/plugins/definitions/SearchPagesPlugin.d.ts +23 -0
- package/plugins/definitions/SearchPagesPlugin.js +39 -0
- package/plugins/definitions/SearchPagesPlugin.js.map +1 -0
- package/plugins/definitions/SearchPublishedPagesPlugin.d.ts +4 -0
- package/plugins/definitions/SearchPublishedPagesPlugin.js +17 -0
- package/plugins/definitions/SearchPublishedPagesPlugin.js.map +1 -0
- package/types.d.ts +39 -0
- package/types.js +20 -0
- package/types.js.map +1 -0
- package/upgrades/index.d.ts +2 -0
- package/upgrades/index.js +14 -0
- package/upgrades/index.js.map +1 -0
- package/upgrades/v5.15.0/category.d.ts +2 -0
- package/upgrades/v5.15.0/category.js +73 -0
- package/upgrades/v5.15.0/category.js.map +1 -0
- package/upgrades/v5.15.0/index.d.ts +4 -0
- package/upgrades/v5.15.0/index.js +52 -0
- package/upgrades/v5.15.0/index.js.map +1 -0
- package/upgrades/v5.15.0/menu.d.ts +2 -0
- package/upgrades/v5.15.0/menu.js +73 -0
- package/upgrades/v5.15.0/menu.js.map +1 -0
- package/upgrades/v5.15.0/pageElement.d.ts +2 -0
- package/upgrades/v5.15.0/pageElement.js +73 -0
- package/upgrades/v5.15.0/pageElement.js.map +1 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.createPageEntity = void 0;
|
|
9
|
+
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
|
+
|
|
12
|
+
var _dynamodbToolbox = require("dynamodb-toolbox");
|
|
13
|
+
|
|
14
|
+
const createPageEntity = params => {
|
|
15
|
+
const {
|
|
16
|
+
entityName,
|
|
17
|
+
attributes,
|
|
18
|
+
table
|
|
19
|
+
} = params;
|
|
20
|
+
return new _dynamodbToolbox.Entity({
|
|
21
|
+
name: entityName,
|
|
22
|
+
table,
|
|
23
|
+
attributes: (0, _objectSpread2.default)({
|
|
24
|
+
PK: {
|
|
25
|
+
partitionKey: true
|
|
26
|
+
},
|
|
27
|
+
SK: {
|
|
28
|
+
sortKey: true
|
|
29
|
+
},
|
|
30
|
+
TYPE: {
|
|
31
|
+
type: "string"
|
|
32
|
+
},
|
|
33
|
+
id: {
|
|
34
|
+
type: "string"
|
|
35
|
+
},
|
|
36
|
+
pid: {
|
|
37
|
+
type: "string"
|
|
38
|
+
},
|
|
39
|
+
tenant: {
|
|
40
|
+
type: "string"
|
|
41
|
+
},
|
|
42
|
+
locale: {
|
|
43
|
+
type: "string"
|
|
44
|
+
},
|
|
45
|
+
title: {
|
|
46
|
+
type: "string"
|
|
47
|
+
},
|
|
48
|
+
editor: {
|
|
49
|
+
type: "string"
|
|
50
|
+
},
|
|
51
|
+
createdFrom: {
|
|
52
|
+
type: "string"
|
|
53
|
+
},
|
|
54
|
+
path: {
|
|
55
|
+
type: "string"
|
|
56
|
+
},
|
|
57
|
+
category: {
|
|
58
|
+
type: "string"
|
|
59
|
+
},
|
|
60
|
+
content: {
|
|
61
|
+
type: "map"
|
|
62
|
+
},
|
|
63
|
+
publishedOn: {
|
|
64
|
+
type: "string"
|
|
65
|
+
},
|
|
66
|
+
version: {
|
|
67
|
+
type: "number"
|
|
68
|
+
},
|
|
69
|
+
settings: {
|
|
70
|
+
type: "map"
|
|
71
|
+
},
|
|
72
|
+
locked: {
|
|
73
|
+
type: "boolean"
|
|
74
|
+
},
|
|
75
|
+
status: {
|
|
76
|
+
type: "string"
|
|
77
|
+
},
|
|
78
|
+
createdOn: {
|
|
79
|
+
type: "string"
|
|
80
|
+
},
|
|
81
|
+
savedOn: {
|
|
82
|
+
type: "string"
|
|
83
|
+
},
|
|
84
|
+
createdBy: {
|
|
85
|
+
type: "map"
|
|
86
|
+
},
|
|
87
|
+
ownedBy: {
|
|
88
|
+
type: "map"
|
|
89
|
+
},
|
|
90
|
+
webinyVersion: {
|
|
91
|
+
type: "string"
|
|
92
|
+
}
|
|
93
|
+
}, attributes || {})
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
exports.createPageEntity = createPageEntity;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createPageEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","id","pid","tenant","locale","title","editor","createdFrom","path","category","content","publishedOn","version","settings","locked","status","createdOn","savedOn","createdBy","ownedBy","webinyVersion"],"sources":["pageEntity.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createPageEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n id: {\n type: \"string\"\n },\n pid: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n title: {\n type: \"string\"\n },\n editor: {\n type: \"string\"\n },\n createdFrom: {\n type: \"string\"\n },\n path: {\n type: \"string\"\n },\n category: {\n type: \"string\"\n },\n content: {\n type: \"map\"\n },\n publishedOn: {\n type: \"string\"\n },\n version: {\n type: \"number\"\n },\n settings: {\n type: \"map\"\n },\n locked: {\n type: \"boolean\"\n },\n status: {\n type: \"string\"\n },\n createdOn: {\n type: \"string\"\n },\n savedOn: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n ownedBy: {\n type: \"map\"\n },\n webinyVersion: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AASO,MAAMA,gBAAgB,GAAIC,MAAD,IAAiC;EAC7D,MAAM;IAAEC,UAAF;IAAcC,UAAd;IAA0BC;EAA1B,IAAoCH,MAA1C;EACA,OAAO,IAAII,uBAAJ,CAAW;IACdC,IAAI,EAAEJ,UADQ;IAEdE,KAFc;IAGdD,UAAU;MACNI,EAAE,EAAE;QACAC,YAAY,EAAE;MADd,CADE;MAINC,EAAE,EAAE;QACAC,OAAO,EAAE;MADT,CAJE;MAONC,IAAI,EAAE;QACFC,IAAI,EAAE;MADJ,CAPA;MAUNC,EAAE,EAAE;QACAD,IAAI,EAAE;MADN,CAVE;MAaNE,GAAG,EAAE;QACDF,IAAI,EAAE;MADL,CAbC;MAgBNG,MAAM,EAAE;QACJH,IAAI,EAAE;MADF,CAhBF;MAmBNI,MAAM,EAAE;QACJJ,IAAI,EAAE;MADF,CAnBF;MAsBNK,KAAK,EAAE;QACHL,IAAI,EAAE;MADH,CAtBD;MAyBNM,MAAM,EAAE;QACJN,IAAI,EAAE;MADF,CAzBF;MA4BNO,WAAW,EAAE;QACTP,IAAI,EAAE;MADG,CA5BP;MA+BNQ,IAAI,EAAE;QACFR,IAAI,EAAE;MADJ,CA/BA;MAkCNS,QAAQ,EAAE;QACNT,IAAI,EAAE;MADA,CAlCJ;MAqCNU,OAAO,EAAE;QACLV,IAAI,EAAE;MADD,CArCH;MAwCNW,WAAW,EAAE;QACTX,IAAI,EAAE;MADG,CAxCP;MA2CNY,OAAO,EAAE;QACLZ,IAAI,EAAE;MADD,CA3CH;MA8CNa,QAAQ,EAAE;QACNb,IAAI,EAAE;MADA,CA9CJ;MAiDNc,MAAM,EAAE;QACJd,IAAI,EAAE;MADF,CAjDF;MAoDNe,MAAM,EAAE;QACJf,IAAI,EAAE;MADF,CApDF;MAuDNgB,SAAS,EAAE;QACPhB,IAAI,EAAE;MADC,CAvDL;MA0DNiB,OAAO,EAAE;QACLjB,IAAI,EAAE;MADD,CA1DH;MA6DNkB,SAAS,EAAE;QACPlB,IAAI,EAAE;MADC,CA7DL;MAgENmB,OAAO,EAAE;QACLnB,IAAI,EAAE;MADD,CAhEH;MAmENoB,aAAa,EAAE;QACXpB,IAAI,EAAE;MADK;IAnET,GAsEFT,UAAU,IAAI,EAtEZ;EAHI,CAAX,CAAP;AA4EH,CA9EM"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Entity, Table } from "dynamodb-toolbox";
|
|
2
|
+
import { Attributes } from "../types";
|
|
3
|
+
interface Params {
|
|
4
|
+
table: Table;
|
|
5
|
+
entityName: string;
|
|
6
|
+
attributes: Attributes;
|
|
7
|
+
}
|
|
8
|
+
export declare const createSettingsEntity: (params: Params) => Entity<any>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.createSettingsEntity = void 0;
|
|
9
|
+
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
|
+
|
|
12
|
+
var _dynamodbToolbox = require("dynamodb-toolbox");
|
|
13
|
+
|
|
14
|
+
const createSettingsEntity = params => {
|
|
15
|
+
const {
|
|
16
|
+
entityName,
|
|
17
|
+
table,
|
|
18
|
+
attributes
|
|
19
|
+
} = params;
|
|
20
|
+
return new _dynamodbToolbox.Entity({
|
|
21
|
+
name: entityName,
|
|
22
|
+
table,
|
|
23
|
+
attributes: (0, _objectSpread2.default)({
|
|
24
|
+
PK: {
|
|
25
|
+
partitionKey: true
|
|
26
|
+
},
|
|
27
|
+
SK: {
|
|
28
|
+
sortKey: true
|
|
29
|
+
},
|
|
30
|
+
name: {
|
|
31
|
+
type: "string"
|
|
32
|
+
},
|
|
33
|
+
websiteUrl: {
|
|
34
|
+
type: "string"
|
|
35
|
+
},
|
|
36
|
+
websitePreviewUrl: {
|
|
37
|
+
type: "string"
|
|
38
|
+
},
|
|
39
|
+
favicon: {
|
|
40
|
+
type: "map"
|
|
41
|
+
},
|
|
42
|
+
logo: {
|
|
43
|
+
type: "map"
|
|
44
|
+
},
|
|
45
|
+
prerendering: {
|
|
46
|
+
type: "map"
|
|
47
|
+
},
|
|
48
|
+
social: {
|
|
49
|
+
type: "map"
|
|
50
|
+
},
|
|
51
|
+
htmlTags: {
|
|
52
|
+
type: "map"
|
|
53
|
+
},
|
|
54
|
+
pages: {
|
|
55
|
+
type: "map"
|
|
56
|
+
},
|
|
57
|
+
type: {
|
|
58
|
+
type: "string"
|
|
59
|
+
},
|
|
60
|
+
tenant: {
|
|
61
|
+
type: "string"
|
|
62
|
+
},
|
|
63
|
+
locale: {
|
|
64
|
+
type: "string"
|
|
65
|
+
},
|
|
66
|
+
TYPE: {
|
|
67
|
+
type: "string"
|
|
68
|
+
},
|
|
69
|
+
// TODO: implement this via a plugin when https://github.com/webiny/webiny-js/issues/2169 is resolved.
|
|
70
|
+
theme: {
|
|
71
|
+
type: "string"
|
|
72
|
+
}
|
|
73
|
+
}, attributes || {})
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
exports.createSettingsEntity = createSettingsEntity;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createSettingsEntity","params","entityName","table","attributes","Entity","name","PK","partitionKey","SK","sortKey","type","websiteUrl","websitePreviewUrl","favicon","logo","prerendering","social","htmlTags","pages","tenant","locale","TYPE","theme"],"sources":["settingsEntity.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createSettingsEntity = (params: Params): Entity<any> => {\n const { entityName, table, attributes } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n name: {\n type: \"string\"\n },\n websiteUrl: {\n type: \"string\"\n },\n websitePreviewUrl: {\n type: \"string\"\n },\n favicon: {\n type: \"map\"\n },\n logo: {\n type: \"map\"\n },\n prerendering: {\n type: \"map\"\n },\n social: {\n type: \"map\"\n },\n htmlTags: {\n type: \"map\"\n },\n pages: {\n type: \"map\"\n },\n type: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n TYPE: {\n type: \"string\"\n },\n // TODO: implement this via a plugin when https://github.com/webiny/webiny-js/issues/2169 is resolved.\n theme: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AASO,MAAMA,oBAAoB,GAAIC,MAAD,IAAiC;EACjE,MAAM;IAAEC,UAAF;IAAcC,KAAd;IAAqBC;EAArB,IAAoCH,MAA1C;EACA,OAAO,IAAII,uBAAJ,CAAW;IACdC,IAAI,EAAEJ,UADQ;IAEdC,KAFc;IAGdC,UAAU;MACNG,EAAE,EAAE;QACAC,YAAY,EAAE;MADd,CADE;MAINC,EAAE,EAAE;QACAC,OAAO,EAAE;MADT,CAJE;MAONJ,IAAI,EAAE;QACFK,IAAI,EAAE;MADJ,CAPA;MAUNC,UAAU,EAAE;QACRD,IAAI,EAAE;MADE,CAVN;MAaNE,iBAAiB,EAAE;QACfF,IAAI,EAAE;MADS,CAbb;MAgBNG,OAAO,EAAE;QACLH,IAAI,EAAE;MADD,CAhBH;MAmBNI,IAAI,EAAE;QACFJ,IAAI,EAAE;MADJ,CAnBA;MAsBNK,YAAY,EAAE;QACVL,IAAI,EAAE;MADI,CAtBR;MAyBNM,MAAM,EAAE;QACJN,IAAI,EAAE;MADF,CAzBF;MA4BNO,QAAQ,EAAE;QACNP,IAAI,EAAE;MADA,CA5BJ;MA+BNQ,KAAK,EAAE;QACHR,IAAI,EAAE;MADH,CA/BD;MAkCNA,IAAI,EAAE;QACFA,IAAI,EAAE;MADJ,CAlCA;MAqCNS,MAAM,EAAE;QACJT,IAAI,EAAE;MADF,CArCF;MAwCNU,MAAM,EAAE;QACJV,IAAI,EAAE;MADF,CAxCF;MA2CNW,IAAI,EAAE;QACFX,IAAI,EAAE;MADJ,CA3CA;MA8CN;MACAY,KAAK,EAAE;QACHZ,IAAI,EAAE;MADH;IA/CD,GAkDFP,UAAU,IAAI,EAlDZ;EAHI,CAAX,CAAP;AAwDH,CA1DM"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Entity, Table } from "dynamodb-toolbox";
|
|
2
|
+
import { Attributes } from "../types";
|
|
3
|
+
interface Params {
|
|
4
|
+
table: Table;
|
|
5
|
+
entityName: string;
|
|
6
|
+
attributes: Attributes;
|
|
7
|
+
}
|
|
8
|
+
export declare const createSystemEntity: (params: Params) => Entity<any>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.createSystemEntity = void 0;
|
|
9
|
+
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
|
+
|
|
12
|
+
var _dynamodbToolbox = require("dynamodb-toolbox");
|
|
13
|
+
|
|
14
|
+
const createSystemEntity = params => {
|
|
15
|
+
const {
|
|
16
|
+
entityName,
|
|
17
|
+
attributes,
|
|
18
|
+
table
|
|
19
|
+
} = params;
|
|
20
|
+
return new _dynamodbToolbox.Entity({
|
|
21
|
+
name: entityName,
|
|
22
|
+
table,
|
|
23
|
+
attributes: (0, _objectSpread2.default)({
|
|
24
|
+
PK: {
|
|
25
|
+
partitionKey: true
|
|
26
|
+
},
|
|
27
|
+
SK: {
|
|
28
|
+
sortKey: true
|
|
29
|
+
},
|
|
30
|
+
version: {
|
|
31
|
+
type: "string"
|
|
32
|
+
},
|
|
33
|
+
tenant: {
|
|
34
|
+
type: "string"
|
|
35
|
+
}
|
|
36
|
+
}, attributes || {})
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
exports.createSystemEntity = createSystemEntity;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createSystemEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","version","type","tenant"],"sources":["systemEntity.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createSystemEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n version: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AASO,MAAMA,kBAAkB,GAAIC,MAAD,IAAiC;EAC/D,MAAM;IAAEC,UAAF;IAAcC,UAAd;IAA0BC;EAA1B,IAAoCH,MAA1C;EACA,OAAO,IAAII,uBAAJ,CAAW;IACdC,IAAI,EAAEJ,UADQ;IAEdE,KAFc;IAGdD,UAAU;MACNI,EAAE,EAAE;QACAC,YAAY,EAAE;MADd,CADE;MAINC,EAAE,EAAE;QACAC,OAAO,EAAE;MADT,CAJE;MAONC,OAAO,EAAE;QACLC,IAAI,EAAE;MADD,CAPH;MAUNC,MAAM,EAAE;QACJD,IAAI,EAAE;MADF;IAVF,GAaFT,UAAU,IAAI,EAbZ;EAHI,CAAX,CAAP;AAmBH,CArBM"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TableModifier } from "../types";
|
|
2
|
+
import { DocumentClient } from "aws-sdk/clients/dynamodb";
|
|
3
|
+
import { Table } from "dynamodb-toolbox";
|
|
4
|
+
interface Params {
|
|
5
|
+
table?: TableModifier;
|
|
6
|
+
documentClient: DocumentClient;
|
|
7
|
+
}
|
|
8
|
+
export declare const createTable: ({ table, documentClient }: Params) => Table;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createTable = void 0;
|
|
7
|
+
|
|
8
|
+
var _dynamodbToolbox = require("dynamodb-toolbox");
|
|
9
|
+
|
|
10
|
+
const createTable = ({
|
|
11
|
+
table,
|
|
12
|
+
documentClient
|
|
13
|
+
}) => {
|
|
14
|
+
const tableConfig = {
|
|
15
|
+
name: process.env.DB_PAGE_BUILDER || process.env.DB_TABLE,
|
|
16
|
+
partitionKey: "PK",
|
|
17
|
+
sortKey: "SK",
|
|
18
|
+
DocumentClient: documentClient
|
|
19
|
+
};
|
|
20
|
+
const config = typeof table === "function" ? table(tableConfig) : tableConfig;
|
|
21
|
+
return new _dynamodbToolbox.Table(config);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
exports.createTable = createTable;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createTable","table","documentClient","tableConfig","name","process","env","DB_PAGE_BUILDER","DB_TABLE","partitionKey","sortKey","DocumentClient","config","Table"],"sources":["table.ts"],"sourcesContent":["import { TableModifier } from \"~/types\";\nimport { DocumentClient } from \"aws-sdk/clients/dynamodb\";\nimport { Table } from \"dynamodb-toolbox\";\nimport { TableConstructor } from \"dynamodb-toolbox/dist/classes/Table\";\n\ninterface Params {\n table?: TableModifier;\n documentClient: DocumentClient;\n}\nexport const createTable = ({ table, documentClient }: Params): Table => {\n const tableConfig: TableConstructor = {\n name: process.env.DB_PAGE_BUILDER || (process.env.DB_TABLE as string),\n partitionKey: \"PK\",\n sortKey: \"SK\",\n DocumentClient: documentClient\n };\n\n const config = typeof table === \"function\" ? table(tableConfig) : tableConfig;\n\n return new Table(config);\n};\n"],"mappings":";;;;;;;AAEA;;AAOO,MAAMA,WAAW,GAAG,CAAC;EAAEC,KAAF;EAASC;AAAT,CAAD,KAA8C;EACrE,MAAMC,WAA6B,GAAG;IAClCC,IAAI,EAAEC,OAAO,CAACC,GAAR,CAAYC,eAAZ,IAAgCF,OAAO,CAACC,GAAR,CAAYE,QADhB;IAElCC,YAAY,EAAE,IAFoB;IAGlCC,OAAO,EAAE,IAHyB;IAIlCC,cAAc,EAAET;EAJkB,CAAtC;EAOA,MAAMU,MAAM,GAAG,OAAOX,KAAP,KAAiB,UAAjB,GAA8BA,KAAK,CAACE,WAAD,CAAnC,GAAmDA,WAAlE;EAEA,OAAO,IAAIU,sBAAJ,CAAUD,MAAV,CAAP;AACH,CAXM"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TableModifier } from "../types";
|
|
2
|
+
import { DocumentClient } from "aws-sdk/clients/dynamodb";
|
|
3
|
+
import { Table } from "dynamodb-toolbox";
|
|
4
|
+
interface Params {
|
|
5
|
+
table?: TableModifier;
|
|
6
|
+
documentClient: DocumentClient;
|
|
7
|
+
}
|
|
8
|
+
export declare const createElasticsearchTable: ({ table, documentClient }: Params) => Table;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createElasticsearchTable = void 0;
|
|
7
|
+
|
|
8
|
+
var _dynamodbToolbox = require("dynamodb-toolbox");
|
|
9
|
+
|
|
10
|
+
const createElasticsearchTable = ({
|
|
11
|
+
table,
|
|
12
|
+
documentClient
|
|
13
|
+
}) => {
|
|
14
|
+
const tableConfig = {
|
|
15
|
+
name: process.env.DB_TABLE_ELASTICSEARCH,
|
|
16
|
+
partitionKey: "PK",
|
|
17
|
+
sortKey: "SK",
|
|
18
|
+
DocumentClient: documentClient
|
|
19
|
+
};
|
|
20
|
+
const config = typeof table === "function" ? table(tableConfig) : tableConfig;
|
|
21
|
+
return new _dynamodbToolbox.Table(config);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
exports.createElasticsearchTable = createElasticsearchTable;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createElasticsearchTable","table","documentClient","tableConfig","name","process","env","DB_TABLE_ELASTICSEARCH","partitionKey","sortKey","DocumentClient","config","Table"],"sources":["tableElasticsearch.ts"],"sourcesContent":["import { TableModifier } from \"~/types\";\nimport { DocumentClient } from \"aws-sdk/clients/dynamodb\";\nimport { Table } from \"dynamodb-toolbox\";\nimport { TableConstructor } from \"dynamodb-toolbox/dist/classes/Table\";\n\ninterface Params {\n table?: TableModifier;\n documentClient: DocumentClient;\n}\nexport const createElasticsearchTable = ({ table, documentClient }: Params): Table => {\n const tableConfig: TableConstructor = {\n name: process.env.DB_TABLE_ELASTICSEARCH as string,\n partitionKey: \"PK\",\n sortKey: \"SK\",\n DocumentClient: documentClient\n };\n\n const config = typeof table === \"function\" ? table(tableConfig) : tableConfig;\n\n return new Table(config);\n};\n"],"mappings":";;;;;;;AAEA;;AAOO,MAAMA,wBAAwB,GAAG,CAAC;EAAEC,KAAF;EAASC;AAAT,CAAD,KAA8C;EAClF,MAAMC,WAA6B,GAAG;IAClCC,IAAI,EAAEC,OAAO,CAACC,GAAR,CAAYC,sBADgB;IAElCC,YAAY,EAAE,IAFoB;IAGlCC,OAAO,EAAE,IAHyB;IAIlCC,cAAc,EAAER;EAJkB,CAAtC;EAOA,MAAMS,MAAM,GAAG,OAAOV,KAAP,KAAiB,UAAjB,GAA8BA,KAAK,CAACE,WAAD,CAAnC,GAAmDA,WAAlE;EAEA,OAAO,IAAIS,sBAAJ,CAAUD,MAAV,CAAP;AACH,CAXM"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Client } from "@elastic/elasticsearch";
|
|
2
|
+
import { PluginsContainer } from "@webiny/plugins";
|
|
3
|
+
export interface ExecOnBeforeInstallParams {
|
|
4
|
+
elasticsearch: Client;
|
|
5
|
+
plugins: PluginsContainer;
|
|
6
|
+
tenant: string;
|
|
7
|
+
locale: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const createElasticsearchIndex: (params: ExecOnBeforeInstallParams) => Promise<void>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.createElasticsearchIndex = void 0;
|
|
9
|
+
|
|
10
|
+
var _error = _interopRequireDefault(require("@webiny/error"));
|
|
11
|
+
|
|
12
|
+
var _apiElasticsearch = require("@webiny/api-elasticsearch");
|
|
13
|
+
|
|
14
|
+
var _PageElasticsearchIndexPlugin = require("../plugins/definitions/PageElasticsearchIndexPlugin");
|
|
15
|
+
|
|
16
|
+
var _configurations = require("../configurations");
|
|
17
|
+
|
|
18
|
+
const createElasticsearchIndex = async params => {
|
|
19
|
+
const {
|
|
20
|
+
elasticsearch,
|
|
21
|
+
plugins: container,
|
|
22
|
+
locale,
|
|
23
|
+
tenant
|
|
24
|
+
} = params;
|
|
25
|
+
const plugin = (0, _apiElasticsearch.getLastAddedIndexPlugin)({
|
|
26
|
+
container,
|
|
27
|
+
type: _PageElasticsearchIndexPlugin.PageElasticsearchIndexPlugin.type,
|
|
28
|
+
locale
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const {
|
|
32
|
+
index
|
|
33
|
+
} = _configurations.configurations.es({
|
|
34
|
+
locale,
|
|
35
|
+
tenant
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
try {
|
|
39
|
+
const response = await elasticsearch.indices.exists({
|
|
40
|
+
index
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
if (response.body) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
await elasticsearch.indices.create({
|
|
48
|
+
index,
|
|
49
|
+
body: plugin.body
|
|
50
|
+
});
|
|
51
|
+
} catch (ex) {
|
|
52
|
+
throw new _error.default(ex.message || "Could not create Elasticsearch index template for the Page Builder Pages.", ex.code || "PB_ELASTICSEARCH_TEMPLATE_ERROR", {
|
|
53
|
+
error: ex,
|
|
54
|
+
locale,
|
|
55
|
+
body: plugin.body
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
exports.createElasticsearchIndex = createElasticsearchIndex;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createElasticsearchIndex","params","elasticsearch","plugins","container","locale","tenant","plugin","getLastAddedIndexPlugin","type","PageElasticsearchIndexPlugin","index","configurations","es","response","indices","exists","body","create","ex","WebinyError","message","code","error"],"sources":["createElasticsearchIndex.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport { Client } from \"@elastic/elasticsearch\";\nimport { getLastAddedIndexPlugin } from \"@webiny/api-elasticsearch\";\nimport { PluginsContainer } from \"@webiny/plugins\";\nimport { PageElasticsearchIndexPlugin } from \"~/plugins/definitions/PageElasticsearchIndexPlugin\";\nimport { configurations } from \"~/configurations\";\n\nexport interface ExecOnBeforeInstallParams {\n elasticsearch: Client;\n plugins: PluginsContainer;\n tenant: string;\n locale: string;\n}\nexport const createElasticsearchIndex = async (\n params: ExecOnBeforeInstallParams\n): Promise<void> => {\n const { elasticsearch, plugins: container, locale, tenant } = params;\n\n const plugin = getLastAddedIndexPlugin<PageElasticsearchIndexPlugin>({\n container,\n type: PageElasticsearchIndexPlugin.type,\n locale\n });\n\n const { index } = configurations.es({\n locale,\n tenant\n });\n\n try {\n const response = await elasticsearch.indices.exists({\n index\n });\n if (response.body) {\n return;\n }\n await elasticsearch.indices.create({\n index,\n body: plugin.body\n });\n } catch (ex) {\n throw new WebinyError(\n ex.message ||\n \"Could not create Elasticsearch index template for the Page Builder Pages.\",\n ex.code || \"PB_ELASTICSEARCH_TEMPLATE_ERROR\",\n {\n error: ex,\n locale,\n body: plugin.body\n }\n );\n }\n};\n"],"mappings":";;;;;;;;;AAAA;;AAEA;;AAEA;;AACA;;AAQO,MAAMA,wBAAwB,GAAG,MACpCC,MADoC,IAEpB;EAChB,MAAM;IAAEC,aAAF;IAAiBC,OAAO,EAAEC,SAA1B;IAAqCC,MAArC;IAA6CC;EAA7C,IAAwDL,MAA9D;EAEA,MAAMM,MAAM,GAAG,IAAAC,yCAAA,EAAsD;IACjEJ,SADiE;IAEjEK,IAAI,EAAEC,0DAAA,CAA6BD,IAF8B;IAGjEJ;EAHiE,CAAtD,CAAf;;EAMA,MAAM;IAAEM;EAAF,IAAYC,8BAAA,CAAeC,EAAf,CAAkB;IAChCR,MADgC;IAEhCC;EAFgC,CAAlB,CAAlB;;EAKA,IAAI;IACA,MAAMQ,QAAQ,GAAG,MAAMZ,aAAa,CAACa,OAAd,CAAsBC,MAAtB,CAA6B;MAChDL;IADgD,CAA7B,CAAvB;;IAGA,IAAIG,QAAQ,CAACG,IAAb,EAAmB;MACf;IACH;;IACD,MAAMf,aAAa,CAACa,OAAd,CAAsBG,MAAtB,CAA6B;MAC/BP,KAD+B;MAE/BM,IAAI,EAAEV,MAAM,CAACU;IAFkB,CAA7B,CAAN;EAIH,CAXD,CAWE,OAAOE,EAAP,EAAW;IACT,MAAM,IAAIC,cAAJ,CACFD,EAAE,CAACE,OAAH,IACI,2EAFF,EAGFF,EAAE,CAACG,IAAH,IAAW,iCAHT,EAIF;MACIC,KAAK,EAAEJ,EADX;MAEId,MAFJ;MAGIY,IAAI,EAAEV,MAAM,CAACU;IAHjB,CAJE,CAAN;EAUH;AACJ,CAvCM"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.base = void 0;
|
|
7
|
+
|
|
8
|
+
var _apiElasticsearch = require("@webiny/api-elasticsearch");
|
|
9
|
+
|
|
10
|
+
var _PageElasticsearchIndexPlugin = require("../../plugins/definitions/PageElasticsearchIndexPlugin");
|
|
11
|
+
|
|
12
|
+
const base = new _PageElasticsearchIndexPlugin.PageElasticsearchIndexPlugin({
|
|
13
|
+
body: (0, _apiElasticsearch.getBaseConfiguration)()
|
|
14
|
+
});
|
|
15
|
+
exports.base = base;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["base","PageElasticsearchIndexPlugin","body","getBaseConfiguration"],"sources":["base.ts"],"sourcesContent":["import { getBaseConfiguration } from \"@webiny/api-elasticsearch\";\nimport { PageElasticsearchIndexPlugin } from \"~/plugins/definitions/PageElasticsearchIndexPlugin\";\n\nexport const base = new PageElasticsearchIndexPlugin({\n body: getBaseConfiguration()\n});\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEO,MAAMA,IAAI,GAAG,IAAIC,0DAAJ,CAAiC;EACjDC,IAAI,EAAE,IAAAC,sCAAA;AAD2C,CAAjC,CAAb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const elasticsearchIndexPlugins: () => import("../../plugins/definitions/PageElasticsearchIndexPlugin").PageElasticsearchIndexPlugin[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.elasticsearchIndexPlugins = void 0;
|
|
7
|
+
|
|
8
|
+
var _base = require("./base");
|
|
9
|
+
|
|
10
|
+
var _japanese = require("./japanese");
|
|
11
|
+
|
|
12
|
+
const elasticsearchIndexPlugins = () => {
|
|
13
|
+
return [_base.base, _japanese.japanese];
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
exports.elasticsearchIndexPlugins = elasticsearchIndexPlugins;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["elasticsearchIndexPlugins","base","japanese"],"sources":["index.ts"],"sourcesContent":["import { base } from \"./base\";\nimport { japanese } from \"./japanese\";\n\nexport const elasticsearchIndexPlugins = () => {\n return [base, japanese];\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEO,MAAMA,yBAAyB,GAAG,MAAM;EAC3C,OAAO,CAACC,UAAD,EAAOC,kBAAP,CAAP;AACH,CAFM"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.japanese = void 0;
|
|
7
|
+
|
|
8
|
+
var _apiElasticsearch = require("@webiny/api-elasticsearch");
|
|
9
|
+
|
|
10
|
+
var _PageElasticsearchIndexPlugin = require("../../plugins/definitions/PageElasticsearchIndexPlugin");
|
|
11
|
+
|
|
12
|
+
const japanese = new _PageElasticsearchIndexPlugin.PageElasticsearchIndexPlugin({
|
|
13
|
+
body: (0, _apiElasticsearch.getJapaneseConfiguration)(),
|
|
14
|
+
locales: ["ja", "ja-jp"]
|
|
15
|
+
});
|
|
16
|
+
exports.japanese = japanese;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["japanese","PageElasticsearchIndexPlugin","body","getJapaneseConfiguration","locales"],"sources":["japanese.ts"],"sourcesContent":["import { getJapaneseConfiguration } from \"@webiny/api-elasticsearch\";\nimport { PageElasticsearchIndexPlugin } from \"~/plugins/definitions/PageElasticsearchIndexPlugin\";\n\nexport const japanese = new PageElasticsearchIndexPlugin({\n body: getJapaneseConfiguration(),\n locales: [\"ja\", \"ja-jp\"]\n});\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEO,MAAMA,QAAQ,GAAG,IAAIC,0DAAJ,CAAiC;EACrDC,IAAI,EAAE,IAAAC,0CAAA,GAD+C;EAErDC,OAAO,EAAE,CAAC,IAAD,EAAO,OAAP;AAF4C,CAAjC,CAAjB"}
|
package/index.d.ts
ADDED