Skip to content

Commit

Permalink
fix(server): Add lerc external into server package. (#3348)
Browse files Browse the repository at this point in the history
### Motivation
It looks like we are missing lerc in the server cli. 

https://github.com/linz/basemaps-config/actions/runs/11061552896/job/30734619452?pr=970

![image](https://github.com/user-attachments/assets/fdbf96e6-1269-4904-9b7c-61463159929d)

### Modifications
Add the `lerc` into server and cli package

### Verification

Local build server container with lerc uninstall vs installed.

#### UNINSTALL

![image](https://github.com/user-attachments/assets/5188a74f-14a3-4c34-88ee-9765e6bccbdf)

#### INSTALLED

![image](https://github.com/user-attachments/assets/152ef321-6eca-4f6e-90ef-1fc603e2ce2a)

#### Test Screenshot with fixed container

![image](https://github.com/user-attachments/assets/555d9ee3-5914-410d-bcf1-c337c6ab2a76)

---------

Co-authored-by: Blayne Chard <bchard@linz.govt.nz>
  • Loading branch information
Wentao-Kuang and blacha authored Sep 29, 2024
1 parent 54032b2 commit 2aea3c7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"outfile": "dist/index.cjs",
"external": [
"sharp",
"pino-pretty"
"pino-pretty",
"lerc"
]
}
],
Expand Down
1 change: 1 addition & 0 deletions packages/cli/src/cli/server/action.serve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {

const DefaultPort = 5000;

/** @deprecated 2024-09 Use the basemaps/server container directly now, and deprecate this later. */
export class CommandServe extends CommandLineAction {
config!: CommandLineStringParameter;
assets!: CommandLineStringParameter;
Expand Down
6 changes: 4 additions & 2 deletions packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"executable": true,
"external": [
"pino-pretty",
"sharp"
"sharp",
"lerc"
]
}
],
Expand All @@ -47,7 +48,8 @@
"@basemaps/landing": "^7.0.0"
},
"dependencies": {
"sharp": "^0.33.0"
"sharp": "^0.33.0",
"lerc": "^4.0.4"
},
"devDependencies": {
"@basemaps/config": "^7.7.0",
Expand Down

0 comments on commit 2aea3c7

Please sign in to comment.