livingdocs-cli 2.3.1 → 2.4.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 +12 -11
- package/oclif.manifest.json +1 -1
- package/package.json +4 -4
- package/src/commands/design-server/start.js +7 -2
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ OPTIONS
|
|
|
42
42
|
-s, --src=src The folder with your .html component templates
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
_See code: [src/commands/component-library/build.js](https://github.com/livingdocsIO/livingdocs-cli/blob/v2.
|
|
45
|
+
_See code: [src/commands/component-library/build.js](https://github.com/livingdocsIO/livingdocs-cli/blob/v2.4.0/src/commands/component-library/build.js)_
|
|
46
46
|
|
|
47
47
|
## `livingdocs-cli config:print`
|
|
48
48
|
|
|
@@ -57,7 +57,7 @@ OPTIONS
|
|
|
57
57
|
-p, --project=project If used configuration options are loaded from .livingdocs-cli file.
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
_See code: [src/commands/config/print.js](https://github.com/livingdocsIO/livingdocs-cli/blob/v2.
|
|
60
|
+
_See code: [src/commands/config/print.js](https://github.com/livingdocsIO/livingdocs-cli/blob/v2.4.0/src/commands/config/print.js)_
|
|
61
61
|
|
|
62
62
|
## `livingdocs-cli design-server:start`
|
|
63
63
|
|
|
@@ -68,14 +68,15 @@ USAGE
|
|
|
68
68
|
$ livingdocs-cli design-server:start
|
|
69
69
|
|
|
70
70
|
OPTIONS
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
--
|
|
74
|
-
--
|
|
71
|
+
-a, --address=address The address of the design-server.
|
|
72
|
+
-d, --dist=dist (required) The folder to load designs from.
|
|
73
|
+
-p, --port=port [default: 9030] The port of the design-server.
|
|
74
|
+
--assets=assets Asset folder to serve static files.
|
|
75
|
+
--basePath=basePath The basePath to set in `assets.basePath`.
|
|
75
76
|
--verbose
|
|
76
77
|
```
|
|
77
78
|
|
|
78
|
-
_See code: [src/commands/design-server/start.js](https://github.com/livingdocsIO/livingdocs-cli/blob/v2.
|
|
79
|
+
_See code: [src/commands/design-server/start.js](https://github.com/livingdocsIO/livingdocs-cli/blob/v2.4.0/src/commands/design-server/start.js)_
|
|
79
80
|
|
|
80
81
|
## `livingdocs-cli help [COMMAND]`
|
|
81
82
|
|
|
@@ -117,7 +118,7 @@ OPTIONS
|
|
|
117
118
|
--format=js|js/html|json The format of the files written.
|
|
118
119
|
```
|
|
119
120
|
|
|
120
|
-
_See code: [src/commands/project-config/download.js](https://github.com/livingdocsIO/livingdocs-cli/blob/v2.
|
|
121
|
+
_See code: [src/commands/project-config/download.js](https://github.com/livingdocsIO/livingdocs-cli/blob/v2.4.0/src/commands/project-config/download.js)_
|
|
121
122
|
|
|
122
123
|
## `livingdocs-cli project-config:import-design`
|
|
123
124
|
|
|
@@ -134,7 +135,7 @@ OPTIONS
|
|
|
134
135
|
-u, --designUri=designUri (required) URL of the design to import
|
|
135
136
|
```
|
|
136
137
|
|
|
137
|
-
_See code: [src/commands/project-config/import-design.js](https://github.com/livingdocsIO/livingdocs-cli/blob/v2.
|
|
138
|
+
_See code: [src/commands/project-config/import-design.js](https://github.com/livingdocsIO/livingdocs-cli/blob/v2.4.0/src/commands/project-config/import-design.js)_
|
|
138
139
|
|
|
139
140
|
## `livingdocs-cli project-config:plan`
|
|
140
141
|
|
|
@@ -159,7 +160,7 @@ OPTIONS
|
|
|
159
160
|
Can be set by the environment variable 'LI_TOKEN'.
|
|
160
161
|
```
|
|
161
162
|
|
|
162
|
-
_See code: [src/commands/project-config/plan.js](https://github.com/livingdocsIO/livingdocs-cli/blob/v2.
|
|
163
|
+
_See code: [src/commands/project-config/plan.js](https://github.com/livingdocsIO/livingdocs-cli/blob/v2.4.0/src/commands/project-config/plan.js)_
|
|
163
164
|
|
|
164
165
|
## `livingdocs-cli project-config:publish`
|
|
165
166
|
|
|
@@ -184,5 +185,5 @@ OPTIONS
|
|
|
184
185
|
Can be set by the environment variable 'LI_TOKEN'.
|
|
185
186
|
```
|
|
186
187
|
|
|
187
|
-
_See code: [src/commands/project-config/publish.js](https://github.com/livingdocsIO/livingdocs-cli/blob/v2.
|
|
188
|
+
_See code: [src/commands/project-config/publish.js](https://github.com/livingdocsIO/livingdocs-cli/blob/v2.4.0/src/commands/project-config/publish.js)_
|
|
188
189
|
<!-- commandsstop -->
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"2.
|
|
1
|
+
{"version":"2.4.0","commands":{"component-library:build":{"id":"component-library:build","description":"Build a Component Library JSON file","pluginName":"livingdocs-cli","pluginType":"core","aliases":[],"flags":{"src":{"name":"src","type":"option","char":"s","description":"The folder with your .html component templates"},"dist":{"name":"dist","type":"option","char":"d","description":"The folder where the output will be written."}},"args":[]},"config:print":{"id":"config:print","description":"Print current CLI configuration","pluginName":"livingdocs-cli","pluginType":"core","aliases":[],"flags":{"project":{"name":"project","type":"option","char":"p","description":"If used configuration options are loaded from .livingdocs-cli file."},"env":{"name":"env","type":"option","char":"e","description":"If used configuration options are loaded from .livingdocs-cli file."}},"args":[]},"design-server:start":{"id":"design-server:start","description":"Start a design server for development","pluginName":"livingdocs-cli","pluginType":"core","aliases":[],"flags":{"port":{"name":"port","type":"option","char":"p","description":"The port of the design-server.","default":9030},"address":{"name":"address","type":"option","char":"a","description":"The address of the design-server."},"dist":{"name":"dist","type":"option","char":"d","description":"The folder to load designs from.","required":true},"assets":{"name":"assets","type":"option","description":"Asset folder to serve static files."},"basePath":{"name":"basePath","type":"option","description":"The basePath to set in `assets.basePath`."},"verbose":{"name":"verbose","type":"boolean","allowNo":false}},"args":[]},"project-config:download":{"id":"project-config:download","description":"Download a project configuration","pluginName":"livingdocs-cli","pluginType":"core","aliases":[],"flags":{"project":{"name":"project","type":"option","char":"p","description":"If used configuration options are loaded from .livingdocs-cli file."},"env":{"name":"env","type":"option","char":"e","description":"If used configuration options are loaded from .livingdocs-cli file."},"token":{"name":"token","type":"option","char":"t","description":"Access Token for your project (needs `public-api:config:read` permission).\nCan be set by the environment variable 'LI_TOKEN'.","required":true},"host":{"name":"host","type":"option","char":"h","description":"The livingdocs host.\nCan be set by the environment variable 'LI_HOST'.","required":true,"default":"http://localhost:9090"},"dist":{"name":"dist","type":"option","char":"d","description":"The folder where the output will be written."},"format":{"name":"format","type":"option","description":"The format of the files written.","options":["js","js/html","json"]}},"args":[]},"project-config:drafts":{"id":"project-config:drafts","description":"List project configuration drafts","pluginName":"livingdocs-cli","pluginType":"core","hidden":true,"aliases":[],"flags":{"token":{"name":"token","type":"option","char":"t","description":"Access Token for your project (needs `public-api:config:read` permission).\nCan be set by the environment variable 'LI_TOKEN'.","required":true},"host":{"name":"host","type":"option","char":"h","description":"The livingdocs host.\nCan be set by the environment variable 'LI_HOST'.","default":"http://localhost:9090"}},"args":[]},"project-config:import-design":{"id":"project-config:import-design","description":"Import a design into a given project configuration","pluginName":"livingdocs-cli","pluginType":"core","aliases":[],"flags":{"project":{"name":"project","type":"option","char":"p","description":"If used configuration options are loaded from .livingdocs-cli file."},"env":{"name":"env","type":"option","char":"e","description":"If used configuration options are loaded from .livingdocs-cli file."},"dist":{"name":"dist","type":"option","char":"d","description":"The folder where the output will be written.","required":true},"designUri":{"name":"designUri","type":"option","char":"u","description":"URL of the design to import","required":true}},"args":[]},"project-config:plan":{"id":"project-config:plan","description":"See what would be updated in a publish command","pluginName":"livingdocs-cli","pluginType":"core","aliases":[],"flags":{"project":{"name":"project","type":"option","char":"p","description":"If used configuration options are loaded from .livingdocs-cli file."},"env":{"name":"env","type":"option","char":"e","description":"If used configuration options are loaded from .livingdocs-cli file."},"token":{"name":"token","type":"option","char":"t","description":"Access Token for your project (needs `public-api:config:write` permission).\nCan be set by the environment variable 'LI_TOKEN'.","required":true},"host":{"name":"host","type":"option","char":"h","description":"The livingdocs host.\nCan be set by the environment variable 'LI_HOST'.","required":true,"default":"http://localhost:9090"},"source":{"name":"source","type":"option","char":"s","description":"The folder or filename to the project config."},"dist":{"name":"dist","type":"option","char":"d","description":"The folder where the output will be written."}},"args":[]},"project-config:publish":{"id":"project-config:publish","description":"Publish a project configuration to your project","pluginName":"livingdocs-cli","pluginType":"core","aliases":[],"flags":{"project":{"name":"project","type":"option","char":"p","description":"If used configuration options are loaded from .livingdocs-cli file."},"env":{"name":"env","type":"option","char":"e","description":"If used configuration options are loaded from .livingdocs-cli file."},"token":{"name":"token","type":"option","char":"t","description":"Access Token for your project (needs `public-api:config:write` permission).\nCan be set by the environment variable 'LI_TOKEN'.","required":true},"host":{"name":"host","type":"option","char":"h","description":"The livingdocs host.\nCan be set by the environment variable 'LI_HOST'.","required":true,"default":"http://localhost:9090"},"source":{"name":"source","type":"option","char":"s","description":"The folder or filename to the project config."},"dist":{"name":"dist","type":"option","char":"d","description":"The folder where the output will be written."}},"args":[]},"project-config:upload":{"id":"project-config:upload","description":"Upload a ChannelConfig into a draft for your project","pluginName":"livingdocs-cli","pluginType":"core","hidden":true,"aliases":[],"flags":{"project":{"name":"project","type":"option","char":"p","description":"If used configuration options are loaded from .livingdocs-cli file."},"env":{"name":"env","type":"option","char":"e","description":"If used configuration options are loaded from .livingdocs-cli file."},"token":{"name":"token","type":"option","char":"t","description":"Access Token for your project (needs `public-api:config:write` permission).\nCan be set by the environment variable 'LI_TOKEN'.","required":true},"host":{"name":"host","type":"option","char":"h","description":"The livingdocs host.\nCan be set by the environment variable 'LI_HOST'.","required":true,"default":"http://localhost:9090"},"source":{"name":"source","type":"option","char":"s","description":"The folder or filename to the project config.","required":true},"draftName":{"name":"draftName","type":"option","description":"The name of the draft the config will be saved under.","required":true}},"args":[]},"project-config:upload_assets":{"id":"project-config:upload_assets","description":"Upload assets to your project","pluginName":"livingdocs-cli","pluginType":"core","hidden":true,"aliases":[],"flags":{"token":{"name":"token","type":"option","char":"t","description":"Access Token for your project (needs `public-api:config:write` permission).\nCan be set by the environment variable 'LI_TOKEN'.","required":true},"host":{"name":"host","type":"option","char":"h","description":"The livingdocs host.\nCan be set by the environment variable 'LI_HOST'.","default":"http://localhost:9090"},"assets":{"name":"assets","type":"option","char":"a","description":"The folder where you asset files are located."}},"args":[]}}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "livingdocs-cli",
|
|
3
3
|
"description": "Livingdocs Command Line Utility",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.4.0",
|
|
5
5
|
"author": "Livingdocs AG",
|
|
6
6
|
"repository": "livingdocsIO/livingdocs-cli",
|
|
7
7
|
"homepage": "https://github.com/livingdocsIO/livingdocs-cli",
|
|
@@ -86,11 +86,11 @@
|
|
|
86
86
|
"isCi": true,
|
|
87
87
|
"name": "Drone",
|
|
88
88
|
"service": "drone",
|
|
89
|
-
"commit": "
|
|
90
|
-
"build": "
|
|
89
|
+
"commit": "073bb133c9abdc5cca5ab3f6e12648a010f595dd",
|
|
90
|
+
"build": "103",
|
|
91
91
|
"branch": "master",
|
|
92
92
|
"isPr": false,
|
|
93
93
|
"slug": "livingdocsIO/livingdocs-cli",
|
|
94
|
-
"date": "2022-
|
|
94
|
+
"date": "2022-02-11T21:50:28.394Z"
|
|
95
95
|
}
|
|
96
96
|
}
|
|
@@ -13,6 +13,10 @@ class DesignServerCommand extends Command {
|
|
|
13
13
|
description: 'The port of the design-server.',
|
|
14
14
|
default: 9030
|
|
15
15
|
}),
|
|
16
|
+
address: flags.string({
|
|
17
|
+
char: 'a',
|
|
18
|
+
description: 'The address of the design-server.'
|
|
19
|
+
}),
|
|
16
20
|
dist: flags.string({
|
|
17
21
|
char: 'd',
|
|
18
22
|
description: 'The folder to load designs from.',
|
|
@@ -29,7 +33,8 @@ class DesignServerCommand extends Command {
|
|
|
29
33
|
|
|
30
34
|
async run () {
|
|
31
35
|
let host
|
|
32
|
-
const {port, verbose, dist, assets, basePath} =
|
|
36
|
+
const {port, address: customAddress, verbose, dist, assets, basePath} =
|
|
37
|
+
this.parse(DesignServerCommand).flags
|
|
33
38
|
|
|
34
39
|
const fastify = require('fastify')({
|
|
35
40
|
logger: verbose ? {prettyPrint: true} : undefined
|
|
@@ -108,7 +113,7 @@ class DesignServerCommand extends Command {
|
|
|
108
113
|
reply.sendFile(filePath)
|
|
109
114
|
})
|
|
110
115
|
|
|
111
|
-
fastify.listen(port, (err, address) => {
|
|
116
|
+
fastify.listen(port, customAddress, (err, address) => {
|
|
112
117
|
if (err) throw err
|
|
113
118
|
host = address
|
|
114
119
|
if (!verbose) this.log(chalk.green(`server listening at ${address}`))
|