Skip to content

Conversation

@gmaclennan
Copy link
Member

Adds routes for reading maps, uploading new custom maps, and deleting custom maps

@gmaclennan gmaclennan self-assigned this Dec 15, 2025
@gmaclennan gmaclennan marked this pull request as ready for review December 15, 2025 21:00
@socket-security
Copy link

socket-security bot commented Dec 15, 2025

@socket-security

This comment was marked as resolved.

@gmaclennan gmaclennan changed the title feat: add /maps/ routes feat: add /maps/ routes Dec 15, 2025
@gmaclennan
Copy link
Member Author

Some windows failures around parallel uploads, which I suspect are probably a test artifact rather than a bug to be worried about.

@gmaclennan

This comment was marked as resolved.

Copy link

@RangerMauve RangerMauve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not seeing any obvious issues

Copy link
Member

@achou11 achou11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of small cleanup things to address but otherwise functionality seems thorough!

Out of curiosity, will I still need the patches I have on desktop related to CORS issues that I run into in development? (caused by usage of Vite's dev server)


Slightly tangential, but the publishing tsconfig needs to be updated since you're committing to a TS implementation:

diff --git a/tsconfig.npm.json b/tsconfig.npm.json
index f89cb7b..f35d2b4 100644
--- a/tsconfig.npm.json
+++ b/tsconfig.npm.json
@@ -4,9 +4,7 @@
 		"noEmit": false,
 		"outDir": "dist",
 		"declaration": true,
-		"emitDeclarationOnly": true,
 		"declarationMap": true
 	},
-	"files": [],
-	"include": ["src/index.js"]
+	"include": ["src/index.ts", "types/*"]
 }

fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [18.x, 20.x, 22.x]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think it could be worth adding 24 here too

Suggested change
node-version: [18.x, 20.x, 22.x]
node-version: [18.x, 20.x, 22.x, 24.x]


steps:
- name: Checkout repository
uses: actions/checkout@v5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thoughts on using latest (v6) and pinning the version for this?

uses: actions/checkout@v5

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thoughts on using latest (v6) and pinning the version for this?

uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not necessary to specify if you use latest version of action.

Comment on lines +47 to +49
type SMPStyle = Awaited<
ReturnType<typeof import('styled-map-package').Reader.prototype.getStyle>
>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't this type exported from styled-map-package already?

Comment on lines +5 to +6
// @ts-expect-error - No types available
import bogon from 'bogon'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

types package is available for this (assuming it's accurate): https://www.npmjs.com/package/@types/bogon

"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./src/index.js"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to update the publishing tsconfig and then point this to the right directory

Suggested change
"default": "./dist/index.js"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to specify the files field to something like:

"files: [
  "README.md",
  "dist"
]

achou11 added a commit to digidem/comapeo-desktop that referenced this pull request Dec 16, 2025
Updates the bounding box used for the map where there's no data to show.
Something I learned via
digidem/comapeo-map-server#2 (comment)
achou11 added a commit to digidem/comapeo-desktop that referenced this pull request Dec 16, 2025
Updates the bounding box used for the map where there's no data to show.
Something I learned via
digidem/comapeo-map-server#2 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants