livingdocs-cli 1.3.0 → 2.0.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.
- package/README.md +61 -30
- package/oclif.manifest.json +1 -0
- package/package.json +9 -9
- package/src/commands/cli-config/print.js +5 -8
- package/src/commands/component-library/build.js +9 -11
- package/src/commands/design-server/start.js +35 -27
- package/src/commands/project-config/download.js +13 -16
- package/src/commands/project-config/drafts.js +5 -8
- package/src/commands/project-config/import-design.js +20 -1
- package/src/commands/project-config/plan.js +12 -15
- package/src/commands/project-config/publish.js +12 -15
- package/src/commands/project-config/upload.js +16 -19
- package/src/commands/project-config/upload_assets.js +9 -12
- package/src/lib/framework/livingdocs-framework.js +4 -3
- package/src/lib/parsing/parse_design_to_v2.js +28 -7
- package/src/lib/read_channel_config.js +3 -1
|
@@ -7,24 +7,23 @@ const errorReporter = require('../../lib/api/error_reporter')
|
|
|
7
7
|
const resultReporter = require('../../lib/api/channel_config_result_reporter')
|
|
8
8
|
const readChannelConfig = require('../../lib/read_channel_config')
|
|
9
9
|
|
|
10
|
-
const description = `Upload a ChannelConfig into a draft for your project`
|
|
11
|
-
const commandFlags = {
|
|
12
|
-
project: sharedFlags.project,
|
|
13
|
-
env: sharedFlags.env,
|
|
14
|
-
token: {...sharedFlags.configWriteToken, required: true},
|
|
15
|
-
host: {...sharedFlags.host, required: true},
|
|
16
|
-
dist: flags.string({
|
|
17
|
-
char: 'd',
|
|
18
|
-
required: true,
|
|
19
|
-
description: 'The folder or filename to the channelConfig.'
|
|
20
|
-
}),
|
|
21
|
-
draftName: flags.string({
|
|
22
|
-
description: 'The name of the draft the config will be saved under.',
|
|
23
|
-
required: true
|
|
24
|
-
})
|
|
25
|
-
}
|
|
26
|
-
|
|
27
10
|
class UploadCommand extends Command {
|
|
11
|
+
static description = `Upload a ChannelConfig into a draft for your project`
|
|
12
|
+
static flags = {
|
|
13
|
+
project: sharedFlags.project,
|
|
14
|
+
env: sharedFlags.env,
|
|
15
|
+
token: {...sharedFlags.configWriteToken, required: true},
|
|
16
|
+
host: {...sharedFlags.host, required: true},
|
|
17
|
+
dist: flags.string({
|
|
18
|
+
char: 'd',
|
|
19
|
+
required: true,
|
|
20
|
+
description: 'The folder or filename to the channelConfig.'
|
|
21
|
+
}),
|
|
22
|
+
draftName: flags.string({
|
|
23
|
+
description: 'The name of the draft the config will be saved under.',
|
|
24
|
+
required: true
|
|
25
|
+
})
|
|
26
|
+
}
|
|
28
27
|
|
|
29
28
|
async run () {
|
|
30
29
|
const {token, host, dist} = this.parse(UploadCommand).flags
|
|
@@ -45,6 +44,4 @@ class UploadCommand extends Command {
|
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
46
|
|
|
48
|
-
UploadCommand.description = description
|
|
49
|
-
UploadCommand.flags = commandFlags
|
|
50
47
|
module.exports = UploadCommand
|
|
@@ -5,17 +5,16 @@ const {Command, flags} = require('@oclif/command')
|
|
|
5
5
|
const sharedFlags = require('../../lib/cli/shared_flags')
|
|
6
6
|
const liApi = require('../../lib/api/livingdocs_api')
|
|
7
7
|
|
|
8
|
-
const description = `Upload assets to your project`
|
|
9
|
-
const commandFlags = {
|
|
10
|
-
token: {...sharedFlags.configWriteToken, required: true},
|
|
11
|
-
host: sharedFlags.host,
|
|
12
|
-
assets: flags.string({
|
|
13
|
-
char: 'a',
|
|
14
|
-
description: 'The folder where you asset files are located.'
|
|
15
|
-
})
|
|
16
|
-
}
|
|
17
|
-
|
|
18
8
|
class UploadAssetsCommand extends Command {
|
|
9
|
+
static description = `Upload assets to your project`
|
|
10
|
+
static flags = {
|
|
11
|
+
token: {...sharedFlags.configWriteToken, required: true},
|
|
12
|
+
host: sharedFlags.host,
|
|
13
|
+
assets: flags.string({
|
|
14
|
+
char: 'a',
|
|
15
|
+
description: 'The folder where you asset files are located.'
|
|
16
|
+
})
|
|
17
|
+
}
|
|
19
18
|
|
|
20
19
|
async run () {
|
|
21
20
|
const {token, host, assets} = this.parse(UploadAssetsCommand).flags
|
|
@@ -44,6 +43,4 @@ class UploadAssetsCommand extends Command {
|
|
|
44
43
|
|
|
45
44
|
}
|
|
46
45
|
|
|
47
|
-
UploadAssetsCommand.description = description
|
|
48
|
-
UploadAssetsCommand.flags = commandFlags
|
|
49
46
|
module.exports = UploadAssetsCommand
|