@adobe/aio-cli-plugin-app-storage 1.0.2 → 1.1.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 +166 -1
- package/oclif.manifest.json +20 -25
- package/package.json +6 -3
- package/src/BaseCommand.js +1 -1
- package/src/commands/app/state/delete.js +0 -4
- package/src/commands/app/state/get.js +0 -4
- package/src/commands/app/state/list.js +0 -4
- package/src/commands/app/state/put.js +0 -4
- package/src/commands/app/state/stats.js +0 -4
package/README.md
CHANGED
|
@@ -23,8 +23,173 @@ $ aio app state --help
|
|
|
23
23
|
|
|
24
24
|
# Commands
|
|
25
25
|
<!-- commands -->
|
|
26
|
+
* [`aio app state delete [KEYS]`](#aio-app-state-delete-keys)
|
|
27
|
+
* [`aio app state get KEY`](#aio-app-state-get-key)
|
|
28
|
+
* [`aio app state list`](#aio-app-state-list)
|
|
29
|
+
* [`aio app state put KEY VALUE`](#aio-app-state-put-key-value)
|
|
30
|
+
* [`aio app state stats`](#aio-app-state-stats)
|
|
26
31
|
* [`aio help [COMMAND]`](#aio-help-command)
|
|
27
32
|
|
|
33
|
+
## `aio app state delete [KEYS]`
|
|
34
|
+
|
|
35
|
+
Delete key-values
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
USAGE
|
|
39
|
+
$ aio app state delete [KEYS...] [--json] [--region amer|emea|apac] [--match <value>] [--force]
|
|
40
|
+
|
|
41
|
+
ARGUMENTS
|
|
42
|
+
KEYS... keys to delete. Above 5 keys, you will be prompted for confirmation
|
|
43
|
+
|
|
44
|
+
FLAGS
|
|
45
|
+
--force [use with caution!] force delete, no safety prompt
|
|
46
|
+
--match=<value> [use with caution!] deletes ALL key-values matching the provided glob-like pattern
|
|
47
|
+
--region=<option> State region. Defaults to 'AIO_STATE_REGION' env or 'amer' if neither is set.
|
|
48
|
+
<options: amer|emea|apac>
|
|
49
|
+
|
|
50
|
+
GLOBAL FLAGS
|
|
51
|
+
--json Format output as json.
|
|
52
|
+
|
|
53
|
+
DESCRIPTION
|
|
54
|
+
Delete key-values
|
|
55
|
+
|
|
56
|
+
ALIASES
|
|
57
|
+
$ aio app state del
|
|
58
|
+
$ aio app state remove
|
|
59
|
+
$ aio app state rm
|
|
60
|
+
|
|
61
|
+
EXAMPLES
|
|
62
|
+
$ aio app state delete key
|
|
63
|
+
|
|
64
|
+
$ aio app state delete key1 key2 key3
|
|
65
|
+
|
|
66
|
+
$ aio app state delete --match 'gl*b'
|
|
67
|
+
|
|
68
|
+
$ aio app state delete --match 'gl*b' --json
|
|
69
|
+
|
|
70
|
+
$ aio app state delete --match 'be-carreful*' --force
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## `aio app state get KEY`
|
|
74
|
+
|
|
75
|
+
Get a key-value
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
USAGE
|
|
79
|
+
$ aio app state get KEY [--json] [--region amer|emea|apac]
|
|
80
|
+
|
|
81
|
+
ARGUMENTS
|
|
82
|
+
KEY State key
|
|
83
|
+
|
|
84
|
+
FLAGS
|
|
85
|
+
--region=<option> State region. Defaults to 'AIO_STATE_REGION' env or 'amer' if neither is set.
|
|
86
|
+
<options: amer|emea|apac>
|
|
87
|
+
|
|
88
|
+
GLOBAL FLAGS
|
|
89
|
+
--json Format output as json.
|
|
90
|
+
|
|
91
|
+
DESCRIPTION
|
|
92
|
+
Get a key-value
|
|
93
|
+
|
|
94
|
+
EXAMPLES
|
|
95
|
+
$ aio app state get key
|
|
96
|
+
|
|
97
|
+
$ aio app state get key --json
|
|
98
|
+
|
|
99
|
+
$ aio app state get key | wc -c
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## `aio app state list`
|
|
103
|
+
|
|
104
|
+
List key-values
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
USAGE
|
|
108
|
+
$ aio app state list [--json] [--region amer|emea|apac] [-m <value>]
|
|
109
|
+
|
|
110
|
+
FLAGS
|
|
111
|
+
-m, --match=<value> [default: *] Glob-like pattern to filter keys
|
|
112
|
+
--region=<option> State region. Defaults to 'AIO_STATE_REGION' env or 'amer' if neither is set.
|
|
113
|
+
<options: amer|emea|apac>
|
|
114
|
+
|
|
115
|
+
GLOBAL FLAGS
|
|
116
|
+
--json Format output as json.
|
|
117
|
+
|
|
118
|
+
DESCRIPTION
|
|
119
|
+
List key-values
|
|
120
|
+
|
|
121
|
+
ALIASES
|
|
122
|
+
$ aio app state ls
|
|
123
|
+
|
|
124
|
+
EXAMPLES
|
|
125
|
+
$ aio app state list
|
|
126
|
+
|
|
127
|
+
$ aio app state list --match 'gl*b'
|
|
128
|
+
|
|
129
|
+
$ aio app state list --json
|
|
130
|
+
|
|
131
|
+
$ aio app state list | less
|
|
132
|
+
|
|
133
|
+
$ aio app state list | wc -l
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## `aio app state put KEY VALUE`
|
|
137
|
+
|
|
138
|
+
Put a key-value
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
USAGE
|
|
142
|
+
$ aio app state put KEY VALUE [--json] [--region amer|emea|apac] [-t <value>]
|
|
143
|
+
|
|
144
|
+
ARGUMENTS
|
|
145
|
+
KEY State key
|
|
146
|
+
VALUE State value
|
|
147
|
+
|
|
148
|
+
FLAGS
|
|
149
|
+
-t, --ttl=<value> Time to live in seconds. Default is 86400 (24 hours), max is 31536000 (1 year).
|
|
150
|
+
--region=<option> State region. Defaults to 'AIO_STATE_REGION' env or 'amer' if neither is set.
|
|
151
|
+
<options: amer|emea|apac>
|
|
152
|
+
|
|
153
|
+
GLOBAL FLAGS
|
|
154
|
+
--json Format output as json.
|
|
155
|
+
|
|
156
|
+
DESCRIPTION
|
|
157
|
+
Put a key-value
|
|
158
|
+
|
|
159
|
+
EXAMPLES
|
|
160
|
+
$ aio app state put key value
|
|
161
|
+
|
|
162
|
+
$ aio app state put key value --ttl 3600
|
|
163
|
+
|
|
164
|
+
$ aio app state put key value --json
|
|
165
|
+
|
|
166
|
+
$ cat value/from/file | xargs -0 ./bin/run.js app state put key
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## `aio app state stats`
|
|
170
|
+
|
|
171
|
+
Display stats
|
|
172
|
+
|
|
173
|
+
```
|
|
174
|
+
USAGE
|
|
175
|
+
$ aio app state stats [--json] [--region amer|emea|apac]
|
|
176
|
+
|
|
177
|
+
FLAGS
|
|
178
|
+
--region=<option> State region. Defaults to 'AIO_STATE_REGION' env or 'amer' if neither is set.
|
|
179
|
+
<options: amer|emea|apac>
|
|
180
|
+
|
|
181
|
+
GLOBAL FLAGS
|
|
182
|
+
--json Format output as json.
|
|
183
|
+
|
|
184
|
+
DESCRIPTION
|
|
185
|
+
Display stats
|
|
186
|
+
|
|
187
|
+
EXAMPLES
|
|
188
|
+
$ aio app state stats
|
|
189
|
+
|
|
190
|
+
$ aio app state stats --json
|
|
191
|
+
```
|
|
192
|
+
|
|
28
193
|
## `aio help [COMMAND]`
|
|
29
194
|
|
|
30
195
|
Display help for aio.
|
|
@@ -43,7 +208,7 @@ DESCRIPTION
|
|
|
43
208
|
Display help for aio.
|
|
44
209
|
```
|
|
45
210
|
|
|
46
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.
|
|
211
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.16/src/commands/help.ts)_
|
|
47
212
|
<!-- commandsstop -->
|
|
48
213
|
|
|
49
214
|
## Contributing
|
package/oclif.manifest.json
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"commands": {
|
|
3
3
|
"app:state:delete": {
|
|
4
4
|
"aliases": [
|
|
5
|
-
"app:state:
|
|
5
|
+
"app:state:del",
|
|
6
|
+
"app:state:remove",
|
|
7
|
+
"app:state:rm"
|
|
6
8
|
],
|
|
7
9
|
"args": {
|
|
8
10
|
"keys": {
|
|
@@ -35,7 +37,8 @@
|
|
|
35
37
|
"multiple": false,
|
|
36
38
|
"options": [
|
|
37
39
|
"amer",
|
|
38
|
-
"emea"
|
|
40
|
+
"emea",
|
|
41
|
+
"apac"
|
|
39
42
|
],
|
|
40
43
|
"type": "option"
|
|
41
44
|
},
|
|
@@ -55,11 +58,7 @@
|
|
|
55
58
|
}
|
|
56
59
|
},
|
|
57
60
|
"hasDynamicHelp": false,
|
|
58
|
-
"hiddenAliases": [
|
|
59
|
-
"app:state:del",
|
|
60
|
-
"app:state:remove",
|
|
61
|
-
"app:state:rm"
|
|
62
|
-
],
|
|
61
|
+
"hiddenAliases": [],
|
|
63
62
|
"id": "app:state:delete",
|
|
64
63
|
"pluginAlias": "@adobe/aio-cli-plugin-app-storage",
|
|
65
64
|
"pluginName": "@adobe/aio-cli-plugin-app-storage",
|
|
@@ -76,9 +75,7 @@
|
|
|
76
75
|
]
|
|
77
76
|
},
|
|
78
77
|
"app:state:get": {
|
|
79
|
-
"aliases": [
|
|
80
|
-
"app:state:get"
|
|
81
|
-
],
|
|
78
|
+
"aliases": [],
|
|
82
79
|
"args": {
|
|
83
80
|
"key": {
|
|
84
81
|
"description": "State key",
|
|
@@ -108,7 +105,8 @@
|
|
|
108
105
|
"multiple": false,
|
|
109
106
|
"options": [
|
|
110
107
|
"amer",
|
|
111
|
-
"emea"
|
|
108
|
+
"emea",
|
|
109
|
+
"apac"
|
|
112
110
|
],
|
|
113
111
|
"type": "option"
|
|
114
112
|
}
|
|
@@ -132,7 +130,7 @@
|
|
|
132
130
|
},
|
|
133
131
|
"app:state:list": {
|
|
134
132
|
"aliases": [
|
|
135
|
-
"app:state:
|
|
133
|
+
"app:state:ls"
|
|
136
134
|
],
|
|
137
135
|
"args": {},
|
|
138
136
|
"description": "List key-values",
|
|
@@ -159,7 +157,8 @@
|
|
|
159
157
|
"multiple": false,
|
|
160
158
|
"options": [
|
|
161
159
|
"amer",
|
|
162
|
-
"emea"
|
|
160
|
+
"emea",
|
|
161
|
+
"apac"
|
|
163
162
|
],
|
|
164
163
|
"type": "option"
|
|
165
164
|
},
|
|
@@ -175,9 +174,7 @@
|
|
|
175
174
|
}
|
|
176
175
|
},
|
|
177
176
|
"hasDynamicHelp": false,
|
|
178
|
-
"hiddenAliases": [
|
|
179
|
-
"app:state:ls"
|
|
180
|
-
],
|
|
177
|
+
"hiddenAliases": [],
|
|
181
178
|
"id": "app:state:list",
|
|
182
179
|
"pluginAlias": "@adobe/aio-cli-plugin-app-storage",
|
|
183
180
|
"pluginName": "@adobe/aio-cli-plugin-app-storage",
|
|
@@ -194,9 +191,7 @@
|
|
|
194
191
|
]
|
|
195
192
|
},
|
|
196
193
|
"app:state:put": {
|
|
197
|
-
"aliases": [
|
|
198
|
-
"app:state:put"
|
|
199
|
-
],
|
|
194
|
+
"aliases": [],
|
|
200
195
|
"args": {
|
|
201
196
|
"key": {
|
|
202
197
|
"description": "State key",
|
|
@@ -232,7 +227,8 @@
|
|
|
232
227
|
"multiple": false,
|
|
233
228
|
"options": [
|
|
234
229
|
"amer",
|
|
235
|
-
"emea"
|
|
230
|
+
"emea",
|
|
231
|
+
"apac"
|
|
236
232
|
],
|
|
237
233
|
"type": "option"
|
|
238
234
|
},
|
|
@@ -264,9 +260,7 @@
|
|
|
264
260
|
]
|
|
265
261
|
},
|
|
266
262
|
"app:state:stats": {
|
|
267
|
-
"aliases": [
|
|
268
|
-
"app:state:stats"
|
|
269
|
-
],
|
|
263
|
+
"aliases": [],
|
|
270
264
|
"args": {},
|
|
271
265
|
"description": "Display stats",
|
|
272
266
|
"examples": [
|
|
@@ -289,7 +283,8 @@
|
|
|
289
283
|
"multiple": false,
|
|
290
284
|
"options": [
|
|
291
285
|
"amer",
|
|
292
|
-
"emea"
|
|
286
|
+
"emea",
|
|
287
|
+
"apac"
|
|
293
288
|
],
|
|
294
289
|
"type": "option"
|
|
295
290
|
}
|
|
@@ -312,5 +307,5 @@
|
|
|
312
307
|
]
|
|
313
308
|
}
|
|
314
309
|
},
|
|
315
|
-
"version": "1.0
|
|
310
|
+
"version": "1.1.0"
|
|
316
311
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/aio-cli-plugin-app-storage",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@adobe/aio-lib-core-config": "^5",
|
|
6
6
|
"@adobe/aio-lib-core-logging": "^3",
|
|
@@ -46,7 +46,10 @@
|
|
|
46
46
|
"repositoryPrefix": "<%- repo %>/blob/<%- version %>/<%- commandPath %>",
|
|
47
47
|
"plugins": [
|
|
48
48
|
"@oclif/plugin-help"
|
|
49
|
-
]
|
|
49
|
+
],
|
|
50
|
+
"helpOptions": {
|
|
51
|
+
"hideAliasesFromRoot": true
|
|
52
|
+
}
|
|
50
53
|
},
|
|
51
54
|
"main": "src/commands/BaseCommand.js",
|
|
52
55
|
"scripts": {
|
|
@@ -55,7 +58,7 @@
|
|
|
55
58
|
"test": "npm run unit-test && npm run lint",
|
|
56
59
|
"prepack": "oclif manifest && oclif readme --no-aliases",
|
|
57
60
|
"postpack": "rm -f oclif.manifest.json",
|
|
58
|
-
"version": "oclif readme && git add README.md",
|
|
61
|
+
"version": "oclif readme --no-aliases && git add README.md",
|
|
59
62
|
"e2e": "node --experimental-vm-modules node_modules/jest/bin/jest.js --collectCoverage=false --testRegex 'e2e/e2e.js'"
|
|
60
63
|
},
|
|
61
64
|
"jest": {
|
package/src/BaseCommand.js
CHANGED
|
@@ -109,7 +109,7 @@ BaseCommand.flags = {
|
|
|
109
109
|
region: Flags.string({
|
|
110
110
|
description: 'State region. Defaults to \'AIO_STATE_REGION\' env or \'amer\' if neither is set.',
|
|
111
111
|
required: false,
|
|
112
|
-
options: ['amer', 'emea']
|
|
112
|
+
options: ['amer', 'emea', 'apac']
|
|
113
113
|
})
|
|
114
114
|
}
|
|
115
115
|
|