@signageos/cli 2.4.1 → 2.5.1

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 +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/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
@@ -0,0 +1,105 @@
1
+ ---
2
+ id: organization-index
3
+ title: organization
4
+ sidebar_position: 60
5
+ ---
6
+ # organization
7
+
8
+ Organization management operations
9
+
10
+
11
+ ## Description
12
+
13
+ Provides commands to manage signageOS organizations including listing available organizations,
14
+ retrieving organization details, and setting default organization for CLI operations.
15
+
16
+ ## Usage
17
+
18
+ ```bash
19
+ sos organization <subcommand> [options]
20
+ ```
21
+
22
+ ## Subcommands
23
+
24
+ ### list
25
+
26
+ List organizations for logged account
27
+
28
+ ```bash
29
+ sos organization list [options]
30
+ ```
31
+
32
+ [→ See detailed documentation](/cli/organization/list/)
33
+
34
+ ### get
35
+
36
+ Get detailed information about a specific organization
37
+
38
+ ```bash
39
+ sos organization get [options]
40
+ ```
41
+
42
+ [→ See detailed documentation](/cli/organization/get/)
43
+
44
+ ### set-default
45
+
46
+ Set a default organization for CLI operations
47
+
48
+ ```bash
49
+ sos organization set-default [options]
50
+ ```
51
+
52
+ [→ See detailed documentation](/cli/organization/set-default/)
53
+
54
+
55
+ ## Examples
56
+
57
+ ```bash
58
+ # List all organizations
59
+ sos organization list
60
+
61
+ # Get specific organization details
62
+ sos organization get --organization-uid abc123
63
+
64
+ # Set default organization
65
+ sos organization set-default
66
+ ```
67
+
68
+ ## Since
69
+
70
+ 0.3.0
71
+
72
+ ## Global Options
73
+
74
+ All commands support the following global options:
75
+
76
+ | Option | Alias | Description |
77
+ |--------|-------|-------------|
78
+ | `--help` | `-h` | Display help information for any command |
79
+ | `--version` | `-v` | Display the installed version of the CLI |
80
+ | `--api-url` | `-u` | Override the API URL for REST requests |
81
+ | `--profile` | | Use a specific profile from ~/.sosrc config |
82
+
83
+ ### Examples
84
+
85
+ ```bash
86
+ # Show version
87
+ sos --version
88
+
89
+ # Get help for any command
90
+ sos applet --help
91
+ sos applet upload --help
92
+
93
+ # Use custom API endpoint
94
+ sos --api-url https://api.example.com applet upload
95
+
96
+ # Use specific profile
97
+ sos --profile production organization list
98
+ ```
99
+
100
+
101
+ ## Related Commands
102
+
103
+ - [`sos organization list`](/cli/organization/list/) - List organizations for logged account
104
+ - [`sos organization get`](/cli/organization/get/) - Get detailed information about a specific organization
105
+ - [`sos organization set-default`](/cli/organization/set-default/) - Set a default organization for CLI operations
@@ -0,0 +1,65 @@
1
+ ---
2
+ id: organization-list-index
3
+ title: list
4
+ sidebar_position: 61
5
+ ---
6
+ # list
7
+
8
+ List organizations for logged account
9
+
10
+
11
+ ## Description
12
+
13
+ Retrieves and displays all organizations that the currently authenticated
14
+ account has access to. This command helps users understand which organizations
15
+ they can work with and select appropriate targets for other CLI operations.
16
+
17
+ ## Usage
18
+
19
+ ```bash
20
+ sos organization list [options]
21
+ ```
22
+
23
+ ## Examples
24
+
25
+ ```bash
26
+ # List all accessible organizations
27
+ sos organization list
28
+ ```
29
+
30
+ ## Since
31
+
32
+ 0.3.0
33
+
34
+ ## Global Options
35
+
36
+ All commands support the following global options:
37
+
38
+ | Option | Alias | Description |
39
+ |--------|-------|-------------|
40
+ | `--help` | `-h` | Display help information for any command |
41
+ | `--version` | `-v` | Display the installed version of the CLI |
42
+ | `--api-url` | `-u` | Override the API URL for REST requests |
43
+ | `--profile` | | Use a specific profile from ~/.sosrc config |
44
+
45
+ ### Examples
46
+
47
+ ```bash
48
+ # Show version
49
+ sos --version
50
+
51
+ # Get help for any command
52
+ sos applet --help
53
+ sos applet upload --help
54
+
55
+ # Use custom API endpoint
56
+ sos --api-url https://api.example.com applet upload
57
+
58
+ # Use specific profile
59
+ sos --profile production organization list
60
+ ```
61
+
62
+
63
+ ## See Also
64
+
65
+ - [Get detailed organization information](../get/)
@@ -0,0 +1,74 @@
1
+ ---
2
+ id: organization-set-default-index
3
+ title: set-default
4
+ sidebar_position: 63
5
+ ---
6
+ # set-default
7
+
8
+ Set a default organization for CLI operations
9
+
10
+
11
+ ## Description
12
+
13
+ Sets a default organization that will be used automatically in subsequent CLI commands
14
+ that require an organization context. This eliminates the need to specify the organization
15
+ UID for each command. The default organization is stored in the ~/.sosrc configuration file.
16
+
17
+ :::tip Remarks
18
+ The default organization can be overridden using the SOS_ORGANIZATION_UID environment variable
19
+ or by using the --organization-uid flag in individual commands.
20
+ :::
21
+
22
+ ## Usage
23
+
24
+ ```bash
25
+ sos organization set-default [options]
26
+ ```
27
+
28
+ ## Options
29
+
30
+ | Option | Description |
31
+ | -------------------- | ------------------------- |
32
+ | `--organization-uid` | Organization UID (string) |
33
+
34
+ ## Examples
35
+
36
+ ```bash
37
+ # Interactive selection of default organization
38
+ sos organization set-default
39
+
40
+ # Set specific organization as default
41
+ sos organization set-default --organization-uid abc123
42
+ ```
43
+
44
+ ## Since
45
+
46
+ 1.0.0
47
+
48
+ ## Global Options
49
+
50
+ All commands support the following global options:
51
+
52
+ | Option | Alias | Description |
53
+ |--------|-------|-------------|
54
+ | `--help` | `-h` | Display help information for any command |
55
+ | `--version` | `-v` | Display the installed version of the CLI |
56
+ | `--api-url` | `-u` | Override the API URL for REST requests |
57
+ | `--profile` | | Use a specific profile from ~/.sosrc config |
58
+
59
+ ### Examples
60
+
61
+ ```bash
62
+ # Show version
63
+ sos --version
64
+
65
+ # Get help for any command
66
+ sos applet --help
67
+ sos applet upload --help
68
+
69
+ # Use custom API endpoint
70
+ sos --api-url https://api.example.com applet upload
71
+
72
+ # Use specific profile
73
+ sos --profile production organization list
74
+ ```
@@ -0,0 +1,78 @@
1
+ ---
2
+ id: timing-index
3
+ title: timing
4
+ sidebar_position: 40
5
+ ---
6
+ # timing
7
+
8
+ Timing management
9
+
10
+
11
+ ## Description
12
+
13
+ Provides commands for managing timing configurations that control when and how
14
+ applets are displayed on signageOS devices. Timing configurations define the
15
+ relationship between devices, applets, and scheduling parameters.
16
+
17
+ ## Usage
18
+
19
+ ```bash
20
+ sos timing <subcommand> [options]
21
+ ```
22
+
23
+ ## Subcommands
24
+
25
+ ### list
26
+
27
+ List timing configurations assigned to a device
28
+
29
+ ```bash
30
+ sos timing list [options]
31
+ ```
32
+
33
+ [→ See detailed documentation](/cli/timing/list/)
34
+
35
+
36
+ ## Examples
37
+
38
+ ```bash
39
+ # List timing configurations
40
+ sos timing list
41
+ ```
42
+
43
+ ## Since
44
+
45
+ 0.3.0
46
+
47
+ ## Global Options
48
+
49
+ All commands support the following global options:
50
+
51
+ | Option | Alias | Description |
52
+ |--------|-------|-------------|
53
+ | `--help` | `-h` | Display help information for any command |
54
+ | `--version` | `-v` | Display the installed version of the CLI |
55
+ | `--api-url` | `-u` | Override the API URL for REST requests |
56
+ | `--profile` | | Use a specific profile from ~/.sosrc config |
57
+
58
+ ### Examples
59
+
60
+ ```bash
61
+ # Show version
62
+ sos --version
63
+
64
+ # Get help for any command
65
+ sos applet --help
66
+ sos applet upload --help
67
+
68
+ # Use custom API endpoint
69
+ sos --api-url https://api.example.com applet upload
70
+
71
+ # Use specific profile
72
+ sos --profile production organization list
73
+ ```
74
+
75
+
76
+ ## Related Commands
77
+
78
+ - [`sos timing list`](/cli/timing/list/) - List timing configurations assigned to a device
@@ -0,0 +1,71 @@
1
+ ---
2
+ id: timing-list-index
3
+ title: list
4
+ sidebar_position: 41
5
+ ---
6
+ # list
7
+
8
+ List timing configurations assigned to a device
9
+
10
+
11
+ ## Description
12
+
13
+ Retrieves and displays all timing configurations that are currently assigned
14
+ to a specific device. Timing configurations define when and how content
15
+ (applets) should be displayed on devices, including scheduling and duration settings.
16
+
17
+ ## Usage
18
+
19
+ ```bash
20
+ sos timing list [options]
21
+ ```
22
+
23
+ ## Options
24
+
25
+ | Option | Description |
26
+ | --------------------------- | ---------------------------------------------------------------- |
27
+ | `--no-default-organization` | Prevent using the defaultOrganizationUid from ~/.sosrc (boolean) |
28
+ | `--organization-uid` | Organization UID (string) |
29
+ | `--device-uid` | Device UID (string) |
30
+
31
+ ## Examples
32
+
33
+ ```bash
34
+ # List timings for a specific device
35
+ sos timing list --device-uid device123
36
+
37
+ # List timings with organization override
38
+ sos timing list --device-uid device123 --organization-uid org456
39
+ ```
40
+
41
+ ## Since
42
+
43
+ 0.3.0
44
+
45
+ ## Global Options
46
+
47
+ All commands support the following global options:
48
+
49
+ | Option | Alias | Description |
50
+ |--------|-------|-------------|
51
+ | `--help` | `-h` | Display help information for any command |
52
+ | `--version` | `-v` | Display the installed version of the CLI |
53
+ | `--api-url` | `-u` | Override the API URL for REST requests |
54
+ | `--profile` | | Use a specific profile from ~/.sosrc config |
55
+
56
+ ### Examples
57
+
58
+ ```bash
59
+ # Show version
60
+ sos --version
61
+
62
+ # Get help for any command
63
+ sos applet --help
64
+ sos applet upload --help
65
+
66
+ # Use custom API endpoint
67
+ sos --api-url https://api.example.com applet upload
68
+
69
+ # Use specific profile
70
+ sos --profile production organization list
71
+ ```
package/package.json CHANGED
@@ -1,35 +1,41 @@
1
1
  {
2
2
  "name": "@signageos/cli",
3
- "version": "2.4.1",
3
+ "version": "2.5.1",
4
4
  "main": "./dist/index.js",
5
+ "author": "signageOS.io <dev@signageos.io>",
5
6
  "files": [
6
7
  ".env",
7
8
  "dist",
8
9
  "README.md",
9
- "package.json"
10
+ "package.json",
11
+ "docs"
10
12
  ],
11
13
  "repository": {
12
14
  "url": "https://github.com/signageos/cli",
13
15
  "type": "git"
14
16
  },
15
17
  "scripts": {
16
- "build": "npx check-engine@latest && tsc && npm run build:templates",
17
- "build:templates": "node tools/include-templates.js",
18
- "lint": "eslint --config ./eslint.config.mjs --ext .ts,.tsx,.js ./src/",
19
- "lint:fix": "eslint --config ./eslint.config.mjs --fix --ext .ts,.tsx,.js ./src/",
20
- "lint:prettier": "prettier \"(src|tests|tools)/**/*.+(ts|tsx|json|js)\" --check",
21
- "lint:prettier:fix": "prettier \"(src|tests|tools)/**/*.+(ts|tsx|json|js)\" --write",
22
18
  "clean": "rm -rf dist/*",
23
- "clean-build": "npm run clean && npm run build && chmod +x dist/index.js",
19
+ "build": "npx check-engine@latest && tsc && npm run build:templates && npm run docs",
20
+ "build:templates": "node tools/include-templates.mjs",
21
+ "clean-build": "npm run clean && npm run build",
22
+ "watch": "tsc --watch",
23
+ "check-types": "tsc --noEmit",
24
24
  "test": "env NODE_ENV=test mocha",
25
- "test:windows": "cross-env NODE_ENV=test mocha",
26
25
  "test:coverage": "c8 npm run test",
27
- "watch": "tsc --watch",
28
- "check": "npm run depcheck && npx --userconfig ./.npmrc @signageos/lib-ci check-deps && npm run check-circular-deps",
26
+ "test:windows": "cross-env NODE_ENV=test mocha",
27
+ "lint": "eslint",
28
+ "lint:fix": "eslint --fix",
29
+ "lint:prettier": "prettier \"(src|tests|tools)/**/*.+(ts|tsx|json|js)\" --check",
30
+ "lint:prettier:fix": "prettier \"(src|tests|tools)/**/*.+(ts|tsx|json|js)\" --write",
31
+ "test:node-versions": "./tests/integration/test-node-versions.sh",
32
+ "test:integration:node-versions": "env NODE_ENV=test mocha --config .mocharc.node-versions.json",
33
+ "check": "npm run depcheck && npx --userconfig ./.npmrc @signageos/lib-ci check-deps && npm run check-circular-deps && npm run check-types",
29
34
  "check-circular-deps": "npx madge@5 --circular --extensions ts ./src/",
30
35
  "depcheck": "depcheck --config .depcheckrc.json",
31
- "typecheck": "tsc --noEmit",
32
- "prettier:format": "prettier \"(src|tests|tools)/**/*.+(ts|js)\" --write",
36
+ "docs": "npm run docs:generate && npm run docs:validate",
37
+ "docs:generate": "tsx tools/docs/generate.ts --action=generate --filePath=src/index.ts",
38
+ "docs:validate": "tsx tools/docs/validate/validate-docs-links.ts",
33
39
  "postinstall": "node -e \"try{require('./postinstall.js')}catch(e){}\""
34
40
  },
35
41
  "license": "MIT",
@@ -42,7 +48,7 @@
42
48
  },
