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.
- package/dist/cli/index.mjs +1 -1
- package/dist/core/index.mjs +2 -1
- package/dist/kit/index.mjs +1 -1
- package/dist/types/index.d.mts +1 -1
- package/package.json +1 -1
package/dist/cli/index.mjs
CHANGED
package/dist/core/index.mjs
CHANGED
|
@@ -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
|
-
[`${
|
|
1142
|
+
[`${method}:${params.path}`]: params
|
|
1142
1143
|
};
|
|
1143
1144
|
}
|
|
1144
1145
|
|
package/dist/kit/index.mjs
CHANGED
|
@@ -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(":");
|
package/dist/types/index.d.mts
CHANGED
|
@@ -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
|
|
274
|
+
method?: Method;
|
|
275
275
|
handler?: ServiceHandler<Input, Output, PathParams, QueryParams, Resolved, HiddenParameters>;
|
|
276
276
|
rules?: MergeRouteRules;
|
|
277
277
|
modules?: Partial<SetupModuleOption>;
|