Skip to content

Commit

Permalink
#3 bumped versions yet again
Browse files Browse the repository at this point in the history
  • Loading branch information
bennobuilder committed Aug 29, 2024
1 parent 4394cf1 commit dafd2ea
Show file tree
Hide file tree
Showing 17 changed files with 203 additions and 191 deletions.
2 changes: 1 addition & 1 deletion apps/api-core-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"hono": "^4.5.9"
},
"devDependencies": {
"@blgc/config": "^0.0.22",
"@blgc/config": "^0.0.23",
"@types/node": "^22.5.1",
"dotenv": "^16.4.5",
"tsx": "^4.19.0"
Expand Down
6 changes: 3 additions & 3 deletions apps/sfy-chrome-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
"install:clean": "pnpm run clean && pnpm install"
},
"dependencies": {
"@blgc/utils": "^0.0.17",
"@blgc/utils": "^0.0.18",
"@repo/ui": "workspace:*",
"feature-fetch": "^0.0.19",
"feature-fetch": "^0.0.20",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@blgc/config": "^0.0.22",
"@blgc/config": "^0.0.23",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@wxt-dev/module-react": "^1.1.0",
Expand Down
4 changes: 2 additions & 2 deletions apps/sfy-eu-blocks-app/admin-block-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
"dependencies": {
"@shopify/ui-extensions": "2024.7.0",
"@shopify/ui-extensions-react": "2024.7.0",
"feature-fetch": "^0.0.19",
"feature-fetch": "^0.0.20",
"react": "^18.3.1",
"react-query": "^3.39.3"
},
"devDependencies": {
"@blgc/config": "^0.0.22",
"@blgc/config": "^0.0.23",
"@types/react": "^18.3.4",
"react-reconciler": "^0.29.2"
}
Expand Down
4 changes: 2 additions & 2 deletions apps/sfy-eu-blocks-app/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"homepage": "",
"dependencies": {
"@blgc/utils": "^0.0.17",
"@blgc/utils": "^0.0.18",
"@remix-run/dev": "^2.11.2",
"@remix-run/node": "^2.11.2",
"@remix-run/react": "^2.11.2",
Expand All @@ -49,7 +49,7 @@
"vite-tsconfig-paths": "^5.0.1"
},
"devDependencies": {
"@blgc/config": "^0.0.22",
"@blgc/config": "^0.0.23",
"@shopify/api-codegen-preset": "^1.1.1",
"@types/node": "^22.5.1",
"@types/react": "^18.3.4",
Expand Down
2 changes: 1 addition & 1 deletion apps/sfy-eu-blocks-app/checkout-ui-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"react": "^18.3.1"
},
"devDependencies": {
"@blgc/config": "^0.0.22",
"@blgc/config": "^0.0.23",
"@types/react": "^18.3.4",
"react-reconciler": "^0.29.2"
}
Expand Down
4 changes: 2 additions & 2 deletions apps/sfy-playground-app/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"homepage": "",
"dependencies": {
"@blgc/utils": "^0.0.17",
"@blgc/utils": "^0.0.18",
"@remix-run/dev": "^2.11.2",
"@remix-run/node": "^2.11.2",
"@remix-run/react": "^2.11.2",
Expand All @@ -49,7 +49,7 @@
"vite-tsconfig-paths": "^5.0.1"
},
"devDependencies": {
"@blgc/config": "^0.0.22",
"@blgc/config": "^0.0.23",
"@shopify/api-codegen-preset": "^1.1.1",
"@types/node": "^22.5.1",
"@types/react": "^18.3.4",
Expand Down
6 changes: 3 additions & 3 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
},
"homepage": "",
"dependencies": {
"@blgc/utils": "^0.0.17",
"@blgc/utils": "^0.0.18",
"@repo/ui": "workspace:*",
"feature-logger": "^0.0.21",
"feature-logger": "^0.0.22",
"next": "14.2.5",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@blgc/config": "^0.0.22",
"@blgc/config": "^0.0.23",
"@types/node": "^22.5.1",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
Expand Down
12 changes: 6 additions & 6 deletions packages/api-energy-label/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@
},
"homepage": "",
"dependencies": {
"@blgc/openapi-router": "^0.0.15",
"@blgc/utils": "^0.0.17",
"eprel-client": "^0.0.6",
"feature-logger": "^0.0.21",
"@blgc/openapi-router": "^0.0.17",
"@blgc/utils": "^0.0.18",
"eprel-client": "^0.0.7",
"feature-logger": "^0.0.22",
"hono": "^4.5.9",
"valibot": "^0.39.0",
"validation-adapters": "^0.0.9"
"validation-adapters": "^0.0.10"
},
"devDependencies": {
"@blgc/config": "^0.0.22",
"@blgc/config": "^0.0.23",
"@hono/node-server": "^1.12.2",
"@repo/api-utils": "workspace:*",
"@repo/types": "workspace:*",
Expand Down
65 changes: 33 additions & 32 deletions packages/api-energy-label/src/app/routes/v1.product-groups.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { type energyLabelApiV1 } from '@repo/types/api';
import { RequestError } from 'eprel-client';
import * as v from 'valibot';
import { vValidator } from 'validation-adapters/valibot';
Expand All @@ -10,17 +9,17 @@ import { openApiRouter } from '../router';

openApiRouter.get('/product-groups', {
handler: async (c) => {
try {
const productGroups = await eprelClient.getProductGroups();
return c.json<energyLabelApiV1.components['schemas']['ProductGroupListDto']>(productGroups);
} catch (e) {
if (e instanceof RequestError) {
throw new AppError('#ERR_EPREL_API', e.status, {
description: e.message
const result = await eprelClient.getProductGroups();
if (result.isErr()) {
const { error } = result;
if (error instanceof RequestError) {
throw new AppError('#ERR_EPREL_API', error.status, {
description: error.message
});
}
throw new AppError('#ERR_INTERNAL', 500, { description: extractErrorData(e).message });
throw new AppError('#ERR_INTERNAL', 500, { description: extractErrorData(error).message });
}
return c.json(result.value);
}
});

Expand All @@ -39,31 +38,33 @@ openApiRouter.get('/product-groups/{productGroup}/products', {
const { productGroup } = c.req.valid('param');
const { model } = c.req.valid('query');

try {
const { hits = [] } = await eprelClient.getModelsInProductGroup(productGroup, {
filter: {
modelIdentifier: model
}
});
return c.json<energyLabelApiV1.components['schemas']['ProductDetailsListDto']>(
hits.map((hit) => ({
energyClass: hit.energyClass,
eprelRegistrationNumber: hit.eprelRegistrationNumber,
implementingAct: hit.implementingAct,
modelIdentifier: hit.modelIdentifier,
onMarketEndDate: hit.onMarketEndDate,
onMarketStartDate: hit.onMarketStartDate,
productGroup: hit.productGroup,
status: hit.status
}))
);
} catch (e) {
if (e instanceof RequestError) {
throw new AppError('#ERR_EPREL_API', e.status, {
description: e.message
const result = await eprelClient.getModelsInProductGroup(productGroup, {
filter: {
modelIdentifier: model
}
});
if (result.isErr()) {
const { error } = result;
if (error instanceof RequestError) {
throw new AppError('#ERR_EPREL_API', error.status, {
description: error.message
});
}
throw new AppError('#ERR_INTERNAL', 500, { description: extractErrorData(e).message });
throw new AppError('#ERR_INTERNAL', 500, { description: extractErrorData(error).message });
}
const { hits = [] } = result.value;

return c.json(
hits.map((hit) => ({
energyClass: hit.energyClass,
eprelRegistrationNumber: hit.eprelRegistrationNumber,
implementingAct: hit.implementingAct,
modelIdentifier: hit.modelIdentifier,
onMarketEndDate: hit.onMarketEndDate,
onMarketStartDate: hit.onMarketStartDate,
productGroup: hit.productGroup,
status: hit.status
}))
);
}
});
63 changes: 34 additions & 29 deletions packages/api-energy-label/src/app/routes/v1.products.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { type energyLabelApiV1 } from '@repo/types/api';
import { RequestError } from 'eprel-client';
import * as v from 'valibot';
import { vValidator } from 'validation-adapters/valibot';
Expand Down Expand Up @@ -44,23 +43,26 @@ openApiRouter.get('/products/{registrationNumber}/labels', {
handler: async (c) => {
const { registrationNumber } = c.req.valid('param');

try {
// TODO: Construct addresses manually.. the URL pattern should be always the same
const { address } = await eprelClient.getProductLabels(registrationNumber, {
noRedirect: true
});
if (address == null) {
throw new AppError('#ERR_NOT_FOUND', 404);
}
return c.json<energyLabelApiV1.components['schemas']['LabelUrlsDto']>({ urls: [address] });
} catch (e) {
if (e instanceof RequestError) {
throw new AppError('#ERR_EPREL_API', e.status, {
description: e.message
// TODO: Construct addresses manually.. the URL pattern should be always the same
const result = await eprelClient.getProductLabels(registrationNumber, {
noRedirect: true
});
if (result.isErr()) {
const { error } = result;
if (error instanceof RequestError) {
throw new AppError('#ERR_EPREL_API', error.status, {
description: error.message
});
}
throw new AppError('#ERR_INTERNAL', 500, { description: extractErrorData(e).message });
throw new AppError('#ERR_INTERNAL', 500, { description: extractErrorData(error).message });
}

const { address } = result.value;
if (address == null) {
throw new AppError('#ERR_NOT_FOUND', 404);
}

return c.json({ urls: [address] });
}
});

Expand All @@ -78,22 +80,25 @@ openApiRouter.get('/products/{registrationNumber}/sheets', {
handler: async (c) => {
const { registrationNumber } = c.req.valid('param');

try {
// TODO: Construct addresses manually.. the URL pattern should be always the same
const { address } = await eprelClient.getProductFiches(registrationNumber, {
noRedirect: true
});
if (address == null) {
throw new AppError('#ERR_NOT_FOUND', 404);
}
return c.json<energyLabelApiV1.components['schemas']['SheetUrlsDto']>({ urls: [address] });
} catch (e) {
if (e instanceof RequestError) {
throw new AppError('#ERR_EPREL_API', e.status, {
description: e.message
// TODO: Construct addresses manually.. the URL pattern should be always the same
const result = await eprelClient.getProductFiches(registrationNumber, {
noRedirect: true
});
if (result.isErr()) {
const { error } = result;
if (error instanceof RequestError) {
throw new AppError('#ERR_EPREL_API', error.status, {
description: error.message
});
}
throw new AppError('#ERR_INTERNAL', 500, { description: extractErrorData(e).message });
throw new AppError('#ERR_INTERNAL', 500, { description: extractErrorData(error).message });
}

const { address } = result.value;
if (address == null) {
throw new AppError('#ERR_NOT_FOUND', 404);
}

return c.json({ urls: [address] });
}
});
10 changes: 5 additions & 5 deletions packages/api-shopify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@
},
"homepage": "",
"dependencies": {
"@blgc/openapi-router": "^0.0.15",
"@blgc/utils": "^0.0.17",
"@blgc/openapi-router": "^0.0.17",
"@blgc/utils": "^0.0.18",
"@shopify/admin-api-client": "^1.0.1",
"drizzle-orm": "^0.33.0",
"feature-logger": "^0.0.21",
"feature-logger": "^0.0.22",
"hono": "^4.5.9",
"postgres": "^3.4.4",
"valibot": "^0.39.0",
"validation-adapters": "^0.0.9"
"validation-adapters": "^0.0.10"
},
"devDependencies": {
"@blgc/config": "^0.0.22",
"@blgc/config": "^0.0.23",
"@hono/node-server": "^1.12.2",
"@repo/api-utils": "workspace:*",
"@repo/types": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/api-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"hono": "^4.5.9"
},
"devDependencies": {
"@blgc/config": "^0.0.22",
"@blgc/openapi-router": "^0.0.15",
"@blgc/config": "^0.0.23",
"@blgc/openapi-router": "^0.0.17",
"@hono/node-server": "^1.12.2",
"@repo/types": "workspace:*",
"@types/node": "^22.5.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/sfy-app-session-storage-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
},
"homepage": "",
"dependencies": {
"feature-fetch": "^0.0.19"
"feature-fetch": "^0.0.20"
},
"peerDependencies": {
"@shopify/shopify-api": "^11.0.0",
"@shopify/shopify-app-session-storage": "^3.0.0"
},
"devDependencies": {
"@blgc/config": "^0.0.22",
"@blgc/config": "^0.0.23",
"@repo/types": "workspace:*",
"@shopify/shopify-api": "^11.2.0",
"@shopify/shopify-app-session-storage": "^3.0.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/sfy-app-session-storage-local/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@shopify/shopify-app-session-storage": "^3.0.0"
},
"devDependencies": {
"@blgc/config": "^0.0.22",
"@blgc/config": "^0.0.23",
"@shopify/shopify-api": "^11.2.0",
"@shopify/shopify-app-session-storage": "^3.0.3",
"@types/node": "^22.5.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"homepage": "",
"devDependencies": {
"@blgc/config": "^0.0.22",
"@blgc/config": "^0.0.23",
"@redocly/cli": "^1.21.1",
"openapi-typescript": "^7.1.0"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"homepage": "",
"dependencies": {
"@blgc/utils": "^0.0.17",
"@blgc/utils": "^0.0.18",
"@radix-ui/react-dialog": "^1.1.1",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-scroll-area": "^1.1.0",
Expand All @@ -48,7 +48,7 @@
"react": "^18.3.1"
},
"devDependencies": {
"@blgc/config": "^0.0.22",
"@blgc/config": "^0.0.23",
"@storybook/addon-essentials": "^8.2.9",
"@storybook/addon-interactions": "^8.2.9",
"@storybook/addon-links": "^8.2.9",
Expand Down
Loading

0 comments on commit dafd2ea

Please sign in to comment.