@saltcorn/cli 0.7.4 → 0.8.0-beta.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 +35 -35
- package/oclif.manifest.json +1 -1
- package/package.json +6 -6
- package/src/commands/backup.js +3 -6
- package/src/commands/build-app.js +2 -4
- package/src/commands/migrate.js +11 -1
- package/src/commands/plugins.js +49 -42
- package/src/commands/run-benchmark.js +1 -1
- package/src/commands/set-cfg.js +3 -2
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ $ npm install -g @saltcorn/cli
|
|
|
20
20
|
$ saltcorn COMMAND
|
|
21
21
|
running command...
|
|
22
22
|
$ saltcorn (-v|--version|version)
|
|
23
|
-
@saltcorn/cli/0.
|
|
23
|
+
@saltcorn/cli/0.8.0-beta.0 darwin-arm64 node-v16.18.1
|
|
24
24
|
$ saltcorn --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ saltcorn COMMAND
|
|
@@ -79,7 +79,7 @@ OPTIONS
|
|
|
79
79
|
-f, --force force command execution
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
_See code: [src/commands/add-schema.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
82
|
+
_See code: [src/commands/add-schema.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/add-schema.js)_
|
|
83
83
|
|
|
84
84
|
## `saltcorn backup`
|
|
85
85
|
|
|
@@ -95,7 +95,7 @@ OPTIONS
|
|
|
95
95
|
-z, --zip zip format
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
-
_See code: [src/commands/backup.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
98
|
+
_See code: [src/commands/backup.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/backup.js)_
|
|
99
99
|
|
|
100
100
|
## `saltcorn build-app`
|
|
101
101
|
|
|
@@ -123,7 +123,7 @@ OPTIONS
|
|
|
123
123
|
tenant
|
|
124
124
|
```
|
|
125
125
|
|
|
126
|
-
_See code: [src/commands/build-app.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
126
|
+
_See code: [src/commands/build-app.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/build-app.js)_
|
|
127
127
|
|
|
128
128
|
## `saltcorn configuration-check`
|
|
129
129
|
|
|
@@ -137,7 +137,7 @@ OPTIONS
|
|
|
137
137
|
-t, --tenant=tenant tenant
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
-
_See code: [src/commands/configuration-check.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
140
|
+
_See code: [src/commands/configuration-check.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/configuration-check.js)_
|
|
141
141
|
|
|
142
142
|
## `saltcorn configuration-check-backups FILES`
|
|
143
143
|
|
|
@@ -151,7 +151,7 @@ ARGUMENTS
|
|
|
151
151
|
FILES backup file to check. can be repeated, e.g. with *
|
|
152
152
|
```
|
|
153
153
|
|
|
154
|
-
_See code: [src/commands/configuration-check-backups.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
154
|
+
_See code: [src/commands/configuration-check-backups.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/configuration-check-backups.js)_
|
|
155
155
|
|
|
156
156
|
## `saltcorn create-tenant TENANT`
|
|
157
157
|
|
|
@@ -169,7 +169,7 @@ OPTIONS
|
|
|
169
169
|
-e, --email=email Email of owner of tenant
|
|
170
170
|
```
|
|
171
171
|
|
|
172
|
-
_See code: [src/commands/create-tenant.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
172
|
+
_See code: [src/commands/create-tenant.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/create-tenant.js)_
|
|
173
173
|
|
|
174
174
|
## `saltcorn create-user`
|
|
175
175
|
|
|
@@ -187,7 +187,7 @@ OPTIONS
|
|
|
187
187
|
-t, --tenant=tenant tenant
|
|
188
188
|
```
|
|
189
189
|
|
|
190
|
-
_See code: [src/commands/create-user.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
190
|
+
_See code: [src/commands/create-user.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/create-user.js)_
|
|
191
191
|
|
|
192
192
|
## `saltcorn delete-tenants`
|
|
193
193
|
|
|
@@ -198,7 +198,7 @@ USAGE
|
|
|
198
198
|
$ saltcorn delete-tenants
|
|
199
199
|
```
|
|
200
200
|
|
|
201
|
-
_See code: [src/commands/delete-tenants.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
201
|
+
_See code: [src/commands/delete-tenants.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/delete-tenants.js)_
|
|
202
202
|
|
|
203
203
|
## `saltcorn delete-user USER_EMAIL`
|
|
204
204
|
|
|
@@ -219,7 +219,7 @@ DESCRIPTION
|
|
|
219
219
|
Command deletes the user specified by USER_EMAIL.
|
|
220
220
|
```
|
|
221
221
|
|
|
222
|
-
_See code: [src/commands/delete-user.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
222
|
+
_See code: [src/commands/delete-user.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/delete-user.js)_
|
|
223
223
|
|
|
224
224
|
## `saltcorn fixtures`
|
|
225
225
|
|
|
@@ -238,7 +238,7 @@ DESCRIPTION
|
|
|
238
238
|
This manual step it is never required for users and rarely required for developers
|
|
239
239
|
```
|
|
240
240
|
|
|
241
|
-
_See code: [src/commands/fixtures.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
241
|
+
_See code: [src/commands/fixtures.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/fixtures.js)_
|
|
242
242
|
|
|
243
243
|
## `saltcorn get-cfg KEY`
|
|
244
244
|
|
|
@@ -256,7 +256,7 @@ OPTIONS
|
|
|
256
256
|
-t, --tenant=tenant tenant
|
|
257
257
|
```
|
|
258
258
|
|
|
259
|
-
_See code: [src/commands/get-cfg.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
259
|
+
_See code: [src/commands/get-cfg.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/get-cfg.js)_
|
|
260
260
|
|
|
261
261
|
## `saltcorn help [COMMAND]`
|
|
262
262
|
|
|
@@ -294,7 +294,7 @@ ALIASES
|
|
|
294
294
|
$ saltcorn paths
|
|
295
295
|
```
|
|
296
296
|
|
|
297
|
-
_See code: [src/commands/info.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
297
|
+
_See code: [src/commands/info.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/info.js)_
|
|
298
298
|
|
|
299
299
|
## `saltcorn inspect TYPE [NAME]`
|
|
300
300
|
|
|
@@ -312,7 +312,7 @@ OPTIONS
|
|
|
312
312
|
-t, --tenant=tenant tenant
|
|
313
313
|
```
|
|
314
314
|
|
|
315
|
-
_See code: [src/commands/inspect.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
315
|
+
_See code: [src/commands/inspect.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/inspect.js)_
|
|
316
316
|
|
|
317
317
|
## `saltcorn install-pack`
|
|
318
318
|
|
|
@@ -328,7 +328,7 @@ OPTIONS
|
|
|
328
328
|
-t, --tenant=tenant tenant
|
|
329
329
|
```
|
|
330
330
|
|
|
331
|
-
_See code: [src/commands/install-pack.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
331
|
+
_See code: [src/commands/install-pack.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/install-pack.js)_
|
|
332
332
|
|
|
333
333
|
## `saltcorn install-plugin`
|
|
334
334
|
|
|
@@ -344,7 +344,7 @@ OPTIONS
|
|
|
344
344
|
-t, --tenant=tenant tenant
|
|
345
345
|
```
|
|
346
346
|
|
|
347
|
-
_See code: [src/commands/install-plugin.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
347
|
+
_See code: [src/commands/install-plugin.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/install-plugin.js)_
|
|
348
348
|
|
|
349
349
|
## `saltcorn list-tenants`
|
|
350
350
|
|
|
@@ -355,7 +355,7 @@ USAGE
|
|
|
355
355
|
$ saltcorn list-tenants
|
|
356
356
|
```
|
|
357
357
|
|
|
358
|
-
_See code: [src/commands/list-tenants.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
358
|
+
_See code: [src/commands/list-tenants.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/list-tenants.js)_
|
|
359
359
|
|
|
360
360
|
## `saltcorn localize-plugin PLUGIN PATH`
|
|
361
361
|
|
|
@@ -373,7 +373,7 @@ OPTIONS
|
|
|
373
373
|
-t, --tenant=tenant tenant
|
|
374
374
|
```
|
|
375
375
|
|
|
376
|
-
_See code: [src/commands/localize-plugin.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
376
|
+
_See code: [src/commands/localize-plugin.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/localize-plugin.js)_
|
|
377
377
|
|
|
378
378
|
## `saltcorn make-migration`
|
|
379
379
|
|
|
@@ -389,7 +389,7 @@ DESCRIPTION
|
|
|
389
389
|
unless you are a developer.
|
|
390
390
|
```
|
|
391
391
|
|
|
392
|
-
_See code: [src/commands/make-migration.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
392
|
+
_See code: [src/commands/make-migration.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/make-migration.js)_
|
|
393
393
|
|
|
394
394
|
## `saltcorn saltcorn migrate`
|
|
395
395
|
|
|
@@ -411,7 +411,7 @@ DESCRIPTION
|
|
|
411
411
|
servers and need to control when the migrations are run.
|
|
412
412
|
```
|
|
413
413
|
|
|
414
|
-
_See code: [src/commands/migrate.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
414
|
+
_See code: [src/commands/migrate.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/migrate.js)_
|
|
415
415
|
|
|
416
416
|
## `saltcorn modify-user USER_EMAIL`
|
|
417
417
|
|
|
@@ -440,7 +440,7 @@ DESCRIPTION
|
|
|
440
440
|
NOTE that -a and -r role (--role=role) can give conflict.
|
|
441
441
|
```
|
|
442
442
|
|
|
443
|
-
_See code: [src/commands/modify-user.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
443
|
+
_See code: [src/commands/modify-user.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/modify-user.js)_
|
|
444
444
|
|
|
445
445
|
## `saltcorn plugins`
|
|
446
446
|
|
|
@@ -467,7 +467,7 @@ EXAMPLES
|
|
|
467
467
|
plugins -u -f - force plugin update
|
|
468
468
|
```
|
|
469
469
|
|
|
470
|
-
_See code: [src/commands/plugins.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
470
|
+
_See code: [src/commands/plugins.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/plugins.js)_
|
|
471
471
|
|
|
472
472
|
## `saltcorn release VERSION`
|
|
473
473
|
|
|
@@ -481,7 +481,7 @@ ARGUMENTS
|
|
|
481
481
|
VERSION New version number
|
|
482
482
|
```
|
|
483
483
|
|
|
484
|
-
_See code: [src/commands/release.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
484
|
+
_See code: [src/commands/release.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/release.js)_
|
|
485
485
|
|
|
486
486
|
## `saltcorn reset-schema`
|
|
487
487
|
|
|
@@ -500,7 +500,7 @@ DESCRIPTION
|
|
|
500
500
|
This will delete all existing information
|
|
501
501
|
```
|
|
502
502
|
|
|
503
|
-
_See code: [src/commands/reset-schema.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
503
|
+
_See code: [src/commands/reset-schema.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/reset-schema.js)_
|
|
504
504
|
|
|
505
505
|
## `saltcorn restore FILE`
|
|
506
506
|
|
|
@@ -517,7 +517,7 @@ OPTIONS
|
|
|
517
517
|
-t, --tenant=tenant tenant
|
|
518
518
|
```
|
|
519
519
|
|
|
520
|
-
_See code: [src/commands/restore.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
520
|
+
_See code: [src/commands/restore.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/restore.js)_
|
|
521
521
|
|
|
522
522
|
## `saltcorn rm-tenant`
|
|
523
523
|
|
|
@@ -536,7 +536,7 @@ DESCRIPTION
|
|
|
536
536
|
It recommended to make backup of tenant before perform this command.
|
|
537
537
|
```
|
|
538
538
|
|
|
539
|
-
_See code: [src/commands/rm-tenant.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
539
|
+
_See code: [src/commands/rm-tenant.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/rm-tenant.js)_
|
|
540
540
|
|
|
541
541
|
## `saltcorn run-benchmark [BASEURL]`
|
|
542
542
|
|
|
@@ -555,7 +555,7 @@ OPTIONS
|
|
|
555
555
|
-t, --token=token API Token for reporting results
|
|
556
556
|
```
|
|
557
557
|
|
|
558
|
-
_See code: [src/commands/run-benchmark.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
558
|
+
_See code: [src/commands/run-benchmark.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/run-benchmark.js)_
|
|
559
559
|
|
|
560
560
|
## `saltcorn run-tests [PACKAGE]`
|
|
561
561
|
|
|
@@ -575,7 +575,7 @@ OPTIONS
|
|
|
575
575
|
--watchAll Watch files for changes and rerun all tests.
|
|
576
576
|
```
|
|
577
577
|
|
|
578
|
-
_See code: [src/commands/run-tests.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
578
|
+
_See code: [src/commands/run-tests.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/run-tests.js)_
|
|
579
579
|
|
|
580
580
|
## `saltcorn scheduler`
|
|
581
581
|
|
|
@@ -589,7 +589,7 @@ OPTIONS
|
|
|
589
589
|
-v, --verbose Verbose
|
|
590
590
|
```
|
|
591
591
|
|
|
592
|
-
_See code: [src/commands/scheduler.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
592
|
+
_See code: [src/commands/scheduler.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/scheduler.js)_
|
|
593
593
|
|
|
594
594
|
## `saltcorn serve`
|
|
595
595
|
|
|
@@ -610,7 +610,7 @@ OPTIONS
|
|
|
610
610
|
--subdomain_offset=subdomain_offset Number of parts to remove to access subdomain in 'multi_tenant' mode
|
|
611
611
|
```
|
|
612
612
|
|
|
613
|
-
_See code: [src/commands/serve.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
613
|
+
_See code: [src/commands/serve.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/serve.js)_
|
|
614
614
|
|
|
615
615
|
## `saltcorn set-cfg KEY [VALUE]`
|
|
616
616
|
|
|
@@ -631,7 +631,7 @@ OPTIONS
|
|
|
631
631
|
-t, --tenant=tenant tenant
|
|
632
632
|
```
|
|
633
633
|
|
|
634
|
-
_See code: [src/commands/set-cfg.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
634
|
+
_See code: [src/commands/set-cfg.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/set-cfg.js)_
|
|
635
635
|
|
|
636
636
|
## `saltcorn setup`
|
|
637
637
|
|
|
@@ -650,7 +650,7 @@ DESCRIPTION
|
|
|
650
650
|
configuration file
|
|
651
651
|
```
|
|
652
652
|
|
|
653
|
-
_See code: [src/commands/setup.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
653
|
+
_See code: [src/commands/setup.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/setup.js)_
|
|
654
654
|
|
|
655
655
|
## `saltcorn setup-benchmark`
|
|
656
656
|
|
|
@@ -664,7 +664,7 @@ OPTIONS
|
|
|
664
664
|
-t, --tenant=tenant tenant
|
|
665
665
|
```
|
|
666
666
|
|
|
667
|
-
_See code: [src/commands/setup-benchmark.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
667
|
+
_See code: [src/commands/setup-benchmark.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/setup-benchmark.js)_
|
|
668
668
|
|
|
669
669
|
## `saltcorn test-plugin PATH`
|
|
670
670
|
|
|
@@ -682,7 +682,7 @@ DESCRIPTION
|
|
|
682
682
|
Extra documentation goes here
|
|
683
683
|
```
|
|
684
684
|
|
|
685
|
-
_See code: [src/commands/test-plugin.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
685
|
+
_See code: [src/commands/test-plugin.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/test-plugin.js)_
|
|
686
686
|
|
|
687
687
|
## `saltcorn transform-field EXPRESSION FIELD TABLE [TENANT]`
|
|
688
688
|
|
|
@@ -699,5 +699,5 @@ ARGUMENTS
|
|
|
699
699
|
TENANT tenant name
|
|
700
700
|
```
|
|
701
701
|
|
|
702
|
-
_See code: [src/commands/transform-field.js](https://github.com/saltcorn/saltcorn/blob/v0.
|
|
702
|
+
_See code: [src/commands/transform-field.js](https://github.com/saltcorn/saltcorn/blob/v0.8.0-beta.0/src/commands/transform-field.js)_
|
|
703
703
|
<!-- commandsstop -->
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.7.4","commands":{"add-schema":{"id":"add-schema","description":"Add Saltcorn schema to existing database","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"force":{"name":"force","type":"boolean","char":"f","description":"force command execution","allowNo":false}},"args":[]},"backup":{"id":"backup","description":"Backup the PostgreSQL database to a file with pg_dump or zip","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"output":{"name":"output","type":"option","char":"o","description":"output filename"},"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"},"zip":{"name":"zip","type":"boolean","char":"z","description":"zip format","allowNo":false}},"args":[]},"build-app":{"id":"build-app","description":"build mobile app","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"tenantAppName":{"name":"tenantAppName","type":"option","description":"Optional name of a tenant application, if set, the app will be build for this tenant"},"platforms":{"name":"platforms","type":"option","char":"p","description":"Platforms to build for, space separated list"},"entryPoint":{"name":"entryPoint","type":"option","char":"e","description":"This is the first view or page (see -t) after the login."},"entryPointType":{"name":"entryPointType","type":"option","char":"t","description":"Type of the entry point ('view' or 'page'). The default is 'view'."},"localUserTables":{"name":"localUserTables","type":"option","char":"l","description":"user defined tables that should be replicated into the app"},"useDocker":{"name":"useDocker","type":"boolean","char":"d","description":"Use a docker container to build the app.","allowNo":false},"buildDirectory":{"name":"buildDirectory","type":"option","char":"b","description":"A directory where the app should be build"},"copyAppDirectory":{"name":"copyAppDirectory","type":"option","char":"c","description":"If set, the app file will be copied here"},"appFileName":{"name":"appFileName","type":"option","char":"a","description":"If set, the copied app will get this name"},"serverURL":{"name":"serverURL","type":"option","char":"s","description":"URL to a saltcorn server"},"buildForEmulator":{"name":"buildForEmulator","type":"boolean","description":"build without '--device', generates no .ipa file so that iOS apps can be build without developer accounts","allowNo":false}},"args":[]},"configuration-check-backups":{"id":"configuration-check-backups","description":"Check configuration","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"files","description":"backup file to check. can be repeated, e.g. with *","required":true}]},"configuration-check":{"id":"configuration-check","description":"Check configuration","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"}},"args":[]},"create-tenant":{"id":"create-tenant","description":"Create a tenant","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"email":{"name":"email","type":"option","char":"e","description":"Email of owner of tenant"},"description":{"name":"description","type":"option","char":"d","description":"Description of tenant"}},"args":[{"name":"tenant","description":"Tenant subdomain to create","required":true}]},"create-user":{"id":"create-user","description":"Create a new user","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"admin":{"name":"admin","type":"boolean","char":"a","description":"Admin user","allowNo":false},"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"},"email":{"name":"email","type":"option","char":"e","description":"email"},"role":{"name":"role","type":"option","char":"r","description":"role"},"password":{"name":"password","type":"option","char":"p","description":"password"}},"args":[]},"delete-tenants":{"id":"delete-tenants","description":"Delete inactive tenants","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"delete-user":{"id":"delete-user","description":"Delete user.\n\nCommand deletes the user specified by USER_EMAIL.\n\n","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"force":{"name":"force","type":"boolean","char":"f","description":"force command execution","allowNo":false},"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"}},"args":[{"name":"user_email","description":"User to delete","required":true}]},"fixtures":{"id":"fixtures","description":"Load fixtures for testing\n...\nThis manual step it is never required for users and rarely required for developers\n","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"reset":{"name":"reset","type":"boolean","char":"r","description":"Also reset schema","allowNo":false},"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"}},"args":[]},"get-cfg":{"id":"get-cfg","description":"Get a configuration value. The value is printed to stdout as a JSON value","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"},"plugin":{"name":"plugin","type":"option","char":"p","description":"plugin"}},"args":[{"name":"key","description":"Configuration key","required":true}]},"info":{"id":"info","description":"Show paths\n...\nShow configuration and file store paths\n","pluginName":"@saltcorn/cli","pluginType":"core","aliases":["paths"],"flags":{"json":{"name":"json","type":"boolean","char":"j","description":"json format","allowNo":false}},"args":[]},"inspect":{"id":"inspect","description":"Inspect an entity's JSON representation, or list entities","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"}},"args":[{"name":"type","description":"Entity type","required":true,"options":["view","page","trigger","table"]},{"name":"name","description":"Entity name. If not supplied, list all names"}]},"install-pack":{"id":"install-pack","description":"Install a pack","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"},"name":{"name":"name","type":"option","char":"n","description":"Pack name in store"},"file":{"name":"file","type":"option","char":"f","description":"File with pack JSON"}},"args":[]},"install-plugin":{"id":"install-plugin","description":"Install a plugin","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"},"name":{"name":"name","type":"option","char":"n","description":"Plugin name in store"},"directory":{"name":"directory","type":"option","char":"d","description":"Directory with local plugin"}},"args":[]},"list-tenants":{"id":"list-tenants","description":"List tenants in CSV format","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"localize-plugin":{"id":"localize-plugin","description":"Convert plugin to local plugin","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"}},"args":[{"name":"plugin","description":"Current plugin name","required":true},{"name":"path","description":"Absolute path to local plugin","required":true}]},"make-migration":{"id":"make-migration","description":"Create a new blank Database structure migration file.\nThese migrations update database structure.\nYou should not normally need to run this\nunless you are a developer.\n","usage":"make-migration","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"migrate":{"id":"migrate","description":"Run Database structure migrations\n...\nNOTE!\n- Please stop Saltcorn before run DB migrations.\n- Please make db backup before migration.\n- There are no way to rollback migration if you doesn't make backup.\n\nThis is not normally required as migrations will be run when the server starts.\nHowever, this command may be useful if you are running multiple application\nservers and need to control when the migrations are run.\n","usage":"saltcorn migrate","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"modify-user":{"id":"modify-user","description":"Modify (update) user.\n\nCommand changes the user specified by USER_EMAIL.\n\nYou can change the user group, password and email.\n\nNOTE that -a and -r role (--role=role) can give conflict.\n","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"admin":{"name":"admin","type":"boolean","char":"a","description":"make user be Admin","allowNo":false},"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"},"email":{"name":"email","type":"option","char":"e","description":"new email"},"role":{"name":"role","type":"option","char":"r","description":"new role (can conflict with -a option)"},"password":{"name":"password","type":"option","char":"p","description":"new password"},"imode":{"name":"imode","type":"boolean","char":"i","description":"interactive mode","allowNo":false}},"args":[{"name":"user_email","description":"User to modify","required":true}]},"plugins":{"id":"plugins","description":"List and upgrade plugins for tenants\n...\nExtra documentation goes here\n","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"examples":["plugins -v - verbose output of commands","plugins -u -d - dry-run for plugin update","plugins -u -f - force plugin update"],"flags":{"upgrade":{"name":"upgrade","type":"boolean","char":"u","description":"Upgrade","allowNo":false},"dryRun":{"name":"dryRun","type":"boolean","char":"d","description":"Upgrade dry-run","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"force":{"name":"force","type":"boolean","char":"f","description":"Force update","allowNo":false},"name":{"name":"name","type":"option","char":"n","description":"Plugin name"}},"args":[]},"release":{"id":"release","description":"Release a new saltcorn version","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"version","description":"New version number","required":true}]},"reset-schema":{"id":"reset-schema","description":"Reset the database\n...\nThis will delete all existing information\n","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"force":{"name":"force","type":"boolean","char":"f","description":"force command execution","allowNo":false},"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"}},"args":[]},"restore":{"id":"restore","description":"Restore a previously backed up database (zip or sqlc format)","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"}},"args":[{"name":"file","description":"backup file to restore","required":true}]},"rm-tenant":{"id":"rm-tenant","description":"Remove a tenant.\nAttention! All tenant data will be lost!\nIt recommended to make backup of tenant before perform this command.\n","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"force":{"name":"force","type":"boolean","char":"f","description":"force command execution","allowNo":false},"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant","required":true}},"args":[]},"run-benchmark":{"id":"run-benchmark","description":"Run benchmark","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"token":{"name":"token","type":"option","char":"t","description":"API Token for reporting results"},"benchmark":{"name":"benchmark","type":"option","char":"b","description":"Which benchmark to run"},"delay":{"name":"delay","type":"option","char":"d","description":"delay between runs (s)","default":30}},"args":[{"name":"baseurl","description":"Base URL","required":false}]},"run-tests":{"id":"run-tests","description":"Run test suites","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"coverage":{"name":"coverage","type":"boolean","char":"c","description":"Coverage","allowNo":false},"testFilter":{"name":"testFilter","type":"option","char":"t","description":"Filter tests by suite or test name"},"watch":{"name":"watch","type":"boolean","description":"Watch files for changes and rerun tests related to changed files.","allowNo":false},"watchAll":{"name":"watchAll","type":"boolean","description":"Watch files for changes and rerun all tests.","allowNo":false}},"args":[{"name":"package","description":"which package to run tests for"}]},"scheduler":{"id":"scheduler","description":"Run the Saltcorn scheduler","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose","allowNo":false}},"args":[]},"serve":{"id":"serve","description":"Start the Saltcorn server","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"port":{"name":"port","type":"option","char":"p","description":"port","default":3000},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose","allowNo":false},"watchReaper":{"name":"watchReaper","type":"boolean","char":"r","description":"Watch reaper","allowNo":false},"dev":{"name":"dev","type":"boolean","char":"d","description":"Run in dev mode and re-start on file changes","allowNo":false},"addschema":{"name":"addschema","type":"boolean","char":"a","description":"Add schema if missing","allowNo":false},"nomigrate":{"name":"nomigrate","type":"boolean","char":"n","description":"No migrations","allowNo":false},"noscheduler":{"name":"noscheduler","type":"boolean","char":"s","description":"No scheduler","allowNo":false},"subdomain_offset":{"name":"subdomain_offset","type":"option","description":"Number of parts to remove to access subdomain in 'multi_tenant' mode"}},"args":[]},"set-cfg":{"id":"set-cfg","description":"Set a configuration value. The supplied value (argument, or file stdin) will be parsed as JSON. If this fails, it is stored as a string.","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"},"plugin":{"name":"plugin","type":"option","char":"p","description":"plugin"},"file":{"name":"file","type":"option","char":"f","description":"file"},"stdin":{"name":"stdin","type":"boolean","char":"i","description":"read value from stdin","allowNo":false}},"args":[{"name":"key","description":"Configuration key","required":true},{"name":"value","description":"Configuration value (JSON or string)"}]},"setup-benchmark":{"id":"setup-benchmark","description":"Setup an instance for benchmarking","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"}},"args":[]},"setup":{"id":"setup","description":"Set up a new system\n...\nThis will attempt to install or connect a database, and set up a\nconfiguration file\n","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"coverage":{"name":"coverage","type":"boolean","char":"c","description":"Coverage","allowNo":false}},"args":[]},"test-plugin":{"id":"test-plugin","description":"Test a plugin\n...\nExtra documentation goes here\n","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"path","description":"path to plugin package","required":true}]},"transform-field":{"id":"transform-field","description":"transform an existing field by applying a calculated expression","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"expression","description":"expression to calculate field","required":true},{"name":"field","description":"field name","required":true},{"name":"table","description":"table name","required":true},{"name":"tenant","description":"tenant name","required":false}]}}}
|
|
1
|
+
{"version":"0.8.0-beta.0","commands":{"add-schema":{"id":"add-schema","description":"Add Saltcorn schema to existing database","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"force":{"name":"force","type":"boolean","char":"f","description":"force command execution","allowNo":false}},"args":[]},"backup":{"id":"backup","description":"Backup the PostgreSQL database to a file with pg_dump or zip","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"output":{"name":"output","type":"option","char":"o","description":"output filename"},"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"},"zip":{"name":"zip","type":"boolean","char":"z","description":"zip format","allowNo":false}},"args":[]},"build-app":{"id":"build-app","description":"build mobile app","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"tenantAppName":{"name":"tenantAppName","type":"option","description":"Optional name of a tenant application, if set, the app will be build for this tenant"},"platforms":{"name":"platforms","type":"option","char":"p","description":"Platforms to build for, space separated list"},"entryPoint":{"name":"entryPoint","type":"option","char":"e","description":"This is the first view or page (see -t) after the login."},"entryPointType":{"name":"entryPointType","type":"option","char":"t","description":"Type of the entry point ('view' or 'page'). The default is 'view'."},"localUserTables":{"name":"localUserTables","type":"option","char":"l","description":"user defined tables that should be replicated into the app"},"useDocker":{"name":"useDocker","type":"boolean","char":"d","description":"Use a docker container to build the app.","allowNo":false},"buildDirectory":{"name":"buildDirectory","type":"option","char":"b","description":"A directory where the app should be build"},"copyAppDirectory":{"name":"copyAppDirectory","type":"option","char":"c","description":"If set, the app file will be copied here"},"appFileName":{"name":"appFileName","type":"option","char":"a","description":"If set, the copied app will get this name"},"serverURL":{"name":"serverURL","type":"option","char":"s","description":"URL to a saltcorn server"},"buildForEmulator":{"name":"buildForEmulator","type":"boolean","description":"build without '--device', generates no .ipa file so that iOS apps can be build without developer accounts","allowNo":false}},"args":[]},"configuration-check-backups":{"id":"configuration-check-backups","description":"Check configuration","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"files","description":"backup file to check. can be repeated, e.g. with *","required":true}]},"configuration-check":{"id":"configuration-check","description":"Check configuration","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"}},"args":[]},"create-tenant":{"id":"create-tenant","description":"Create a tenant","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"email":{"name":"email","type":"option","char":"e","description":"Email of owner of tenant"},"description":{"name":"description","type":"option","char":"d","description":"Description of tenant"}},"args":[{"name":"tenant","description":"Tenant subdomain to create","required":true}]},"create-user":{"id":"create-user","description":"Create a new user","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"admin":{"name":"admin","type":"boolean","char":"a","description":"Admin user","allowNo":false},"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"},"email":{"name":"email","type":"option","char":"e","description":"email"},"role":{"name":"role","type":"option","char":"r","description":"role"},"password":{"name":"password","type":"option","char":"p","description":"password"}},"args":[]},"delete-tenants":{"id":"delete-tenants","description":"Delete inactive tenants","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"delete-user":{"id":"delete-user","description":"Delete user.\n\nCommand deletes the user specified by USER_EMAIL.\n\n","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"force":{"name":"force","type":"boolean","char":"f","description":"force command execution","allowNo":false},"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"}},"args":[{"name":"user_email","description":"User to delete","required":true}]},"fixtures":{"id":"fixtures","description":"Load fixtures for testing\n...\nThis manual step it is never required for users and rarely required for developers\n","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"reset":{"name":"reset","type":"boolean","char":"r","description":"Also reset schema","allowNo":false},"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"}},"args":[]},"get-cfg":{"id":"get-cfg","description":"Get a configuration value. The value is printed to stdout as a JSON value","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"},"plugin":{"name":"plugin","type":"option","char":"p","description":"plugin"}},"args":[{"name":"key","description":"Configuration key","required":true}]},"info":{"id":"info","description":"Show paths\n...\nShow configuration and file store paths\n","pluginName":"@saltcorn/cli","pluginType":"core","aliases":["paths"],"flags":{"json":{"name":"json","type":"boolean","char":"j","description":"json format","allowNo":false}},"args":[]},"inspect":{"id":"inspect","description":"Inspect an entity's JSON representation, or list entities","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"}},"args":[{"name":"type","description":"Entity type","required":true,"options":["view","page","trigger","table"]},{"name":"name","description":"Entity name. If not supplied, list all names"}]},"install-pack":{"id":"install-pack","description":"Install a pack","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"},"name":{"name":"name","type":"option","char":"n","description":"Pack name in store"},"file":{"name":"file","type":"option","char":"f","description":"File with pack JSON"}},"args":[]},"install-plugin":{"id":"install-plugin","description":"Install a plugin","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"},"name":{"name":"name","type":"option","char":"n","description":"Plugin name in store"},"directory":{"name":"directory","type":"option","char":"d","description":"Directory with local plugin"}},"args":[]},"list-tenants":{"id":"list-tenants","description":"List tenants in CSV format","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"localize-plugin":{"id":"localize-plugin","description":"Convert plugin to local plugin","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"}},"args":[{"name":"plugin","description":"Current plugin name","required":true},{"name":"path","description":"Absolute path to local plugin","required":true}]},"make-migration":{"id":"make-migration","description":"Create a new blank Database structure migration file.\nThese migrations update database structure.\nYou should not normally need to run this\nunless you are a developer.\n","usage":"make-migration","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"migrate":{"id":"migrate","description":"Run Database structure migrations\n...\nNOTE!\n- Please stop Saltcorn before run DB migrations.\n- Please make db backup before migration.\n- There are no way to rollback migration if you doesn't make backup.\n\nThis is not normally required as migrations will be run when the server starts.\nHowever, this command may be useful if you are running multiple application\nservers and need to control when the migrations are run.\n","usage":"saltcorn migrate","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"modify-user":{"id":"modify-user","description":"Modify (update) user.\n\nCommand changes the user specified by USER_EMAIL.\n\nYou can change the user group, password and email.\n\nNOTE that -a and -r role (--role=role) can give conflict.\n","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"admin":{"name":"admin","type":"boolean","char":"a","description":"make user be Admin","allowNo":false},"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"},"email":{"name":"email","type":"option","char":"e","description":"new email"},"role":{"name":"role","type":"option","char":"r","description":"new role (can conflict with -a option)"},"password":{"name":"password","type":"option","char":"p","description":"new password"},"imode":{"name":"imode","type":"boolean","char":"i","description":"interactive mode","allowNo":false}},"args":[{"name":"user_email","description":"User to modify","required":true}]},"plugins":{"id":"plugins","description":"List and upgrade plugins for tenants\n...\nExtra documentation goes here\n","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"examples":["plugins -v - verbose output of commands","plugins -u -d - dry-run for plugin update","plugins -u -f - force plugin update"],"flags":{"upgrade":{"name":"upgrade","type":"boolean","char":"u","description":"Upgrade","allowNo":false},"dryRun":{"name":"dryRun","type":"boolean","char":"d","description":"Upgrade dry-run","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"force":{"name":"force","type":"boolean","char":"f","description":"Force update","allowNo":false},"name":{"name":"name","type":"option","char":"n","description":"Plugin name"}},"args":[]},"release":{"id":"release","description":"Release a new saltcorn version","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"version","description":"New version number","required":true}]},"reset-schema":{"id":"reset-schema","description":"Reset the database\n...\nThis will delete all existing information\n","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"force":{"name":"force","type":"boolean","char":"f","description":"force command execution","allowNo":false},"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"}},"args":[]},"restore":{"id":"restore","description":"Restore a previously backed up database (zip or sqlc format)","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"}},"args":[{"name":"file","description":"backup file to restore","required":true}]},"rm-tenant":{"id":"rm-tenant","description":"Remove a tenant.\nAttention! All tenant data will be lost!\nIt recommended to make backup of tenant before perform this command.\n","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"force":{"name":"force","type":"boolean","char":"f","description":"force command execution","allowNo":false},"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant","required":true}},"args":[]},"run-benchmark":{"id":"run-benchmark","description":"Run benchmark","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"token":{"name":"token","type":"option","char":"t","description":"API Token for reporting results"},"benchmark":{"name":"benchmark","type":"option","char":"b","description":"Which benchmark to run"},"delay":{"name":"delay","type":"option","char":"d","description":"delay between runs (s)","default":30}},"args":[{"name":"baseurl","description":"Base URL","required":false}]},"run-tests":{"id":"run-tests","description":"Run test suites","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"coverage":{"name":"coverage","type":"boolean","char":"c","description":"Coverage","allowNo":false},"testFilter":{"name":"testFilter","type":"option","char":"t","description":"Filter tests by suite or test name"},"watch":{"name":"watch","type":"boolean","description":"Watch files for changes and rerun tests related to changed files.","allowNo":false},"watchAll":{"name":"watchAll","type":"boolean","description":"Watch files for changes and rerun all tests.","allowNo":false}},"args":[{"name":"package","description":"which package to run tests for"}]},"scheduler":{"id":"scheduler","description":"Run the Saltcorn scheduler","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose","allowNo":false}},"args":[]},"serve":{"id":"serve","description":"Start the Saltcorn server","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"port":{"name":"port","type":"option","char":"p","description":"port","default":3000},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose","allowNo":false},"watchReaper":{"name":"watchReaper","type":"boolean","char":"r","description":"Watch reaper","allowNo":false},"dev":{"name":"dev","type":"boolean","char":"d","description":"Run in dev mode and re-start on file changes","allowNo":false},"addschema":{"name":"addschema","type":"boolean","char":"a","description":"Add schema if missing","allowNo":false},"nomigrate":{"name":"nomigrate","type":"boolean","char":"n","description":"No migrations","allowNo":false},"noscheduler":{"name":"noscheduler","type":"boolean","char":"s","description":"No scheduler","allowNo":false},"subdomain_offset":{"name":"subdomain_offset","type":"option","description":"Number of parts to remove to access subdomain in 'multi_tenant' mode"}},"args":[]},"set-cfg":{"id":"set-cfg","description":"Set a configuration value. The supplied value (argument, or file stdin) will be parsed as JSON. If this fails, it is stored as a string.","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"},"plugin":{"name":"plugin","type":"option","char":"p","description":"plugin"},"file":{"name":"file","type":"option","char":"f","description":"file"},"stdin":{"name":"stdin","type":"boolean","char":"i","description":"read value from stdin","allowNo":false}},"args":[{"name":"key","description":"Configuration key","required":true},{"name":"value","description":"Configuration value (JSON or string)"}]},"setup-benchmark":{"id":"setup-benchmark","description":"Setup an instance for benchmarking","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"tenant":{"name":"tenant","type":"option","char":"t","description":"tenant"}},"args":[]},"setup":{"id":"setup","description":"Set up a new system\n...\nThis will attempt to install or connect a database, and set up a\nconfiguration file\n","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{"coverage":{"name":"coverage","type":"boolean","char":"c","description":"Coverage","allowNo":false}},"args":[]},"test-plugin":{"id":"test-plugin","description":"Test a plugin\n...\nExtra documentation goes here\n","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"path","description":"path to plugin package","required":true}]},"transform-field":{"id":"transform-field","description":"transform an existing field by applying a calculated expression","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"expression","description":"expression to calculate field","required":true},{"name":"field","description":"field name","required":true},{"name":"table","description":"table name","required":true},{"name":"tenant","description":"tenant name","required":false}]}}}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@saltcorn/cli",
|
|
3
3
|
"description": "Command-line interface for Saltcorn, open-source no-code platform",
|
|
4
4
|
"homepage": "https://saltcorn.com",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.8.0-beta.0",
|
|
6
6
|
"author": "Tom Nielsen @glutamate",
|
|
7
7
|
"bin": {
|
|
8
8
|
"saltcorn": "./bin/saltcorn"
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
"@oclif/config": "^1.18.3",
|
|
14
14
|
"@oclif/plugin-plugins": "^2.1.0",
|
|
15
15
|
"@oclif/plugin-help": "^3.3.1",
|
|
16
|
-
"@saltcorn/admin-models": "0.
|
|
17
|
-
"@saltcorn/data": "0.
|
|
18
|
-
"@saltcorn/mobile-app": "0.
|
|
19
|
-
"@saltcorn/mobile-builder": "0.
|
|
20
|
-
"@saltcorn/server": "0.
|
|
16
|
+
"@saltcorn/admin-models": "0.8.0-beta.0",
|
|
17
|
+
"@saltcorn/data": "0.8.0-beta.0",
|
|
18
|
+
"@saltcorn/mobile-app": "0.8.0-beta.0",
|
|
19
|
+
"@saltcorn/mobile-builder": "0.8.0-beta.0",
|
|
20
|
+
"@saltcorn/server": "0.8.0-beta.0",
|
|
21
21
|
"cli-ux": "^5.6.7",
|
|
22
22
|
"contractis": "^0.1.0",
|
|
23
23
|
"dateformat": "^3.0.3",
|
package/src/commands/backup.js
CHANGED
|
@@ -9,6 +9,7 @@ const os = require("os");
|
|
|
9
9
|
const { getConnectObject } = require("@saltcorn/data/db/connect");
|
|
10
10
|
const day = dateFormat(new Date(), "yyyymmdd");
|
|
11
11
|
const connobj = getConnectObject();
|
|
12
|
+
const { init_some_tenants } = require("../common");
|
|
12
13
|
|
|
13
14
|
const pgdb = connobj.database;
|
|
14
15
|
|
|
@@ -29,13 +30,9 @@ class BackupCommand extends Command {
|
|
|
29
30
|
if (flags.tenant) {
|
|
30
31
|
const { create_backup } = require("@saltcorn/admin-models/models/backup");
|
|
31
32
|
|
|
33
|
+
await init_some_tenants(flags.tenant);
|
|
32
34
|
const db = require("@saltcorn/data/db");
|
|
33
|
-
|
|
34
|
-
const { init_multi_tenant } = require("@saltcorn/data/db/state");
|
|
35
|
-
const { getAllTenants } = require("@saltcorn/admin-models/models/tenant");
|
|
36
|
-
await loadAllPlugins();
|
|
37
|
-
const tenants = await getAllTenants();
|
|
38
|
-
await init_multi_tenant(loadAllPlugins, undefined, tenants);
|
|
35
|
+
|
|
39
36
|
await db.runWithTenant(flags.tenant, async () => {
|
|
40
37
|
const fnm = await create_backup(flags.output);
|
|
41
38
|
console.log(fnm);
|
|
@@ -3,7 +3,6 @@ const path = require("path");
|
|
|
3
3
|
const Plugin = require("@saltcorn/data/models/plugin");
|
|
4
4
|
const { MobileBuilder } = require("@saltcorn/mobile-builder/mobile-builder");
|
|
5
5
|
const { init_multi_tenant } = require("@saltcorn/data/db/state");
|
|
6
|
-
const { getAllTenants } = require("@saltcorn/admin-models/models/tenant");
|
|
7
6
|
const { loadAllPlugins } = require("@saltcorn/server/load_plugins");
|
|
8
7
|
|
|
9
8
|
/**
|
|
@@ -42,9 +41,8 @@ class BuildAppCommand extends Command {
|
|
|
42
41
|
".."
|
|
43
42
|
);
|
|
44
43
|
const db = require("@saltcorn/data/db");
|
|
45
|
-
if (db.is_it_multi_tenant()) {
|
|
46
|
-
|
|
47
|
-
await init_multi_tenant(loadAllPlugins, true, tenants);
|
|
44
|
+
if (db.is_it_multi_tenant() && flags.tenantAppName) {
|
|
45
|
+
await init_multi_tenant(loadAllPlugins, true, [flags.tenantAppName]);
|
|
48
46
|
}
|
|
49
47
|
const doBuild = async () => {
|
|
50
48
|
const dynamicPlugins = (await Plugin.find()).filter(
|
package/src/commands/migrate.js
CHANGED
|
@@ -18,11 +18,21 @@ class MigrateCommand extends Command {
|
|
|
18
18
|
*/
|
|
19
19
|
async run() {
|
|
20
20
|
const { migrate } = require("@saltcorn/data/migrate");
|
|
21
|
+
const { loadAllPlugins } = require("@saltcorn/server/load_plugins");
|
|
22
|
+
const { init_multi_tenant } = require("@saltcorn/data/db/state");
|
|
23
|
+
await loadAllPlugins();
|
|
21
24
|
await eachTenant(async () => {
|
|
25
|
+
|
|
22
26
|
const domain = db.getTenantSchema();
|
|
27
|
+
await init_multi_tenant(loadAllPlugins, undefined, [domain]);
|
|
23
28
|
console.log("Tenant %s check for migrations...", domain);
|
|
24
|
-
|
|
29
|
+
try {
|
|
30
|
+
await migrate(domain, true);
|
|
31
|
+
} catch (e) {
|
|
32
|
+
console.error(e);
|
|
33
|
+
}
|
|
25
34
|
});
|
|
35
|
+
console.log("Done migrations");
|
|
26
36
|
this.exit(0);
|
|
27
37
|
}
|
|
28
38
|
}
|
package/src/commands/plugins.js
CHANGED
|
@@ -28,26 +28,30 @@ class PluginsCommand extends Command {
|
|
|
28
28
|
|
|
29
29
|
for (const domain of tenantList) {
|
|
30
30
|
await db.runWithTenant(domain, async () => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
31
|
+
try {
|
|
32
|
+
const myplugins = await Plugin.find(
|
|
33
|
+
flags.name ? { name: flags.name } : {}
|
|
34
|
+
);
|
|
35
|
+
myplugins.forEach((plugin) => {
|
|
36
|
+
if (
|
|
37
|
+
plugin.source === "npm" &&
|
|
38
|
+
!plugins.map((p) => p.location).includes(plugin.location)
|
|
39
|
+
) {
|
|
40
|
+
plugins.push(plugin);
|
|
41
|
+
if (flags.verbose)
|
|
42
|
+
console.log(
|
|
43
|
+
"%s\t%s\t%s\t%s",
|
|
44
|
+
plugin.location,
|
|
45
|
+
plugin.name,
|
|
46
|
+
plugin.version,
|
|
47
|
+
plugin.source
|
|
48
|
+
);
|
|
49
|
+
else console.log(plugin.location);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
} catch (e) {
|
|
53
|
+
console.error("error: ", domain, e)
|
|
54
|
+
}
|
|
51
55
|
});
|
|
52
56
|
}
|
|
53
57
|
if (flags.upgrade || flags.dryRun) {
|
|
@@ -61,31 +65,34 @@ class PluginsCommand extends Command {
|
|
|
61
65
|
console.log(new_versions);
|
|
62
66
|
for (const domain of tenantList) {
|
|
63
67
|
await db.runWithTenant(domain, async () => {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
if (
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
new_versions[plugin.location]
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
68
|
+
try {
|
|
69
|
+
|
|
70
|
+
const myplugins = await Plugin.find({});
|
|
71
|
+
for (let plugin of myplugins) {
|
|
72
|
+
if (plugin.source === "npm" && new_versions[plugin.location]) {
|
|
73
|
+
// the plugin can be up to date
|
|
74
|
+
if (
|
|
75
|
+
!flags.force &&
|
|
76
|
+
plugin.version === new_versions[plugin.location]
|
|
77
|
+
) {
|
|
78
|
+
} else if (flags.dryRun) {
|
|
79
|
+
console.log(
|
|
80
|
+
`Would upgrade ${domain}'s plugin ${plugin.location
|
|
81
|
+
} version from ${plugin.version} to ${new_versions[plugin.location]
|
|
82
|
+
}`
|
|
83
|
+
);
|
|
84
|
+
} else {
|
|
85
|
+
plugin.version = new_versions[plugin.location];
|
|
82
86
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
+
const sql_logging = db.get_sql_logging();
|
|
88
|
+
if (flags.verbose) db.set_sql_logging(true);
|
|
89
|
+
await plugin.upsert();
|
|
90
|
+
if (flags.verbose) db.set_sql_logging(sql_logging);
|
|
91
|
+
}
|
|
87
92
|
}
|
|
88
93
|
}
|
|
94
|
+
} catch (e) {
|
|
95
|
+
console.error("error: ", domain, e)
|
|
89
96
|
}
|
|
90
97
|
});
|
|
91
98
|
}
|
|
@@ -83,7 +83,7 @@ class RunBenchmarkCommand extends Command {
|
|
|
83
83
|
|
|
84
84
|
const benches = {
|
|
85
85
|
static_file: "/saltcorn.css",
|
|
86
|
-
stored_file: `/files/serve/${file.
|
|
86
|
+
stored_file: `/files/serve/${file.path_to_serve}`,
|
|
87
87
|
form_view: "/view/NewThread",
|
|
88
88
|
simple_page: "/page/simplepage",
|
|
89
89
|
complex_page: "/page/homepage",
|
package/src/commands/set-cfg.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
const { Command, flags } = require("@oclif/command");
|
|
6
6
|
const { cli } = require("cli-ux");
|
|
7
|
-
const { maybe_as_tenant, parseJSONorString } = require("../common");
|
|
7
|
+
const { maybe_as_tenant, init_some_tenants, parseJSONorString } = require("../common");
|
|
8
8
|
const fs = require("fs");
|
|
9
9
|
/**
|
|
10
10
|
* SetCfgCommand Class
|
|
@@ -29,7 +29,8 @@ class SetCfgCommand extends Command {
|
|
|
29
29
|
: flags.file
|
|
30
30
|
? fs.readFileSync(flags.file, "utf-8")
|
|
31
31
|
: args.value;
|
|
32
|
-
|
|
32
|
+
if(flags.tenant)
|
|
33
|
+
await init_some_tenants(flags.tenant);
|
|
33
34
|
await maybe_as_tenant(flags.tenant, async () => {
|
|
34
35
|
if (flags.plugin) {
|
|
35
36
|
const Plugin = require("@saltcorn/data/models/plugin");
|