@crossdelta/infrastructure 0.2.7 → 0.2.10

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.
@@ -14,6 +14,9 @@ export declare function buildServices(options: BuildServicesOptions): AppSpecSer
14
14
  * Builds the ingress rules from service configs.
15
15
  * Only includes services that have both an ingressPrefix AND httpPort defined.
16
16
  * Services with only internalPorts cannot have ingress rules.
17
+ *
18
+ * Rules are sorted by prefix length (longest first) to ensure more specific
19
+ * paths are matched before catch-all paths like "/".
17
20
  */
18
21
  export declare function buildIngressRules(serviceConfigs: ServiceConfig[]): {
19
22
  component: {
package/dist/index.cjs CHANGED
@@ -200,7 +200,7 @@ function buildIngressRules(serviceConfigs) {
200
200
  prefix: config.ingressPrefix
201
201
  }
202
202
  }
203
- }));
203
+ })).sort((a, b) => b.match.path.prefix.length - a.match.path.prefix.length);
204
204
  }
205
205
  // lib/helpers/service-runtime.ts
206
206
  var toEnvKey = (name) => name.toUpperCase().replace(/-/g, "_");
package/dist/index.js CHANGED
@@ -152,7 +152,7 @@ function buildIngressRules(serviceConfigs) {
152
152
  prefix: config.ingressPrefix
153
153
  }
154
154
  }
155
- }));
155
+ })).sort((a, b) => b.match.path.prefix.length - a.match.path.prefix.length);
156
156
  }
157
157
  // lib/helpers/service-runtime.ts
158
158
  var toEnvKey = (name) => name.toUpperCase().replace(/-/g, "_");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crossdelta/infrastructure",
3
- "version": "0.2.7",
3
+ "version": "0.2.10",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "publishConfig": {