@divizend/scratch-core 1.0.1 → 1.0.3

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.
@@ -111,8 +111,10 @@ export class ExpressHttpServer implements HttpServer {
111
111
 
112
112
  private setupCatchAllRoute(): void {
113
113
  // Single catch-all route that handles all endpoint matching
114
+ // Express 5 (path-to-regexp v6) no longer accepts bare "*" patterns,
115
+ // so we use a regex to catch everything.
114
116
  this.app.all(
115
- "*",
117
+ /.*/,
116
118
  async (
117
119
  req: Request,
118
120
  res: ExpressResponse,
@@ -27,6 +27,12 @@ export interface HttpServer {
27
27
  */
28
28
  registerStaticFiles(rootPath: string): void;
29
29
 
30
+ /**
31
+ * Load and register built-in default endpoints and supporting middleware.
32
+ * Must be called before registering static files so endpoints take precedence.
33
+ */
34
+ initializeDefaultEndpoints(): Promise<void>;
35
+
30
36
  /**
31
37
  * Load endpoints from a URL
32
38
  * @param url - URL to load endpoints from (file:// or https://github.com)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@divizend/scratch-core",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Core library for Scratch endpoint system",
5
5
  "main": "index.ts",
6
6
  "type": "module",