@webiny/api-headless-cms-ddb-es 5.37.8 → 5.38.0-beta.1
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/configurations.js +3 -1
- package/definitions/entry.js +3 -1
- package/definitions/entryElasticsearch.js +3 -1
- package/definitions/group.js +3 -1
- package/definitions/model.js +3 -1
- package/definitions/system.js +3 -1
- package/definitions/table.js +3 -1
- package/definitions/tableElasticsearch.js +3 -1
- package/dynamoDb/index.js +3 -1
- package/dynamoDb/storage/date.js +3 -1
- package/dynamoDb/storage/longText.js +3 -1
- package/dynamoDb/storage/richText.js +3 -1
- package/elasticsearch/createElasticsearchIndex.d.ts +1 -1
- package/elasticsearch/createElasticsearchIndex.js +19 -29
- package/elasticsearch/createElasticsearchIndex.js.map +1 -1
- package/elasticsearch/deleteElasticsearchIndex.d.ts +1 -1
- package/elasticsearch/deleteElasticsearchIndex.js +6 -4
- package/elasticsearch/deleteElasticsearchIndex.js.map +1 -1
- package/elasticsearch/index.js +3 -1
- package/elasticsearch/indexing/dateTimeIndexing.js +3 -1
- package/elasticsearch/indexing/defaultFieldIndexing.js +3 -1
- package/elasticsearch/indexing/index.js +3 -1
- package/elasticsearch/indexing/longTextIndexing.js +3 -1
- package/elasticsearch/indexing/numberIndexing.js +3 -1
- package/elasticsearch/indexing/objectIndexing.js +3 -1
- package/elasticsearch/indexing/richTextIndexing.js +3 -1
- package/elasticsearch/indices/base.js +3 -1
- package/elasticsearch/indices/index.js +3 -1
- package/elasticsearch/indices/japanese.js +3 -1
- package/elasticsearch/search/index.js +3 -1
- package/elasticsearch/search/refSearch.js +3 -1
- package/elasticsearch/search/timeSearch.js +3 -1
- package/helpers/entryIndexHelpers.js +3 -1
- package/helpers/fieldIdentifier.js +3 -1
- package/helpers/index.js +3 -1
- package/index.js +14 -16
- package/index.js.map +1 -1
- package/operations/entry/dataLoader/DataLoaderCache.js +3 -1
- package/operations/entry/dataLoader/constants.js +3 -1
- package/operations/entry/dataLoader/createBatchScheduleFn.js +3 -1
- package/operations/entry/dataLoader/getAllEntryRevisions.js +3 -1
- package/operations/entry/dataLoader/getLatestRevisionByEntryId.js +3 -1
- package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js +3 -1
- package/operations/entry/dataLoader/getRevisionById.js +3 -1
- package/operations/entry/dataLoader/index.js +3 -1
- package/operations/entry/dataLoader/types.js +3 -1
- package/operations/entry/dataLoaders.js +3 -1
- package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js +3 -1
- package/operations/entry/elasticsearch/body.js +3 -1
- package/operations/entry/elasticsearch/fields.js +3 -1
- package/operations/entry/elasticsearch/filtering/applyFiltering.js +3 -1
- package/operations/entry/elasticsearch/filtering/exec.js +3 -1
- package/operations/entry/elasticsearch/filtering/index.js +3 -1
- package/operations/entry/elasticsearch/filtering/path.js +3 -1
- package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js +3 -1
- package/operations/entry/elasticsearch/filtering/plugins/index.js +3 -1
- package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js +3 -1
- package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js +3 -1
- package/operations/entry/elasticsearch/filtering/populated.js +3 -1
- package/operations/entry/elasticsearch/filtering/values.js +3 -1
- package/operations/entry/elasticsearch/fullTextSearch.js +3 -1
- package/operations/entry/elasticsearch/fullTextSearchFields.js +3 -1
- package/operations/entry/elasticsearch/initialQuery.js +3 -1
- package/operations/entry/elasticsearch/keyword.js +3 -1
- package/operations/entry/elasticsearch/plugins/bodyModifier.js +3 -1
- package/operations/entry/elasticsearch/plugins/operator.js +3 -1
- package/operations/entry/elasticsearch/plugins/queryModifier.js +3 -1
- package/operations/entry/elasticsearch/plugins/search.js +3 -1
- package/operations/entry/elasticsearch/plugins/sortModifier.js +3 -1
- package/operations/entry/elasticsearch/sort.js +3 -1
- package/operations/entry/elasticsearch/transformValueForSearch.js +3 -1
- package/operations/entry/elasticsearch/types.js +3 -1
- package/operations/entry/index.d.ts +0 -3
- package/operations/entry/index.js +80 -176
- package/operations/entry/index.js.map +1 -1
- package/operations/entry/keys.js +3 -1
- package/operations/entry/recordType.js +3 -1
- package/operations/entry/transformations/convertEntryKeys.d.ts +8 -0
- package/operations/entry/transformations/convertEntryKeys.js +38 -0
- package/operations/entry/transformations/convertEntryKeys.js.map +1 -0
- package/operations/entry/transformations/index.d.ts +29 -0
- package/operations/entry/transformations/index.js +126 -0
- package/operations/entry/transformations/index.js.map +1 -0
- package/operations/entry/transformations/modifyEntryValues.d.ts +32 -0
- package/operations/entry/transformations/modifyEntryValues.js +29 -0
- package/operations/entry/transformations/modifyEntryValues.js.map +1 -0
- package/operations/entry/transformations/transformEntryKeys.d.ts +11 -0
- package/operations/entry/transformations/transformEntryKeys.js +27 -0
- package/operations/entry/transformations/transformEntryKeys.js.map +1 -0
- package/operations/entry/transformations/transformEntryToIndex.d.ts +10 -0
- package/operations/entry/transformations/transformEntryToIndex.js +33 -0
- package/operations/entry/transformations/transformEntryToIndex.js.map +1 -0
- package/operations/group/index.js +5 -3
- package/operations/group/index.js.map +1 -1
- package/operations/model/index.js +3 -1
- package/operations/system/index.js +3 -1
- package/operations/system/indexes.d.ts +10 -0
- package/operations/system/indexes.js +42 -0
- package/operations/system/indexes.js.map +1 -0
- package/package.json +19 -18
- package/plugins/CmsElasticsearchModelFieldPlugin.js +3 -1
- package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js +3 -1
- package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js +3 -1
- package/plugins/CmsEntryElasticsearchIndexPlugin.js +3 -1
- package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js +3 -1
- package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js +3 -1
- package/plugins/CmsEntryElasticsearchSortModifierPlugin.js +3 -1
- package/plugins/CmsEntryElasticsearchValuesModifier.d.ts +33 -0
- package/plugins/CmsEntryElasticsearchValuesModifier.js +54 -0
- package/plugins/CmsEntryElasticsearchValuesModifier.js.map +1 -0
- package/plugins/CmsEntryFilterPlugin.js +3 -1
- package/plugins/index.d.ts +1 -0
- package/plugins/index.js +14 -1
- package/plugins/index.js.map +1 -1
- package/types.d.ts +1 -2
- package/types.js +3 -2
- package/types.js.map +1 -1
- package/definitions/settings.d.ts +0 -8
- package/definitions/settings.js +0 -53
- package/definitions/settings.js.map +0 -1
- package/operations/settings/index.d.ts +0 -6
- package/operations/settings/index.js +0 -111
- package/operations/settings/index.js.map +0 -1
package/configurations.js
CHANGED
package/definitions/entry.js
CHANGED
|
@@ -34,4 +34,6 @@ const createEntryElasticsearchEntity = params => {
|
|
|
34
34
|
}, attributes || {})
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
|
-
exports.createEntryElasticsearchEntity = createEntryElasticsearchEntity;
|
|
37
|
+
exports.createEntryElasticsearchEntity = createEntryElasticsearchEntity;
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=entryElasticsearch.js.map
|
package/definitions/group.js
CHANGED
package/definitions/model.js
CHANGED
package/definitions/system.js
CHANGED
package/definitions/table.js
CHANGED
|
@@ -18,4 +18,6 @@ const createTable = ({
|
|
|
18
18
|
const config = typeof table === "function" ? table(tableConfig) : tableConfig;
|
|
19
19
|
return new _dynamodbToolbox.Table(config);
|
|
20
20
|
};
|
|
21
|
-
exports.createTable = createTable;
|
|
21
|
+
exports.createTable = createTable;
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=table.js.map
|
|
@@ -18,4 +18,6 @@ const createElasticsearchTable = ({
|
|
|
18
18
|
const config = typeof table === "function" ? table(tableConfig) : tableConfig;
|
|
19
19
|
return new _dynamodbToolbox.Table(config);
|
|
20
20
|
};
|
|
21
|
-
exports.createElasticsearchTable = createElasticsearchTable;
|
|
21
|
+
exports.createElasticsearchTable = createElasticsearchTable;
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=tableElasticsearch.js.map
|
package/dynamoDb/index.js
CHANGED
|
@@ -12,4 +12,6 @@ exports.default = _default;
|
|
|
12
12
|
const createDynamoDbPlugins = () => {
|
|
13
13
|
return [(0, _richText.createRichTextStorageTransformPlugin)(), (0, _longText.createLongTextStorageTransformPlugin)(), (0, _date.createDateStorageTransformPlugin)()];
|
|
14
14
|
};
|
|
15
|
-
exports.createDynamoDbPlugins = createDynamoDbPlugins;
|
|
15
|
+
exports.createDynamoDbPlugins = createDynamoDbPlugins;
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
package/dynamoDb/storage/date.js
CHANGED
|
@@ -74,4 +74,6 @@ const createDateStorageTransformPlugin = () => {
|
|
|
74
74
|
plugin.name = `headless-cms.dynamodb.storageTransform.date`;
|
|
75
75
|
return plugin;
|
|
76
76
|
};
|
|
77
|
-
exports.createDateStorageTransformPlugin = createDateStorageTransformPlugin;
|
|
77
|
+
exports.createDateStorageTransformPlugin = createDateStorageTransformPlugin;
|
|
78
|
+
|
|
79
|
+
//# sourceMappingURL=date.js.map
|
|
@@ -90,4 +90,6 @@ const createLongTextStorageTransformPlugin = () => {
|
|
|
90
90
|
plugin.name = plugin.name = `headless-cms.dynamodb.storageTransform.long-text`;
|
|
91
91
|
return plugin;
|
|
92
92
|
};
|
|
93
|
-
exports.createLongTextStorageTransformPlugin = createLongTextStorageTransformPlugin;
|
|
93
|
+
exports.createLongTextStorageTransformPlugin = createLongTextStorageTransformPlugin;
|
|
94
|
+
|
|
95
|
+
//# sourceMappingURL=longText.js.map
|
|
@@ -101,4 +101,6 @@ const createRichTextStorageTransformPlugin = () => {
|
|
|
101
101
|
plugin.name = `headless-cms.dynamodb.storageTransform.rich-text`;
|
|
102
102
|
return plugin;
|
|
103
103
|
};
|
|
104
|
-
exports.createRichTextStorageTransformPlugin = createRichTextStorageTransformPlugin;
|
|
104
|
+
exports.createRichTextStorageTransformPlugin = createRichTextStorageTransformPlugin;
|
|
105
|
+
|
|
106
|
+
//# sourceMappingURL=richText.js.map
|
|
@@ -2,7 +2,7 @@ import { Client } from "@elastic/elasticsearch";
|
|
|
2
2
|
import { PluginsContainer } from "@webiny/plugins";
|
|
3
3
|
import { CmsModel } from "@webiny/api-headless-cms/types";
|
|
4
4
|
export interface CreateElasticsearchIndexParams {
|
|
5
|
-
|
|
5
|
+
client: Client;
|
|
6
6
|
plugins: PluginsContainer;
|
|
7
7
|
model: CmsModel;
|
|
8
8
|
}
|
|
@@ -1,49 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.createElasticsearchIndex = void 0;
|
|
8
|
-
var _error = _interopRequireDefault(require("@webiny/error"));
|
|
9
7
|
var _CmsEntryElasticsearchIndexPlugin = require("../plugins/CmsEntryElasticsearchIndexPlugin");
|
|
10
8
|
var _apiElasticsearch = require("@webiny/api-elasticsearch");
|
|
11
9
|
var _configurations = require("../configurations");
|
|
12
10
|
const createElasticsearchIndex = async params => {
|
|
13
11
|
const {
|
|
14
|
-
|
|
15
|
-
plugins
|
|
12
|
+
client,
|
|
13
|
+
plugins,
|
|
16
14
|
model
|
|
17
15
|
} = params;
|
|
18
|
-
const plugin = (0, _apiElasticsearch.getLastAddedIndexPlugin)({
|
|
19
|
-
container,
|
|
20
|
-
type: _CmsEntryElasticsearchIndexPlugin.CmsEntryElasticsearchIndexPlugin.type,
|
|
21
|
-
locale: model.locale
|
|
22
|
-
});
|
|
23
16
|
const {
|
|
24
17
|
index
|
|
25
18
|
} = _configurations.configurations.es({
|
|
26
19
|
model
|
|
27
20
|
});
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
21
|
+
await (0, _apiElasticsearch.createIndex)({
|
|
22
|
+
client,
|
|
23
|
+
index,
|
|
24
|
+
type: _CmsEntryElasticsearchIndexPlugin.CmsEntryElasticsearchIndexPlugin.type,
|
|
25
|
+
tenant: model.tenant,
|
|
26
|
+
locale: model.locale,
|
|
27
|
+
plugins,
|
|
28
|
+
onExists: () => {
|
|
29
|
+
console.log(`Elasticsearch index "${index}" for the CMS model "${model.name}" already exists.`);
|
|
30
|
+
},
|
|
31
|
+
onError: ex => {
|
|
32
|
+
console.error(`Could not create Elasticsearch index "${index}" for the CMS model "${model.name}".`);
|
|
33
|
+
return ex;
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
index,
|
|
37
|
-
body: plugin.body
|
|
38
|
-
});
|
|
39
|
-
} catch (ex) {
|
|
40
|
-
throw new _error.default(ex.message || "Could not create Elasticsearch index for the Headless CMS model.", ex.code || "CMS_ELASTICSEARCH_INDEX_ERROR", {
|
|
41
|
-
error: ex,
|
|
42
|
-
type: _CmsEntryElasticsearchIndexPlugin.CmsEntryElasticsearchIndexPlugin.type,
|
|
43
|
-
locale: model.locale,
|
|
44
|
-
tenant: model.tenant,
|
|
45
|
-
body: plugin.body
|
|
46
|
-
});
|
|
47
|
-
}
|
|
35
|
+
});
|
|
48
36
|
};
|
|
49
|
-
exports.createElasticsearchIndex = createElasticsearchIndex;
|
|
37
|
+
exports.createElasticsearchIndex = createElasticsearchIndex;
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=createElasticsearchIndex.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_CmsEntryElasticsearchIndexPlugin","require","_apiElasticsearch","_configurations","createElasticsearchIndex","params","client","plugins","model","index","configurations","es","createIndex","type","CmsEntryElasticsearchIndexPlugin","tenant","locale","onExists","console","log","name","onError","ex","error","exports"],"sources":["createElasticsearchIndex.ts"],"sourcesContent":["import { Client } from \"@elastic/elasticsearch\";\nimport { PluginsContainer } from \"@webiny/plugins\";\nimport { CmsEntryElasticsearchIndexPlugin } from \"~/plugins/CmsEntryElasticsearchIndexPlugin\";\nimport { createIndex } from \"@webiny/api-elasticsearch\";\nimport { configurations } from \"~/configurations\";\nimport { CmsModel } from \"@webiny/api-headless-cms/types\";\n\nexport interface CreateElasticsearchIndexParams {\n client: Client;\n plugins: PluginsContainer;\n model: CmsModel;\n}\n\nexport const createElasticsearchIndex = async (params: CreateElasticsearchIndexParams) => {\n const { client, plugins, model } = params;\n\n const { index } = configurations.es({\n model\n });\n\n await createIndex({\n client,\n index,\n type: CmsEntryElasticsearchIndexPlugin.type,\n tenant: model.tenant,\n locale: model.locale,\n plugins,\n onExists: () => {\n console.log(\n `Elasticsearch index \"${index}\" for the CMS model \"${model.name}\" already exists.`\n );\n },\n onError: ex => {\n console.error(\n `Could not create Elasticsearch index \"${index}\" for the CMS model \"${model.name}\".`\n );\n return ex;\n }\n });\n};\n"],"mappings":";;;;;;AAEA,IAAAA,iCAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AASO,MAAMG,wBAAwB,GAAG,MAAOC,MAAsC,IAAK;EACtF,MAAM;IAAEC,MAAM;IAAEC,OAAO;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAEzC,MAAM;IAAEI;EAAM,CAAC,GAAGC,8BAAc,CAACC,EAAE,CAAC;IAChCH;EACJ,CAAC,CAAC;EAEF,MAAM,IAAAI,6BAAW,EAAC;IACdN,MAAM;IACNG,KAAK;IACLI,IAAI,EAAEC,kEAAgC,CAACD,IAAI;IAC3CE,MAAM,EAAEP,KAAK,CAACO,MAAM;IACpBC,MAAM,EAAER,KAAK,CAACQ,MAAM;IACpBT,OAAO;IACPU,QAAQ,EAAEA,CAAA,KAAM;MACZC,OAAO,CAACC,GAAG,CACN,wBAAuBV,KAAM,wBAAuBD,KAAK,CAACY,IAAK,mBACpE,CAAC;IACL,CAAC;IACDC,OAAO,EAAEC,EAAE,IAAI;MACXJ,OAAO,CAACK,KAAK,CACR,yCAAwCd,KAAM,wBAAuBD,KAAK,CAACY,IAAK,IACrF,CAAC;MACD,OAAOE,EAAE;IACb;EACJ,CAAC,CAAC;AACN,CAAC;AAACE,OAAA,CAAApB,wBAAA,GAAAA,wBAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Client } from "@elastic/elasticsearch";
|
|
2
2
|
import { CmsModel } from "@webiny/api-headless-cms/types";
|
|
3
3
|
interface DeleteElasticsearchIndexParams {
|
|
4
|
-
|
|
4
|
+
client: Client;
|
|
5
5
|
model: CmsModel;
|
|
6
6
|
}
|
|
7
7
|
export declare const deleteElasticsearchIndex: (params: DeleteElasticsearchIndexParams) => Promise<void>;
|
|
@@ -7,7 +7,7 @@ exports.deleteElasticsearchIndex = void 0;
|
|
|
7
7
|
var _configurations = require("../configurations");
|
|
8
8
|
const deleteElasticsearchIndex = async params => {
|
|
9
9
|
const {
|
|
10
|
-
|
|
10
|
+
client,
|
|
11
11
|
model
|
|
12
12
|
} = params;
|
|
13
13
|
const {
|
|
@@ -17,14 +17,14 @@ const deleteElasticsearchIndex = async params => {
|
|
|
17
17
|
});
|
|
18
18
|
const {
|
|
19
19
|
body: exists
|
|
20
|
-
} = await
|
|
20
|
+
} = await client.indices.exists({
|
|
21
21
|
index
|
|
22
22
|
});
|
|
23
23
|
if (!exists) {
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
26
|
try {
|
|
27
|
-
await
|
|
27
|
+
await client.indices.delete({
|
|
28
28
|
index,
|
|
29
29
|
ignore_unavailable: true
|
|
30
30
|
});
|
|
@@ -33,4 +33,6 @@ const deleteElasticsearchIndex = async params => {
|
|
|
33
33
|
console.log(ex.message);
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
exports.deleteElasticsearchIndex = deleteElasticsearchIndex;
|
|
36
|
+
exports.deleteElasticsearchIndex = deleteElasticsearchIndex;
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=deleteElasticsearchIndex.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_configurations","require","deleteElasticsearchIndex","params","
|
|
1
|
+
{"version":3,"names":["_configurations","require","deleteElasticsearchIndex","params","client","model","index","configurations","es","body","exists","indices","delete","ignore_unavailable","ex","console","log","message","exports"],"sources":["deleteElasticsearchIndex.ts"],"sourcesContent":["import { Client } from \"@elastic/elasticsearch\";\nimport { CmsModel } from \"@webiny/api-headless-cms/types\";\nimport { configurations } from \"~/configurations\";\n\ninterface DeleteElasticsearchIndexParams {\n client: Client;\n model: CmsModel;\n}\n\nexport const deleteElasticsearchIndex = async (\n params: DeleteElasticsearchIndexParams\n): Promise<void> => {\n const { client, model } = params;\n\n const { index } = configurations.es({\n model\n });\n const { body: exists } = await client.indices.exists({\n index\n });\n if (!exists) {\n return;\n }\n\n try {\n await client.indices.delete({\n index,\n ignore_unavailable: true\n });\n } catch (ex) {\n console.log(`Could not delete Elasticsearch index \"${index}\". Please do it manually.`);\n console.log(ex.message);\n }\n};\n"],"mappings":";;;;;;AAEA,IAAAA,eAAA,GAAAC,OAAA;AAOO,MAAMC,wBAAwB,GAAG,MACpCC,MAAsC,IACtB;EAChB,MAAM;IAAEC,MAAM;IAAEC;EAAM,CAAC,GAAGF,MAAM;EAEhC,MAAM;IAAEG;EAAM,CAAC,GAAGC,8BAAc,CAACC,EAAE,CAAC;IAChCH;EACJ,CAAC,CAAC;EACF,MAAM;IAAEI,IAAI,EAAEC;EAAO,CAAC,GAAG,MAAMN,MAAM,CAACO,OAAO,CAACD,MAAM,CAAC;IACjDJ;EACJ,CAAC,CAAC;EACF,IAAI,CAACI,MAAM,EAAE;IACT;EACJ;EAEA,IAAI;IACA,MAAMN,MAAM,CAACO,OAAO,CAACC,MAAM,CAAC;MACxBN,KAAK;MACLO,kBAAkB,EAAE;IACxB,CAAC,CAAC;EACN,CAAC,CAAC,OAAOC,EAAE,EAAE;IACTC,OAAO,CAACC,GAAG,CAAE,yCAAwCV,KAAM,2BAA0B,CAAC;IACtFS,OAAO,CAACC,GAAG,CAACF,EAAE,CAACG,OAAO,CAAC;EAC3B;AACJ,CAAC;AAACC,OAAA,CAAAhB,wBAAA,GAAAA,wBAAA"}
|
package/elasticsearch/index.js
CHANGED
|
@@ -8,4 +8,6 @@ exports.default = void 0;
|
|
|
8
8
|
var _indexing = _interopRequireDefault(require("./indexing"));
|
|
9
9
|
var _search = _interopRequireDefault(require("./search"));
|
|
10
10
|
var _default = () => [(0, _indexing.default)(), (0, _search.default)()];
|
|
11
|
-
exports.default = _default;
|
|
11
|
+
exports.default = _default;
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -12,4 +12,6 @@ var _dateTimeIndexing = _interopRequireDefault(require("./dateTimeIndexing"));
|
|
|
12
12
|
var _numberIndexing = _interopRequireDefault(require("./numberIndexing"));
|
|
13
13
|
var _objectIndexing = _interopRequireDefault(require("./objectIndexing"));
|
|
14
14
|
var _default = () => [(0, _dateTimeIndexing.default)(), (0, _richTextIndexing.default)(), (0, _longTextIndexing.default)(), (0, _defaultFieldIndexing.default)(), (0, _numberIndexing.default)(), (0, _objectIndexing.default)()];
|
|
15
|
-
exports.default = _default;
|
|
15
|
+
exports.default = _default;
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -9,4 +9,6 @@ var _CmsEntryElasticsearchIndexPlugin = require("../../plugins/CmsEntryElasticse
|
|
|
9
9
|
const base = new _CmsEntryElasticsearchIndexPlugin.CmsEntryElasticsearchIndexPlugin({
|
|
10
10
|
body: (0, _apiElasticsearch.getBaseConfiguration)()
|
|
11
11
|
});
|
|
12
|
-
exports.base = base;
|
|
12
|
+
exports.base = base;
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=base.js.map
|
|
@@ -9,4 +9,6 @@ var _japanese = require("./japanese");
|
|
|
9
9
|
const elasticsearchIndexPlugins = () => {
|
|
10
10
|
return [_base.base, _japanese.japanese];
|
|
11
11
|
};
|
|
12
|
-
exports.elasticsearchIndexPlugins = elasticsearchIndexPlugins;
|
|
12
|
+
exports.elasticsearchIndexPlugins = elasticsearchIndexPlugins;
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -10,4 +10,6 @@ const japanese = new _CmsEntryElasticsearchIndexPlugin.CmsEntryElasticsearchInde
|
|
|
10
10
|
body: (0, _apiElasticsearch.getJapaneseConfiguration)(),
|
|
11
11
|
locales: ["ja", "ja-jp"]
|
|
12
12
|
});
|
|
13
|
-
exports.japanese = japanese;
|
|
13
|
+
exports.japanese = japanese;
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=japanese.js.map
|
|
@@ -7,4 +7,6 @@ exports.default = void 0;
|
|
|
7
7
|
var _timeSearch = require("./timeSearch");
|
|
8
8
|
var _refSearch = require("./refSearch");
|
|
9
9
|
var _default = () => [(0, _timeSearch.createTimeSearchPlugin)(), (0, _refSearch.createRefSearchPlugin)()];
|
|
10
|
-
exports.default = _default;
|
|
10
|
+
exports.default = _default;
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
package/helpers/index.js
CHANGED
package/index.js
CHANGED
|
@@ -11,7 +11,6 @@ exports.createStorageOperations = void 0;
|
|
|
11
11
|
var _filters = _interopRequireDefault(require("@webiny/db-dynamodb/plugins/filters"));
|
|
12
12
|
var _elasticsearch = _interopRequireDefault(require("./elasticsearch"));
|
|
13
13
|
var _dynamoDb = _interopRequireDefault(require("./dynamoDb"));
|
|
14
|
-
var _settings = require("./operations/settings");
|
|
15
14
|
var _system = require("./operations/system");
|
|
16
15
|
var _model = require("./operations/model");
|
|
17
16
|
var _entry = require("./operations/entry");
|
|
@@ -23,7 +22,6 @@ var _model2 = require("./definitions/model");
|
|
|
23
22
|
var _entry2 = require("./definitions/entry");
|
|
24
23
|
var _entryElasticsearch = require("./definitions/entryElasticsearch");
|
|
25
24
|
var _system2 = require("./definitions/system");
|
|
26
|
-
var _settings2 = require("./definitions/settings");
|
|
27
25
|
var _createElasticsearchIndex = require("./elasticsearch/createElasticsearchIndex");
|
|
28
26
|
var _plugins = require("@webiny/plugins");
|
|
29
27
|
var _group2 = require("./operations/group");
|
|
@@ -45,6 +43,7 @@ Object.keys(_plugins2).forEach(function (key) {
|
|
|
45
43
|
var _plugins3 = require("./operations/entry/elasticsearch/filtering/plugins");
|
|
46
44
|
var _CmsEntryFilterPlugin = require("./plugins/CmsEntryFilterPlugin");
|
|
47
45
|
var _apiHeadlessCms = require("@webiny/api-headless-cms");
|
|
46
|
+
var _indexes = require("./operations/system/indexes");
|
|
48
47
|
const createStorageOperations = params => {
|
|
49
48
|
const {
|
|
50
49
|
attributes,
|
|
@@ -63,11 +62,6 @@ const createStorageOperations = params => {
|
|
|
63
62
|
documentClient
|
|
64
63
|
});
|
|
65
64
|
const entities = {
|
|
66
|
-
settings: (0, _settings2.createSettingsEntity)({
|
|
67
|
-
entityName: _types.ENTITIES.SETTINGS,
|
|
68
|
-
table: tableInstance,
|
|
69
|
-
attributes: attributes ? attributes[_types.ENTITIES.SETTINGS] : {}
|
|
70
|
-
}),
|
|
71
65
|
system: (0, _system2.createSystemEntity)({
|
|
72
66
|
entityName: _types.ENTITIES.SYSTEM,
|
|
73
67
|
table: tableInstance,
|
|
@@ -147,7 +141,7 @@ const createStorageOperations = params => {
|
|
|
147
141
|
// Elasticsearch
|
|
148
142
|
_apiElasticsearch.CompressionPlugin.type, _apiElasticsearch.ElasticsearchQueryBuilderOperatorPlugin.type,
|
|
149
143
|
// Headless CMS
|
|
150
|
-
"cms-model-field-to-graphql", _CmsEntryFilterPlugin.CmsEntryFilterPlugin.type, _plugins2.CmsEntryElasticsearchBodyModifierPlugin.type, _plugins2.CmsEntryElasticsearchFullTextSearchPlugin.type, _plugins2.CmsEntryElasticsearchIndexPlugin.type, _plugins2.CmsEntryElasticsearchQueryBuilderValueSearchPlugin.type, _plugins2.CmsEntryElasticsearchQueryModifierPlugin.type, _plugins2.CmsEntryElasticsearchSortModifierPlugin.type, _plugins2.CmsElasticsearchModelFieldPlugin.type, _apiHeadlessCms.StorageOperationsCmsModelPlugin.type];
|
|
144
|
+
"cms-model-field-to-graphql", _CmsEntryFilterPlugin.CmsEntryFilterPlugin.type, _plugins2.CmsEntryElasticsearchBodyModifierPlugin.type, _plugins2.CmsEntryElasticsearchFullTextSearchPlugin.type, _plugins2.CmsEntryElasticsearchIndexPlugin.type, _plugins2.CmsEntryElasticsearchQueryBuilderValueSearchPlugin.type, _plugins2.CmsEntryElasticsearchQueryModifierPlugin.type, _plugins2.CmsEntryElasticsearchSortModifierPlugin.type, _plugins2.CmsElasticsearchModelFieldPlugin.type, _apiHeadlessCms.StorageOperationsCmsModelPlugin.type, _plugins2.CmsEntryElasticsearchValuesModifier.type];
|
|
151
145
|
for (const type of types) {
|
|
152
146
|
plugins.mergeByType(context.plugins, type);
|
|
153
147
|
}
|
|
@@ -158,11 +152,16 @@ const createStorageOperations = params => {
|
|
|
158
152
|
* We need to create indexes on before model create and on clone (create from).
|
|
159
153
|
* Other apps create indexes on locale creation.
|
|
160
154
|
*/
|
|
155
|
+
await (0, _indexes.createElasticsearchIndexesOnLocaleAfterCreate)({
|
|
156
|
+
context,
|
|
157
|
+
client: elasticsearch,
|
|
158
|
+
plugins
|
|
159
|
+
});
|
|
161
160
|
context.cms.onModelBeforeCreate.subscribe(async ({
|
|
162
161
|
model
|
|
163
162
|
}) => {
|
|
164
163
|
await (0, _createElasticsearchIndex.createElasticsearchIndex)({
|
|
165
|
-
elasticsearch,
|
|
164
|
+
client: elasticsearch,
|
|
166
165
|
model,
|
|
167
166
|
plugins
|
|
168
167
|
});
|
|
@@ -171,7 +170,7 @@ const createStorageOperations = params => {
|
|
|
171
170
|
model
|
|
172
171
|
}) => {
|
|
173
172
|
await (0, _createElasticsearchIndex.createElasticsearchIndex)({
|
|
174
|
-
elasticsearch,
|
|
173
|
+
client: elasticsearch,
|
|
175
174
|
model,
|
|
176
175
|
plugins
|
|
177
176
|
});
|
|
@@ -180,7 +179,7 @@ const createStorageOperations = params => {
|
|
|
180
179
|
model
|
|
181
180
|
}) => {
|
|
182
181
|
await (0, _deleteElasticsearchIndex.deleteElasticsearchIndex)({
|
|
183
|
-
elasticsearch,
|
|
182
|
+
client: elasticsearch,
|
|
184
183
|
model
|
|
185
184
|
});
|
|
186
185
|
});
|
|
@@ -188,7 +187,7 @@ const createStorageOperations = params => {
|
|
|
188
187
|
model
|
|
189
188
|
}) => {
|
|
190
189
|
await (0, _createElasticsearchIndex.createElasticsearchIndex)({
|
|
191
|
-
elasticsearch,
|
|
190
|
+
client: elasticsearch,
|
|
192
191
|
model,
|
|
193
192
|
plugins
|
|
194
193
|
});
|
|
@@ -200,9 +199,6 @@ const createStorageOperations = params => {
|
|
|
200
199
|
system: (0, _system.createSystemStorageOperations)({
|
|
201
200
|
entity: entities.system
|
|
202
201
|
}),
|
|
203
|
-
settings: (0, _settings.createSettingsStorageOperations)({
|
|
204
|
-
entity: entities.settings
|
|
205
|
-
}),
|
|
206
202
|
groups: (0, _group2.createGroupsStorageOperations)({
|
|
207
203
|
entity: entities.groups,
|
|
208
204
|
plugins
|
|
@@ -214,4 +210,6 @@ const createStorageOperations = params => {
|
|
|
214
210
|
entries
|
|
215
211
|
};
|
|
216
212
|
};
|
|
217
|
-
exports.createStorageOperations = createStorageOperations;
|
|
213
|
+
exports.createStorageOperations = createStorageOperations;
|
|
214
|
+
|
|
215
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_filters","_interopRequireDefault","require","_elasticsearch","_dynamoDb","_settings","_system","_model","_entry","_types","_table","_tableElasticsearch","_group","_model2","_entry2","_entryElasticsearch","_system2","_settings2","_createElasticsearchIndex","_plugins","_group2","_apiElasticsearch","_indices","_deleteElasticsearchIndex","_plugins2","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_plugins3","_CmsEntryFilterPlugin","_apiHeadlessCms","createStorageOperations","params","attributes","table","esTable","documentClient","elasticsearch","plugins","userPlugins","tableInstance","createTable","tableElasticsearchInstance","createElasticsearchTable","entities","settings","createSettingsEntity","entityName","ENTITIES","SETTINGS","system","createSystemEntity","SYSTEM","groups","createGroupEntity","GROUPS","models","createModelEntity","MODELS","entries","createEntryEntity","ENTRIES","entriesEs","createEntryElasticsearchEntity","ENTRIES_ES","PluginsContainer","dynamoDbValueFilters","dynamoDbPlugins","elasticsearchPlugins","elasticsearchIndexPlugins","createFilterPlugins","createEntriesStorageOperations","entity","esEntity","name","beforeInit","context","register","types","CompressionPlugin","type","ElasticsearchQueryBuilderOperatorPlugin","CmsEntryFilterPlugin","CmsEntryElasticsearchBodyModifierPlugin","CmsEntryElasticsearchFullTextSearchPlugin","CmsEntryElasticsearchIndexPlugin","CmsEntryElasticsearchQueryBuilderValueSearchPlugin","CmsEntryElasticsearchQueryModifierPlugin","CmsEntryElasticsearchSortModifierPlugin","CmsElasticsearchModelFieldPlugin","StorageOperationsCmsModelPlugin","mergeByType","dataLoaders","clearAll","init","cms","onModelBeforeCreate","subscribe","model","createElasticsearchIndex","onModelBeforeCreateFrom","onModelAfterDelete","deleteElasticsearchIndex","onModelInitialize","getEntities","getTable","getEsTable","createSystemStorageOperations","createSettingsStorageOperations","createGroupsStorageOperations","createModelsStorageOperations"],"sources":["index.ts"],"sourcesContent":["import dynamoDbValueFilters from \"@webiny/db-dynamodb/plugins/filters\";\nimport elasticsearchPlugins from \"./elasticsearch\";\nimport dynamoDbPlugins from \"./dynamoDb\";\nimport { createSettingsStorageOperations } from \"./operations/settings\";\nimport { createSystemStorageOperations } from \"./operations/system\";\nimport { createModelsStorageOperations } from \"./operations/model\";\nimport { createEntriesStorageOperations } from \"./operations/entry\";\nimport { ENTITIES, StorageOperationsFactory } from \"~/types\";\nimport { createTable } from \"~/definitions/table\";\nimport { createElasticsearchTable } from \"~/definitions/tableElasticsearch\";\nimport { createGroupEntity } from \"~/definitions/group\";\nimport { createModelEntity } from \"~/definitions/model\";\nimport { createEntryEntity } from \"~/definitions/entry\";\nimport { createEntryElasticsearchEntity } from \"~/definitions/entryElasticsearch\";\nimport { createSystemEntity } from \"~/definitions/system\";\nimport { createSettingsEntity } from \"~/definitions/settings\";\nimport { createElasticsearchIndex } from \"~/elasticsearch/createElasticsearchIndex\";\nimport { PluginsContainer } from \"@webiny/plugins\";\nimport { createGroupsStorageOperations } from \"~/operations/group\";\nimport {\n CompressionPlugin,\n ElasticsearchQueryBuilderOperatorPlugin\n} from \"@webiny/api-elasticsearch\";\nimport { elasticsearchIndexPlugins } from \"./elasticsearch/indices\";\nimport { deleteElasticsearchIndex } from \"./elasticsearch/deleteElasticsearchIndex\";\nimport {\n CmsElasticsearchModelFieldPlugin,\n CmsEntryElasticsearchBodyModifierPlugin,\n CmsEntryElasticsearchFullTextSearchPlugin,\n CmsEntryElasticsearchIndexPlugin,\n CmsEntryElasticsearchQueryBuilderValueSearchPlugin,\n CmsEntryElasticsearchQueryModifierPlugin,\n CmsEntryElasticsearchSortModifierPlugin\n} from \"~/plugins\";\nimport { createFilterPlugins } from \"~/operations/entry/elasticsearch/filtering/plugins\";\nimport { CmsEntryFilterPlugin } from \"~/plugins/CmsEntryFilterPlugin\";\nimport { StorageOperationsCmsModelPlugin } from \"@webiny/api-headless-cms\";\n\nexport * from \"./plugins\";\n\nexport const createStorageOperations: StorageOperationsFactory = params => {\n const {\n attributes,\n table,\n esTable,\n documentClient,\n elasticsearch,\n plugins: userPlugins\n } = params;\n\n const tableInstance = createTable({\n table,\n documentClient\n });\n const tableElasticsearchInstance = createElasticsearchTable({\n table: esTable,\n documentClient\n });\n\n const entities = {\n settings: createSettingsEntity({\n entityName: ENTITIES.SETTINGS,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.SETTINGS] : {}\n }),\n system: createSystemEntity({\n entityName: ENTITIES.SYSTEM,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.SYSTEM] : {}\n }),\n groups: createGroupEntity({\n entityName: ENTITIES.GROUPS,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.GROUPS] : {}\n }),\n models: createModelEntity({\n entityName: ENTITIES.MODELS,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.MODELS] : {}\n }),\n entries: createEntryEntity({\n entityName: ENTITIES.ENTRIES,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.ENTRIES] : {}\n }),\n entriesEs: createEntryElasticsearchEntity({\n entityName: ENTITIES.ENTRIES_ES,\n table: tableElasticsearchInstance,\n attributes: attributes ? attributes[ENTITIES.ENTRIES_ES] : {}\n })\n };\n\n const plugins = new PluginsContainer([\n /**\n * DynamoDB filter plugins for the where conditions.\n */\n dynamoDbValueFilters(),\n /**\n * Field plugins for DynamoDB.\n */\n dynamoDbPlugins(),\n /**\n * Field plugins for Elasticsearch.\n */\n elasticsearchPlugins(),\n /**\n * Built-in Elasticsearch index templates.\n */\n elasticsearchIndexPlugins(),\n /**\n * Filter plugins used to apply filtering from where conditions to Elasticsearch query.\n */\n createFilterPlugins(),\n /**\n * User defined custom plugins.\n * They are at the end because we can then override existing plugins.\n */\n ...(userPlugins || [])\n ]);\n\n const entries = createEntriesStorageOperations({\n entity: entities.entries,\n esEntity: entities.entriesEs,\n plugins,\n elasticsearch\n });\n\n return {\n name: \"dynamodb:elasticsearch\",\n beforeInit: async context => {\n /**\n * Attach the elasticsearch into context if it is not already attached.\n */\n if (!context.elasticsearch) {\n context.elasticsearch = elasticsearch;\n }\n /**\n * Pass the plugins to the parent context.\n */\n context.plugins.register([dynamoDbPlugins()]);\n /**\n * We need to fetch all the plugin types in the list from the main container.\n * This way we do not need to register plugins in the storage plugins contains.\n */\n const types: string[] = [\n // Elasticsearch\n CompressionPlugin.type,\n ElasticsearchQueryBuilderOperatorPlugin.type,\n // Headless CMS\n \"cms-model-field-to-graphql\",\n CmsEntryFilterPlugin.type,\n CmsEntryElasticsearchBodyModifierPlugin.type,\n CmsEntryElasticsearchFullTextSearchPlugin.type,\n CmsEntryElasticsearchIndexPlugin.type,\n CmsEntryElasticsearchQueryBuilderValueSearchPlugin.type,\n CmsEntryElasticsearchQueryModifierPlugin.type,\n CmsEntryElasticsearchSortModifierPlugin.type,\n CmsElasticsearchModelFieldPlugin.type,\n StorageOperationsCmsModelPlugin.type\n ];\n for (const type of types) {\n plugins.mergeByType(context.plugins, type);\n }\n entries.dataLoaders.clearAll();\n },\n init: async context => {\n /**\n * We need to create indexes on before model create and on clone (create from).\n * Other apps create indexes on locale creation.\n */\n context.cms.onModelBeforeCreate.subscribe(async ({ model }) => {\n await createElasticsearchIndex({\n elasticsearch,\n model,\n plugins\n });\n });\n context.cms.onModelBeforeCreateFrom.subscribe(async ({ model }) => {\n await createElasticsearchIndex({\n elasticsearch,\n model,\n plugins\n });\n });\n context.cms.onModelAfterDelete.subscribe(async ({ model }) => {\n await deleteElasticsearchIndex({\n elasticsearch,\n model\n });\n });\n\n context.cms.onModelInitialize.subscribe(async ({ model }) => {\n await createElasticsearchIndex({\n elasticsearch,\n model,\n plugins\n });\n });\n },\n getEntities: () => entities,\n getTable: () => tableInstance,\n getEsTable: () => tableElasticsearchInstance,\n system: createSystemStorageOperations({\n entity: entities.system\n }),\n settings: createSettingsStorageOperations({\n entity: entities.settings\n }),\n groups: createGroupsStorageOperations({\n entity: entities.groups,\n plugins\n }),\n models: createModelsStorageOperations({\n entity: entities.models,\n elasticsearch\n }),\n entries\n };\n};\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,SAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,mBAAA,GAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AACA,IAAAW,OAAA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0B;IAC5CQ,MAAM,EAAE,IAAAyD,qCAA6B,EAAC;MAClCnC,MAAM,EAAE5B,QAAQ,CAACM;IACrB,CAAC,CAAC;IACFL,QAAQ,EAAE,IAAA+D,yCAA+B,EAAC;MACtCpC,MAAM,EAAE5B,QAAQ,CAACC;IACrB,CAAC,CAAC;IACFQ,MAAM,EAAE,IAAAwD,qCAA6B,EAAC;MAClCrC,MAAM,EAAE5B,QAAQ,CAACS,MAAM;MACvBf;IACJ,CAAC,CAAC;IACFkB,MAAM,EAAE,IAAAsD,oCAA6B,EAAC;MAClCtC,MAAM,EAAE5B,QAAQ,CAACY,MAAM;MACvBnB;IACJ,CAAC,CAAC;IACFsB;EACJ,CAAC;AACL,CAAC;AAACnC,OAAA,CAAAO,uBAAA,GAAAA,uBAAA"}
|
|
1
|
+
{"version":3,"names":["_filters","_interopRequireDefault","require","_elasticsearch","_dynamoDb","_system","_model","_entry","_types","_table","_tableElasticsearch","_group","_model2","_entry2","_entryElasticsearch","_system2","_createElasticsearchIndex","_plugins","_group2","_apiElasticsearch","_indices","_deleteElasticsearchIndex","_plugins2","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_plugins3","_CmsEntryFilterPlugin","_apiHeadlessCms","_indexes","createStorageOperations","params","attributes","table","esTable","documentClient","elasticsearch","plugins","userPlugins","tableInstance","createTable","tableElasticsearchInstance","createElasticsearchTable","entities","system","createSystemEntity","entityName","ENTITIES","SYSTEM","groups","createGroupEntity","GROUPS","models","createModelEntity","MODELS","entries","createEntryEntity","ENTRIES","entriesEs","createEntryElasticsearchEntity","ENTRIES_ES","PluginsContainer","dynamoDbValueFilters","dynamoDbPlugins","elasticsearchPlugins","elasticsearchIndexPlugins","createFilterPlugins","createEntriesStorageOperations","entity","esEntity","name","beforeInit","context","register","types","CompressionPlugin","type","ElasticsearchQueryBuilderOperatorPlugin","CmsEntryFilterPlugin","CmsEntryElasticsearchBodyModifierPlugin","CmsEntryElasticsearchFullTextSearchPlugin","CmsEntryElasticsearchIndexPlugin","CmsEntryElasticsearchQueryBuilderValueSearchPlugin","CmsEntryElasticsearchQueryModifierPlugin","CmsEntryElasticsearchSortModifierPlugin","CmsElasticsearchModelFieldPlugin","StorageOperationsCmsModelPlugin","CmsEntryElasticsearchValuesModifier","mergeByType","dataLoaders","clearAll","init","createElasticsearchIndexesOnLocaleAfterCreate","client","cms","onModelBeforeCreate","subscribe","model","createElasticsearchIndex","onModelBeforeCreateFrom","onModelAfterDelete","deleteElasticsearchIndex","onModelInitialize","getEntities","getTable","getEsTable","createSystemStorageOperations","createGroupsStorageOperations","createModelsStorageOperations"],"sources":["index.ts"],"sourcesContent":["import dynamoDbValueFilters from \"@webiny/db-dynamodb/plugins/filters\";\nimport elasticsearchPlugins from \"./elasticsearch\";\nimport dynamoDbPlugins from \"./dynamoDb\";\nimport { createSystemStorageOperations } from \"./operations/system\";\nimport { createModelsStorageOperations } from \"./operations/model\";\nimport { createEntriesStorageOperations } from \"./operations/entry\";\nimport { ENTITIES, StorageOperationsFactory } from \"~/types\";\nimport { createTable } from \"~/definitions/table\";\nimport { createElasticsearchTable } from \"~/definitions/tableElasticsearch\";\nimport { createGroupEntity } from \"~/definitions/group\";\nimport { createModelEntity } from \"~/definitions/model\";\nimport { createEntryEntity } from \"~/definitions/entry\";\nimport { createEntryElasticsearchEntity } from \"~/definitions/entryElasticsearch\";\nimport { createSystemEntity } from \"~/definitions/system\";\nimport { createElasticsearchIndex } from \"~/elasticsearch/createElasticsearchIndex\";\nimport { PluginsContainer } from \"@webiny/plugins\";\nimport { createGroupsStorageOperations } from \"~/operations/group\";\nimport {\n CompressionPlugin,\n ElasticsearchQueryBuilderOperatorPlugin\n} from \"@webiny/api-elasticsearch\";\nimport { elasticsearchIndexPlugins } from \"./elasticsearch/indices\";\nimport { deleteElasticsearchIndex } from \"./elasticsearch/deleteElasticsearchIndex\";\nimport {\n CmsElasticsearchModelFieldPlugin,\n CmsEntryElasticsearchBodyModifierPlugin,\n CmsEntryElasticsearchFullTextSearchPlugin,\n CmsEntryElasticsearchIndexPlugin,\n CmsEntryElasticsearchQueryBuilderValueSearchPlugin,\n CmsEntryElasticsearchQueryModifierPlugin,\n CmsEntryElasticsearchSortModifierPlugin,\n CmsEntryElasticsearchValuesModifier\n} from \"~/plugins\";\nimport { createFilterPlugins } from \"~/operations/entry/elasticsearch/filtering/plugins\";\nimport { CmsEntryFilterPlugin } from \"~/plugins/CmsEntryFilterPlugin\";\nimport { StorageOperationsCmsModelPlugin } from \"@webiny/api-headless-cms\";\nimport { createElasticsearchIndexesOnLocaleAfterCreate } from \"~/operations/system/indexes\";\n\nexport * from \"./plugins\";\n\nexport const createStorageOperations: StorageOperationsFactory = params => {\n const {\n attributes,\n table,\n esTable,\n documentClient,\n elasticsearch,\n plugins: userPlugins\n } = params;\n\n const tableInstance = createTable({\n table,\n documentClient\n });\n const tableElasticsearchInstance = createElasticsearchTable({\n table: esTable,\n documentClient\n });\n\n const entities = {\n system: createSystemEntity({\n entityName: ENTITIES.SYSTEM,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.SYSTEM] : {}\n }),\n groups: createGroupEntity({\n entityName: ENTITIES.GROUPS,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.GROUPS] : {}\n }),\n models: createModelEntity({\n entityName: ENTITIES.MODELS,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.MODELS] : {}\n }),\n entries: createEntryEntity({\n entityName: ENTITIES.ENTRIES,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.ENTRIES] : {}\n }),\n entriesEs: createEntryElasticsearchEntity({\n entityName: ENTITIES.ENTRIES_ES,\n table: tableElasticsearchInstance,\n attributes: attributes ? attributes[ENTITIES.ENTRIES_ES] : {}\n })\n };\n\n const plugins = new PluginsContainer([\n /**\n * DynamoDB filter plugins for the where conditions.\n */\n dynamoDbValueFilters(),\n /**\n * Field plugins for DynamoDB.\n */\n dynamoDbPlugins(),\n /**\n * Field plugins for Elasticsearch.\n */\n elasticsearchPlugins(),\n /**\n * Built-in Elasticsearch index templates.\n */\n elasticsearchIndexPlugins(),\n /**\n * Filter plugins used to apply filtering from where conditions to Elasticsearch query.\n */\n createFilterPlugins(),\n /**\n * User defined custom plugins.\n * They are at the end because we can then override existing plugins.\n */\n ...(userPlugins || [])\n ]);\n\n const entries = createEntriesStorageOperations({\n entity: entities.entries,\n esEntity: entities.entriesEs,\n plugins,\n elasticsearch\n });\n\n return {\n name: \"dynamodb:elasticsearch\",\n beforeInit: async context => {\n /**\n * Attach the elasticsearch into context if it is not already attached.\n */\n if (!context.elasticsearch) {\n context.elasticsearch = elasticsearch;\n }\n /**\n * Pass the plugins to the parent context.\n */\n context.plugins.register([dynamoDbPlugins()]);\n /**\n * We need to fetch all the plugin types in the list from the main container.\n * This way we do not need to register plugins in the storage plugins contains.\n */\n const types: string[] = [\n // Elasticsearch\n CompressionPlugin.type,\n ElasticsearchQueryBuilderOperatorPlugin.type,\n // Headless CMS\n \"cms-model-field-to-graphql\",\n CmsEntryFilterPlugin.type,\n CmsEntryElasticsearchBodyModifierPlugin.type,\n CmsEntryElasticsearchFullTextSearchPlugin.type,\n CmsEntryElasticsearchIndexPlugin.type,\n CmsEntryElasticsearchQueryBuilderValueSearchPlugin.type,\n CmsEntryElasticsearchQueryModifierPlugin.type,\n CmsEntryElasticsearchSortModifierPlugin.type,\n CmsElasticsearchModelFieldPlugin.type,\n StorageOperationsCmsModelPlugin.type,\n CmsEntryElasticsearchValuesModifier.type\n ];\n for (const type of types) {\n plugins.mergeByType(context.plugins, type);\n }\n entries.dataLoaders.clearAll();\n },\n init: async context => {\n /**\n * We need to create indexes on before model create and on clone (create from).\n * Other apps create indexes on locale creation.\n */\n await createElasticsearchIndexesOnLocaleAfterCreate({\n context,\n client: elasticsearch,\n plugins\n });\n\n context.cms.onModelBeforeCreate.subscribe(async ({ model }) => {\n await createElasticsearchIndex({\n client: elasticsearch,\n model,\n plugins\n });\n });\n context.cms.onModelBeforeCreateFrom.subscribe(async ({ model }) => {\n await createElasticsearchIndex({\n client: elasticsearch,\n model,\n plugins\n });\n });\n context.cms.onModelAfterDelete.subscribe(async ({ model }) => {\n await deleteElasticsearchIndex({\n client: elasticsearch,\n model\n });\n });\n\n context.cms.onModelInitialize.subscribe(async ({ model }) => {\n await createElasticsearchIndex({\n client: elasticsearch,\n model,\n plugins\n });\n });\n },\n getEntities: () => entities,\n getTable: () => tableInstance,\n getEsTable: () => tableElasticsearchInstance,\n system: createSystemStorageOperations({\n entity: entities.system\n }),\n groups: createGroupsStorageOperations({\n entity: entities.groups,\n plugins\n }),\n models: createModelsStorageOperations({\n entity: entities.models,\n elasticsearch\n }),\n entries\n };\n};\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,SAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,mBAAA,GAAAR,OAAA;AACA,IAAAS,MAAA,GAAAT,OAAA;AACA,IAAAU,OAAA,GAAAV,OAAA;AACA,IAAAW,OAAA,GAAAX,OAAA;AACA,IAAAY,mBAAA,GAAAZ,OAAA;AACA,IAAAa,QAAA,GAAAb,OAAA;AACA,IAAAc,yBAAA,GAAAd,OAAA;AACA,IAAAe,QAAA,GAAAf,OAAA;AACA,IAAAgB,OAAA,GAAAhB,OAAA;AACA,IAAAiB,iBAAA,GAAAjB,OAAA;AAIA,IAAAkB,QAAA,GAAAlB,OAAA;AACA,IAAAmB,yBAAA,GAAAnB,OAAA;AACA,IAAAoB,SAAA,GAAApB,OAAA;AAeAqB,MAAA,CAAAC,IAAA,CAAAF,SAAA,EAA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 Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.CMS_ENTRY_BATCH_SCHEDULE_WAIT = void 0;
|
|
7
7
|
const batchScheduleWaitEnv = Number(process.env.WEBINY_API_CMS_ENTRY_BATCH_SCHEDULE_WAIT || "0");
|
|
8
8
|
const CMS_ENTRY_BATCH_SCHEDULE_WAIT = isNaN(batchScheduleWaitEnv) ? 0 : batchScheduleWaitEnv;
|
|
9
|
-
exports.CMS_ENTRY_BATCH_SCHEDULE_WAIT = CMS_ENTRY_BATCH_SCHEDULE_WAIT;
|
|
9
|
+
exports.CMS_ENTRY_BATCH_SCHEDULE_WAIT = CMS_ENTRY_BATCH_SCHEDULE_WAIT;
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=constants.js.map
|