amaran-light-cli 1.10.0 → 1.11.0

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 (132) hide show
  1. package/README.md +46 -3
  2. package/dist/__tests__/autoCct.test.js +8 -4
  3. package/dist/__tests__/autoCct.test.js.map +1 -1
  4. package/dist/__tests__/autoCctMaxLux.test.js +11 -9
  5. package/dist/__tests__/autoCctMaxLux.test.js.map +1 -1
  6. package/dist/__tests__/autostart.test.js +18 -0
  7. package/dist/__tests__/autostart.test.js.map +1 -1
  8. package/dist/__tests__/cctUtil.test.js +2 -1
  9. package/dist/__tests__/cctUtil.test.js.map +1 -1
  10. package/dist/__tests__/cli.config.test.d.ts +2 -0
  11. package/dist/__tests__/cli.config.test.d.ts.map +1 -0
  12. package/dist/__tests__/cli.config.test.js +65 -0
  13. package/dist/__tests__/cli.config.test.js.map +1 -0
  14. package/dist/__tests__/cli.smoke.test.js +36 -17
  15. package/dist/__tests__/cli.smoke.test.js.map +1 -1
  16. package/dist/__tests__/lightControl.test.js +2 -2
  17. package/dist/__tests__/lightControl.test.js.map +1 -1
  18. package/dist/__tests__/maxLuxInterpolation.test.js +4 -2
  19. package/dist/__tests__/maxLuxInterpolation.test.js.map +1 -1
  20. package/dist/__tests__/packageExports.test.d.ts +2 -0
  21. package/dist/__tests__/packageExports.test.d.ts.map +1 -0
  22. package/dist/__tests__/packageExports.test.js +33 -0
  23. package/dist/__tests__/packageExports.test.js.map +1 -0
  24. package/dist/__tests__/simulateSchedule.test.js +7 -3
  25. package/dist/__tests__/simulateSchedule.test.js.map +1 -1
  26. package/dist/circadian.d.ts +16 -0
  27. package/dist/circadian.d.ts.map +1 -0
  28. package/dist/circadian.js +11 -0
  29. package/dist/circadian.js.map +1 -0
  30. package/dist/cli.d.ts +2 -1
  31. package/dist/cli.d.ts.map +1 -1
  32. package/dist/cli.js +35 -28
  33. package/dist/cli.js.map +1 -1
  34. package/dist/commands/__tests__/integration.test.js +28 -0
  35. package/dist/commands/__tests__/integration.test.js.map +1 -1
  36. package/dist/commands/cmdUtils.d.ts +4 -1
  37. package/dist/commands/cmdUtils.d.ts.map +1 -1
  38. package/dist/commands/cmdUtils.js +19 -0
  39. package/dist/commands/cmdUtils.js.map +1 -1
  40. package/dist/commands/daylightSimulation/autoCct.d.ts.map +1 -1
  41. package/dist/commands/daylightSimulation/autoCct.js +64 -32
  42. package/dist/commands/daylightSimulation/autoCct.js.map +1 -1
  43. package/dist/commands/daylightSimulation/graphSchedule.d.ts.map +1 -1
  44. package/dist/commands/daylightSimulation/graphSchedule.js +2 -0
  45. package/dist/commands/daylightSimulation/graphSchedule.js.map +1 -1
  46. package/dist/commands/daylightSimulation/printSchedule.d.ts.map +1 -1
  47. package/dist/commands/daylightSimulation/printSchedule.js +2 -0
  48. package/dist/commands/daylightSimulation/printSchedule.js.map +1 -1
  49. package/dist/commands/daylightSimulation/service.d.ts.map +1 -1
  50. package/dist/commands/daylightSimulation/service.js +15 -7
  51. package/dist/commands/daylightSimulation/service.js.map +1 -1
  52. package/dist/commands/daylightSimulation/simulateSchedule.d.ts.map +1 -1
  53. package/dist/commands/daylightSimulation/simulateSchedule.js +26 -9
  54. package/dist/commands/daylightSimulation/simulateSchedule.js.map +1 -1
  55. package/dist/commands/daylightSimulation/weather.d.ts.map +1 -1
  56. package/dist/commands/daylightSimulation/weather.js +19 -4
  57. package/dist/commands/daylightSimulation/weather.js.map +1 -1
  58. package/dist/commands/deviceControl/cct.d.ts.map +1 -1
  59. package/dist/commands/deviceControl/cct.js +10 -12
  60. package/dist/commands/deviceControl/cct.js.map +1 -1
  61. package/dist/commands/deviceControl/color.d.ts.map +1 -1
  62. package/dist/commands/deviceControl/color.js +3 -9
  63. package/dist/commands/deviceControl/color.js.map +1 -1
  64. package/dist/commands/deviceControl/config.d.ts.map +1 -1
  65. package/dist/commands/deviceControl/config.js +68 -55
  66. package/dist/commands/deviceControl/config.js.map +1 -1
  67. package/dist/commands/deviceControl/hsi.d.ts.map +1 -1
  68. package/dist/commands/deviceControl/hsi.js +3 -9
  69. package/dist/commands/deviceControl/hsi.js.map +1 -1
  70. package/dist/commands/deviceControl/intensity.d.ts.map +1 -1
  71. package/dist/commands/deviceControl/intensity.js +10 -12
  72. package/dist/commands/deviceControl/intensity.js.map +1 -1
  73. package/dist/commands/deviceControl/list.d.ts.map +1 -1
  74. package/dist/commands/deviceControl/list.js +18 -13
  75. package/dist/commands/deviceControl/list.js.map +1 -1
  76. package/dist/commands/deviceControl/power.d.ts.map +1 -1
  77. package/dist/commands/deviceControl/power.js +10 -25
  78. package/dist/commands/deviceControl/power.js.map +1 -1
  79. package/dist/commands/deviceControl/status.d.ts.map +1 -1
  80. package/dist/commands/deviceControl/status.js +3 -3
  81. package/dist/commands/deviceControl/status.js.map +1 -1
  82. package/dist/commands/parseUtils.d.ts +6 -0
  83. package/dist/commands/parseUtils.d.ts.map +1 -0
  84. package/dist/commands/parseUtils.js +42 -0
  85. package/dist/commands/parseUtils.js.map +1 -0
  86. package/dist/commands-api.d.ts +28 -0
  87. package/dist/commands-api.d.ts.map +1 -0
  88. package/dist/commands-api.js +27 -0
  89. package/dist/commands-api.js.map +1 -0
  90. package/dist/config.d.ts +83 -0
  91. package/dist/config.d.ts.map +1 -0
  92. package/dist/config.js +114 -0
  93. package/dist/config.js.map +1 -0
  94. package/dist/daylightSimulation/cctUtil.d.ts.map +1 -1
  95. package/dist/daylightSimulation/cctUtil.js +21 -20
  96. package/dist/daylightSimulation/cctUtil.js.map +1 -1
  97. package/dist/daylightSimulation/curves/realistic.d.ts +6 -6
  98. package/dist/daylightSimulation/curves/realistic.d.ts.map +1 -1
  99. package/dist/daylightSimulation/curves/realistic.js +36 -6
  100. package/dist/daylightSimulation/curves/realistic.js.map +1 -1
  101. package/dist/daylightSimulation/mathUtil.d.ts.map +1 -1
  102. package/dist/daylightSimulation/mathUtil.js +6 -2
  103. package/dist/daylightSimulation/mathUtil.js.map +1 -1
  104. package/dist/daylightSimulation/scheduleMaker.d.ts +6 -2
  105. package/dist/daylightSimulation/scheduleMaker.d.ts.map +1 -1
  106. package/dist/daylightSimulation/scheduleMaker.js +4 -6
  107. package/dist/daylightSimulation/scheduleMaker.js.map +1 -1
  108. package/dist/daylightSimulation/types.d.ts +2 -0
  109. package/dist/daylightSimulation/types.d.ts.map +1 -1
  110. package/dist/daylightSimulation/types.js.map +1 -1
  111. package/dist/daylightSimulation/weatherUtil.d.ts.map +1 -1
  112. package/dist/daylightSimulation/weatherUtil.js +31 -0
  113. package/dist/daylightSimulation/weatherUtil.js.map +1 -1
  114. package/dist/device-control.d.ts +7 -0
  115. package/dist/device-control.d.ts.map +1 -0
  116. package/dist/device-control.js +7 -0
  117. package/dist/device-control.js.map +1 -0
  118. package/dist/deviceControl/autostart.d.ts.map +1 -1
  119. package/dist/deviceControl/autostart.js +15 -16
  120. package/dist/deviceControl/autostart.js.map +1 -1
  121. package/dist/deviceControl/lightControl.d.ts +1 -0
  122. package/dist/deviceControl/lightControl.d.ts.map +1 -1
  123. package/dist/deviceControl/lightControl.js +20 -10
  124. package/dist/deviceControl/lightControl.js.map +1 -1
  125. package/dist/deviceControl/types.d.ts +8 -0
  126. package/dist/deviceControl/types.d.ts.map +1 -1
  127. package/dist/index.d.ts +11 -0
  128. package/dist/index.d.ts.map +1 -0
  129. package/dist/index.js +7 -0
  130. package/dist/index.js.map +1 -0
  131. package/docs/CHANGELOG.md +134 -0
  132. package/package.json +33 -6
