@saltcorn/cli 1.1.4-alpha.2 → 1.1.4-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 +63 -56
- package/npm-shrinkwrap.json +105 -105
- package/oclif.manifest.json +23 -2
- package/package.json +8 -8
- package/src/commands/info.js +22 -4
- package/src/commands/install-pack.js +2 -2
- package/src/commands/install-plugin.js +2 -2
- package/src/commands/run-trigger.js +6 -2
- package/src/commands/serve.js +7 -0
- package/src/common.js +18 -0
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ $ npm install -g @saltcorn/cli
|
|
|
20
20
|
$ saltcorn COMMAND
|
|
21
21
|
running command...
|
|
22
22
|
$ saltcorn (--version)
|
|
23
|
-
@saltcorn/cli/1.1.4-
|
|
23
|
+
@saltcorn/cli/1.1.4-beta.0 linux-x64 node-v18.20.8
|
|
24
24
|
$ saltcorn --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ saltcorn COMMAND
|
|
@@ -51,7 +51,7 @@ USAGE
|
|
|
51
51
|
* [`saltcorn dev:translate LOCALE`](#saltcorn-devtranslate-locale)
|
|
52
52
|
* [`saltcorn fixtures`](#saltcorn-fixtures)
|
|
53
53
|
* [`saltcorn get-cfg [KEY]`](#saltcorn-get-cfg-key)
|
|
54
|
-
* [`saltcorn info`](#saltcorn-info)
|
|
54
|
+
* [`saltcorn info [KEY]`](#saltcorn-info-key)
|
|
55
55
|
* [`saltcorn inspect TYPE [NAME]`](#saltcorn-inspect-type-name)
|
|
56
56
|
* [`saltcorn install-pack`](#saltcorn-install-pack)
|
|
57
57
|
* [`saltcorn install-plugin`](#saltcorn-install-plugin)
|
|
@@ -60,7 +60,7 @@ USAGE
|
|
|
60
60
|
* [`saltcorn list-users`](#saltcorn-list-users)
|
|
61
61
|
* [`saltcorn saltcorn migrate`](#saltcorn-saltcorn-migrate)
|
|
62
62
|
* [`saltcorn modify-user USER_EMAIL`](#saltcorn-modify-user-user_email)
|
|
63
|
-
* [`saltcorn paths`](#saltcorn-paths)
|
|
63
|
+
* [`saltcorn paths [KEY]`](#saltcorn-paths-key)
|
|
64
64
|
* [`saltcorn plugins`](#saltcorn-plugins)
|
|
65
65
|
* [`saltcorn prepare`](#saltcorn-prepare)
|
|
66
66
|
* [`saltcorn reset-schema`](#saltcorn-reset-schema)
|
|
@@ -96,7 +96,7 @@ DESCRIPTION
|
|
|
96
96
|
Add Saltcorn schema to existing database
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
_See code: [src/commands/add-schema.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
99
|
+
_See code: [src/commands/add-schema.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/add-schema.js)_
|
|
100
100
|
|
|
101
101
|
## `saltcorn backup`
|
|
102
102
|
|
|
@@ -117,7 +117,7 @@ DESCRIPTION
|
|
|
117
117
|
Backup the PostgreSQL database to a file with pg_dump or saltcorn backup zip
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
_See code: [src/commands/backup.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
120
|
+
_See code: [src/commands/backup.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/backup.js)_
|
|
121
121
|
|
|
122
122
|
## `saltcorn build-app`
|
|
123
123
|
|
|
@@ -175,7 +175,7 @@ DESCRIPTION
|
|
|
175
175
|
Build mobile app
|
|
176
176
|
```
|
|
177
177
|
|
|
178
|
-
_See code: [src/commands/build-app.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
178
|
+
_See code: [src/commands/build-app.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/build-app.js)_
|
|
179
179
|
|
|
180
180
|
## `saltcorn build-capacitor-builder`
|
|
181
181
|
|
|
@@ -193,7 +193,7 @@ DESCRIPTION
|
|
|
193
193
|
Build the 'saltcorn/capacitor-builder' docker image or pull it from docker hub.
|
|
194
194
|
```
|
|
195
195
|
|
|
196
|
-
_See code: [src/commands/build-capacitor-builder.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
196
|
+
_See code: [src/commands/build-capacitor-builder.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/build-capacitor-builder.js)_
|
|
197
197
|
|
|
198
198
|
## `saltcorn configuration-check`
|
|
199
199
|
|
|
@@ -210,7 +210,7 @@ DESCRIPTION
|
|
|
210
210
|
Check configuration
|
|
211
211
|
```
|
|
212
212
|
|
|
213
|
-
_See code: [src/commands/configuration-check.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
213
|
+
_See code: [src/commands/configuration-check.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/configuration-check.js)_
|
|
214
214
|
|
|
215
215
|
## `saltcorn configuration-check-backups FILES`
|
|
216
216
|
|
|
@@ -230,7 +230,7 @@ DESCRIPTION
|
|
|
230
230
|
Check configuration
|
|
231
231
|
```
|
|
232
232
|
|
|
233
|
-
_See code: [src/commands/configuration-check-backups.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
233
|
+
_See code: [src/commands/configuration-check-backups.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/configuration-check-backups.js)_
|
|
234
234
|
|
|
235
235
|
## `saltcorn create-tenant TENANT`
|
|
236
236
|
|
|
@@ -252,7 +252,7 @@ DESCRIPTION
|
|
|
252
252
|
Create a tenant
|
|
253
253
|
```
|
|
254
254
|
|
|
255
|
-
_See code: [src/commands/create-tenant.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
255
|
+
_See code: [src/commands/create-tenant.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/create-tenant.js)_
|
|
256
256
|
|
|
257
257
|
## `saltcorn create-user`
|
|
258
258
|
|
|
@@ -273,7 +273,7 @@ DESCRIPTION
|
|
|
273
273
|
Create a new user
|
|
274
274
|
```
|
|
275
275
|
|
|
276
|
-
_See code: [src/commands/create-user.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
276
|
+
_See code: [src/commands/create-user.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/create-user.js)_
|
|
277
277
|
|
|
278
278
|
## `saltcorn delete-tenants`
|
|
279
279
|
|
|
@@ -287,7 +287,7 @@ DESCRIPTION
|
|
|
287
287
|
Delete inactive tenants
|
|
288
288
|
```
|
|
289
289
|
|
|
290
|
-
_See code: [src/commands/delete-tenants.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
290
|
+
_See code: [src/commands/delete-tenants.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/delete-tenants.js)_
|
|
291
291
|
|
|
292
292
|
## `saltcorn delete-user USER_EMAIL`
|
|
293
293
|
|
|
@@ -310,7 +310,7 @@ DESCRIPTION
|
|
|
310
310
|
Command deletes the user specified by USER_EMAIL.
|
|
311
311
|
```
|
|
312
312
|
|
|
313
|
-
_See code: [src/commands/delete-user.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
313
|
+
_See code: [src/commands/delete-user.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/delete-user.js)_
|
|
314
314
|
|
|
315
315
|
## `saltcorn dev:localize-plugin PLUGIN [PATH]`
|
|
316
316
|
|
|
@@ -332,7 +332,7 @@ DESCRIPTION
|
|
|
332
332
|
Convert plugin to local plugin
|
|
333
333
|
```
|
|
334
334
|
|
|
335
|
-
_See code: [src/commands/dev/localize-plugin.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
335
|
+
_See code: [src/commands/dev/localize-plugin.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/dev/localize-plugin.js)_
|
|
336
336
|
|
|
337
337
|
## `saltcorn make-migration`
|
|
338
338
|
|
|
@@ -349,7 +349,7 @@ DESCRIPTION
|
|
|
349
349
|
unless you are a developer.
|
|
350
350
|
```
|
|
351
351
|
|
|
352
|
-
_See code: [src/commands/dev/make-migration.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
352
|
+
_See code: [src/commands/dev/make-migration.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/dev/make-migration.js)_
|
|
353
353
|
|
|
354
354
|
## `saltcorn saltcorn dev:plugin-test -d [PATH_TO_LOCAL_PLUGIN]/statistics -f test-backup.zip`
|
|
355
355
|
|
|
@@ -370,7 +370,7 @@ DESCRIPTION
|
|
|
370
370
|
Install a plugin, spawn 'npm run test' in the install directory and check the return code.
|
|
371
371
|
```
|
|
372
372
|
|
|
373
|
-
_See code: [src/commands/dev/plugin-test.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
373
|
+
_See code: [src/commands/dev/plugin-test.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/dev/plugin-test.js)_
|
|
374
374
|
|
|
375
375
|
## `saltcorn dev:post-release [TASK]`
|
|
376
376
|
|
|
@@ -387,7 +387,7 @@ DESCRIPTION
|
|
|
387
387
|
Post-release tasks: docker and vagrant builds
|
|
388
388
|
```
|
|
389
389
|
|
|
390
|
-
_See code: [src/commands/dev/post-release.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
390
|
+
_See code: [src/commands/dev/post-release.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/dev/post-release.js)_
|
|
391
391
|
|
|
392
392
|
## `saltcorn dev:release VERSION`
|
|
393
393
|
|
|
@@ -407,7 +407,7 @@ DESCRIPTION
|
|
|
407
407
|
Release a new saltcorn version
|
|
408
408
|
```
|
|
409
409
|
|
|
410
|
-
_See code: [src/commands/dev/release.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
410
|
+
_See code: [src/commands/dev/release.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/dev/release.js)_
|
|
411
411
|
|
|
412
412
|
## `saltcorn dev:release-resume VERSION`
|
|
413
413
|
|
|
@@ -427,7 +427,7 @@ DESCRIPTION
|
|
|
427
427
|
Release a new saltcorn version
|
|
428
428
|
```
|
|
429
429
|
|
|
430
|
-
_See code: [src/commands/dev/release-resume.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
430
|
+
_See code: [src/commands/dev/release-resume.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/dev/release-resume.js)_
|
|
431
431
|
|
|
432
432
|
## `saltcorn dev:test-plugin PATH`
|
|
433
433
|
|
|
@@ -446,7 +446,7 @@ DESCRIPTION
|
|
|
446
446
|
Extra documentation goes here
|
|
447
447
|
```
|
|
448
448
|
|
|
449
|
-
_See code: [src/commands/dev/test-plugin.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
449
|
+
_See code: [src/commands/dev/test-plugin.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/dev/test-plugin.js)_
|
|
450
450
|
|
|
451
451
|
## `saltcorn dev:translate LOCALE`
|
|
452
452
|
|
|
@@ -466,7 +466,7 @@ DESCRIPTION
|
|
|
466
466
|
Produce translation files with LLM
|
|
467
467
|
```
|
|
468
468
|
|
|
469
|
-
_See code: [src/commands/dev/translate.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
469
|
+
_See code: [src/commands/dev/translate.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/dev/translate.js)_
|
|
470
470
|
|
|
471
471
|
## `saltcorn fixtures`
|
|
472
472
|
|
|
@@ -486,7 +486,7 @@ DESCRIPTION
|
|
|
486
486
|
This manual step it is never required for users and rarely required for developers
|
|
487
487
|
```
|
|
488
488
|
|
|
489
|
-
_See code: [src/commands/fixtures.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
489
|
+
_See code: [src/commands/fixtures.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/fixtures.js)_
|
|
490
490
|
|
|
491
491
|
## `saltcorn get-cfg [KEY]`
|
|
492
492
|
|
|
@@ -507,15 +507,18 @@ DESCRIPTION
|
|
|
507
507
|
Get a configuration value. The value is printed to stdout as a JSON value
|
|
508
508
|
```
|
|
509
509
|
|
|
510
|
-
_See code: [src/commands/get-cfg.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
510
|
+
_See code: [src/commands/get-cfg.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/get-cfg.js)_
|
|
511
511
|
|
|
512
|
-
## `saltcorn info`
|
|
512
|
+
## `saltcorn info [KEY]`
|
|
513
513
|
|
|
514
514
|
Show paths
|
|
515
515
|
|
|
516
516
|
```
|
|
517
517
|
USAGE
|
|
518
|
-
$ saltcorn info [-j]
|
|
518
|
+
$ saltcorn info [KEY] [-j]
|
|
519
|
+
|
|
520
|
+
ARGUMENTS
|
|
521
|
+
KEY (configFilePath|cliPath|file_store|saltcornVersion|version_tag) Output single value
|
|
519
522
|
|
|
520
523
|
FLAGS
|
|
521
524
|
-j, --json json format
|
|
@@ -530,7 +533,7 @@ ALIASES
|
|
|
530
533
|
$ saltcorn paths
|
|
531
534
|
```
|
|
532
535
|
|
|
533
|
-
_See code: [src/commands/info.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
536
|
+
_See code: [src/commands/info.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/info.js)_
|
|
534
537
|
|
|
535
538
|
## `saltcorn inspect TYPE [NAME]`
|
|
536
539
|
|
|
@@ -551,7 +554,7 @@ DESCRIPTION
|
|
|
551
554
|
Inspect an entity's JSON representation, or list entities
|
|
552
555
|
```
|
|
553
556
|
|
|
554
|
-
_See code: [src/commands/inspect.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
557
|
+
_See code: [src/commands/inspect.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/inspect.js)_
|
|
555
558
|
|
|
556
559
|
## `saltcorn install-pack`
|
|
557
560
|
|
|
@@ -570,7 +573,7 @@ DESCRIPTION
|
|
|
570
573
|
Install a pack or restore a snapshot
|
|
571
574
|
```
|
|
572
575
|
|
|
573
|
-
_See code: [src/commands/install-pack.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
576
|
+
_See code: [src/commands/install-pack.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/install-pack.js)_
|
|
574
577
|
|
|
575
578
|
## `saltcorn install-plugin`
|
|
576
579
|
|
|
@@ -590,7 +593,7 @@ DESCRIPTION
|
|
|
590
593
|
Install a plugin
|
|
591
594
|
```
|
|
592
595
|
|
|
593
|
-
_See code: [src/commands/install-plugin.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
596
|
+
_See code: [src/commands/install-plugin.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/install-plugin.js)_
|
|
594
597
|
|
|
595
598
|
## `saltcorn list-tenants`
|
|
596
599
|
|
|
@@ -609,7 +612,7 @@ DESCRIPTION
|
|
|
609
612
|
List tenants in CSV format
|
|
610
613
|
```
|
|
611
614
|
|
|
612
|
-
_See code: [src/commands/list-tenants.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
615
|
+
_See code: [src/commands/list-tenants.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/list-tenants.js)_
|
|
613
616
|
|
|
614
617
|
## `saltcorn list-triggers`
|
|
615
618
|
|
|
@@ -628,7 +631,7 @@ DESCRIPTION
|
|
|
628
631
|
List triggers
|
|
629
632
|
```
|
|
630
633
|
|
|
631
|
-
_See code: [src/commands/list-triggers.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
634
|
+
_See code: [src/commands/list-triggers.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/list-triggers.js)_
|
|
632
635
|
|
|
633
636
|
## `saltcorn list-users`
|
|
634
637
|
|
|
@@ -646,7 +649,7 @@ DESCRIPTION
|
|
|
646
649
|
List users
|
|
647
650
|
```
|
|
648
651
|
|
|
649
|
-
_See code: [src/commands/list-users.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
652
|
+
_See code: [src/commands/list-users.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/list-users.js)_
|
|
650
653
|
|
|
651
654
|
## `saltcorn saltcorn migrate`
|
|
652
655
|
|
|
@@ -669,7 +672,7 @@ DESCRIPTION
|
|
|
669
672
|
servers and need to control when the migrations are run.
|
|
670
673
|
```
|
|
671
674
|
|
|
672
|
-
_See code: [src/commands/migrate.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
675
|
+
_See code: [src/commands/migrate.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/migrate.js)_
|
|
673
676
|
|
|
674
677
|
## `saltcorn modify-user USER_EMAIL`
|
|
675
678
|
|
|
@@ -700,15 +703,18 @@ DESCRIPTION
|
|
|
700
703
|
NOTE that -a and -r role (--role=role) can give conflict.
|
|
701
704
|
```
|
|
702
705
|
|
|
703
|
-
_See code: [src/commands/modify-user.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
706
|
+
_See code: [src/commands/modify-user.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/modify-user.js)_
|
|
704
707
|
|
|
705
|
-
## `saltcorn paths`
|
|
708
|
+
## `saltcorn paths [KEY]`
|
|
706
709
|
|
|
707
710
|
Show paths
|
|
708
711
|
|
|
709
712
|
```
|
|
710
713
|
USAGE
|
|
711
|
-
$ saltcorn paths [-j]
|
|
714
|
+
$ saltcorn paths [KEY] [-j]
|
|
715
|
+
|
|
716
|
+
ARGUMENTS
|
|
717
|
+
KEY (configFilePath|cliPath|file_store|saltcornVersion|version_tag) Output single value
|
|
712
718
|
|
|
713
719
|
FLAGS
|
|
714
720
|
-j, --json json format
|
|
@@ -752,7 +758,7 @@ EXAMPLES
|
|
|
752
758
|
plugins -u -f - force plugin update
|
|
753
759
|
```
|
|
754
760
|
|
|
755
|
-
_See code: [src/commands/plugins.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
761
|
+
_See code: [src/commands/plugins.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/plugins.js)_
|
|
756
762
|
|
|
757
763
|
## `saltcorn prepare`
|
|
758
764
|
|
|
@@ -770,7 +776,7 @@ DESCRIPTION
|
|
|
770
776
|
Prepare to serve. Optional, may accelerate subsequent 'saltcorn serve' startup
|
|
771
777
|
```
|
|
772
778
|
|
|
773
|
-
_See code: [src/commands/prepare.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
779
|
+
_See code: [src/commands/prepare.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/prepare.js)_
|
|
774
780
|
|
|
775
781
|
## `saltcorn reset-schema`
|
|
776
782
|
|
|
@@ -790,7 +796,7 @@ DESCRIPTION
|
|
|
790
796
|
This will delete all existing information
|
|
791
797
|
```
|
|
792
798
|
|
|
793
|
-
_See code: [src/commands/reset-schema.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
799
|
+
_See code: [src/commands/reset-schema.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/reset-schema.js)_
|
|
794
800
|
|
|
795
801
|
## `saltcorn restore FILE`
|
|
796
802
|
|
|
@@ -810,7 +816,7 @@ DESCRIPTION
|
|
|
810
816
|
Restore a previously backed up database (zip or sqlc format)
|
|
811
817
|
```
|
|
812
818
|
|
|
813
|
-
_See code: [src/commands/restore.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
819
|
+
_See code: [src/commands/restore.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/restore.js)_
|
|
814
820
|
|
|
815
821
|
## `saltcorn rm-tenant`
|
|
816
822
|
|
|
@@ -830,7 +836,7 @@ DESCRIPTION
|
|
|
830
836
|
It recommended to make backup of tenant before perform this command.
|
|
831
837
|
```
|
|
832
838
|
|
|
833
|
-
_See code: [src/commands/rm-tenant.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
839
|
+
_See code: [src/commands/rm-tenant.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/rm-tenant.js)_
|
|
834
840
|
|
|
835
841
|
## `saltcorn run-benchmark [BASEURL]`
|
|
836
842
|
|
|
@@ -852,7 +858,7 @@ DESCRIPTION
|
|
|
852
858
|
Run benchmark
|
|
853
859
|
```
|
|
854
860
|
|
|
855
|
-
_See code: [src/commands/run-benchmark.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
861
|
+
_See code: [src/commands/run-benchmark.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/run-benchmark.js)_
|
|
856
862
|
|
|
857
863
|
## `saltcorn run-js`
|
|
858
864
|
|
|
@@ -871,7 +877,7 @@ DESCRIPTION
|
|
|
871
877
|
Run javascript code
|
|
872
878
|
```
|
|
873
879
|
|
|
874
|
-
_See code: [src/commands/run-js.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
880
|
+
_See code: [src/commands/run-js.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/run-js.js)_
|
|
875
881
|
|
|
876
882
|
## `saltcorn run-sql`
|
|
877
883
|
|
|
@@ -890,7 +896,7 @@ DESCRIPTION
|
|
|
890
896
|
Run sql expression
|
|
891
897
|
```
|
|
892
898
|
|
|
893
|
-
_See code: [src/commands/run-sql.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
899
|
+
_See code: [src/commands/run-sql.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/run-sql.js)_
|
|
894
900
|
|
|
895
901
|
## `saltcorn run-tests [PACKAGE]`
|
|
896
902
|
|
|
@@ -917,7 +923,7 @@ DESCRIPTION
|
|
|
917
923
|
Run test suites
|
|
918
924
|
```
|
|
919
925
|
|
|
920
|
-
_See code: [src/commands/run-tests.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
926
|
+
_See code: [src/commands/run-tests.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/run-tests.js)_
|
|
921
927
|
|
|
922
928
|
## `saltcorn run-trigger TRIGGER`
|
|
923
929
|
|
|
@@ -937,7 +943,7 @@ DESCRIPTION
|
|
|
937
943
|
Run a trigger
|
|
938
944
|
```
|
|
939
945
|
|
|
940
|
-
_See code: [src/commands/run-trigger.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
946
|
+
_See code: [src/commands/run-trigger.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/run-trigger.js)_
|
|
941
947
|
|
|
942
948
|
## `saltcorn scheduler`
|
|
943
949
|
|
|
@@ -954,7 +960,7 @@ DESCRIPTION
|
|
|
954
960
|
Run the Saltcorn scheduler
|
|
955
961
|
```
|
|
956
962
|
|
|
957
|
-
_See code: [src/commands/scheduler.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
963
|
+
_See code: [src/commands/scheduler.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/scheduler.js)_
|
|
958
964
|
|
|
959
965
|
## `saltcorn serve`
|
|
960
966
|
|
|
@@ -962,11 +968,12 @@ Start the Saltcorn server
|
|
|
962
968
|
|
|
963
969
|
```
|
|
964
970
|
USAGE
|
|
965
|
-
$ saltcorn serve [-p <value>] [-v] [-r] [-d] [-a] [-n] [-s] [--subdomain_offset <value>]
|
|
971
|
+
$ saltcorn serve [-h <value>] [-p <value>] [-v] [-r] [-d] [-a] [-n] [-s] [--subdomain_offset <value>]
|
|
966
972
|
|
|
967
973
|
FLAGS
|
|
968
974
|
-a, --addschema Add schema if missing
|
|
969
975
|
-d, --dev Run in dev mode and re-start on file changes
|
|
976
|
+
-h, --host=<value> listen hostname
|
|
970
977
|
-n, --nomigrate No migrations
|
|
971
978
|
-p, --port=<value> [default: 3000] port
|
|
972
979
|
-r, --watchReaper Watch reaper
|
|
@@ -978,7 +985,7 @@ DESCRIPTION
|
|
|
978
985
|
Start the Saltcorn server
|
|
979
986
|
```
|
|
980
987
|
|
|
981
|
-
_See code: [src/commands/serve.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
988
|
+
_See code: [src/commands/serve.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/serve.js)_
|
|
982
989
|
|
|
983
990
|
## `saltcorn set-cfg [KEY] [VALUE]`
|
|
984
991
|
|
|
@@ -1003,7 +1010,7 @@ DESCRIPTION
|
|
|
1003
1010
|
stored as a string.
|
|
1004
1011
|
```
|
|
1005
1012
|
|
|
1006
|
-
_See code: [src/commands/set-cfg.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
1013
|
+
_See code: [src/commands/set-cfg.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/set-cfg.js)_
|
|
1007
1014
|
|
|
1008
1015
|
## `saltcorn set-daily-time [MINS]`
|
|
1009
1016
|
|
|
@@ -1023,7 +1030,7 @@ DESCRIPTION
|
|
|
1023
1030
|
Set the time the default daily event will run, offset in minutes from the current time. Restart required.
|
|
1024
1031
|
```
|
|
1025
1032
|
|
|
1026
|
-
_See code: [src/commands/set-daily-time.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
1033
|
+
_See code: [src/commands/set-daily-time.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/set-daily-time.js)_
|
|
1027
1034
|
|
|
1028
1035
|
## `saltcorn setup`
|
|
1029
1036
|
|
|
@@ -1043,7 +1050,7 @@ DESCRIPTION
|
|
|
1043
1050
|
configuration file
|
|
1044
1051
|
```
|
|
1045
1052
|
|
|
1046
|
-
_See code: [src/commands/setup.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
1053
|
+
_See code: [src/commands/setup.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/setup.js)_
|
|
1047
1054
|
|
|
1048
1055
|
## `saltcorn setup-benchmark`
|
|
1049
1056
|
|
|
@@ -1061,7 +1068,7 @@ DESCRIPTION
|
|
|
1061
1068
|
Setup an instance for benchmarking
|
|
1062
1069
|
```
|
|
1063
1070
|
|
|
1064
|
-
_See code: [src/commands/setup-benchmark.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
1071
|
+
_See code: [src/commands/setup-benchmark.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/setup-benchmark.js)_
|
|
1065
1072
|
|
|
1066
1073
|
## `saltcorn sync-upload-data`
|
|
1067
1074
|
|
|
@@ -1082,7 +1089,7 @@ DESCRIPTION
|
|
|
1082
1089
|
Runs a sync for data supplied by the mobile app
|
|
1083
1090
|
```
|
|
1084
1091
|
|
|
1085
|
-
_See code: [src/commands/sync-upload-data.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
1092
|
+
_See code: [src/commands/sync-upload-data.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/sync-upload-data.js)_
|
|
1086
1093
|
|
|
1087
1094
|
## `saltcorn take-snapshot`
|
|
1088
1095
|
|
|
@@ -1100,7 +1107,7 @@ DESCRIPTION
|
|
|
1100
1107
|
Print a current snapshout to stdout
|
|
1101
1108
|
```
|
|
1102
1109
|
|
|
1103
|
-
_See code: [src/commands/take-snapshot.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
1110
|
+
_See code: [src/commands/take-snapshot.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/take-snapshot.js)_
|
|
1104
1111
|
|
|
1105
1112
|
## `saltcorn transform-field EXPRESSION FIELD TABLE [TENANT]`
|
|
1106
1113
|
|
|
@@ -1120,5 +1127,5 @@ DESCRIPTION
|
|
|
1120
1127
|
transform an existing field by applying a calculated expression
|
|
1121
1128
|
```
|
|
1122
1129
|
|
|
1123
|
-
_See code: [src/commands/transform-field.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-
|
|
1130
|
+
_See code: [src/commands/transform-field.js](https://github.com/saltcorn/saltcorn/blob/v1.1.4-beta.0/packages/saltcorn-cli/src/commands/transform-field.js)_
|
|
1124
1131
|
<!-- commandsstop -->
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saltcorn/cli",
|
|
3
|
-
"version": "1.1.4-
|
|
3
|
+
"version": "1.1.4-beta.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@saltcorn/cli",
|
|
9
|
-
"version": "1.1.4-
|
|
9
|
+
"version": "1.1.4-beta.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@oclif/core": "^4.2.4",
|
|
13
13
|
"@oclif/plugin-plugins": "^5.4.26",
|
|
14
|
-
"@saltcorn/admin-models": "1.1.4-
|
|
15
|
-
"@saltcorn/common-code": "1.1.4-
|
|
16
|
-
"@saltcorn/data": "1.1.4-
|
|
17
|
-
"@saltcorn/mobile-app": "1.1.4-
|
|
18
|
-
"@saltcorn/mobile-builder": "1.1.4-
|
|
19
|
-
"@saltcorn/plugins-loader": "1.1.4-
|
|
20
|
-
"@saltcorn/server": "1.1.4-
|
|
14
|
+
"@saltcorn/admin-models": "1.1.4-beta.0",
|
|
15
|
+
"@saltcorn/common-code": "1.1.4-beta.0",
|
|
16
|
+
"@saltcorn/data": "1.1.4-beta.0",
|
|
17
|
+
"@saltcorn/mobile-app": "1.1.4-beta.0",
|
|
18
|
+
"@saltcorn/mobile-builder": "1.1.4-beta.0",
|
|
19
|
+
"@saltcorn/plugins-loader": "1.1.4-beta.0",
|
|
20
|
+
"@saltcorn/server": "1.1.4-beta.0",
|
|
21
21
|
"contractis": "^0.1.0",
|
|
22
22
|
"dateformat": "^4.6.3",
|
|
23
23
|
"inquirer": "^12.3.3",
|
|
@@ -1565,9 +1565,9 @@
|
|
|
1565
1565
|
}
|
|
1566
1566
|
},
|
|
1567
1567
|
"node_modules/@emnapi/runtime": {
|
|
1568
|
-
"version": "1.
|
|
1569
|
-
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.
|
|
1570
|
-
"integrity": "sha512-
|
|
1568
|
+
"version": "1.4.0",
|
|
1569
|
+
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.4.0.tgz",
|
|
1570
|
+
"integrity": "sha512-64WYIf4UYcdLnbKn/umDlNjQDSS8AgZrI/R9+x5ilkUVFxXcA1Ebl+gQLc/6mERA4407Xof0R7wEyEuj091CVw==",
|
|
1571
1571
|
"license": "MIT",
|
|
1572
1572
|
"optional": true,
|
|
1573
1573
|
"dependencies": {
|
|
@@ -3881,15 +3881,15 @@
|
|
|
3881
3881
|
}
|
|
3882
3882
|
},
|
|
3883
3883
|
"node_modules/@saltcorn/admin-models": {
|
|
3884
|
-
"version": "1.1.4-
|
|
3885
|
-
"resolved": "https://registry.npmjs.org/@saltcorn/admin-models/-/admin-models-1.1.4-
|
|
3886
|
-
"integrity": "sha512-
|
|
3884
|
+
"version": "1.1.4-beta.0",
|
|
3885
|
+
"resolved": "https://registry.npmjs.org/@saltcorn/admin-models/-/admin-models-1.1.4-beta.0.tgz",
|
|
3886
|
+
"integrity": "sha512-6pTw1AqXV+mFwtdzc4bjBIBhcyoYq94WvnU4qLPxd1B/paccSxFF/59fCYdMqP/LX0bB6v/KY2hgX2uT97fC7g==",
|
|
3887
3887
|
"license": "MIT",
|
|
3888
3888
|
"dependencies": {
|
|
3889
|
-
"@saltcorn/data": "1.1.4-
|
|
3890
|
-
"@saltcorn/db-common": "1.1.4-
|
|
3891
|
-
"@saltcorn/markup": "1.1.4-
|
|
3892
|
-
"@saltcorn/types": "1.1.4-
|
|
3889
|
+
"@saltcorn/data": "1.1.4-beta.0",
|
|
3890
|
+
"@saltcorn/db-common": "1.1.4-beta.0",
|
|
3891
|
+
"@saltcorn/markup": "1.1.4-beta.0",
|
|
3892
|
+
"@saltcorn/types": "1.1.4-beta.0",
|
|
3893
3893
|
"adm-zip": "0.5.16",
|
|
3894
3894
|
"chaos-guinea-pig": "0.2.0",
|
|
3895
3895
|
"csv-stringify": "^6.5.2",
|
|
@@ -3902,40 +3902,40 @@
|
|
|
3902
3902
|
}
|
|
3903
3903
|
},
|
|
3904
3904
|
"node_modules/@saltcorn/base-plugin": {
|
|
3905
|
-
"version": "1.1.4-
|
|
3906
|
-
"resolved": "https://registry.npmjs.org/@saltcorn/base-plugin/-/base-plugin-1.1.4-
|
|
3907
|
-
"integrity": "sha512-
|
|
3905
|
+
"version": "1.1.4-beta.0",
|
|
3906
|
+
"resolved": "https://registry.npmjs.org/@saltcorn/base-plugin/-/base-plugin-1.1.4-beta.0.tgz",
|
|
3907
|
+
"integrity": "sha512-zLH7oeB6UTUly1HA5mjikKW/6G4IU3O1pO4GRPUHMNQGac8D9Nnx5CrgFOWIERhLrqQe0APmfWwGNDCGrl8iEQ==",
|
|
3908
3908
|
"license": "MIT",
|
|
3909
3909
|
"dependencies": {
|
|
3910
|
-
"@saltcorn/data": "1.1.4-
|
|
3910
|
+
"@saltcorn/data": "1.1.4-beta.0"
|
|
3911
3911
|
}
|
|
3912
3912
|
},
|
|
3913
3913
|
"node_modules/@saltcorn/builder": {
|
|
3914
|
-
"version": "1.1.4-
|
|
3915
|
-
"resolved": "https://registry.npmjs.org/@saltcorn/builder/-/builder-1.1.4-
|
|
3916
|
-
"integrity": "sha512-
|
|
3914
|
+
"version": "1.1.4-beta.0",
|
|
3915
|
+
"resolved": "https://registry.npmjs.org/@saltcorn/builder/-/builder-1.1.4-beta.0.tgz",
|
|
3916
|
+
"integrity": "sha512-VTLUWZO3uWLCGvQYWW3USBIyr06OJ7pq7w/eCwS2QMIF2iCHl3JRDbcpSc9CxO0uny01Lw0xouXS/EGjjlYDrw==",
|
|
3917
3917
|
"license": "MIT",
|
|
3918
3918
|
"dependencies": {
|
|
3919
3919
|
"styled-components": "4.4.1"
|
|
3920
3920
|
}
|
|
3921
3921
|
},
|
|
3922
3922
|
"node_modules/@saltcorn/common-code": {
|
|
3923
|
-
"version": "1.1.4-
|
|
3924
|
-
"resolved": "https://registry.npmjs.org/@saltcorn/common-code/-/common-code-1.1.4-
|
|
3925
|
-
"integrity": "sha512
|
|
3923
|
+
"version": "1.1.4-beta.0",
|
|
3924
|
+
"resolved": "https://registry.npmjs.org/@saltcorn/common-code/-/common-code-1.1.4-beta.0.tgz",
|
|
3925
|
+
"integrity": "sha512-Lyf76tXyMEVNTWqvbB6Z1Nh+16p8ebq9J/uFZ7MWeoxwcvKdmGPX1OhMpd5BDsr07Tki+cWsG2FNIDrgnrI17Q==",
|
|
3926
3926
|
"license": "MIT"
|
|
3927
3927
|
},
|
|
3928
3928
|
"node_modules/@saltcorn/data": {
|
|
3929
|
-
"version": "1.1.4-
|
|
3930
|
-
"resolved": "https://registry.npmjs.org/@saltcorn/data/-/data-1.1.4-
|
|
3931
|
-
"integrity": "sha512-
|
|
3929
|
+
"version": "1.1.4-beta.0",
|
|
3930
|
+
"resolved": "https://registry.npmjs.org/@saltcorn/data/-/data-1.1.4-beta.0.tgz",
|
|
3931
|
+
"integrity": "sha512-Q8oOxa0snK79dm+Uk4Qo1h8ZUT2dU0NH1fgor/qoSXscFLFAsOOyKMYfl2J0YHEyVfPON0mRwHuTWYaE1MMfYA==",
|
|
3932
3932
|
"license": "MIT",
|
|
3933
3933
|
"dependencies": {
|
|
3934
|
-
"@saltcorn/common-code": "1.1.4-
|
|
3935
|
-
"@saltcorn/db-common": "1.1.4-
|
|
3936
|
-
"@saltcorn/markup": "1.1.4-
|
|
3937
|
-
"@saltcorn/sqlite-mobile": "1.1.4-
|
|
3938
|
-
"@saltcorn/types": "1.1.4-
|
|
3934
|
+
"@saltcorn/common-code": "1.1.4-beta.0",
|
|
3935
|
+
"@saltcorn/db-common": "1.1.4-beta.0",
|
|
3936
|
+
"@saltcorn/markup": "1.1.4-beta.0",
|
|
3937
|
+
"@saltcorn/sqlite-mobile": "1.1.4-beta.0",
|
|
3938
|
+
"@saltcorn/types": "1.1.4-beta.0",
|
|
3939
3939
|
"acorn": "^8.14.0",
|
|
3940
3940
|
"assert": "^2.1.0",
|
|
3941
3941
|
"astring": "^1.9.0",
|
|
@@ -3982,28 +3982,28 @@
|
|
|
3982
3982
|
"vm-browserify": "^1.1.2"
|
|
3983
3983
|
},
|
|
3984
3984
|
"optionalDependencies": {
|
|
3985
|
-
"@saltcorn/postgres": "1.1.4-
|
|
3986
|
-
"@saltcorn/sqlite": "1.1.4-
|
|
3985
|
+
"@saltcorn/postgres": "1.1.4-beta.0",
|
|
3986
|
+
"@saltcorn/sqlite": "1.1.4-beta.0"
|
|
3987
3987
|
}
|
|
3988
3988
|
},
|
|
3989
3989
|
"node_modules/@saltcorn/db-common": {
|
|
3990
|
-
"version": "1.1.4-
|
|
3991
|
-
"resolved": "https://registry.npmjs.org/@saltcorn/db-common/-/db-common-1.1.4-
|
|
3992
|
-
"integrity": "sha512-
|
|
3990
|
+
"version": "1.1.4-beta.0",
|
|
3991
|
+
"resolved": "https://registry.npmjs.org/@saltcorn/db-common/-/db-common-1.1.4-beta.0.tgz",
|
|
3992
|
+
"integrity": "sha512-K+Tzr3kUSzbOxjIaprZPdbmf6FjsBV4ixgyDLuO1NJb9HW4P7CC8XEF1+JS8tBeklkdCPqqyZf/eM23Pa6W7pg==",
|
|
3993
3993
|
"license": "MIT"
|
|
3994
3994
|
},
|
|
3995
3995
|
"node_modules/@saltcorn/filemanager": {
|
|
3996
|
-
"version": "1.1.4-
|
|
3997
|
-
"resolved": "https://registry.npmjs.org/@saltcorn/filemanager/-/filemanager-1.1.4-
|
|
3998
|
-
"integrity": "sha512-
|
|
3996
|
+
"version": "1.1.4-beta.0",
|
|
3997
|
+
"resolved": "https://registry.npmjs.org/@saltcorn/filemanager/-/filemanager-1.1.4-beta.0.tgz",
|
|
3998
|
+
"integrity": "sha512-Z5hhQActKgRnWhfoD3m9/++RxlRlIK6an5gYY2JzKSdcDRD4H6oG6Ya0dUQP0BN4iMXg9BP6sVX6NlFkJ6ItZw==",
|
|
3999
3999
|
"dependencies": {
|
|
4000
4000
|
"sirv-cli": "^2.0.0"
|
|
4001
4001
|
}
|
|
4002
4002
|
},
|
|
4003
4003
|
"node_modules/@saltcorn/markup": {
|
|
4004
|
-
"version": "1.1.4-
|
|
4005
|
-
"resolved": "https://registry.npmjs.org/@saltcorn/markup/-/markup-1.1.4-
|
|
4006
|
-
"integrity": "sha512-
|
|
4004
|
+
"version": "1.1.4-beta.0",
|
|
4005
|
+
"resolved": "https://registry.npmjs.org/@saltcorn/markup/-/markup-1.1.4-beta.0.tgz",
|
|
4006
|
+
"integrity": "sha512-GDthLOD+xKj+c5UmFkeIvrFwnIZhbJGRzEtg+kWRJqgEeLcAxpgM1/Bt0Mc3k5Ujvy61hMNzH8HV1qLtoXTW5g==",
|
|
4007
4007
|
"license": "MIT",
|
|
4008
4008
|
"dependencies": {
|
|
4009
4009
|
"escape-html": "^1.0.3",
|
|
@@ -4012,9 +4012,9 @@
|
|
|
4012
4012
|
}
|
|
4013
4013
|
},
|
|
4014
4014
|
"node_modules/@saltcorn/mobile-app": {
|
|
4015
|
-
"version": "1.1.4-
|
|
4016
|
-
"resolved": "https://registry.npmjs.org/@saltcorn/mobile-app/-/mobile-app-1.1.4-
|
|
4017
|
-
"integrity": "sha512-
|
|
4015
|
+
"version": "1.1.4-beta.0",
|
|
4016
|
+
"resolved": "https://registry.npmjs.org/@saltcorn/mobile-app/-/mobile-app-1.1.4-beta.0.tgz",
|
|
4017
|
+
"integrity": "sha512-xtg4s4w8LRHM6zZ/9qOZ46vWPvIQQ4JJbsy9Wth7Ukvy8TyjdFJNxrq/pgJqKexkaK1H1mME1y5i03Plm+sx0A==",
|
|
4018
4018
|
"license": "MIT",
|
|
4019
4019
|
"dependencies": {
|
|
4020
4020
|
"axios": "^1.7.7",
|
|
@@ -4036,18 +4036,18 @@
|
|
|
4036
4036
|
}
|
|
4037
4037
|
},
|
|
4038
4038
|
"node_modules/@saltcorn/mobile-builder": {
|
|
4039
|
-
"version": "1.1.4-
|
|
4040
|
-
"resolved": "https://registry.npmjs.org/@saltcorn/mobile-builder/-/mobile-builder-1.1.4-
|
|
4041
|
-
"integrity": "sha512-
|
|
4042
|
-
"license": "MIT",
|
|
4043
|
-
"dependencies": {
|
|
4044
|
-
"@saltcorn/base-plugin": "1.1.4-
|
|
4045
|
-
"@saltcorn/data": "1.1.4-
|
|
4046
|
-
"@saltcorn/db-common": "1.1.4-
|
|
4047
|
-
"@saltcorn/markup": "1.1.4-
|
|
4048
|
-
"@saltcorn/mobile-app": "1.1.4-
|
|
4049
|
-
"@saltcorn/sbadmin2": "1.1.4-
|
|
4050
|
-
"@saltcorn/server": "1.1.4-
|
|
4039
|
+
"version": "1.1.4-beta.0",
|
|
4040
|
+
"resolved": "https://registry.npmjs.org/@saltcorn/mobile-builder/-/mobile-builder-1.1.4-beta.0.tgz",
|
|
4041
|
+
"integrity": "sha512-9U8ZE7xA7hq3mVaVHzw4QWXuFZSz67MpP546rzvv9GQLtSZo6CCezweSuFlOQl4/EEbWo804Z8QsJBLdJMdccA==",
|
|
4042
|
+
"license": "MIT",
|
|
4043
|
+
"dependencies": {
|
|
4044
|
+
"@saltcorn/base-plugin": "1.1.4-beta.0",
|
|
4045
|
+
"@saltcorn/data": "1.1.4-beta.0",
|
|
4046
|
+
"@saltcorn/db-common": "1.1.4-beta.0",
|
|
4047
|
+
"@saltcorn/markup": "1.1.4-beta.0",
|
|
4048
|
+
"@saltcorn/mobile-app": "1.1.4-beta.0",
|
|
4049
|
+
"@saltcorn/sbadmin2": "1.1.4-beta.0",
|
|
4050
|
+
"@saltcorn/server": "1.1.4-beta.0",
|
|
4051
4051
|
"fs-extra": "^11.3.0",
|
|
4052
4052
|
"live-plugin-manager": "^1.0.0",
|
|
4053
4053
|
"resize-with-sharp-or-jimp": "0.1.8",
|
|
@@ -4058,56 +4058,56 @@
|
|
|
4058
4058
|
}
|
|
4059
4059
|
},
|
|
4060
4060
|
"node_modules/@saltcorn/plugins-loader": {
|
|
4061
|
-
"version": "1.1.4-
|
|
4062
|
-
"resolved": "https://registry.npmjs.org/@saltcorn/plugins-loader/-/plugins-loader-1.1.4-
|
|
4063
|
-
"integrity": "sha512-
|
|
4061
|
+
"version": "1.1.4-beta.0",
|
|
4062
|
+
"resolved": "https://registry.npmjs.org/@saltcorn/plugins-loader/-/plugins-loader-1.1.4-beta.0.tgz",
|
|
4063
|
+
"integrity": "sha512-3n5FnTM/2MzLOxrbCffcHsofEpyHuuEleOi+pGXLZ4xTMGpGL23IopD4QX/F0D4sAlqMfBloKDnY6P7zSkeuBw==",
|
|
4064
4064
|
"license": "MIT",
|
|
4065
4065
|
"dependencies": {
|
|
4066
|
-
"@saltcorn/data": "1.1.4-
|
|
4066
|
+
"@saltcorn/data": "1.1.4-beta.0",
|
|
4067
4067
|
"env-paths": "^2.2.1",
|
|
4068
4068
|
"https-proxy-agent": "^7.0.6",
|
|
4069
4069
|
"npm-registry-fetch": "17.1.0"
|
|
4070
4070
|
}
|
|
4071
4071
|
},
|
|
4072
4072
|
"node_modules/@saltcorn/postgres": {
|
|
4073
|
-
"version": "1.1.4-
|
|
4074
|
-
"resolved": "https://registry.npmjs.org/@saltcorn/postgres/-/postgres-1.1.4-
|
|
4075
|
-
"integrity": "sha512-
|
|
4073
|
+
"version": "1.1.4-beta.0",
|
|
4074
|
+
"resolved": "https://registry.npmjs.org/@saltcorn/postgres/-/postgres-1.1.4-beta.0.tgz",
|
|
4075
|
+
"integrity": "sha512-vXd0KdZxfoTrgJQskynX5csrLCggTZV1ldMFkaMlpneSXLwiAw+Opf8FjWIDZuC7i1Qu3bgsGOora92MQk/ujg==",
|
|
4076
4076
|
"license": "MIT",
|
|
4077
4077
|
"optional": true,
|
|
4078
4078
|
"dependencies": {
|
|
4079
|
-
"@saltcorn/db-common": "1.1.4-
|
|
4079
|
+
"@saltcorn/db-common": "1.1.4-beta.0",
|
|
4080
4080
|
"pg": "^8.13.1",
|
|
4081
4081
|
"pg-copy-streams": "^6.0.6",
|
|
4082
4082
|
"replacestream": "4.0.3"
|
|
4083
4083
|
}
|
|
4084
4084
|
},
|
|
4085
4085
|
"node_modules/@saltcorn/sbadmin2": {
|
|
4086
|
-
"version": "1.1.4-
|
|
4087
|
-
"resolved": "https://registry.npmjs.org/@saltcorn/sbadmin2/-/sbadmin2-1.1.4-
|
|
4088
|
-
"integrity": "sha512-
|
|
4086
|
+
"version": "1.1.4-beta.0",
|
|
4087
|
+
"resolved": "https://registry.npmjs.org/@saltcorn/sbadmin2/-/sbadmin2-1.1.4-beta.0.tgz",
|
|
4088
|
+
"integrity": "sha512-vM0CGP8fKMQGUIJheMpem1D/WnmFhB1bvReEQDEOtpobuGCT3sOe2oSEzgcb10pEXhDoIlAznmTvTNDSZYoQkA==",
|
|
4089
4089
|
"license": "MIT",
|
|
4090
4090
|
"dependencies": {
|
|
4091
|
-
"@saltcorn/data": "1.1.4-
|
|
4092
|
-
"@saltcorn/markup": "1.1.4-
|
|
4091
|
+
"@saltcorn/data": "1.1.4-beta.0",
|
|
4092
|
+
"@saltcorn/markup": "1.1.4-beta.0"
|
|
4093
4093
|
}
|
|
4094
4094
|
},
|
|
4095
4095
|
"node_modules/@saltcorn/server": {
|
|
4096
|
-
"version": "1.1.4-
|
|
4097
|
-
"resolved": "https://registry.npmjs.org/@saltcorn/server/-/server-1.1.4-
|
|
4098
|
-
"integrity": "sha512-
|
|
4096
|
+
"version": "1.1.4-beta.0",
|
|
4097
|
+
"resolved": "https://registry.npmjs.org/@saltcorn/server/-/server-1.1.4-beta.0.tgz",
|
|
4098
|
+
"integrity": "sha512-VioaA9aEbkBcRHgGTXctKigVJJuuo6oQcJ+O4LGGuTK5PvHjMKLAUnYMj77KxgN8K+yEc8jRMMGpnPve+AZ/HQ==",
|
|
4099
4099
|
"license": "MIT",
|
|
4100
4100
|
"dependencies": {
|
|
4101
4101
|
"@aws-sdk/client-s3": "^3.735.0",
|
|
4102
4102
|
"@dr.pogodin/csurf": "^1.14.1",
|
|
4103
|
-
"@saltcorn/admin-models": "1.1.4-
|
|
4104
|
-
"@saltcorn/base-plugin": "1.1.4-
|
|
4105
|
-
"@saltcorn/builder": "1.1.4-
|
|
4106
|
-
"@saltcorn/data": "1.1.4-
|
|
4107
|
-
"@saltcorn/filemanager": "1.1.4-
|
|
4108
|
-
"@saltcorn/markup": "1.1.4-
|
|
4109
|
-
"@saltcorn/plugins-loader": "1.1.4-
|
|
4110
|
-
"@saltcorn/sbadmin2": "1.1.4-
|
|
4103
|
+
"@saltcorn/admin-models": "1.1.4-beta.0",
|
|
4104
|
+
"@saltcorn/base-plugin": "1.1.4-beta.0",
|
|
4105
|
+
"@saltcorn/builder": "1.1.4-beta.0",
|
|
4106
|
+
"@saltcorn/data": "1.1.4-beta.0",
|
|
4107
|
+
"@saltcorn/filemanager": "1.1.4-beta.0",
|
|
4108
|
+
"@saltcorn/markup": "1.1.4-beta.0",
|
|
4109
|
+
"@saltcorn/plugins-loader": "1.1.4-beta.0",
|
|
4110
|
+
"@saltcorn/sbadmin2": "1.1.4-beta.0",
|
|
4111
4111
|
"@socket.io/cluster-adapter": "^0.2.1",
|
|
4112
4112
|
"@socket.io/sticky": "^1.0.1",
|
|
4113
4113
|
"adm-zip": "0.5.16",
|
|
@@ -4163,33 +4163,33 @@
|
|
|
4163
4163
|
}
|
|
4164
4164
|
},
|
|
4165
4165
|
"node_modules/@saltcorn/sqlite": {
|
|
4166
|
-
"version": "1.1.4-
|
|
4167
|
-
"resolved": "https://registry.npmjs.org/@saltcorn/sqlite/-/sqlite-1.1.4-
|
|
4168
|
-
"integrity": "sha512-
|
|
4166
|
+
"version": "1.1.4-beta.0",
|
|
4167
|
+
"resolved": "https://registry.npmjs.org/@saltcorn/sqlite/-/sqlite-1.1.4-beta.0.tgz",
|
|
4168
|
+
"integrity": "sha512-AhXbWhneM8wXEcs6GtQwhibIxW0MXvNJpj5wrGc8sgxZcTr8nlTTLDSBT/gjDh283Um1SdWwUmLUyc5G/TxB5A==",
|
|
4169
4169
|
"license": "MIT",
|
|
4170
4170
|
"optional": true,
|
|
4171
4171
|
"dependencies": {
|
|
4172
|
-
"@saltcorn/db-common": "1.1.4-
|
|
4172
|
+
"@saltcorn/db-common": "1.1.4-beta.0"
|
|
4173
4173
|
},
|
|
4174
4174
|
"optionalDependencies": {
|
|
4175
4175
|
"sqlite3": "5.1.7"
|
|
4176
4176
|
}
|
|
4177
4177
|
},
|
|
4178
4178
|
"node_modules/@saltcorn/sqlite-mobile": {
|
|
4179
|
-
"version": "1.1.4-
|
|
4180
|
-
"resolved": "https://registry.npmjs.org/@saltcorn/sqlite-mobile/-/sqlite-mobile-1.1.4-
|
|
4181
|
-
"integrity": "sha512-
|
|
4179
|
+
"version": "1.1.4-beta.0",
|
|
4180
|
+
"resolved": "https://registry.npmjs.org/@saltcorn/sqlite-mobile/-/sqlite-mobile-1.1.4-beta.0.tgz",
|
|
4181
|
+
"integrity": "sha512-RTCoHDyM3uQ/NrfFFMe5r7vH4qfZGTEYArK9d8vXSGu+ghvFgvc0OhglNJestA9BxgVI8Iebkv4FqmCf+DscsQ==",
|
|
4182
4182
|
"license": "MIT",
|
|
4183
4183
|
"dependencies": {
|
|
4184
4184
|
"@capacitor-community/sqlite": "^6.0.2",
|
|
4185
4185
|
"@capacitor/core": "^6.2.0",
|
|
4186
|
-
"@saltcorn/db-common": "1.1.4-
|
|
4186
|
+
"@saltcorn/db-common": "1.1.4-beta.0"
|
|
4187
4187
|
}
|
|
4188
4188
|
},
|
|
4189
4189
|
"node_modules/@saltcorn/types": {
|
|
4190
|
-
"version": "1.1.4-
|
|
4191
|
-
"resolved": "https://registry.npmjs.org/@saltcorn/types/-/types-1.1.4-
|
|
4192
|
-
"integrity": "sha512-
|
|
4190
|
+
"version": "1.1.4-beta.0",
|
|
4191
|
+
"resolved": "https://registry.npmjs.org/@saltcorn/types/-/types-1.1.4-beta.0.tgz",
|
|
4192
|
+
"integrity": "sha512-bS8VBoFPyIvEmhVi4UiEsJ5jGcNWOb2av3jvKYYr6mKgdHo7MzZfrYsasYU1+9t1zHjCWNJL8gM3/Iqn9SJ+1A==",
|
|
4193
4193
|
"license": "MIT"
|
|
4194
4194
|
},
|
|
4195
4195
|
"node_modules/@sinclair/typebox": {
|
|
@@ -8234,9 +8234,9 @@
|
|
|
8234
8234
|
}
|
|
8235
8235
|
},
|
|
8236
8236
|
"node_modules/electron-to-chromium": {
|
|
8237
|
-
"version": "1.5.
|
|
8238
|
-
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.
|
|
8239
|
-
"integrity": "sha512-
|
|
8237
|
+
"version": "1.5.128",
|
|
8238
|
+
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.128.tgz",
|
|
8239
|
+
"integrity": "sha512-bo1A4HH/NS522Ws0QNFIzyPcyUUNV/yyy70Ho1xqfGYzPUme2F/xr4tlEOuM6/A538U1vDA7a4XfCd1CKRegKQ==",
|
|
8240
8240
|
"license": "ISC"
|
|
8241
8241
|
},
|
|
8242
8242
|
"node_modules/elliptic": {
|
|
@@ -19132,15 +19132,15 @@
|
|
|
19132
19132
|
}
|
|
19133
19133
|
},
|
|
19134
19134
|
"node_modules/serve-static": {
|
|
19135
|
-
"version": "2.
|
|
19136
|
-
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.
|
|
19137
|
-
"integrity": "sha512-
|
|
19135
|
+
"version": "2.2.0",
|
|
19136
|
+
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.0.tgz",
|
|
19137
|
+
"integrity": "sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ==",
|
|
19138
19138
|
"license": "MIT",
|
|
19139
19139
|
"dependencies": {
|
|
19140
19140
|
"encodeurl": "^2.0.0",
|
|
19141
19141
|
"escape-html": "^1.0.3",
|
|
19142
19142
|
"parseurl": "^1.3.3",
|
|
19143
|
-
"send": "^1.
|
|
19143
|
+
"send": "^1.2.0"
|
|
19144
19144
|
},
|
|
19145
19145
|
"engines": {
|
|
19146
19146
|
"node": ">= 18"
|
package/oclif.manifest.json
CHANGED
|
@@ -663,7 +663,20 @@
|
|
|
663
663
|
"aliases": [
|
|
664
664
|
"paths"
|
|
665
665
|
],
|
|
666
|
-
"args": {
|
|
666
|
+
"args": {
|
|
667
|
+
"key": {
|
|
668
|
+
"description": "Output single value",
|
|
669
|
+
"name": "key",
|
|
670
|
+
"options": [
|
|
671
|
+
"configFilePath",
|
|
672
|
+
"cliPath",
|
|
673
|
+
"file_store",
|
|
674
|
+
"saltcornVersion",
|
|
675
|
+
"version_tag"
|
|
676
|
+
],
|
|
677
|
+
"required": false
|
|
678
|
+
}
|
|
679
|
+
},
|
|
667
680
|
"description": "Show paths\n...\nShow configuration and file store paths\n",
|
|
668
681
|
"flags": {
|
|
669
682
|
"json": {
|
|
@@ -1558,6 +1571,14 @@
|
|
|
1558
1571
|
"args": {},
|
|
1559
1572
|
"description": "Start the Saltcorn server",
|
|
1560
1573
|
"flags": {
|
|
1574
|
+
"host": {
|
|
1575
|
+
"char": "h",
|
|
1576
|
+
"description": "listen hostname",
|
|
1577
|
+
"name": "host",
|
|
1578
|
+
"hasDynamicHelp": false,
|
|
1579
|
+
"multiple": false,
|
|
1580
|
+
"type": "option"
|
|
1581
|
+
},
|
|
1561
1582
|
"port": {
|
|
1562
1583
|
"char": "p",
|
|
1563
1584
|
"description": "port",
|
|
@@ -2212,5 +2233,5 @@
|
|
|
2212
2233
|
]
|
|
2213
2234
|
}
|
|
2214
2235
|
},
|
|
2215
|
-
"version": "1.1.4-
|
|
2236
|
+
"version": "1.1.4-beta.0"
|
|
2216
2237
|
}
|
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": "1.1.4-
|
|
5
|
+
"version": "1.1.4-beta.0",
|
|
6
6
|
"author": "Tom Nielsen @glutamate",
|
|
7
7
|
"bin": {
|
|
8
8
|
"saltcorn": "./bin/saltcorn"
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@oclif/core": "^4.2.4",
|
|
13
13
|
"@oclif/plugin-plugins": "^5.4.26",
|
|
14
|
-
"@saltcorn/admin-models": "1.1.4-
|
|
15
|
-
"@saltcorn/common-code": "1.1.4-
|
|
16
|
-
"@saltcorn/data": "1.1.4-
|
|
17
|
-
"@saltcorn/mobile-app": "1.1.4-
|
|
18
|
-
"@saltcorn/mobile-builder": "1.1.4-
|
|
19
|
-
"@saltcorn/plugins-loader": "1.1.4-
|
|
20
|
-
"@saltcorn/server": "1.1.4-
|
|
14
|
+
"@saltcorn/admin-models": "1.1.4-beta.0",
|
|
15
|
+
"@saltcorn/common-code": "1.1.4-beta.0",
|
|
16
|
+
"@saltcorn/data": "1.1.4-beta.0",
|
|
17
|
+
"@saltcorn/mobile-app": "1.1.4-beta.0",
|
|
18
|
+
"@saltcorn/mobile-builder": "1.1.4-beta.0",
|
|
19
|
+
"@saltcorn/plugins-loader": "1.1.4-beta.0",
|
|
20
|
+
"@saltcorn/server": "1.1.4-beta.0",
|
|
21
21
|
"contractis": "^0.1.0",
|
|
22
22
|
"dateformat": "^4.6.3",
|
|
23
23
|
"inquirer": "^12.3.3",
|
package/src/commands/info.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @category saltcorn-cli
|
|
3
3
|
* @module commands/info
|
|
4
4
|
*/
|
|
5
|
-
const { Command, Flags } = require("@oclif/core");
|
|
5
|
+
const { Command, Flags, Args } = require("@oclif/core");
|
|
6
6
|
const {
|
|
7
7
|
configFilePath,
|
|
8
8
|
getConnectObject,
|
|
@@ -25,7 +25,7 @@ class InfoCommand extends Command {
|
|
|
25
25
|
* @returns {Promise<void>}
|
|
26
26
|
*/
|
|
27
27
|
async run() {
|
|
28
|
-
const { flags } = await this.parse(InfoCommand);
|
|
28
|
+
const { flags, args } = await this.parse(InfoCommand);
|
|
29
29
|
const db = require("@saltcorn/data/db");
|
|
30
30
|
const cliPath = __dirname;
|
|
31
31
|
const conn = getConnectObject();
|
|
@@ -46,13 +46,17 @@ class InfoCommand extends Command {
|
|
|
46
46
|
res.environmentVariables = {};
|
|
47
47
|
const envVars =
|
|
48
48
|
"DATABASE_URL SQLITE_FILEPATH PGDATABASE PGUSER PGHOST PGPORT PGPASSWORD PGDATABASE SALTCORN_SESSION_SECRET SALTCORN_MULTI_TENANT SALTCORN_FILE_STORE SALTCORN_DEFAULT_SCHEMA SALTCORN_FIXED_CONFIGURATION SALTCORN_INHERIT_CONFIGURATION SALTCORN_SERVE_ADDITIONAL_DIR SALTCORN_NWORKERS SALTCORN_DISABLE_UPGRADE PUPPETEER_CHROMIUM_BIN".split(
|
|
49
|
-
" "
|
|
49
|
+
" ",
|
|
50
50
|
);
|
|
51
51
|
envVars.forEach((v) => {
|
|
52
52
|
if (process.env[v]) res.environmentVariables[v] = process.env[v];
|
|
53
53
|
else res.environmentVariables[v] = "";
|
|
54
54
|
});
|
|
55
|
-
|
|
55
|
+
if (args.key === "file_store" || args.key === "version_tag") {
|
|
56
|
+
console.log(res.configuration[args.key]);
|
|
57
|
+
} else if (args.key) {
|
|
58
|
+
console.log(res[args.key]);
|
|
59
|
+
} else print_it(res, flags.json);
|
|
56
60
|
this.exit(0);
|
|
57
61
|
}
|
|
58
62
|
}
|
|
@@ -72,4 +76,18 @@ InfoCommand.flags = {
|
|
|
72
76
|
json: Flags.boolean({ char: "j", description: "json format" }),
|
|
73
77
|
};
|
|
74
78
|
|
|
79
|
+
InfoCommand.args = {
|
|
80
|
+
key: Args.string({
|
|
81
|
+
required: false,
|
|
82
|
+
description: "Output single value",
|
|
83
|
+
options: [
|
|
84
|
+
"configFilePath",
|
|
85
|
+
"cliPath",
|
|
86
|
+
"file_store",
|
|
87
|
+
"saltcornVersion",
|
|
88
|
+
"version_tag",
|
|
89
|
+
],
|
|
90
|
+
}),
|
|
91
|
+
};
|
|
92
|
+
|
|
75
93
|
module.exports = InfoCommand;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @module commands/install-pack
|
|
4
4
|
*/
|
|
5
5
|
const { Command, Flags } = require("@oclif/core");
|
|
6
|
-
const {
|
|
6
|
+
const { maybe_as_tenant_in_transaction } = require("../common");
|
|
7
7
|
const fs = require("fs");
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -36,7 +36,7 @@ class InstallPackCommand extends Command {
|
|
|
36
36
|
const tenants = await getAllTenants();
|
|
37
37
|
await init_multi_tenant(loadAllPlugins, undefined, tenants);
|
|
38
38
|
|
|
39
|
-
await
|
|
39
|
+
await maybe_as_tenant_in_transaction(flags.tenant, async () => {
|
|
40
40
|
if (flags.name) {
|
|
41
41
|
const pack = await fetch_pack_by_name(flags.name);
|
|
42
42
|
if (!pack) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @module commands/install-plugin
|
|
4
4
|
*/
|
|
5
5
|
const { Command, Flags } = require("@oclif/core");
|
|
6
|
-
const {
|
|
6
|
+
const { maybe_as_tenant_in_transaction, init_some_tenants } = require("../common");
|
|
7
7
|
const fs = require("fs");
|
|
8
8
|
const path = require("path");
|
|
9
9
|
|
|
@@ -35,7 +35,7 @@ class InstallPluginCommand extends Command {
|
|
|
35
35
|
|
|
36
36
|
const Plugin = require("@saltcorn/data/models/plugin");
|
|
37
37
|
|
|
38
|
-
await
|
|
38
|
+
await maybe_as_tenant_in_transaction(flags.tenant, async () => {
|
|
39
39
|
if (flags.name) {
|
|
40
40
|
const plugin = await Plugin.store_by_name(flags.name);
|
|
41
41
|
if (!plugin) {
|
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
* @module commands/run-trigger
|
|
4
4
|
*/
|
|
5
5
|
const { Command, Flags, Args } = require("@oclif/core");
|
|
6
|
-
const {
|
|
6
|
+
const {
|
|
7
|
+
maybe_as_tenant_in_transaction,
|
|
8
|
+
init_some_tenants,
|
|
9
|
+
} = require("../common");
|
|
7
10
|
|
|
8
11
|
/**
|
|
9
12
|
* RunTriggerCommand Class
|
|
@@ -21,7 +24,7 @@ class RunTriggerCommand extends Command {
|
|
|
21
24
|
const { mockReqRes } = require("@saltcorn/data/tests/mocks");
|
|
22
25
|
const Trigger = require(`@saltcorn/data/models/trigger`);
|
|
23
26
|
const that = this;
|
|
24
|
-
await
|
|
27
|
+
await maybe_as_tenant_in_transaction(flags.tenant, async () => {
|
|
25
28
|
const trigger = await Trigger.findOne({ name: args.trigger });
|
|
26
29
|
if (!trigger) {
|
|
27
30
|
console.error(`Trigger ${args.trigger} not found`);
|
|
@@ -29,6 +32,7 @@ class RunTriggerCommand extends Command {
|
|
|
29
32
|
}
|
|
30
33
|
await trigger.runWithoutRow({ user: { role_id: 1 } });
|
|
31
34
|
});
|
|
35
|
+
this.exit(0);
|
|
32
36
|
}
|
|
33
37
|
}
|
|
34
38
|
/**
|
package/src/commands/serve.js
CHANGED
|
@@ -21,6 +21,8 @@ class ServeCommand extends Command {
|
|
|
21
21
|
defaultNCPUs: cpu.performanceCores || cpu.physicalCores,
|
|
22
22
|
};
|
|
23
23
|
serveArgs.port = flags.port || 3000;
|
|
24
|
+
if (flags.host) serveArgs.host = flags.host;
|
|
25
|
+
|
|
24
26
|
if (flags.addschema) {
|
|
25
27
|
try {
|
|
26
28
|
const { getConfig } = require("@saltcorn/data/models/config");
|
|
@@ -61,6 +63,11 @@ ServeCommand.description = `Start the Saltcorn server`;
|
|
|
61
63
|
* @type {object}
|
|
62
64
|
*/
|
|
63
65
|
ServeCommand.flags = {
|
|
66
|
+
host: Flags.string({
|
|
67
|
+
name: "hostname",
|
|
68
|
+
char: "h",
|
|
69
|
+
description: "listen hostname",
|
|
70
|
+
}),
|
|
64
71
|
port: Flags.integer({ char: "p", description: "port", default: 3000 }),
|
|
65
72
|
verbose: Flags.boolean({ char: "v", description: "Verbose" }),
|
|
66
73
|
watchReaper: Flags.boolean({ char: "r", description: "Watch reaper" }),
|
package/src/common.js
CHANGED
|
@@ -21,6 +21,23 @@ const maybe_as_tenant = async (ten, f) => {
|
|
|
21
21
|
for (const tenant of tenants) await db.runWithTenant(tenant, f);
|
|
22
22
|
} else return await db.runWithTenant(ten, f);
|
|
23
23
|
};
|
|
24
|
+
|
|
25
|
+
const maybe_as_tenant_in_transaction = async (ten, f0) => {
|
|
26
|
+
const db = require("@saltcorn/data/db");
|
|
27
|
+
const f = async () => {
|
|
28
|
+
await db.withTransaction(async () => {
|
|
29
|
+
await f0();
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
if (!ten) return await db.runWithTenant("public", f);
|
|
33
|
+
if (ten === "*") {
|
|
34
|
+
const { getAllTenants } = require("@saltcorn/admin-models/models/tenant");
|
|
35
|
+
const tenants = await getAllTenants();
|
|
36
|
+
|
|
37
|
+
for (const tenant of tenants) await db.runWithTenant(tenant, f);
|
|
38
|
+
} else return await db.runWithTenant(ten, f);
|
|
39
|
+
};
|
|
40
|
+
|
|
24
41
|
/**
|
|
25
42
|
* Init specified tenant
|
|
26
43
|
* @param tenant - specified tenant
|
|
@@ -123,6 +140,7 @@ const prep_test_db = async (backupFile) => {
|
|
|
123
140
|
|
|
124
141
|
module.exports = {
|
|
125
142
|
maybe_as_tenant,
|
|
143
|
+
maybe_as_tenant_in_transaction,
|
|
126
144
|
parseJSONorString,
|
|
127
145
|
sleep,
|
|
128
146
|
init_some_tenants,
|