@swell/cli 1.0.2 → 2.0.1-alpha.2

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 (105) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +2 -140
  3. package/bin/dev.cmd +3 -0
  4. package/bin/dev.js +7 -0
  5. package/bin/run.cmd +3 -0
  6. package/bin/run.js +7 -0
  7. package/dist/app-command.d.ts +22 -0
  8. package/dist/app-command.js +45 -0
  9. package/dist/commands/app/_pull.d.ts +8 -0
  10. package/dist/commands/app/_pull.js +45 -0
  11. package/dist/commands/app/_uninstall.d.ts +12 -0
  12. package/dist/commands/app/_uninstall.js +45 -0
  13. package/dist/commands/app/info.d.ts +15 -0
  14. package/dist/commands/app/info.js +92 -0
  15. package/dist/commands/app/install.d.ts +17 -0
  16. package/dist/commands/app/install.js +177 -0
  17. package/dist/commands/app/push.d.ts +17 -0
  18. package/dist/commands/app/push.js +158 -0
  19. package/dist/commands/app/version.d.ts +18 -0
  20. package/dist/commands/app/version.js +156 -0
  21. package/dist/commands/app/watch.d.ts +15 -0
  22. package/dist/commands/app/watch.js +110 -0
  23. package/dist/commands/create/app.d.ts +21 -0
  24. package/dist/commands/create/app.js +210 -0
  25. package/dist/commands/create/content.d.ts +19 -0
  26. package/dist/commands/create/content.js +87 -0
  27. package/dist/commands/create/function.d.ts +25 -0
  28. package/dist/commands/create/function.js +191 -0
  29. package/dist/commands/create/index.d.ts +6 -0
  30. package/dist/commands/create/index.js +34 -0
  31. package/dist/commands/create/model.d.ts +19 -0
  32. package/dist/commands/create/model.js +87 -0
  33. package/dist/commands/create/notification.d.ts +25 -0
  34. package/dist/commands/create/notification.js +170 -0
  35. package/dist/commands/login.d.ts +22 -0
  36. package/dist/commands/login.js +77 -0
  37. package/dist/commands/logout.d.ts +8 -0
  38. package/dist/commands/logout.js +45 -0
  39. package/dist/commands/logs.d.ts +23 -0
  40. package/dist/commands/logs.js +207 -0
  41. package/dist/commands/switch.d.ts +10 -0
  42. package/dist/commands/switch.js +41 -0
  43. package/dist/commands/whoami.d.ts +7 -0
  44. package/dist/commands/whoami.js +24 -0
  45. package/dist/create-collection-command.d.ts +26 -0
  46. package/dist/create-collection-command.js +97 -0
  47. package/dist/create-command.d.ts +16 -0
  48. package/dist/create-command.js +59 -0
  49. package/dist/index.d.ts +1 -0
  50. package/dist/index.js +1 -0
  51. package/dist/lib/api.d.ts +13 -0
  52. package/dist/lib/api.js +117 -0
  53. package/dist/lib/app-config.d.ts +29 -0
  54. package/dist/lib/app-config.js +127 -0
  55. package/dist/lib/apps/app-config.d.ts +42 -0
  56. package/dist/lib/apps/app-config.js +167 -0
  57. package/dist/lib/apps/index.d.ts +67 -0
  58. package/dist/lib/apps/index.js +167 -0
  59. package/dist/lib/apps/paths.d.ts +18 -0
  60. package/dist/lib/apps/paths.js +54 -0
  61. package/dist/lib/bundle.d.ts +1 -0
  62. package/dist/lib/bundle.js +40 -0
  63. package/dist/lib/config.d.ts +37 -0
  64. package/dist/lib/config.js +131 -0
  65. package/dist/lib/constants.d.ts +5 -0
  66. package/dist/lib/constants.js +17 -0
  67. package/dist/lib/create/content.d.ts +23 -0
  68. package/dist/lib/create/content.js +40 -0
  69. package/dist/lib/create/function.d.ts +17 -0
  70. package/dist/lib/create/function.js +36 -0
  71. package/dist/lib/create/index.d.ts +13 -0
  72. package/dist/lib/create/index.js +20 -0
  73. package/dist/lib/create/model.d.ts +22 -0
  74. package/dist/lib/create/model.js +30 -0
  75. package/dist/lib/create/notification.d.ts +25 -0
  76. package/dist/lib/create/notification.js +1 -0
  77. package/dist/lib/info.d.ts +38 -0
  78. package/dist/lib/info.js +91 -0
  79. package/dist/lib/logs/index.d.ts +23 -0
  80. package/dist/lib/logs/index.js +88 -0
  81. package/dist/lib/logs/line-output.d.ts +5 -0
  82. package/dist/lib/logs/line-output.js +13 -0
  83. package/dist/lib/logs/output.d.ts +7 -0
  84. package/dist/lib/logs/output.js +8 -0
  85. package/dist/lib/logs/table-output.d.ts +11 -0
  86. package/dist/lib/logs/table-output.js +128 -0
  87. package/dist/lib/sessions.d.ts +9 -0
  88. package/dist/lib/sessions.js +110 -0
  89. package/dist/lib/stores.d.ts +63 -0
  90. package/dist/lib/stores.js +173 -0
  91. package/dist/lib/style.d.ts +24 -0
  92. package/dist/lib/style.js +29 -0
  93. package/dist/lib/swell-function-wrapper.d.ts +88 -0
  94. package/dist/lib/swell-function-wrapper.js +302 -0
  95. package/dist/remote-app-command.d.ts +36 -0
  96. package/dist/remote-app-command.js +367 -0
  97. package/dist/swell-command.d.ts +21 -0
  98. package/dist/swell-command.js +43 -0
  99. package/oclif.manifest.json +1085 -0
  100. package/package.json +81 -43
  101. package/LICENSE +0 -674
  102. package/dist/bin/multipart-parser-85ef9626.js +0 -456
  103. package/dist/bin/swell-0f71f07d.js +0 -30670
  104. package/dist/bin/swell.js +0 -24
  105. package/dist/man/swell.1 +0 -85