@@ -0,0 +1,134 @@
1
+ ## [1.11.0] - 2026-05-03
2
+
3
+ - **Feature**: Added public library entrypoints for the root SDK, device control APIs, circadian scheduling utilities, command registration, and CLI embedding.
4
+ - **Feature**: Made `ScheduleMaker` usable as a standalone library API without requiring full CLI dependency wiring.
5
+ - **Fix**: Corrected `cct --get <device>` and `intensity --get <device>` so they target the named device instead of all lights.
6
+ - **Docs**: Added README examples for importing and using the package as a library.
7
+ - **Test**: Added package export smoke coverage and getter-targeting regression tests.
8
+
9
+ ## [1.9.0] - 2025-12-24
10
+
11
+ - **Feature**: Consolidated all schedule-related commands (`print-schedule`, `graph-schedule`, `simulate-schedule`) under a unified `schedule` namespace:
12
+ - `schedule print`: Display a table of the day's circadian values.
13
+ - `schedule graph`: Generate a visual graph of the lighting curve.
14
+ - `schedule simulate`: Run a high-speed simulation of the schedule on your physical lights.
15
+ - **Feature**: Added `-g, --get` support to `on`, `off`, `cct`, `hsi`, and `color` commands to retrieve current device status.
16
+ - **Feature**: Enhanced `info` command to support all devices when no device name is provided.
17
+ - **Feature**: Added privacy redaction for location data in service logs.
18
+ - **Improvement**: Replaced `info device` with a more direct `info` command structure.
19
+ - **Improvement**: Better alignment and formatting for CLI help output and auto-cct time display.
20
+ - **Fix**: Resolved issue where HSI retrieval was failing or hanging.
21
+ - **Fix**: Improved `schedule simulate` to ensure lights are turned on before starting the simulation.
22
+ - **Fix**: Corrected intensity clamping logic for `auto-cct` with `maxLux` settings.
23
+
24
+ ## [1.8.1] - 2025-12-23
25
+
26
+ - **Fix**: Resolved issue where max/min intensity boundaries were not being respected when `maxLux` setting was active.
27
+
28
+ ## [1.8.0] - 2025-12-22
29
+
30
+ - **Feature**: Added global timestamp logging for service runs to improve traceability.
31
+ - **Refactor**: Centralized curve data and metadata for better consistency across the CLI.
32
+ - **Breaking Change**: Removed `intensityMultiplier` per-light configuration (superseded by `maxLux` mapping).
33
+ - **Cleanup**: General codebase refactoring and type safety improvements.
34
+
35
+ ## [1.7.0] - 2025-12-21
36
+
37
+ - **Feature**: Added Weather Modifiers (`--cloud-cover`, `--precipitation`) to `auto-cct` and schedule commands for realistic simulation of weather conditions.
38
+ - **Feature**: Enhanced Max Lux Mapping to support CCT-dependent values and interpolation (e.g., `--max-lux "2700:8000, 5600:10000"`).
39
+ - **Doc**: Comprehensive README updates including new weather and advanced max lux features.
40
+
41
+ ## [1.6.0] - 2025-12-21
42
+
43
+ - **Feature**: Implemented Group Management commands (`create-group`, `delete-group`, `list-groups`, `group-control`).
44
+ - **Feature**: Added Quickshot functionality (`quickshot`, `save-quickshot`, `delete-quickshot`, `list-quickshots`).
45
+ - **Feature**: Added `lightOutput` parameter to sunlight curves for seasonal lux variation.
46
+ - **Improvement**: Added `intensity` control to more device commands.
47
+ - **Refactor**: Major refactoring of `lightControl` module for better maintainability.
48
+ - **Refactor**: Moved `graphSchedule` logic to `daylightSimulation` directory.
49
+ - **Fix**: Resolved CLI hang issues after device commands.
50
+ - **Doc**: Updated API documentation and usage guides.
51
+
52
+ ## [1.5.0] - 2025-12-21
53
+
54
+ - **Refactor**: Major architectural improvements and code reorganization.
55
+ - Centralized daylight simulation logic into `ScheduleMaker` and `Schedule` objects.
56
+ - Modularized CCT utilities into specialized sub-modules for better maintainability.
57
+ - Separated rendering logic into dedicated `textSchedule` and `graphSchedule` modules.
58
+ - Standardized device control commands using a shared execution utility.
59
+ - **Feature**: Added `-C, --curves` option to specify subsets of curves in `print-schedule` and `graph-schedule`.
60
+ - **Feature**: Added CSV export support to the `print-schedule` command.
61
+ - **Improvement**: Optimized `graph-schedule` by automatically trimming inactive periods for cleaner visualization.
62
+ - **Improvement**: Enhanced `print-schedule` table with shortened headers and better formatting for small terminals.
63
+ - **Fix**: Resolved issue where the CLI would hang after executing device control commands.
64
+ - **Fix**: Improved WebSocket connection management and closing logic.
65
+ - **Chore**: Migrated to Biome for faster linting and formatting.
66
+ - **Chore**: Integrated ESLint for better deprecation tracking in TypeScript.
67
+
68
+ ## [1.4.0] - 2025-12-15
69
+
70
+ - **Feature**: Added `graph-schedule` command to generate visual graphs of the lighting schedule.
71
+
72
+ ## [1.3.6] - 2025-12-14
73
+
74
+ - **Fix**: Updated workflow to use latest `npm` version for better OIDC support.
75
+
76
+ ## [1.3.5] - 2025-12-14
77
+
78
+ - **Fix**: Re-applied `registry-url` configuration fix (previous attempt in v1.3.4 failed to update workflow).
79
+
80
+ ## [1.3.4] - 2025-12-14
81
+
82
+ - **Fix**: Restored `registry-url` configuration (required for OIDC `ENEEDAUTH` fix).
83
+
84
+ ## [1.3.3] - 2025-12-14
85
+
86
+ - **Fix**: Removed conflicting `registry-url` configuration to enable OIDC authentication.
87
+
88
+ ## [1.3.2] - 2025-12-14
89
+
90
+ - **Fix**: Updated release workflow to use NPM Trusted Publishing (OIDC) instead of auth tokens.
91
+
92
+ ## [1.3.1] - 2025-12-14
93
+
94
+ - **Fix**: Resolved timezone issue in integration tests causing CI failures.
95
+
96
+ ## [1.3.0] - 2025-12-14
97
+
98
+ - **Breaking**: Migrated project to ESM (`type: module`).
99
+ - **Breaking**: Migrated testing framework from Jest to Vitest.
100
+ - **Feature**: Added `intensityMultiplier` support to `auto-cct`.
101
+ - **Feature**: `auto-cct` command now accepts a device argument (defaults to 'all').
102
+ - **Refactor**: Renamed `schedule` command to `print-schedule`.
103
+ - **Fix**: Resolved `suncalc` import issues.
104
+ - **Fix**: Improved CLI output styling for light mode terminals.
105
+ - **Chore**: Comprehensive linting and formatting fixes.
106
+
107
+ ## [1.1.4] - 2025-11-02
108
+
109
+ - test token config
110
+
111
+ ## [1.1.3] - 2025-11-02
112
+
113
+ - curve config and refactors
114
+
115
+ ## [1.1.2] - 2025-11-01
116
+
117
+ - Enhanced CLI help output and documentation
118
+
119
+ ## [1.1.0] - 2025-10-31
120
+
121
+ - Added more curves for auto-cct
122
+ - Improved schedule table display with all curves
123
+ - Better range for start/stop times for curves
124
+ - Added simulation of full day curve in seconds
125
+ - Added auto-start for the desktop app if closed
126
+ - Added more special times in schedule (e.g., Nautical Dawn)
127
+ - Various tests and refactoring
128
+
129
+ ## [1.0.3] - 2025-10-30
130
+
131
+ - Initial stable release with full CLI functionality
132
+ - WebSocket control for Aputure Amaran lights
133
+ - Auto-CCT circadian lighting feature
134
+ - Service automation for continuous lighting adjustment
package/package.json CHANGED
@@ -1,10 +1,32 @@
1
1
  {
2
2
  "name": "amaran-light-cli",
3
- "version": "1.10.0",
3
+ "version": "1.11.0",
4
4
  "type": "module",
5
5
  "description": "Command line tool for controlling Aputure Amaran lights via WebSocket to a local Amaran desktop app.",
6
- "main": "dist/lightControl.js",
7
- "types": "dist/lightControl.d.ts",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ },
13
+ "./device-control": {
14
+ "types": "./dist/device-control.d.ts",
15
+ "import": "./dist/device-control.js"
16
+ },
17
+ "./circadian": {
18
+ "types": "./dist/circadian.d.ts",
19
+ "import": "./dist/circadian.js"
20
+ },
21
+ "./commands": {
22
+ "types": "./dist/commands-api.d.ts",
23
+ "import": "./dist/commands-api.js"
24
+ },
25
+ "./cli": {
26
+ "import": "./dist/cli.js"
27
+ },
28
+ "./package.json": "./package.json"
29
+ },
8
30
  "bin": {
9
31
  "amaran-cli": "dist/cli.js"
10
32
  },