43
49
  "devDependencies": {
44
50
  "@istanbuljs/nyc-config-typescript": "1.0.2",
45
- "@signageos/codestyle": "1.0.0",
51
+ "@signageos/codestyle": "2.0.3",
46
52
  "@types/archiver": "6.0.3",
47
53
  "@types/child-process-promise": "2.2.6",
48
54
  "@types/cli-progress": "3.11.6",
@@ -55,7 +61,6 @@
55
61
  "@types/mime": "3.0.4",
56
62
  "@types/mocha": "10.0.10",
57
63
  "@types/node": "22.15.3",
58
- "@types/node-fetch": "2.6.12",
59
64
  "@types/prompts": "2.4.9",
60
65
  "@types/semver": "7.7.0",
61
66
  "@types/sinon": "17.0.4",
@@ -65,16 +70,21 @@
65
70
  "cross-env": "7.0.3",
66
71
  "depcheck": "1.4.7",
67
72
  "mocha": "11.2.2",
68
- "rewiremock": "3.14.5",
73
+ "rewiremock": "3.14.6",
69
74
  "should": "13.2.3",
70
75
  "sinon": "20.0.0",
71
76
  "ts-node": "10.9.2",
77
+ "tsx": "4.20.3",
72
78
  "typescript": "5.8.3",
73
79
  "unzipper": "0.12.3"
74
80
  },
81
+ "overrides": {
82
+ "cross-spawn": "^7.0.6",
83
+ "http-cache-semantics": "^4.2.0"
84
+ },
75
85
  "dependencies": {
76
86
  "@signageos/file": "1.0.1",
77
- "@signageos/sdk": "1.27.5",
87
+ "@signageos/sdk": "1.28.1",
78
88
  "archiver": "7.0.1",
79
89
  "chalk": "2.4.2",
80
90
  "child-process-promise": "2.2.1",
@@ -87,8 +97,8 @@
87
97
  "express": "5.1.0",
88
98
  "fs-extra": "11.3.0",
89
99
  "internal-ip": "8.0.0",
100
+ "markdown-table": "3.0.4",
90
101
  "mime": "2.4.4",
91
- "node-fetch": "2.7.0",
92
102
  "prompts": "2.4.2",
93
103
  "semver": "7.7.1",
94
104
  "serve-static": "2.2.0",