@signageos/cli 2.4.1 → 2.6.0-rc.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 (125) hide show
  1. package/README.md +27 -1
  2. package/dist/Applet/Build/appletBuildCommand.d.ts +28 -2
  3. package/dist/Applet/Build/appletBuildCommand.js +27 -1
  4. package/dist/Applet/Generate/Templates/index.js.template +1 -1
  5. package/dist/Applet/Generate/Templates/tsconfig.js.template +1 -1
  6. package/dist/Applet/Generate/appletGenerateCommand.d.ts +29 -23
  7. package/dist/Applet/Generate/appletGenerateCommand.js +38 -32
  8. package/dist/Applet/Start/appletStartCommand.d.ts +44 -2
  9. package/dist/Applet/Start/appletStartCommand.js +44 -2
  10. package/dist/Applet/Test/Upload/appletTestRunCommand.d.ts +25 -2
  11. package/dist/Applet/Test/Upload/appletTestRunCommand.js +24 -1
  12. package/dist/Applet/Test/Upload/appletTestUploadCommand.d.ts +34 -4
  13. package/dist/Applet/Test/Upload/appletTestUploadCommand.js +32 -2
  14. package/dist/Applet/Test/appletTestCommand.d.ts +23 -6
  15. package/dist/Applet/Test/appletTestCommand.js +17 -0
  16. package/dist/Applet/Upload/appletUploadCommand.d.ts +46 -4
  17. package/dist/Applet/Upload/appletUploadCommand.js +44 -2
  18. package/dist/Applet/Upload/appletUploadFacade.js +3 -3
  19. package/dist/Applet/appletCommand.d.ts +42 -10
  20. package/dist/Applet/appletCommand.js +33 -1
  21. package/dist/Auth/loginCommand.d.ts +23 -2
  22. package/dist/Auth/loginCommand.js +42 -14
  23. package/dist/Command/Autocomplete/Install/installAutocompleteCommand.d.ts +17 -0
  24. package/dist/Command/Autocomplete/Install/installAutocompleteCommand.js +17 -0
  25. package/dist/Command/Autocomplete/Install/installAutocompleteCommand.ts +17 -0
  26. package/dist/Command/Autocomplete/Uninstall/uninstallAutocompleteCommand.d.ts +17 -0
  27. package/dist/Command/Autocomplete/Uninstall/uninstallAutocompleteCommand.js +22 -5
  28. package/dist/Command/Autocomplete/autocompleteCommand.d.ts +18 -0
  29. package/dist/Command/Autocomplete/autocompleteCommand.js +19 -1
  30. package/dist/Command/autoComplete.js +2 -2
  31. package/dist/Command/globalArgs.d.ts +33 -0
  32. package/dist/Command/globalArgs.js +33 -0
  33. package/dist/CustomScript/Generate/customScriptGenerateCommand.d.ts +19 -0
  34. package/dist/CustomScript/Generate/customScriptGenerateCommand.js +20 -1
  35. package/dist/CustomScript/Upload/customScriptUploadCommand.d.ts +32 -2
  36. package/dist/CustomScript/Upload/customScriptUploadCommand.js +31 -1
  37. package/dist/CustomScript/customScriptCommand.d.ts +21 -1
  38. package/dist/CustomScript/customScriptCommand.js +20 -0
  39. package/dist/CustomScript/customScriptFacade.d.ts +5 -5
  40. package/dist/CustomScript/customScriptFacade.js +5 -4
  41. package/dist/Device/Connect/connectCommand.d.ts +51 -2
  42. package/dist/Device/Connect/connectCommand.js +50 -1
  43. package/dist/Device/Content/setContentCommand.d.ts +28 -2
  44. package/dist/Device/Content/setContentCommand.js +27 -1
  45. package/dist/Device/PowerAction/powerActionCommand.d.ts +54 -2
  46. package/dist/Device/PowerAction/powerActionCommand.js +52 -0
  47. package/dist/Device/deviceCommand.d.ts +26 -6
  48. package/dist/Device/deviceCommand.js +21 -1
  49. package/dist/Device/deviceFacade.d.ts +1 -1
  50. package/dist/Firmware/Upload/firmwareUploadCommand.d.ts +42 -0
  51. package/dist/Firmware/Upload/firmwareUploadCommand.js +40 -6
  52. package/dist/Firmware/Upload/firmwareUploadFacade.js +1 -1
  53. package/dist/Firmware/firmwareCommand.d.ts +25 -0
  54. package/dist/Firmware/firmwareCommand.js +18 -1
  55. package/dist/Lib/childProcess.js +2 -2
  56. package/dist/Organization/Get/organizationGetCommand.d.ts +31 -2
  57. package/dist/Organization/Get/organizationGetCommand.js +31 -2
  58. package/dist/Organization/List/organizationListCommand.d.ts +20 -0
  59. package/dist/Organization/List/organizationListCommand.js +21 -1
  60. package/dist/Organization/SetDefault/organizationSetDefaultCommand.d.ts +24 -0
  61. package/dist/Organization/SetDefault/organizationSetDefaultCommand.js +25 -1
  62. package/dist/Organization/organizationCommand.d.ts +27 -2
  63. package/dist/Organization/organizationCommand.js +26 -1
  64. package/dist/Organization/organizationFacade.d.ts +2 -2
  65. package/dist/Organization/organizationFacade.js +3 -3
  66. package/dist/Plugin/Generate/pluginGenerateCommand.d.ts +7 -0
  67. package/dist/Plugin/Generate/pluginGenerateCommand.js +38 -0
  68. package/dist/Plugin/Generate/pluginGenerateFacade.d.ts +12 -0
  69. package/dist/Plugin/Generate/pluginGenerateFacade.js +106 -0
  70. package/dist/Plugin/Upload/pluginUploadCommand.d.ts +25 -0
  71. package/dist/Plugin/Upload/pluginUploadCommand.js +70 -0
  72. package/dist/Plugin/pluginCommand.d.ts +27 -0
  73. package/dist/Plugin/pluginCommand.js +26 -0
  74. package/dist/Plugin/pluginFacade.d.ts +62 -0
  75. package/dist/Plugin/pluginFacade.js +251 -0
  76. package/dist/Runner/Generate/runnerGenerateCommand.d.ts +7 -0
  77. package/dist/Runner/Generate/runnerGenerateCommand.js +38 -0
  78. package/dist/Runner/Generate/runnerGenerateFacade.d.ts +12 -0
  79. package/dist/Runner/Generate/runnerGenerateFacade.js +107 -0
  80. package/dist/Runner/Upload/runnerUploadCommand.d.ts +25 -0
  81. package/dist/Runner/Upload/runnerUploadCommand.js +72 -0
  82. package/dist/Runner/runnerCommand.d.ts +27 -0
  83. package/dist/Runner/runnerCommand.js +26 -0
  84. package/dist/Runner/runnerFacede.d.ts +15 -0
  85. package/dist/Runner/runnerFacede.js +234 -0
  86. package/dist/Timing/List/timingListCommand.d.ts +26 -2
  87. package/dist/Timing/List/timingListCommand.js +26 -2
  88. package/dist/Timing/timingCommand.d.ts +17 -2
  89. package/dist/Timing/timingCommand.js +15 -0
  90. package/dist/helper.d.ts +5 -5
  91. package/dist/helper.js +4 -6
  92. package/dist/index.js +26 -2
  93. package/docs/applet/build/index.md +74 -0
  94. package/docs/applet/generate/index.md +118 -0
  95. package/docs/applet/index.md +134 -0
  96. package/docs/applet/start/index.md +104 -0
  97. package/docs/applet/test/index.md +91 -0
  98. package/docs/applet/test/run/index.md +82 -0
  99. package/docs/applet/test/upload/index.md +80 -0
  100. package/docs/applet/upload/index.md +131 -0
  101. package/docs/autocomplete/index.md +92 -0
  102. package/docs/autocomplete/install/index.md +120 -0
  103. package/docs/autocomplete/uninstall/index.md +65 -0
  104. package/docs/custom-script/generate/index.md +66 -0
  105. package/docs/custom-script/index.md +96 -0
  106. package/docs/custom-script/upload/index.md +78 -0
  107. package/docs/device/connect/index.md +148 -0
  108. package/docs/device/index.md +105 -0
  109. package/docs/device/power-action/index.md +130 -0
  110. package/docs/device/set-content/index.md +72 -0
  111. package/docs/index.md +170 -0
  112. package/docs/login/index.md +122 -0
  113. package/docs/organization/get/index.md +79 -0
  114. package/docs/organization/index.md +105 -0
  115. package/docs/organization/list/index.md +65 -0
  116. package/docs/organization/set-default/index.md +74 -0
  117. package/docs/plugin/generate/index.md +43 -0
  118. package/docs/plugin/index.md +72 -0
  119. package/docs/plugin/upload/index.md +50 -0
  120. package/docs/runner/generate/index.md +43 -0
  121. package/docs/runner/index.md +72 -0
  122. package/docs/runner/upload/index.md +50 -0
  123. package/docs/timing/index.md +78 -0
  124. package/docs/timing/list/index.md +71 -0
  125. package/package.json +29 -19
