@treatwell/moleculer-essentials 1.0.2-beta.4 → 1.1.0-beta.1
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/index.cjs +47 -1
- package/dist/index.mjs +47 -1
- package/package.json +3 -1
package/dist/index.cjs
CHANGED
|
@@ -1022,7 +1022,53 @@ function createServiceBroker(opts = {}) {
|
|
|
1022
1022
|
),
|
|
1023
1023
|
ServiceFactory,
|
|
1024
1024
|
ContextFactory,
|
|
1025
|
-
|
|
1025
|
+
// Change the internal services actions to use Zod validation
|
|
1026
|
+
// instead of the default `fastest-validator` schemas
|
|
1027
|
+
// @ts-expect-error Moleculer types doesn't support zod validators
|
|
1028
|
+
internalServices: {
|
|
1029
|
+
$node: {
|
|
1030
|
+
actions: {
|
|
1031
|
+
list: {
|
|
1032
|
+
params: v4.z.object({ withServices: v4.z.boolean(), onlyAvailable: v4.z.boolean() }).partial()
|
|
1033
|
+
},
|
|
1034
|
+
services: {
|
|
1035
|
+
params: v4.z.object({
|
|
1036
|
+
onlyLocal: v4.z.boolean(),
|
|
1037
|
+
skipInternal: v4.z.boolean(),
|
|
1038
|
+
withActions: v4.z.boolean(),
|
|
1039
|
+
withEvents: v4.z.boolean(),
|
|
1040
|
+
onlyAvailable: v4.z.boolean(),
|
|
1041
|
+
grouping: v4.z.boolean().default(true)
|
|
1042
|
+
}).partial()
|
|
1043
|
+
},
|
|
1044
|
+
actions: {
|
|
1045
|
+
params: v4.z.object({
|
|
1046
|
+
onlyLocal: v4.z.boolean(),
|
|
1047
|
+
skipInternal: v4.z.boolean(),
|
|
1048
|
+
withEndpoints: v4.z.boolean(),
|
|
1049
|
+
onlyAvailable: v4.z.boolean()
|
|
1050
|
+
}).partial()
|
|
1051
|
+
},
|
|
1052
|
+
events: {
|
|
1053
|
+
params: v4.z.object({
|
|
1054
|
+
onlyLocal: v4.z.boolean(),
|
|
1055
|
+
skipInternal: v4.z.boolean(),
|
|
1056
|
+
withEndpoints: v4.z.boolean(),
|
|
1057
|
+
onlyAvailable: v4.z.boolean()
|
|
1058
|
+
}).partial()
|
|
1059
|
+
},
|
|
1060
|
+
health: { params: v4.z.object({}) },
|
|
1061
|
+
options: { params: v4.z.object({}) },
|
|
1062
|
+
metrics: {
|
|
1063
|
+
params: v4.z.object({
|
|
1064
|
+
types: v4.z.union([v4.z.string(), v4.z.array(v4.z.string())]),
|
|
1065
|
+
includes: v4.z.union([v4.z.string(), v4.z.array(v4.z.string())]),
|
|
1066
|
+
excludes: v4.z.union([v4.z.string(), v4.z.array(v4.z.string())])
|
|
1067
|
+
}).partial()
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
},
|
|
1026
1072
|
...opts
|
|
1027
1073
|
});
|
|
1028
1074
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1022,7 +1022,53 @@ function createServiceBroker(opts = {}) {
|
|
|
1022
1022
|
),
|
|
1023
1023
|
ServiceFactory,
|
|
1024
1024
|
ContextFactory,
|
|
1025
|
-
|
|
1025
|
+
// Change the internal services actions to use Zod validation
|
|
1026
|
+
// instead of the default `fastest-validator` schemas
|
|
1027
|
+
// @ts-expect-error Moleculer types doesn't support zod validators
|
|
1028
|
+
internalServices: {
|
|
1029
|
+
$node: {
|
|
1030
|
+
actions: {
|
|
1031
|
+
list: {
|
|
1032
|
+
params: z.object({ withServices: z.boolean(), onlyAvailable: z.boolean() }).partial()
|
|
1033
|
+
},
|
|
1034
|
+
services: {
|
|
1035
|
+
params: z.object({
|
|
1036
|
+
onlyLocal: z.boolean(),
|
|
1037
|
+
skipInternal: z.boolean(),
|
|
1038
|
+
withActions: z.boolean(),
|
|
1039
|
+
withEvents: z.boolean(),
|
|
1040
|
+
onlyAvailable: z.boolean(),
|
|
1041
|
+
grouping: z.boolean().default(true)
|
|
1042
|
+
}).partial()
|
|
1043
|
+
},
|
|
1044
|
+
actions: {
|
|
1045
|
+
params: z.object({
|
|
1046
|
+
onlyLocal: z.boolean(),
|
|
1047
|
+
skipInternal: z.boolean(),
|
|
1048
|
+
withEndpoints: z.boolean(),
|
|
1049
|
+
onlyAvailable: z.boolean()
|
|
1050
|
+
}).partial()
|
|
1051
|
+
},
|
|
1052
|
+
events: {
|
|
1053
|
+
params: z.object({
|
|
1054
|
+
onlyLocal: z.boolean(),
|
|
1055
|
+
skipInternal: z.boolean(),
|
|
1056
|
+
withEndpoints: z.boolean(),
|
|
1057
|
+
onlyAvailable: z.boolean()
|
|
1058
|
+
}).partial()
|
|
1059
|
+
},
|
|
1060
|
+
health: { params: z.object({}) },
|
|
1061
|
+
options: { params: z.object({}) },
|
|
1062
|
+
metrics: {
|
|
1063
|
+
params: z.object({
|
|
1064
|
+
types: z.union([z.string(), z.array(z.string())]),
|
|
1065
|
+
includes: z.union([z.string(), z.array(z.string())]),
|
|
1066
|
+
excludes: z.union([z.string(), z.array(z.string())])
|
|
1067
|
+
}).partial()
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
},
|
|
1026
1072
|
...opts
|
|
1027
1073
|
});
|
|
1028
1074
|
}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/treatwell/moleculer-essentials"
|
|
8
8
|
},
|
|
9
|
-
"version": "1.0
|
|
9
|
+
"version": "1.1.0-beta.1",
|
|
10
10
|
"main": "./dist/index.cjs",
|
|
11
11
|
"module": "./dist/index.mjs",
|
|
12
12
|
"types": "./dist/index.d.cts",
|
|
@@ -158,6 +158,8 @@
|
|
|
158
158
|
"bullmq": "^5.12.10",
|
|
159
159
|
"eslint": "^9.33.0",
|
|
160
160
|
"eslint-config-prettier": "^10.1.8",
|
|
161
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
162
|
+
"eslint-plugin-import": "^2.32.0",
|
|
161
163
|
"eslint-plugin-prettier": "^5.5.4",
|
|
162
164
|
"ioredis": "^5.2.3",
|
|
163
165
|
"jiti": "^2.5.1",
|