@uns-kit/cli 0.0.66 → 0.0.68

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uns-kit/cli",
3
- "version": "0.0.66",
3
+ "version": "0.0.68",
4
4
  "description": "Command line scaffolding tool for UNS applications",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -26,13 +26,13 @@
26
26
  ],
27
27
  "dependencies": {
28
28
  "azure-devops-node-api": "^15.1.1",
29
- "@uns-kit/core": "1.0.32"
29
+ "@uns-kit/core": "1.0.34"
30
30
  },
31
31
  "unsKitPackages": {
32
- "@uns-kit/core": "1.0.32",
33
- "@uns-kit/api": "0.0.42",
34
- "@uns-kit/cron": "0.0.42",
35
- "@uns-kit/temporal": "0.0.41"
32
+ "@uns-kit/core": "1.0.34",
33
+ "@uns-kit/api": "0.0.44",
34
+ "@uns-kit/cron": "0.0.44",
35
+ "@uns-kit/temporal": "0.0.43"
36
36
  },
37
37
  "scripts": {
38
38
  "build": "tsc -p tsconfig.build.json",
@@ -5,7 +5,7 @@ import { UnsProxyProcess, ConfigFile } from "@uns-kit/core";
5
5
  import { IApiProxyOptions } from "@uns-kit/core";
6
6
  import type { UnsEvents } from "@uns-kit/core";
7
7
  import "@uns-kit/api";
8
- import { type UnsProxyProcessWithApi } from "@uns-kit/api.js";
8
+ import { type UnsProxyProcessWithApi } from "@uns-kit/api";
9
9
 
10
10
  /**
11
11
  * Load the configuration from a file.
@@ -22,7 +22,9 @@ const apiOptions: IApiProxyOptions = config.uns?.jwksWellKnownUrl
22
22
  ? {
23
23
  jwks: {
24
24
  wellKnownJwksUrl: config.uns.jwksWellKnownUrl,
25
- activeKidUrl: config.uns.kidWellKnownUrl,
25
+ ...(config.uns.kidWellKnownUrl !== undefined
26
+ ? { activeKidUrl: config.uns.kidWellKnownUrl }
27
+ : {}),
26
28
  },
27
29
  }
28
30
  : {
@@ -33,21 +35,48 @@ const apiInput = await unsProxyProcess.createApiProxy("templateUnsApiInput", api
33
35
  /**
34
36
  * Register an API endpoint and event handler
35
37
  */
36
- apiInput.get("example/", "summary-1",{
37
- tags: ["Tag1"],
38
- apiDescription: "Test API endpoint 1",
39
- queryParams: [
40
- { name: "filter", type: "string", required: true, description: "Filter za podatke" },
41
- { name: "limit", type: "number", required: false, description: "Koliko podatkov želiš" },
42
- ]
43
- });
38
+ apiInput.get(
39
+ "enterprise/site/area/line/",
40
+ "line-3-furnace",
41
+ "energy-resource",
42
+ "main-bus",
43
+ "summary-1",
44
+ {
45
+ tags: ["Tag1"],
46
+ apiDescription: "Test API endpoint 1",
47
+ queryParams: [
48
+ { name: "filter", type: "string", required: true, description: "Filter za podatke" },
49
+ { name: "limit", type: "number", required: false, description: "Koliko podatkov želiš" },
50
+ ],
51
+ }
52
+ );
53
+
54
+ apiInput.get(
55
+ "enterprise/site/area/line/",
56
+ "line-3-compressor",
57
+ "utility-resource",
58
+ "air-loop-1",
59
+ "summary-2",
60
+ {
61
+ tags: ["Tag2"],
62
+ apiDescription: "Test API endpoint 2",
63
+ queryParams: [
64
+ { name: "filter", type: "string", required: true, description: "Filter za podatke" },
65
+ { name: "limit", type: "number", required: false, description: "Koliko podatkov želiš" },
66
+ ],
67
+ }
68
+ );
44
69
 
45
- apiInput.get("example/", "summary-2",{
46
- tags: ["Tag2"],
47
- apiDescription: "Test API endpoint 2",
70
+ /**
71
+ * Optional: register a catch-all API mapping for a topic prefix.
72
+ * This does not create per-attribute API nodes; the controller treats it as a fallback handler.
73
+ * You can provide a separate Swagger doc for catch-all so it stays distinct from normal APIs (optional).
74
+ */
75
+ await apiInput.registerCatchAll("sij/acroni/#", {
76
+ apiDescription: "Catch-all handler for sij/acroni/*",
77
+ tags: ["CatchAll"],
48
78
  queryParams: [
49
- { name: "filter", type: "string", required: true, description: "Filter za podatke" },
50
- { name: "limit", type: "number", required: false, description: "Koliko podatkov želiš" },
79
+ { name: "filter", type: "string", required: false, description: "Filter parameter" },
51
80
  ]
52
81
  });
53
82