@@ -45,9 +45,58 @@ const OPTION_LIST = [
45
45
  appletServerHelper_1.HOT_RELOAD_OPTION,
46
46
  appletUploadCommandHelper_1.APPLET_PATH_OPTION,
47
47
  ];
48
+ /**
49
+ * Establishes a connection between a signageOS device and the local development environment,
50
+ * allowing real-time testing and debugging of applets during development. Supports both
51
+ * local network (LAN) and forward server connections for different network configurations.
52
+ *
53
+ * The command sets up a development server and configures the device to load the applet
54
+ * from the local machine, enabling hot reload and live debugging capabilities.
55
+ *
56
+ * @group Management:1
57
+ *
58
+ * @example
59
+ * ```bash
60
+ * # Connect device with basic configuration
61
+ * sos device connect --device-uid device123 --applet-uid my-applet
62
+ *
63
+ * # Connect with custom server port
64
+ * sos device connect --device-uid device123 --server-port 8080
65
+ *
66
+ * # Connect using forward server (for remote devices)
67
+ * sos device connect --device-uid device123 --use-forward-server
68
+ *
69
+ * # Connect with hot reload enabled
70
+ * sos device connect --device-uid device123 --hot-reload
71
+ *
72
+ * # Connect with custom organization
73
+ * sos device connect --device-uid device123 --organization-uid org456
74
+ *
75
+ * # Connect with custom public URL
76
+ * sos device connect --device-uid device123 --server-public-url https://my-domain.com
77
+ *
78
+ * # Connect and run in background
79
+ * sos device connect --device-uid device123 --detach
80
+ *
81
+ * # Force connection (terminate existing servers)
82
+ * sos device connect --device-uid device123 --force
83
+ * ```
84
+ *
85
+ * @throws {Error} When device or applet cannot be found or accessed
86
+ *
87
+ * @throws {Error} When network connection to device fails
88
+ *
89
+ * @throws {Error} When development server cannot be started
90
+ *
91
+ * @throws {Error} When hot reload configuration is invalid
92
+ *
93
+ * @see {@link https://developers.signageos.io/docs/applets/connect-to-device-cli/ Device Connection and Development Documentation}
94
+ *
95
+ * @since 0.9.0
96
+ */
48
97
  exports.connect = (0, commandDefinition_1.createCommandDefinition)({
49
98
  name: 'connect',
50
- description: 'Set ip for device',
99
+ description: 'Connect device to local development server',
51
100
  optionList: OPTION_LIST,
52
101
  commands: [],
53
102
  run: function (options) {
@@ -2,7 +2,7 @@ import { CommandLineOptions } from '../../Command/commandDefinition';
2
2
  declare const OPTION_LIST: readonly [{
3
3
  readonly name: "no-default-organization";
4
4
  readonly type: BooleanConstructor;
5
- readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc which were set using command sos organization set-default";
5
+ readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc";
6
6
  }, {
7
7
  readonly name: "organization-uid";
8
8
  readonly type: StringConstructor;
@@ -16,13 +16,39 @@ declare const OPTION_LIST: readonly [{
16
16
  readonly type: StringConstructor;
17
17
  readonly description: "Device UID";
18
18
  }];
19
+ /**
20
+ * Deploys an applet to a specific device by creating a timing configuration
21
+ * that activates the specified applet version on the target device. This command
22
+ * establishes the applet-to-device relationship for production deployment.
23
+ *
24
+ * @group Management:3
25
+ *
26
+ * @example
27
+ * ```bash
28
+ * # Deploy applet to device
29
+ * sos device set-content --device-uid device123 --applet-uid my-applet
30
+ *
31
+ * # Deploy with organization override
32
+ * sos device set-content --device-uid device123 --applet-uid my-applet --organization-uid org456
33
+ * ```
34
+ *
35
+ * @throws {Error} When device or applet cannot be found or accessed
36
+ *
37
+ * @throws {Error} When timing configuration creation fails
38
+ *
39
+ * @throws {Error} When organization access is denied
40
+ *
41
+ * @throws {Error} When applet version cannot be determined
42
+ *
43
+ * @since 0.9.0
44
+ */
19
45
  export declare const setContent: {
20
46
  name: "set-content";
21
47
  description: string;
22
48
  optionList: readonly [{
23
49
  readonly name: "no-default-organization";
24
50
  readonly type: BooleanConstructor;
25
- readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc which were set using command sos organization set-default";
51
+ readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc";
26
52
  }, {
27
53
  readonly name: "organization-uid";
28
54
  readonly type: StringConstructor;
@@ -21,9 +21,35 @@ const helper_1 = require("../../helper");
21
21
  const organizationFacade_1 = require("../../Organization/organizationFacade");
22
22
  const deviceFacade_1 = require("../deviceFacade");
23
23
  const OPTION_LIST = [organizationFacade_1.NO_DEFAULT_ORGANIZATION_OPTION, organizationFacade_1.ORGANIZATION_UID_OPTION, appletFacade_1.APPLET_UID_OPTION, deviceFacade_1.DEVICE_UID_OPTION];
24
+ /**
25
+ * Deploys an applet to a specific device by creating a timing configuration
26
+ * that activates the specified applet version on the target device. This command
27
+ * establishes the applet-to-device relationship for production deployment.
28
+ *
29
+ * @group Management:3
30
+ *
31
+ * @example
32
+ * ```bash
33
+ * # Deploy applet to device
34
+ * sos device set-content --device-uid device123 --applet-uid my-applet
35
+ *
36
+ * # Deploy with organization override
37
+ * sos device set-content --device-uid device123 --applet-uid my-applet --organization-uid org456
38
+ * ```
39
+ *
40
+ * @throws {Error} When device or applet cannot be found or accessed
41
+ *
42
+ * @throws {Error} When timing configuration creation fails
43
+ *
44
+ * @throws {Error} When organization access is denied
45
+ *
46
+ * @throws {Error} When applet version cannot be determined
47
+ *
48
+ * @since 0.9.0
49
+ */
24
50
  exports.setContent = (0, commandDefinition_1.createCommandDefinition)({
25
51
  name: 'set-content',
26
- description: 'Set content for device',
52
+ description: 'Deploy applet to device',
27
53
  optionList: OPTION_LIST,
28
54
  commands: [],
29
55
  run(options) {
@@ -2,7 +2,7 @@ import { CommandLineOptions } from '../../Command/commandDefinition';
2
2
  declare const OPTION_LIST: readonly [{
3
3
  readonly name: "no-default-organization";
4
4
  readonly type: BooleanConstructor;
5
- readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc which were set using command sos organization set-default";
5
+ readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc";
6
6
  }, {
7
7
  readonly name: "organization-uid";
8
8
  readonly type: StringConstructor;
@@ -16,13 +16,65 @@ declare const OPTION_LIST: readonly [{
16
16
  readonly type: StringConstructor;
17
17
  readonly description: "Type of device power action";
18
18
  }];
19
+ /**
20
+ * Executes various power and control actions on remote signageOS devices, including
21
+ * applet reloads, display power management, system reboots, and applet state changes.
22
+ * This command provides remote device management capabilities for troubleshooting
23
+ * and maintenance operations.
24
+ *
25
+ * @group Management:2
26
+ *
27
+ * @example
28
+ * ```bash
29
+ * # Reload applet on device
30
+ * sos device power-action reload --device-uid device123
31
+ *
32
+ * # Turn display on
33
+ * sos device power-action displayOn --device-uid device123
34
+ *
35
+ * # Turn display off
36
+ * sos device power-action displayOff --device-uid device123
37
+ *
38
+ * # Restart application
39
+ * sos device power-action restart --device-uid device123
40
+ *
41
+ * # Disable applet
42
+ * sos device power-action disable --device-uid device123
43
+ *
44
+ * # Enable applet
45
+ * sos device power-action enable --device-uid device123
46
+ *
47
+ * # Reboot device
48
+ * sos device power-action reboot --device-uid device123
49
+ *
50
+ * # Refresh content
51
+ * sos device power-action refresh --device-uid device123
52
+ * ```
53
+ *
54
+ * # Reboot system
55
+ * sos device power-action reboot --device-uid device123
56
+ *
57
+ * # Refresh applet
58
+ * sos device power-action refresh --device-uid device123
59
+ * ```
60
+ *
61
+ * @throws {Error} When device cannot be found or accessed
62
+ *
63
+ * @throws {Error} When power action is not supported by device
64
+ *
65
+ * @throws {Error} When organization access is denied
66
+ *
67
+ * @throws {Error} When power action execution fails
68
+ *
69
+ * @since 0.9.0
70
+ */
19
71
  export declare const powerAction: {
20
72
  name: "power-action";
21
73
  description: string;
22
74
  optionList: readonly [{
23
75
  readonly name: "no-default-organization";
24
76
  readonly type: BooleanConstructor;
25
- readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc which were set using command sos organization set-default";
77
+ readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc";
26
78
  }, {
27
79
  readonly name: "organization-uid";
28
80
  readonly type: StringConstructor;
@@ -20,6 +20,58 @@ const chalk_1 = __importDefault(require("chalk"));
20
20
  const commandDefinition_1 = require("../../Command/commandDefinition");
21
21
  const log_1 = require("@signageos/sdk/dist/Console/log");
22
22
  const OPTION_LIST = [organizationFacade_1.NO_DEFAULT_ORGANIZATION_OPTION, organizationFacade_1.ORGANIZATION_UID_OPTION, deviceFacade_1.DEVICE_UID_OPTION, deviceFacade_1.POWER_ACTION_TYPE_OPTION];
23
+ /**
24
+ * Executes various power and control actions on remote signageOS devices, including
25
+ * applet reloads, display power management, system reboots, and applet state changes.
26
+ * This command provides remote device management capabilities for troubleshooting
27
+ * and maintenance operations.
28
+ *
29
+ * @group Management:2
30
+ *
31
+ * @example
32
+ * ```bash
33
+ * # Reload applet on device
34
+ * sos device power-action reload --device-uid device123
35
+ *
36
+ * # Turn display on
37
+ * sos device power-action displayOn --device-uid device123
38
+ *
39
+ * # Turn display off
40
+ * sos device power-action displayOff --device-uid device123
41
+ *
42
+ * # Restart application
43
+ * sos device power-action restart --device-uid device123
44
+ *
45
+ * # Disable applet
46
+ * sos device power-action disable --device-uid device123
47
+ *
48
+ * # Enable applet
49
+ * sos device power-action enable --device-uid device123
50
+ *
51
+ * # Reboot device
52
+ * sos device power-action reboot --device-uid device123
53
+ *
54
+ * # Refresh content
55
+ * sos device power-action refresh --device-uid device123
56
+ * ```
57
+ *
58
+ * # Reboot system
59
+ * sos device power-action reboot --device-uid device123
60
+ *
61
+ * # Refresh applet
62
+ * sos device power-action refresh --device-uid device123
63
+ * ```
64
+ *
65
+ * @throws {Error} When device cannot be found or accessed
66
+ *
67
+ * @throws {Error} When power action is not supported by device
68
+ *
69
+ * @throws {Error} When organization access is denied
70
+ *
71
+ * @throws {Error} When power action execution fails
72
+ *
73
+ * @since 0.9.0
74
+ */
23
75
  exports.powerAction = (0, commandDefinition_1.createCommandDefinition)({
24
76
  name: 'power-action',
25
77
  description: 'Perform power action on device',
@@ -1,3 +1,23 @@
1
+ /**
2
+ * Provides commands for managing signageOS devices, including connecting to devices
3
+ * for development, controlling device power states, and managing applet deployment.
4
+ *
5
+ * @group Management:3
6
+ *
7
+ * @example
8
+ * ```bash
9
+ * # Connect to device for development
10
+ * sos device connect --device-uid device123
11
+ *
12
+ * # Control device power actions
13
+ * sos device power-action reload --device-uid device123
14
+ *
15
+ * # Deploy applet to device
16
+ * sos device set-content --device-uid device123
17
+ * ```
18
+ *
19
+ * @since 0.9.0
20
+ */
1
21
  export declare const device: {
2
22
  name: "device";
3
23
  description: string;
@@ -8,7 +28,7 @@ export declare const device: {
8
28
  optionList: readonly [{
9
29
  readonly name: "no-default-organization";
10
30
  readonly type: BooleanConstructor;
11
- readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc which were set using command sos organization set-default";
31
+ readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc";
12
32
  }, {
13
33
  readonly name: "organization-uid";
14
34
  readonly type: StringConstructor;
@@ -26,7 +46,7 @@ export declare const device: {
26
46
  run(options: import("../Command/commandDefinition").CommandLineOptions<readonly [{
27
47
  readonly name: "no-default-organization";
28
48
  readonly type: BooleanConstructor;
29
- readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc which were set using command sos organization set-default";
49
+ readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc";
30
50
  }, {
31
51
  readonly name: "organization-uid";
32
52
  readonly type: StringConstructor;
@@ -46,7 +66,7 @@ export declare const device: {
46
66
  optionList: readonly [{
47
67
  readonly name: "no-default-organization";
48
68
  readonly type: BooleanConstructor;
49
- readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc which were set using command sos organization set-default";
69
+ readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc";
50
70
  }, {
51
71
  readonly name: "organization-uid";
52
72
  readonly type: StringConstructor;
@@ -64,7 +84,7 @@ export declare const device: {
64
84
  run(options: import("../Command/commandDefinition").CommandLineOptions<readonly [{
65
85
  readonly name: "no-default-organization";
66
86
  readonly type: BooleanConstructor;
67
- readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc which were set using command sos organization set-default";
87
+ readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc";
68
88
  }, {
69
89
  readonly name: "organization-uid";
70
90
  readonly type: StringConstructor;
@@ -84,7 +104,7 @@ export declare const device: {
84
104
  optionList: readonly [{
85
105
  readonly name: "no-default-organization";
86
106
  readonly type: BooleanConstructor;
87
- readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc which were set using command sos organization set-default";
107
+ readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc";
88
108
  }, {
89
109
  readonly name: "organization-uid";
90
110
  readonly type: StringConstructor;
@@ -137,7 +157,7 @@ export declare const device: {
137
157
  run: (options: import("../Command/commandDefinition").CommandLineOptions<readonly [{
138
158
  readonly name: "no-default-organization";
139
159
  readonly type: BooleanConstructor;
140
- readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc which were set using command sos organization set-default";
160
+ readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc";
141
161
  }, {
142
162
  readonly name: "organization-uid";
143
163
  readonly type: StringConstructor;
@@ -14,9 +14,29 @@ const setContentCommand_1 = require("./Content/setContentCommand");
14
14
  const powerActionCommand_1 = require("./PowerAction/powerActionCommand");
15
15
  const connectCommand_1 = require("./Connect/connectCommand");
16
16
  const commandDefinition_1 = require("../Command/commandDefinition");
17
+ /**
18
+ * Provides commands for managing signageOS devices, including connecting to devices
19
+ * for development, controlling device power states, and managing applet deployment.
20
+ *
21
+ * @group Management:3
22
+ *
23
+ * @example
24
+ * ```bash
25
+ * # Connect to device for development
26
+ * sos device connect --device-uid device123
27
+ *
28
+ * # Control device power actions
29
+ * sos device power-action reload --device-uid device123
30
+ *
31
+ * # Deploy applet to device
32
+ * sos device set-content --device-uid device123
33
+ * ```
34
+ *
35
+ * @since 0.9.0
36
+ */
17
37
  exports.device = (0, commandDefinition_1.createCommandDefinition)({
18
38
  name: 'device',
19
- description: 'device management',
39
+ description: 'Device management',
20
40
  optionList: [],
21
41
  commands: [setContentCommand_1.setContent, powerActionCommand_1.powerAction, connectCommand_1.connect],
22
42
  run() {
@@ -19,4 +19,4 @@ export declare const POWER_ACTION_TYPE_OPTION: {
19
19
  };
20
20
  export declare function getDeviceUid(restApi: RestApi, options: CommandLineOptions<[typeof DEVICE_UID_OPTION]>): Promise<string>;
21
21
  export declare function getActionType(options: CommandLineOptions<[typeof POWER_ACTION_TYPE_OPTION]>): Promise<string>;
22
- export declare function disconnectDevice(organization: IOrganization, deviceUid: String): Promise<any>;
22
+ export declare function disconnectDevice(organization: IOrganization, deviceUid: string): Promise<any>;
@@ -3,22 +3,60 @@ declare const OPTION_LIST: readonly [{
3
3
  readonly name: "application-type";
4
4
  readonly alias: "a";
5
5
  readonly type: StringConstructor;
6
+ readonly description: "Application type for the firmware (e.g., linux, android, webos)";
6
7
  }, {
7
8
  readonly name: "firmware-version";
8
9
  readonly alias: "f";
9
10
  readonly type: StringConstructor;
11
+ readonly description: "Version identifier for the firmware package";
10
12
  }, {
11
13
  readonly name: "firmware-type";
12
14
  readonly type: StringConstructor;
15
+ readonly description: "Device model prefixed with brand (e.g., \"benq_sl550\", \"rpi4\", \"rpi\")";
13
16
  }, {
14
17
  readonly name: "src";
15
18
  readonly type: StringConstructor;
16
19
  readonly multiple: true;
20
+ readonly description: "Path(s) to firmware file(s) to upload";
17
21
  }, {
18
22
  readonly name: "force";
19
23
  readonly type: BooleanConstructor;
20
24
  readonly description: "When firmware cannot be uploaded due to invalid firmware \"type\", do it anyways.";
21
25
  }];
26
+ /**
27
+ * Uploads firmware files for specific device types and application platforms.
28
+ * Supports various device architectures including Linux, Android, WebOS, and others.
29
+ * The command validates firmware files and creates versioned firmware packages
30
+ * that can be deployed to compatible devices.
31
+ *
32
+ * @group Private
33
+ *
34
+ * @example
35
+ * ```bash
36
+ * # Upload firmware interactively
37
+ * sos firmware upload
38
+ *
39
+ * # Upload firmware with command line options
40
+ * sos firmware upload --application-type linux --firmware-version 1.2.3 --src /path/to/firmware.tar.gz
41
+ *
42
+ * # Upload Android firmware with type specification
43
+ * sos firmware upload --application-type android --firmware-type rpi4 --firmware-version 1.0.0 --src /path/to/firmware.apk
44
+ *
45
+ * # Force upload when type validation fails
46
+ * sos firmware upload --application-type linux --firmware-type custom_device --firmware-version 1.0.0 --src /path/to/firmware.tar.gz --force
47
+ * ```
48
+ *
49
+ * @throws {Error} When required parameters are missing
50
+ * @throws {Error} When firmware files cannot be found or validated
51
+ * @throws {RequestError} When firmware type is invalid for the platform
52
+ * @throws {Error} When upload confirmation is denied
53
+ *
54
+ * @see {@link ../ Firmware upload command}
55
+ *
56
+ * @see {@link ../../ Firmware management commands}
57
+ *
58
+ * @since 0.6.0
59
+ */
22
60
  export declare const firmwareUpload: {
23
61
  name: "upload";
24
62
  description: string;
@@ -26,17 +64,21 @@ export declare const firmwareUpload: {
26
64
  readonly name: "application-type";
27
65
  readonly alias: "a";
28
66
  readonly type: StringConstructor;
67
+ readonly description: "Application type for the firmware (e.g., linux, android, webos)";
29
68
  }, {
30
69
  readonly name: "firmware-version";
31
70
  readonly alias: "f";
32
71
  readonly type: StringConstructor;
72
+ readonly description: "Version identifier for the firmware package";
33
73
  }, {
34
74
  readonly name: "firmware-type";
35
75
  readonly type: StringConstructor;
76
+ readonly description: "Device model prefixed with brand (e.g., \"benq_sl550\", \"rpi4\", \"rpi\")";
36
77
  }, {
37
78
  readonly name: "src";
38
79
  readonly type: StringConstructor;
39
80
  readonly multiple: true;
81
+ readonly description: "Path(s) to firmware file(s) to upload";
40
82
  }, {
41
83
  readonly name: "force";
42
84
  readonly type: BooleanConstructor;
@@ -43,22 +43,56 @@ const fwTypeQuestion = [
43
43
  ];
44
44
  const applicationTypesRequiringType = ['linux', 'android'];
45
45
  const OPTION_LIST = [
46
- { name: 'application-type', alias: 'a', type: String },
47
- { name: 'firmware-version', alias: 'f', type: String },
48
- { name: 'firmware-type', type: String },
49
- { name: 'src', type: String, multiple: true },
46
+ { name: 'application-type', alias: 'a', type: String, description: 'Application type for the firmware (e.g., linux, android, webos)' },
47
+ { name: 'firmware-version', alias: 'f', type: String, description: 'Version identifier for the firmware package' },
48
+ { name: 'firmware-type', type: String, description: 'Device model prefixed with brand (e.g., "benq_sl550", "rpi4", "rpi")' },
49
+ { name: 'src', type: String, multiple: true, description: 'Path(s) to firmware file(s) to upload' },
50
50
  { name: 'force', type: Boolean, description: 'When firmware cannot be uploaded due to invalid firmware "type", do it anyways.' },
51
51
  ];
52
+ /**
53
+ * Uploads firmware files for specific device types and application platforms.
54
+ * Supports various device architectures including Linux, Android, WebOS, and others.
55
+ * The command validates firmware files and creates versioned firmware packages
56
+ * that can be deployed to compatible devices.
57
+ *
58
+ * @group Private
59
+ *
60
+ * @example
61
+ * ```bash
62
+ * # Upload firmware interactively
63
+ * sos firmware upload
64
+ *
65
+ * # Upload firmware with command line options
66
+ * sos firmware upload --application-type linux --firmware-version 1.2.3 --src /path/to/firmware.tar.gz
67
+ *
68
+ * # Upload Android firmware with type specification
69
+ * sos firmware upload --application-type android --firmware-type rpi4 --firmware-version 1.0.0 --src /path/to/firmware.apk
70
+ *
71
+ * # Force upload when type validation fails
72
+ * sos firmware upload --application-type linux --firmware-type custom_device --firmware-version 1.0.0 --src /path/to/firmware.tar.gz --force
73
+ * ```
74
+ *
75
+ * @throws {Error} When required parameters are missing
76
+ * @throws {Error} When firmware files cannot be found or validated
77
+ * @throws {RequestError} When firmware type is invalid for the platform
78
+ * @throws {Error} When upload confirmation is denied
79
+ *
80
+ * @see {@link ../ Firmware upload command}
81
+ *
82
+ * @see {@link ../../ Firmware management commands}
83
+ *
84
+ * @since 0.6.0
85
+ */
52
86
  exports.firmwareUpload = (0, commandDefinition_1.createCommandDefinition)({
53
87
  name: 'upload',
54
- description: 'Uploads selected firmware version',
88
+ description: 'Upload firmware version to the signageOS platform',
55
89
  optionList: OPTION_LIST,
56
90
  commands: [],
57
91
  run(options) {
58
92
  return __awaiter(this, void 0, void 0, function* () {
59
93
  const optionsProvided = !!(options['application-type'] && options['firmware-version'] && options.src && options.src.length > 0);
60
94
  const restApi = yield (0, helper_1.createFirmwareVersionRestApi)();
61
- let data = {
95
+ const data = {
62
96
  applicationType: '',
63
97
  version: '',
64
98
  files: [],
@@ -57,7 +57,7 @@ function uploadFirmwareVersion(parameters) {
57
57
  if (progressBar) {
58
58
  progressBar.init({ size: totalSize, name: pathArr.join(',') });
59
59
  }
60
- for (let index in pathArr) {
60
+ for (const index in pathArr) {
61
61
  const filePath = pathArr[index];
62
62
  if (!filePath) {
63
63
  continue;
@@ -1,3 +1,20 @@
1
+ /**
2
+ * Provides commands for managing device firmware on the signageOS platform.
3
+ * Firmware management includes uploading new firmware versions for different
4
+ * device types and application platforms.
5
+ *
6
+ * @group Private
7
+ *
8
+ * @example
9
+ * ```bash
10
+ * # Upload firmware version
11
+ * sos firmware upload
12
+ * ```
13
+ *
14
+ * @see {@link ./upload/ Upload firmware version command}
15
+ *
16
+ * @since 0.6.0
17
+ */
1
18
  export declare const firmware: {
2
19
  name: "firmware";
3
20
  description: string;
@@ -9,17 +26,21 @@ export declare const firmware: {
9
26
  readonly name: "application-type";
10
27
  readonly alias: "a";
11
28
  readonly type: StringConstructor;
29
+ readonly description: "Application type for the firmware (e.g., linux, android, webos)";
12
30
  }, {
13
31
  readonly name: "firmware-version";
14
32
  readonly alias: "f";
15
33
  readonly type: StringConstructor;
34
+ readonly description: "Version identifier for the firmware package";
16
35
  }, {
17
36
  readonly name: "firmware-type";
18
37
  readonly type: StringConstructor;
38
+ readonly description: "Device model prefixed with brand (e.g., \"benq_sl550\", \"rpi4\", \"rpi\")";
19
39
  }, {
20
40
  readonly name: "src";
21
41
  readonly type: StringConstructor;
22
42
  readonly multiple: true;
43
+ readonly description: "Path(s) to firmware file(s) to upload";
23
44
  }, {
24
45
  readonly name: "force";
25
46
  readonly type: BooleanConstructor;
@@ -30,17 +51,21 @@ export declare const firmware: {
30
51
  readonly name: "application-type";
31
52
  readonly alias: "a";
32
53
  readonly type: StringConstructor;
54
+ readonly description: "Application type for the firmware (e.g., linux, android, webos)";
33
55
  }, {
34
56
  readonly name: "firmware-version";
35
57
  readonly alias: "f";
36
58
  readonly type: StringConstructor;
59
+ readonly description: "Version identifier for the firmware package";
37
60
  }, {
38
61
  readonly name: "firmware-type";
39
62
  readonly type: StringConstructor;
63
+ readonly description: "Device model prefixed with brand (e.g., \"benq_sl550\", \"rpi4\", \"rpi\")";
40
64
  }, {
41
65
  readonly name: "src";
42
66
  readonly type: StringConstructor;
43
67
  readonly multiple: true;
68
+ readonly description: "Path(s) to firmware file(s) to upload";
44
69
  }, {
45
70
  readonly name: "force";
46
71
  readonly type: BooleanConstructor;
@@ -12,9 +12,26 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.firmware = void 0;
13
13
  const commandDefinition_1 = require("../Command/commandDefinition");
14
14
  const firmwareUploadCommand_1 = require("./Upload/firmwareUploadCommand");
15
+ /**
16
+ * Provides commands for managing device firmware on the signageOS platform.
17
+ * Firmware management includes uploading new firmware versions for different
18
+ * device types and application platforms.
19
+ *
20
+ * @group Private
21
+ *
22
+ * @example
23
+ * ```bash
24
+ * # Upload firmware version
25
+ * sos firmware upload
26
+ * ```
27
+ *
28
+ * @see {@link ./upload/ Upload firmware version command}
29
+ *
30
+ * @since 0.6.0
31
+ */
15
32
  exports.firmware = (0, commandDefinition_1.createCommandDefinition)({
16
33
  name: 'firmware',
17
- description: 'firmware management',
34
+ description: 'Firmware management',
18
35
  optionList: [],
19
36
  commands: [firmwareUploadCommand_1.firmwareUpload],
20
37
  run() {
@@ -49,8 +49,8 @@ const executeChildProcess = (command, verbose) => {
49
49
  }
50
50
  else {
51
51
  if (verbose) {
52
- console.log(stdout);
53
- console.log(stderr);
52
+ console.info(stdout);
53
+ console.error(stderr);
54
54
  }
55
55
  resolve(stdout);
56
56
  }