@webiny/api-opensearch 0.0.0-unstable.0d717d18dd → 0.0.0-unstable.5387e5f7c8
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/features/OpenSearchIndex/feature.js +1 -1
- package/features/OpenSearchIndex/feature.js.map +1 -1
- package/features/OpenSearchQueryBuilderOperator/feature.js +1 -1
- package/features/OpenSearchQueryBuilderOperator/feature.js.map +1 -1
- package/index.d.ts +0 -1
- package/index.js +0 -1
- package/package.json +7 -11
- package/db/entity.d.ts +0 -7
- package/db/entity.js +0 -18
- package/db/entity.js.map +0 -1
- package/db/index.d.ts +0 -3
- package/db/index.js +0 -3
- package/db/table.d.ts +0 -7
- package/db/table.js +0 -13
- package/db/table.js.map +0 -1
- package/db/types.d.ts +0 -6
- package/db/types.js +0 -0
|
@@ -3,7 +3,7 @@ import { OpenSearchIndexRegistry } from "./OpenSearchIndexRegistry.js";
|
|
|
3
3
|
const OpenSearchIndexFeature = createFeature({
|
|
4
4
|
name: "opensearch.internal.index",
|
|
5
5
|
register (container) {
|
|
6
|
-
container.register(OpenSearchIndexRegistry).
|
|
6
|
+
container.register(OpenSearchIndexRegistry).inContainerScope();
|
|
7
7
|
}
|
|
8
8
|
});
|
|
9
9
|
export { OpenSearchIndexFeature };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/OpenSearchIndex/feature.js","sources":["../../../src/features/OpenSearchIndex/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/api/index.js\";\nimport { OpenSearchIndexRegistry } from \"./OpenSearchIndexRegistry.js\";\n\nexport const OpenSearchIndexFeature = createFeature({\n name: \"opensearch.internal.index\",\n register(container) {\n container.register(OpenSearchIndexRegistry).
|
|
1
|
+
{"version":3,"file":"features/OpenSearchIndex/feature.js","sources":["../../../src/features/OpenSearchIndex/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/api/index.js\";\nimport { OpenSearchIndexRegistry } from \"./OpenSearchIndexRegistry.js\";\n\nexport const OpenSearchIndexFeature = createFeature({\n name: \"opensearch.internal.index\",\n register(container) {\n // Container scoped: each request builds the registry from its own container, so indexes that\n // extensions register per request are included. As a singleton it would be built once, from\n // the root container's registrations only (@webiny/di builds a singleton from the container\n // that registers it), and would never see indexes registered in a request container.\n container.register(OpenSearchIndexRegistry).inContainerScope();\n }\n});\n"],"names":["OpenSearchIndexFeature","createFeature","container","OpenSearchIndexRegistry"],"mappings":";;AAGO,MAAMA,yBAAyBC,cAAc;IAChD,MAAM;IACN,UAASC,SAAS;QAKdA,UAAU,QAAQ,CAACC,yBAAyB,gBAAgB;IAChE;AACJ"}
|
|
@@ -33,7 +33,7 @@ const OpenSearchQueryBuilderOperatorFeature = createFeature({
|
|
|
33
33
|
container.register(NotIn).inSingletonScope();
|
|
34
34
|
container.register(StartsWith).inSingletonScope();
|
|
35
35
|
container.register(NotStartsWith).inSingletonScope();
|
|
36
|
-
container.register(OpenSearchQueryBuilderOperatorRegistry).
|
|
36
|
+
container.register(OpenSearchQueryBuilderOperatorRegistry).inContainerScope();
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
39
|
export { OpenSearchQueryBuilderOperatorFeature };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/OpenSearchQueryBuilderOperator/feature.js","sources":["../../../src/features/OpenSearchQueryBuilderOperator/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/api/index.js\";\nimport { OpenSearchQueryBuilderOperatorRegistry } from \"./OpenSearchQueryBuilderOperatorRegistry.js\";\nimport { Equal } from \"./operators/Equal.js\";\nimport { Not } from \"./operators/Not.js\";\nimport { Contains } from \"./operators/Contains.js\";\nimport { NotContains } from \"./operators/NotContains.js\";\nimport { Between } from \"./operators/Between.js\";\nimport { NotBetween } from \"./operators/NotBetween.js\";\nimport { GreaterThan } from \"./operators/GreaterThan.js\";\nimport { GreaterThanOrEqual } from \"./operators/GreaterThanOrEqual.js\";\nimport { LesserThan } from \"./operators/LesserThan.js\";\nimport { LesserThanOrEqual } from \"./operators/LesserThanOrEqual.js\";\nimport { In } from \"./operators/In.js\";\nimport { AndIn } from \"./operators/AndIn.js\";\nimport { NotIn } from \"./operators/NotIn.js\";\nimport { StartsWith } from \"./operators/StartsWith.js\";\nimport { NotStartsWith } from \"./operators/NotStartsWith.js\";\n\nexport const OpenSearchQueryBuilderOperatorFeature = createFeature({\n name: \"opensearch.internal.queryBuilderOperator\",\n register(container) {\n container.register(Equal).inSingletonScope();\n container.register(Not).inSingletonScope();\n container.register(Contains).inSingletonScope();\n container.register(NotContains).inSingletonScope();\n container.register(Between).inSingletonScope();\n container.register(NotBetween).inSingletonScope();\n container.register(GreaterThan).inSingletonScope();\n container.register(GreaterThanOrEqual).inSingletonScope();\n container.register(LesserThan).inSingletonScope();\n container.register(LesserThanOrEqual).inSingletonScope();\n container.register(In).inSingletonScope();\n container.register(AndIn).inSingletonScope();\n container.register(NotIn).inSingletonScope();\n container.register(StartsWith).inSingletonScope();\n container.register(NotStartsWith).inSingletonScope();\n container.register(OpenSearchQueryBuilderOperatorRegistry).
|
|
1
|
+
{"version":3,"file":"features/OpenSearchQueryBuilderOperator/feature.js","sources":["../../../src/features/OpenSearchQueryBuilderOperator/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/api/index.js\";\nimport { OpenSearchQueryBuilderOperatorRegistry } from \"./OpenSearchQueryBuilderOperatorRegistry.js\";\nimport { Equal } from \"./operators/Equal.js\";\nimport { Not } from \"./operators/Not.js\";\nimport { Contains } from \"./operators/Contains.js\";\nimport { NotContains } from \"./operators/NotContains.js\";\nimport { Between } from \"./operators/Between.js\";\nimport { NotBetween } from \"./operators/NotBetween.js\";\nimport { GreaterThan } from \"./operators/GreaterThan.js\";\nimport { GreaterThanOrEqual } from \"./operators/GreaterThanOrEqual.js\";\nimport { LesserThan } from \"./operators/LesserThan.js\";\nimport { LesserThanOrEqual } from \"./operators/LesserThanOrEqual.js\";\nimport { In } from \"./operators/In.js\";\nimport { AndIn } from \"./operators/AndIn.js\";\nimport { NotIn } from \"./operators/NotIn.js\";\nimport { StartsWith } from \"./operators/StartsWith.js\";\nimport { NotStartsWith } from \"./operators/NotStartsWith.js\";\n\nexport const OpenSearchQueryBuilderOperatorFeature = createFeature({\n name: \"opensearch.internal.queryBuilderOperator\",\n register(container) {\n container.register(Equal).inSingletonScope();\n container.register(Not).inSingletonScope();\n container.register(Contains).inSingletonScope();\n container.register(NotContains).inSingletonScope();\n container.register(Between).inSingletonScope();\n container.register(NotBetween).inSingletonScope();\n container.register(GreaterThan).inSingletonScope();\n container.register(GreaterThanOrEqual).inSingletonScope();\n container.register(LesserThan).inSingletonScope();\n container.register(LesserThanOrEqual).inSingletonScope();\n container.register(In).inSingletonScope();\n container.register(AndIn).inSingletonScope();\n container.register(NotIn).inSingletonScope();\n container.register(StartsWith).inSingletonScope();\n container.register(NotStartsWith).inSingletonScope();\n // Container scoped: each request builds the registry from its own container, so operators that\n // extensions register per request are included. As a singleton it would be built once, from\n // the root container's registrations only (@webiny/di builds a singleton from the container\n // that registers it), and would never see operators registered in a request container.\n container.register(OpenSearchQueryBuilderOperatorRegistry).inContainerScope();\n }\n});\n"],"names":["OpenSearchQueryBuilderOperatorFeature","createFeature","container","Equal","Not","Contains","NotContains","Between","NotBetween","GreaterThan","GreaterThanOrEqual","LesserThan","LesserThanOrEqual","In","AndIn","NotIn","StartsWith","NotStartsWith","OpenSearchQueryBuilderOperatorRegistry"],"mappings":";;;;;;;;;;;;;;;;;AAkBO,MAAMA,wCAAwCC,cAAc;IAC/D,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,QAAQ,CAACC,OAAO,gBAAgB;QAC1CD,UAAU,QAAQ,CAACE,KAAK,gBAAgB;QACxCF,UAAU,QAAQ,CAACG,UAAU,gBAAgB;QAC7CH,UAAU,QAAQ,CAACI,aAAa,gBAAgB;QAChDJ,UAAU,QAAQ,CAACK,SAAS,gBAAgB;QAC5CL,UAAU,QAAQ,CAACM,YAAY,gBAAgB;QAC/CN,UAAU,QAAQ,CAACO,aAAa,gBAAgB;QAChDP,UAAU,QAAQ,CAACQ,oBAAoB,gBAAgB;QACvDR,UAAU,QAAQ,CAACS,YAAY,gBAAgB;QAC/CT,UAAU,QAAQ,CAACU,mBAAmB,gBAAgB;QACtDV,UAAU,QAAQ,CAACW,IAAI,gBAAgB;QACvCX,UAAU,QAAQ,CAACY,OAAO,gBAAgB;QAC1CZ,UAAU,QAAQ,CAACa,OAAO,gBAAgB;QAC1Cb,UAAU,QAAQ,CAACc,YAAY,gBAAgB;QAC/Cd,UAAU,QAAQ,CAACe,eAAe,gBAAgB;QAKlDf,UAAU,QAAQ,CAACgB,wCAAwC,gBAAgB;IAC/E;AACJ"}
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -7,7 +7,6 @@ export * from "./utils/index.js";
|
|
|
7
7
|
export * from "./operations/index.js";
|
|
8
8
|
export * from "./sharedIndex.js";
|
|
9
9
|
export * from "./indexPrefix.js";
|
|
10
|
-
export * from "./db/index.js";
|
|
11
10
|
export * from "./types.js";
|
|
12
11
|
export { registerOpenSearchCore } from "./registerOpenSearchCore.js";
|
|
13
12
|
export { getBaseConfiguration, getCommonMappings } from "./indexConfiguration/index.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/api-opensearch",
|
|
3
|
-
"version": "0.0.0-unstable.
|
|
3
|
+
"version": "0.0.0-unstable.5387e5f7c8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.js",
|
|
@@ -18,20 +18,16 @@
|
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@opensearch-project/opensearch": "3.6.0",
|
|
21
|
-
"@webiny/
|
|
22
|
-
"@webiny/
|
|
23
|
-
"@webiny/
|
|
24
|
-
"@webiny/error": "0.0.0-unstable.0d717d18dd",
|
|
25
|
-
"@webiny/feature": "0.0.0-unstable.0d717d18dd",
|
|
26
|
-
"@webiny/handler": "0.0.0-unstable.0d717d18dd"
|
|
21
|
+
"@webiny/error": "0.0.0-unstable.5387e5f7c8",
|
|
22
|
+
"@webiny/feature": "0.0.0-unstable.5387e5f7c8",
|
|
23
|
+
"@webiny/handler": "0.0.0-unstable.5387e5f7c8"
|
|
27
24
|
},
|
|
28
25
|
"devDependencies": {
|
|
29
|
-
"@webiny/build-tools": "0.0.0-unstable.
|
|
30
|
-
"@webiny/di": "
|
|
31
|
-
"@webiny/project-utils": "0.0.0-unstable.0d717d18dd",
|
|
26
|
+
"@webiny/build-tools": "0.0.0-unstable.5387e5f7c8",
|
|
27
|
+
"@webiny/di": "2.0.0",
|
|
32
28
|
"rimraf": "6.1.3",
|
|
33
29
|
"typescript": "7.0.2",
|
|
34
|
-
"vitest": "4.1.
|
|
30
|
+
"vitest": "4.1.11"
|
|
35
31
|
},
|
|
36
32
|
"publishConfig": {
|
|
37
33
|
"access": "public"
|
package/db/entity.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type ITable } from "@webiny/db-dynamodb";
|
|
2
|
-
import type { IOpenSearchEntity } from "../db/types.js";
|
|
3
|
-
export interface ICreateOpenSearchEntityParams {
|
|
4
|
-
table: ITable;
|
|
5
|
-
entityName: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const createOpenSearchEntity: (params: ICreateOpenSearchEntityParams) => IOpenSearchEntity;
|
package/db/entity.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { createEntity, standardEntityAttributes } from "@webiny/db-dynamodb";
|
|
2
|
-
const createOpenSearchEntity = (params)=>{
|
|
3
|
-
const { table, entityName } = params;
|
|
4
|
-
return createEntity({
|
|
5
|
-
name: entityName,
|
|
6
|
-
table: table.table,
|
|
7
|
-
attributes: {
|
|
8
|
-
...standardEntityAttributes,
|
|
9
|
-
index: {
|
|
10
|
-
type: "string",
|
|
11
|
-
required: true
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
export { createOpenSearchEntity };
|
|
17
|
-
|
|
18
|
-
//# sourceMappingURL=entity.js.map
|
package/db/entity.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"db/entity.js","sources":["../../src/db/entity.ts"],"sourcesContent":["import { createEntity, type ITable, standardEntityAttributes } from \"@webiny/db-dynamodb\";\nimport type { IOpenSearchEntity, IOpenSearchEntityAttributes } from \"~/db/types.js\";\n\nexport interface ICreateOpenSearchEntityParams {\n table: ITable;\n entityName: string;\n}\n\nexport const createOpenSearchEntity = (\n params: ICreateOpenSearchEntityParams\n): IOpenSearchEntity => {\n const { table, entityName } = params;\n return createEntity<IOpenSearchEntityAttributes>({\n name: entityName,\n table: table.table,\n attributes: {\n ...standardEntityAttributes,\n index: {\n type: \"string\",\n required: true\n }\n }\n });\n};\n"],"names":["createOpenSearchEntity","params","table","entityName","createEntity","standardEntityAttributes"],"mappings":";AAQO,MAAMA,yBAAyB,CAClCC;IAEA,MAAM,EAAEC,KAAK,EAAEC,UAAU,EAAE,GAAGF;IAC9B,OAAOG,aAA0C;QAC7C,MAAMD;QACN,OAAOD,MAAM,KAAK;QAClB,YAAY;YACR,GAAGG,wBAAwB;YAC3B,OAAO;gBACH,MAAM;gBACN,UAAU;YACd;QACJ;IACJ;AACJ"}
|
package/db/index.d.ts
DELETED
package/db/index.js
DELETED
package/db/table.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { DynamoDBDocument } from "@webiny/aws-sdk/client-dynamodb/index.js";
|
|
2
|
-
import { type ITable } from "@webiny/db-dynamodb";
|
|
3
|
-
export interface ICreateOpenSearchTableParams {
|
|
4
|
-
name?: string;
|
|
5
|
-
documentClient: DynamoDBDocument;
|
|
6
|
-
}
|
|
7
|
-
export declare const createOpenSearchTable: ({ name, documentClient }: ICreateOpenSearchTableParams) => ITable;
|
package/db/table.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { createTable } from "@webiny/db-dynamodb";
|
|
2
|
-
const createOpenSearchTable = ({ name, documentClient })=>createTable({
|
|
3
|
-
name: name || process.env.DB_TABLE_OPENSEARCH,
|
|
4
|
-
indexes: {
|
|
5
|
-
GSI_TENANT: {
|
|
6
|
-
partitionKey: "GSI_TENANT"
|
|
7
|
-
}
|
|
8
|
-
},
|
|
9
|
-
documentClient
|
|
10
|
-
});
|
|
11
|
-
export { createOpenSearchTable };
|
|
12
|
-
|
|
13
|
-
//# sourceMappingURL=table.js.map
|
package/db/table.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"db/table.js","sources":["../../src/db/table.ts"],"sourcesContent":["import type { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb/index.js\";\nimport { createTable, type ITable } from \"@webiny/db-dynamodb\";\n\nexport interface ICreateOpenSearchTableParams {\n name?: string;\n documentClient: DynamoDBDocument;\n}\n\nexport const createOpenSearchTable = ({\n name,\n documentClient\n}: ICreateOpenSearchTableParams): ITable => {\n return createTable({\n name: name || (process.env.DB_TABLE_OPENSEARCH as string),\n indexes: {\n GSI_TENANT: {\n partitionKey: \"GSI_TENANT\"\n }\n },\n documentClient\n });\n};\n"],"names":["createOpenSearchTable","name","documentClient","createTable","process"],"mappings":";AAQO,MAAMA,wBAAwB,CAAC,EAClCC,IAAI,EACJC,cAAc,EACa,GACpBC,YAAY;QACf,MAAMF,QAASG,QAAQ,GAAG,CAAC,mBAAmB;QAC9C,SAAS;YACL,YAAY;gBACR,cAAc;YAClB;QACJ;QACAF;IACJ"}
|
package/db/types.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { IEntity, IStandardEntityAttributes } from "@webiny/db-dynamodb";
|
|
2
|
-
import type { GenericRecord } from "@webiny/api/types.js";
|
|
3
|
-
export interface IOpenSearchEntityAttributes extends IStandardEntityAttributes<GenericRecord> {
|
|
4
|
-
index: string;
|
|
5
|
-
}
|
|
6
|
-
export type IOpenSearchEntity = IEntity<IOpenSearchEntityAttributes>;
|
package/db/types.js
DELETED
|
File without changes
|