@signageos/cli 2.4.0 → 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.
- package/README.md +27 -1
- package/dist/Applet/Build/appletBuildCommand.d.ts +28 -2
- package/dist/Applet/Build/appletBuildCommand.js +27 -1
- package/dist/Applet/Generate/Templates/index.js.template +1 -1
- package/dist/Applet/Generate/Templates/tsconfig.js.template +1 -1
- package/dist/Applet/Generate/appletGenerateCommand.d.ts +29 -23
- package/dist/Applet/Generate/appletGenerateCommand.js +37 -31
- package/dist/Applet/Start/appletStartCommand.d.ts +44 -2
- package/dist/Applet/Start/appletStartCommand.js +44 -2
- package/dist/Applet/Test/Upload/appletTestRunCommand.d.ts +25 -2
- package/dist/Applet/Test/Upload/appletTestRunCommand.js +24 -1
- package/dist/Applet/Test/Upload/appletTestUploadCommand.d.ts +34 -4
- package/dist/Applet/Test/Upload/appletTestUploadCommand.js +32 -2
- package/dist/Applet/Test/appletTestCommand.d.ts +23 -6
- package/dist/Applet/Test/appletTestCommand.js +17 -0
- package/dist/Applet/Upload/appletUploadCommand.d.ts +46 -4
- package/dist/Applet/Upload/appletUploadCommand.js +44 -2
- package/dist/Applet/Upload/appletUploadFacade.js +3 -3
- package/dist/Applet/appletCommand.d.ts +42 -10
- package/dist/Applet/appletCommand.js +33 -1
- package/dist/Auth/loginCommand.d.ts +23 -2
- package/dist/Auth/loginCommand.js +42 -14
- package/dist/Command/Autocomplete/Install/installAutocompleteCommand.d.ts +17 -0
- package/dist/Command/Autocomplete/Install/installAutocompleteCommand.js +17 -0
- package/dist/Command/Autocomplete/Install/installAutocompleteCommand.ts +17 -0
- package/dist/Command/Autocomplete/Uninstall/uninstallAutocompleteCommand.d.ts +17 -0
- package/dist/Command/Autocomplete/Uninstall/uninstallAutocompleteCommand.js +22 -5
- package/dist/Command/Autocomplete/autocompleteCommand.d.ts +18 -0
- package/dist/Command/Autocomplete/autocompleteCommand.js +19 -1
- package/dist/Command/autoComplete.js +2 -2
- package/dist/Command/globalArgs.d.ts +33 -0
- package/dist/Command/globalArgs.js +33 -0
- package/dist/CustomScript/Generate/customScriptGenerateCommand.d.ts +19 -0
- package/dist/CustomScript/Generate/customScriptGenerateCommand.js +20 -1
- package/dist/CustomScript/Upload/customScriptUploadCommand.d.ts +32 -2
- package/dist/CustomScript/Upload/customScriptUploadCommand.js +31 -1
- package/dist/CustomScript/customScriptCommand.d.ts +21 -1
- package/dist/CustomScript/customScriptCommand.js +20 -0
- package/dist/Device/Connect/connectCommand.d.ts +51 -2
- package/dist/Device/Connect/connectCommand.js +50 -1
- package/dist/Device/Content/setContentCommand.d.ts +28 -2
- package/dist/Device/Content/setContentCommand.js +27 -1
- package/dist/Device/PowerAction/powerActionCommand.d.ts +54 -2
- package/dist/Device/PowerAction/powerActionCommand.js +52 -0
- package/dist/Device/deviceCommand.d.ts +26 -6
- package/dist/Device/deviceCommand.js +21 -1
- package/dist/Device/deviceFacade.d.ts +1 -1
- package/dist/Firmware/Upload/firmwareUploadCommand.d.ts +42 -0
- package/dist/Firmware/Upload/firmwareUploadCommand.js +40 -6
- package/dist/Firmware/Upload/firmwareUploadFacade.js +1 -1
- package/dist/Firmware/firmwareCommand.d.ts +25 -0
- package/dist/Firmware/firmwareCommand.js +18 -1
- package/dist/Lib/childProcess.js +2 -2
- package/dist/Organization/Get/organizationGetCommand.d.ts +31 -2
- package/dist/Organization/Get/organizationGetCommand.js +31 -2
- package/dist/Organization/List/organizationListCommand.d.ts +20 -0
- package/dist/Organization/List/organizationListCommand.js +21 -1
- package/dist/Organization/SetDefault/organizationSetDefaultCommand.d.ts +24 -0
- package/dist/Organization/SetDefault/organizationSetDefaultCommand.js +25 -1
- package/dist/Organization/organizationCommand.d.ts +27 -2
- package/dist/Organization/organizationCommand.js +26 -1
- package/dist/Organization/organizationFacade.d.ts +2 -2
- package/dist/Organization/organizationFacade.js +3 -3
- package/dist/Timing/List/timingListCommand.d.ts +26 -2
- package/dist/Timing/List/timingListCommand.js +26 -2
- package/dist/Timing/timingCommand.d.ts +17 -2
- package/dist/Timing/timingCommand.js +15 -0
- package/dist/helper.d.ts +5 -5
- package/dist/helper.js +4 -6
- package/dist/index.js +23 -1
- package/docs/applet/build/index.md +74 -0
- package/docs/applet/generate/index.md +118 -0
- package/docs/applet/index.md +134 -0
- package/docs/applet/start/index.md +104 -0
- package/docs/applet/test/index.md +91 -0
- package/docs/applet/test/run/index.md +82 -0
- package/docs/applet/test/upload/index.md +80 -0
- package/docs/applet/upload/index.md +131 -0
- package/docs/autocomplete/index.md +92 -0
- package/docs/autocomplete/install/index.md +120 -0
- package/docs/autocomplete/uninstall/index.md +65 -0
- package/docs/custom-script/generate/index.md +66 -0
- package/docs/custom-script/index.md +96 -0
- package/docs/custom-script/upload/index.md +78 -0
- package/docs/device/connect/index.md +148 -0
- package/docs/device/index.md +105 -0
- package/docs/device/power-action/index.md +130 -0
- package/docs/device/set-content/index.md +72 -0
- package/docs/index.md +168 -0
- package/docs/login/index.md +122 -0
- package/docs/organization/get/index.md +79 -0
- package/docs/organization/index.md +105 -0
- package/docs/organization/list/index.md +65 -0
- package/docs/organization/set-default/index.md +74 -0
- package/docs/timing/index.md +78 -0
- package/docs/timing/list/index.md +71 -0
- package/package.json +29 -19
package/README.md
CHANGED
|
@@ -275,7 +275,7 @@ sos device power-action
|
|
|
275
275
|
| reboot | System reboot |
|
|
276
276
|
| refresh | Applet Refresh |
|
|
277
277
|
|
|
278
|
-
#### Device
|
|
278
|
+
#### Device Deploy Applet
|
|
279
279
|
```bash
|
|
280
280
|
sos device set-content
|
|
281
281
|
```
|
|
@@ -307,6 +307,32 @@ sos device connect
|
|
|
307
307
|
| --forward-server-url *(optional)* | Custom forward server URL. | https://forward.signageos.io |
|
|
308
308
|
| --hot-reload *(optional)* | Enable hot reload and build of applet | false |
|
|
309
309
|
|
|
310
|
+
### Custom Script
|
|
311
|
+
```bash
|
|
312
|
+
sos custom-script --help
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
#### Custom Script Generate
|
|
316
|
+
```bash
|
|
317
|
+
sos custom-script generate
|
|
318
|
+
```
|
|
319
|
+
Generate a new custom script project with boilerplate code.
|
|
320
|
+
|
|
321
|
+
| Argument | Description | Default value |
|
|
322
|
+
|-----------------------------|---------------------------------|----------------|
|
|
323
|
+
| --name *(required)* | Name for the custom script | STDIN |
|
|
324
|
+
| --target-dir *(optional)* | Generate script to directory | ${PWD}/${name} |
|
|
325
|
+
|
|
326
|
+
#### Custom Script Upload
|
|
327
|
+
```bash
|
|
328
|
+
sos custom-script upload
|
|
329
|
+
```
|
|
330
|
+
Upload custom script to the signageOS platform.
|
|
331
|
+
|
|
332
|
+
| Argument | Description | Default value |
|
|
333
|
+
|---------------------------------|------------------------------|----------------|
|
|
334
|
+
| --organization-uid *(required)* | Organization UID | STDIN |
|
|
335
|
+
| --script-path *(optional)* | Path to script file | ${PWD} |
|
|
310
336
|
|
|
311
337
|
## Debugging
|
|
312
338
|
|
|
@@ -2,7 +2,7 @@ import { CommandLineOptions } from '../../Command/commandDefinition';
|
|
|
2
2
|
export 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
|
|
5
|
+
readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc";
|
|
6
6
|
}, {
|
|
7
7
|
readonly name: "organization-uid";
|
|
8
8
|
readonly type: StringConstructor;
|
|
@@ -12,13 +12,39 @@ export declare const OPTION_LIST: readonly [{
|
|
|
12
12
|
readonly type: StringConstructor;
|
|
13
13
|
readonly description: "Applet UID";
|
|
14
14
|
}];
|
|
15
|
+
/**
|
|
16
|
+
* Builds the applet into a distributable package using the signageOS SDK build system.
|
|
17
|
+
* The build process compiles and bundles the applet code, assets, and dependencies
|
|
18
|
+
* into a zip archive ready for upload to the signageOS platform.
|
|
19
|
+
*
|
|
20
|
+
* @group Development:2
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```bash
|
|
24
|
+
* # Build applet in current directory
|
|
25
|
+
* sos applet build
|
|
26
|
+
*
|
|
27
|
+
* # Build with specific organization
|
|
28
|
+
* sos applet build --organization-uid abc123def456
|
|
29
|
+
*
|
|
30
|
+
* # Build with specific applet UID
|
|
31
|
+
* sos applet build --applet-uid my-applet-uid
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @throws {Error} When applet path is invalid or build process fails
|
|
35
|
+
*
|
|
36
|
+
* @throws {Error} When organization or applet cannot be found
|
|
37
|
+
* @throws {Error} When package.json is missing or invalid
|
|
38
|
+
*
|
|
39
|
+
* @since 1.2.0
|
|
40
|
+
*/
|
|
15
41
|
export declare const appletBuild: {
|
|
16
42
|
name: "build";
|
|
17
43
|
description: string;
|
|
18
44
|
optionList: readonly [{
|
|
19
45
|
readonly name: "no-default-organization";
|
|
20
46
|
readonly type: BooleanConstructor;
|
|
21
|
-
readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc
|
|
47
|
+
readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc";
|
|
22
48
|
}, {
|
|
23
49
|
readonly name: "organization-uid";
|
|
24
50
|
readonly type: StringConstructor;
|
|
@@ -23,9 +23,35 @@ const log_1 = require("@signageos/sdk/dist/Console/log");
|
|
|
23
23
|
const debug_1 = __importDefault(require("debug"));
|
|
24
24
|
const Debug = (0, debug_1.default)('@signageos/cli:Applet:Build:appletBuildCommand');
|
|
25
25
|
exports.OPTION_LIST = [organizationFacade_1.NO_DEFAULT_ORGANIZATION_OPTION, organizationFacade_1.ORGANIZATION_UID_OPTION, appletFacade_1.APPLET_UID_OPTION];
|
|
26
|
+
/**
|
|
27
|
+
* Builds the applet into a distributable package using the signageOS SDK build system.
|
|
28
|
+
* The build process compiles and bundles the applet code, assets, and dependencies
|
|
29
|
+
* into a zip archive ready for upload to the signageOS platform.
|
|
30
|
+
*
|
|
31
|
+
* @group Development:2
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```bash
|
|
35
|
+
* # Build applet in current directory
|
|
36
|
+
* sos applet build
|
|
37
|
+
*
|
|
38
|
+
* # Build with specific organization
|
|
39
|
+
* sos applet build --organization-uid abc123def456
|
|
40
|
+
*
|
|
41
|
+
* # Build with specific applet UID
|
|
42
|
+
* sos applet build --applet-uid my-applet-uid
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @throws {Error} When applet path is invalid or build process fails
|
|
46
|
+
*
|
|
47
|
+
* @throws {Error} When organization or applet cannot be found
|
|
48
|
+
* @throws {Error} When package.json is missing or invalid
|
|
49
|
+
*
|
|
50
|
+
* @since 1.2.0
|
|
51
|
+
*/
|
|
26
52
|
exports.appletBuild = (0, commandDefinition_1.createCommandDefinition)({
|
|
27
53
|
name: 'build',
|
|
28
|
-
description: 'Build applet locally
|
|
54
|
+
description: 'Build applet locally for production deployment.',
|
|
29
55
|
optionList: exports.OPTION_LIST,
|
|
30
56
|
commands: [],
|
|
31
57
|
run(options) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
import sos from '@signageos/front-applet';
|
|
3
3
|
|
|
4
|
-
// Wait on sos data are ready (https://
|
|
4
|
+
// Wait on sos data are ready (https://developers.signageos.io/sdk/sos/#onready)
|
|
5
5
|
sos.onReady().then(async function () {
|
|
6
6
|
const contentElement = document.getElementById('root');
|
|
7
7
|
if (contentElement) {
|
|
@@ -11,30 +11,36 @@ declare const OPTION_LIST: ({
|
|
|
11
11
|
defaultValue: string;
|
|
12
12
|
})[];
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* @
|
|
20
|
-
*
|
|
21
|
-
* @param {string} options.targetDir - The target directory for the applet
|
|
22
|
-
* @param {string} options.npmRegistry - The npm registry URL
|
|
23
|
-
* @param {string} options.language - The language of the applet (typescript or javascript)
|
|
24
|
-
* @param {string} options.bundler - The bundler to use (webpack or rspack)
|
|
25
|
-
* @param {string} options.git - Whether to initialize a git repository (yes or no)
|
|
26
|
-
* @param {string} options.packager - Whether to manage packages with npm, pnpm, bun or yarn
|
|
27
|
-
* @returns {Promise<void>} - A promise that resolves when the applet is generated
|
|
14
|
+
* Creates a new applet project with all necessary configuration files, dependencies,
|
|
15
|
+
* and boilerplate code. Supports both TypeScript and JavaScript, multiple bundlers
|
|
16
|
+
* (webpack/rspack), various package managers (npm/pnpm/yarn/bun), and includes
|
|
17
|
+
* git repository initialization.
|
|
18
|
+
*
|
|
19
|
+
* @group Development:1
|
|
20
|
+
*
|
|
28
21
|
* @example
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
22
|
+
* ```bash
|
|
23
|
+
* # Interactive generation with prompts
|
|
24
|
+
* sos applet generate
|
|
25
|
+
*
|
|
26
|
+
* # Generate TypeScript applet with webpack
|
|
27
|
+
* sos applet generate --name my-applet --language typescript --bundler webpack
|
|
28
|
+
*
|
|
29
|
+
* # Generate with custom settings
|
|
30
|
+
* sos applet generate --name my-app --target-dir ./projects --git yes --packager pnpm
|
|
31
|
+
*
|
|
32
|
+
* # Generate with npm registry
|
|
33
|
+
* sos applet generate --name my-applet --npm-registry https://registry.npmjs.org/ --packager npm
|
|
34
|
+
*
|
|
35
|
+
* # Generate applet with specific configuration
|
|
36
|
+
* sos applet generate --name my-applet --applet-version 1.0.0 --target-dir ./output --language typescript --bundler webpack --git yes
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* @throws {Error} When required parameters are missing or invalid
|
|
40
|
+
*
|
|
41
|
+
* @throws {Error} When target directory conflicts exist
|
|
42
|
+
*
|
|
43
|
+
* @since 0.1.0
|
|
38
44
|
*/
|
|
39
45
|
export declare const appletGenerate: {
|
|
40
46
|
name: "generate";
|
|
@@ -80,7 +80,7 @@ var Packager;
|
|
|
80
80
|
const NAME_REGEXP = /^\w(\w|\d|-)*\w$/;
|
|
81
81
|
let PACKAGER_EXECUTABLE = 'npm';
|
|
82
82
|
const OPTION_LIST = [
|
|
83
|
-
{ name: 'name', type: String, description: `Applet name. Match RegExp:
|
|
83
|
+
{ name: 'name', type: String, description: `Applet name. Match RegExp: /^\\w(\\w|\\d|-)*\\w$/` },
|
|
84
84
|
{ name: 'applet-version', type: String, description: 'Applet initial version. Use semantic version', defaultValue: '0.0.0' },
|
|
85
85
|
{ name: 'target-dir', type: String, description: 'Directory where will be the applet generated to' },
|
|
86
86
|
{ name: 'git', type: String, description: 'Init applet as git repository "no" (default) or "yes"' },
|
|
@@ -122,7 +122,7 @@ const RUNSCRIPTS = {
|
|
|
122
122
|
webpack: {
|
|
123
123
|
start: 'webpack serve --mode development',
|
|
124
124
|
build: 'webpack --mode production',
|
|
125
|
-
connect: 'echo "Deprecated command
|
|
125
|
+
connect: 'echo "Deprecated command \\"npm run connect\\". Use \\"npm run watch\\" instead." && npm run watch',
|
|
126
126
|
watch: 'webpack --watch',
|
|
127
127
|
},
|
|
128
128
|
rspack: {
|
|
@@ -140,34 +140,40 @@ const importFileAsString = (relativePath) => {
|
|
|
140
140
|
return fs.readFileSync(path.resolve(__dirname, relativePath), 'utf-8');
|
|
141
141
|
};
|
|
142
142
|
/**
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
* @
|
|
149
|
-
*
|
|
150
|
-
* @param {string} options.targetDir - The target directory for the applet
|
|
151
|
-
* @param {string} options.npmRegistry - The npm registry URL
|
|
152
|
-
* @param {string} options.language - The language of the applet (typescript or javascript)
|
|
153
|
-
* @param {string} options.bundler - The bundler to use (webpack or rspack)
|
|
154
|
-
* @param {string} options.git - Whether to initialize a git repository (yes or no)
|
|
155
|
-
* @param {string} options.packager - Whether to manage packages with npm, pnpm, bun or yarn
|
|
156
|
-
* @returns {Promise<void>} - A promise that resolves when the applet is generated
|
|
143
|
+
* Creates a new applet project with all necessary configuration files, dependencies,
|
|
144
|
+
* and boilerplate code. Supports both TypeScript and JavaScript, multiple bundlers
|
|
145
|
+
* (webpack/rspack), various package managers (npm/pnpm/yarn/bun), and includes
|
|
146
|
+
* git repository initialization.
|
|
147
|
+
*
|
|
148
|
+
* @group Development:1
|
|
149
|
+
*
|
|
157
150
|
* @example
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
151
|
+
* ```bash
|
|
152
|
+
* # Interactive generation with prompts
|
|
153
|
+
* sos applet generate
|
|
154
|
+
*
|
|
155
|
+
* # Generate TypeScript applet with webpack
|
|
156
|
+
* sos applet generate --name my-applet --language typescript --bundler webpack
|
|
157
|
+
*
|
|
158
|
+
* # Generate with custom settings
|
|
159
|
+
* sos applet generate --name my-app --target-dir ./projects --git yes --packager pnpm
|
|
160
|
+
*
|
|
161
|
+
* # Generate with npm registry
|
|
162
|
+
* sos applet generate --name my-applet --npm-registry https://registry.npmjs.org/ --packager npm
|
|
163
|
+
*
|
|
164
|
+
* # Generate applet with specific configuration
|
|
165
|
+
* sos applet generate --name my-applet --applet-version 1.0.0 --target-dir ./output --language typescript --bundler webpack --git yes
|
|
166
|
+
* ```
|
|
167
|
+
*
|
|
168
|
+
* @throws {Error} When required parameters are missing or invalid
|
|
169
|
+
*
|
|
170
|
+
* @throws {Error} When target directory conflicts exist
|
|
171
|
+
*
|
|
172
|
+
* @since 0.1.0
|
|
167
173
|
*/
|
|
168
174
|
exports.appletGenerate = (0, commandDefinition_1.createCommandDefinition)({
|
|
169
175
|
name: 'generate',
|
|
170
|
-
description: 'Generate
|
|
176
|
+
description: 'Generate new signageOS applet projects with boilerplate code',
|
|
171
177
|
optionList: OPTION_LIST,
|
|
172
178
|
commands: [],
|
|
173
179
|
run(options) {
|
|
@@ -176,7 +182,7 @@ exports.appletGenerate = (0, commandDefinition_1.createCommandDefinition)({
|
|
|
176
182
|
// Detect if the command has been called with optional parameters
|
|
177
183
|
const excludedKeys = ['command', 'applet-version'];
|
|
178
184
|
const argumentsFound = Object.entries(options)
|
|
179
|
-
.filter(([key
|
|
185
|
+
.filter(([key]) => !excludedKeys.includes(key))
|
|
180
186
|
.map(([key, value]) => ({ [key]: value })).length > 0;
|
|
181
187
|
console.info('sOS CLI started with params:', options);
|
|
182
188
|
// Create file index
|
|
@@ -455,7 +461,7 @@ exports.appletGenerate = (0, commandDefinition_1.createCommandDefinition)({
|
|
|
455
461
|
});
|
|
456
462
|
// Capture and log stdout
|
|
457
463
|
child.stdout.on('data', (data) => {
|
|
458
|
-
console.
|
|
464
|
+
console.info(`${data.toString()}`);
|
|
459
465
|
});
|
|
460
466
|
// Capture and log stderr
|
|
461
467
|
child.stderr.on('data', (data) => {
|
|
@@ -499,10 +505,10 @@ const createPackageConfig = (name, version, bundler, language) => __awaiter(void
|
|
|
499
505
|
}
|
|
500
506
|
// Add typescript checking before builds
|
|
501
507
|
if (language === Language.TypeScript) {
|
|
502
|
-
scriptDef
|
|
508
|
+
scriptDef['check-types'] = 'tsc --noEmit';
|
|
503
509
|
// Make sure build exists before modifying it
|
|
504
510
|
if (scriptDef.build) {
|
|
505
|
-
scriptDef.build = `npm run
|
|
511
|
+
scriptDef.build = `npm run check-types && ${scriptDef.build}`;
|
|
506
512
|
}
|
|
507
513
|
}
|
|
508
514
|
return {
|
|
@@ -536,7 +542,7 @@ always-auth=true
|
|
|
536
542
|
* Check if the value is present and is one of the supported options
|
|
537
543
|
* @param propName - The name of the property to check
|
|
538
544
|
* @param value - The value to check
|
|
539
|
-
* @param options - The supported options
|
|
545
|
+
* @param {Object} options - The supported options
|
|
540
546
|
* @throws Will throw an error if the value is not present or not one of the supported options
|
|
541
547
|
*/
|
|
542
548
|
function checkSupport(propName, value, options) {
|
|
@@ -2,7 +2,7 @@ import { CommandLineOptions } from '../../Command/commandDefinition';
|
|
|
2
2
|
export 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
|
|
5
|
+
readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc";
|
|
6
6
|
}, {
|
|
7
7
|
readonly name: "organization-uid";
|
|
8
8
|
readonly type: StringConstructor;
|
|
@@ -48,13 +48,55 @@ export declare const OPTION_LIST: readonly [{
|
|
|
48
48
|
readonly description: "Url of forward server to connect to the device instead of the local network (LAN).";
|
|
49
49
|
readonly defaultValue: string | undefined;
|
|
50
50
|
}];
|
|
51
|
+
/**
|
|
52
|
+
* Starts a local development server with hot reload functionality, allowing developers
|
|
53
|
+
* to preview their applets in a browser-based emulator. Supports both local development
|
|
54
|
+
* and device connection for testing on actual signageOS devices.
|
|
55
|
+
*
|
|
56
|
+
* @group Development:3
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```bash
|
|
60
|
+
* # Start development server with default settings
|
|
61
|
+
* sos applet start
|
|
62
|
+
*
|
|
63
|
+
* # Start with custom port and hot reload
|
|
64
|
+
* sos applet start --port 8080 --hot-reload
|
|
65
|
+
*
|
|
66
|
+
* # Start with specific organization
|
|
67
|
+
* sos applet start --organization-uid abc123
|
|
68
|
+
*
|
|
69
|
+
* # Start with custom applet path
|
|
70
|
+
* sos applet start --applet-path ./my-applet
|
|
71
|
+
*
|
|
72
|
+
* # Start with specific entry file
|
|
73
|
+
* sos applet start --entry-file-path index.html
|
|
74
|
+
*
|
|
75
|
+
* # Force restart if server is already running
|
|
76
|
+
* sos applet start --force
|
|
77
|
+
*
|
|
78
|
+
* # Run in detached mode
|
|
79
|
+
* sos applet start --detach
|
|
80
|
+
* ```
|
|
81
|
+
*
|
|
82
|
+
* @remarks
|
|
83
|
+
* The development server provides a browser-based emulator accessible at http://localhost:8090
|
|
84
|
+
* by default. Hot reload automatically refreshes the emulator when source code changes.
|
|
85
|
+
*
|
|
86
|
+
* @throws {Error} When applet files are not found or invalid
|
|
87
|
+
* @throws {Error} When organization is not accessible
|
|
88
|
+
*
|
|
89
|
+
* @see {@link https://developers.signageos.io/docs/applets/connect-to-device-cli/ Applet Development Documentation}
|
|
90
|
+
*
|
|
91
|
+
* @since 0.1.0
|
|
92
|
+
*/
|
|
51
93
|
export declare const appletStart: {
|
|
52
94
|
name: "start";
|
|
53
95
|
description: string;
|
|
54
96
|
optionList: readonly [{
|
|
55
97
|
readonly name: "no-default-organization";
|
|
56
98
|
readonly type: BooleanConstructor;
|
|
57
|
-
readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc
|
|
99
|
+
readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc";
|
|
58
100
|
}, {
|
|
59
101
|
readonly name: "organization-uid";
|
|
60
102
|
readonly type: StringConstructor;
|
|
@@ -29,7 +29,7 @@ const PORT_OPTION = {
|
|
|
29
29
|
name: 'port',
|
|
30
30
|
type: Number,
|
|
31
31
|
description: `Port where will the applet run`,
|
|
32
|
-
defaultValue:
|
|
32
|
+
defaultValue: 8090,
|
|
33
33
|
};
|
|
34
34
|
exports.OPTION_LIST = [
|
|
35
35
|
organizationFacade_1.NO_DEFAULT_ORGANIZATION_OPTION,
|
|
@@ -44,9 +44,51 @@ exports.OPTION_LIST = [
|
|
|
44
44
|
appletServerHelper_1.DETACH_PROCESS_OPTION,
|
|
45
45
|
appletServerHelper_1.FORWARD_SERVER_URL_OPTION,
|
|
46
46
|
];
|
|
47
|
+
/**
|
|
48
|
+
* Starts a local development server with hot reload functionality, allowing developers
|
|
49
|
+
* to preview their applets in a browser-based emulator. Supports both local development
|
|
50
|
+
* and device connection for testing on actual signageOS devices.
|
|
51
|
+
*
|
|
52
|
+
* @group Development:3
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```bash
|
|
56
|
+
* # Start development server with default settings
|
|
57
|
+
* sos applet start
|
|
58
|
+
*
|
|
59
|
+
* # Start with custom port and hot reload
|
|
60
|
+
* sos applet start --port 8080 --hot-reload
|
|
61
|
+
*
|
|
62
|
+
* # Start with specific organization
|
|
63
|
+
* sos applet start --organization-uid abc123
|
|
64
|
+
*
|
|
65
|
+
* # Start with custom applet path
|
|
66
|
+
* sos applet start --applet-path ./my-applet
|
|
67
|
+
*
|
|
68
|
+
* # Start with specific entry file
|
|
69
|
+
* sos applet start --entry-file-path index.html
|
|
70
|
+
*
|
|
71
|
+
* # Force restart if server is already running
|
|
72
|
+
* sos applet start --force
|
|
73
|
+
*
|
|
74
|
+
* # Run in detached mode
|
|
75
|
+
* sos applet start --detach
|
|
76
|
+
* ```
|
|
77
|
+
*
|
|
78
|
+
* @remarks
|
|
79
|
+
* The development server provides a browser-based emulator accessible at http://localhost:8090
|
|
80
|
+
* by default. Hot reload automatically refreshes the emulator when source code changes.
|
|
81
|
+
*
|
|
82
|
+
* @throws {Error} When applet files are not found or invalid
|
|
83
|
+
* @throws {Error} When organization is not accessible
|
|
84
|
+
*
|
|
85
|
+
* @see {@link https://developers.signageos.io/docs/applets/connect-to-device-cli/ Applet Development Documentation}
|
|
86
|
+
*
|
|
87
|
+
* @since 0.1.0
|
|
88
|
+
*/
|
|
47
89
|
exports.appletStart = (0, commandDefinition_1.createCommandDefinition)({
|
|
48
90
|
name: 'start',
|
|
49
|
-
description: 'Start applet
|
|
91
|
+
description: 'Start local applet development server with live preview',
|
|
50
92
|
optionList: exports.OPTION_LIST,
|
|
51
93
|
commands: [],
|
|
52
94
|
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
|
|
5
|
+
readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc";
|
|
6
6
|
}, {
|
|
7
7
|
readonly name: "device-uid";
|
|
8
8
|
readonly type: StringConstructor;
|
|
@@ -25,13 +25,36 @@ declare const OPTION_LIST: readonly [{
|
|
|
25
25
|
readonly type: BooleanConstructor;
|
|
26
26
|
readonly description: "Allow to run applet test without confirmation step";
|
|
27
27
|
}];
|
|
28
|
+
/**
|
|
29
|
+
* Executes previously uploaded applet tests on remote signageOS devices. This command
|
|
30
|
+
* triggers test execution and provides real-time feedback on test progress and results.
|
|
31
|
+
* Tests can be run on specific devices or across multiple devices for comprehensive testing.
|
|
32
|
+
*
|
|
33
|
+
* @group Development:2
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```bash
|
|
37
|
+
* # Run all applet tests
|
|
38
|
+
* sos applet test run --applet-uid my-applet --device-uid device123
|
|
39
|
+
*
|
|
40
|
+
* # Run specific tests
|
|
41
|
+
* sos applet test run --applet-uid my-applet --device-uid device123 --test "test1,test2"
|
|
42
|
+
*
|
|
43
|
+
* # Run without confirmation
|
|
44
|
+
* sos applet test run --applet-uid my-applet --device-uid device123 --yes
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @see {@link ../upload/ Upload test configuration command}
|
|
48
|
+
*
|
|
49
|
+
* @since 0.10.0
|
|
50
|
+
*/
|
|
28
51
|
export declare const appletTestRun: {
|
|
29
52
|
name: "run";
|
|
30
53
|
description: string;
|
|
31
54
|
optionList: readonly [{
|
|
32
55
|
readonly name: "no-default-organization";
|
|
33
56
|
readonly type: BooleanConstructor;
|
|
34
|
-
readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc
|
|
57
|
+
readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc";
|
|
35
58
|
}, {
|
|
36
59
|
readonly name: "device-uid";
|
|
37
60
|
readonly type: StringConstructor;
|
|
@@ -41,9 +41,32 @@ const OPTION_LIST = [
|
|
|
41
41
|
description: `Allow to run applet test without confirmation step`,
|
|
42
42
|
},
|
|
43
43
|
];
|
|
44
|
+
/**
|
|
45
|
+
* Executes previously uploaded applet tests on remote signageOS devices. This command
|
|
46
|
+
* triggers test execution and provides real-time feedback on test progress and results.
|
|
47
|
+
* Tests can be run on specific devices or across multiple devices for comprehensive testing.
|
|
48
|
+
*
|
|
49
|
+
* @group Development:2
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```bash
|
|
53
|
+
* # Run all applet tests
|
|
54
|
+
* sos applet test run --applet-uid my-applet --device-uid device123
|
|
55
|
+
*
|
|
56
|
+
* # Run specific tests
|
|
57
|
+
* sos applet test run --applet-uid my-applet --device-uid device123 --test "test1,test2"
|
|
58
|
+
*
|
|
59
|
+
* # Run without confirmation
|
|
60
|
+
* sos applet test run --applet-uid my-applet --device-uid device123 --yes
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* @see {@link ../upload/ Upload test configuration command}
|
|
64
|
+
*
|
|
65
|
+
* @since 0.10.0
|
|
66
|
+
*/
|
|
44
67
|
exports.appletTestRun = (0, commandDefinition_1.createCommandDefinition)({
|
|
45
68
|
name: 'run',
|
|
46
|
-
description: '
|
|
69
|
+
description: 'Run applet tests on signageOS devices',
|
|
47
70
|
optionList: OPTION_LIST,
|
|
48
71
|
commands: [],
|
|
49
72
|
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
|
|
5
|
+
readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc";
|
|
6
6
|
}, {
|
|
7
7
|
readonly name: "organization-uid";
|
|
8
8
|
readonly type: StringConstructor;
|
|
@@ -18,15 +18,45 @@ declare const OPTION_LIST: readonly [{
|
|
|
18
18
|
}, {
|
|
19
19
|
readonly name: "verbose";
|
|
20
20
|
readonly type: BooleanConstructor;
|
|
21
|
-
readonly description: "
|
|
21
|
+
readonly description: "Outputs all files to upload";
|
|
22
22
|
}];
|
|
23
|
+
/**
|
|
24
|
+
* Uploads test files for remote execution on signageOS devices. Test files are
|
|
25
|
+
* identified based on the test configuration in package.json and uploaded to
|
|
26
|
+
* the platform for automated testing. Supports incremental uploads with
|
|
27
|
+
* change detection and confirmation prompts.
|
|
28
|
+
*
|
|
29
|
+
* @group Development:1
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```bash
|
|
33
|
+
* # Upload applet tests
|
|
34
|
+
* sos applet test upload
|
|
35
|
+
*
|
|
36
|
+
* # Upload tests with confirmation skip
|
|
37
|
+
* sos applet test upload --yes
|
|
38
|
+
*
|
|
39
|
+
* # Upload tests with verbose output
|
|
40
|
+
* sos applet test upload --verbose
|
|
41
|
+
*
|
|
42
|
+
* # Upload tests for specific applet
|
|
43
|
+
* sos applet test upload --applet-uid my-applet-uid
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @throws {Error} When package.json is missing or test configuration is invalid
|
|
47
|
+
* @throws {Error} When test files cannot be found or read
|
|
48
|
+
* @throws {Error} When applet or organization access is denied
|
|
49
|
+
* @throws {Error} When test upload confirmation is denied
|
|
50
|
+
*
|
|
51
|
+
* @since 0.10.0
|
|
52
|
+
*/
|
|
23
53
|
export declare const appletTestUpload: {
|
|
24
54
|
name: "upload";
|
|
25
55
|
description: string;
|
|
26
56
|
optionList: readonly [{
|
|
27
57
|
readonly name: "no-default-organization";
|
|
28
58
|
readonly type: BooleanConstructor;
|
|
29
|
-
readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc
|
|
59
|
+
readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc";
|
|
30
60
|
}, {
|
|
31
61
|
readonly name: "organization-uid";
|
|
32
62
|
readonly type: StringConstructor;
|
|
@@ -42,7 +72,7 @@ export declare const appletTestUpload: {
|
|
|
42
72
|
}, {
|
|
43
73
|
readonly name: "verbose";
|
|
44
74
|
readonly type: BooleanConstructor;
|
|
45
|
-
readonly description: "
|
|
75
|
+
readonly description: "Outputs all files to upload";
|
|
46
76
|
}];
|
|
47
77
|
commands: never[];
|
|
48
78
|
run(options: CommandLineOptions<typeof OPTION_LIST>): Promise<void>;
|
|
@@ -35,12 +35,42 @@ const OPTION_LIST = [
|
|
|
35
35
|
{
|
|
36
36
|
name: 'verbose',
|
|
37
37
|
type: Boolean,
|
|
38
|
-
description: `
|
|
38
|
+
description: `Outputs all files to upload`,
|
|
39
39
|
},
|
|
40
40
|
];
|
|
41
|
+
/**
|
|
42
|
+
* Uploads test files for remote execution on signageOS devices. Test files are
|
|
43
|
+
* identified based on the test configuration in package.json and uploaded to
|
|
44
|
+
* the platform for automated testing. Supports incremental uploads with
|
|
45
|
+
* change detection and confirmation prompts.
|
|
46
|
+
*
|
|
47
|
+
* @group Development:1
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```bash
|
|
51
|
+
* # Upload applet tests
|
|
52
|
+
* sos applet test upload
|
|
53
|
+
*
|
|
54
|
+
* # Upload tests with confirmation skip
|
|
55
|
+
* sos applet test upload --yes
|
|
56
|
+
*
|
|
57
|
+
* # Upload tests with verbose output
|
|
58
|
+
* sos applet test upload --verbose
|
|
59
|
+
*
|
|
60
|
+
* # Upload tests for specific applet
|
|
61
|
+
* sos applet test upload --applet-uid my-applet-uid
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* @throws {Error} When package.json is missing or test configuration is invalid
|
|
65
|
+
* @throws {Error} When test files cannot be found or read
|
|
66
|
+
* @throws {Error} When applet or organization access is denied
|
|
67
|
+
* @throws {Error} When test upload confirmation is denied
|
|
68
|
+
*
|
|
69
|
+
* @since 0.10.0
|
|
70
|
+
*/
|
|
41
71
|
exports.appletTestUpload = (0, commandDefinition_1.createCommandDefinition)({
|
|
42
72
|
name: 'upload',
|
|
43
|
-
description: '
|
|
73
|
+
description: 'Upload applet tests to the signageOS platform',
|
|
44
74
|
optionList: OPTION_LIST,
|
|
45
75
|
commands: [],
|
|
46
76
|
run(options) {
|