@uns-kit/core 3.0.6 → 3.0.7
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/MIGRATIONS.md +26 -3
- package/dist/config/project.config.extension.d.ts +1 -1
- package/dist/config/project.config.extension.d.ts.map +1 -1
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +29 -30
- package/dist/logger.js.map +1 -1
- package/dist/tools/generate-config-schema.js +67 -11
- package/dist/tools/generate-config-schema.js.map +1 -1
- package/dist/uns/uns-attributes.d.ts +2 -2
- package/dist/uns/uns-interfaces.d.ts +5 -1
- package/dist/uns/uns-interfaces.d.ts.map +1 -1
- package/dist/uns/uns-interfaces.js.map +1 -1
- package/dist/uns-config/config-schema.d.ts +405 -5
- package/dist/uns-config/config-schema.d.ts.map +1 -1
- package/dist/uns-config/host-placeholders.d.ts +14 -98
- package/dist/uns-config/host-placeholders.d.ts.map +1 -1
- package/dist/uns-config/schema-tolls.d.ts +1 -2
- package/dist/uns-config/schema-tolls.d.ts.map +1 -1
- package/dist/uns-config/schema-tolls.js +2 -4
- package/dist/uns-config/schema-tolls.js.map +1 -1
- package/dist/uns-config/schema-tools.d.ts +6 -1
- package/dist/uns-config/schema-tools.d.ts.map +1 -1
- package/dist/uns-config/schema-tools.js +7 -8
- package/dist/uns-config/schema-tools.js.map +1 -1
- package/dist/uns-config/secret-placeholders.d.ts +8 -86
- package/dist/uns-config/secret-placeholders.d.ts.map +1 -1
- package/dist/uns-config/uns-core-schema.d.ts +191 -3106
- package/dist/uns-config/uns-core-schema.d.ts.map +1 -1
- package/dist/uns-config/uns-core-schema.js +61 -68
- package/dist/uns-config/uns-core-schema.js.map +1 -1
- package/package.json +3 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uns-core-schema.d.ts","sourceRoot":"","sources":["../../src/uns-config/uns-core-schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"uns-core-schema.d.ts","sourceRoot":"","sources":["../../src/uns-config/uns-core-schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA0DxB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAgC3B,CAAC;AAEJ,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAyCf,CAAC;AAEZ,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
|
@@ -1,76 +1,68 @@
|
|
|
1
1
|
// src/uns-config/uns-core-schema.ts
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { secretValueSchema } from "./secret-placeholders.js";
|
|
4
3
|
import { hostValueSchema } from "./host-placeholders.js";
|
|
4
|
+
import { secretValueSchema } from "./secret-placeholders.js";
|
|
5
|
+
// Zod 4's .int() also enforces Number.isSafeInteger(). Zod 3 accepted every
|
|
6
|
+
// finite integer, so multipleOf(1) preserves the existing config contract.
|
|
7
|
+
const integerSchema = () => z.number().multipleOf(1);
|
|
5
8
|
const mqttProtocolSchema = z.enum(["mqtt", "mqtts", "ws", "wss", "tcp", "ssl"]);
|
|
6
|
-
const mqttServerSchema = z
|
|
9
|
+
const mqttServerSchema = z
|
|
10
|
+
.object({
|
|
7
11
|
host: hostValueSchema,
|
|
8
|
-
port:
|
|
12
|
+
port: integerSchema().positive().optional(),
|
|
9
13
|
protocol: mqttProtocolSchema.optional(),
|
|
10
|
-
})
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
})
|
|
15
|
+
.strict();
|
|
16
|
+
const mqttConnectPropertiesSchema = z
|
|
17
|
+
.object({
|
|
18
|
+
sessionExpiryInterval: integerSchema().nonnegative().optional(),
|
|
19
|
+
receiveMaximum: integerSchema().positive().optional(),
|
|
20
|
+
maximumPacketSize: integerSchema().positive().optional(),
|
|
21
|
+
topicAliasMaximum: integerSchema().nonnegative().optional(),
|
|
16
22
|
requestResponseInformation: z.boolean().optional(),
|
|
17
23
|
requestProblemInformation: z.boolean().optional(),
|
|
18
|
-
userProperties: z.record(z.string()).optional(),
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"silly",
|
|
28
|
-
]);
|
|
29
|
-
const supervisorSchema = z.object({
|
|
30
|
-
enabled: z
|
|
31
|
-
.boolean()
|
|
32
|
-
.default(false)
|
|
33
|
-
.describe("Enable controller/PM2 supervisor handling for this RTT instance."),
|
|
34
|
-
restartOnExit: z
|
|
35
|
-
.boolean()
|
|
36
|
-
.default(false)
|
|
37
|
-
.describe("Let PM2 restart the process when it exits unexpectedly."),
|
|
38
|
-
maxMemoryMb: z
|
|
39
|
-
.number()
|
|
40
|
-
.int()
|
|
41
|
-
.positive()
|
|
42
|
-
.optional()
|
|
43
|
-
.describe("Optional PM2 memory restart limit in megabytes."),
|
|
24
|
+
userProperties: z.record(z.string(), z.string()).optional(),
|
|
25
|
+
})
|
|
26
|
+
.strict();
|
|
27
|
+
const loggingLevelSchema = z.enum(["error", "warn", "info", "http", "verbose", "debug", "silly"]);
|
|
28
|
+
const supervisorSchema = z
|
|
29
|
+
.object({
|
|
30
|
+
enabled: z.boolean().default(false).describe("Enable controller/PM2 supervisor handling for this RTT instance."),
|
|
31
|
+
restartOnExit: z.boolean().default(false).describe("Let PM2 restart the process when it exits unexpectedly."),
|
|
32
|
+
maxMemoryMb: z.number().multipleOf(1).positive().optional().describe("Optional PM2 memory restart limit in megabytes."),
|
|
44
33
|
restartOnUnhealthy: z
|
|
45
34
|
.boolean()
|
|
46
35
|
.default(false)
|
|
47
36
|
.describe("Let the controller auto-start this instance when required system-service runtime signals are absent."),
|
|
48
37
|
unhealthyAfterMs: z
|
|
49
38
|
.number()
|
|
50
|
-
.
|
|
39
|
+
.multipleOf(1)
|
|
51
40
|
.positive()
|
|
52
41
|
.default(60_000)
|
|
53
42
|
.describe("How long runtime signals must stay unhealthy before the controller supervisor can act."),
|
|
54
43
|
restartCooldownMs: z
|
|
55
44
|
.number()
|
|
56
|
-
.
|
|
45
|
+
.multipleOf(1)
|
|
57
46
|
.positive()
|
|
58
47
|
.default(300_000)
|
|
59
48
|
.describe("Minimum time between controller supervisor restart attempts for this instance."),
|
|
60
|
-
})
|
|
61
|
-
|
|
49
|
+
})
|
|
50
|
+
.strict()
|
|
51
|
+
.describe("Optional PM2/controller supervisor guard settings for this RTT instance.");
|
|
52
|
+
export const mqttChannelSchema = z
|
|
53
|
+
.object({
|
|
62
54
|
host: hostValueSchema.optional(),
|
|
63
55
|
hosts: z.array(hostValueSchema).optional(),
|
|
64
56
|
servers: z.array(mqttServerSchema).optional(),
|
|
65
|
-
port:
|
|
57
|
+
port: integerSchema().positive().optional(),
|
|
66
58
|
protocol: mqttProtocolSchema.optional(),
|
|
67
59
|
username: z.string().optional(),
|
|
68
60
|
password: secretValueSchema.optional(),
|
|
69
61
|
clientId: z.string().optional(),
|
|
70
62
|
clean: z.boolean().optional(),
|
|
71
|
-
keepalive:
|
|
72
|
-
connectTimeout:
|
|
73
|
-
reconnectPeriod:
|
|
63
|
+
keepalive: integerSchema().nonnegative().optional(),
|
|
64
|
+
connectTimeout: integerSchema().nonnegative().optional(),
|
|
65
|
+
reconnectPeriod: integerSchema().nonnegative().optional(),
|
|
74
66
|
reconnectOnConnackError: z.boolean().optional(),
|
|
75
67
|
resubscribe: z.boolean().optional(),
|
|
76
68
|
queueQoSZero: z.boolean().optional(),
|
|
@@ -80,50 +72,51 @@ export const mqttChannelSchema = z.object({
|
|
|
80
72
|
cert: z.string().optional(),
|
|
81
73
|
key: z.string().optional(),
|
|
82
74
|
servername: z.string().optional(),
|
|
83
|
-
})
|
|
75
|
+
})
|
|
76
|
+
.strict()
|
|
77
|
+
.refine((value) => {
|
|
84
78
|
return !!value.host || (Array.isArray(value.hosts) && value.hosts.length > 0) || (Array.isArray(value.servers) && value.servers.length > 0);
|
|
85
79
|
}, {
|
|
86
80
|
message: "One of host, hosts, or servers must be provided.",
|
|
87
81
|
});
|
|
88
|
-
export const unsCoreSchema = z
|
|
89
|
-
|
|
82
|
+
export const unsCoreSchema = z
|
|
83
|
+
.object({
|
|
84
|
+
uns: z
|
|
85
|
+
.object({
|
|
90
86
|
graphql: z.string().url(),
|
|
91
87
|
rest: z.string().url(),
|
|
92
|
-
token: secretValueSchema
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
email: z
|
|
96
|
-
.string()
|
|
97
|
-
.email()
|
|
98
|
-
.optional()
|
|
99
|
-
.describe("Email used when authenticating to graphql endpoint of the UNS instance."),
|
|
100
|
-
password: secretValueSchema
|
|
101
|
-
.optional()
|
|
102
|
-
.describe("Password or secret value paired with the UNS email."),
|
|
88
|
+
token: secretValueSchema.optional().describe("Bearer token used for service-to-service access to the UNS instance."),
|
|
89
|
+
email: z.string().email().optional().describe("Email used when authenticating to graphql endpoint of the UNS instance."),
|
|
90
|
+
password: secretValueSchema.optional().describe("Password or secret value paired with the UNS email."),
|
|
103
91
|
instanceMode: z.enum(["wait", "force", "handover"]).default("wait"),
|
|
104
|
-
processName: z
|
|
105
|
-
.string()
|
|
106
|
-
.min(1)
|
|
107
|
-
.describe("Process name used in MQTT topics and logs."),
|
|
92
|
+
processName: z.string().min(1).describe("Process name used in MQTT topics and logs."),
|
|
108
93
|
handover: z.boolean().default(true),
|
|
109
94
|
supervisor: supervisorSchema.optional(),
|
|
110
95
|
jwksWellKnownUrl: z.string().url().optional(),
|
|
111
96
|
kidWellKnownUrl: z.string().url().optional(),
|
|
112
97
|
env: z.enum(["dev", "staging", "test", "prod"]).default("dev"),
|
|
113
|
-
})
|
|
114
|
-
|
|
98
|
+
})
|
|
99
|
+
.strict(),
|
|
100
|
+
logging: z
|
|
101
|
+
.object({
|
|
115
102
|
adapter: z.string().min(1).default("udp"),
|
|
116
103
|
host: hostValueSchema,
|
|
117
|
-
port:
|
|
104
|
+
port: integerSchema().positive().default(12201),
|
|
118
105
|
level: loggingLevelSchema.default("info"),
|
|
119
|
-
})
|
|
106
|
+
})
|
|
107
|
+
.strict()
|
|
108
|
+
.optional(),
|
|
120
109
|
input: mqttChannelSchema.optional(),
|
|
121
110
|
output: mqttChannelSchema.optional(),
|
|
122
111
|
infra: mqttChannelSchema,
|
|
123
|
-
devops: z
|
|
112
|
+
devops: z
|
|
113
|
+
.object({
|
|
124
114
|
provider: z.enum(["azure-devops"]).default("azure-devops"),
|
|
125
115
|
organization: z.string().min(1),
|
|
126
116
|
project: z.string().min(1).optional(),
|
|
127
|
-
})
|
|
128
|
-
|
|
117
|
+
})
|
|
118
|
+
.strict()
|
|
119
|
+
.optional(),
|
|
120
|
+
})
|
|
121
|
+
.strict();
|
|
129
122
|
//# sourceMappingURL=uns-core-schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uns-core-schema.js","sourceRoot":"","sources":["../../src/uns-config/uns-core-schema.ts"],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AAM,EAAE,CAAC,QAAQ,EAAE;CACvB,CAAC,CAAC,MAAM,EAAE,CAAC","sourcesContent":["// src/uns-config/uns-core-schema.ts\nimport { z } from \"zod\";\nimport { secretValueSchema } from \"./secret-placeholders.js\";\nimport { hostValueSchema } from \"./host-placeholders.js\";\n\nconst mqttProtocolSchema = z.enum([\"mqtt\", \"mqtts\", \"ws\", \"wss\", \"tcp\", \"ssl\"]);\n\nconst mqttServerSchema = z.object({\n host: hostValueSchema,\n port: z.number().int().positive().optional(),\n protocol: mqttProtocolSchema.optional(),\n}).strict();\n\nconst mqttConnectPropertiesSchema = z.object({\n sessionExpiryInterval: z.number().int().nonnegative().optional(),\n receiveMaximum: z.number().int().positive().optional(),\n maximumPacketSize: z.number().int().positive().optional(),\n topicAliasMaximum: z.number().int().nonnegative().optional(),\n requestResponseInformation: z.boolean().optional(),\n requestProblemInformation: z.boolean().optional(),\n userProperties: z.record(z.string()).optional(),\n}).strict();\n\nconst loggingLevelSchema = z.enum([\n \"error\",\n \"warn\",\n \"info\",\n \"http\",\n \"verbose\",\n \"debug\",\n \"silly\",\n]);\n\nconst supervisorSchema = z.object({\n enabled: z\n .boolean()\n .default(false)\n .describe(\"Enable controller/PM2 supervisor handling for this RTT instance.\"),\n restartOnExit: z\n .boolean()\n .default(false)\n .describe(\"Let PM2 restart the process when it exits unexpectedly.\"),\n maxMemoryMb: z\n .number()\n .int()\n .positive()\n .optional()\n .describe(\"Optional PM2 memory restart limit in megabytes.\"),\n restartOnUnhealthy: z\n .boolean()\n .default(false)\n .describe(\"Let the controller auto-start this instance when required system-service runtime signals are absent.\"),\n unhealthyAfterMs: z\n .number()\n .int()\n .positive()\n .default(60_000)\n .describe(\"How long runtime signals must stay unhealthy before the controller supervisor can act.\"),\n restartCooldownMs: z\n .number()\n .int()\n .positive()\n .default(300_000)\n .describe(\"Minimum time between controller supervisor restart attempts for this instance.\"),\n}).strict().describe(\"Optional PM2/controller supervisor guard settings for this RTT instance.\");\n\nexport const mqttChannelSchema = z.object({\n host: hostValueSchema.optional(),\n hosts: z.array(hostValueSchema).optional(),\n servers: z.array(mqttServerSchema).optional(),\n port: z.number().int().positive().optional(),\n protocol: mqttProtocolSchema.optional(),\n username: z.string().optional(),\n password: secretValueSchema.optional(),\n clientId: z.string().optional(),\n clean: z.boolean().optional(),\n keepalive: z.number().int().nonnegative().optional(),\n connectTimeout: z.number().int().nonnegative().optional(),\n reconnectPeriod: z.number().int().nonnegative().optional(),\n reconnectOnConnackError: z.boolean().optional(),\n resubscribe: z.boolean().optional(),\n queueQoSZero: z.boolean().optional(),\n rejectUnauthorized: z.boolean().optional(),\n properties: mqttConnectPropertiesSchema.optional(),\n ca: z.string().optional(),\n cert: z.string().optional(),\n key: z.string().optional(),\n servername: z.string().optional(),\n}).strict().refine((value) => {\n return !!value.host || (Array.isArray(value.hosts) && value.hosts.length > 0) || (Array.isArray(value.servers) && value.servers.length > 0);\n}, {\n message: \"One of host, hosts, or servers must be provided.\",\n});\n\nexport const unsCoreSchema = z.object({\n uns: z.object({\n graphql: z.string().url(),\n rest: z.string().url(),\n token: secretValueSchema\n .optional()\n .describe(\"Bearer token used for service-to-service access to the UNS instance.\"),\n email: z\n .string()\n .email()\n .optional()\n .describe(\"Email used when authenticating to graphql endpoint of the UNS instance.\"),\n password: secretValueSchema\n .optional()\n .describe(\"Password or secret value paired with the UNS email.\"),\n instanceMode: z.enum([\"wait\", \"force\", \"handover\"]).default(\"wait\"),\n processName: z\n .string()\n .min(1)\n .describe(\"Process name used in MQTT topics and logs.\"),\n handover: z.boolean().default(true),\n supervisor: supervisorSchema.optional(),\n jwksWellKnownUrl: z.string().url().optional(),\n kidWellKnownUrl: z.string().url().optional(),\n env: z.enum([\"dev\", \"staging\", \"test\", \"prod\"]).default(\"dev\"),\n }).strict(),\n\n logging: z.object({\n adapter: z.string().min(1).default(\"udp\"),\n host: hostValueSchema,\n port: z.number().int().positive().default(12201),\n level: loggingLevelSchema.default(\"info\"),\n }).strict().optional(),\n\n input: mqttChannelSchema.optional(),\n output: mqttChannelSchema.optional(),\n infra: mqttChannelSchema,\n devops: z.object({\n provider: z.enum([\"azure-devops\"]).default(\"azure-devops\"),\n organization: z.string().min(1),\n project: z.string().min(1).optional(),\n }).strict().optional(),\n}).strict();\n\nexport type UnsCore = z.infer<typeof unsCoreSchema>;\n"]}
|
|
1
|
+
{"version":3,"file":"uns-core-schema.js","sourceRoot":"","sources":["../../src/uns-config/uns-core-schema.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,4EAA4E;AAC5E,2EAA2E;AAC3E,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAErD,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;AAEhF,MAAM,gBAAgB,GAAG,CAAC;KACvB,MAAM,CAAC;IACN,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,aAAa,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC3C,QAAQ,EAAE,kBAAkB,CAAC,QAAQ,EAAE;CACxC,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,2BAA2B,GAAG,CAAC;KAClC,MAAM,CAAC;IACN,qBAAqB,EAAE,aAAa,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE;IAC/D,cAAc,EAAE,aAAa,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACrD,iBAAiB,EAAE,aAAa,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC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AAC;QAC1D,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC/B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;KACtC,CAAC;SACD,MAAM,EAAE;SACR,QAAQ,EAAE;CACd,CAAC;KACD,MAAM,EAAE,CAAC","sourcesContent":["// src/uns-config/uns-core-schema.ts\nimport { z } from \"zod\";\n\nimport { hostValueSchema } from \"./host-placeholders.js\";\nimport { secretValueSchema } from \"./secret-placeholders.js\";\n\n// Zod 4's .int() also enforces Number.isSafeInteger(). Zod 3 accepted every\n// finite integer, so multipleOf(1) preserves the existing config contract.\nconst integerSchema = () => z.number().multipleOf(1);\n\nconst mqttProtocolSchema = z.enum([\"mqtt\", \"mqtts\", \"ws\", \"wss\", \"tcp\", \"ssl\"]);\n\nconst mqttServerSchema = z\n .object({\n host: hostValueSchema,\n port: integerSchema().positive().optional(),\n protocol: mqttProtocolSchema.optional(),\n })\n .strict();\n\nconst mqttConnectPropertiesSchema = z\n .object({\n sessionExpiryInterval: integerSchema().nonnegative().optional(),\n receiveMaximum: integerSchema().positive().optional(),\n maximumPacketSize: integerSchema().positive().optional(),\n topicAliasMaximum: integerSchema().nonnegative().optional(),\n requestResponseInformation: z.boolean().optional(),\n requestProblemInformation: z.boolean().optional(),\n userProperties: z.record(z.string(), z.string()).optional(),\n })\n .strict();\n\nconst loggingLevelSchema = z.enum([\"error\", \"warn\", \"info\", \"http\", \"verbose\", \"debug\", \"silly\"]);\n\nconst supervisorSchema = z\n .object({\n enabled: z.boolean().default(false).describe(\"Enable controller/PM2 supervisor handling for this RTT instance.\"),\n restartOnExit: z.boolean().default(false).describe(\"Let PM2 restart the process when it exits unexpectedly.\"),\n maxMemoryMb: z.number().multipleOf(1).positive().optional().describe(\"Optional PM2 memory restart limit in megabytes.\"),\n restartOnUnhealthy: z\n .boolean()\n .default(false)\n .describe(\"Let the controller auto-start this instance when required system-service runtime signals are absent.\"),\n unhealthyAfterMs: z\n .number()\n .multipleOf(1)\n .positive()\n .default(60_000)\n .describe(\"How long runtime signals must stay unhealthy before the controller supervisor can act.\"),\n restartCooldownMs: z\n .number()\n .multipleOf(1)\n .positive()\n .default(300_000)\n .describe(\"Minimum time between controller supervisor restart attempts for this instance.\"),\n })\n .strict()\n .describe(\"Optional PM2/controller supervisor guard settings for this RTT instance.\");\n\nexport const mqttChannelSchema = z\n .object({\n host: hostValueSchema.optional(),\n hosts: z.array(hostValueSchema).optional(),\n servers: z.array(mqttServerSchema).optional(),\n port: integerSchema().positive().optional(),\n protocol: mqttProtocolSchema.optional(),\n username: z.string().optional(),\n password: secretValueSchema.optional(),\n clientId: z.string().optional(),\n clean: z.boolean().optional(),\n keepalive: integerSchema().nonnegative().optional(),\n connectTimeout: integerSchema().nonnegative().optional(),\n reconnectPeriod: integerSchema().nonnegative().optional(),\n reconnectOnConnackError: z.boolean().optional(),\n resubscribe: z.boolean().optional(),\n queueQoSZero: z.boolean().optional(),\n rejectUnauthorized: z.boolean().optional(),\n properties: mqttConnectPropertiesSchema.optional(),\n ca: z.string().optional(),\n cert: z.string().optional(),\n key: z.string().optional(),\n servername: z.string().optional(),\n })\n .strict()\n .refine(\n (value) => {\n return !!value.host || (Array.isArray(value.hosts) && value.hosts.length > 0) || (Array.isArray(value.servers) && value.servers.length > 0);\n },\n {\n message: \"One of host, hosts, or servers must be provided.\",\n },\n );\n\nexport const unsCoreSchema = z\n .object({\n uns: z\n .object({\n graphql: z.string().url(),\n rest: z.string().url(),\n token: secretValueSchema.optional().describe(\"Bearer token used for service-to-service access to the UNS instance.\"),\n email: z.string().email().optional().describe(\"Email used when authenticating to graphql endpoint of the UNS instance.\"),\n password: secretValueSchema.optional().describe(\"Password or secret value paired with the UNS email.\"),\n instanceMode: z.enum([\"wait\", \"force\", \"handover\"]).default(\"wait\"),\n processName: z.string().min(1).describe(\"Process name used in MQTT topics and logs.\"),\n handover: z.boolean().default(true),\n supervisor: supervisorSchema.optional(),\n jwksWellKnownUrl: z.string().url().optional(),\n kidWellKnownUrl: z.string().url().optional(),\n env: z.enum([\"dev\", \"staging\", \"test\", \"prod\"]).default(\"dev\"),\n })\n .strict(),\n\n logging: z\n .object({\n adapter: z.string().min(1).default(\"udp\"),\n host: hostValueSchema,\n port: integerSchema().positive().default(12201),\n level: loggingLevelSchema.default(\"info\"),\n })\n .strict()\n .optional(),\n\n input: mqttChannelSchema.optional(),\n output: mqttChannelSchema.optional(),\n infra: mqttChannelSchema,\n devops: z\n .object({\n provider: z.enum([\"azure-devops\"]).default(\"azure-devops\"),\n organization: z.string().min(1),\n project: z.string().min(1).optional(),\n })\n .strict()\n .optional(),\n })\n .strict();\n\nexport type UnsCore = z.infer<typeof unsCoreSchema>;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uns-kit/core",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.7",
|
|
4
4
|
"description": "Core utilities and runtime building blocks for UNS-based realtime transformers.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -48,9 +48,8 @@
|
|
|
48
48
|
"winston": "^3.19.0",
|
|
49
49
|
"winston-gelf": "^1.7.0",
|
|
50
50
|
"ws": "^8.21.2",
|
|
51
|
-
"zod": "^
|
|
52
|
-
"zod-to-
|
|
53
|
-
"zod-to-ts": "^1.2.0"
|
|
51
|
+
"zod": "^4.4.3",
|
|
52
|
+
"zod-to-ts": "^2.1.0"
|
|
54
53
|
},
|
|
55
54
|
"devDependencies": {
|
|
56
55
|
"@types/jsonwebtoken": "^9.0.10",
|