@@ -0,0 +1,1085 @@
1
+ {
2
+ "commands": {
3
+ "login": {
4
+ "aliases": [],
5
+ "args": {},
6
+ "description": "\nIf you are not already logged in, this command will open your browser to the\nSwell Admin login page, otherwise it will show you the stores you still\nhave available for logging in to.\n",
7
+ "examples": [
8
+ "<%= config.bin %> <%= command.id %>"
9
+ ],
10
+ "flags": {
11
+ "store": {
12
+ "char": "s",
13
+ "description": "store to login to",
14
+ "name": "store",
15
+ "hasDynamicHelp": false,
16
+ "multiple": false,
17
+ "type": "option"
18
+ },
19
+ "force": {
20
+ "char": "f",
21
+ "description": "show all available stores and switch the current session if needed",
22
+ "name": "force",
23
+ "allowNo": false,
24
+ "type": "boolean"
25
+ }
26
+ },
27
+ "hasDynamicHelp": false,
28
+ "hiddenAliases": [],
29
+ "id": "login",
30
+ "pluginAlias": "@swell/cli",
31
+ "pluginName": "@swell/cli",
32
+ "pluginType": "core",
33
+ "strict": true,
34
+ "summary": "Login to your Swell user account.",
35
+ "enableJsonFlag": false,
36
+ "isESM": true,
37
+ "relativePath": [
38
+ "dist",
39
+ "commands",
40
+ "login.js"
41
+ ]
42
+ },
43
+ "logout": {
44
+ "aliases": [],
45
+ "args": {},
46
+ "description": "Log out of all stores available in your current session.",
47
+ "examples": [
48
+ "<%= config.bin %> <%= command.id %>"
49
+ ],
50
+ "flags": {
51
+ "local": {
52
+ "description": "clear local authentication data",
53
+ "name": "local",
54
+ "allowNo": false,
55
+ "type": "boolean"
56
+ }
57
+ },
58
+ "hasDynamicHelp": false,
59
+ "hiddenAliases": [],
60
+ "id": "logout",
61
+ "pluginAlias": "@swell/cli",
62
+ "pluginName": "@swell/cli",
63
+ "pluginType": "core",
64
+ "strict": true,
65
+ "enableJsonFlag": false,
66
+ "isESM": true,
67
+ "relativePath": [
68
+ "dist",
69
+ "commands",
70
+ "logout.js"
71
+ ]
72
+ },
73
+ "logs": {
74
+ "aliases": [],
75
+ "args": {},
76
+ "examples": [
77
+ "swell logs",
78
+ "swell logs -f -p -n 10 -c date,req,data",
79
+ "swell logs -s accounts",
80
+ "swell logs --after 2023-08-25T16:01:02.697Z -c date",
81
+ "swell logs --after 2023-08-27"
82
+ ],
83
+ "flags": {
84
+ "after": {
85
+ "description": "expected is Javascript Date Time String Format: YYYY-MM-DDTHH:mm:ss.sssZ",
86
+ "name": "after",
87
+ "summary": "show logs created on or after this date/time (utc)",
88
+ "hasDynamicHelp": false,
89
+ "multiple": false,
90
+ "type": "option"
91
+ },
92
+ "app": {
93
+ "description": "filter logs by app id",
94
+ "name": "app",
95
+ "hasDynamicHelp": false,
96
+ "multiple": false,
97
+ "type": "option"
98
+ },
99
+ "before": {
100
+ "description": "expected is Javascript Date Time String Format: YYYY-MM-DDTHH:mm:ss.sssZ",
101
+ "name": "before",
102
+ "summary": "show logs created on or before this date/time (utc)",
103
+ "hasDynamicHelp": false,
104
+ "multiple": false,
105
+ "type": "option"
106
+ },
107
+ "columns": {
108
+ "char": "c",
109
+ "description": "available columns: app, data, date, env, ip, request, req, status, time, type",
110
+ "name": "columns",
111
+ "summary": "comma separated list of columns to display",
112
+ "default": "date,request,data,status,time",
113
+ "hasDynamicHelp": false,
114
+ "multiple": false,
115
+ "type": "option"
116
+ },
117
+ "env": {
118
+ "description": "filter logs by environment id",
119
+ "name": "env",
120
+ "hasDynamicHelp": false,
121
+ "multiple": false,
122
+ "type": "option"
123
+ },
124
+ "follow": {
125
+ "char": "f",
126
+ "description": "stream logs in real time",
127
+ "exclusive": [
128
+ "before"
129
+ ],
130
+ "name": "follow",
131
+ "allowNo": false,
132
+ "type": "boolean"
133
+ },
134
+ "number": {
135
+ "char": "n",
136
+ "description": "number of log lines to return",
137
+ "name": "number",
138
+ "default": 100,
139
+ "hasDynamicHelp": false,
140
+ "multiple": false,
141
+ "type": "option"
142
+ },
143
+ "output": {
144
+ "char": "o",
145
+ "description": "how to display the logs",
146
+ "name": "output",
147
+ "default": "line",
148
+ "hasDynamicHelp": false,
149
+ "multiple": false,
150
+ "options": [
151
+ "table",
152
+ "line"
153
+ ],
154
+ "type": "option"
155
+ },
156
+ "pretty": {
157
+ "char": "p",
158
+ "description": "note that this flag will take more space in the terminal and require more time to load",
159
+ "name": "pretty",
160
+ "summary": "pretty print json data",
161
+ "allowNo": false,
162
+ "type": "boolean"
163
+ },
164
+ "search": {
165
+ "char": "s",
166
+ "description": "search logs by keyword",
167
+ "name": "search",
168
+ "hasDynamicHelp": false,
169
+ "multiple": false,
170
+ "type": "option"
171
+ },
172
+ "status": {
173
+ "description": "filter logs by request status",
174
+ "name": "status",
175
+ "hasDynamicHelp": false,
176
+ "multiple": false,
177
+ "type": "option"
178
+ },
179
+ "type": {
180
+ "description": "filter logs by type",
181
+ "name": "type",
182
+ "hasDynamicHelp": false,
183
+ "multiple": true,
184
+ "options": [
185
+ "api",
186
+ "function",
187
+ "webhook"
188
+ ],
189
+ "type": "option"
190
+ }
191
+ },
192
+ "hasDynamicHelp": false,
193
+ "hiddenAliases": [],
194
+ "id": "logs",
195
+ "pluginAlias": "@swell/cli",
196
+ "pluginName": "@swell/cli",
197
+ "pluginType": "core",
198
+ "strict": true,
199
+ "summary": "Output or stream store logs to the terminal.",
200
+ "enableJsonFlag": false,
201
+ "isESM": true,
202
+ "relativePath": [
203
+ "dist",
204
+ "commands",
205
+ "logs.js"
206
+ ]
207
+ },
208
+ "switch": {
209
+ "aliases": [],
210
+ "args": {
211
+ "store-id": {
212
+ "description": "store id you want to switch to",
213
+ "name": "store-id"
214
+ }
215
+ },
216
+ "description": "\nIf you have access to more than one store, this command will\ndefine the store that all other commands will apply to by default.\n",
217
+ "examples": [
218
+ "<%= config.bin %> <%= command.id %>",
219
+ "<%= config.bin %> <%= command.id %> <store-id>"
220
+ ],
221
+ "flags": {},
222
+ "hasDynamicHelp": false,
223
+ "hiddenAliases": [],
224
+ "id": "switch",
225
+ "pluginAlias": "@swell/cli",
226
+ "pluginName": "@swell/cli",
227
+ "pluginType": "core",
228
+ "strict": true,
229
+ "summary": "Switch your default current store.",
230
+ "enableJsonFlag": false,
231
+ "isESM": true,
232
+ "relativePath": [
233
+ "dist",
234
+ "commands",
235
+ "switch.js"
236
+ ]
237
+ },
238
+ "whoami": {
239
+ "aliases": [],
240
+ "args": {},
241
+ "description": "Display the current logged-in user and available stores.",
242
+ "examples": [
243
+ "<%= config.bin %> <%= command.id %>"
244
+ ],
245
+ "flags": {},
246
+ "hasDynamicHelp": false,
247
+ "hiddenAliases": [],
248
+ "id": "whoami",
249
+ "pluginAlias": "@swell/cli",
250
+ "pluginName": "@swell/cli",
251
+ "pluginType": "core",
252
+ "strict": true,
253
+ "enableJsonFlag": false,
254
+ "isESM": true,
255
+ "relativePath": [
256
+ "dist",
257
+ "commands",
258
+ "whoami.js"
259
+ ]
260
+ },
261
+ "app:_pull": {
262
+ "aliases": [],
263
+ "args": {
264
+ "appId": {
265
+ "description": "app id to pull",
266
+ "name": "appId"
267
+ }
268
+ },
269
+ "examples": [
270
+ "<%= config.bin %> <%= command.id %>"
271
+ ],
272
+ "flags": {
273
+ "app-path": {
274
+ "description": "path to the app directory",
275
+ "name": "app-path",
276
+ "hasDynamicHelp": false,
277
+ "multiple": false,
278
+ "type": "option"
279
+ }
280
+ },
281
+ "hasDynamicHelp": false,
282
+ "hiddenAliases": [],
283
+ "id": "app:_pull",
284
+ "pluginAlias": "@swell/cli",
285
+ "pluginName": "@swell/cli",
286
+ "pluginType": "core",
287
+ "strict": true,
288
+ "summary": "Pull app configuration from remote.",
289
+ "enableJsonFlag": false,
290
+ "isESM": true,
291
+ "relativePath": [
292
+ "dist",
293
+ "commands",
294
+ "app",
295
+ "_pull.js"
296
+ ]
297
+ },
298
+ "app:_uninstall": {
299
+ "aliases": [],
300
+ "args": {},
301
+ "description": "Uninstalls an existing App",
302
+ "examples": [
303
+ "<%= config.bin %> <%= command.id %>"
304
+ ],
305
+ "flags": {
306
+ "app-path": {
307
+ "description": "path to the app directory",
308
+ "name": "app-path",
309
+ "hasDynamicHelp": false,
310
+ "multiple": false,
311
+ "type": "option"
312
+ },
313
+ "env": {
314
+ "description": "environment to uninstall the app from",
315
+ "name": "env",
316
+ "default": "test",
317
+ "hasDynamicHelp": false,
318
+ "multiple": false,
319
+ "type": "option"
320
+ },
321
+ "store": {
322
+ "char": "s",
323
+ "description": "store id to uninstall the app from",
324
+ "name": "store",
325
+ "hasDynamicHelp": false,
326
+ "multiple": false,
327
+ "type": "option"
328
+ }
329
+ },
330
+ "hasDynamicHelp": false,
331
+ "hiddenAliases": [],
332
+ "id": "app:_uninstall",
333
+ "pluginAlias": "@swell/cli",
334
+ "pluginName": "@swell/cli",
335
+ "pluginType": "core",
336
+ "strict": true,
337
+ "enableJsonFlag": false,
338
+ "orientation": {
339
+ "env": "test"
340
+ },
341
+ "isESM": true,
342
+ "relativePath": [
343
+ "dist",
344
+ "commands",
345
+ "app",
346
+ "_uninstall.js"
347
+ ]
348
+ },
349
+ "app:info": {
350
+ "aliases": [],
351
+ "args": {
352
+ "versions": {
353
+ "description": "list all app versions",
354
+ "name": "versions"
355
+ }
356
+ },
357
+ "description": "The command shows the latest information about your app including the name,\ndescription, version, public ID, test store, and more. If the versions argument is passed,\nit will output all versions of the app instead.",
358
+ "examples": [
359
+ {
360
+ "command": "swell app info",
361
+ "description": "Show general information about the app."
362
+ },
363
+ {
364
+ "command": "swell app info versions",
365
+ "description": "Show all established versions of the app."
366
+ }
367
+ ],
368
+ "flags": {
369
+ "app-path": {
370
+ "description": "path to the app directory",
371
+ "name": "app-path",
372
+ "hasDynamicHelp": false,
373
+ "multiple": false,
374
+ "type": "option"
375
+ }
376
+ },
377
+ "hasDynamicHelp": false,
378
+ "hiddenAliases": [],
379
+ "id": "app:info",
380
+ "pluginAlias": "@swell/cli",
381
+ "pluginName": "@swell/cli",
382
+ "pluginType": "core",
383
+ "strict": true,
384
+ "summary": "Show information about your Swell app.",
385
+ "enableJsonFlag": false,
386
+ "isESM": true,
387
+ "relativePath": [
388
+ "dist",
389
+ "commands",
390
+ "app",
391
+ "info.js"
392
+ ]
393
+ },
394
+ "app:install": {
395
+ "aliases": [],
396
+ "args": {},
397
+ "description": "Without a version specified, install the latest version of the app.\n\nWithout a store specified, install the app in the Live environment of the current store.",
398
+ "examples": [
399
+ "swell install",
400
+ "swell install -v 3.2.7",
401
+ "swell install -v 1.0.0 -s my-store-id"
402
+ ],
403
+ "flags": {
404
+ "app-path": {
405
+ "description": "path to the app directory",
406
+ "name": "app-path",
407
+ "hasDynamicHelp": false,
408
+ "multiple": false,
409
+ "type": "option"
410
+ },
411
+ "env": {
412
+ "char": "e",
413
+ "description": "target environment to install the app, defaults to live",
414
+ "name": "env",
415
+ "hasDynamicHelp": false,
416
+ "multiple": false,
417
+ "type": "option"
418
+ },
419
+ "store": {
420
+ "char": "s",
421
+ "description": "target store id to install the app, defaults to the current store",
422
+ "name": "store",
423
+ "hasDynamicHelp": false,
424
+ "multiple": false,
425
+ "type": "option"
426
+ },
427
+ "version": {
428
+ "char": "v",
429
+ "description": "version of the app to install, defaults to latest",
430
+ "name": "version",
431
+ "hasDynamicHelp": false,
432
+ "multiple": false,
433
+ "type": "option"
434
+ }
435
+ },
436
+ "hasDynamicHelp": false,
437
+ "hiddenAliases": [],
438
+ "id": "app:install",
439
+ "pluginAlias": "@swell/cli",
440
+ "pluginName": "@swell/cli",
441
+ "pluginType": "core",
442
+ "strict": true,
443
+ "summary": "Install an existing app in another store environment.",
444
+ "enableJsonFlag": false,
445
+ "isESM": true,
446
+ "relativePath": [
447
+ "dist",
448
+ "commands",
449
+ "app",
450
+ "install.js"
451
+ ]
452
+ },
453
+ "app:push": {
454
+ "aliases": [],
455
+ "args": {},
456
+ "description": "Push all app configurations, a specific file, or a specific configuration\ntype to an app in your store's test environment. If the app does not exist yet,\nit will be created and its global ID saved to a .swellrc file.\n\n- If no file is specified, all configuration files will be pushed to the store.\n This includes the app icon (assets/icon.png) and swell.json.\n- If a file is specified, only that file will be pushed to the store.\n- If a directory is specified, only files in that directory will be pushed.\n\nApp configuration directories:\nassets/\ncontent/\nfunctions/\nmodels/\nnotifications/\nsettings/\nwebhooks/",
457
+ "examples": [
458
+ "swell app push",
459
+ "swell app push -f content",
460
+ "swell app push -f models/products.json"
461
+ ],
462
+ "flags": {
463
+ "app-path": {
464
+ "description": "path to the app directory",
465
+ "name": "app-path",
466
+ "hasDynamicHelp": false,
467
+ "multiple": false,
468
+ "type": "option"
469
+ },
470
+ "file": {
471
+ "char": "f",
472
+ "description": "relative path to a configuration file or directory to push",
473
+ "name": "file",
474
+ "hasDynamicHelp": false,
475
+ "multiple": false,
476
+ "type": "option"
477
+ }
478
+ },
479
+ "hasDynamicHelp": false,
480
+ "hiddenAliases": [],
481
+ "id": "app:push",
482
+ "pluginAlias": "@swell/cli",
483
+ "pluginName": "@swell/cli",
484
+ "pluginType": "core",
485
+ "strict": true,
486
+ "summary": "Push configuration files to your Swell app.",
487
+ "enableJsonFlag": false,
488
+ "orientation": {
489
+ "env": "test"
490
+ },
491
+ "isESM": true,
492
+ "relativePath": [
493
+ "dist",
494
+ "commands",
495
+ "app",
496
+ "push.js"
497
+ ]
498
+ },
499
+ "app:version": {
500
+ "aliases": [],
501
+ "args": {
502
+ "nextVersion": {
503
+ "description": "semver version or release type: <next.version>|major|premajor|minor|preminor|patch|prepatch|prerelease",
504
+ "name": "nextVersion"
505
+ }
506
+ },
507
+ "description": "When executed without specifying NEXTVERSION, the command will display the current\nversion of your app.\n\nIf a NEXTVERSION is provided, the command will validate and compute the version\naccording to Semver rules by only allowing incremental updates.\n\nThe version change will be committed to the Git repository using the provided\nmessage or a default similar to the tag, e.g. \"v1.0.1\".\n\nBy default, it creates a Git tag for the specified version. You can disable this\nbehavior by using the --git-tag=false option.",
508
+ "examples": [
509
+ "swell app version",
510
+ "swell app version minor",
511
+ "swell app version 1.0.0 -m \"First release\""
512
+ ],
513
+ "flags": {
514
+ "app-path": {
515
+ "description": "path to the app directory",
516
+ "name": "app-path",
517
+ "hasDynamicHelp": false,
518
+ "multiple": false,
519
+ "type": "option"
520
+ },
521
+ "git-tag": {
522
+ "description": "create a git tag for this version (default true)",
523
+ "name": "git-tag",
524
+ "allowNo": false,
525
+ "type": "boolean"
526
+ },
527
+ "message": {
528
+ "char": "m",
529
+ "description": "description of the changes in this version",
530
+ "name": "message",
531
+ "hasDynamicHelp": false,
532
+ "multiple": false,
533
+ "type": "option"
534
+ }
535
+ },
536
+ "hasDynamicHelp": false,
537
+ "hiddenAliases": [],
538
+ "id": "app:version",
539
+ "pluginAlias": "@swell/cli",
540
+ "pluginName": "@swell/cli",
541
+ "pluginType": "core",
542
+ "strict": true,
543
+ "summary": "Increment the version of your Swell app.",
544
+ "enableJsonFlag": false,
545
+ "isESM": true,
546
+ "relativePath": [
547
+ "dist",
548
+ "commands",
549
+ "app",
550
+ "version.js"
551
+ ]
552
+ },
553
+ "app:watch": {
554
+ "aliases": [],
555
+ "args": {},
556
+ "description": "Watches configuration files including functions, and automatically pushes\nto the remote store.\n\nOptionally synchronize all configs on change.",
557
+ "examples": [
558
+ "swell app watch",
559
+ "swell app watch -a",
560
+ "swell app watch --sync-all"
561
+ ],
562
+ "flags": {
563
+ "app-path": {
564
+ "description": "path to the app directory",
565
+ "name": "app-path",
566
+ "hasDynamicHelp": false,
567
+ "multiple": false,
568
+ "type": "option"
569
+ },
570
+ "sync-all": {
571
+ "char": "a",
572
+ "description": "synchronize all app configurations on file change",
573
+ "name": "sync-all",
574
+ "allowNo": false,
575
+ "type": "boolean"
576
+ }
577
+ },
578
+ "hasDynamicHelp": false,
579
+ "hiddenAliases": [],
580
+ "id": "app:watch",
581
+ "pluginAlias": "@swell/cli",
582
+ "pluginName": "@swell/cli",
583
+ "pluginType": "core",
584
+ "strict": true,
585
+ "summary": "Watch for changes and push app configurations.",
586
+ "enableJsonFlag": false,
587
+ "orientation": {
588
+ "env": "test"
589
+ },
590
+ "isESM": true,
591
+ "relativePath": [
592
+ "dist",
593
+ "commands",
594
+ "app",
595
+ "watch.js"
596
+ ]
597
+ },
598
+ "create:app": {
599
+ "aliases": [],
600
+ "args": {
601
+ "id": {
602
+ "default": "",
603
+ "description": "id of the app to create",
604
+ "name": "id"
605
+ }
606
+ },
607
+ "description": "Initialize an app with config file and folder structure.",
608
+ "examples": [
609
+ {
610
+ "command": "swell create app",
611
+ "description": "Create app following command prompts."
612
+ },
613
+ {
614
+ "command": "swell create app my_app -y",
615
+ "description": "Create app and accept all default values."
616
+ },
617
+ {
618
+ "command": "swell create app -p yarn",
619
+ "description": "Create app with yarn package manager instead of npm by default."
620
+ },
621
+ {
622
+ "command": "swell create app -p none",
623
+ "description": "Create app without installing TypeScript bindings, etc."
624
+ }
625
+ ],
626
+ "flags": {
627
+ "pkg": {
628
+ "char": "p",
629
+ "description": "use npm or yarn to install default dependencies, or none to disable",
630
+ "name": "pkg",
631
+ "default": "npm",
632
+ "hasDynamicHelp": false,
633
+ "multiple": false,
634
+ "options": [
635
+ "npm",
636
+ "yarn",
637
+ "none"
638
+ ],
639
+ "type": "option"
640
+ },
641
+ "yes": {
642
+ "char": "y",
643
+ "description": "accept all default values",
644
+ "name": "yes",
645
+ "allowNo": false,
646
+ "type": "boolean"
647
+ }
648
+ },
649
+ "hasDynamicHelp": false,
650
+ "hiddenAliases": [],
651
+ "id": "create:app",
652
+ "pluginAlias": "@swell/cli",
653
+ "pluginName": "@swell/cli",
654
+ "pluginType": "core",
655
+ "strict": true,
656
+ "enableJsonFlag": false,
657
+ "isESM": true,
658
+ "relativePath": [
659
+ "dist",
660
+ "commands",
661
+ "create",
662
+ "app.js"
663
+ ]
664
+ },
665
+ "create:content": {
666
+ "aliases": [],
667
+ "args": {
668
+ "collection": {
669
+ "default": "",
670
+ "description": "collection to create or apply to, i.e. products",
671
+ "name": "collection"
672
+ }
673
+ },
674
+ "description": "This command assists in generating UI model configuration files. CLI will prompt for values when flags are not present.",
675
+ "examples": [
676
+ {
677
+ "command": "swell create content",
678
+ "description": "Create content model interactively."
679
+ },
680
+ {
681
+ "command": "swell create content visitors -v list,edit,new",
682
+ "description": "Specify views delimited by semicolons."
683
+ },
684
+ {
685
+ "command": "swell create content visitors -f name:short_text,description:long_text,verified:boolean,visitor_count:integer,photo:image,orders:collection",
686
+ "description": "Specify fields with types delimited by semicolons"
687
+ },
688
+ {
689
+ "command": "swell create content visitors -o -f verified:short_text -v list,edit,new -d \"Visitor Views\"",
690
+ "description": "Specify fields, views, and description."
691
+ }
692
+ ],
693
+ "flags": {
694
+ "app-path": {
695
+ "description": "path to the app directory",
696
+ "name": "app-path",
697
+ "hasDynamicHelp": false,
698
+ "multiple": false,
699
+ "type": "option"
700
+ },
701
+ "label": {
702
+ "char": "l",
703
+ "description": "content model label",
704
+ "name": "label",
705
+ "default": "",
706
+ "hasDynamicHelp": false,
707
+ "multiple": false,
708
+ "type": "option"
709
+ },
710
+ "description": {
711
+ "char": "d",
712
+ "description": "content model description",
713
+ "name": "description",
714
+ "default": "",
715
+ "hasDynamicHelp": false,
716
+ "multiple": false,
717
+ "type": "option"
718
+ },
719
+ "fields": {
720
+ "char": "f",
721
+ "description": "list of content model fields delimited by commas",
722
+ "name": "fields",
723
+ "default": "",
724
+ "hasDynamicHelp": false,
725
+ "multiple": false,
726
+ "type": "option"
727
+ },
728
+ "views": {
729
+ "char": "v",
730
+ "description": "list of content model views delimited by commas, i.e. list,edit,new",
731
+ "name": "views",
732
+ "default": "",
733
+ "hasDynamicHelp": false,
734
+ "multiple": false,
735
+ "type": "option"
736
+ },
737
+ "overwrite": {
738
+ "description": "overwrite existing content model configuration file",
739
+ "name": "overwrite",
740
+ "allowNo": false,
741
+ "type": "boolean"
742
+ }
743
+ },
744
+ "hasDynamicHelp": false,
745
+ "hiddenAliases": [],
746
+ "id": "create:content",
747
+ "pluginAlias": "@swell/cli",
748
+ "pluginName": "@swell/cli",
749
+ "pluginType": "core",
750
+ "summary": "Initialize a content UI model config file with properties in the content folder.",
751
+ "isESM": true,
752
+ "relativePath": [
753
+ "dist",
754
+ "commands",
755
+ "create",
756
+ "content.js"
757
+ ]
758
+ },
759
+ "create:function": {
760
+ "aliases": [],
761
+ "args": {
762
+ "functionName": {
763
+ "description": "function name, used in an http route if applicable",
764
+ "name": "functionName"
765
+ },
766
+ "trigger": {
767
+ "description": "function trigger type",
768
+ "name": "trigger",
769
+ "options": [
770
+ "cron",
771
+ "model",
772
+ "route"
773
+ ]
774
+ }
775
+ },
776
+ "description": "This command assists in generating functions scripts. CLI will prompt for values when flags are not present.",
777
+ "examples": [
778
+ {
779
+ "command": "swell create function",
780
+ "description": "Create function script interactively."
781
+ },
782
+ {
783
+ "command": "swell create function orders-subscriptions-created.ts model --events order.created,subscription.created",
784
+ "description": "Specify model event trigger of the function."
785
+ },
786
+ {
787
+ "command": "swell create function get-frontend-data.ts route --route public",
788
+ "description": "Specify public API access."
789
+ },
790
+ {
791
+ "command": "swell create function process-metrics.ts cron --schedule \"0 0 * * *\"",
792
+ "description": "Specify schedule of the cron function."
793
+ }
794
+ ],
795
+ "flags": {
796
+ "app-path": {
797
+ "description": "path to the app directory",
798
+ "name": "app-path",
799
+ "hasDynamicHelp": false,
800
+ "multiple": false,
801
+ "type": "option"
802
+ },
803
+ "description": {
804
+ "char": "d",
805
+ "description": "function description",
806
+ "name": "description",
807
+ "default": "",
808
+ "hasDynamicHelp": false,
809
+ "multiple": false,
810
+ "type": "option"
811
+ },
812
+ "events": {
813
+ "char": "e",
814
+ "description": "list of data model events used with model trigger, delimited by commas",
815
+ "name": "events",
816
+ "default": "",
817
+ "hasDynamicHelp": false,
818
+ "multiple": false,
819
+ "type": "option"
820
+ },
821
+ "route": {
822
+ "char": "r",
823
+ "description": "access type used with route trigger",
824
+ "name": "route",
825
+ "default": "public",
826
+ "hasDynamicHelp": false,
827
+ "multiple": false,
828
+ "options": [
829
+ "public",
830
+ "private"
831
+ ],
832
+ "type": "option"
833
+ },
834
+ "schedule": {
835
+ "char": "s",
836
+ "description": "crontab value used with cron trigger",
837
+ "name": "schedule",
838
+ "default": "",
839
+ "hasDynamicHelp": false,
840
+ "multiple": false,
841
+ "type": "option"
842
+ },
843
+ "overwrite": {
844
+ "description": "overwrite existing function file",
845
+ "name": "overwrite",
846
+ "allowNo": false,
847
+ "type": "boolean"
848
+ }
849
+ },
850
+ "hasDynamicHelp": false,
851
+ "hiddenAliases": [],
852
+ "id": "create:function",
853
+ "pluginAlias": "@swell/cli",
854
+ "pluginName": "@swell/cli",
855
+ "pluginType": "core",
856
+ "strict": true,
857
+ "summary": "Initialize a functions script in JavaScript or TypeScript.",
858
+ "isESM": true,
859
+ "relativePath": [
860
+ "dist",
861
+ "commands",
862
+ "create",
863
+ "function.js"
864
+ ]
865
+ },
866
+ "create": {
867
+ "aliases": [],
868
+ "args": {},
869
+ "description": "Scaffold apps, models, functions, and notifications.",
870
+ "examples": [
871
+ "<%= config.bin %> <%= command.id %>"
872
+ ],
873
+ "flags": {},
874
+ "hasDynamicHelp": false,
875
+ "hiddenAliases": [],
876
+ "id": "create",
877
+ "pluginAlias": "@swell/cli",
878
+ "pluginName": "@swell/cli",
879
+ "pluginType": "core",
880
+ "strict": true,
881
+ "enableJsonFlag": false,
882
+ "isESM": true,
883
+ "relativePath": [
884
+ "dist",
885
+ "commands",
886
+ "create",
887
+ "index.js"
888
+ ]
889
+ },
890
+ "create:model": {
891
+ "aliases": [],
892
+ "args": {
893
+ "collection": {
894
+ "default": "",
895
+ "description": "collection to create or apply to, i.e. products",
896
+ "name": "collection"
897
+ }
898
+ },
899
+ "description": "This command assists in generating data model configuration files. CLI will prompt for values when flags are not present.",
900
+ "examples": [
901
+ {
902
+ "command": "swell create model",
903
+ "description": "Create data model configuration interactively."
904
+ },
905
+ {
906
+ "command": "swell create model visitors -e created,updated,deleted.",
907
+ "description": "Specify events of the data model."
908
+ },
909
+ {
910
+ "command": "swell create model visitors -f first_name:string,last_name:string,photo:file,visit_count:int,visits:link",
911
+ "description": "Specify fields of the data model."
912
+ },
913
+ {
914
+ "command": "swell create model visitors -f first_name:string,last_name:string,photo:file,visit_count:int,visits:link -d \"Visitors Tracking\" -o -e created,updated,deleted",
915
+ "description": "Scaffold a data model configuration with args and flags."
916
+ }
917
+ ],
918
+ "flags": {
919
+ "app-path": {
920
+ "description": "path to the app directory",
921
+ "name": "app-path",
922
+ "hasDynamicHelp": false,
923
+ "multiple": false,
924
+ "type": "option"
925
+ },
926
+ "label": {
927
+ "char": "l",
928
+ "description": "data model label, i.e. Products",
929
+ "name": "label",
930
+ "default": "",
931
+ "hasDynamicHelp": false,
932
+ "multiple": false,
933
+ "type": "option"
934
+ },
935
+ "description": {
936
+ "char": "d",
937
+ "description": "data model description",
938
+ "name": "description",
939
+ "default": "",
940
+ "hasDynamicHelp": false,
941
+ "multiple": false,
942
+ "type": "option"
943
+ },
944
+ "fields": {
945
+ "char": "f",
946
+ "description": "list of data model fields delimited by commas",
947
+ "name": "fields",
948
+ "default": "",
949
+ "hasDynamicHelp": false,
950
+ "multiple": false,
951
+ "type": "option"
952
+ },
953
+ "events": {
954
+ "char": "e",
955
+ "description": "list of data model events delimited by commas",
956
+ "name": "events",
957
+ "default": "created,updated,deleted",
958
+ "hasDynamicHelp": false,
959
+ "multiple": false,
960
+ "type": "option"
961
+ },
962
+ "overwrite": {
963
+ "description": "Overwrite existing data model configuration file.",
964
+ "name": "overwrite",
965
+ "allowNo": false,
966
+ "type": "boolean"
967
+ }
968
+ },
969
+ "hasDynamicHelp": false,
970
+ "hiddenAliases": [],
971
+ "id": "create:model",
972
+ "pluginAlias": "@swell/cli",
973
+ "pluginName": "@swell/cli",
974
+ "pluginType": "core",
975
+ "summary": "Initialize a data model config file with properties in the models folder.",
976
+ "isESM": true,
977
+ "relativePath": [
978
+ "dist",
979
+ "commands",
980
+ "create",
981
+ "model.js"
982
+ ]
983
+ },
984
+ "create:notification": {
985
+ "aliases": [],
986
+ "args": {
987
+ "model": {
988
+ "description": "data model to trigger the notification by",
989
+ "name": "model"
990
+ },
991
+ "name": {
992
+ "description": "internal name for the notification",
993
+ "name": "name"
994
+ }
995
+ },
996
+ "description": "This command assists in generating notifications configuration files. This CLI command will prompt for values when flags are not present.",
997
+ "examples": [
998
+ {
999
+ "command": "swell create notification",
1000
+ "description": "Create notification configuration interactively."
1001
+ },
1002
+ {
1003
+ "command": "swell create notification subscriptions confirmed --event subscription.created --once --s \"Your subscription has been confirmed\" -d \"Send a confirmation email when subscription is created\"",
1004
+ "description": "Specify the model, name, event, subject, and description."
1005
+ },
1006
+ {
1007
+ "command": "swell create notification orders paid --event paid\"",
1008
+ "description": "Specify the event to trigger the notification."
1009
+ }
1010
+ ],
1011
+ "flags": {
1012
+ "app-path": {
1013
+ "description": "path to the app directory",
1014
+ "name": "app-path",
1015
+ "hasDynamicHelp": false,
1016
+ "multiple": false,
1017
+ "type": "option"
1018
+ },
1019
+ "description": {
1020
+ "char": "d",
1021
+ "description": "notification description",
1022
+ "name": "description",
1023
+ "default": "",
1024
+ "hasDynamicHelp": false,
1025
+ "multiple": false,
1026
+ "type": "option"
1027
+ },
1028
+ "subject": {
1029
+ "char": "s",
1030
+ "description": "notification email subject",
1031
+ "name": "subject",
1032
+ "default": "",
1033
+ "hasDynamicHelp": false,
1034
+ "multiple": false,
1035
+ "type": "option"
1036
+ },
1037
+ "event": {
1038
+ "char": "e",
1039
+ "description": "data model event to trigger the notification event, i.e. created",
1040
+ "name": "event",
1041
+ "default": "",
1042
+ "hasDynamicHelp": false,
1043
+ "multiple": false,
1044
+ "type": "option"
1045
+ },
1046
+ "admin": {
1047
+ "char": "a",
1048
+ "description": "indicate when the notification is sent to store admins only",
1049
+ "name": "admin",
1050
+ "allowNo": false,
1051
+ "type": "boolean"
1052
+ },
1053
+ "once": {
1054
+ "char": "o",
1055
+ "description": "indicate the notification should be sent only once when conditions are met, instead of repeating",
1056
+ "name": "once",
1057
+ "allowNo": false,
1058
+ "type": "boolean"
1059
+ },
1060
+ "overwrite": {
1061
+ "description": "overwrite existing notification configuration file",
1062
+ "name": "overwrite",
1063
+ "allowNo": false,
1064
+ "type": "boolean"
1065
+ }
1066
+ },
1067
+ "hasDynamicHelp": false,
1068
+ "hiddenAliases": [],
1069
+ "id": "create:notification",
1070
+ "pluginAlias": "@swell/cli",
1071
+ "pluginName": "@swell/cli",
1072
+ "pluginType": "core",
1073
+ "strict": true,
1074
+ "summary": "Initialize notification files and configuration with properties in the notifications folder.",
1075
+ "isESM": true,
1076
+ "relativePath": [
1077
+ "dist",
1078
+ "commands",
1079
+ "create",
1080
+ "notification.js"
1081
+ ]
1082
+ }
1083
+ },
1084
+ "version": "2.0.1-alpha.2"
1085
+ }