@extrahorizon/exh-cli 1.13.6-dev-218-55112c3 → 1.13.6-dev-220-523f2dc

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/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  ### v1.13.6
4
4
  * Improved the reporting of errors from the API, including additional information when available
5
+ * Improved the reporting of using unknown or incomplete commands, including usage information
6
+ * Fixed some inconsistencies in the data schema validation, now better aligned with the backend
5
7
  * Fixed a bug in `exh data schemas sync` where permission mode arrays were not being correctly compared
6
8
  * Updated the ExH SDK to `8.13.0` to fix a security warning from `form-data` (vulnerable code was not in use)
7
9
 
@@ -4,7 +4,10 @@ exports.handler = exports.builder = exports.desc = exports.command = void 0;
4
4
  const util_1 = require("../../helpers/util");
5
5
  exports.command = 'schemas <command>';
6
6
  exports.desc = 'Manage data schemas';
7
- const builder = (yargs) => (0, util_1.epilogue)(yargs).commandDir('schemas');
7
+ const builder = (yargs) => (0, util_1.epilogue)(yargs)
8
+ .commandDir('schemas')
9
+ .strict()
10
+ .demandCommand(1);
8
11
  exports.builder = builder;
9
12
  const handler = () => { };
10
13
  exports.handler = handler;
@@ -4,7 +4,10 @@ exports.handler = exports.builder = exports.desc = exports.command = void 0;
4
4
  const util_1 = require("../helpers/util");
5
5
  exports.command = 'data <command>';
6
6
  exports.desc = 'Manage data';
7
- const builder = (yargs) => (0, util_1.epilogue)(yargs).commandDir('data');
7
+ const builder = (yargs) => (0, util_1.epilogue)(yargs)
8
+ .commandDir('data')
9
+ .strict()
10
+ .demandCommand(1);
8
11
  exports.builder = builder;
9
12
  const handler = () => { };
10
13
  exports.handler = handler;
@@ -4,7 +4,10 @@ exports.handler = exports.builder = exports.desc = exports.command = void 0;
4
4
  const util_1 = require("../helpers/util");
5
5
  exports.command = 'dispatchers <command>';
6
6
  exports.desc = 'Manage Dispatchers within Extra Horizon';
7
- const builder = (yargs) => (0, util_1.epilogue)(yargs).commandDir('dispatchers');
7
+ const builder = (yargs) => (0, util_1.epilogue)(yargs)
8
+ .commandDir('dispatchers')
9
+ .strict()
10
+ .demandCommand(1);
8
11
  exports.builder = builder;
9
12
  const handler = () => { };
10
13
  exports.handler = handler;
@@ -4,7 +4,10 @@ exports.handler = exports.builder = exports.desc = exports.command = void 0;
4
4
  const util_1 = require("../helpers/util");
5
5
  exports.command = 'localizations <command>';
6
6
  exports.desc = 'Manage localizations';
7
- const builder = (yargs) => (0, util_1.epilogue)(yargs).commandDir('localizations');
7
+ const builder = (yargs) => (0, util_1.epilogue)(yargs)
8
+ .commandDir('localizations')
9
+ .strict()
10
+ .demandCommand(1);
8
11
  exports.builder = builder;
9
12
  const handler = () => { };
10
13
  exports.handler = handler;
@@ -4,7 +4,10 @@ exports.handler = exports.builder = exports.desc = exports.command = void 0;
4
4
  const util_1 = require("../helpers/util");
5
5
  exports.command = 'settings <command>';
6
6
  exports.desc = 'Manage Service Settings within Extra Horizon';
7
- const builder = (yargs) => (0, util_1.epilogue)(yargs).commandDir('settings');
7
+ const builder = (yargs) => (0, util_1.epilogue)(yargs)
8
+ .commandDir('settings')
9
+ .strict()
10
+ .demandCommand(1);
8
11
  exports.builder = builder;
9
12
  const handler = () => { };
10
13
  exports.handler = handler;
@@ -4,7 +4,10 @@ exports.handler = exports.builder = exports.desc = exports.command = void 0;
4
4
  const util_1 = require("../helpers/util");
5
5
  exports.command = 'tasks <command>';
6
6
  exports.desc = 'Manage tasks';
7
- const builder = (yargs) => (0, util_1.epilogue)(yargs).commandDir('tasks');
7
+ const builder = (yargs) => (0, util_1.epilogue)(yargs)
8
+ .commandDir('tasks')
9
+ .strict()
10
+ .demandCommand(1);
8
11
  exports.builder = builder;
9
12
  const handler = () => { };
10
13
  exports.handler = handler;
@@ -4,7 +4,10 @@ exports.handler = exports.builder = exports.desc = exports.command = void 0;
4
4
  const util_1 = require("../helpers/util");
5
5
  exports.command = 'templates <command>';
6
6
  exports.desc = 'Manage templates';
7
- const builder = (yargs) => (0, util_1.epilogue)(yargs).commandDir('templates');
7
+ const builder = (yargs) => (0, util_1.epilogue)(yargs)
8
+ .commandDir('templates')
9
+ .strict()
10
+ .demandCommand(1);
8
11
  exports.builder = builder;
9
12
  const handler = () => { };
10
13
  exports.handler = handler;
@@ -3,8 +3,16 @@
3
3
  "type": "object",
4
4
  "properties": {
5
5
  "$schema": { "type": "string" },
6
- "name": { "type": "string" },
7
- "description": { "type": "string" },
6
+ "name": {
7
+ "type": "string",
8
+ "minLength": 3,
9
+ "maxLength": 50
10
+ },
11
+ "description": {
12
+ "type": "string",
13
+ "minLength": 3,
14
+ "maxLength": 100
15
+ },
8
16
  "createMode": {
9
17
  "oneOf": [
10
18
  {
@@ -88,8 +96,14 @@
88
96
  "linkedUsersPatientEnlistments"
89
97
  ]
90
98
  },
91
- "defaultLimit": { "type": "integer" },
92
- "maximumLimit": { "type": "integer" },
99
+ "defaultLimit": {
100
+ "type": "integer",
101
+ "minimum": 1
102
+ },
103
+ "maximumLimit": {
104
+ "type": "integer",
105
+ "minimum": 1
106
+ },
93
107
  "statuses": {
94
108
  "type": "object",
95
109
  "patternProperties": {
@@ -172,7 +186,8 @@
172
186
  "const": "manual"
173
187
  },
174
188
  "name": {
175
- "type": "string"
189
+ "type": "string",
190
+ "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,49}$"
176
191
  },
177
192
  "description": {
178
193
  "type": "string"
@@ -233,7 +248,10 @@
233
248
  "type": "object",
234
249
  "properties": {
235
250
  "type": { "const": "automatic" },
236
- "name": { "type": "string" },
251
+ "name": {
252
+ "type": "string",
253
+ "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,49}$"
254
+ },
237
255
  "description": { "type": "string" },
238
256
  "fromStatuses": {
239
257
  "type": "array",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@extrahorizon/exh-cli",
3
- "version": "1.13.6-dev-218-55112c3",
3
+ "version": "1.13.6-dev-220-523f2dc",
4
4
  "main": "build/index.js",
5
5
  "exports": "./build/index.js",
6
6
  "license": "MIT",