@uns-kit/cli 2.0.21 → 2.0.23

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.
Files changed (59) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +175 -175
  3. package/package.json +6 -6
  4. package/templates/api/src/examples/api-example.ts +91 -91
  5. package/templates/azure-pipelines.yml +21 -21
  6. package/templates/codegen/codegen.ts +15 -15
  7. package/templates/codegen/src/uns/uns-tags.ts +1 -1
  8. package/templates/codegen/src/uns/uns-topics.ts +1 -1
  9. package/templates/config-files/config-docker.json +26 -26
  10. package/templates/config-files/config-localhost.json +26 -26
  11. package/templates/cron/AGENTS.md +23 -23
  12. package/templates/cron/src/examples/cron-example.ts +71 -69
  13. package/templates/default/.prettierignore +1 -1
  14. package/templates/default/.prettierrc +7 -7
  15. package/templates/default/AGENTS.md +23 -23
  16. package/templates/default/README.md +41 -41
  17. package/templates/default/config.json +27 -27
  18. package/templates/default/eslint.config.js +30 -30
  19. package/templates/default/gitignore +51 -51
  20. package/templates/default/package.json +46 -46
  21. package/templates/default/src/config/project.config.extension.example +23 -23
  22. package/templates/default/src/config/project.config.extension.ts +6 -6
  23. package/templates/default/src/examples/data-example.ts +86 -84
  24. package/templates/default/src/examples/load-test-data.ts +110 -108
  25. package/templates/default/src/examples/table-example.ts +97 -95
  26. package/templates/default/src/examples/table-window-load-test.ts +446 -444
  27. package/templates/default/src/examples/uns-gateway-cli.ts +10 -7
  28. package/templates/default/src/index.ts +15 -15
  29. package/templates/default/src/uns/uns-assets.ts +12 -12
  30. package/templates/default/src/uns/uns-dictionary.generated.ts +758 -758
  31. package/templates/default/src/uns/uns-measurements.generated.ts +366 -366
  32. package/templates/default/src/uns/uns-tags.ts +2 -2
  33. package/templates/default/src/uns/uns-topics.ts +2 -2
  34. package/templates/default/tsconfig.json +29 -29
  35. package/templates/python/app/README.md +8 -8
  36. package/templates/python/examples/README.md +134 -134
  37. package/templates/python/examples/api_handler.py +28 -28
  38. package/templates/python/examples/data_publish.py +11 -11
  39. package/templates/python/examples/data_subscribe.py +8 -8
  40. package/templates/python/examples/data_transformer.py +17 -17
  41. package/templates/python/examples/table_transformer.py +15 -15
  42. package/templates/python/gateway/cli.py +75 -75
  43. package/templates/python/gateway/client.py +155 -155
  44. package/templates/python/gateway/manager.py +97 -97
  45. package/templates/python/gen/__init__.py +1 -0
  46. package/templates/python/gen/uns_gateway_pb2.py +70 -0
  47. package/templates/python/gen/uns_gateway_pb2_grpc.py +312 -0
  48. package/templates/python/gitignore +47 -47
  49. package/templates/python/proto/uns-gateway.proto +102 -102
  50. package/templates/python/pyproject.toml +4 -4
  51. package/templates/python/runtime.json +4 -4
  52. package/templates/python/scripts/setup.sh +87 -87
  53. package/templates/temporal/src/examples/temporal-example.ts +37 -35
  54. package/templates/uns-dictionary/uns-dictionary.json +650 -650
  55. package/templates/uns-measurements/uns-measurements.json +360 -360
  56. package/templates/vscode/.vscode/launch.json +164 -164
  57. package/templates/vscode/.vscode/settings.json +9 -9
  58. package/templates/vscode/.vscode/tasks.json +27 -27
  59. package/templates/vscode/uns-kit.code-workspace +13 -13
@@ -1,7 +1,10 @@
1
- import { startUnsGateway } from "@uns-kit/core/uns-grpc/uns-gateway-server.js";
2
-
3
- const addr = await startUnsGateway();
4
- console.log(`UNS Gateway listening on ${addr.address} (UDS=${addr.isUDS})`);
5
- // Keep alive
6
- setInterval(() => {}, 1 << 30);
7
-
1
+ import { startUnsGateway } from "@uns-kit/core/uns-grpc/uns-gateway-server.js";
2
+ import { getLogger } from "@uns-kit/core";
3
+
4
+ const logger = getLogger(import.meta.url);
5
+
6
+ const addr = await startUnsGateway();
7
+ logger.info(`UNS Gateway listening on ${addr.address} (UDS=${addr.isUDS})`);
8
+ // Keep alive
9
+ setInterval(() => {}, 1 << 30);
10
+
@@ -1,15 +1,15 @@
1
- import { UnsProxyProcess } from "@uns-kit/core";
2
-
3
- async function main(): Promise<void> {
4
- const name = "__APP_NAME__";
5
- const process = new UnsProxyProcess("localhost:1883", {
6
- processName: name,
7
- });
8
-
9
- console.log(`UNS process '${name}' is ready. Edit src/index.ts to add your logic.`);
10
-
11
- // Keep the process alive or add plugin logic here
12
- void process;
13
- }
14
-
15
- void main();
1
+ import { UnsProxyProcess } from "@uns-kit/core";
2
+
3
+ async function main(): Promise<void> {
4
+ const name = "__APP_NAME__";
5
+ const process = new UnsProxyProcess("localhost:1883", {
6
+ processName: name,
7
+ });
8
+
9
+ console.log(`UNS process '${name}' is ready. Edit src/index.ts to add your logic.`);
10
+
11
+ // Keep the process alive or add plugin logic here
12
+ void process;
13
+ }
14
+
15
+ void main();
@@ -1,12 +1,12 @@
1
- // Generated UNS asset list. Run `pnpm refresh-uns` to update.
2
- export const GeneratedAssets = {
3
- /** Example asset. Replace with your own names after running generate-uns-metadata. */
4
- "asset": "asset",
5
- } as const;
6
- export type GeneratedAssetName = typeof GeneratedAssets[keyof typeof GeneratedAssets];
7
-
8
- export function resolveGeneratedAsset(name: keyof typeof GeneratedAssets): (typeof GeneratedAssets)[keyof typeof GeneratedAssets];
9
- export function resolveGeneratedAsset<T extends string>(name: T): (typeof GeneratedAssets)[keyof typeof GeneratedAssets] | T;
10
- export function resolveGeneratedAsset(name: string): string {
11
- return (GeneratedAssets as Record<string, string>)[name] ?? name;
12
- }
1
+ // Generated UNS asset list. Run `pnpm refresh-uns` to update.
2
+ export const GeneratedAssets = {
3
+ /** Example asset. Replace with your own names after running generate-uns-metadata. */
4
+ "asset": "asset",
5
+ } as const;
6
+ export type GeneratedAssetName = typeof GeneratedAssets[keyof typeof GeneratedAssets];
7
+
8
+ export function resolveGeneratedAsset(name: keyof typeof GeneratedAssets): (typeof GeneratedAssets)[keyof typeof GeneratedAssets];
9
+ export function resolveGeneratedAsset<T extends string>(name: T): (typeof GeneratedAssets)[keyof typeof GeneratedAssets] | T;
10
+ export function resolveGeneratedAsset(name: string): string {
11
+ return (GeneratedAssets as Record<string, string>)[name] ?? name;
12
+ }