@uns-kit/core 2.0.42 → 2.0.43

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.
@@ -63,15 +63,15 @@ function parseArgs(argv) {
63
63
  return { dictionary, dictionaryOutput, measurements, measurementsOutput, lang };
64
64
  }
65
65
  function printHelp() {
66
- console.log(`Usage: tsx packages/uns-core/src/tools/generate-uns-reference.ts [options]
67
-
68
- Options:
69
- --dictionary <file> Path to uns-dictionary.json (default: ${DEFAULT_DICT_INPUT})
70
- --dictionary-output <file> Path to generated dictionary TS (default: ${DEFAULT_DICT_OUTPUT})
71
- --measurements <file> Path to uns-measurements.json (default: ${DEFAULT_MEAS_INPUT})
72
- --measurements-output <file> Path to generated measurements TS (default: ${DEFAULT_MEAS_OUTPUT})
73
- --lang <code> Preferred description language (default: "sl")
74
- --help, -h Show this help
66
+ console.log(`Usage: tsx packages/uns-core/src/tools/generate-uns-reference.ts [options]
67
+
68
+ Options:
69
+ --dictionary <file> Path to uns-dictionary.json (default: ${DEFAULT_DICT_INPUT})
70
+ --dictionary-output <file> Path to generated dictionary TS (default: ${DEFAULT_DICT_OUTPUT})
71
+ --measurements <file> Path to uns-measurements.json (default: ${DEFAULT_MEAS_INPUT})
72
+ --measurements-output <file> Path to generated measurements TS (default: ${DEFAULT_MEAS_OUTPUT})
73
+ --lang <code> Preferred description language (default: "sl")
74
+ --help, -h Show this help
75
75
  `);
76
76
  }
77
77
  const isDirectExecution = process.argv[1]
@@ -53,38 +53,38 @@ async function requestWithAuth(document) {
53
53
  }
54
54
  // Fetch and generate UnsTopics
55
55
  async function refreshUnsTopics() {
56
- const document = gql `
57
- query GetTreeStructure {
58
- GetTreeStructure {
59
- id
60
- parent
61
- unsNode
62
- children {
63
- id
64
- parent
65
- unsNode
66
- children {
67
- id
68
- parent
69
- unsNode
70
- children {
71
- id
72
- parent
73
- unsNode
74
- children {
75
- id
76
- parent
77
- unsNode
78
- children {
79
- id
80
- parent
81
- unsNode
82
- }
83
- }
84
- }
85
- }
86
- }
87
- }
56
+ const document = gql `
57
+ query GetTreeStructure {
58
+ GetTreeStructure {
59
+ id
60
+ parent
61
+ unsNode
62
+ children {
63
+ id
64
+ parent
65
+ unsNode
66
+ children {
67
+ id
68
+ parent
69
+ unsNode
70
+ children {
71
+ id
72
+ parent
73
+ unsNode
74
+ children {
75
+ id
76
+ parent
77
+ unsNode
78
+ children {
79
+ id
80
+ parent
81
+ unsNode
82
+ }
83
+ }
84
+ }
85
+ }
86
+ }
87
+ }
88
88
  }`;
89
89
  const query = await requestWithAuth(document);
90
90
  const tree = query.GetTreeStructure;
@@ -95,9 +95,9 @@ async function refreshUnsTopics() {
95
95
  }
96
96
  // Fetch and generate UnsTags
97
97
  async function refreshUnsTags() {
98
- const document = gql `
99
- query Query {
100
- GetTags
98
+ const document = gql `
99
+ query Query {
100
+ GetTags
101
101
  }`;
102
102
  const query = await requestWithAuth(document);
103
103
  const tags = query.GetTags;
@@ -147,15 +147,15 @@ function buildAssetEntries(assets) {
147
147
  }
148
148
  // Fetch and generate UnsAssets
149
149
  async function refreshUnsAssets() {
150
- const document = gql `
151
- query GetAssets {
152
- GetAssets {
153
- path
154
- description
155
- asset
156
- objectType
157
- objectId
158
- }
150
+ const document = gql `
151
+ query GetAssets {
152
+ GetAssets {
153
+ path
154
+ description
155
+ asset
156
+ objectType
157
+ objectId
158
+ }
159
159
  }`;
160
160
  const query = await requestWithAuth(document);
161
161
  let assets = buildAssetEntries(Array.isArray(query.GetAssets) ? query.GetAssets : []);
@@ -169,12 +169,12 @@ async function refreshUnsAssets() {
169
169
  return `${comment} "${entry.asset}": "${entry.asset}",`;
170
170
  })
171
171
  .join("\n");
172
- const helpers = `
173
- export function resolveGeneratedAsset(name: keyof typeof GeneratedAssets): (typeof GeneratedAssets)[keyof typeof GeneratedAssets];
174
- export function resolveGeneratedAsset<T extends string>(name: T): (typeof GeneratedAssets)[keyof typeof GeneratedAssets] | T;
175
- export function resolveGeneratedAsset(name: string): string {
176
- return (GeneratedAssets as Record<string, string>)[name] ?? name;
177
- }
172
+ const helpers = `
173
+ export function resolveGeneratedAsset(name: keyof typeof GeneratedAssets): (typeof GeneratedAssets)[keyof typeof GeneratedAssets];
174
+ export function resolveGeneratedAsset<T extends string>(name: T): (typeof GeneratedAssets)[keyof typeof GeneratedAssets] | T;
175
+ export function resolveGeneratedAsset(name: string): string {
176
+ return (GeneratedAssets as Record<string, string>)[name] ?? name;
177
+ }
178
178
  `;
179
179
  const vsebina = `${header}export const GeneratedAssets = {\n${entries}\n} as const;\nexport type GeneratedAssetName = typeof GeneratedAssets[keyof typeof GeneratedAssets];\n${helpers}`;
180
180
  const outputPath = path.resolve(process.cwd(), "src/uns/uns-assets.ts");
@@ -250,23 +250,23 @@ function assertValidUrl(value) {
250
250
  }
251
251
  }
252
252
  function printHelp() {
253
- console.log(`Usage: tsx packages/uns-core/src/tools/sync-uns-schema.ts [options]
254
-
255
- Pull the canonical UNS schema export from a controller and refresh the local
256
- JSON files plus generated TypeScript artifacts.
257
-
258
- Options:
259
- --controller-url <url> Controller base URL (env: UNS_CONTROLLER_URL, or config.json > uns.rest)
260
- --token <token> Bearer token for REST export (env: UNS_CONTROLLER_TOKEN)
261
- --status <value> Dictionary status filter: ${STATUS_VALUES.join("|")} (default: ${DEFAULT_STATUS}, env: UNS_SCHEMA_STATUS)
262
- --project-root <dir> Write into a generated microservice project root (env: UNS_SCHEMA_PROJECT_ROOT).
263
- When omitted, the tool auto-detects a generated project from the current working directory
264
- and otherwise updates the uns-kit repo templates.
265
- --dry-run Report file changes without writing anything
266
- --dictionary-only Sync only the UNS dictionary export
267
- --measurements-only Sync only the UNS measurements export
268
- --skip-generate Skip generated TypeScript refresh
269
- --help, -h Show this help
253
+ console.log(`Usage: tsx packages/uns-core/src/tools/sync-uns-schema.ts [options]
254
+
255
+ Pull the canonical UNS schema export from a controller and refresh the local
256
+ JSON files plus generated TypeScript artifacts.
257
+
258
+ Options:
259
+ --controller-url <url> Controller base URL (env: UNS_CONTROLLER_URL, or config.json > uns.rest)
260
+ --token <token> Bearer token for REST export (env: UNS_CONTROLLER_TOKEN)
261
+ --status <value> Dictionary status filter: ${STATUS_VALUES.join("|")} (default: ${DEFAULT_STATUS}, env: UNS_SCHEMA_STATUS)
262
+ --project-root <dir> Write into a generated microservice project root (env: UNS_SCHEMA_PROJECT_ROOT).
263
+ When omitted, the tool auto-detects a generated project from the current working directory
264
+ and otherwise updates the uns-kit repo templates.
265
+ --dry-run Report file changes without writing anything
266
+ --dictionary-only Sync only the UNS dictionary export
267
+ --measurements-only Sync only the UNS measurements export
268
+ --skip-generate Skip generated TypeScript refresh
269
+ --help, -h Show this help
270
270
  `);
271
271
  }
272
272
  async function findRepoRoot() {
@@ -655,6 +655,28 @@ export declare const unsCoreSchema: z.ZodObject<{
655
655
  instanceMode: z.ZodDefault<z.ZodEnum<["wait", "force", "handover"]>>;
656
656
  processName: z.ZodString;
657
657
  handover: z.ZodDefault<z.ZodBoolean>;
658
+ supervisor: z.ZodOptional<z.ZodObject<{
659
+ enabled: z.ZodDefault<z.ZodBoolean>;
660
+ restartOnExit: z.ZodDefault<z.ZodBoolean>;
661
+ maxMemoryMb: z.ZodOptional<z.ZodNumber>;
662
+ restartOnUnhealthy: z.ZodDefault<z.ZodBoolean>;
663
+ unhealthyAfterMs: z.ZodDefault<z.ZodNumber>;
664
+ restartCooldownMs: z.ZodDefault<z.ZodNumber>;
665
+ }, "strict", z.ZodTypeAny, {
666
+ enabled?: boolean;
667
+ restartOnExit?: boolean;
668
+ maxMemoryMb?: number;
669
+ restartOnUnhealthy?: boolean;
670
+ unhealthyAfterMs?: number;
671
+ restartCooldownMs?: number;
672
+ }, {
673
+ enabled?: boolean;
674
+ restartOnExit?: boolean;
675
+ maxMemoryMb?: number;
676
+ restartOnUnhealthy?: boolean;
677
+ unhealthyAfterMs?: number;
678
+ restartCooldownMs?: number;
679
+ }>>;
658
680
  jwksWellKnownUrl: z.ZodOptional<z.ZodString>;
659
681
  kidWellKnownUrl: z.ZodOptional<z.ZodString>;
660
682
  env: z.ZodDefault<z.ZodEnum<["dev", "staging", "test", "prod"]>>;
@@ -680,6 +702,14 @@ export declare const unsCoreSchema: z.ZodObject<{
680
702
  graphql?: string;
681
703
  rest?: string;
682
704
  instanceMode?: "wait" | "force" | "handover";
705
+ supervisor?: {
706
+ enabled?: boolean;
707
+ restartOnExit?: boolean;
708
+ maxMemoryMb?: number;
709
+ restartOnUnhealthy?: boolean;
710
+ unhealthyAfterMs?: number;
711
+ restartCooldownMs?: number;
712
+ };
683
713
  jwksWellKnownUrl?: string;
684
714
  kidWellKnownUrl?: string;
685
715
  }, {
@@ -704,6 +734,14 @@ export declare const unsCoreSchema: z.ZodObject<{
704
734
  graphql?: string;
705
735
  rest?: string;
706
736
  instanceMode?: "wait" | "force" | "handover";
737
+ supervisor?: {
738
+ enabled?: boolean;
739
+ restartOnExit?: boolean;
740
+ maxMemoryMb?: number;
741
+ restartOnUnhealthy?: boolean;
742
+ unhealthyAfterMs?: number;
743
+ restartCooldownMs?: number;
744
+ };
707
745
  jwksWellKnownUrl?: string;
708
746
  kidWellKnownUrl?: string;
709
747
  }>;
@@ -2653,6 +2691,14 @@ export declare const unsCoreSchema: z.ZodObject<{
2653
2691
  graphql?: string;
2654
2692
  rest?: string;
2655
2693
  instanceMode?: "wait" | "force" | "handover";
2694
+ supervisor?: {
2695
+ enabled?: boolean;
2696
+ restartOnExit?: boolean;
2697
+ maxMemoryMb?: number;
2698
+ restartOnUnhealthy?: boolean;
2699
+ unhealthyAfterMs?: number;
2700
+ restartCooldownMs?: number;
2701
+ };
2656
2702
  jwksWellKnownUrl?: string;
2657
2703
  kidWellKnownUrl?: string;
2658
2704
  };
@@ -2974,6 +3020,14 @@ export declare const unsCoreSchema: z.ZodObject<{
2974
3020
  graphql?: string;
2975
3021
  rest?: string;
2976
3022
  instanceMode?: "wait" | "force" | "handover";
3023
+ supervisor?: {
3024
+ enabled?: boolean;
3025
+ restartOnExit?: boolean;
3026
+ maxMemoryMb?: number;
3027
+ restartOnUnhealthy?: boolean;
3028
+ unhealthyAfterMs?: number;
3029
+ restartCooldownMs?: number;
3030
+ };
2977
3031
  jwksWellKnownUrl?: string;
2978
3032
  kidWellKnownUrl?: string;
2979
3033
  };
@@ -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;AAgCxB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0B5B,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AiCf,CAAC;AAEZ,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
@@ -26,6 +26,38 @@ const loggingLevelSchema = z.enum([
26
26
  "debug",
27
27
  "silly",
28
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."),
44
+ restartOnUnhealthy: z
45
+ .boolean()
46
+ .default(false)
47
+ .describe("Let the controller auto-start this instance when required system-service runtime signals are absent."),
48
+ unhealthyAfterMs: z
49
+ .number()
50
+ .int()
51
+ .positive()
52
+ .default(60_000)
53
+ .describe("How long runtime signals must stay unhealthy before the controller supervisor can act."),
54
+ restartCooldownMs: z
55
+ .number()
56
+ .int()
57
+ .positive()
58
+ .default(300_000)
59
+ .describe("Minimum time between controller supervisor restart attempts for this instance."),
60
+ }).strict().describe("Optional PM2/controller supervisor guard settings for this RTT instance.");
29
61
  export const mqttChannelSchema = z.object({
30
62
  host: hostValueSchema.optional(),
31
63
  hosts: z.array(hostValueSchema).optional(),
@@ -65,6 +97,7 @@ export const unsCoreSchema = z.object({
65
97
  .min(1)
66
98
  .describe("Process name used in MQTT topics and logs."),
67
99
  handover: z.boolean().default(true),
100
+ supervisor: supervisorSchema.optional(),
68
101
  jwksWellKnownUrl: z.string().url().optional(),
69
102
  kidWellKnownUrl: z.string().url().optional(),
70
103
  env: z.enum(["dev", "staging", "test", "prod"]).default("dev"),
@@ -1 +1 @@
1
- {"version":3,"file":"uns-core-schema.js","sourceRoot":"","sources":["../../src/uns-config/uns-core-schema.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,OAAO,EAA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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,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACvB,CAAC,CAAC,MAAM,EAAE,CAAC","sourcesContent":["// src/uns-config/uns-core-schema.ts\r\nimport { z } from \"zod\";\r\nimport { secretValueSchema } from \"./secret-placeholders.js\";\r\nimport { hostValueSchema } from \"./host-placeholders.js\";\r\n\r\nconst mqttProtocolSchema = z.enum([\"mqtt\", \"mqtts\", \"ws\", \"wss\", \"tcp\", \"ssl\"]);\r\n\r\nconst mqttServerSchema = z.object({\r\n host: hostValueSchema,\r\n port: z.number().int().positive().optional(),\r\n protocol: mqttProtocolSchema.optional(),\r\n}).strict();\r\n\r\nconst mqttConnectPropertiesSchema = z.object({\r\n sessionExpiryInterval: z.number().int().nonnegative().optional(),\r\n receiveMaximum: z.number().int().positive().optional(),\r\n maximumPacketSize: z.number().int().positive().optional(),\r\n topicAliasMaximum: z.number().int().nonnegative().optional(),\r\n requestResponseInformation: z.boolean().optional(),\r\n requestProblemInformation: z.boolean().optional(),\r\n userProperties: z.record(z.string()).optional(),\r\n}).strict();\r\n\r\nconst loggingLevelSchema = z.enum([\r\n \"error\",\r\n \"warn\",\r\n \"info\",\r\n \"http\",\r\n \"verbose\",\r\n \"debug\",\r\n \"silly\",\r\n]);\r\n\r\nexport const mqttChannelSchema = z.object({\r\n host: hostValueSchema.optional(),\r\n hosts: z.array(hostValueSchema).optional(),\r\n servers: z.array(mqttServerSchema).optional(),\r\n port: z.number().int().positive().optional(),\r\n protocol: mqttProtocolSchema.optional(),\r\n username: z.string().optional(),\r\n password: secretValueSchema.optional(),\r\n clientId: z.string().optional(),\r\n clean: z.boolean().optional(),\r\n keepalive: z.number().int().nonnegative().optional(),\r\n connectTimeout: z.number().int().nonnegative().optional(),\r\n reconnectPeriod: z.number().int().nonnegative().optional(),\r\n reconnectOnConnackError: z.boolean().optional(),\r\n resubscribe: z.boolean().optional(),\r\n queueQoSZero: z.boolean().optional(),\r\n rejectUnauthorized: z.boolean().optional(),\r\n properties: mqttConnectPropertiesSchema.optional(),\r\n ca: z.string().optional(),\r\n cert: z.string().optional(),\r\n key: z.string().optional(),\r\n servername: z.string().optional(),\r\n}).strict().refine((value) => {\r\n return !!value.host || (Array.isArray(value.hosts) && value.hosts.length > 0) || (Array.isArray(value.servers) && value.servers.length > 0);\r\n}, {\r\n message: \"One of host, hosts, or servers must be provided.\",\r\n});\r\n\r\nexport const unsCoreSchema = z.object({\r\n uns: z.object({\r\n graphql: z.string().url(),\r\n rest: z.string().url(),\r\n email: z.string().email().describe(\"Email used when authenticating to graphql endpoint of the UNS instance.\"),\r\n password: secretValueSchema.describe(\"Password or secret value paired with the UNS email.\"),\r\n instanceMode: z.enum([\"wait\", \"force\", \"handover\"]).default(\"wait\"),\r\n processName: z\r\n .string()\r\n .min(1)\r\n .describe(\"Process name used in MQTT topics and logs.\"),\r\n handover: z.boolean().default(true),\r\n jwksWellKnownUrl: z.string().url().optional(),\r\n kidWellKnownUrl: z.string().url().optional(),\r\n env: z.enum([\"dev\", \"staging\", \"test\", \"prod\"]).default(\"dev\"),\r\n }).strict(),\r\n\r\n logging: z.object({\r\n adapter: z.string().min(1).default(\"udp\"),\r\n host: hostValueSchema,\r\n port: z.number().int().positive().default(12201),\r\n level: loggingLevelSchema.default(\"info\"),\r\n }).strict().optional(),\r\n\r\n input: mqttChannelSchema.optional(),\r\n output: mqttChannelSchema.optional(),\r\n infra: mqttChannelSchema,\r\n devops: z.object({\r\n provider: z.enum([\"azure-devops\"]).default(\"azure-devops\"),\r\n organization: z.string().min(1),\r\n project: z.string().min(1).optional(),\r\n }).strict().optional(),\r\n}).strict();\r\n\r\nexport type UnsCore = z.infer<typeof unsCoreSchema>;\r\n"]}
1
+ {"version":3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AAM,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 email: z.string().email().describe(\"Email used when authenticating to graphql endpoint of the UNS instance.\"),\n password: secretValueSchema.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,104 +1,104 @@
1
- syntax = "proto3";
2
-
3
- package uns;
4
-
5
- service UnsGateway {
6
- rpc Publish (PublishRequest) returns (Ack);
7
- rpc Subscribe (SubscribeRequest) returns (stream MqttMessage);
8
- rpc RegisterApiGet (RegisterApiGetRequest) returns (Ack);
9
- rpc UnregisterApiGet (UnregisterApiGetRequest) returns (Ack);
10
- rpc ApiEventStream (stream ApiEventResponse) returns (stream ApiEvent);
11
- rpc Ready (ReadyRequest) returns (Ack);
12
- }
13
-
14
- message PublishRequest {
15
- string topic = 1;
16
- string attribute = 2;
17
- string description = 3;
18
- repeated string tags = 4;
19
- bool attribute_needs_persistence = 5;
20
- oneof content {
21
- Data data = 6;
22
- Table table = 7;
23
- }
24
- bool value_is_cumulative = 8; // for Data: publish as delta
25
- }
26
-
27
- message Data {
28
- string time = 1;
29
- double value_number = 2;
30
- string value_string = 3;
31
- string uom = 4;
32
- string data_group = 5;
33
- string foreign_event_key = 6;
34
- }
35
-
36
- message TableValue {
37
- string name = 1;
38
- string type = 2; // QuestDB column type (e.g., int, double, geohash(5c))
39
- string uom = 3; // Optional unit of measure
40
- double value_number = 4;
41
- string value_string = 5;
42
- }
43
-
44
- message Table {
45
- string time = 1;
46
- repeated TableValue columns = 2;
47
- string data_group = 3;
48
- }
49
-
50
- message SubscribeRequest {
51
- repeated string topics = 1;
52
- }
53
-
54
- message MqttMessage {
55
- string topic = 1;
56
- string payload = 2; // UNS packet JSON
57
- }
58
-
59
- message Ack {
60
- bool ok = 1;
61
- string error = 2;
62
- }
63
-
64
- message ReadyRequest {
65
- int32 timeout_ms = 1; // default 15000
66
- bool wait_output = 2; // wait for publisher active (output)
67
- bool wait_input = 3; // wait for subscriber active (input)
68
- bool wait_api = 4; // wait for API server (optional)
69
- }
70
-
71
- message ApiQueryParam {
72
- string name = 1;
73
- string type = 2; // string | number | boolean
74
- bool required = 3;
75
- string description = 4;
76
- }
77
-
78
- message RegisterApiGetRequest {
79
- string topic = 1;
80
- string attribute = 2;
81
- string api_description = 3;
82
- repeated string tags = 4;
83
- repeated ApiQueryParam query_params = 5;
84
- }
85
-
86
- message UnregisterApiGetRequest {
87
- string topic = 1;
88
- string attribute = 2;
89
- }
90
-
91
- message ApiEvent {
92
- string id = 1;
93
- string method = 2; // GET only for now
94
- string path = 3; // /{topic}{attribute}
95
- map<string, string> query = 4;
96
- string bearer = 5; // access token (optional)
97
- }
98
-
99
- message ApiEventResponse {
100
- string id = 1; // correlation
101
- int32 status = 2; // HTTP status
102
- string body = 3; // response body as string (JSON string if needed)
103
- map<string, string> headers = 4; // optional extra headers
104
- }
1
+ syntax = "proto3";
2
+
3
+ package uns;
4
+
5
+ service UnsGateway {
6
+ rpc Publish (PublishRequest) returns (Ack);
7
+ rpc Subscribe (SubscribeRequest) returns (stream MqttMessage);
8
+ rpc RegisterApiGet (RegisterApiGetRequest) returns (Ack);
9
+ rpc UnregisterApiGet (UnregisterApiGetRequest) returns (Ack);
10
+ rpc ApiEventStream (stream ApiEventResponse) returns (stream ApiEvent);
11
+ rpc Ready (ReadyRequest) returns (Ack);
12
+ }
13
+
14
+ message PublishRequest {
15
+ string topic = 1;
16
+ string attribute = 2;
17
+ string description = 3;
18
+ repeated string tags = 4;
19
+ bool attribute_needs_persistence = 5;
20
+ oneof content {
21
+ Data data = 6;
22
+ Table table = 7;
23
+ }
24
+ bool value_is_cumulative = 8; // for Data: publish as delta
25
+ }
26
+
27
+ message Data {
28
+ string time = 1;
29
+ double value_number = 2;
30
+ string value_string = 3;
31
+ string uom = 4;
32
+ string data_group = 5;
33
+ string foreign_event_key = 6;
34
+ }
35
+
36
+ message TableValue {
37
+ string name = 1;
38
+ string type = 2; // QuestDB column type (e.g., int, double, geohash(5c))
39
+ string uom = 3; // Optional unit of measure
40
+ double value_number = 4;
41
+ string value_string = 5;
42
+ }
43
+
44
+ message Table {
45
+ string time = 1;
46
+ repeated TableValue columns = 2;
47
+ string data_group = 3;
48
+ }
49
+
50
+ message SubscribeRequest {
51
+ repeated string topics = 1;
52
+ }
53
+
54
+ message MqttMessage {
55
+ string topic = 1;
56
+ string payload = 2; // UNS packet JSON
57
+ }
58
+
59
+ message Ack {
60
+ bool ok = 1;
61
+ string error = 2;
62
+ }
63
+
64
+ message ReadyRequest {
65
+ int32 timeout_ms = 1; // default 15000
66
+ bool wait_output = 2; // wait for publisher active (output)
67
+ bool wait_input = 3; // wait for subscriber active (input)
68
+ bool wait_api = 4; // wait for API server (optional)
69
+ }
70
+
71
+ message ApiQueryParam {
72
+ string name = 1;
73
+ string type = 2; // string | number | boolean
74
+ bool required = 3;
75
+ string description = 4;
76
+ }
77
+
78
+ message RegisterApiGetRequest {
79
+ string topic = 1;
80
+ string attribute = 2;
81
+ string api_description = 3;
82
+ repeated string tags = 4;
83
+ repeated ApiQueryParam query_params = 5;
84
+ }
85
+
86
+ message UnregisterApiGetRequest {
87
+ string topic = 1;
88
+ string attribute = 2;
89
+ }
90
+
91
+ message ApiEvent {
92
+ string id = 1;
93
+ string method = 2; // GET only for now
94
+ string path = 3; // /{topic}{attribute}
95
+ map<string, string> query = 4;
96
+ string bearer = 5; // access token (optional)
97
+ }
98
+
99
+ message ApiEventResponse {
100
+ string id = 1; // correlation
101
+ int32 status = 2; // HTTP status
102
+ string body = 3; // response body as string (JSON string if needed)
103
+ map<string, string> headers = 4; // optional extra headers
104
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uns-kit/core",
3
- "version": "2.0.42",
3
+ "version": "2.0.43",
4
4
  "description": "Core utilities and runtime building blocks for UNS-based realtime transformers.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-config.d.ts","sourceRoot":"","sources":["../src/app-config.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,SAAS,GAAG;IACpB,GAAG,EAAE;QACD,OAAO,EAAE,M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AC,EAAE,MAAM,GAAG,SAAS,CAAC;KACjC,CAAC;IACF,MAAM,CAAC,EAAE;QACL,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC9B,YAAY,EAAE,MAAM,CAAC;QACrB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KAChC,GAAG,SAAS,CAAC;CACjB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-config.js","sourceRoot":"","sources":["../src/app-config.ts"],"names":[],"mappings":"","sourcesContent":["/* Auto-generated. Do not edit by hand. */\r\nexport type AppConfig = {\r\n uns: {\r\n graphql: string;\r\n rest: string;\r\n instanceMode?: \"wait\" | \"force\" | \"handover\";\r\n processName?: string | undefined;\r\n handover?: boolean;\r\n jwksWellKnownUrl?: string | undefined;\r\n kidWellKnownUrl?: string | undefined;\r\n env?: \"dev\" | \"staging\" | \"test\" | \"prod\";\r\n };\r\n input?: {\r\n host: string | ({\r\n /** Use the supplied host or IP address. */\r\n provider: \"inline\";\r\n /** Host or IP address that should be used directly. */\r\n value: string;\r\n } | {\r\n /** Resolve the host from an external mapping. */\r\n provider: \"external\";\r\n /** Identifier used when resolving the host from HostResolverOptions. */\r\n key: string;\r\n /** Allow the external host to be missing without throwing during resolution. */\r\n optional?: boolean | undefined;\r\n /** Fallback host when optional is true and the external entry is missing. */\r\n default?: string | undefined;\r\n } | {\r\n /** Resolve the host from local network interfaces. */\r\n provider: \"system\";\r\n /** Address family to return when scanning interfaces. */\r\n family?: \"IPv4\" | \"IPv6\";\r\n /** Specific interface to read (falls back to the first match when omitted). */\r\n interfaceName?: string | undefined;\r\n /** Allow the interface lookup to fail without throwing during resolution. */\r\n optional?: boolean | undefined;\r\n /** Fallback host/IP when optional is true and no interface matches. */\r\n default?: string | undefined;\r\n });\r\n username?: string | undefined;\r\n password?: (string | ({\r\n /** Load the secret from an environment variable. */\r\n provider: \"env\";\r\n /** Name of the environment variable to read. */\r\n key: string;\r\n /** Allow the variable to be absent without throwing during resolution. */\r\n optional?: boolean | undefined;\r\n /** Fallback value when optional is true and the variable is missing. */\r\n default?: string | undefined;\r\n } | {\r\n /** Load the secret from Infisical. */\r\n provider: \"infisical\";\r\n /** Secret folder path in Infisical, e.g. '/app/database'. */\r\n path: string;\r\n /** Secret key/name inside the given path. */\r\n key: string;\r\n /** Allow the secret to be absent without throwing during resolution. */\r\n optional?: boolean | undefined;\r\n /** Infisical environment override (defaults to current mode if omitted). */\r\n environment?: string | undefined;\r\n /** Optional Infisical project identifier when not using the default. */\r\n projectId?: string | undefined;\r\n /** Fallback value when the secret is missing and optional resolution is allowed. */\r\n default?: string | undefined;\r\n })) | undefined;\r\n clientId?: string | undefined;\r\n } | undefined;\r\n output?: {\r\n host: string | ({\r\n /** Use the supplied host or IP address. */\r\n provider: \"inline\";\r\n /** Host or IP address that should be used directly. */\r\n value: string;\r\n } | {\r\n /** Resolve the host from an external mapping. */\r\n provider: \"external\";\r\n /** Identifier used when resolving the host from HostResolverOptions. */\r\n key: string;\r\n /** Allow the external host to be missing without throwing during resolution. */\r\n optional?: boolean | undefined;\r\n /** Fallback host when optional is true and the external entry is missing. */\r\n default?: string | undefined;\r\n } | {\r\n /** Resolve the host from local network interfaces. */\r\n provider: \"system\";\r\n /** Address family to return when scanning interfaces. */\r\n family?: \"IPv4\" | \"IPv6\";\r\n /** Specific interface to read (falls back to the first match when omitted). */\r\n interfaceName?: string | undefined;\r\n /** Allow the interface lookup to fail without throwing during resolution. */\r\n optional?: boolean | undefined;\r\n /** Fallback host/IP when optional is true and no interface matches. */\r\n default?: string | undefined;\r\n });\r\n username?: string | undefined;\r\n password?: (string | ({\r\n /** Load the secret from an environment variable. */\r\n provider: \"env\";\r\n /** Name of the environment variable to read. */\r\n key: string;\r\n /** Allow the variable to be absent without throwing during resolution. */\r\n optional?: boolean | undefined;\r\n /** Fallback value when optional is true and the variable is missing. */\r\n default?: string | undefined;\r\n } | {\r\n /** Load the secret from Infisical. */\r\n provider: \"infisical\";\r\n /** Secret folder path in Infisical, e.g. '/app/database'. */\r\n path: string;\r\n /** Secret key/name inside the given path. */\r\n key: string;\r\n /** Allow the secret to be absent without throwing during resolution. */\r\n optional?: boolean | undefined;\r\n /** Infisical environment override (defaults to current mode if omitted). */\r\n environment?: string | undefined;\r\n /** Optional Infisical project identifier when not using the default. */\r\n projectId?: string | undefined;\r\n /** Fallback value when the secret is missing and optional resolution is allowed. */\r\n default?: string | undefined;\r\n })) | undefined;\r\n clientId?: string | undefined;\r\n } | undefined;\r\n infra: {\r\n host: string | ({\r\n /** Use the supplied host or IP address. */\r\n provider: \"inline\";\r\n /** Host or IP address that should be used directly. */\r\n value: string;\r\n } | {\r\n /** Resolve the host from an external mapping. */\r\n provider: \"external\";\r\n /** Identifier used when resolving the host from HostResolverOptions. */\r\n key: string;\r\n /** Allow the external host to be missing without throwing during resolution. */\r\n optional?: boolean | undefined;\r\n /** Fallback host when optional is true and the external entry is missing. */\r\n default?: string | undefined;\r\n } | {\r\n /** Resolve the host from local network interfaces. */\r\n provider: \"system\";\r\n /** Address family to return when scanning interfaces. */\r\n family?: \"IPv4\" | \"IPv6\";\r\n /** Specific interface to read (falls back to the first match when omitted). */\r\n interfaceName?: string | undefined;\r\n /** Allow the interface lookup to fail without throwing during resolution. */\r\n optional?: boolean | undefined;\r\n /** Fallback host/IP when optional is true and no interface matches. */\r\n default?: string | undefined;\r\n });\r\n username?: string | undefined;\r\n password?: (string | ({\r\n /** Load the secret from an environment variable. */\r\n provider: \"env\";\r\n /** Name of the environment variable to read. */\r\n key: string;\r\n /** Allow the variable to be absent without throwing during resolution. */\r\n optional?: boolean | undefined;\r\n /** Fallback value when optional is true and the variable is missing. */\r\n default?: string | undefined;\r\n } | {\r\n /** Load the secret from Infisical. */\r\n provider: \"infisical\";\r\n /** Secret folder path in Infisical, e.g. '/app/database'. */\r\n path: string;\r\n /** Secret key/name inside the given path. */\r\n key: string;\r\n /** Allow the secret to be absent without throwing during resolution. */\r\n optional?: boolean | undefined;\r\n /** Infisical environment override (defaults to current mode if omitted). */\r\n environment?: string | undefined;\r\n /** Optional Infisical project identifier when not using the default. */\r\n projectId?: string | undefined;\r\n /** Fallback value when the secret is missing and optional resolution is allowed. */\r\n default?: string | undefined;\r\n })) | undefined;\r\n clientId?: string | undefined;\r\n };\r\n devops?: {\r\n provider?: string | undefined;\r\n organization: string;\r\n project?: string | undefined;\r\n } | undefined;\r\n}\r\n"]}