silgi 0.41.37 → 0.41.38

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.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { defineCommand, runMain } from 'citty';
3
3
 
4
- const version = "0.41.37";
4
+ const version = "0.41.38";
5
5
  const packageJson = {
6
6
  version: version};
7
7
 
@@ -1137,8 +1137,9 @@ function defineServiceSetup(setup) {
1137
1137
  return setup;
1138
1138
  }
1139
1139
  function createService(params) {
1140
+ const method = params.method || "ALL";
1140
1141
  return {
1141
- [`${params.method}:${params.path}`]: params
1142
+ [`${method}:${params.path}`]: params
1142
1143
  };
1143
1144
  }
1144
1145
 
@@ -81,7 +81,7 @@ function getServicePath(_route) {
81
81
  if (route.includes(":")) {
82
82
  const [methodPart, ...routeParts] = route.split(":");
83
83
  method = methodPart.toUpperCase();
84
- if (method === "GLOBAL") {
84
+ if (method === "GLOBAL" || method === "ALL") {
85
85
  method = "";
86
86
  }
87
87
  route = routeParts.join(":");
@@ -271,7 +271,7 @@ type ServiceHandler<Input extends StandardSchemaV1, Output extends StandardSchem
271
271
  */
272
272
  interface ServiceSetup<Method extends HTTPMethod = HTTPMethod, Path extends string = string, Input extends StandardSchemaV1 = StandardSchemaV1, Output extends StandardSchemaV1 = StandardSchemaV1, PathParams extends StandardSchemaV1 | undefined | never = undefined, QueryParams extends StandardSchemaV1 | undefined | never = undefined, Resolved extends boolean = false, HiddenParameters extends boolean = false> {
273
273
  path: Path;
274
- method: Method;
274
+ method?: Method;
275
275
  handler?: ServiceHandler<Input, Output, PathParams, QueryParams, Resolved, HiddenParameters>;
276
276
  rules?: MergeRouteRules;
277
277
  modules?: Partial<SetupModuleOption>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.41.37",
4
+ "version": "0.41.38",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {