@twilio-labs/plugin-assets 1.2.4 → 2.0.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 +14 -12
- package/oclif.manifest.json +1 -1
- package/package.json +4 -4
- package/src/commands/assets/init.js +3 -2
package/README.md
CHANGED
|
@@ -10,6 +10,8 @@ The plugin creates a new Runtime Service which it then uses as a bucket to which
|
|
|
10
10
|
|
|
11
11
|
For more information see the blog post [announcing the the Assets Plugin](https://www.twilio.com/blog/assets-plugin-twilio-cli) and an example of [how to upload audio files for your Studio IVR with the Assets Plugin](https://www.twilio.com/blog/upload-audio-files-studio-ivr-twilio-cli-assets-plugin).
|
|
12
12
|
|
|
13
|
+
> **Important**: This version requires Twilio CLI version 3.0 or newer. For Twilio CLI version 2.x you have to use plugin-assets version 1.2.6.
|
|
14
|
+
|
|
13
15
|
<!-- toc -->
|
|
14
16
|
|
|
15
17
|
<!-- tocstop -->
|
|
@@ -53,14 +55,12 @@ USAGE
|
|
|
53
55
|
Create a new assets service to use as a bucket
|
|
54
56
|
|
|
55
57
|
```
|
|
56
|
-
Create a new assets service to use as a bucket
|
|
57
|
-
|
|
58
58
|
USAGE
|
|
59
59
|
$ twilio assets:init
|
|
60
60
|
|
|
61
61
|
OPTIONS
|
|
62
62
|
-l=(debug|info|warn|error|none) [default: info] Level of logging messages.
|
|
63
|
-
-o=(columns|json|tsv)
|
|
63
|
+
-o=(columns|json|tsv|none) [default: columns] Format of command output.
|
|
64
64
|
-p, --profile=profile Shorthand identifier for your profile.
|
|
65
65
|
|
|
66
66
|
--properties=properties [default: service_sid, sid, domain_name] The asset service environment properties you
|
|
@@ -68,38 +68,38 @@ OPTIONS
|
|
|
68
68
|
|
|
69
69
|
--service-name=service-name A unique name for your asset service. May only contain alphanumeric characters and
|
|
70
70
|
hyphens.
|
|
71
|
+
|
|
72
|
+
--silent Suppress output and logs. This is a shorthand for "-l none -o none".
|
|
71
73
|
```
|
|
72
74
|
|
|
73
|
-
_See code: [src/commands/assets/init.js](https://github.com/twilio-labs/serverless-toolkit/blob/
|
|
75
|
+
_See code: [src/commands/assets/init.js](https://github.com/twilio-labs/serverless-toolkit/blob/v2.0.0/src/commands/assets/init.js)_
|
|
74
76
|
|
|
75
77
|
## `twilio assets:list`
|
|
76
78
|
|
|
77
79
|
List all the assets in the service
|
|
78
80
|
|
|
79
81
|
```
|
|
80
|
-
List all the assets in the service
|
|
81
|
-
|
|
82
82
|
USAGE
|
|
83
83
|
$ twilio assets:list
|
|
84
84
|
|
|
85
85
|
OPTIONS
|
|
86
86
|
-l=(debug|info|warn|error|none) [default: info] Level of logging messages.
|
|
87
|
-
-o=(columns|json|tsv)
|
|
87
|
+
-o=(columns|json|tsv|none) [default: columns] Format of command output.
|
|
88
88
|
-p, --profile=profile Shorthand identifier for your profile.
|
|
89
89
|
|
|
90
90
|
--properties=properties [default: sid, path, url, visibility] The asset properties you would like to display
|
|
91
91
|
(JSON output always shows all properties).
|
|
92
|
+
|
|
93
|
+
--silent Suppress output and logs. This is a shorthand for "-l none -o none".
|
|
92
94
|
```
|
|
93
95
|
|
|
94
|
-
_See code: [src/commands/assets/list.js](https://github.com/twilio-labs/serverless-toolkit/blob/
|
|
96
|
+
_See code: [src/commands/assets/list.js](https://github.com/twilio-labs/serverless-toolkit/blob/v2.0.0/src/commands/assets/list.js)_
|
|
95
97
|
|
|
96
98
|
## `twilio assets:upload FILE`
|
|
97
99
|
|
|
98
100
|
Upload a new asset to the Assets service
|
|
99
101
|
|
|
100
102
|
```
|
|
101
|
-
Upload a new asset to the Assets service
|
|
102
|
-
|
|
103
103
|
USAGE
|
|
104
104
|
$ twilio assets:upload FILE
|
|
105
105
|
|
|
@@ -108,16 +108,18 @@ ARGUMENTS
|
|
|
108
108
|
|
|
109
109
|
OPTIONS
|
|
110
110
|
-l=(debug|info|warn|error|none) [default: info] Level of logging messages.
|
|
111
|
-
-o=(columns|json|tsv)
|
|
111
|
+
-o=(columns|json|tsv|none) [default: columns] Format of command output.
|
|
112
112
|
-p, --profile=profile Shorthand identifier for your profile.
|
|
113
113
|
|
|
114
114
|
--properties=properties [default: sid, path, url, visibility] The asset properties you would like to display
|
|
115
115
|
(JSON output always shows all properties).
|
|
116
116
|
|
|
117
117
|
--protected Sets the uploaded asset's visibility to 'protected'
|
|
118
|
+
|
|
119
|
+
--silent Suppress output and logs. This is a shorthand for "-l none -o none".
|
|
118
120
|
```
|
|
119
121
|
|
|
120
|
-
_See code: [src/commands/assets/upload.js](https://github.com/twilio-labs/serverless-toolkit/blob/
|
|
122
|
+
_See code: [src/commands/assets/upload.js](https://github.com/twilio-labs/serverless-toolkit/blob/v2.0.0/src/commands/assets/upload.js)_
|
|
121
123
|
<!-- commandsstop -->
|
|
122
124
|
|
|
123
125
|
## Contributing
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"2.0.0","commands":{"assets:init":{"id":"assets:init","description":"Create a new assets service to use as a bucket","pluginName":"@twilio-labs/plugin-assets","pluginType":"core","aliases":[],"flags":{"service-name":{"name":"service-name","type":"option","description":"A unique name for your asset service. May only contain alphanumeric characters and hyphens."},"properties":{"name":"properties","type":"option","description":"The asset service environment properties you would like to display (JSON output always shows all properties).","default":"service_sid, sid, domain_name"},"profile":{"name":"profile","type":"option","char":"p","description":"Shorthand identifier for your profile."},"cli-log-level":{"name":"cli-log-level","type":"option","char":"l","description":"Level of logging messages.","helpLabel":"-l","helpValue":"(debug|info|warn|error|none)","options":["debug","info","warn","error","none"],"default":"info"},"cli-output-format":{"name":"cli-output-format","type":"option","char":"o","description":"Format of command output.","helpLabel":"-o","helpValue":"(columns|json|tsv|none)","options":["columns","json","tsv","none"],"default":"columns"},"silent":{"name":"silent","type":"boolean","description":"Suppress output and logs. This is a shorthand for \"-l none -o none\".","allowNo":false}},"args":[]},"assets:list":{"id":"assets:list","description":"List all the assets in the service","pluginName":"@twilio-labs/plugin-assets","pluginType":"core","aliases":[],"flags":{"properties":{"name":"properties","type":"option","description":"The asset properties you would like to display (JSON output always shows all properties).","default":"sid, path, url, visibility"},"profile":{"name":"profile","type":"option","char":"p","description":"Shorthand identifier for your profile."},"cli-log-level":{"name":"cli-log-level","type":"option","char":"l","description":"Level of logging messages.","helpLabel":"-l","helpValue":"(debug|info|warn|error|none)","options":["debug","info","warn","error","none"],"default":"info"},"cli-output-format":{"name":"cli-output-format","type":"option","char":"o","description":"Format of command output.","helpLabel":"-o","helpValue":"(columns|json|tsv|none)","options":["columns","json","tsv","none"],"default":"columns"},"silent":{"name":"silent","type":"boolean","description":"Suppress output and logs. This is a shorthand for \"-l none -o none\".","allowNo":false}},"args":[]},"assets:upload":{"id":"assets:upload","description":"Upload a new asset to the Assets service","pluginName":"@twilio-labs/plugin-assets","pluginType":"core","aliases":[],"flags":{"protected":{"name":"protected","type":"boolean","description":"Sets the uploaded asset's visibility to 'protected'","allowNo":false},"properties":{"name":"properties","type":"option","description":"The asset properties you would like to display (JSON output always shows all properties).","default":"sid, path, url, visibility"},"profile":{"name":"profile","type":"option","char":"p","description":"Shorthand identifier for your profile."},"cli-log-level":{"name":"cli-log-level","type":"option","char":"l","description":"Level of logging messages.","helpLabel":"-l","helpValue":"(debug|info|warn|error|none)","options":["debug","info","warn","error","none"],"default":"info"},"cli-output-format":{"name":"cli-output-format","type":"option","char":"o","description":"Format of command output.","helpLabel":"-o","helpValue":"(columns|json|tsv|none)","options":["columns","json","tsv","none"],"default":"columns"},"silent":{"name":"silent","type":"boolean","description":"Suppress output and logs. This is a shorthand for \"-l none -o none\".","allowNo":false}},"args":[{"name":"file","description":"The path to the file you want to upload","required":true}]}}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twilio-labs/plugin-assets",
|
|
3
3
|
"description": "Easily upload assets to a Twilio Assets service",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0",
|
|
5
5
|
"author": "Twilio Inc. <open-source@twilio.com> (https://www.twilio.com/labs)",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Phil Nash <philnash@twilio.com>"
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@oclif/command": "^1.5.19",
|
|
11
11
|
"@oclif/config": "^1.13.3",
|
|
12
|
-
"@twilio-labs/serverless-api": "^5.
|
|
13
|
-
"@twilio/cli-core": "^
|
|
12
|
+
"@twilio-labs/serverless-api": "^5.4.1",
|
|
13
|
+
"@twilio/cli-core": "^6.0.0",
|
|
14
14
|
"inquirer": "^8.0.0",
|
|
15
15
|
"ora": "^5.4.0",
|
|
16
16
|
"project-name-generator": "^2.1.9"
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"version": "oclif-dev readme && git add README.md",
|
|
80
80
|
"test": "jest"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "33ca348aa7886cdf58255900077b156f00461433"
|
|
83
83
|
}
|
|
@@ -16,8 +16,9 @@ class InitCommand extends TwilioClientCommand {
|
|
|
16
16
|
accountSid: this.currentProfile.accountSid,
|
|
17
17
|
pluginConfig: pluginConfig,
|
|
18
18
|
logger: this.logger,
|
|
19
|
-
serviceName:
|
|
20
|
-
this.flags['service-name']
|
|
19
|
+
serviceName: (
|
|
20
|
+
this.flags['service-name'] || generateProjectName().dashed
|
|
21
|
+
).trim(),
|
|
21
22
|
});
|
|
22
23
|
this.output(result, this.flags.properties);
|
|
23
24
|
} catch (error) {
|