@adobe/aio-cli-plugin-app-storage 1.0.3 → 1.2.0-pre.2025-11-18.sha-9c4079ac

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.
Files changed (36) hide show
  1. package/README.md +676 -12
  2. package/package.json +33 -6
  3. package/src/BaseCommand.js +11 -58
  4. package/src/DBBaseCommand.js +112 -0
  5. package/src/StateBaseCommand.js +87 -0
  6. package/src/commands/app/add/db.js +20 -0
  7. package/src/commands/app/db/collection/create.js +119 -0
  8. package/src/commands/app/db/collection/drop.js +90 -0
  9. package/src/commands/app/db/collection/list.js +100 -0
  10. package/src/commands/app/db/collection/rename.js +98 -0
  11. package/src/commands/app/db/collection/stats.js +94 -0
  12. package/src/commands/app/db/delete.js +89 -0
  13. package/src/commands/app/db/document/count.js +96 -0
  14. package/src/commands/app/db/document/delete.js +95 -0
  15. package/src/commands/app/db/document/find.js +133 -0
  16. package/src/commands/app/db/document/insert.js +147 -0
  17. package/src/commands/app/db/document/replace.js +122 -0
  18. package/src/commands/app/db/document/update.js +144 -0
  19. package/src/commands/app/db/index/create.js +170 -0
  20. package/src/commands/app/db/index/drop.js +87 -0
  21. package/src/commands/app/db/index/list.js +82 -0
  22. package/src/commands/app/db/ping.js +77 -0
  23. package/src/commands/app/db/provision.js +190 -0
  24. package/src/commands/app/db/stats.js +87 -0
  25. package/src/commands/app/db/status.js +159 -0
  26. package/src/commands/app/state/delete.js +3 -3
  27. package/src/commands/app/state/get.js +2 -2
  28. package/src/commands/app/state/list.js +3 -3
  29. package/src/commands/app/state/put.js +4 -4
  30. package/src/commands/app/state/stats.js +2 -2
  31. package/src/constants/db.js +32 -0
  32. package/src/constants/global.js +14 -0
  33. package/src/{constants.js → constants/state.js} +3 -0
  34. package/src/utils/inputValidation.js +74 -0
  35. package/src/utils/output.js +35 -0
  36. package/oclif.manifest.json +0 -306
