@twilio-labs/plugin-assets 2.0.3 → 2.0.5
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 +28 -24
- package/oclif.manifest.json +1 -1
- package/package.json +11 -11
- package/src/commands/assets/init.js +3 -3
- package/src/commands/assets/list.js +2 -2
- package/src/commands/assets/upload.js +3 -3
- package/src/index.js +2 -0
package/README.md
CHANGED
|
@@ -56,23 +56,24 @@ Create a new assets service to use as a bucket
|
|
|
56
56
|
|
|
57
57
|
```
|
|
58
58
|
USAGE
|
|
59
|
-
$ twilio assets:init
|
|
59
|
+
$ twilio assets:init [-l debug|info|warn|error|none] [-o columns|json|tsv|none] [--silent] [-p <value>]
|
|
60
|
+
[--service-name <value>] [--properties <value>]
|
|
60
61
|
|
|
61
|
-
|
|
62
|
+
FLAGS
|
|
62
63
|
-l=(debug|info|warn|error|none) [default: info] Level of logging messages.
|
|
63
64
|
-o=(columns|json|tsv|none) [default: columns] Format of command output.
|
|
64
|
-
-p, --profile
|
|
65
|
-
|
|
66
|
-
--properties=properties [default: service_sid, sid, domain_name] The asset service environment properties you
|
|
65
|
+
-p, --profile=<value> Shorthand identifier for your profile.
|
|
66
|
+
--properties=<value> [default: service_sid, sid, domain_name] The asset service environment properties you
|
|
67
67
|
would like to display (JSON output always shows all properties).
|
|
68
|
-
|
|
69
|
-
--service-name=service-name A unique name for your asset service. May only contain alphanumeric characters and
|
|
68
|
+
--service-name=<value> A unique name for your asset service. May only contain alphanumeric characters and
|
|
70
69
|
hyphens.
|
|
71
|
-
|
|
72
70
|
--silent Suppress output and logs. This is a shorthand for "-l none -o none".
|
|
71
|
+
|
|
72
|
+
DESCRIPTION
|
|
73
|
+
Create a new assets service to use as a bucket
|
|
73
74
|
```
|
|
74
75
|
|
|
75
|
-
_See code: [src/commands/assets/init.js](https://github.com/twilio-labs/serverless-toolkit/blob/v2.0.
|
|
76
|
+
_See code: [src/commands/assets/init.js](https://github.com/twilio-labs/serverless-toolkit/blob/v2.0.5/src/commands/assets/init.js)_
|
|
76
77
|
|
|
77
78
|
## `twilio assets:list`
|
|
78
79
|
|
|
@@ -80,20 +81,22 @@ List all the assets in the service
|
|
|
80
81
|
|
|
81
82
|
```
|
|
82
83
|
USAGE
|
|
83
|
-
$ twilio assets:list
|
|
84
|
+
$ twilio assets:list [-l debug|info|warn|error|none] [-o columns|json|tsv|none] [--silent] [-p <value>]
|
|
85
|
+
[--properties <value>]
|
|
84
86
|
|
|
85
|
-
|
|
87
|
+
FLAGS
|
|
86
88
|
-l=(debug|info|warn|error|none) [default: info] Level of logging messages.
|
|
87
89
|
-o=(columns|json|tsv|none) [default: columns] Format of command output.
|
|
88
|
-
-p, --profile
|
|
89
|
-
|
|
90
|
-
--properties=properties [default: sid, path, url, visibility] The asset properties you would like to display
|
|
90
|
+
-p, --profile=<value> Shorthand identifier for your profile.
|
|
91
|
+
--properties=<value> [default: sid, path, url, visibility] The asset properties you would like to display
|
|
91
92
|
(JSON output always shows all properties).
|
|
92
|
-
|
|
93
93
|
--silent Suppress output and logs. This is a shorthand for "-l none -o none".
|
|
94
|
+
|
|
95
|
+
DESCRIPTION
|
|
96
|
+
List all the assets in the service
|
|
94
97
|
```
|
|
95
98
|
|
|
96
|
-
_See code: [src/commands/assets/list.js](https://github.com/twilio-labs/serverless-toolkit/blob/v2.0.
|
|
99
|
+
_See code: [src/commands/assets/list.js](https://github.com/twilio-labs/serverless-toolkit/blob/v2.0.5/src/commands/assets/list.js)_
|
|
97
100
|
|
|
98
101
|
## `twilio assets:upload FILE`
|
|
99
102
|
|
|
@@ -101,25 +104,26 @@ Upload a new asset to the Assets service
|
|
|
101
104
|
|
|
102
105
|
```
|
|
103
106
|
USAGE
|
|
104
|
-
$ twilio assets:upload FILE
|
|
107
|
+
$ twilio assets:upload [FILE] [-l debug|info|warn|error|none] [-o columns|json|tsv|none] [--silent] [-p <value>]
|
|
108
|
+
[--protected] [--properties <value>]
|
|
105
109
|
|
|
106
110
|
ARGUMENTS
|
|
107
111
|
FILE The path to the file you want to upload
|
|
108
112
|
|
|
109
|
-
|
|
113
|
+
FLAGS
|
|
110
114
|
-l=(debug|info|warn|error|none) [default: info] Level of logging messages.
|
|
111
115
|
-o=(columns|json|tsv|none) [default: columns] Format of command output.
|
|
112
|
-
-p, --profile
|
|
113
|
-
|
|
114
|
-
--properties=properties [default: sid, path, url, visibility] The asset properties you would like to display
|
|
116
|
+
-p, --profile=<value> Shorthand identifier for your profile.
|
|
117
|
+
--properties=<value> [default: sid, path, url, visibility] The asset properties you would like to display
|
|
115
118
|
(JSON output always shows all properties).
|
|
116
|
-
|
|
117
119
|
--protected Sets the uploaded asset's visibility to 'protected'
|
|
118
|
-
|
|
119
120
|
--silent Suppress output and logs. This is a shorthand for "-l none -o none".
|
|
121
|
+
|
|
122
|
+
DESCRIPTION
|
|
123
|
+
Upload a new asset to the Assets service
|
|
120
124
|
```
|
|
121
125
|
|
|
122
|
-
_See code: [src/commands/assets/upload.js](https://github.com/twilio-labs/serverless-toolkit/blob/v2.0.
|
|
126
|
+
_See code: [src/commands/assets/upload.js](https://github.com/twilio-labs/serverless-toolkit/blob/v2.0.5/src/commands/assets/upload.js)_
|
|
123
127
|
<!-- commandsstop -->
|
|
124
128
|
|
|
125
129
|
## Contributing
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"2.0.
|
|
1
|
+
{"version":"2.0.5","commands":{"assets:init":{"id":"assets:init","description":"Create a new assets service to use as a bucket","strict":true,"pluginName":"@twilio-labs/plugin-assets","pluginAlias":"@twilio-labs/plugin-assets","pluginType":"core","aliases":[],"flags":{"cli-log-level":{"name":"cli-log-level","type":"option","char":"l","description":"Level of logging messages.","helpLabel":"-l","helpValue":"(debug|info|warn|error|none)","multiple":false,"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)","multiple":false,"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},"profile":{"name":"profile","type":"option","char":"p","description":"Shorthand identifier for your profile.","multiple":false},"service-name":{"name":"service-name","type":"option","description":"A unique name for your asset service. May only contain alphanumeric characters and hyphens.","multiple":false},"properties":{"name":"properties","type":"option","description":"The asset service environment properties you would like to display (JSON output always shows all properties).","multiple":false,"default":"service_sid, sid, domain_name"}},"args":[]},"assets:list":{"id":"assets:list","description":"List all the assets in the service","strict":true,"pluginName":"@twilio-labs/plugin-assets","pluginAlias":"@twilio-labs/plugin-assets","pluginType":"core","aliases":[],"flags":{"cli-log-level":{"name":"cli-log-level","type":"option","char":"l","description":"Level of logging messages.","helpLabel":"-l","helpValue":"(debug|info|warn|error|none)","multiple":false,"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)","multiple":false,"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},"profile":{"name":"profile","type":"option","char":"p","description":"Shorthand identifier for your profile.","multiple":false},"properties":{"name":"properties","type":"option","description":"The asset properties you would like to display (JSON output always shows all properties).","multiple":false,"default":"sid, path, url, visibility"}},"args":[]},"assets:upload":{"id":"assets:upload","description":"Upload a new asset to the Assets service","strict":true,"pluginName":"@twilio-labs/plugin-assets","pluginAlias":"@twilio-labs/plugin-assets","pluginType":"core","aliases":[],"flags":{"cli-log-level":{"name":"cli-log-level","type":"option","char":"l","description":"Level of logging messages.","helpLabel":"-l","helpValue":"(debug|info|warn|error|none)","multiple":false,"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)","multiple":false,"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},"profile":{"name":"profile","type":"option","char":"p","description":"Shorthand identifier for your profile.","multiple":false},"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).","multiple":false,"default":"sid, path, url, visibility"}},"args":[{"name":"file","description":"The path to the file you want to upload","required":true}]}}}
|
package/package.json
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twilio-labs/plugin-assets",
|
|
3
3
|
"description": "Easily upload assets to a Twilio Assets service",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.5",
|
|
5
5
|
"author": "Twilio Inc. <open-source@twilio.com> (https://www.twilio.com/labs)",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Phil Nash <philnash@twilio.com>"
|
|
8
8
|
],
|
|
9
|
+
"main": "src/index.js",
|
|
9
10
|
"dependencies": {
|
|
10
|
-
"@oclif/
|
|
11
|
-
"@
|
|
12
|
-
"@twilio
|
|
13
|
-
"@twilio/cli-core": "^6.0.0",
|
|
11
|
+
"@oclif/core": "^1.14.2",
|
|
12
|
+
"@twilio-labs/serverless-api": "^5.5.0",
|
|
13
|
+
"@twilio/cli-core": "^7.0.0",
|
|
14
14
|
"inquirer": "^8.0.0",
|
|
15
15
|
"ora": "^5.4.0",
|
|
16
16
|
"project-name-generator": "^2.1.9"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@oclif/
|
|
20
|
-
"@oclif/plugin-help": "^2.2.1",
|
|
19
|
+
"@oclif/plugin-help": "^5.1.12",
|
|
21
20
|
"@oclif/test": "^1.2.5",
|
|
22
21
|
"@twilio/cli-test": "^2.1.1",
|
|
23
22
|
"jest": "^26.6.3",
|
|
23
|
+
"oclif": "^3",
|
|
24
24
|
"rimraf": "^3.0.2"
|
|
25
25
|
},
|
|
26
26
|
"engines": {
|
|
27
|
-
"node": ">=
|
|
27
|
+
"node": ">=14"
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
30
|
"/oclif.manifest.json",
|
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
},
|
|
76
76
|
"scripts": {
|
|
77
77
|
"postpack": "rm -f oclif.manifest.json",
|
|
78
|
-
"prepack": "oclif
|
|
79
|
-
"version": "oclif
|
|
78
|
+
"prepack": "oclif manifest && oclif readme",
|
|
79
|
+
"version": "oclif readme && git add README.md",
|
|
80
80
|
"test": "jest"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "12a1f7ee4b24a42ad7b665a3d169f67dc8f43092"
|
|
83
83
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const {
|
|
1
|
+
const { Flags } = require('@oclif/core');
|
|
2
2
|
const { TwilioClientCommand } = require('@twilio/cli-core').baseCommands;
|
|
3
3
|
const { getPluginConfig } = require('../../pluginConfig');
|
|
4
4
|
const generateProjectName = require('project-name-generator');
|
|
@@ -28,11 +28,11 @@ class InitCommand extends TwilioClientCommand {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
InitCommand.flags = {
|
|
31
|
-
'service-name':
|
|
31
|
+
'service-name': Flags.string({
|
|
32
32
|
description:
|
|
33
33
|
'A unique name for your asset service. May only contain alphanumeric characters and hyphens.',
|
|
34
34
|
}),
|
|
35
|
-
properties:
|
|
35
|
+
properties: Flags.string({
|
|
36
36
|
default: 'service_sid, sid, domain_name',
|
|
37
37
|
description:
|
|
38
38
|
'The asset service environment properties you would like to display (JSON output always shows all properties).',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const {
|
|
1
|
+
const { Flags } = require('@oclif/core');
|
|
2
2
|
const { TwilioClientCommand } = require('@twilio/cli-core').baseCommands;
|
|
3
3
|
const { getPluginConfig } = require('../../pluginConfig');
|
|
4
4
|
const { list } = require('../../list');
|
|
@@ -25,7 +25,7 @@ class ListCommand extends TwilioClientCommand {
|
|
|
25
25
|
ListCommand.description = 'List all the assets in the service';
|
|
26
26
|
|
|
27
27
|
ListCommand.flags = {
|
|
28
|
-
properties:
|
|
28
|
+
properties: Flags.string({
|
|
29
29
|
default: 'sid, path, url, visibility',
|
|
30
30
|
description:
|
|
31
31
|
'The asset properties you would like to display (JSON output always shows all properties).',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const {
|
|
1
|
+
const { Flags } = require('@oclif/core');
|
|
2
2
|
const { TwilioClientCommand } = require('@twilio/cli-core').baseCommands;
|
|
3
3
|
const { getPluginConfig } = require('../../pluginConfig');
|
|
4
4
|
const { upload } = require('../../upload');
|
|
@@ -37,11 +37,11 @@ UploadCommand.args = [
|
|
|
37
37
|
];
|
|
38
38
|
|
|
39
39
|
UploadCommand.flags = {
|
|
40
|
-
protected:
|
|
40
|
+
protected: Flags.boolean({
|
|
41
41
|
default: false,
|
|
42
42
|
description: "Sets the uploaded asset's visibility to 'protected'",
|
|
43
43
|
}),
|
|
44
|
-
properties:
|
|
44
|
+
properties: Flags.string({
|
|
45
45
|
default: 'sid, path, url, visibility',
|
|
46
46
|
description:
|
|
47
47
|
'The asset properties you would like to display (JSON output always shows all properties).',
|
package/src/index.js
ADDED