Skip to content

Commit

Permalink
Merge pull request #5 from soliantconsulting/bugfix/appconfig-mustache
Browse files Browse the repository at this point in the history
fix: update packages to correctly load app config
  • Loading branch information
DASPRiD authored Nov 6, 2024
2 parents 22794bd + 3bfd49d commit df0cf50
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion skeleton/templates/bitbucket-pipelines.yml.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ definitions:
- corepack enable
- pnpm install
- pnpm exec biome ci .
- pnpm exec typecheck
- pnpm typecheck
caches:
- pnpm
- step: &deploy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "api",
"name": "@{{{apiName}}}/api",
"version": "1.0.0",
"private": true,
"type": "module",
Expand All @@ -14,6 +14,9 @@
"@types/node": "^20.16.11"
},
"dependencies": {
{{#if (has features "appconfig")}}
"@{{{apiName}}}/app-config": "workspace:*",
{{/if}}
"@koa/cors": "^5.0.0",
"body-parser": "^1.20.3",
"compression": "^1.7.4",
Expand Down
2 changes: 2 additions & 0 deletions skeleton/templates/packages/api/src/index.ts.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import {
methodNotAllowedHandler,
} from "koa-jsonapi-zod";
import Router from "koa-tree-router";
{{#if (has features "appconfig")}}
import { appConfigHandler } from "@{{{apiName}}}/app-config";
{{/if}}
import { registerRoutes } from "./route/index.js";
import { orm, requestContextMiddleware } from "./util/mikro-orm.js";
import { logger, requestLoggerMiddleware } from "./util/logger.js";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "app-config",
"name": "@{{{apiName}}}/app-config",
"version": "1.0.0",
"private": true,
"type": "module",
Expand Down

0 comments on commit df0cf50

Please sign in to comment.