@saltcorn/cli 0.6.4-beta.1 → 0.6.4-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 +28 -28
- package/npm-shrinkwrap.json +93 -66
- package/oclif.manifest.json +1 -1
- package/package.json +6 -5
- package/src/commands/backup.js +5 -4
- package/src/commands/create-tenant.js +4 -4
- package/src/commands/delete-tenants.js +1 -1
- package/src/commands/fixtures.js +3 -1
- package/src/commands/install-pack.js +4 -2
- package/src/commands/install-plugin.js +4 -2
- package/src/commands/list-tenants.js +11 -9
- package/src/commands/migrate.js +1 -1
- package/src/commands/plugins.js +1 -1
- package/src/commands/release.js +5 -1
- package/src/commands/restore.js +6 -6
- package/src/commands/rm-tenant.js +1 -1
- package/src/commands/setup-benchmark.js +6 -8
- package/src/commands/transform-field.js +6 -3
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.6.4-beta.
|
|
23
|
+
@saltcorn/cli/0.6.4-beta.2 darwin-x64 node-v14.16.1
|
|
24
24
|
$ saltcorn --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ saltcorn COMMAND
|
|
@@ -69,7 +69,7 @@ USAGE
|
|
|
69
69
|
$ saltcorn add-schema
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
_See code: [src/commands/add-schema.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.
|
|
72
|
+
_See code: [src/commands/add-schema.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.2/src/commands/add-schema.js)_
|
|
73
73
|
|
|
74
74
|
## `saltcorn backup`
|
|
75
75
|
|
|
@@ -85,7 +85,7 @@ OPTIONS
|
|
|
85
85
|
-z, --zip zip format
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
-
_See code: [src/commands/backup.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.
|
|
88
|
+
_See code: [src/commands/backup.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.2/src/commands/backup.js)_
|
|
89
89
|
|
|
90
90
|
## `saltcorn create-tenant TENANT`
|
|
91
91
|
|
|
@@ -103,7 +103,7 @@ OPTIONS
|
|
|
103
103
|
-e, --email=email Email of owner of tenant
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
-
_See code: [src/commands/create-tenant.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.
|
|
106
|
+
_See code: [src/commands/create-tenant.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.2/src/commands/create-tenant.js)_
|
|
107
107
|
|
|
108
108
|
## `saltcorn create-user`
|
|
109
109
|
|
|
@@ -121,7 +121,7 @@ OPTIONS
|
|
|
121
121
|
-t, --tenant=tenant tenant
|
|
122
122
|
```
|
|
123
123
|
|
|
124
|
-
_See code: [src/commands/create-user.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.
|
|
124
|
+
_See code: [src/commands/create-user.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.2/src/commands/create-user.js)_
|
|
125
125
|
|
|
126
126
|
## `saltcorn delete-tenants`
|
|
127
127
|
|
|
@@ -132,7 +132,7 @@ USAGE
|
|
|
132
132
|
$ saltcorn delete-tenants
|
|
133
133
|
```
|
|
134
134
|
|
|
135
|
-
_See code: [src/commands/delete-tenants.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.
|
|
135
|
+
_See code: [src/commands/delete-tenants.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.2/src/commands/delete-tenants.js)_
|
|
136
136
|
|
|
137
137
|
## `saltcorn fixtures`
|
|
138
138
|
|
|
@@ -151,7 +151,7 @@ DESCRIPTION
|
|
|
151
151
|
This manual step it is never required for users and rarely required for developers
|
|
152
152
|
```
|
|
153
153
|
|
|
154
|
-
_See code: [src/commands/fixtures.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.
|
|
154
|
+
_See code: [src/commands/fixtures.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.2/src/commands/fixtures.js)_
|
|
155
155
|
|
|
156
156
|
## `saltcorn help [COMMAND]`
|
|
157
157
|
|
|
@@ -189,7 +189,7 @@ ALIASES
|
|
|
189
189
|
$ saltcorn paths
|
|
190
190
|
```
|
|
191
191
|
|
|
192
|
-
_See code: [src/commands/info.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.
|
|
192
|
+
_See code: [src/commands/info.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.2/src/commands/info.js)_
|
|
193
193
|
|
|
194
194
|
## `saltcorn install-pack`
|
|
195
195
|
|
|
@@ -205,7 +205,7 @@ OPTIONS
|
|
|
205
205
|
-t, --tenant=tenant tenant
|
|
206
206
|
```
|
|
207
207
|
|
|
208
|
-
_See code: [src/commands/install-pack.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.
|
|
208
|
+
_See code: [src/commands/install-pack.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.2/src/commands/install-pack.js)_
|
|
209
209
|
|
|
210
210
|
## `saltcorn install-plugin`
|
|
211
211
|
|
|
@@ -221,7 +221,7 @@ OPTIONS
|
|
|
221
221
|
-t, --tenant=tenant tenant
|
|
222
222
|
```
|
|
223
223
|
|
|
224
|
-
_See code: [src/commands/install-plugin.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.
|
|
224
|
+
_See code: [src/commands/install-plugin.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.2/src/commands/install-plugin.js)_
|
|
225
225
|
|
|
226
226
|
## `saltcorn list-tenants`
|
|
227
227
|
|
|
@@ -232,7 +232,7 @@ USAGE
|
|
|
232
232
|
$ saltcorn list-tenants
|
|
233
233
|
```
|
|
234
234
|
|
|
235
|
-
_See code: [src/commands/list-tenants.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.
|
|
235
|
+
_See code: [src/commands/list-tenants.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.2/src/commands/list-tenants.js)_
|
|
236
236
|
|
|
237
237
|
## `saltcorn localize-plugin PLUGIN PATH`
|
|
238
238
|
|
|
@@ -250,7 +250,7 @@ OPTIONS
|
|
|
250
250
|
-t, --tenant=tenant tenant
|
|
251
251
|
```
|
|
252
252
|
|
|
253
|
-
_See code: [src/commands/localize-plugin.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.
|
|
253
|
+
_See code: [src/commands/localize-plugin.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.2/src/commands/localize-plugin.js)_
|
|
254
254
|
|
|
255
255
|
## `saltcorn make-migration`
|
|
256
256
|
|
|
@@ -266,7 +266,7 @@ DESCRIPTION
|
|
|
266
266
|
unless you are a developer.
|
|
267
267
|
```
|
|
268
268
|
|
|
269
|
-
_See code: [src/commands/make-migration.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.
|
|
269
|
+
_See code: [src/commands/make-migration.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.2/src/commands/make-migration.js)_
|
|
270
270
|
|
|
271
271
|
## `saltcorn saltcorn migrate`
|
|
272
272
|
|
|
@@ -288,7 +288,7 @@ DESCRIPTION
|
|
|
288
288
|
servers and need to control when the migrations are run.
|
|
289
289
|
```
|
|
290
290
|
|
|
291
|
-
_See code: [src/commands/migrate.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.
|
|
291
|
+
_See code: [src/commands/migrate.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.2/src/commands/migrate.js)_
|
|
292
292
|
|
|
293
293
|
## `saltcorn plugins`
|
|
294
294
|
|
|
@@ -315,7 +315,7 @@ EXAMPLES
|
|
|
315
315
|
plugins -u -f - force plugin update
|
|
316
316
|
```
|
|
317
317
|
|
|
318
|
-
_See code: [src/commands/plugins.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.
|
|
318
|
+
_See code: [src/commands/plugins.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.2/src/commands/plugins.js)_
|
|
319
319
|
|
|
320
320
|
## `saltcorn release VERSION`
|
|
321
321
|
|
|
@@ -329,7 +329,7 @@ ARGUMENTS
|
|
|
329
329
|
VERSION New version number
|
|
330
330
|
```
|
|
331
331
|
|
|
332
|
-
_See code: [src/commands/release.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.
|
|
332
|
+
_See code: [src/commands/release.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.2/src/commands/release.js)_
|
|
333
333
|
|
|
334
334
|
## `saltcorn reset-schema`
|
|
335
335
|
|
|
@@ -348,7 +348,7 @@ DESCRIPTION
|
|
|
348
348
|
This will delete all existing information
|
|
349
349
|
```
|
|
350
350
|
|
|
351
|
-
_See code: [src/commands/reset-schema.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.
|
|
351
|
+
_See code: [src/commands/reset-schema.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.2/src/commands/reset-schema.js)_
|
|
352
352
|
|
|
353
353
|
## `saltcorn restore FILE`
|
|
354
354
|
|
|
@@ -365,7 +365,7 @@ OPTIONS
|
|
|
365
365
|
-t, --tenant=tenant tenant
|
|
366
366
|
```
|
|
367
367
|
|
|
368
|
-
_See code: [src/commands/restore.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.
|
|
368
|
+
_See code: [src/commands/restore.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.2/src/commands/restore.js)_
|
|
369
369
|
|
|
370
370
|
## `saltcorn rm-tenant TENANT`
|
|
371
371
|
|
|
@@ -379,7 +379,7 @@ ARGUMENTS
|
|
|
379
379
|
TENANT Tenant to remove
|
|
380
380
|
```
|
|
381
381
|
|
|
382
|
-
_See code: [src/commands/rm-tenant.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.
|
|
382
|
+
_See code: [src/commands/rm-tenant.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.2/src/commands/rm-tenant.js)_
|
|
383
383
|
|
|
384
384
|
## `saltcorn run-benchmark [BASEURL]`
|
|
385
385
|
|
|
@@ -398,7 +398,7 @@ OPTIONS
|
|
|
398
398
|
-t, --token=token API Token for reporting results
|
|
399
399
|
```
|
|
400
400
|
|
|
401
|
-
_See code: [src/commands/run-benchmark.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.
|
|
401
|
+
_See code: [src/commands/run-benchmark.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.2/src/commands/run-benchmark.js)_
|
|
402
402
|
|
|
403
403
|
## `saltcorn run-tests [PACKAGE]`
|
|
404
404
|
|
|
@@ -418,7 +418,7 @@ OPTIONS
|
|
|
418
418
|
--watchAll Watch files for changes and rerun all tests.
|
|
419
419
|
```
|
|
420
420
|
|
|
421
|
-
_See code: [src/commands/run-tests.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.
|
|
421
|
+
_See code: [src/commands/run-tests.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.2/src/commands/run-tests.js)_
|
|
422
422
|
|
|
423
423
|
## `saltcorn scheduler`
|
|
424
424
|
|
|
@@ -432,7 +432,7 @@ OPTIONS
|
|
|
432
432
|
-v, --verbose Verbose
|
|
433
433
|
```
|
|
434
434
|
|
|
435
|
-
_See code: [src/commands/scheduler.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.
|
|
435
|
+
_See code: [src/commands/scheduler.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.2/src/commands/scheduler.js)_
|
|
436
436
|
|
|
437
437
|
## `saltcorn serve`
|
|
438
438
|
|
|
@@ -452,7 +452,7 @@ OPTIONS
|
|
|
452
452
|
-v, --verbose Verbose
|
|
453
453
|
```
|
|
454
454
|
|
|
455
|
-
_See code: [src/commands/serve.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.
|
|
455
|
+
_See code: [src/commands/serve.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.2/src/commands/serve.js)_
|
|
456
456
|
|
|
457
457
|
## `saltcorn set-cfg KEY VALUE`
|
|
458
458
|
|
|
@@ -471,7 +471,7 @@ OPTIONS
|
|
|
471
471
|
-t, --tenant=tenant tenant
|
|
472
472
|
```
|
|
473
473
|
|
|
474
|
-
_See code: [src/commands/set-cfg.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.
|
|
474
|
+
_See code: [src/commands/set-cfg.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.2/src/commands/set-cfg.js)_
|
|
475
475
|
|
|
476
476
|
## `saltcorn setup`
|
|
477
477
|
|
|
@@ -490,7 +490,7 @@ DESCRIPTION
|
|
|
490
490
|
configuration file
|
|
491
491
|
```
|
|
492
492
|
|
|
493
|
-
_See code: [src/commands/setup.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.
|
|
493
|
+
_See code: [src/commands/setup.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.2/src/commands/setup.js)_
|
|
494
494
|
|
|
495
495
|
## `saltcorn setup-benchmark`
|
|
496
496
|
|
|
@@ -504,7 +504,7 @@ OPTIONS
|
|
|
504
504
|
-t, --tenant=tenant tenant
|
|
505
505
|
```
|
|
506
506
|
|
|
507
|
-
_See code: [src/commands/setup-benchmark.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.
|
|
507
|
+
_See code: [src/commands/setup-benchmark.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.2/src/commands/setup-benchmark.js)_
|
|
508
508
|
|
|
509
509
|
## `saltcorn test-plugin PATH`
|
|
510
510
|
|
|
@@ -522,7 +522,7 @@ DESCRIPTION
|
|
|
522
522
|
Extra documentation goes here
|
|
523
523
|
```
|
|
524
524
|
|
|
525
|
-
_See code: [src/commands/test-plugin.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.
|
|
525
|
+
_See code: [src/commands/test-plugin.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.2/src/commands/test-plugin.js)_
|
|
526
526
|
|
|
527
527
|
## `saltcorn transform-field EXPRESSION FIELD TABLE [TENANT]`
|
|
528
528
|
|
|
@@ -539,5 +539,5 @@ ARGUMENTS
|
|
|
539
539
|
TENANT tenant name
|
|
540
540
|
```
|
|
541
541
|
|
|
542
|
-
_See code: [src/commands/transform-field.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.
|
|
542
|
+
_See code: [src/commands/transform-field.js](https://github.com/saltcorn/saltcorn/blob/v0.6.4-beta.2/src/commands/transform-field.js)_
|
|
543
543
|
<!-- commandsstop -->
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saltcorn/cli",
|
|
3
|
-
"version": "0.6.4-beta.
|
|
3
|
+
"version": "0.6.4-beta.2",
|
|
4
4
|
"lockfileVersion": 1,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"dependencies": {
|
|
@@ -106,9 +106,9 @@
|
|
|
106
106
|
}
|
|
107
107
|
},
|
|
108
108
|
"@babel/parser": {
|
|
109
|
-
"version": "7.16.
|
|
110
|
-
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.
|
|
111
|
-
"integrity": "sha512-
|
|
109
|
+
"version": "7.16.12",
|
|
110
|
+
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.12.tgz",
|
|
111
|
+
"integrity": "sha512-VfaV15po8RiZssrkPweyvbGVSe4x2y+aciFCgn0n0/SJMR22cwofRV1mtnJQYcSB1wUTaA/X1LnA3es66MCO5A=="
|
|
112
112
|
},
|
|
113
113
|
"@babel/template": {
|
|
114
114
|
"version": "7.16.7",
|
|
@@ -861,41 +861,56 @@
|
|
|
861
861
|
"@root/encoding": "^1.0.1"
|
|
862
862
|
}
|
|
863
863
|
},
|
|
864
|
+
"@saltcorn/admin-models": {
|
|
865
|
+
"version": "0.6.4-beta.2",
|
|
866
|
+
"resolved": "https://registry.npmjs.org/@saltcorn/admin-models/-/admin-models-0.6.4-beta.2.tgz",
|
|
867
|
+
"integrity": "sha512-G6Kr6F8FDDF5zmvGb6IwTs1VEgOVvh9rRlKHszrqdpsq7R/M9M005CUbUE+sMzPGf5WiDWCjy/5+lezlfu2evA==",
|
|
868
|
+
"requires": {
|
|
869
|
+
"@saltcorn/data": "0.6.4-beta.2",
|
|
870
|
+
"@saltcorn/db-common": "0.6.4-beta.2",
|
|
871
|
+
"@saltcorn/markup": "0.6.4-beta.2",
|
|
872
|
+
"@saltcorn/types": "0.6.4-beta.2",
|
|
873
|
+
"adm-zip": "0.5.5",
|
|
874
|
+
"csv-stringify": "^5.5.0",
|
|
875
|
+
"csvtojson": "^2.0.10",
|
|
876
|
+
"dateformat": "^3.0.3",
|
|
877
|
+
"node-fetch": "2.6.2",
|
|
878
|
+
"tmp-promise": "^3.0.2"
|
|
879
|
+
}
|
|
880
|
+
},
|
|
864
881
|
"@saltcorn/base-plugin": {
|
|
865
|
-
"version": "0.6.4-beta.
|
|
866
|
-
"resolved": "https://registry.npmjs.org/@saltcorn/base-plugin/-/base-plugin-0.6.4-beta.
|
|
867
|
-
"integrity": "sha512-
|
|
882
|
+
"version": "0.6.4-beta.2",
|
|
883
|
+
"resolved": "https://registry.npmjs.org/@saltcorn/base-plugin/-/base-plugin-0.6.4-beta.2.tgz",
|
|
884
|
+
"integrity": "sha512-NoldJsBCxaprYPfGBCZmZ1Byl/ZMHOy7YC+Tfv57kyURkEyVsQk0iMnTuDiP0vJv/Etv6ZWA1KcRi5Nnm+DMBg==",
|
|
868
885
|
"requires": {
|
|
869
|
-
"@saltcorn/data": "0.6.4-beta.
|
|
886
|
+
"@saltcorn/data": "0.6.4-beta.2"
|
|
870
887
|
}
|
|
871
888
|
},
|
|
872
889
|
"@saltcorn/builder": {
|
|
873
|
-
"version": "0.6.4-beta.
|
|
874
|
-
"resolved": "https://registry.npmjs.org/@saltcorn/builder/-/builder-0.6.4-beta.
|
|
875
|
-
"integrity": "sha512-
|
|
890
|
+
"version": "0.6.4-beta.2",
|
|
891
|
+
"resolved": "https://registry.npmjs.org/@saltcorn/builder/-/builder-0.6.4-beta.2.tgz",
|
|
892
|
+
"integrity": "sha512-P/PFFJVyohNLuV7Nw0LSWiCmarlF6NbX6LQsQmXrbRdFqppWPMAXg90Yd4vW+3R9tIQgyrOVTpZvWyCaajI2rA==",
|
|
876
893
|
"requires": {
|
|
877
894
|
"styled-components": "4.4.1"
|
|
878
895
|
}
|
|
879
896
|
},
|
|
880
897
|
"@saltcorn/data": {
|
|
881
|
-
"version": "0.6.4-beta.
|
|
882
|
-
"resolved": "https://registry.npmjs.org/@saltcorn/data/-/data-0.6.4-beta.
|
|
883
|
-
"integrity": "sha512-
|
|
884
|
-
"requires": {
|
|
885
|
-
"@saltcorn/db-common": "0.6.4-beta.
|
|
886
|
-
"@saltcorn/markup": "0.6.4-beta.
|
|
887
|
-
"@saltcorn/postgres": "0.6.4-beta.
|
|
888
|
-
"@saltcorn/sqlite": "0.6.4-beta.
|
|
889
|
-
"@saltcorn/types": "0.6.4-beta.
|
|
898
|
+
"version": "0.6.4-beta.2",
|
|
899
|
+
"resolved": "https://registry.npmjs.org/@saltcorn/data/-/data-0.6.4-beta.2.tgz",
|
|
900
|
+
"integrity": "sha512-EaT31Pbl99xaBkhKphG626kaupNEsuBpv73D+dMrwv2MEgvHZ0dyG4Su+6rHKz12LvqmNBnU5UzpmvSJ11JS5w==",
|
|
901
|
+
"requires": {
|
|
902
|
+
"@saltcorn/db-common": "0.6.4-beta.2",
|
|
903
|
+
"@saltcorn/markup": "0.6.4-beta.2",
|
|
904
|
+
"@saltcorn/postgres": "0.6.4-beta.2",
|
|
905
|
+
"@saltcorn/sqlite": "0.6.4-beta.2",
|
|
906
|
+
"@saltcorn/types": "0.6.4-beta.2",
|
|
890
907
|
"acorn": "^8.0.3",
|
|
891
|
-
"adm-zip": "0.5.5",
|
|
892
908
|
"astring": "^1.4.3",
|
|
893
909
|
"bcryptjs": "^2.4.3",
|
|
894
910
|
"blockly": "^6.20210701.0",
|
|
895
911
|
"bootstrap-email": "^1.1.1",
|
|
896
912
|
"connect-pg-simple": "^6.1.0",
|
|
897
913
|
"contractis": "^0.1.0",
|
|
898
|
-
"csv-stringify": "^5.5.0",
|
|
899
914
|
"csvtojson": "^2.0.10",
|
|
900
915
|
"dateformat": "^3.0.3",
|
|
901
916
|
"dumb-passwords": "^0.2.1",
|
|
@@ -914,14 +929,14 @@
|
|
|
914
929
|
}
|
|
915
930
|
},
|
|
916
931
|
"@saltcorn/db-common": {
|
|
917
|
-
"version": "0.6.4-beta.
|
|
918
|
-
"resolved": "https://registry.npmjs.org/@saltcorn/db-common/-/db-common-0.6.4-beta.
|
|
919
|
-
"integrity": "sha512-
|
|
932
|
+
"version": "0.6.4-beta.2",
|
|
933
|
+
"resolved": "https://registry.npmjs.org/@saltcorn/db-common/-/db-common-0.6.4-beta.2.tgz",
|
|
934
|
+
"integrity": "sha512-LkHRKyOCttXFvqM/8haIzD8mUAa0sMjBrwYvGHTc55uvfBupoLqOLkd+rjJgcIkCtpu+qs7ixYVz/1LpzCEdsA=="
|
|
920
935
|
},
|
|
921
936
|
"@saltcorn/markup": {
|
|
922
|
-
"version": "0.6.4-beta.
|
|
923
|
-
"resolved": "https://registry.npmjs.org/@saltcorn/markup/-/markup-0.6.4-beta.
|
|
924
|
-
"integrity": "sha512-
|
|
937
|
+
"version": "0.6.4-beta.2",
|
|
938
|
+
"resolved": "https://registry.npmjs.org/@saltcorn/markup/-/markup-0.6.4-beta.2.tgz",
|
|
939
|
+
"integrity": "sha512-lYZSVu+6TuDA2GIdzohOH+XUjHTZPwM/UdIa4yRze6zvktxgrJLxWAlWNsvq4kRW6tFApcvF7NKQFLruHVPRUg==",
|
|
925
940
|
"requires": {
|
|
926
941
|
"escape-html": "^1.0.3",
|
|
927
942
|
"html-tags": "3.1.0",
|
|
@@ -929,36 +944,37 @@
|
|
|
929
944
|
}
|
|
930
945
|
},
|
|
931
946
|
"@saltcorn/postgres": {
|
|
932
|
-
"version": "0.6.4-beta.
|
|
933
|
-
"resolved": "https://registry.npmjs.org/@saltcorn/postgres/-/postgres-0.6.4-beta.
|
|
934
|
-
"integrity": "sha512-
|
|
947
|
+
"version": "0.6.4-beta.2",
|
|
948
|
+
"resolved": "https://registry.npmjs.org/@saltcorn/postgres/-/postgres-0.6.4-beta.2.tgz",
|
|
949
|
+
"integrity": "sha512-zj63bJDnD1EvW150P2l3y/YZbmvvp36mYxl51cUzGKrB9LRhK19lmNjZ4Ow5PoqfCwh0N+baNI4kZcjD/V6UDg==",
|
|
935
950
|
"optional": true,
|
|
936
951
|
"requires": {
|
|
937
|
-
"@saltcorn/db-common": "0.6.4-beta.
|
|
952
|
+
"@saltcorn/db-common": "0.6.4-beta.2",
|
|
938
953
|
"pg": "^8.2.1",
|
|
939
954
|
"pg-copy-streams": "^5.1.1"
|
|
940
955
|
}
|
|
941
956
|
},
|
|
942
957
|
"@saltcorn/sbadmin2": {
|
|
943
|
-
"version": "0.6.4-beta.
|
|
944
|
-
"resolved": "https://registry.npmjs.org/@saltcorn/sbadmin2/-/sbadmin2-0.6.4-beta.
|
|
945
|
-
"integrity": "sha512-
|
|
958
|
+
"version": "0.6.4-beta.2",
|
|
959
|
+
"resolved": "https://registry.npmjs.org/@saltcorn/sbadmin2/-/sbadmin2-0.6.4-beta.2.tgz",
|
|
960
|
+
"integrity": "sha512-Qa6Zo0SdQmtbAm5PGMH4UtfirsJE/nXeJJJQH5IYc7LgEnnr5qLxmAywAOVR4JwJz72yUmwpEesyELv/PLy9gg==",
|
|
946
961
|
"requires": {
|
|
947
|
-
"@saltcorn/data": "0.6.4-beta.
|
|
948
|
-
"@saltcorn/markup": "0.6.4-beta.
|
|
962
|
+
"@saltcorn/data": "0.6.4-beta.2",
|
|
963
|
+
"@saltcorn/markup": "0.6.4-beta.2",
|
|
949
964
|
"startbootstrap-sb-admin-2": "^4.1.4"
|
|
950
965
|
}
|
|
951
966
|
},
|
|
952
967
|
"@saltcorn/server": {
|
|
953
|
-
"version": "0.6.4-beta.
|
|
954
|
-
"resolved": "https://registry.npmjs.org/@saltcorn/server/-/server-0.6.4-beta.
|
|
955
|
-
"integrity": "sha512-
|
|
956
|
-
"requires": {
|
|
957
|
-
"@saltcorn/
|
|
958
|
-
"@saltcorn/
|
|
959
|
-
"@saltcorn/
|
|
960
|
-
"@saltcorn/
|
|
961
|
-
"@saltcorn/
|
|
968
|
+
"version": "0.6.4-beta.2",
|
|
969
|
+
"resolved": "https://registry.npmjs.org/@saltcorn/server/-/server-0.6.4-beta.2.tgz",
|
|
970
|
+
"integrity": "sha512-fLy2ZQIJwlrNNhocM41LH/xh/JNNbR/Z+lgjX0vBcSCAUmte1JEM8WmIl/WHi6rIIYpW0xw4yJXtJSh0ZjAyiw==",
|
|
971
|
+
"requires": {
|
|
972
|
+
"@saltcorn/admin-models": "0.6.4-beta.2",
|
|
973
|
+
"@saltcorn/base-plugin": "0.6.4-beta.2",
|
|
974
|
+
"@saltcorn/builder": "0.6.4-beta.2",
|
|
975
|
+
"@saltcorn/data": "0.6.4-beta.2",
|
|
976
|
+
"@saltcorn/markup": "0.6.4-beta.2",
|
|
977
|
+
"@saltcorn/sbadmin2": "0.6.4-beta.2",
|
|
962
978
|
"@socket.io/cluster-adapter": "^0.1.0",
|
|
963
979
|
"@socket.io/sticky": "^1.0.1",
|
|
964
980
|
"aws-sdk": "^2.1037.0",
|
|
@@ -1002,19 +1018,19 @@
|
|
|
1002
1018
|
}
|
|
1003
1019
|
},
|
|
1004
1020
|
"@saltcorn/sqlite": {
|
|
1005
|
-
"version": "0.6.4-beta.
|
|
1006
|
-
"resolved": "https://registry.npmjs.org/@saltcorn/sqlite/-/sqlite-0.6.4-beta.
|
|
1007
|
-
"integrity": "sha512
|
|
1021
|
+
"version": "0.6.4-beta.2",
|
|
1022
|
+
"resolved": "https://registry.npmjs.org/@saltcorn/sqlite/-/sqlite-0.6.4-beta.2.tgz",
|
|
1023
|
+
"integrity": "sha512-+gnjwi1/HpYAotAQFF9Y6Ikn/D82UrZ3Bi5G+1WYvnjqnwrJj+mmuvEQHEMsskEhEesuAnRlyZQbO+Khb2PZqw==",
|
|
1008
1024
|
"optional": true,
|
|
1009
1025
|
"requires": {
|
|
1010
|
-
"@saltcorn/db-common": "0.6.4-beta.
|
|
1026
|
+
"@saltcorn/db-common": "0.6.4-beta.2",
|
|
1011
1027
|
"sqlite3": "^5.0.2"
|
|
1012
1028
|
}
|
|
1013
1029
|
},
|
|
1014
1030
|
"@saltcorn/types": {
|
|
1015
|
-
"version": "0.6.4-beta.
|
|
1016
|
-
"resolved": "https://registry.npmjs.org/@saltcorn/types/-/types-0.6.4-beta.
|
|
1017
|
-
"integrity": "sha512-
|
|
1031
|
+
"version": "0.6.4-beta.2",
|
|
1032
|
+
"resolved": "https://registry.npmjs.org/@saltcorn/types/-/types-0.6.4-beta.2.tgz",
|
|
1033
|
+
"integrity": "sha512-FvGUE9ieN7d8E0pIJEGzWH7O68C3SpGMKV/fsynuYGslvznqrMNqVWRTx7t2QKQEh3CnPtXs0/CTJONOo7mWbg=="
|
|
1018
1034
|
},
|
|
1019
1035
|
"@sindresorhus/is": {
|
|
1020
1036
|
"version": "0.14.0",
|
|
@@ -1394,9 +1410,9 @@
|
|
|
1394
1410
|
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
|
|
1395
1411
|
},
|
|
1396
1412
|
"aws-sdk": {
|
|
1397
|
-
"version": "2.
|
|
1398
|
-
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.
|
|
1399
|
-
"integrity": "sha512-
|
|
1413
|
+
"version": "2.1064.0",
|
|
1414
|
+
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1064.0.tgz",
|
|
1415
|
+
"integrity": "sha512-5Yips4kraereCEOWdjdjnsFHR3yYmrbxQ2+FW5WXsrZ/Xp5C6/u+XYVC3k0zeeUrbqtXaYdVbo028DSVlKg6eg==",
|
|
1400
1416
|
"requires": {
|
|
1401
1417
|
"buffer": "4.9.2",
|
|
1402
1418
|
"events": "1.1.1",
|
|
@@ -3767,6 +3783,7 @@
|
|
|
3767
3783
|
"version": "2.8.0",
|
|
3768
3784
|
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz",
|
|
3769
3785
|
"integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==",
|
|
3786
|
+
"dev": true,
|
|
3770
3787
|
"requires": {
|
|
3771
3788
|
"has": "^1.0.3"
|
|
3772
3789
|
}
|
|
@@ -5024,9 +5041,9 @@
|
|
|
5024
5041
|
}
|
|
5025
5042
|
},
|
|
5026
5043
|
"node-watch": {
|
|
5027
|
-
"version": "0.7.
|
|
5028
|
-
"resolved": "https://registry.npmjs.org/node-watch/-/node-watch-0.7.
|
|
5029
|
-
"integrity": "sha512-
|
|
5044
|
+
"version": "0.7.3",
|
|
5045
|
+
"resolved": "https://registry.npmjs.org/node-watch/-/node-watch-0.7.3.tgz",
|
|
5046
|
+
"integrity": "sha512-3l4E8uMPY1HdMMryPRUAl+oIHtXtyiTlIiESNSVSNxcPfzAFzeTbXFQkZfAwBbo0B1qMSG8nUABx+Gd+YrbKrQ=="
|
|
5030
5047
|
},
|
|
5031
5048
|
"nodemailer": {
|
|
5032
5049
|
"version": "6.7.2",
|
|
@@ -6103,13 +6120,23 @@
|
|
|
6103
6120
|
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg=="
|
|
6104
6121
|
},
|
|
6105
6122
|
"resolve": {
|
|
6106
|
-
"version": "1.
|
|
6107
|
-
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.
|
|
6108
|
-
"integrity": "sha512-
|
|
6123
|
+
"version": "1.22.0",
|
|
6124
|
+
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz",
|
|
6125
|
+
"integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==",
|
|
6109
6126
|
"requires": {
|
|
6110
|
-
"is-core-module": "^2.8.
|
|
6127
|
+
"is-core-module": "^2.8.1",
|
|
6111
6128
|
"path-parse": "^1.0.7",
|
|
6112
6129
|
"supports-preserve-symlinks-flag": "^1.0.0"
|
|
6130
|
+
},
|
|
6131
|
+
"dependencies": {
|
|
6132
|
+
"is-core-module": {
|
|
6133
|
+
"version": "2.8.1",
|
|
6134
|
+
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz",
|
|
6135
|
+
"integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==",
|
|
6136
|
+
"requires": {
|
|
6137
|
+
"has": "^1.0.3"
|
|
6138
|
+
}
|
|
6139
|
+
}
|
|
6113
6140
|
}
|
|
6114
6141
|
},
|
|
6115
6142
|
"responselike": {
|
|
@@ -6717,9 +6744,9 @@
|
|
|
6717
6744
|
"integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw=="
|
|
6718
6745
|
},
|
|
6719
6746
|
"systeminformation": {
|
|
6720
|
-
"version": "5.
|
|
6721
|
-
"resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.
|
|
6722
|
-
"integrity": "sha512
|
|
6747
|
+
"version": "5.11.0",
|
|
6748
|
+
"resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.11.0.tgz",
|
|
6749
|
+
"integrity": "sha512-mI/5nFK7NUe9Qbmy65WoB5TlCWKAhP4kG0w6uR2mZM8Mpdi8b45b3hTIK3W5+kQYZnYFWeS9/O5nn5rdcSvqfA=="
|
|
6723
6750
|
},
|
|
6724
6751
|
"tar": {
|
|
6725
6752
|
"version": "2.2.2",
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.6.4-beta.1","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":[]},"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":"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.6.4-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":[]},"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":"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.6.4-beta.
|
|
5
|
+
"version": "0.6.4-beta.2",
|
|
6
6
|
"author": "Tom Nielsen @glutamate",
|
|
7
7
|
"bin": {
|
|
8
8
|
"saltcorn": "./bin/saltcorn"
|
|
@@ -12,18 +12,19 @@
|
|
|
12
12
|
"@oclif/command": "^1.8.16",
|
|
13
13
|
"@oclif/config": "^1.18.2",
|
|
14
14
|
"@oclif/plugin-help": "^3.3.1",
|
|
15
|
-
"@saltcorn/
|
|
16
|
-
"@saltcorn/
|
|
15
|
+
"@saltcorn/admin-models": "^0.6.4-beta.2",
|
|
16
|
+
"@saltcorn/data": "^0.6.4-beta.2",
|
|
17
|
+
"@saltcorn/server": "^0.6.4-beta.2",
|
|
17
18
|
"cli-ux": "^5.6.7",
|
|
18
19
|
"contractis": "^0.1.0",
|
|
19
20
|
"dateformat": "^3.0.3",
|
|
20
21
|
"inquirer": "^7.3.3",
|
|
21
22
|
"js-yaml": "^4.1.0",
|
|
22
23
|
"node-fetch": "2.6.2",
|
|
23
|
-
"node-watch": "^0.7.
|
|
24
|
+
"node-watch": "^0.7.3",
|
|
24
25
|
"source-map-support": "^0.5.21",
|
|
25
26
|
"sudo": "^1.0.3",
|
|
26
|
-
"systeminformation": "^5.
|
|
27
|
+
"systeminformation": "^5.11.0",
|
|
27
28
|
"tcp-port-used": "^1.0.2",
|
|
28
29
|
"wrk": "^1.2.1"
|
|
29
30
|
},
|
package/src/commands/backup.js
CHANGED
|
@@ -28,20 +28,21 @@ class BackupCommand extends Command {
|
|
|
28
28
|
const { flags } = this.parse(BackupCommand);
|
|
29
29
|
|
|
30
30
|
if (flags.tenant) {
|
|
31
|
-
const { create_backup } = require("@saltcorn/
|
|
31
|
+
const { create_backup } = require("@saltcorn/admin-models/models/backup");
|
|
32
32
|
|
|
33
33
|
const db = require("@saltcorn/data/db");
|
|
34
34
|
const { loadAllPlugins } = require("@saltcorn/server/load_plugins");
|
|
35
35
|
const { init_multi_tenant } = require("@saltcorn/data/db/state");
|
|
36
|
-
|
|
36
|
+
const { getAllTenants } = require("@saltcorn/admin-models/models/tenant");
|
|
37
37
|
await loadAllPlugins();
|
|
38
|
-
await
|
|
38
|
+
const tenants = await getAllTenants();
|
|
39
|
+
await init_multi_tenant(loadAllPlugins, undefined, tenants);
|
|
39
40
|
await db.runWithTenant(flags.tenant, async () => {
|
|
40
41
|
const fnm = await create_backup(flags.output);
|
|
41
42
|
console.log(fnm);
|
|
42
43
|
});
|
|
43
44
|
} else if (flags.zip) {
|
|
44
|
-
const { create_backup } = require("@saltcorn/
|
|
45
|
+
const { create_backup } = require("@saltcorn/admin-models/models/backup");
|
|
45
46
|
const { loadAllPlugins } = require("@saltcorn/server/load_plugins");
|
|
46
47
|
await loadAllPlugins();
|
|
47
48
|
const fnm = await create_backup(flags.output);
|
|
@@ -13,7 +13,7 @@ const { Command, flags } = require("@oclif/command");
|
|
|
13
13
|
* @extends oclif.Command
|
|
14
14
|
* @category saltcorn-cli
|
|
15
15
|
*/
|
|
16
|
-
class CreateTenantCommand extends Command {
|
|
16
|
+
class CreateTenantCommand extends Command {
|
|
17
17
|
/**
|
|
18
18
|
* @returns {Promise<void>}
|
|
19
19
|
*/
|
|
@@ -26,14 +26,14 @@ class CreateTenantCommand extends Command {
|
|
|
26
26
|
this.exit(0);
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
|
-
const {
|
|
29
|
+
const { insertTenant, switchToTenant } = require("@saltcorn/admin-models/models/tenant");
|
|
30
30
|
//const url = typeof flags.url !== `undefined`? flags.url : "";
|
|
31
31
|
//const email = typeof flags.email !== `undefined`? flags.email : "";
|
|
32
32
|
//const description = flags.description !== `undefined` ? flags.description : "";
|
|
33
33
|
// TODO Do we need to set default value for base url or not? And what is correct way to get domain of base_url here?
|
|
34
34
|
// const base = await db.getgetConfig("base_url");
|
|
35
|
-
await
|
|
36
|
-
console.log()
|
|
35
|
+
await switchToTenant(await insertTenant(args.tenant, flags.email, flags.description), flags.url);
|
|
36
|
+
console.log();
|
|
37
37
|
this.exit(0);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
@@ -17,7 +17,7 @@ class DeleteTenantsCommand extends Command {
|
|
|
17
17
|
const {
|
|
18
18
|
getAllTenantRows,
|
|
19
19
|
deleteTenant,
|
|
20
|
-
} = require("@saltcorn/
|
|
20
|
+
} = require("@saltcorn/admin-models/models/tenant");
|
|
21
21
|
const db = require("@saltcorn/data/db");
|
|
22
22
|
const tenantList = await getAllTenantRows();
|
|
23
23
|
const tensExamine = tenantList.slice(
|
package/src/commands/fixtures.js
CHANGED
|
@@ -20,8 +20,10 @@ class FixturesCommand extends Command {
|
|
|
20
20
|
if (flags.tenant) {
|
|
21
21
|
const { loadAllPlugins } = require("@saltcorn/server/load_plugins");
|
|
22
22
|
const { init_multi_tenant } = require("@saltcorn/data/db/state");
|
|
23
|
+
const { getAllTenants } = require("@saltcorn/admin-models/models/tenant");
|
|
23
24
|
await loadAllPlugins();
|
|
24
|
-
await
|
|
25
|
+
const tenants = await getAllTenants();
|
|
26
|
+
await init_multi_tenant(loadAllPlugins, undefined, tenants);
|
|
25
27
|
}
|
|
26
28
|
await maybe_as_tenant(flags.tenant, async () => {
|
|
27
29
|
if (flags.reset) {
|
|
@@ -20,7 +20,7 @@ class InstallPackCommand extends Command {
|
|
|
20
20
|
const {
|
|
21
21
|
fetch_pack_by_name,
|
|
22
22
|
install_pack,
|
|
23
|
-
} = require("@saltcorn/
|
|
23
|
+
} = require("@saltcorn/admin-models/models/pack");
|
|
24
24
|
const load_plugins = require("@saltcorn/server/load_plugins");
|
|
25
25
|
|
|
26
26
|
if (!flags.name && !flags.file) {
|
|
@@ -31,8 +31,10 @@ class InstallPackCommand extends Command {
|
|
|
31
31
|
}
|
|
32
32
|
const { loadAllPlugins } = require("@saltcorn/server/load_plugins");
|
|
33
33
|
const { init_multi_tenant } = require("@saltcorn/data/db/state");
|
|
34
|
+
const { getAllTenants } = require("@saltcorn/admin-models/models/tenant");
|
|
34
35
|
await loadAllPlugins();
|
|
35
|
-
await
|
|
36
|
+
const tenants = await getAllTenants();
|
|
37
|
+
await init_multi_tenant(loadAllPlugins, undefined, tenants);
|
|
36
38
|
|
|
37
39
|
await maybe_as_tenant(flags.tenant, async () => {
|
|
38
40
|
if (flags.name) {
|
|
@@ -21,7 +21,7 @@ class InstallPluginCommand extends Command {
|
|
|
21
21
|
const {
|
|
22
22
|
fetch_pack_by_name,
|
|
23
23
|
install_pack,
|
|
24
|
-
} = require("@saltcorn/
|
|
24
|
+
} = require("@saltcorn/admin-models/models/pack");
|
|
25
25
|
const load_plugins = require("@saltcorn/server/load_plugins");
|
|
26
26
|
|
|
27
27
|
if (!flags.name && !flags.directory) {
|
|
@@ -32,8 +32,10 @@ class InstallPluginCommand extends Command {
|
|
|
32
32
|
}
|
|
33
33
|
const { loadAllPlugins } = require("@saltcorn/server/load_plugins");
|
|
34
34
|
const { init_multi_tenant } = require("@saltcorn/data/db/state");
|
|
35
|
+
const { getAllTenants } = require("@saltcorn/admin-models/models/tenant");
|
|
35
36
|
await loadAllPlugins();
|
|
36
|
-
await
|
|
37
|
+
const tenants = await getAllTenants();
|
|
38
|
+
await init_multi_tenant(loadAllPlugins, undefined, tenants);
|
|
37
39
|
|
|
38
40
|
const Plugin = require("@saltcorn/data/models/plugin");
|
|
39
41
|
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
const { Command, flags } = require("@oclif/command");
|
|
6
6
|
|
|
7
|
-
|
|
8
7
|
/**
|
|
9
8
|
* ListTenantsCommand Class
|
|
10
9
|
* @extends oclif.Command
|
|
@@ -15,19 +14,22 @@ class ListTenantsCommand extends Command {
|
|
|
15
14
|
* @returns {Promise<void>}
|
|
16
15
|
*/
|
|
17
16
|
async run() {
|
|
18
|
-
const { getAllTenants } = require("@saltcorn/
|
|
17
|
+
const { getAllTenants } = require("@saltcorn/admin-models/models/tenant");
|
|
19
18
|
const db = require("@saltcorn/data/db");
|
|
20
19
|
const tenantList = await getAllTenants();
|
|
21
|
-
console.log(
|
|
20
|
+
console.log(
|
|
21
|
+
"domain , files, users, tables, views, pages"
|
|
22
|
+
);
|
|
22
23
|
for (const domain of tenantList)
|
|
23
24
|
await db.runWithTenant(domain, async () => {
|
|
24
|
-
console.log(
|
|
25
|
+
console.log(
|
|
26
|
+
"%s, %s, %s, %s, %s, %s",
|
|
25
27
|
domain.padEnd(24),
|
|
26
|
-
(await db.count("_sc_files"
|
|
27
|
-
(await db.count("users"
|
|
28
|
+
(await db.count("_sc_files")).toString().padStart(8),
|
|
29
|
+
(await db.count("users")).toString().padStart(8),
|
|
28
30
|
(await db.count("_sc_tables")).toString().padStart(8),
|
|
29
|
-
(await db.count("_sc_views"
|
|
30
|
-
(await db.count("_sc_pages"
|
|
31
|
+
(await db.count("_sc_views")).toString().padStart(8),
|
|
32
|
+
(await db.count("_sc_pages")).toString().padStart(8)
|
|
31
33
|
);
|
|
32
34
|
});
|
|
33
35
|
this.exit(0);
|
|
@@ -43,6 +45,6 @@ ListTenantsCommand.description = `List tenants in CSV format`;
|
|
|
43
45
|
/**
|
|
44
46
|
* @type {string}
|
|
45
47
|
*/
|
|
46
|
-
ListTenantsCommand.help= "Extra help here"
|
|
48
|
+
ListTenantsCommand.help = "Extra help here";
|
|
47
49
|
|
|
48
50
|
module.exports = ListTenantsCommand;
|
package/src/commands/migrate.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
const { Command, flags } = require("@oclif/command");
|
|
6
6
|
const db = require("@saltcorn/data/db");
|
|
7
|
-
const { eachTenant } = require("@saltcorn/
|
|
7
|
+
const { eachTenant } = require("@saltcorn/admin-models/models/tenant");
|
|
8
8
|
// todo add dryrun mode
|
|
9
9
|
|
|
10
10
|
/**
|
package/src/commands/plugins.js
CHANGED
|
@@ -16,7 +16,7 @@ class PluginsCommand extends Command {
|
|
|
16
16
|
async run() {
|
|
17
17
|
const db = require("@saltcorn/data/db");
|
|
18
18
|
const { requirePlugin } = require("@saltcorn/server/load_plugins");
|
|
19
|
-
const { getAllTenants } = require("@saltcorn/
|
|
19
|
+
const { getAllTenants } = require("@saltcorn/admin-models/models/tenant");
|
|
20
20
|
const Plugin = require("@saltcorn/data/models/plugin");
|
|
21
21
|
var plugins = [];
|
|
22
22
|
const { flags } = this.parse(PluginsCommand);
|
package/src/commands/release.js
CHANGED
|
@@ -28,6 +28,10 @@ class ReleaseCommand extends Command {
|
|
|
28
28
|
"@saltcorn/types": { dir: "saltcorn-types", publish: true },
|
|
29
29
|
"@saltcorn/builder": { dir: "saltcorn-builder", publish: true },
|
|
30
30
|
"@saltcorn/data": { dir: "saltcorn-data", publish: true },
|
|
31
|
+
"@saltcorn/admin-models": {
|
|
32
|
+
dir: "saltcorn-admin-models",
|
|
33
|
+
publish: true,
|
|
34
|
+
},
|
|
31
35
|
"@saltcorn/random-tests": { dir: "saltcorn-random-tests" },
|
|
32
36
|
"@saltcorn/server": { dir: "server", publish: true },
|
|
33
37
|
"@saltcorn/base-plugin": { dir: "saltcorn-base-plugin", publish: true },
|
|
@@ -64,7 +68,7 @@ class ReleaseCommand extends Command {
|
|
|
64
68
|
});
|
|
65
69
|
};
|
|
66
70
|
const publish = (dir) =>
|
|
67
|
-
spawnSync("npm", ["publish"], {
|
|
71
|
+
spawnSync("npm", ["publish", "--access=public"], {
|
|
68
72
|
stdio: "inherit",
|
|
69
73
|
cwd: `packages/${dir}/`,
|
|
70
74
|
});
|
package/src/commands/restore.js
CHANGED
|
@@ -14,8 +14,8 @@ const { maybe_as_tenant } = require("../common");
|
|
|
14
14
|
*/
|
|
15
15
|
class RestoreCommand extends Command {
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
* @param {string} fnm
|
|
17
|
+
*
|
|
18
|
+
* @param {string} fnm
|
|
19
19
|
* @returns {Promise<void>}
|
|
20
20
|
*/
|
|
21
21
|
async pg_restore(fnm) {
|
|
@@ -35,13 +35,13 @@ class RestoreCommand extends Command {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
39
|
-
* @param {string} fnm
|
|
40
|
-
* @param {object} tenant
|
|
38
|
+
*
|
|
39
|
+
* @param {string} fnm
|
|
40
|
+
* @param {object} tenant
|
|
41
41
|
* @returns {Promise<void>}
|
|
42
42
|
*/
|
|
43
43
|
async zip_restore(fnm, tenant) {
|
|
44
|
-
const { restore } = require("@saltcorn/
|
|
44
|
+
const { restore } = require("@saltcorn/admin-models/models/backup");
|
|
45
45
|
const User = require("@saltcorn/data/models/user");
|
|
46
46
|
const load_plugins = require("@saltcorn/server/load_plugins");
|
|
47
47
|
await maybe_as_tenant(tenant, async () => {
|
|
@@ -15,7 +15,7 @@ class RmTenantCommand extends Command {
|
|
|
15
15
|
*/
|
|
16
16
|
async run() {
|
|
17
17
|
const { args } = this.parse(RmTenantCommand);
|
|
18
|
-
const { deleteTenant } = require("@saltcorn/
|
|
18
|
+
const { deleteTenant } = require("@saltcorn/admin-models/models/tenant");
|
|
19
19
|
await deleteTenant(args.tenant);
|
|
20
20
|
this.exit(0);
|
|
21
21
|
}
|
|
@@ -15,21 +15,20 @@ class SetupBenchmarkCommand extends Command {
|
|
|
15
15
|
* @returns {Promise<void>}
|
|
16
16
|
*/
|
|
17
17
|
async install_forum_pack() {
|
|
18
|
-
const {
|
|
19
|
-
fetch_pack_by_name,
|
|
20
|
-
install_pack,
|
|
21
|
-
} = require("@saltcorn/data/models/pack");
|
|
18
|
+
const { fetch_pack_by_name, install_pack } = require("@saltcorn/data/pack");
|
|
22
19
|
const load_plugins = require("@saltcorn/server/load_plugins");
|
|
23
20
|
const { loadAllPlugins } = require("@saltcorn/server/load_plugins");
|
|
24
21
|
const { init_multi_tenant } = require("@saltcorn/data/db/state");
|
|
22
|
+
const { getAllTenants } = require("@saltcorn/admin-models/models/tenant");
|
|
25
23
|
await loadAllPlugins();
|
|
26
|
-
await
|
|
24
|
+
const tenants = await getAllTenants();
|
|
25
|
+
await init_multi_tenant(loadAllPlugins, undefined, tenants);
|
|
27
26
|
const pack = await fetch_pack_by_name("Forum");
|
|
28
27
|
await install_pack(pack.pack, flags.name, (p) =>
|
|
29
28
|
load_plugins.loadAndSaveNewPlugin(p)
|
|
30
29
|
);
|
|
31
30
|
}
|
|
32
|
-
|
|
31
|
+
|
|
33
32
|
/**
|
|
34
33
|
* @returns {Promise<void>}
|
|
35
34
|
*/
|
|
@@ -68,12 +67,11 @@ class SetupBenchmarkCommand extends Command {
|
|
|
68
67
|
thread: thread_id,
|
|
69
68
|
});
|
|
70
69
|
// install page
|
|
71
|
-
const { install_pack } = require("@saltcorn/
|
|
70
|
+
const { install_pack } = require("@saltcorn/admin-models/models/pack");
|
|
72
71
|
await install_pack(simple_page_pack, flags.name, () => {});
|
|
73
72
|
// install file
|
|
74
73
|
const { rick_file } = require("@saltcorn/data/tests/mocks");
|
|
75
74
|
await rick_file();
|
|
76
|
-
|
|
77
75
|
});
|
|
78
76
|
}
|
|
79
77
|
}
|
|
@@ -8,7 +8,7 @@ const { Command, flags } = require("@oclif/command");
|
|
|
8
8
|
* TransformFieldCommand Class
|
|
9
9
|
* @extends oclif.Command
|
|
10
10
|
* @category saltcorn-cli
|
|
11
|
-
*/
|
|
11
|
+
*/
|
|
12
12
|
class TransformFieldCommand extends Command {
|
|
13
13
|
/**
|
|
14
14
|
* @returns {Promise<void>}
|
|
@@ -18,14 +18,17 @@ class TransformFieldCommand extends Command {
|
|
|
18
18
|
const Table = require("@saltcorn/data/models/table");
|
|
19
19
|
const { loadAllPlugins } = require("@saltcorn/server/load_plugins");
|
|
20
20
|
const { getState, init_multi_tenant } = require("@saltcorn/data/db/state");
|
|
21
|
+
const { getAllTenants } = require("@saltcorn/admin-models/models/tenant");
|
|
21
22
|
|
|
22
23
|
const {
|
|
23
24
|
get_async_expression_function,
|
|
24
25
|
} = require("@saltcorn/data/models/expression");
|
|
25
26
|
const { args } = this.parse(TransformFieldCommand);
|
|
26
27
|
await loadAllPlugins();
|
|
27
|
-
if (args.tenant && db.is_it_multi_tenant())
|
|
28
|
-
await
|
|
28
|
+
if (args.tenant && db.is_it_multi_tenant()) {
|
|
29
|
+
const tenants = await getAllTenants();
|
|
30
|
+
await init_multi_tenant(loadAllPlugins, undefined, tenants);
|
|
31
|
+
}
|
|
29
32
|
const tenant = args.tenant || db.connectObj.default_schema;
|
|
30
33
|
await db.runWithTenant(tenant, async () => {
|
|
31
34
|
const table = await Table.findOne({ name: args.table });
|