@newhomestar/sdk 0.8.7 → 0.8.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +4 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -682,8 +682,10 @@ export function runHttpServer(def, opts = {}) {
682
682
  tokenSigningAlg: 'RS256',
683
683
  });
684
684
  // Apply JWKS middleware to all routes EXCEPT public paths
685
+ // Exact match OR prefix match (paths ending with '/' act as prefix matchers)
685
686
  app.use((req, res, next) => {
686
- if (publicPaths.has(req.path)) {
687
+ if (publicPaths.has(req.path) ||
688
+ [...publicPaths].some(p => p.endsWith('/') && req.path.startsWith(p))) {
687
689
  return next();
688
690
  }
689
691
  return jwtCheck(req, res, next);
@@ -936,7 +938,7 @@ export function runHttpServer(def, opts = {}) {
936
938
  Object.entries(def.actions).forEach(([actionName, actionDef]) => {
937
939
  const method = (actionDef.method || 'POST').toUpperCase();
938
940
  const path = actionDef.path || `/${def.name}/${actionName}`;
939
- const isPublic = publicPaths.has(path) ? ' 🔓' : ' 🔐';
941
+ const isPublic = (publicPaths.has(path) || [...publicPaths].some(p => p.endsWith('/') && path.startsWith(p))) ? ' 🔓' : ' 🔐';
940
942
  console.log(`[nova] ${method} ${path} -> ${actionName}${isPublic}`);
941
943
  });
942
944
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newhomestar/sdk",
3
- "version": "0.8.7",
3
+ "version": "0.8.8",
4
4
  "description": "Type-safe SDK for building Nova pipelines (workers & functions)",
5
5
  "homepage": "https://github.com/newhomestar/nova-node-sdk#readme",
6
6
  "bugs": {