@trayio/tray-schema 4.33.0 → 4.34.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/dist/schema/TJSTraySchemaGenerator.d.ts.map +1 -1
- package/dist/schema/TJSTraySchemaGenerator.js +6 -1
- package/dist/schema/TJSTraySchemaGenerator.unit.test.js +5 -1
- package/dist/schema/dropdown.test.data.d.ts +4 -0
- package/dist/schema/dropdown.test.data.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TJSTraySchemaGenerator.d.ts","sourceRoot":"","sources":["../../src/schema/TJSTraySchemaGenerator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAQ,MAAM,cAAc,CAAC;AAE5C,OAAO,EACN,aAAa,EAEb,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,qBAAa,sBAAuB,YAAW,mBAAmB;IACjE,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,EAAE,aAAa,CAAC;IA2C1E,sBAAsB,CAAC,MAAM,EAAE,aAAa,GAAG,aAAa;
|
|
1
|
+
{"version":3,"file":"TJSTraySchemaGenerator.d.ts","sourceRoot":"","sources":["../../src/schema/TJSTraySchemaGenerator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAQ,MAAM,cAAc,CAAC;AAE5C,OAAO,EACN,aAAa,EAEb,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,qBAAa,sBAAuB,YAAW,mBAAmB;IACjE,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,EAAE,aAAa,CAAC;IA2C1E,sBAAsB,CAAC,MAAM,EAAE,aAAa,GAAG,aAAa;CAqM5D"}
|
|
@@ -85,7 +85,12 @@ class TJSTraySchemaGenerator {
|
|
|
85
85
|
let extras = {};
|
|
86
86
|
if (object.oneOf) {
|
|
87
87
|
object.oneOf.forEach((item) => {
|
|
88
|
-
|
|
88
|
+
if (Array.isArray(item.type)) {
|
|
89
|
+
unionTypes.push(...item.type);
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
unionTypes.push(item.type);
|
|
93
|
+
}
|
|
89
94
|
if (item.type === 'object') {
|
|
90
95
|
extras = {
|
|
91
96
|
...extras,
|
|
@@ -464,9 +464,13 @@ describe('TJSTraySchemaGenerator', () => {
|
|
|
464
464
|
type: ['array', 'string'],
|
|
465
465
|
items: { type: 'number' },
|
|
466
466
|
},
|
|
467
|
+
users: {
|
|
468
|
+
additionalProperties: true,
|
|
469
|
+
type: ['object', 'null', 'string', 'number', 'boolean'],
|
|
470
|
+
},
|
|
467
471
|
},
|
|
468
472
|
advanced: [],
|
|
469
|
-
required: ['emails', 'projects', 'workspaces'],
|
|
473
|
+
required: ['emails', 'projects', 'users', 'workspaces'],
|
|
470
474
|
additionalProperties: false,
|
|
471
475
|
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
472
476
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown.test.data.d.ts","sourceRoot":"","sources":["../../src/schema/dropdown.test.data.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK,GAAG;IACnB;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IAExB;;OAEG;IACH,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE9B;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"dropdown.test.data.d.ts","sourceRoot":"","sources":["../../src/schema/dropdown.test.data.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK,GAAG;IACnB;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IAExB;;OAEG;IACH,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE9B;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE5B;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,MAAM,CAAC;CACjD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trayio/tray-schema",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.34.0",
|
|
4
4
|
"description": "Schema for Tray connectors and authentications",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./*": "./dist/*.js"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@trayio/commons": "4.
|
|
14
|
+
"@trayio/commons": "4.34.0",
|
|
15
15
|
"@types/node": "18.11.9",
|
|
16
16
|
"lodash": "4.17.21",
|
|
17
17
|
"typescript-json-schema": "0.62.0"
|