@signageos/cli 2.4.1 → 2.5.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 (97) 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 +37 -31
  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/Device/Connect/connectCommand.d.ts +51 -2
  40. package/dist/Device/Connect/connectCommand.js +50 -1
  41. package/dist/Device/Content/setContentCommand.d.ts +28 -2
  42. package/dist/Device/Content/setContentCommand.js +27 -1
  43. package/dist/Device/PowerAction/powerActionCommand.d.ts +54 -2
  44. package/dist/Device/PowerAction/powerActionCommand.js +52 -0
  45. package/dist/Device/deviceCommand.d.ts +26 -6
  46. package/dist/Device/deviceCommand.js +21 -1
  47. package/dist/Device/deviceFacade.d.ts +1 -1
  48. package/dist/Firmware/Upload/firmwareUploadCommand.d.ts +42 -0
  49. package/dist/Firmware/Upload/firmwareUploadCommand.js +40 -6
  50. package/dist/Firmware/Upload/firmwareUploadFacade.js +1 -1
  51. package/dist/Firmware/firmwareCommand.d.ts +25 -0
  52. package/dist/Firmware/firmwareCommand.js +18 -1
  53. package/dist/Lib/childProcess.js +2 -2
  54. package/dist/Organization/Get/organizationGetCommand.d.ts +31 -2
  55. package/dist/Organization/Get/organizationGetCommand.js +31 -2
  56. package/dist/Organization/List/organizationListCommand.d.ts +20 -0
  57. package/dist/Organization/List/organizationListCommand.js +21 -1
  58. package/dist/Organization/SetDefault/organizationSetDefaultCommand.d.ts +24 -0
  59. package/dist/Organization/SetDefault/organizationSetDefaultCommand.js +25 -1
  60. package/dist/Organization/organizationCommand.d.ts +27 -2
  61. package/dist/Organization/organizationCommand.js +26 -1
  62. package/dist/Organization/organizationFacade.d.ts +2 -2
  63. package/dist/Organization/organizationFacade.js +3 -3
  64. package/dist/Timing/List/timingListCommand.d.ts +26 -2
  65. package/dist/Timing/List/timingListCommand.js +26 -2
  66. package/dist/Timing/timingCommand.d.ts +17 -2
  67. package/dist/Timing/timingCommand.js +15 -0
  68. package/dist/helper.d.ts +5 -5
  69. package/dist/helper.js +4 -6
  70. package/dist/index.js +23 -1
  71. package/docs/applet/build/index.md +74 -0
  72. package/docs/applet/generate/index.md +118 -0
  73. package/docs/applet/index.md +134 -0
  74. package/docs/applet/start/index.md +104 -0
  75. package/docs/applet/test/index.md +91 -0
  76. package/docs/applet/test/run/index.md +82 -0
  77. package/docs/applet/test/upload/index.md +80 -0
  78. package/docs/applet/upload/index.md +131 -0
  79. package/docs/autocomplete/index.md +92 -0
  80. package/docs/autocomplete/install/index.md +120 -0
  81. package/docs/autocomplete/uninstall/index.md +65 -0
  82. package/docs/custom-script/generate/index.md +66 -0
  83. package/docs/custom-script/index.md +96 -0
  84. package/docs/custom-script/upload/index.md +78 -0
  85. package/docs/device/connect/index.md +148 -0
  86. package/docs/device/index.md +105 -0
  87. package/docs/device/power-action/index.md +130 -0
  88. package/docs/device/set-content/index.md +72 -0
  89. package/docs/index.md +168 -0
  90. package/docs/login/index.md +122 -0
  91. package/docs/organization/get/index.md +79 -0
  92. package/docs/organization/index.md +105 -0
  93. package/docs/organization/list/index.md +65 -0
  94. package/docs/organization/set-default/index.md +74 -0
  95. package/docs/timing/index.md +78 -0
  96. package/docs/timing/list/index.md +71 -0
  97. package/package.json +29 -19
@@ -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
  }
@@ -2,19 +2,48 @@ 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;
9
9
  readonly description: "Organization UID";
10
10
  }];