@@ -1,306 +0,0 @@
1
- {
2
- "commands": {
3
- "app:state:delete": {
4
- "aliases": [
5
- "app:state:del",
6
- "app:state:remove",
7
- "app:state:rm"
8
- ],
9
- "args": {
10
- "keys": {
11
- "description": "keys to delete. Above 5 keys, you will be prompted for confirmation",
12
- "name": "keys",
13
- "required": false
14
- }
15
- },
16
- "description": "Delete key-values",
17
- "examples": [
18
- "$ aio app state delete key",
19
- "$ aio app state delete key1 key2 key3",
20
- "$ aio app state delete --match 'gl*b'",
21
- "$ aio app state delete --match 'gl*b' --json",
22
- "$ aio app state delete --match 'be-carreful*' --force"
23
- ],
24
- "flags": {
25
- "json": {
26
- "description": "Format output as json.",
27
- "helpGroup": "GLOBAL",
28
- "name": "json",
29
- "allowNo": false,
30
- "type": "boolean"
31
- },
32
- "region": {
33
- "description": "State region. Defaults to 'AIO_STATE_REGION' env or 'amer' if neither is set.",
34
- "name": "region",
35
- "required": false,
36
- "hasDynamicHelp": false,
37
- "multiple": false,
38
- "options": [
39
- "amer",
40
- "emea"
41
- ],
42
- "type": "option"
43
- },
44
- "match": {
45
- "description": "[use with caution!] deletes ALL key-values matching the provided glob-like pattern",
46
- "name": "match",
47
- "required": false,
48
- "hasDynamicHelp": false,
49
- "multiple": false,
50
- "type": "option"
51
- },
52
- "force": {
53
- "description": "[use with caution!] force delete, no safety prompt",
54
- "name": "force",
55
- "allowNo": false,
56
- "type": "boolean"
57
- }
58
- },
59
- "hasDynamicHelp": false,
60
- "hiddenAliases": [],
61
- "id": "app:state:delete",
62
- "pluginAlias": "@adobe/aio-cli-plugin-app-storage",
63
- "pluginName": "@adobe/aio-cli-plugin-app-storage",
64
- "pluginType": "core",
65
- "strict": false,
66
- "enableJsonFlag": true,
67
- "isESM": true,
68
- "relativePath": [
69
- "src",
70
- "commands",
71
- "app",
72
- "state",
73
- "delete.js"
74
- ]
75
- },
76
- "app:state:get": {
77
- "aliases": [],
78
- "args": {
79
- "key": {
80
- "description": "State key",
81
- "name": "key",
82
- "required": true
83
- }
84
- },
85
- "description": "Get a key-value",
86
- "examples": [
87
- "$ aio app state get key",
88
- "$ aio app state get key --json",
89
- "$ aio app state get key | wc -c"
90
- ],
91
- "flags": {
92
- "json": {
93
- "description": "Format output as json.",
94
- "helpGroup": "GLOBAL",
95
- "name": "json",
96
- "allowNo": false,
97
- "type": "boolean"
98
- },
99
- "region": {
100
- "description": "State region. Defaults to 'AIO_STATE_REGION' env or 'amer' if neither is set.",
101
- "name": "region",
102
- "required": false,
103
- "hasDynamicHelp": false,
104
- "multiple": false,
105
- "options": [
106
- "amer",
107
- "emea"
108
- ],
109
- "type": "option"
110
- }
111
- },
112
- "hasDynamicHelp": false,
113
- "hiddenAliases": [],
114
- "id": "app:state:get",
115
- "pluginAlias": "@adobe/aio-cli-plugin-app-storage",
116
- "pluginName": "@adobe/aio-cli-plugin-app-storage",
117
- "pluginType": "core",
118
- "strict": true,
119
- "enableJsonFlag": true,
120
- "isESM": true,
121
- "relativePath": [
122
- "src",
123
- "commands",
124
- "app",
125
- "state",
126
- "get.js"
127
- ]
128
- },
129
- "app:state:list": {
130
- "aliases": [
131
- "app:state:ls"
132
- ],
133
- "args": {},
134
- "description": "List key-values",
135
- "examples": [
136
- "$ aio app state list",
137
- "$ aio app state list --match 'gl*b'",
138
- "$ aio app state list --json",
139
- "$ aio app state list | less",
140
- "$ aio app state list | wc -l"
141
- ],
142
- "flags": {
143
- "json": {
144
- "description": "Format output as json.",
145
- "helpGroup": "GLOBAL",
146
- "name": "json",
147
- "allowNo": false,
148
- "type": "boolean"
149
- },
150
- "region": {
151
- "description": "State region. Defaults to 'AIO_STATE_REGION' env or 'amer' if neither is set.",
152
- "name": "region",
153
- "required": false,
154
- "hasDynamicHelp": false,
155
- "multiple": false,
156
- "options": [
157
- "amer",
158
- "emea"
159
- ],
160
- "type": "option"
161
- },
162
- "match": {
163
- "char": "m",
164
- "description": "Glob-like pattern to filter keys",
165
- "name": "match",
166
- "required": false,
167
- "default": "*",
168
- "hasDynamicHelp": false,
169
- "multiple": false,
170
- "type": "option"
171
- }
172
- },
173
- "hasDynamicHelp": false,
174
- "hiddenAliases": [],
175
- "id": "app:state:list",
176
- "pluginAlias": "@adobe/aio-cli-plugin-app-storage",
177
- "pluginName": "@adobe/aio-cli-plugin-app-storage",
178
- "pluginType": "core",
179
- "strict": true,
180
- "enableJsonFlag": true,
181
- "isESM": true,
182
- "relativePath": [
183
- "src",
184
- "commands",
185
- "app",
186
- "state",
187
- "list.js"
188
- ]
189
- },
190
- "app:state:put": {
191
- "aliases": [],
192
- "args": {
193
- "key": {
194
- "description": "State key",
195
- "name": "key",
196
- "required": true
197
- },
198
- "value": {
199
- "description": "State value",
200
- "name": "value",
201
- "required": true
202
- }
203
- },
204
- "description": "Put a key-value",
205
- "examples": [
206
- "$ aio app state put key value",
207
- "$ aio app state put key value --ttl 3600",
208
- "$ aio app state put key value --json",
209
- "$ cat value/from/file | xargs -0 ./bin/run.js app state put key"
210
- ],
211
- "flags": {
212
- "json": {
213
- "description": "Format output as json.",
214
- "helpGroup": "GLOBAL",
215
- "name": "json",
216
- "allowNo": false,
217
- "type": "boolean"
218
- },
219
- "region": {
220
- "description": "State region. Defaults to 'AIO_STATE_REGION' env or 'amer' if neither is set.",
221
- "name": "region",
222
- "required": false,
223
- "hasDynamicHelp": false,
224
- "multiple": false,
225
- "options": [
226
- "amer",
227
- "emea"
228
- ],
229
- "type": "option"
230
- },
231
- "ttl": {
232
- "char": "t",
233
- "description": "Time to live in seconds. Default is 86400 (24 hours), max is 31536000 (1 year).",
234
- "name": "ttl",
235
- "required": false,
236
- "hasDynamicHelp": false,
237
- "multiple": false,
238
- "type": "option"
239
- }
240
- },
241
- "hasDynamicHelp": false,
242
- "hiddenAliases": [],
243
- "id": "app:state:put",
244
- "pluginAlias": "@adobe/aio-cli-plugin-app-storage",
245
- "pluginName": "@adobe/aio-cli-plugin-app-storage",
246
- "pluginType": "core",
247
- "strict": true,
248
- "enableJsonFlag": true,
249
- "isESM": true,
250
- "relativePath": [
251
- "src",
252
- "commands",
253
- "app",
254
- "state",
255
- "put.js"
256
- ]
257
- },
258
- "app:state:stats": {
259
- "aliases": [],
260
- "args": {},
261
- "description": "Display stats",
262
- "examples": [
263
- "$ aio app state stats",
264
- "$ aio app state stats --json"
265
- ],
266
- "flags": {
267
- "json": {
268
- "description": "Format output as json.",
269
- "helpGroup": "GLOBAL",
270
- "name": "json",
271
- "allowNo": false,
272
- "type": "boolean"
273
- },
274
- "region": {
275
- "description": "State region. Defaults to 'AIO_STATE_REGION' env or 'amer' if neither is set.",
276
- "name": "region",
277
- "required": false,
278
- "hasDynamicHelp": false,
279
- "multiple": false,
280
- "options": [
281
- "amer",
282
- "emea"
283
- ],
284
- "type": "option"
285
- }
286
- },
287
- "hasDynamicHelp": false,
288
- "hiddenAliases": [],
289
- "id": "app:state:stats",
290
- "pluginAlias": "@adobe/aio-cli-plugin-app-storage",
291
- "pluginName": "@adobe/aio-cli-plugin-app-storage",
292
- "pluginType": "core",
293
- "strict": true,
294
- "enableJsonFlag": true,
295
- "isESM": true,
296
- "relativePath": [
297
- "src",
298
- "commands",
299
- "app",
300
- "state",
301
- "stats.js"
302
- ]
303
- }
304
- },
305
- "version": "1.0.3"
306
- }