@@ -24,6 +46,9 @@
24
46
  "format:check": "biome format .",
25
47
  "check": "biome check .",
26
48
  "check:fix": "biome check --write .",
49
+ "typecheck": "tsc --noEmit",
50
+ "verify": "npm run check && npm run lint:deprecations && npm run build && npm test",
51
+ "prepare": "lefthook install",
27
52
  "release": "node scripts/release.js"
28
53
  },
29
54
  "files": [
@@ -31,7 +56,7 @@
31
56
  "scripts",
32
57
  "README.md",
33
58
  "LICENSE",
34
- "CHANGELOG.md"
59
+ "docs/CHANGELOG.md"
35
60
  ],
36
61
  "repository": {
37
62
  "type": "git",
@@ -54,7 +79,7 @@
54
79
  "author": "Mahyar McDonald <github@hmmfn.com>",
55
80
  "license": "MIT",
56
81
  "engines": {
57
- "node": ">=14.0.0"
82
+ "node": ">=20.0.0"
58
83
  },
59
84
  "dependencies": {
60
85
  "chalk": "^5.3.0",
@@ -63,7 +88,8 @@
63
88
  "commander": "^14.0.0",
64
89
  "geoip-lite": "^1.4.10",
65
90
  "suncalc": "^1.9.0",
66
- "ws": "^8.14.2"
91
+ "ws": "^8.14.2",
92
+ "zod": "^3.23.0"
67
93
  },
68
94
  "devDependencies": {
69
95
  "@biomejs/biome": "^2.3.8",
@@ -76,6 +102,7 @@
76
102
  "cheerio": "^1.1.2",
77
103
  "cross-env": "^10.1.0",
78
104
  "eslint": "^9.39.2",
105
+ "lefthook": "^2.1.6",
79
106
  "node-localstorage": "^3.0.5",
80
107
  "tsx": "^4.7.1",
81
108
  "typescript": "^5.2.2",