@webiny/migrations 6.0.0-alpha.5 → 6.0.0-rc.0
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 +2 -7
- package/README.md +11 -1
- package/ddb-es.d.ts +1 -2
- package/ddb-es.js +2 -10
- package/ddb-es.js.map +1 -1
- package/ddb.d.ts +1 -2
- package/ddb.js +2 -10
- package/ddb.js.map +1 -1
- package/package.json +19 -22
- package/utils/createEntity.d.ts +3 -90
- package/utils/createEntity.js +3 -37
- package/utils/createEntity.js.map +1 -1
- package/utils/createTenantEntity.d.ts +2 -48
- package/utils/createTenantEntity.js +3 -10
- package/utils/createTenantEntity.js.map +1 -1
- package/utils/dynamoDb.d.ts +2 -2
- package/utils/dynamoDb.js +2 -60
- package/utils/dynamoDb.js.map +1 -1
- package/utils/elasticsearch/disableEsIndexing.js +3 -10
- package/utils/elasticsearch/disableEsIndexing.js.map +1 -1
- package/utils/elasticsearch/esCreateIndex.d.ts +0 -1
- package/utils/elasticsearch/esCreateIndex.js +8 -24
- package/utils/elasticsearch/esCreateIndex.js.map +1 -1
- package/utils/elasticsearch/esFindOne.d.ts +1 -1
- package/utils/elasticsearch/esFindOne.js +1 -8
- package/utils/elasticsearch/esFindOne.js.map +1 -1
- package/utils/elasticsearch/esGetIndexExist.d.ts +0 -1
- package/utils/elasticsearch/esGetIndexExist.js +4 -13
- package/utils/elasticsearch/esGetIndexExist.js.map +1 -1
- package/utils/elasticsearch/esGetIndexName.d.ts +0 -1
- package/utils/elasticsearch/esGetIndexName.js +8 -24
- package/utils/elasticsearch/esGetIndexName.js.map +1 -1
- package/utils/elasticsearch/esGetIndexSettings.js +5 -13
- package/utils/elasticsearch/esGetIndexSettings.js.map +1 -1
- package/utils/elasticsearch/esListIndexes.js +1 -8
- package/utils/elasticsearch/esListIndexes.js.map +1 -1
- package/utils/elasticsearch/esPutIndexSettings.js +3 -11
- package/utils/elasticsearch/esPutIndexSettings.js.map +1 -1
- package/utils/elasticsearch/esQueryAll.d.ts +1 -1
- package/utils/elasticsearch/esQueryAll.js +3 -10
- package/utils/elasticsearch/esQueryAll.js.map +1 -1
- package/utils/elasticsearch/esQueryAllWithCallback.d.ts +1 -1
- package/utils/elasticsearch/esQueryAllWithCallback.js +3 -10
- package/utils/elasticsearch/esQueryAllWithCallback.js.map +1 -1
- package/utils/elasticsearch/fetchOriginalEsSettings.js +3 -10
- package/utils/elasticsearch/fetchOriginalEsSettings.js.map +1 -1
- package/utils/elasticsearch/index.d.ts +12 -12
- package/utils/elasticsearch/index.js +12 -137
- package/utils/elasticsearch/index.js.map +1 -1
- package/utils/elasticsearch/plugins/base.js +3 -9
- package/utils/elasticsearch/plugins/base.js.map +1 -1
- package/utils/elasticsearch/plugins/index.d.ts +1 -1
- package/utils/elasticsearch/plugins/index.js +3 -11
- package/utils/elasticsearch/plugins/index.js.map +1 -1
- package/utils/elasticsearch/restoreOriginalEsSettings.js +3 -10
- package/utils/elasticsearch/restoreOriginalEsSettings.js.map +1 -1
- package/utils/getCompressedData.js +3 -10
- package/utils/getCompressedData.js.map +1 -1
- package/utils/index.d.ts +5 -7
- package/utils/index.js +5 -82
- package/utils/index.js.map +1 -1
- package/migrations/5.43.0/001/constants.d.ts +0 -2
- package/migrations/5.43.0/001/constants.js +0 -10
- package/migrations/5.43.0/001/constants.js.map +0 -1
- package/migrations/5.43.0/001/ddb/index.d.ts +0 -13
- package/migrations/5.43.0/001/ddb/index.js +0 -215
- package/migrations/5.43.0/001/ddb/index.js.map +0 -1
- package/migrations/5.43.0/001/ddb-es/index.d.ts +0 -16
- package/migrations/5.43.0/001/ddb-es/index.js +0 -257
- package/migrations/5.43.0/001/ddb-es/index.js.map +0 -1
- package/migrations/5.43.0/001/entities/createEntryEntity.d.ts +0 -91
- package/migrations/5.43.0/001/entities/createEntryEntity.js +0 -188
- package/migrations/5.43.0/001/entities/createEntryEntity.js.map +0 -1
- package/migrations/5.43.0/001/types.d.ts +0 -47
- package/migrations/5.43.0/001/types.js +0 -7
- package/migrations/5.43.0/001/types.js.map +0 -1
- package/utils/createLocaleEntity.d.ts +0 -42
- package/utils/createLocaleEntity.js +0 -32
- package/utils/createLocaleEntity.js.map +0 -1
- package/utils/elasticsearch/plugins/japanese.d.ts +0 -4
- package/utils/elasticsearch/plugins/japanese.js +0 -13
- package/utils/elasticsearch/plugins/japanese.js.map +0 -1
- package/utils/forEachTenantLocale.d.ts +0 -22
- package/utils/forEachTenantLocale.js +0 -55
- package/utils/forEachTenantLocale.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["esFindOne","elasticsearchClient","body","index","response","search","size","hits","length","_source"
|
|
1
|
+
{"version":3,"names":["esFindOne","elasticsearchClient","body","index","response","search","size","hits","length","_source"],"sources":["esFindOne.ts"],"sourcesContent":["import type { Client } from \"@elastic/elasticsearch\";\nimport type { SearchBody, ElasticsearchSearchResponse } from \"@webiny/api-elasticsearch/types.js\";\n\nexport interface EsFindOneParams {\n elasticsearchClient: Client;\n index: string;\n body: Omit<SearchBody, \"size\">;\n}\n\nexport const esFindOne = async <TItem>({ elasticsearchClient, body, index }: EsFindOneParams) => {\n const response: ElasticsearchSearchResponse<TItem> = await elasticsearchClient.search({\n index,\n body: {\n ...body,\n size: 1\n }\n });\n\n const hits = response.body.hits;\n\n if (hits.hits.length <= 0) {\n return null;\n }\n\n return hits.hits[0]._source;\n};\n"],"mappings":"AASA,OAAO,MAAMA,SAAS,GAAG,MAAAA,CAAc;EAAEC,mBAAmB;EAAEC,IAAI;EAAEC;AAAuB,CAAC,KAAK;EAC7F,MAAMC,QAA4C,GAAG,MAAMH,mBAAmB,CAACI,MAAM,CAAC;IAClFF,KAAK;IACLD,IAAI,EAAE;MACF,GAAGA,IAAI;MACPI,IAAI,EAAE;IACV;EACJ,CAAC,CAAC;EAEF,MAAMC,IAAI,GAAGH,QAAQ,CAACF,IAAI,CAACK,IAAI;EAE/B,IAAIA,IAAI,CAACA,IAAI,CAACC,MAAM,IAAI,CAAC,EAAE;IACvB,OAAO,IAAI;EACf;EAEA,OAAOD,IAAI,CAACA,IAAI,CAAC,CAAC,CAAC,CAACE,OAAO;AAC/B,CAAC","ignoreList":[]}
|
|
@@ -1,22 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.esGetIndexExist = void 0;
|
|
7
|
-
var _ = require("./..");
|
|
8
|
-
const esGetIndexExist = async params => {
|
|
1
|
+
import { esGetIndexName } from "../index.js";
|
|
2
|
+
export const esGetIndexExist = async params => {
|
|
9
3
|
const {
|
|
10
4
|
elasticsearchClient,
|
|
11
5
|
tenant,
|
|
12
|
-
locale,
|
|
13
6
|
type,
|
|
14
7
|
isHeadlessCmsModel
|
|
15
8
|
} = params;
|
|
16
9
|
try {
|
|
17
|
-
const index =
|
|
10
|
+
const index = esGetIndexName({
|
|
18
11
|
tenant,
|
|
19
|
-
locale,
|
|
20
12
|
type,
|
|
21
13
|
isHeadlessCmsModel
|
|
22
14
|
});
|
|
@@ -28,10 +20,9 @@ const esGetIndexExist = async params => {
|
|
|
28
20
|
}
|
|
29
21
|
return false;
|
|
30
22
|
} catch (ex) {
|
|
31
|
-
console.warn(`Could not find
|
|
23
|
+
console.warn(`Could not find index:`, ex.message);
|
|
32
24
|
return false;
|
|
33
25
|
}
|
|
34
26
|
};
|
|
35
|
-
exports.esGetIndexExist = esGetIndexExist;
|
|
36
27
|
|
|
37
28
|
//# sourceMappingURL=esGetIndexExist.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["esGetIndexName","esGetIndexExist","params","elasticsearchClient","tenant","type","isHeadlessCmsModel","index","response","indices","exists","body","ex","console","warn","message"],"sources":["esGetIndexExist.ts"],"sourcesContent":["import type { Client } from \"@elastic/elasticsearch\";\nimport { esGetIndexName } from \"~/utils/index.js\";\n\nexport interface GetIndexExistParams {\n elasticsearchClient: Client;\n tenant: string;\n type: string;\n isHeadlessCmsModel?: boolean;\n}\n\nexport const esGetIndexExist = async (params: GetIndexExistParams) => {\n const { elasticsearchClient, tenant, type, isHeadlessCmsModel } = params;\n\n try {\n const index = esGetIndexName({ tenant, type, isHeadlessCmsModel });\n\n const response = await elasticsearchClient.indices.exists({\n index\n });\n\n if (response.body) {\n return true;\n }\n\n return false;\n } catch (ex) {\n console.warn(`Could not find index:`, ex.message);\n return false;\n }\n};\n"],"mappings":"AACA,SAASA,cAAc;AASvB,OAAO,MAAMC,eAAe,GAAG,MAAOC,MAA2B,IAAK;EAClE,MAAM;IAAEC,mBAAmB;IAAEC,MAAM;IAAEC,IAAI;IAAEC;EAAmB,CAAC,GAAGJ,MAAM;EAExE,IAAI;IACA,MAAMK,KAAK,GAAGP,cAAc,CAAC;MAAEI,MAAM;MAAEC,IAAI;MAAEC;IAAmB,CAAC,CAAC;IAElE,MAAME,QAAQ,GAAG,MAAML,mBAAmB,CAACM,OAAO,CAACC,MAAM,CAAC;MACtDH;IACJ,CAAC,CAAC;IAEF,IAAIC,QAAQ,CAACG,IAAI,EAAE;MACf,OAAO,IAAI;IACf;IAEA,OAAO,KAAK;EAChB,CAAC,CAAC,OAAOC,EAAE,EAAE;IACTC,OAAO,CAACC,IAAI,CAAC,uBAAuB,EAAEF,EAAE,CAACG,OAAO,CAAC;IACjD,OAAO,KAAK;EAChB;AACJ,CAAC","ignoreList":[]}
|
|
@@ -1,41 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.esGetIndexName = void 0;
|
|
8
|
-
var _error = _interopRequireDefault(require("@webiny/error"));
|
|
9
|
-
var _apiElasticsearch = require("@webiny/api-elasticsearch");
|
|
10
|
-
const esGetIndexName = params => {
|
|
1
|
+
import WebinyError from "@webiny/error";
|
|
2
|
+
import { getElasticsearchIndexPrefix, isSharedElasticsearchIndex } from "@webiny/api-elasticsearch";
|
|
3
|
+
export const esGetIndexName = params => {
|
|
11
4
|
const {
|
|
12
5
|
tenant,
|
|
13
|
-
locale,
|
|
14
6
|
type,
|
|
15
7
|
isHeadlessCmsModel
|
|
16
8
|
} = params;
|
|
17
9
|
if (!type) {
|
|
18
|
-
throw new
|
|
10
|
+
throw new WebinyError(`Missing "type" parameter when trying to create Elasticsearch index name.`, "INDEX_TYPE_ERROR");
|
|
19
11
|
}
|
|
20
12
|
if (!tenant) {
|
|
21
|
-
throw new
|
|
13
|
+
throw new WebinyError(`Missing "tenant" parameter when trying to create Elasticsearch index name.`, "TENANT_ERROR");
|
|
22
14
|
}
|
|
23
|
-
const sharedIndex =
|
|
15
|
+
const sharedIndex = isSharedElasticsearchIndex();
|
|
24
16
|
const tenantId = sharedIndex ? "root" : tenant;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
if (!locale) {
|
|
28
|
-
throw new _error.default(`Missing "locale" parameter when trying to create Elasticsearch index name.`, "LOCALE_ERROR");
|
|
29
|
-
}
|
|
30
|
-
localeCode = locale;
|
|
31
|
-
}
|
|
32
|
-
const index = [tenantId, isHeadlessCmsModel && "headless-cms", localeCode, type].filter(Boolean).join("-").toLowerCase();
|
|
33
|
-
const prefix = (0, _apiElasticsearch.getElasticsearchIndexPrefix)();
|
|
17
|
+
const index = [tenantId, isHeadlessCmsModel && "headless-cms", type].filter(Boolean).join("-").toLowerCase();
|
|
18
|
+
const prefix = getElasticsearchIndexPrefix();
|
|
34
19
|
if (!prefix) {
|
|
35
20
|
return index;
|
|
36
21
|
}
|
|
37
22
|
return prefix + index;
|
|
38
23
|
};
|
|
39
|
-
exports.esGetIndexName = esGetIndexName;
|
|
40
24
|
|
|
41
25
|
//# sourceMappingURL=esGetIndexName.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["WebinyError","getElasticsearchIndexPrefix","isSharedElasticsearchIndex","esGetIndexName","params","tenant","type","isHeadlessCmsModel","sharedIndex","tenantId","index","filter","Boolean","join","toLowerCase","prefix"],"sources":["esGetIndexName.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport { getElasticsearchIndexPrefix, isSharedElasticsearchIndex } from \"@webiny/api-elasticsearch\";\n\nexport interface EsGetIndexNameParams {\n tenant: string;\n type: string;\n isHeadlessCmsModel?: boolean;\n}\n\nexport const esGetIndexName = (params: EsGetIndexNameParams) => {\n const { tenant, type, isHeadlessCmsModel } = params;\n\n if (!type) {\n throw new WebinyError(\n `Missing \"type\" parameter when trying to create Elasticsearch index name.`,\n \"INDEX_TYPE_ERROR\"\n );\n }\n\n if (!tenant) {\n throw new WebinyError(\n `Missing \"tenant\" parameter when trying to create Elasticsearch index name.`,\n \"TENANT_ERROR\"\n );\n }\n\n const sharedIndex = isSharedElasticsearchIndex();\n\n const tenantId = sharedIndex ? \"root\" : tenant;\n\n const index = [tenantId, isHeadlessCmsModel && \"headless-cms\", type]\n .filter(Boolean)\n .join(\"-\")\n .toLowerCase();\n\n const prefix = getElasticsearchIndexPrefix();\n if (!prefix) {\n return index;\n }\n return prefix + index;\n};\n"],"mappings":"AAAA,OAAOA,WAAW,MAAM,eAAe;AACvC,SAASC,2BAA2B,EAAEC,0BAA0B,QAAQ,2BAA2B;AAQnG,OAAO,MAAMC,cAAc,GAAIC,MAA4B,IAAK;EAC5D,MAAM;IAAEC,MAAM;IAAEC,IAAI;IAAEC;EAAmB,CAAC,GAAGH,MAAM;EAEnD,IAAI,CAACE,IAAI,EAAE;IACP,MAAM,IAAIN,WAAW,CACjB,0EAA0E,EAC1E,kBACJ,CAAC;EACL;EAEA,IAAI,CAACK,MAAM,EAAE;IACT,MAAM,IAAIL,WAAW,CACjB,4EAA4E,EAC5E,cACJ,CAAC;EACL;EAEA,MAAMQ,WAAW,GAAGN,0BAA0B,CAAC,CAAC;EAEhD,MAAMO,QAAQ,GAAGD,WAAW,GAAG,MAAM,GAAGH,MAAM;EAE9C,MAAMK,KAAK,GAAG,CAACD,QAAQ,EAAEF,kBAAkB,IAAI,cAAc,EAAED,IAAI,CAAC,CAC/DK,MAAM,CAACC,OAAO,CAAC,CACfC,IAAI,CAAC,GAAG,CAAC,CACTC,WAAW,CAAC,CAAC;EAElB,MAAMC,MAAM,GAAGd,2BAA2B,CAAC,CAAC;EAC5C,IAAI,CAACc,MAAM,EAAE;IACT,OAAOL,KAAK;EAChB;EACA,OAAOK,MAAM,GAAGL,KAAK;AACzB,CAAC","ignoreList":[]}
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.esGetIndexSettings = void 0;
|
|
8
|
-
var _error = _interopRequireDefault(require("@webiny/error"));
|
|
9
|
-
var _pick = _interopRequireDefault(require("lodash/pick"));
|
|
10
|
-
const esGetIndexSettings = async params => {
|
|
1
|
+
import WebinyError from "@webiny/error";
|
|
2
|
+
import pick from "lodash/pick.js";
|
|
3
|
+
export const esGetIndexSettings = async params => {
|
|
11
4
|
const {
|
|
12
5
|
elasticsearchClient,
|
|
13
6
|
index,
|
|
@@ -18,15 +11,14 @@ const esGetIndexSettings = async params => {
|
|
|
18
11
|
index
|
|
19
12
|
});
|
|
20
13
|
const settings = response.body[index].settings.index;
|
|
21
|
-
return (
|
|
14
|
+
return pick(settings, fields);
|
|
22
15
|
} catch (ex) {
|
|
23
|
-
throw new
|
|
16
|
+
throw new WebinyError(ex.message || "Could not get Elasticsearch index settings.", ex.code || "GET_OPENSEARCH_INDEX_SETTINGS_ERROR", {
|
|
24
17
|
error: ex,
|
|
25
18
|
index,
|
|
26
19
|
fields
|
|
27
20
|
});
|
|
28
21
|
}
|
|
29
22
|
};
|
|
30
|
-
exports.esGetIndexSettings = esGetIndexSettings;
|
|
31
23
|
|
|
32
24
|
//# sourceMappingURL=esGetIndexSettings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["WebinyError","pick","esGetIndexSettings","params","elasticsearchClient","index","fields","response","indices","getSettings","settings","body","ex","message","code","error"],"sources":["esGetIndexSettings.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport type { Client } from \"@elastic/elasticsearch\";\nimport pick from \"lodash/pick.js\";\n\nexport interface GetIndexSettingsParams {\n elasticsearchClient: Client;\n index: string;\n fields: string[];\n}\n\nexport const esGetIndexSettings = async (params: GetIndexSettingsParams) => {\n const { elasticsearchClient, index, fields } = params;\n\n try {\n const response = await elasticsearchClient.indices.getSettings({\n index\n });\n\n const settings = response.body[index].settings.index;\n\n return pick(settings, fields);\n } catch (ex) {\n throw new WebinyError(\n ex.message || \"Could not get Elasticsearch index settings.\",\n ex.code || \"GET_OPENSEARCH_INDEX_SETTINGS_ERROR\",\n {\n error: ex,\n index,\n fields\n }\n );\n }\n};\n"],"mappings":"AAAA,OAAOA,WAAW,MAAM,eAAe;AAEvC,OAAOC,IAAI,MAAM,gBAAgB;AAQjC,OAAO,MAAMC,kBAAkB,GAAG,MAAOC,MAA8B,IAAK;EACxE,MAAM;IAAEC,mBAAmB;IAAEC,KAAK;IAAEC;EAAO,CAAC,GAAGH,MAAM;EAErD,IAAI;IACA,MAAMI,QAAQ,GAAG,MAAMH,mBAAmB,CAACI,OAAO,CAACC,WAAW,CAAC;MAC3DJ;IACJ,CAAC,CAAC;IAEF,MAAMK,QAAQ,GAAGH,QAAQ,CAACI,IAAI,CAACN,KAAK,CAAC,CAACK,QAAQ,CAACL,KAAK;IAEpD,OAAOJ,IAAI,CAACS,QAAQ,EAAEJ,MAAM,CAAC;EACjC,CAAC,CAAC,OAAOM,EAAE,EAAE;IACT,MAAM,IAAIZ,WAAW,CACjBY,EAAE,CAACC,OAAO,IAAI,6CAA6C,EAC3DD,EAAE,CAACE,IAAI,IAAI,qCAAqC,EAChD;MACIC,KAAK,EAAEH,EAAE;MACTP,KAAK;MACLC;IACJ,CACJ,CAAC;EACL;AACJ,CAAC","ignoreList":[]}
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.esListIndexes = void 0;
|
|
7
|
-
const esListIndexes = async params => {
|
|
1
|
+
export const esListIndexes = async params => {
|
|
8
2
|
const {
|
|
9
3
|
elasticsearchClient
|
|
10
4
|
} = params;
|
|
@@ -18,6 +12,5 @@ const esListIndexes = async params => {
|
|
|
18
12
|
}
|
|
19
13
|
return listOfIndexes;
|
|
20
14
|
};
|
|
21
|
-
exports.esListIndexes = esListIndexes;
|
|
22
15
|
|
|
23
16
|
//# sourceMappingURL=esListIndexes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["esListIndexes","params","elasticsearchClient","response","cat","indices","format","listOfIndexes","body","map","item","index","match","filter","includes"
|
|
1
|
+
{"version":3,"names":["esListIndexes","params","elasticsearchClient","response","cat","indices","format","listOfIndexes","body","map","item","index","match","filter","includes"],"sources":["esListIndexes.ts"],"sourcesContent":["import type { Client } from \"@elastic/elasticsearch\";\n\nexport interface ListIndexesParams {\n elasticsearchClient: Client;\n match?: string;\n}\n\ntype IndicesApiResponse = Array<Record<string, string>>;\n\nexport const esListIndexes = async (params: ListIndexesParams): Promise<string[]> => {\n const { elasticsearchClient } = params;\n\n const response = await elasticsearchClient.cat.indices<IndicesApiResponse>({\n format: \"json\"\n });\n\n const listOfIndexes = response.body.map(item => item.index);\n\n const match = params.match;\n if (match) {\n return listOfIndexes.filter(index => index.includes(match));\n }\n\n return listOfIndexes;\n};\n"],"mappings":"AASA,OAAO,MAAMA,aAAa,GAAG,MAAOC,MAAyB,IAAwB;EACjF,MAAM;IAAEC;EAAoB,CAAC,GAAGD,MAAM;EAEtC,MAAME,QAAQ,GAAG,MAAMD,mBAAmB,CAACE,GAAG,CAACC,OAAO,CAAqB;IACvEC,MAAM,EAAE;EACZ,CAAC,CAAC;EAEF,MAAMC,aAAa,GAAGJ,QAAQ,CAACK,IAAI,CAACC,GAAG,CAACC,IAAI,IAAIA,IAAI,CAACC,KAAK,CAAC;EAE3D,MAAMC,KAAK,GAAGX,MAAM,CAACW,KAAK;EAC1B,IAAIA,KAAK,EAAE;IACP,OAAOL,aAAa,CAACM,MAAM,CAACF,KAAK,IAAIA,KAAK,CAACG,QAAQ,CAACF,KAAK,CAAC,CAAC;EAC/D;EAEA,OAAOL,aAAa;AACxB,CAAC","ignoreList":[]}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.esPutIndexSettings = void 0;
|
|
8
|
-
var _error = _interopRequireDefault(require("@webiny/error"));
|
|
9
|
-
const esPutIndexSettings = async params => {
|
|
1
|
+
import WebinyError from "@webiny/error";
|
|
2
|
+
export const esPutIndexSettings = async params => {
|
|
10
3
|
const {
|
|
11
4
|
elasticsearchClient,
|
|
12
5
|
index,
|
|
@@ -18,13 +11,12 @@ const esPutIndexSettings = async params => {
|
|
|
18
11
|
body: settings
|
|
19
12
|
});
|
|
20
13
|
} catch (ex) {
|
|
21
|
-
throw new
|
|
14
|
+
throw new WebinyError(ex.message || "Could not put Elasticsearch index settings.", ex.code || "PUT_OPENSEARCH_INDEX_SETTINGS_ERROR", {
|
|
22
15
|
error: ex,
|
|
23
16
|
index,
|
|
24
17
|
settings
|
|
25
18
|
});
|
|
26
19
|
}
|
|
27
20
|
};
|
|
28
|
-
exports.esPutIndexSettings = esPutIndexSettings;
|
|
29
21
|
|
|
30
22
|
//# sourceMappingURL=esPutIndexSettings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["WebinyError","esPutIndexSettings","params","elasticsearchClient","index","settings","indices","putSettings","body","ex","message","code","error"],"sources":["esPutIndexSettings.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport type { Client } from \"@elastic/elasticsearch\";\n\nexport interface PutIndexSettingsParams {\n elasticsearchClient: Client;\n index: string;\n settings: Record<string, any>;\n}\n\nexport const esPutIndexSettings = async (params: PutIndexSettingsParams) => {\n const { elasticsearchClient, index, settings } = params;\n\n try {\n await elasticsearchClient.indices.putSettings({\n index,\n body: settings\n });\n } catch (ex) {\n throw new WebinyError(\n ex.message || \"Could not put Elasticsearch index settings.\",\n ex.code || \"PUT_OPENSEARCH_INDEX_SETTINGS_ERROR\",\n {\n error: ex,\n index,\n settings\n }\n );\n }\n};\n"],"mappings":"AAAA,OAAOA,WAAW,MAAM,eAAe;AASvC,OAAO,MAAMC,kBAAkB,GAAG,MAAOC,MAA8B,IAAK;EACxE,MAAM;IAAEC,mBAAmB;IAAEC,KAAK;IAAEC;EAAS,CAAC,GAAGH,MAAM;EAEvD,IAAI;IACA,MAAMC,mBAAmB,CAACG,OAAO,CAACC,WAAW,CAAC;MAC1CH,KAAK;MACLI,IAAI,EAAEH;IACV,CAAC,CAAC;EACN,CAAC,CAAC,OAAOI,EAAE,EAAE;IACT,MAAM,IAAIT,WAAW,CACjBS,EAAE,CAACC,OAAO,IAAI,6CAA6C,EAC3DD,EAAE,CAACE,IAAI,IAAI,qCAAqC,EAChD;MACIC,KAAK,EAAEH,EAAE;MACTL,KAAK;MACLC;IACJ,CACJ,CAAC;EACL;AACJ,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Client } from "@elastic/elasticsearch";
|
|
2
|
-
import type { SearchBody } from "@webiny/api-elasticsearch/types";
|
|
2
|
+
import type { SearchBody } from "@webiny/api-elasticsearch/types.js";
|
|
3
3
|
export interface EsQueryAllParams {
|
|
4
4
|
elasticsearchClient: Client;
|
|
5
5
|
index: string;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.esQueryAll = void 0;
|
|
7
|
-
var _utils = require("@webiny/utils");
|
|
8
|
-
const esQueryAll = async ({
|
|
1
|
+
import { executeWithRetry } from "@webiny/utils";
|
|
2
|
+
export const esQueryAll = async ({
|
|
9
3
|
elasticsearchClient,
|
|
10
4
|
body,
|
|
11
5
|
index
|
|
@@ -16,11 +10,10 @@ const esQueryAll = async ({
|
|
|
16
10
|
body
|
|
17
11
|
});
|
|
18
12
|
};
|
|
19
|
-
const response = await
|
|
13
|
+
const response = await executeWithRetry(search);
|
|
20
14
|
return response.body.hits.hits.map(item => {
|
|
21
15
|
return item._source;
|
|
22
16
|
});
|
|
23
17
|
};
|
|
24
|
-
exports.esQueryAll = esQueryAll;
|
|
25
18
|
|
|
26
19
|
//# sourceMappingURL=esQueryAll.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["executeWithRetry","esQueryAll","elasticsearchClient","body","index","search","response","hits","map","item","_source"],"sources":["esQueryAll.ts"],"sourcesContent":["import type { Client } from \"@elastic/elasticsearch\";\nimport type { ElasticsearchSearchResponse, SearchBody } from \"@webiny/api-elasticsearch/types.js\";\nimport { executeWithRetry } from \"@webiny/utils\";\n\nexport interface EsQueryAllParams {\n elasticsearchClient: Client;\n index: string;\n body: SearchBody;\n}\n\nexport const esQueryAll = async <TItem>({ elasticsearchClient, body, index }: EsQueryAllParams) => {\n const search = async (): Promise<ElasticsearchSearchResponse<TItem>> => {\n return elasticsearchClient.search({\n index,\n body\n });\n };\n\n const response = await executeWithRetry(search);\n\n return response.body.hits.hits.map(item => {\n return item._source;\n });\n};\n"],"mappings":"AAEA,SAASA,gBAAgB,QAAQ,eAAe;AAQhD,OAAO,MAAMC,UAAU,GAAG,MAAAA,CAAc;EAAEC,mBAAmB;EAAEC,IAAI;EAAEC;AAAwB,CAAC,KAAK;EAC/F,MAAMC,MAAM,GAAG,MAAAA,CAAA,KAAyD;IACpE,OAAOH,mBAAmB,CAACG,MAAM,CAAC;MAC9BD,KAAK;MACLD;IACJ,CAAC,CAAC;EACN,CAAC;EAED,MAAMG,QAAQ,GAAG,MAAMN,gBAAgB,CAACK,MAAM,CAAC;EAE/C,OAAOC,QAAQ,CAACH,IAAI,CAACI,IAAI,CAACA,IAAI,CAACC,GAAG,CAACC,IAAI,IAAI;IACvC,OAAOA,IAAI,CAACC,OAAO;EACvB,CAAC,CAAC;AACN,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Client } from "@elastic/elasticsearch";
|
|
2
|
-
import type { SearchBody } from "@webiny/api-elasticsearch/types";
|
|
2
|
+
import type { SearchBody } from "@webiny/api-elasticsearch/types.js";
|
|
3
3
|
export interface EsQueryAllWithCallbackParams<TItem> {
|
|
4
4
|
elasticsearchClient: Client;
|
|
5
5
|
index: string;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.esQueryAllWithCallback = void 0;
|
|
7
|
-
var _utils = require("@webiny/utils");
|
|
8
|
-
const esQueryAllWithCallback = async ({
|
|
1
|
+
import { executeWithRetry } from "@webiny/utils";
|
|
2
|
+
export const esQueryAllWithCallback = async ({
|
|
9
3
|
elasticsearchClient,
|
|
10
4
|
body,
|
|
11
5
|
index,
|
|
@@ -25,7 +19,7 @@ const esQueryAllWithCallback = async ({
|
|
|
25
19
|
});
|
|
26
20
|
};
|
|
27
21
|
try {
|
|
28
|
-
const response = await
|
|
22
|
+
const response = await executeWithRetry(search);
|
|
29
23
|
const hits = response.body.hits;
|
|
30
24
|
if (hits.hits.length <= 0) {
|
|
31
25
|
break;
|
|
@@ -40,6 +34,5 @@ const esQueryAllWithCallback = async ({
|
|
|
40
34
|
}
|
|
41
35
|
}
|
|
42
36
|
};
|
|
43
|
-
exports.esQueryAllWithCallback = esQueryAllWithCallback;
|
|
44
37
|
|
|
45
38
|
//# sourceMappingURL=esQueryAllWithCallback.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["executeWithRetry","esQueryAllWithCallback","elasticsearchClient","body","index","callback","onError","cursor","search_after","bodyWithCursor","search","response","hits","length","sort","map","item","_source","ex"],"sources":["esQueryAllWithCallback.ts"],"sourcesContent":["import type { Client } from \"@elastic/elasticsearch\";\nimport type {\n ElasticsearchSearchResponse,\n PrimitiveValue,\n SearchBody\n} from \"@webiny/api-elasticsearch/types.js\";\nimport { executeWithRetry } from \"@webiny/utils\";\n\nexport interface EsQueryAllWithCallbackParams<TItem> {\n elasticsearchClient: Client;\n index: string;\n body: SearchBody;\n callback: (items: TItem[], cursor: string[]) => Promise<void>;\n onError?: (error: Error) => Promise<void> | void;\n}\n\nexport const esQueryAllWithCallback = async <TItem>({\n elasticsearchClient,\n body,\n index,\n callback,\n onError\n}: EsQueryAllWithCallbackParams<TItem>) => {\n let cursor: PrimitiveValue[] | undefined = body.search_after;\n while (true) {\n const bodyWithCursor = { ...body, search_after: cursor };\n\n const search = async (): Promise<ElasticsearchSearchResponse<TItem>> => {\n return elasticsearchClient.search({\n index,\n body: bodyWithCursor\n });\n };\n\n try {\n const response = await executeWithRetry(search);\n\n const hits = response.body.hits;\n if (hits.hits.length <= 0) {\n break;\n }\n\n cursor = hits.hits[hits.hits.length - 1].sort as unknown as string[];\n await callback(\n hits.hits.map(item => item._source),\n cursor as string[]\n );\n } catch (ex) {\n if (!onError) {\n throw ex;\n }\n await onError(ex);\n }\n }\n};\n"],"mappings":"AAMA,SAASA,gBAAgB,QAAQ,eAAe;AAUhD,OAAO,MAAMC,sBAAsB,GAAG,MAAAA,CAAc;EAChDC,mBAAmB;EACnBC,IAAI;EACJC,KAAK;EACLC,QAAQ;EACRC;AACiC,CAAC,KAAK;EACvC,IAAIC,MAAoC,GAAGJ,IAAI,CAACK,YAAY;EAC5D,OAAO,IAAI,EAAE;IACT,MAAMC,cAAc,GAAG;MAAE,GAAGN,IAAI;MAAEK,YAAY,EAAED;IAAO,CAAC;IAExD,MAAMG,MAAM,GAAG,MAAAA,CAAA,KAAyD;MACpE,OAAOR,mBAAmB,CAACQ,MAAM,CAAC;QAC9BN,KAAK;QACLD,IAAI,EAAEM;MACV,CAAC,CAAC;IACN,CAAC;IAED,IAAI;MACA,MAAME,QAAQ,GAAG,MAAMX,gBAAgB,CAACU,MAAM,CAAC;MAE/C,MAAME,IAAI,GAAGD,QAAQ,CAACR,IAAI,CAACS,IAAI;MAC/B,IAAIA,IAAI,CAACA,IAAI,CAACC,MAAM,IAAI,CAAC,EAAE;QACvB;MACJ;MAEAN,MAAM,GAAGK,IAAI,CAACA,IAAI,CAACA,IAAI,CAACA,IAAI,CAACC,MAAM,GAAG,CAAC,CAAC,CAACC,IAA2B;MACpE,MAAMT,QAAQ,CACVO,IAAI,CAACA,IAAI,CAACG,GAAG,CAACC,IAAI,IAAIA,IAAI,CAACC,OAAO,CAAC,EACnCV,MACJ,CAAC;IACL,CAAC,CAAC,OAAOW,EAAE,EAAE;MACT,IAAI,CAACZ,OAAO,EAAE;QACV,MAAMY,EAAE;MACZ;MACA,MAAMZ,OAAO,CAACY,EAAE,CAAC;IACrB;EACJ;AACJ,CAAC","ignoreList":[]}
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.fetchOriginalElasticsearchSettings = void 0;
|
|
7
|
-
var _ = require("./..");
|
|
8
|
-
const fetchOriginalElasticsearchSettings = async params => {
|
|
1
|
+
import { esGetIndexSettings } from "../index.js";
|
|
2
|
+
export const fetchOriginalElasticsearchSettings = async params => {
|
|
9
3
|
const {
|
|
10
4
|
index,
|
|
11
5
|
logger
|
|
12
6
|
} = params;
|
|
13
7
|
try {
|
|
14
|
-
const settings = await
|
|
8
|
+
const settings = await esGetIndexSettings({
|
|
15
9
|
elasticsearchClient: params.elasticsearchClient,
|
|
16
10
|
index,
|
|
17
11
|
fields: ["refresh_interval"]
|
|
@@ -30,6 +24,5 @@ const fetchOriginalElasticsearchSettings = async params => {
|
|
|
30
24
|
}
|
|
31
25
|
return null;
|
|
32
26
|
};
|
|
33
|
-
exports.fetchOriginalElasticsearchSettings = fetchOriginalElasticsearchSettings;
|
|
34
27
|
|
|
35
28
|
//# sourceMappingURL=fetchOriginalEsSettings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["esGetIndexSettings","fetchOriginalElasticsearchSettings","params","index","logger","settings","elasticsearchClient","fields","refresh_interval","ex","error","message","code","data"],"sources":["fetchOriginalEsSettings.ts"],"sourcesContent":["import { esGetIndexSettings } from \"~/utils/index.js\";\nimport type { Logger } from \"@webiny/data-migration\";\nimport type { Client } from \"@elastic/elasticsearch\";\n\ninterface FetchOriginalElasticsearchSettingsParams {\n elasticsearchClient: Client;\n index: string;\n logger: Logger;\n}\n\ninterface IndexSettings {\n refresh_interval: `${number}s`;\n}\n\nexport const fetchOriginalElasticsearchSettings = async (\n params: FetchOriginalElasticsearchSettingsParams\n): Promise<IndexSettings | null> => {\n const { index, logger } = params;\n try {\n const settings = await esGetIndexSettings({\n elasticsearchClient: params.elasticsearchClient,\n index,\n fields: [\"refresh_interval\"]\n });\n return {\n refresh_interval: settings.refresh_interval || \"1s\"\n };\n } catch (ex) {\n logger.error(`Failed to fetch original Elasticsearch settings for index \"${index}\".`);\n logger.error({\n ...ex,\n message: ex.message,\n code: ex.code,\n data: ex.data\n });\n }\n\n return null;\n};\n"],"mappings":"AAAA,SAASA,kBAAkB;AAc3B,OAAO,MAAMC,kCAAkC,GAAG,MAC9CC,MAAgD,IAChB;EAChC,MAAM;IAAEC,KAAK;IAAEC;EAAO,CAAC,GAAGF,MAAM;EAChC,IAAI;IACA,MAAMG,QAAQ,GAAG,MAAML,kBAAkB,CAAC;MACtCM,mBAAmB,EAAEJ,MAAM,CAACI,mBAAmB;MAC/CH,KAAK;MACLI,MAAM,EAAE,CAAC,kBAAkB;IAC/B,CAAC,CAAC;IACF,OAAO;MACHC,gBAAgB,EAAEH,QAAQ,CAACG,gBAAgB,IAAI;IACnD,CAAC;EACL,CAAC,CAAC,OAAOC,EAAE,EAAE;IACTL,MAAM,CAACM,KAAK,CAAC,8DAA8DP,KAAK,IAAI,CAAC;IACrFC,MAAM,CAACM,KAAK,CAAC;MACT,GAAGD,EAAE;MACLE,OAAO,EAAEF,EAAE,CAACE,OAAO;MACnBC,IAAI,EAAEH,EAAE,CAACG,IAAI;MACbC,IAAI,EAAEJ,EAAE,CAACI;IACb,CAAC,CAAC;EACN;EAEA,OAAO,IAAI;AACf,CAAC","ignoreList":[]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export * from "./esCreateIndex";
|
|
2
|
-
export * from "./esFindOne";
|
|
3
|
-
export * from "./esGetIndexExist";
|
|
4
|
-
export * from "./esGetIndexName";
|
|
5
|
-
export * from "./esGetIndexSettings";
|
|
6
|
-
export * from "./esPutIndexSettings";
|
|
7
|
-
export * from "./esQueryAllWithCallback";
|
|
8
|
-
export * from "./esQueryAll";
|
|
9
|
-
export * from "./esListIndexes";
|
|
10
|
-
export * from "./disableEsIndexing";
|
|
11
|
-
export * from "./fetchOriginalEsSettings";
|
|
12
|
-
export * from "./restoreOriginalEsSettings";
|
|
1
|
+
export * from "./esCreateIndex.js";
|
|
2
|
+
export * from "./esFindOne.js";
|
|
3
|
+
export * from "./esGetIndexExist.js";
|
|
4
|
+
export * from "./esGetIndexName.js";
|
|
5
|
+
export * from "./esGetIndexSettings.js";
|
|
6
|
+
export * from "./esPutIndexSettings.js";
|
|
7
|
+
export * from "./esQueryAllWithCallback.js";
|
|
8
|
+
export * from "./esQueryAll.js";
|
|
9
|
+
export * from "./esListIndexes.js";
|
|
10
|
+
export * from "./disableEsIndexing.js";
|
|
11
|
+
export * from "./fetchOriginalEsSettings.js";
|
|
12
|
+
export * from "./restoreOriginalEsSettings.js";
|
|
@@ -1,139 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return _esCreateIndex[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _esFindOne = require("./esFindOne");
|
|
18
|
-
Object.keys(_esFindOne).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _esFindOne[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () {
|
|
24
|
-
return _esFindOne[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
var _esGetIndexExist = require("./esGetIndexExist");
|
|
29
|
-
Object.keys(_esGetIndexExist).forEach(function (key) {
|
|
30
|
-
if (key === "default" || key === "__esModule") return;
|
|
31
|
-
if (key in exports && exports[key] === _esGetIndexExist[key]) return;
|
|
32
|
-
Object.defineProperty(exports, key, {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function () {
|
|
35
|
-
return _esGetIndexExist[key];
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
var _esGetIndexName = require("./esGetIndexName");
|
|
40
|
-
Object.keys(_esGetIndexName).forEach(function (key) {
|
|
41
|
-
if (key === "default" || key === "__esModule") return;
|
|
42
|
-
if (key in exports && exports[key] === _esGetIndexName[key]) return;
|
|
43
|
-
Object.defineProperty(exports, key, {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function () {
|
|
46
|
-
return _esGetIndexName[key];
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
var _esGetIndexSettings = require("./esGetIndexSettings");
|
|
51
|
-
Object.keys(_esGetIndexSettings).forEach(function (key) {
|
|
52
|
-
if (key === "default" || key === "__esModule") return;
|
|
53
|
-
if (key in exports && exports[key] === _esGetIndexSettings[key]) return;
|
|
54
|
-
Object.defineProperty(exports, key, {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function () {
|
|
57
|
-
return _esGetIndexSettings[key];
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
var _esPutIndexSettings = require("./esPutIndexSettings");
|
|
62
|
-
Object.keys(_esPutIndexSettings).forEach(function (key) {
|
|
63
|
-
if (key === "default" || key === "__esModule") return;
|
|
64
|
-
if (key in exports && exports[key] === _esPutIndexSettings[key]) return;
|
|
65
|
-
Object.defineProperty(exports, key, {
|
|
66
|
-
enumerable: true,
|
|
67
|
-
get: function () {
|
|
68
|
-
return _esPutIndexSettings[key];
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
var _esQueryAllWithCallback = require("./esQueryAllWithCallback");
|
|
73
|
-
Object.keys(_esQueryAllWithCallback).forEach(function (key) {
|
|
74
|
-
if (key === "default" || key === "__esModule") return;
|
|
75
|
-
if (key in exports && exports[key] === _esQueryAllWithCallback[key]) return;
|
|
76
|
-
Object.defineProperty(exports, key, {
|
|
77
|
-
enumerable: true,
|
|
78
|
-
get: function () {
|
|
79
|
-
return _esQueryAllWithCallback[key];
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
var _esQueryAll = require("./esQueryAll");
|
|
84
|
-
Object.keys(_esQueryAll).forEach(function (key) {
|
|
85
|
-
if (key === "default" || key === "__esModule") return;
|
|
86
|
-
if (key in exports && exports[key] === _esQueryAll[key]) return;
|
|
87
|
-
Object.defineProperty(exports, key, {
|
|
88
|
-
enumerable: true,
|
|
89
|
-
get: function () {
|
|
90
|
-
return _esQueryAll[key];
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
var _esListIndexes = require("./esListIndexes");
|
|
95
|
-
Object.keys(_esListIndexes).forEach(function (key) {
|
|
96
|
-
if (key === "default" || key === "__esModule") return;
|
|
97
|
-
if (key in exports && exports[key] === _esListIndexes[key]) return;
|
|
98
|
-
Object.defineProperty(exports, key, {
|
|
99
|
-
enumerable: true,
|
|
100
|
-
get: function () {
|
|
101
|
-
return _esListIndexes[key];
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
var _disableEsIndexing = require("./disableEsIndexing");
|
|
106
|
-
Object.keys(_disableEsIndexing).forEach(function (key) {
|
|
107
|
-
if (key === "default" || key === "__esModule") return;
|
|
108
|
-
if (key in exports && exports[key] === _disableEsIndexing[key]) return;
|
|
109
|
-
Object.defineProperty(exports, key, {
|
|
110
|
-
enumerable: true,
|
|
111
|
-
get: function () {
|
|
112
|
-
return _disableEsIndexing[key];
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
});
|
|
116
|
-
var _fetchOriginalEsSettings = require("./fetchOriginalEsSettings");
|
|
117
|
-
Object.keys(_fetchOriginalEsSettings).forEach(function (key) {
|
|
118
|
-
if (key === "default" || key === "__esModule") return;
|
|
119
|
-
if (key in exports && exports[key] === _fetchOriginalEsSettings[key]) return;
|
|
120
|
-
Object.defineProperty(exports, key, {
|
|
121
|
-
enumerable: true,
|
|
122
|
-
get: function () {
|
|
123
|
-
return _fetchOriginalEsSettings[key];
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
var _restoreOriginalEsSettings = require("./restoreOriginalEsSettings");
|
|
128
|
-
Object.keys(_restoreOriginalEsSettings).forEach(function (key) {
|
|
129
|
-
if (key === "default" || key === "__esModule") return;
|
|
130
|
-
if (key in exports && exports[key] === _restoreOriginalEsSettings[key]) return;
|
|
131
|
-
Object.defineProperty(exports, key, {
|
|
132
|
-
enumerable: true,
|
|
133
|
-
get: function () {
|
|
134
|
-
return _restoreOriginalEsSettings[key];
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
});
|
|
1
|
+
export * from "./esCreateIndex.js";
|
|
2
|
+
export * from "./esFindOne.js";
|
|
3
|
+
export * from "./esGetIndexExist.js";
|
|
4
|
+
export * from "./esGetIndexName.js";
|
|
5
|
+
export * from "./esGetIndexSettings.js";
|
|
6
|
+
export * from "./esPutIndexSettings.js";
|
|
7
|
+
export * from "./esQueryAllWithCallback.js";
|
|
8
|
+
export * from "./esQueryAll.js";
|
|
9
|
+
export * from "./esListIndexes.js";
|
|
10
|
+
export * from "./disableEsIndexing.js";
|
|
11
|
+
export * from "./fetchOriginalEsSettings.js";
|
|
12
|
+
export * from "./restoreOriginalEsSettings.js";
|
|
138
13
|
|
|
139
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./esCreateIndex.js\";\nexport * from \"./esFindOne.js\";\nexport * from \"./esGetIndexExist.js\";\nexport * from \"./esGetIndexName.js\";\nexport * from \"./esGetIndexSettings.js\";\nexport * from \"./esPutIndexSettings.js\";\nexport * from \"./esQueryAllWithCallback.js\";\nexport * from \"./esQueryAll.js\";\nexport * from \"./esListIndexes.js\";\nexport * from \"./disableEsIndexing.js\";\nexport * from \"./fetchOriginalEsSettings.js\";\nexport * from \"./restoreOriginalEsSettings.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.base = void 0;
|
|
7
|
-
var _apiElasticsearch = require("@webiny/api-elasticsearch");
|
|
8
|
-
const base = exports.base = {
|
|
9
|
-
body: (0, _apiElasticsearch.getBaseConfiguration)()
|
|
1
|
+
import { getBaseConfiguration } from "@webiny/api-elasticsearch";
|
|
2
|
+
export const base = {
|
|
3
|
+
body: getBaseConfiguration()
|
|
10
4
|
};
|
|
11
5
|
|
|
12
6
|
//# sourceMappingURL=base.js.map
|