11
+ /**
12
+ * Retrieves and displays detailed information about a specific organization
13
+ * by its UID. If no organization UID is provided, uses the default organization
14
+ * or prompts for selection from available organizations.
15
+ *
16
+ * @group Management:2
17
+ *
18
+ * @example
19
+ * ```bash
20
+ * # Get default organization details
21
+ * sos organization get
22
+ *
23
+ * # Get specific organization by UID
24
+ * sos organization get --organization-uid abc123def456
25
+ *
26
+ * # Force organization selection (skip default)
27
+ * sos organization get --no-default-organization
28
+ * ```
29
+ *
30
+ * @throws {Error} When organization UID cannot be found or accessed
31
+ * @throws {Error} When authentication is not valid or has expired
32
+ * @throws {Error} When no organizations are available for selection
33
+ *
34
+ * @see {@link ../list/ List organizations for selection}
35
+ *
36
+ * @see {@link ../ Organization management commands}
37
+ *
38
+ * @since 0.3.0
39
+ */
11
40
  export declare const organizationGet: {
12
41
  name: "get";
13
42
  description: string;
14
43
  optionList: readonly [{
15
44
  readonly name: "no-default-organization";
16
45
  readonly type: BooleanConstructor;
17
- readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc which were set using command sos organization set-default";
46
+ readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc";
18
47
  }, {
19
48
  readonly name: "organization-uid";
20
49
  readonly type: StringConstructor;
@@ -19,9 +19,38 @@ const commandDefinition_1 = require("../../Command/commandDefinition");
19
19
  const organizationFacade_1 = require("../organizationFacade");
20
20
  const Debug = (0, debug_1.default)('@signageos/cli:Organization:get');
21
21
  const OPTION_LIST = [organizationFacade_1.NO_DEFAULT_ORGANIZATION_OPTION, organizationFacade_1.ORGANIZATION_UID_OPTION];
22
+ /**
23
+ * Retrieves and displays detailed information about a specific organization
24
+ * by its UID. If no organization UID is provided, uses the default organization
25
+ * or prompts for selection from available organizations.
26
+ *
27
+ * @group Management:2
28
+ *
29
+ * @example
30
+ * ```bash
31
+ * # Get default organization details
32
+ * sos organization get
33
+ *
34
+ * # Get specific organization by UID
35
+ * sos organization get --organization-uid abc123def456
36
+ *
37
+ * # Force organization selection (skip default)
38
+ * sos organization get --no-default-organization
39
+ * ```
40
+ *
41
+ * @throws {Error} When organization UID cannot be found or accessed
42
+ * @throws {Error} When authentication is not valid or has expired
43
+ * @throws {Error} When no organizations are available for selection
44
+ *
45
+ * @see {@link ../list/ List organizations for selection}
46
+ *
47
+ * @see {@link ../ Organization management commands}
48
+ *
49
+ * @since 0.3.0
50
+ */
22
51
  exports.organizationGet = (0, commandDefinition_1.createCommandDefinition)({
23
52
  name: 'get',
24
- description: 'Get one organization by UID',
53
+ description: 'Get detailed information about a specific organization',
25
54
  optionList: OPTION_LIST,
26
55
  commands: [],
27
56
  run(options) {
@@ -29,7 +58,7 @@ exports.organizationGet = (0, commandDefinition_1.createCommandDefinition)({
29
58
  Debug('Organization get');
30
59
  const organizationUid = yield (0, organizationFacade_1.getOrganizationUidOrDefaultOrSelect)(options);
31
60
  const organization = yield (0, organizationFacade_1.getOrganization)(organizationUid);
32
- console.log(chalk_1.default.yellow(JSON.stringify(organization, undefined, 2)));
61
+ console.info(chalk_1.default.yellow(JSON.stringify(organization, undefined, 2)));
33
62
  });
34
63
  },
35
64
  });
@@ -1,3 +1,23 @@
1
+ /**
2
+ * Retrieves and displays all organizations that the currently authenticated
3
+ * account has access to. This command helps users understand which organizations
4
+ * they can work with and select appropriate targets for other CLI operations.
5
+ *
6
+ * @group Management:1
7
+ *
8
+ * @example
9
+ * ```bash
10
+ * # List all accessible organizations
11
+ * sos organization list
12
+ * ```
13
+ *
14
+ * @throws {Error} When authentication is not valid or has expired
15
+ * @throws {Error} When organization access cannot be determined
16
+ *
17
+ * @see {@link ../get/ Get detailed organization information}
18
+ *
19
+ * @since 0.3.0
20
+ */
1
21
  export declare const organizationList: {
2
22
  name: "list";
3
23
  description: string;
@@ -18,6 +18,26 @@ const debug_1 = __importDefault(require("debug"));
18
18
  const commandDefinition_1 = require("../../Command/commandDefinition");
19
19
  const organizationFacade_1 = require("../organizationFacade");
20
20
  const Debug = (0, debug_1.default)('@signageos/cli:Organization:list');
21
+ /**
22
+ * Retrieves and displays all organizations that the currently authenticated
23
+ * account has access to. This command helps users understand which organizations
24
+ * they can work with and select appropriate targets for other CLI operations.
25
+ *
26
+ * @group Management:1
27
+ *
28
+ * @example
29
+ * ```bash
30
+ * # List all accessible organizations
31
+ * sos organization list
32
+ * ```
33
+ *
34
+ * @throws {Error} When authentication is not valid or has expired
35
+ * @throws {Error} When organization access cannot be determined
36
+ *
37
+ * @see {@link ../get/ Get detailed organization information}
38
+ *
39
+ * @since 0.3.0
40
+ */
21
41
  exports.organizationList = (0, commandDefinition_1.createCommandDefinition)({
22
42
  name: 'list',
23
43
  description: 'List organizations for logged account',
@@ -27,7 +47,7 @@ exports.organizationList = (0, commandDefinition_1.createCommandDefinition)({
27
47
  return __awaiter(this, void 0, void 0, function* () {
28
48
  Debug('Organization list');
29
49
  const organizations = yield (0, organizationFacade_1.getOrganizations)();
30
- console.log(chalk_1.default.yellow(JSON.stringify(organizations, undefined, 2)));
50
+ console.info(chalk_1.default.yellow(JSON.stringify(organizations, undefined, 2)));
31
51
  });
32
52
  },
33
53
  });