Skip to content

Commit

Permalink
chore: Release v1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Vilsol committed Sep 28, 2023
1 parent f41ea5b commit 3537129
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 22 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.2.1 (September 28th, 2023)

- rename codes to unit_codes

## 1.2.0 (September 26th, 2023)

- added unit codes as a resource type
Expand Down
10 changes: 5 additions & 5 deletions cfg/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"product_category",
"product_prototype",
"product",
"code"
"unit_code"
],
"customQueries": [
{
Expand Down Expand Up @@ -42,7 +42,7 @@
"product_category",
"product_prototype",
"product",
"code"
"unit_code"
]
},
"entities": [
Expand All @@ -51,7 +51,7 @@
"product_category",
"product_prototype",
"product",
"code"
"unit_code"
]
}
},
Expand Down Expand Up @@ -148,7 +148,7 @@
"product_category": "io-restorecommerce-product_category-srv",
"product_prototype": "io-restorecommerce-product_prototype-srv",
"product": "io-restorecommerce-product-srv",
"code": "io-restorecommerce-code-srv",
"unit_code": "io-restorecommerce-code-srv",
"health": "grpc-health-v1"
},
"fieldHandlers": {
Expand All @@ -164,7 +164,7 @@
"product_categorys",
"product_prototypes",
"products",
"codes"
"unit_codes"
]
}
]
Expand Down
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@restorecommerce/catalog-srv",
"version": "1.2.0",
"version": "1.2.1",
"description": "Restore Commerce microservice for catalog and offers",
"main": "./lib/index.js",
"author": "n-fuse GmbH",
Expand All @@ -21,7 +21,7 @@
"@restorecommerce/cluster-service": "^1.0.2",
"@restorecommerce/kafka-client": "^1.1.1",
"@restorecommerce/logger": "^1.2.4",
"@restorecommerce/rc-grpc-clients": "^5.1.1",
"@restorecommerce/rc-grpc-clients": "^5.1.2",
"@restorecommerce/resource-base-interface": "^1.3.0",
"@restorecommerce/service-config": "^1.0.6",
"elasticsearch": "^16.7.3",
Expand Down
4 changes: 2 additions & 2 deletions src/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export class ManufacturerService extends ServiceBase<ManufacturerListResponse, M
}
}

export class CodeService extends ServiceBase<CodeListResponse, CodeList> implements CodeServiceImplementation {
export class UnitCodeService extends ServiceBase<CodeListResponse, CodeList> implements CodeServiceImplementation {
constructor(topic: Topic, db: DatabaseProvider, cfg: any, logger: any, enableEvents: boolean) {
let resourceFieldConfig;
if (cfg.get('fieldHandlers')) {
Expand All @@ -118,6 +118,6 @@ export class CodeService extends ServiceBase<CodeListResponse, CodeList> impleme
}
}
}
super('code', topic, logger, new ResourcesAPIBase(db, 'codes', resourceFieldConfig), enableEvents);
super('unit_code', topic, logger, new ResourcesAPIBase(db, 'unit_codes', resourceFieldConfig), enableEvents);
}
}
8 changes: 4 additions & 4 deletions src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ import { protoMetadata as priceGroupMeta, PriceGroupServiceDefinition as price_g
import { protoMetadata as productCategoryMeta, ProductCategoryServiceDefinition as product_category } from '@restorecommerce/rc-grpc-clients/dist/generated-server/io/restorecommerce/product_category';
import { protoMetadata as productPorotoTypeMeta, ProductPrototypeServiceDefinition as product_prototype } from '@restorecommerce/rc-grpc-clients/dist/generated-server/io/restorecommerce/product_prototype';
import { protoMetadata as productMeta, ProductServiceDefinition as product } from '@restorecommerce/rc-grpc-clients/dist/generated-server/io/restorecommerce/product';
import { protoMetadata as codeMeta, CodeServiceDefinition as code } from '@restorecommerce/rc-grpc-clients/dist/generated-server/io/restorecommerce/code';
import { protoMetadata as unitCodeMeta, UnitCodeServiceDefinition as unit_code } from '@restorecommerce/rc-grpc-clients/dist/generated-server/io/restorecommerce/unit_code';
import { protoMetadata as commandInterfaceMeta, CommandInterfaceServiceDefinition as CommandInterfaceServiceDefinition } from '@restorecommerce/rc-grpc-clients/dist/generated-server/io/restorecommerce/commandinterface';
import { BindConfig } from '@restorecommerce/chassis-srv/lib/microservice/transport/provider/grpc';
import { HealthDefinition } from '@restorecommerce/rc-grpc-clients/dist/generated-server/grpc/health/v1/health';
import { ServerReflectionService } from 'nice-grpc-server-reflection';

registerProtoMeta(manufacturerMeta, priceGroupMeta, productCategoryMeta, productPorotoTypeMeta, productMeta, codeMeta, commandInterfaceMeta);
registerProtoMeta(manufacturerMeta, priceGroupMeta, productCategoryMeta, productPorotoTypeMeta, productMeta, unitCodeMeta, commandInterfaceMeta);

const ServiceDefinitions: any = [manufacturer, price_group, product_category, product_prototype, product, code];
const ServiceDefinitions: any = [manufacturer, price_group, product_category, product_prototype, product, unit_code];

const capitalized = (entity: string): string => {
const labels = entity.split('_').map((element) => {
Expand Down Expand Up @@ -166,7 +166,7 @@ export class Worker {
{ descriptor: productCategoryMeta.fileDescriptor },
{ descriptor: productPorotoTypeMeta.fileDescriptor },
{ descriptor: productMeta.fileDescriptor },
{ descriptor: codeMeta.fileDescriptor },
{ descriptor: unitCodeMeta.fileDescriptor },
{ descriptor: commandInterfaceMeta.fileDescriptor }
]);
await server.bind(reflectionServiceName, {
Expand Down

0 comments on commit 3537129

Please sign in to comment.