@saltcorn/cli 0.7.2-beta.0 → 0.7.2-beta.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.
- package/README.md +193 -41
- package/oclif.manifest.json +1 -1
- package/package.json +10 -6
- package/src/commands/get-cfg.js +63 -0
- package/src/commands/release.js +1 -1
- package/src/commands/run-tests.js +39 -12
- package/src/commands/setup.js +34 -20
- package/CHANGELOG.md +0 -8
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.7.2-beta.
|
|
23
|
+
@saltcorn/cli/0.7.2-beta.2 linux-x64 node-v14.19.2
|
|
24
24
|
$ saltcorn --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ saltcorn COMMAND
|
|
@@ -33,11 +33,13 @@ USAGE
|
|
|
33
33
|
<!-- commands -->
|
|
34
34
|
* [`saltcorn add-schema`](#saltcorn-add-schema)
|
|
35
35
|
* [`saltcorn backup`](#saltcorn-backup)
|
|
36
|
+
* [`saltcorn build-app`](#saltcorn-build-app)
|
|
36
37
|
* [`saltcorn configuration-check`](#saltcorn-configuration-check)
|
|
37
38
|
* [`saltcorn create-tenant TENANT`](#saltcorn-create-tenant-tenant)
|
|
38
39
|
* [`saltcorn create-user`](#saltcorn-create-user)
|
|
39
40
|
* [`saltcorn delete-tenants`](#saltcorn-delete-tenants)
|
|
40
41
|
* [`saltcorn fixtures`](#saltcorn-fixtures)
|
|
42
|
+
* [`saltcorn get-cfg KEY`](#saltcorn-get-cfg-key)
|
|
41
43
|
* [`saltcorn help [COMMAND]`](#saltcorn-help-command)
|
|
42
44
|
* [`saltcorn info`](#saltcorn-info)
|
|
43
45
|
* [`saltcorn install-pack`](#saltcorn-install-pack)
|
|
@@ -47,6 +49,11 @@ USAGE
|
|
|
47
49
|
* [`saltcorn make-migration`](#saltcorn-make-migration)
|
|
48
50
|
* [`saltcorn saltcorn migrate`](#saltcorn-saltcorn-migrate)
|
|
49
51
|
* [`saltcorn plugins`](#saltcorn-plugins)
|
|
52
|
+
* [`saltcorn plugins:inspect PLUGIN...`](#saltcorn-pluginsinspect-plugin)
|
|
53
|
+
* [`saltcorn plugins:install PLUGIN...`](#saltcorn-pluginsinstall-plugin)
|
|
54
|
+
* [`saltcorn plugins:link PLUGIN`](#saltcorn-pluginslink-plugin)
|
|
55
|
+
* [`saltcorn plugins:uninstall PLUGIN...`](#saltcorn-pluginsuninstall-plugin)
|
|
56
|
+
* [`saltcorn plugins:update`](#saltcorn-pluginsupdate)
|
|
50
57
|
* [`saltcorn release VERSION`](#saltcorn-release-version)
|
|
51
58
|
* [`saltcorn reset-schema`](#saltcorn-reset-schema)
|
|
52
59
|
* [`saltcorn restore FILE`](#saltcorn-restore-file)
|
|
@@ -70,7 +77,7 @@ USAGE
|
|
|
70
77
|
$ saltcorn add-schema
|
|
71
78
|
```
|
|
72
79
|
|
|
73
|
-
_See code: [src/commands/add-schema.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.
|
|
80
|
+
_See code: [src/commands/add-schema.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.2/src/commands/add-schema.js)_
|
|
74
81
|
|
|
75
82
|
## `saltcorn backup`
|
|
76
83
|
|
|
@@ -86,7 +93,23 @@ OPTIONS
|
|
|
86
93
|
-z, --zip zip format
|
|
87
94
|
```
|
|
88
95
|
|
|
89
|
-
_See code: [src/commands/backup.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.
|
|
96
|
+
_See code: [src/commands/backup.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.2/src/commands/backup.js)_
|
|
97
|
+
|
|
98
|
+
## `saltcorn build-app`
|
|
99
|
+
|
|
100
|
+
build mobile app from tenant
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
USAGE
|
|
104
|
+
$ saltcorn build-app
|
|
105
|
+
|
|
106
|
+
OPTIONS
|
|
107
|
+
-l, --localUserTables=localUserTables user defined tables that should be replicated into the app
|
|
108
|
+
-p, --platforms=platforms Platforms to build for space separated list
|
|
109
|
+
-v, --entryPoint=entryPoint Entry Point
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
_See code: [@saltcorn/mobile-builder](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.0/dist/commands/build-app.js)_
|
|
90
113
|
|
|
91
114
|
## `saltcorn configuration-check`
|
|
92
115
|
|
|
@@ -100,7 +123,7 @@ OPTIONS
|
|
|
100
123
|
-t, --tenant=tenant tenant
|
|
101
124
|
```
|
|
102
125
|
|
|
103
|
-
_See code: [src/commands/configuration-check.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.
|
|
126
|
+
_See code: [src/commands/configuration-check.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.2/src/commands/configuration-check.js)_
|
|
104
127
|
|
|
105
128
|
## `saltcorn create-tenant TENANT`
|
|
106
129
|
|
|
@@ -118,7 +141,7 @@ OPTIONS
|
|
|
118
141
|
-e, --email=email Email of owner of tenant
|
|
119
142
|
```
|
|
120
143
|
|
|
121
|
-
_See code: [src/commands/create-tenant.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.
|
|
144
|
+
_See code: [src/commands/create-tenant.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.2/src/commands/create-tenant.js)_
|
|
122
145
|
|
|
123
146
|
## `saltcorn create-user`
|
|
124
147
|
|
|
@@ -136,7 +159,7 @@ OPTIONS
|
|
|
136
159
|
-t, --tenant=tenant tenant
|
|
137
160
|
```
|
|
138
161
|
|
|
139
|
-
_See code: [src/commands/create-user.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.
|
|
162
|
+
_See code: [src/commands/create-user.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.2/src/commands/create-user.js)_
|
|
140
163
|
|
|
141
164
|
## `saltcorn delete-tenants`
|
|
142
165
|
|
|
@@ -147,7 +170,7 @@ USAGE
|
|
|
147
170
|
$ saltcorn delete-tenants
|
|
148
171
|
```
|
|
149
172
|
|
|
150
|
-
_See code: [src/commands/delete-tenants.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.
|
|
173
|
+
_See code: [src/commands/delete-tenants.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.2/src/commands/delete-tenants.js)_
|
|
151
174
|
|
|
152
175
|
## `saltcorn fixtures`
|
|
153
176
|
|
|
@@ -166,7 +189,25 @@ DESCRIPTION
|
|
|
166
189
|
This manual step it is never required for users and rarely required for developers
|
|
167
190
|
```
|
|
168
191
|
|
|
169
|
-
_See code: [src/commands/fixtures.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.
|
|
192
|
+
_See code: [src/commands/fixtures.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.2/src/commands/fixtures.js)_
|
|
193
|
+
|
|
194
|
+
## `saltcorn get-cfg KEY`
|
|
195
|
+
|
|
196
|
+
Get a configuration value
|
|
197
|
+
|
|
198
|
+
```
|
|
199
|
+
USAGE
|
|
200
|
+
$ saltcorn get-cfg KEY
|
|
201
|
+
|
|
202
|
+
ARGUMENTS
|
|
203
|
+
KEY Configuration key
|
|
204
|
+
|
|
205
|
+
OPTIONS
|
|
206
|
+
-p, --plugin=plugin plugin
|
|
207
|
+
-t, --tenant=tenant tenant
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
_See code: [src/commands/get-cfg.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.2/src/commands/get-cfg.js)_
|
|
170
211
|
|
|
171
212
|
## `saltcorn help [COMMAND]`
|
|
172
213
|
|
|
@@ -183,7 +224,7 @@ OPTIONS
|
|
|
183
224
|
--all see all commands in CLI
|
|
184
225
|
```
|
|
185
226
|
|
|
186
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.
|
|
227
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.2.18/src/commands/help.ts)_
|
|
187
228
|
|
|
188
229
|
## `saltcorn info`
|
|
189
230
|
|
|
@@ -204,7 +245,7 @@ ALIASES
|
|
|
204
245
|
$ saltcorn paths
|
|
205
246
|
```
|
|
206
247
|
|
|
207
|
-
_See code: [src/commands/info.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.
|
|
248
|
+
_See code: [src/commands/info.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.2/src/commands/info.js)_
|
|
208
249
|
|
|
209
250
|
## `saltcorn install-pack`
|
|
210
251
|
|
|
@@ -220,7 +261,7 @@ OPTIONS
|
|
|
220
261
|
-t, --tenant=tenant tenant
|
|
221
262
|
```
|
|
222
263
|
|
|
223
|
-
_See code: [src/commands/install-pack.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.
|
|
264
|
+
_See code: [src/commands/install-pack.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.2/src/commands/install-pack.js)_
|
|
224
265
|
|
|
225
266
|
## `saltcorn install-plugin`
|
|
226
267
|
|
|
@@ -236,7 +277,7 @@ OPTIONS
|
|
|
236
277
|
-t, --tenant=tenant tenant
|
|
237
278
|
```
|
|
238
279
|
|
|
239
|
-
_See code: [src/commands/install-plugin.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.
|
|
280
|
+
_See code: [src/commands/install-plugin.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.2/src/commands/install-plugin.js)_
|
|
240
281
|
|
|
241
282
|
## `saltcorn list-tenants`
|
|
242
283
|
|
|
@@ -247,7 +288,7 @@ USAGE
|
|
|
247
288
|
$ saltcorn list-tenants
|
|
248
289
|
```
|
|
249
290
|
|
|
250
|
-
_See code: [src/commands/list-tenants.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.
|
|
291
|
+
_See code: [src/commands/list-tenants.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.2/src/commands/list-tenants.js)_
|
|
251
292
|
|
|
252
293
|
## `saltcorn localize-plugin PLUGIN PATH`
|
|
253
294
|
|
|
@@ -265,7 +306,7 @@ OPTIONS
|
|
|
265
306
|
-t, --tenant=tenant tenant
|
|
266
307
|
```
|
|
267
308
|
|
|
268
|
-
_See code: [src/commands/localize-plugin.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.
|
|
309
|
+
_See code: [src/commands/localize-plugin.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.2/src/commands/localize-plugin.js)_
|
|
269
310
|
|
|
270
311
|
## `saltcorn make-migration`
|
|
271
312
|
|
|
@@ -281,7 +322,7 @@ DESCRIPTION
|
|
|
281
322
|
unless you are a developer.
|
|
282
323
|
```
|
|
283
324
|
|
|
284
|
-
_See code: [src/commands/make-migration.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.
|
|
325
|
+
_See code: [src/commands/make-migration.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.2/src/commands/make-migration.js)_
|
|
285
326
|
|
|
286
327
|
## `saltcorn saltcorn migrate`
|
|
287
328
|
|
|
@@ -303,34 +344,145 @@ DESCRIPTION
|
|
|
303
344
|
servers and need to control when the migrations are run.
|
|
304
345
|
```
|
|
305
346
|
|
|
306
|
-
_See code: [src/commands/migrate.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.
|
|
347
|
+
_See code: [src/commands/migrate.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.2/src/commands/migrate.js)_
|
|
307
348
|
|
|
308
349
|
## `saltcorn plugins`
|
|
309
350
|
|
|
310
|
-
List
|
|
351
|
+
List installed plugins.
|
|
311
352
|
|
|
312
353
|
```
|
|
313
354
|
USAGE
|
|
314
355
|
$ saltcorn plugins
|
|
315
356
|
|
|
316
357
|
OPTIONS
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
358
|
+
--core Show core plugins.
|
|
359
|
+
|
|
360
|
+
EXAMPLE
|
|
361
|
+
$ saltcorn plugins
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.1.0/src/commands/plugins/index.ts)_
|
|
365
|
+
|
|
366
|
+
## `saltcorn plugins:inspect PLUGIN...`
|
|
367
|
+
|
|
368
|
+
Displays installation properties of a plugin.
|
|
369
|
+
|
|
370
|
+
```
|
|
371
|
+
USAGE
|
|
372
|
+
$ saltcorn plugins:inspect PLUGIN...
|
|
373
|
+
|
|
374
|
+
ARGUMENTS
|
|
375
|
+
PLUGIN [default: .] Plugin to inspect.
|
|
376
|
+
|
|
377
|
+
OPTIONS
|
|
378
|
+
-h, --help Show CLI help.
|
|
379
|
+
-v, --verbose
|
|
380
|
+
|
|
381
|
+
EXAMPLE
|
|
382
|
+
$ saltcorn plugins:inspect myplugin
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.1.0/src/commands/plugins/inspect.ts)_
|
|
386
|
+
|
|
387
|
+
## `saltcorn plugins:install PLUGIN...`
|
|
388
|
+
|
|
389
|
+
Installs a plugin into the CLI.
|
|
390
|
+
|
|
391
|
+
```
|
|
392
|
+
USAGE
|
|
393
|
+
$ saltcorn plugins:install PLUGIN...
|
|
394
|
+
|
|
395
|
+
ARGUMENTS
|
|
396
|
+
PLUGIN Plugin to install.
|
|
397
|
+
|
|
398
|
+
OPTIONS
|
|
399
|
+
-f, --force Run yarn install with force flag.
|
|
400
|
+
-h, --help Show CLI help.
|
|
401
|
+
-v, --verbose
|
|
322
402
|
|
|
323
403
|
DESCRIPTION
|
|
324
|
-
|
|
325
|
-
|
|
404
|
+
Can be installed from npm or a git url.
|
|
405
|
+
|
|
406
|
+
Installation of a user-installed plugin will override a core plugin.
|
|
407
|
+
|
|
408
|
+
e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
|
|
409
|
+
will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
|
|
410
|
+
the CLI without the need to patch and update the whole CLI.
|
|
411
|
+
|
|
412
|
+
ALIASES
|
|
413
|
+
$ saltcorn plugins:add
|
|
326
414
|
|
|
327
415
|
EXAMPLES
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
416
|
+
$ saltcorn plugins:install myplugin
|
|
417
|
+
$ saltcorn plugins:install https://github.com/someuser/someplugin
|
|
418
|
+
$ saltcorn plugins:install someuser/someplugin
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.1.0/src/commands/plugins/install.ts)_
|
|
422
|
+
|
|
423
|
+
## `saltcorn plugins:link PLUGIN`
|
|
424
|
+
|
|
425
|
+
Links a plugin into the CLI for development.
|
|
426
|
+
|
|
427
|
+
```
|
|
428
|
+
USAGE
|
|
429
|
+
$ saltcorn plugins:link PLUGIN
|
|
430
|
+
|
|
431
|
+
ARGUMENTS
|
|
432
|
+
PATH [default: .] path to plugin
|
|
433
|
+
|
|
434
|
+
OPTIONS
|
|
435
|
+
-h, --help Show CLI help.
|
|
436
|
+
-v, --verbose
|
|
437
|
+
|
|
438
|
+
DESCRIPTION
|
|
439
|
+
Installation of a linked plugin will override a user-installed or core plugin.
|
|
440
|
+
|
|
441
|
+
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
|
|
442
|
+
command will override the user-installed or core plugin implementation. This is useful for development work.
|
|
443
|
+
|
|
444
|
+
EXAMPLE
|
|
445
|
+
$ saltcorn plugins:link myplugin
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.1.0/src/commands/plugins/link.ts)_
|
|
449
|
+
|
|
450
|
+
## `saltcorn plugins:uninstall PLUGIN...`
|
|
451
|
+
|
|
452
|
+
Removes a plugin from the CLI.
|
|
453
|
+
|
|
454
|
+
```
|
|
455
|
+
USAGE
|
|
456
|
+
$ saltcorn plugins:uninstall PLUGIN...
|
|
457
|
+
|
|
458
|
+
ARGUMENTS
|
|
459
|
+
PLUGIN plugin to uninstall
|
|
460
|
+
|
|
461
|
+
OPTIONS
|
|
462
|
+
-h, --help Show CLI help.
|
|
463
|
+
-v, --verbose
|
|
464
|
+
|
|
465
|
+
ALIASES
|
|
466
|
+
$ saltcorn plugins:unlink
|
|
467
|
+
$ saltcorn plugins:remove
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.1.0/src/commands/plugins/uninstall.ts)_
|
|
471
|
+
|
|
472
|
+
## `saltcorn plugins:update`
|
|
473
|
+
|
|
474
|
+
Update installed plugins.
|
|
475
|
+
|
|
476
|
+
```
|
|
477
|
+
USAGE
|
|
478
|
+
$ saltcorn plugins:update
|
|
479
|
+
|
|
480
|
+
OPTIONS
|
|
481
|
+
-h, --help Show CLI help.
|
|
482
|
+
-v, --verbose
|
|
331
483
|
```
|
|
332
484
|
|
|
333
|
-
_See code: [
|
|
485
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.1.0/src/commands/plugins/update.ts)_
|
|
334
486
|
|
|
335
487
|
## `saltcorn release VERSION`
|
|
336
488
|
|
|
@@ -344,7 +496,7 @@ ARGUMENTS
|
|
|
344
496
|
VERSION New version number
|
|
345
497
|
```
|
|
346
498
|
|
|
347
|
-
_See code: [src/commands/release.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.
|
|
499
|
+
_See code: [src/commands/release.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.2/src/commands/release.js)_
|
|
348
500
|
|
|
349
501
|
## `saltcorn reset-schema`
|
|
350
502
|
|
|
@@ -363,7 +515,7 @@ DESCRIPTION
|
|
|
363
515
|
This will delete all existing information
|
|
364
516
|
```
|
|
365
517
|
|
|
366
|
-
_See code: [src/commands/reset-schema.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.
|
|
518
|
+
_See code: [src/commands/reset-schema.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.2/src/commands/reset-schema.js)_
|
|
367
519
|
|
|
368
520
|
## `saltcorn restore FILE`
|
|
369
521
|
|
|
@@ -380,7 +532,7 @@ OPTIONS
|
|
|
380
532
|
-t, --tenant=tenant tenant
|
|
381
533
|
```
|
|
382
534
|
|
|
383
|
-
_See code: [src/commands/restore.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.
|
|
535
|
+
_See code: [src/commands/restore.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.2/src/commands/restore.js)_
|
|
384
536
|
|
|
385
537
|
## `saltcorn rm-tenant TENANT`
|
|
386
538
|
|
|
@@ -394,7 +546,7 @@ ARGUMENTS
|
|
|
394
546
|
TENANT Tenant to remove
|
|
395
547
|
```
|
|
396
548
|
|
|
397
|
-
_See code: [src/commands/rm-tenant.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.
|
|
549
|
+
_See code: [src/commands/rm-tenant.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.2/src/commands/rm-tenant.js)_
|
|
398
550
|
|
|
399
551
|
## `saltcorn run-benchmark [BASEURL]`
|
|
400
552
|
|
|
@@ -413,7 +565,7 @@ OPTIONS
|
|
|
413
565
|
-t, --token=token API Token for reporting results
|
|
414
566
|
```
|
|
415
567
|
|
|
416
|
-
_See code: [src/commands/run-benchmark.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.
|
|
568
|
+
_See code: [src/commands/run-benchmark.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.2/src/commands/run-benchmark.js)_
|
|
417
569
|
|
|
418
570
|
## `saltcorn run-tests [PACKAGE]`
|
|
419
571
|
|
|
@@ -433,7 +585,7 @@ OPTIONS
|
|
|
433
585
|
--watchAll Watch files for changes and rerun all tests.
|
|
434
586
|
```
|
|
435
587
|
|
|
436
|
-
_See code: [src/commands/run-tests.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.
|
|
588
|
+
_See code: [src/commands/run-tests.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.2/src/commands/run-tests.js)_
|
|
437
589
|
|
|
438
590
|
## `saltcorn scheduler`
|
|
439
591
|
|
|
@@ -447,7 +599,7 @@ OPTIONS
|
|
|
447
599
|
-v, --verbose Verbose
|
|
448
600
|
```
|
|
449
601
|
|
|
450
|
-
_See code: [src/commands/scheduler.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.
|
|
602
|
+
_See code: [src/commands/scheduler.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.2/src/commands/scheduler.js)_
|
|
451
603
|
|
|
452
604
|
## `saltcorn serve`
|
|
453
605
|
|
|
@@ -467,7 +619,7 @@ OPTIONS
|
|
|
467
619
|
-v, --verbose Verbose
|
|
468
620
|
```
|
|
469
621
|
|
|
470
|
-
_See code: [src/commands/serve.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.
|
|
622
|
+
_See code: [src/commands/serve.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.2/src/commands/serve.js)_
|
|
471
623
|
|
|
472
624
|
## `saltcorn set-cfg KEY VALUE`
|
|
473
625
|
|
|
@@ -486,7 +638,7 @@ OPTIONS
|
|
|
486
638
|
-t, --tenant=tenant tenant
|
|
487
639
|
```
|
|
488
640
|
|
|
489
|
-
_See code: [src/commands/set-cfg.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.
|
|
641
|
+
_See code: [src/commands/set-cfg.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.2/src/commands/set-cfg.js)_
|
|
490
642
|
|
|
491
643
|
## `saltcorn setup`
|
|
492
644
|
|
|
@@ -505,7 +657,7 @@ DESCRIPTION
|
|
|
505
657
|
configuration file
|
|
506
658
|
```
|
|
507
659
|
|
|
508
|
-
_See code: [src/commands/setup.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.
|
|
660
|
+
_See code: [src/commands/setup.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.2/src/commands/setup.js)_
|
|
509
661
|
|
|
510
662
|
## `saltcorn setup-benchmark`
|
|
511
663
|
|
|
@@ -519,7 +671,7 @@ OPTIONS
|
|
|
519
671
|
-t, --tenant=tenant tenant
|
|
520
672
|
```
|
|
521
673
|
|
|
522
|
-
_See code: [src/commands/setup-benchmark.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.
|
|
674
|
+
_See code: [src/commands/setup-benchmark.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.2/src/commands/setup-benchmark.js)_
|
|
523
675
|
|
|
524
676
|
## `saltcorn test-plugin PATH`
|
|
525
677
|
|
|
@@ -537,7 +689,7 @@ DESCRIPTION
|
|
|
537
689
|
Extra documentation goes here
|
|
538
690
|
```
|
|
539
691
|
|
|
540
|
-
_See code: [src/commands/test-plugin.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.
|
|
692
|
+
_See code: [src/commands/test-plugin.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.2/src/commands/test-plugin.js)_
|
|
541
693
|
|
|
542
694
|
## `saltcorn transform-field EXPRESSION FIELD TABLE [TENANT]`
|
|
543
695
|
|
|
@@ -554,5 +706,5 @@ ARGUMENTS
|
|
|
554
706
|
TENANT tenant name
|
|
555
707
|
```
|
|
556
708
|
|
|
557
|
-
_See code: [src/commands/transform-field.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.
|
|
709
|
+
_See code: [src/commands/transform-field.js](https://github.com/saltcorn/saltcorn/blob/v0.7.2-beta.2/src/commands/transform-field.js)_
|
|
558
710
|
<!-- commandsstop -->
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.7.2-beta.0","commands":{"add-schema":{"id":"add-schema","description":"Add Saltcorn schema to existing database","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{},"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":[]},"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":[]},"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":[]},"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":[]},"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":[]},"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","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","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"tenant","description":"Tenant to remove","required":true}]},"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}},"args":[]},"set-cfg":{"id":"set-cfg","description":"Set a configuration 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},{"name":"value","description":"Configuration value (JSON or string)","required":true}]},"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.7.2-beta.2","commands":{"add-schema":{"id":"add-schema","description":"Add Saltcorn schema to existing database","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{},"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":[]},"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":[]},"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","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":[]},"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":[]},"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","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","pluginName":"@saltcorn/cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"tenant","description":"Tenant to remove","required":true}]},"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}},"args":[]},"set-cfg":{"id":"set-cfg","description":"Set a configuration 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},{"name":"value","description":"Configuration value (JSON or string)","required":true}]},"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.7.2-beta.
|
|
5
|
+
"version": "0.7.2-beta.2",
|
|
6
6
|
"author": "Tom Nielsen @glutamate",
|
|
7
7
|
"bin": {
|
|
8
8
|
"saltcorn": "./bin/saltcorn"
|
|
@@ -11,10 +11,12 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@oclif/command": "^1.8.16",
|
|
13
13
|
"@oclif/config": "^1.18.3",
|
|
14
|
+
"@oclif/plugin-plugins": "^2.1.0",
|
|
14
15
|
"@oclif/plugin-help": "^3.3.1",
|
|
15
|
-
"@saltcorn/admin-models": "0.7.2-beta.
|
|
16
|
-
"@saltcorn/data": "0.7.2-beta.
|
|
17
|
-
"@saltcorn/
|
|
16
|
+
"@saltcorn/admin-models": "0.7.2-beta.2",
|
|
17
|
+
"@saltcorn/data": "0.7.2-beta.2",
|
|
18
|
+
"@saltcorn/mobile-builder": "0.7.2-beta.0",
|
|
19
|
+
"@saltcorn/server": "0.7.2-beta.2",
|
|
18
20
|
"cli-ux": "^5.6.7",
|
|
19
21
|
"contractis": "^0.1.0",
|
|
20
22
|
"dateformat": "^3.0.3",
|
|
@@ -50,7 +52,9 @@
|
|
|
50
52
|
"commands": "./src/commands",
|
|
51
53
|
"bin": "saltcorn",
|
|
52
54
|
"plugins": [
|
|
53
|
-
"@oclif/plugin-help"
|
|
55
|
+
"@oclif/plugin-help",
|
|
56
|
+
"@oclif/plugin-plugins",
|
|
57
|
+
"@saltcorn/mobile-builder"
|
|
54
58
|
]
|
|
55
59
|
},
|
|
56
60
|
"repository": "github:saltcorn/saltcorn",
|
|
@@ -65,4 +69,4 @@
|
|
|
65
69
|
"publishConfig": {
|
|
66
70
|
"access": "public"
|
|
67
71
|
}
|
|
68
|
-
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @category saltcorn-cli
|
|
3
|
+
* @module commands/set-cfg
|
|
4
|
+
*/
|
|
5
|
+
const { Command, flags } = require("@oclif/command");
|
|
6
|
+
const { cli } = require("cli-ux");
|
|
7
|
+
const { maybe_as_tenant, init_some_tenants } = require("../common");
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* SetCfgCommand Class
|
|
11
|
+
* @extends oclif.Command
|
|
12
|
+
* @category saltcorn-cli
|
|
13
|
+
*/
|
|
14
|
+
class SetCfgCommand extends Command {
|
|
15
|
+
/**
|
|
16
|
+
* @returns {Promise<void>}
|
|
17
|
+
*/
|
|
18
|
+
async run() {
|
|
19
|
+
const { args, flags } = this.parse(SetCfgCommand);
|
|
20
|
+
await init_some_tenants(flags.tenant);
|
|
21
|
+
|
|
22
|
+
await maybe_as_tenant(flags.tenant, async () => {
|
|
23
|
+
if (flags.plugin) {
|
|
24
|
+
const Plugin = require("@saltcorn/data/models/plugin");
|
|
25
|
+
const plugin = await Plugin.findOne({ name: flags.plugin });
|
|
26
|
+
console.log(JSON.stringify(plugin.configuration[args.key], null, 2));
|
|
27
|
+
await plugin.upsert();
|
|
28
|
+
} else {
|
|
29
|
+
const { getState } = require("@saltcorn/data/db/state");
|
|
30
|
+
console.log(JSON.stringify(getState().getConfig(args.key), null, 2));
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
this.exit(0);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @type {string}
|
|
39
|
+
*/
|
|
40
|
+
SetCfgCommand.description = `Get a configuration value`;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @type {object[]}
|
|
44
|
+
*/
|
|
45
|
+
SetCfgCommand.args = [
|
|
46
|
+
{ name: "key", required: true, description: "Configuration key" },
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @type {object}
|
|
51
|
+
*/
|
|
52
|
+
SetCfgCommand.flags = {
|
|
53
|
+
tenant: flags.string({
|
|
54
|
+
char: "t",
|
|
55
|
+
description: "tenant",
|
|
56
|
+
}),
|
|
57
|
+
plugin: flags.string({
|
|
58
|
+
char: "p",
|
|
59
|
+
description: "plugin",
|
|
60
|
+
}),
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
module.exports = SetCfgCommand;
|
package/src/commands/release.js
CHANGED
|
@@ -32,26 +32,34 @@ class RunTestsCommand extends Command {
|
|
|
32
32
|
return res;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
* @returns {Promise<void>}
|
|
39
|
-
*/
|
|
40
|
-
async e2etest(env) {
|
|
35
|
+
async prepareTestServer(env, port) {
|
|
36
|
+
let serverEnv = JSON.parse(JSON.stringify(env));
|
|
37
|
+
serverEnv.SQLITE_FILEPATH = "/tmp/sctestdb_server";
|
|
41
38
|
spawnSync("packages/saltcorn-cli/bin/saltcorn", ["fixtures", "-r"], {
|
|
42
39
|
stdio: "inherit",
|
|
43
|
-
env,
|
|
40
|
+
env: serverEnv,
|
|
44
41
|
});
|
|
45
42
|
|
|
46
43
|
const server = spawn(
|
|
47
44
|
"packages/saltcorn-cli/bin/saltcorn",
|
|
48
|
-
["serve", "-p",
|
|
45
|
+
["serve", "-p", port],
|
|
49
46
|
{
|
|
50
47
|
stdio: "inherit",
|
|
51
|
-
env,
|
|
48
|
+
env: serverEnv,
|
|
52
49
|
}
|
|
53
50
|
);
|
|
54
51
|
await sleep(2000);
|
|
52
|
+
return server;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @param {*} env
|
|
58
|
+
* @returns {Promise<void>}
|
|
59
|
+
*/
|
|
60
|
+
async e2etest(env) {
|
|
61
|
+
const port = 2987;
|
|
62
|
+
const server = await this.prepareTestServer(env, port);
|
|
55
63
|
const res = await this.do_test(
|
|
56
64
|
"npm",
|
|
57
65
|
["run", "gotest"],
|
|
@@ -63,6 +71,23 @@ class RunTestsCommand extends Command {
|
|
|
63
71
|
if (res.status !== 0) this.exit(res.status);
|
|
64
72
|
}
|
|
65
73
|
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* @param {*} env
|
|
77
|
+
*/
|
|
78
|
+
async remoteQueryTest(env, jestParams) {
|
|
79
|
+
const port = 3000;
|
|
80
|
+
env.jwt_secret = require("@saltcorn/data/db").connectObj.jwt_secret;
|
|
81
|
+
const server = await this.prepareTestServer(env, port);
|
|
82
|
+
const res = await this.do_test(
|
|
83
|
+
"npm",
|
|
84
|
+
["run", "remote-queries-test", ...jestParams],
|
|
85
|
+
env,
|
|
86
|
+
"packages/saltcorn-data"
|
|
87
|
+
);
|
|
88
|
+
server.kill();
|
|
89
|
+
if (res.status !== 0) this.exit(res.status);
|
|
90
|
+
}
|
|
66
91
|
/**
|
|
67
92
|
*
|
|
68
93
|
* @param {object} args
|
|
@@ -91,9 +116,6 @@ class RunTestsCommand extends Command {
|
|
|
91
116
|
this.validateCall(args, flags);
|
|
92
117
|
var env;
|
|
93
118
|
|
|
94
|
-
spawnSync("npm", ["run", "tsc"], {
|
|
95
|
-
stdio: "inherit",
|
|
96
|
-
});
|
|
97
119
|
const db = require("@saltcorn/data/db");
|
|
98
120
|
if (db.isSQLite) {
|
|
99
121
|
const testdbpath = "/tmp/sctestdb";
|
|
@@ -103,6 +125,9 @@ class RunTestsCommand extends Command {
|
|
|
103
125
|
await db.changeConnection({ database: "saltcorn_test" });
|
|
104
126
|
env = { ...process.env, PGDATABASE: "saltcorn_test" };
|
|
105
127
|
}
|
|
128
|
+
spawnSync("npm", ["run", "tsc"], {
|
|
129
|
+
stdio: "inherit",
|
|
130
|
+
});
|
|
106
131
|
const fixtures = require("@saltcorn/data/db/fixtures");
|
|
107
132
|
const reset = require("@saltcorn/data/db/reset_schema");
|
|
108
133
|
await reset();
|
|
@@ -123,6 +148,8 @@ class RunTestsCommand extends Command {
|
|
|
123
148
|
}
|
|
124
149
|
if (args.package === "core") {
|
|
125
150
|
await this.do_test("npm", ["run", "test", ...jestParams], env);
|
|
151
|
+
} else if (args.package === "view-queries") {
|
|
152
|
+
await this.remoteQueryTest(env, jestParams);
|
|
126
153
|
} else if (args.package === "e2e") {
|
|
127
154
|
await this.e2etest(env);
|
|
128
155
|
} else if (args.package) {
|
package/src/commands/setup.js
CHANGED
|
@@ -14,12 +14,13 @@ const { is } = require("contractis");
|
|
|
14
14
|
const path = require("path");
|
|
15
15
|
const fs = require("fs");
|
|
16
16
|
const inquirer = require("inquirer");
|
|
17
|
-
|
|
17
|
+
const tcpPortUsed = require("tcp-port-used");
|
|
18
18
|
const { spawnSync } = require("child_process");
|
|
19
|
-
|
|
19
|
+
const sudo = require("sudo");
|
|
20
|
+
const crypto = require("crypto");
|
|
20
21
|
|
|
21
22
|
/**
|
|
22
|
-
*
|
|
23
|
+
*
|
|
23
24
|
* @returns {string}
|
|
24
25
|
*/
|
|
25
26
|
const gen_password = () => {
|
|
@@ -28,8 +29,12 @@ const gen_password = () => {
|
|
|
28
29
|
else return gen_password();
|
|
29
30
|
};
|
|
30
31
|
|
|
32
|
+
const genJwtSecret = () => {
|
|
33
|
+
return crypto.randomBytes(64).toString("hex");
|
|
34
|
+
};
|
|
35
|
+
|
|
31
36
|
/**
|
|
32
|
-
*
|
|
37
|
+
*
|
|
33
38
|
* @returns {Promise<object>}
|
|
34
39
|
*/
|
|
35
40
|
const askDevServer = async () => {
|
|
@@ -58,8 +63,8 @@ const askDevServer = async () => {
|
|
|
58
63
|
};
|
|
59
64
|
|
|
60
65
|
/**
|
|
61
|
-
*
|
|
62
|
-
* @param {*} mod
|
|
66
|
+
*
|
|
67
|
+
* @param {*} mod
|
|
63
68
|
*/
|
|
64
69
|
const unloadModule = (mod) => {
|
|
65
70
|
var name = require.resolve(mod);
|
|
@@ -73,7 +78,12 @@ const setupDevMode = async () => {
|
|
|
73
78
|
const dbPath = path.join(defaultDataPath, "scdb.sqlite");
|
|
74
79
|
fs.promises.mkdir(defaultDataPath, { recursive: true });
|
|
75
80
|
const session_secret = gen_password();
|
|
76
|
-
|
|
81
|
+
const jwt_secret = genJwtSecret();
|
|
82
|
+
await write_connection_config({
|
|
83
|
+
sqlite_path: dbPath,
|
|
84
|
+
session_secret,
|
|
85
|
+
jwt_secret,
|
|
86
|
+
});
|
|
77
87
|
|
|
78
88
|
if (!fs.existsSync(dbPath)) {
|
|
79
89
|
unloadModule("@saltcorn/data/db");
|
|
@@ -115,8 +125,8 @@ const check_db = async () => {
|
|
|
115
125
|
};
|
|
116
126
|
|
|
117
127
|
/**
|
|
118
|
-
*
|
|
119
|
-
* @param {*} args
|
|
128
|
+
*
|
|
129
|
+
* @param {*} args
|
|
120
130
|
* @returns {Promise<void>}
|
|
121
131
|
*/
|
|
122
132
|
const asyncSudo = (args) => {
|
|
@@ -136,8 +146,8 @@ const asyncSudo = (args) => {
|
|
|
136
146
|
};
|
|
137
147
|
|
|
138
148
|
/**
|
|
139
|
-
*
|
|
140
|
-
* @param {*} args
|
|
149
|
+
*
|
|
150
|
+
* @param {*} args
|
|
141
151
|
* @returns {Promise<void>}
|
|
142
152
|
*/
|
|
143
153
|
const asyncSudoPostgres = (args) => {
|
|
@@ -145,8 +155,8 @@ const asyncSudoPostgres = (args) => {
|
|
|
145
155
|
};
|
|
146
156
|
|
|
147
157
|
/**
|
|
148
|
-
*
|
|
149
|
-
* @param {string} for_who
|
|
158
|
+
*
|
|
159
|
+
* @param {string} for_who
|
|
150
160
|
* @returns {Promise<string>}
|
|
151
161
|
*/
|
|
152
162
|
const get_password = async (for_who) => {
|
|
@@ -204,6 +214,7 @@ const install_db = async () => {
|
|
|
204
214
|
`ALTER SCHEMA public OWNER TO ${user};`,
|
|
205
215
|
]);
|
|
206
216
|
const session_secret = await get_password("session secret");
|
|
217
|
+
const jwt_secret = genJwtSecret();
|
|
207
218
|
await write_connection_config({
|
|
208
219
|
host: "localhost",
|
|
209
220
|
port: 5432,
|
|
@@ -211,12 +222,13 @@ const install_db = async () => {
|
|
|
211
222
|
user,
|
|
212
223
|
password: scpass,
|
|
213
224
|
session_secret,
|
|
225
|
+
jwt_secret,
|
|
214
226
|
multi_tenant: false,
|
|
215
227
|
});
|
|
216
228
|
};
|
|
217
229
|
|
|
218
230
|
/**
|
|
219
|
-
*
|
|
231
|
+
*
|
|
220
232
|
* @returns {Promise<object>}
|
|
221
233
|
*/
|
|
222
234
|
const prompt_connection = async () => {
|
|
@@ -236,6 +248,7 @@ const prompt_connection = async () => {
|
|
|
236
248
|
required: true,
|
|
237
249
|
});
|
|
238
250
|
const session_secret = await get_password("session secret");
|
|
251
|
+
const jwt_secret = genJwtSecret();
|
|
239
252
|
return {
|
|
240
253
|
host: host || "localhost",
|
|
241
254
|
port: port || 5432,
|
|
@@ -243,6 +256,7 @@ const prompt_connection = async () => {
|
|
|
243
256
|
user: user || "saltcorn",
|
|
244
257
|
password: password,
|
|
245
258
|
session_secret,
|
|
259
|
+
jwt_secret,
|
|
246
260
|
multi_tenant: false,
|
|
247
261
|
};
|
|
248
262
|
};
|
|
@@ -256,8 +270,8 @@ const setup_connection_config = async () => {
|
|
|
256
270
|
};
|
|
257
271
|
|
|
258
272
|
/**
|
|
259
|
-
*
|
|
260
|
-
* @param {object} connobj
|
|
273
|
+
*
|
|
274
|
+
* @param {object} connobj
|
|
261
275
|
* @returns {Promise<void>}
|
|
262
276
|
*/
|
|
263
277
|
const write_connection_config = async (connobj) => {
|
|
@@ -290,9 +304,9 @@ const setup_connection = async () => {
|
|
|
290
304
|
};
|
|
291
305
|
|
|
292
306
|
/**
|
|
293
|
-
*
|
|
294
|
-
* @param {object} db
|
|
295
|
-
* @param {string} tblname
|
|
307
|
+
*
|
|
308
|
+
* @param {object} db
|
|
309
|
+
* @param {string} tblname
|
|
296
310
|
* @returns {Promise<boolean>}
|
|
297
311
|
*/
|
|
298
312
|
const table_exists = async (db, tblname) => {
|
|
@@ -346,7 +360,7 @@ class SetupCommand extends Command {
|
|
|
346
360
|
* @returns {Promise<void>}
|
|
347
361
|
*/
|
|
348
362
|
async run() {
|
|
349
|
-
console.log("Run
|
|
363
|
+
console.log("Run setup");
|
|
350
364
|
const mode = await askDevServer();
|
|
351
365
|
if (mode == "server") {
|
|
352
366
|
// check if i already know how to connect
|
package/CHANGELOG.md
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
## [0.4.5](https://github.com/saltcorn/saltcorn/compare/v0.4.5-beta.1...v0.4.5) (2021-05-07)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @saltcorn/cli
|