@movable/rollup-plugin-package-manifest-validator 3.17.0 → 3.18.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/schemas/enums.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.studioIcons = exports.propertyTypes = exports.fieldTypes = exports.contextOptionTypes = void 0;
|
|
6
|
+
exports.studioIcons = exports.propertyTypes = exports.packageTypes = exports.fieldTypes = exports.contextOptionTypes = void 0;
|
|
7
7
|
const contextOptionTypes = ['select', 'text', 'hidden', 'time', 'datetime'];
|
|
8
8
|
exports.contextOptionTypes = contextOptionTypes;
|
|
9
9
|
const propertyTypes = ['text', 'image', 'link', 'api', 'boolean'];
|
|
@@ -11,4 +11,6 @@ exports.propertyTypes = propertyTypes;
|
|
|
11
11
|
const fieldTypes = ['asset', 'checkbox', 'color', 'data-source', 'data-source-package', 'date', 'datetime', 'dynamic-text', 'font', 'image', 'map', 'number', 'oauth2', 'oAuthAccount', 'radio', 'select', 'text', 'token', 'upload', 'url'];
|
|
12
12
|
exports.fieldTypes = fieldTypes;
|
|
13
13
|
const studioIcons = ['align-bottom', 'align-center', 'align-left', 'align-middle', 'align-right', 'align-top', 'arrange-center', 'arrange-left', 'arrange-right', 'arrows-select', 'avatar', 'bar-chart', 'barcode', 'calendar', 'cart', 'chatter', 'clock', 'code', 'condensed-view', 'copy', 'countdown-timer', 'countdown', 'crop', 'cursor-grab', 'cursor-move', 'cursor', 'distribute-horizontal', 'distribute-vertical', 'dropdown-arrow', 'duplicate', 'expanded-view', 'external-link', 'globe', 'grab', 'image-layer', 'image', 'images', 'instagram', 'local-time', 'locked', 'map-helper', 'maps', 'media-library', 'minus', 'move', 'olapic', 'param', 'personal', 'picture', 'pie-chart', 'pin', 'pinterest', 'plus', 'polling', 'proximity-pin', 'QR', 'qr-code', 'redo', 'rotate', 'rss', 'settings', 'shape', 'sharing', 'square', 'text-center', 'text-justify', 'text-layer', 'text-left', 'text-right', 'text-tool', 'text-vector', 'text', 'tools', 'trash', 'twitter-favorite', 'twitter-retweet', 'twitter-username', 'twitter', 'undo', 'unlocked', 'vector-square', 'vector-tool', 'video', 'weather-average', 'weather-city', 'weather-day', 'weather-description', 'weather-high-temp', 'weather-icon', 'weather', 'workspace-barcode', 'workspace-favorites', 'workspace-instagram', 'workspace-olapic', 'workspace-picture', 'workspace-pinterest', 'workspace-qr-code', 'workspace-retweets', 'workspace-weather'];
|
|
14
|
-
exports.studioIcons = studioIcons;
|
|
14
|
+
exports.studioIcons = studioIcons;
|
|
15
|
+
const packageTypes = ['developer-package', 'csv-data-source', 'web-data-source', 'api-data-source', 'data-flow'];
|
|
16
|
+
exports.packageTypes = packageTypes;
|
|
@@ -72,6 +72,64 @@ const fieldSchema = {
|
|
|
72
72
|
},
|
|
73
73
|
validations: {
|
|
74
74
|
type: 'object'
|
|
75
|
+
},
|
|
76
|
+
data: {
|
|
77
|
+
type: 'object',
|
|
78
|
+
properties: {
|
|
79
|
+
outputs: {
|
|
80
|
+
type: 'array',
|
|
81
|
+
items: {
|
|
82
|
+
type: 'object',
|
|
83
|
+
properties: {
|
|
84
|
+
standard_label: {
|
|
85
|
+
type: 'string'
|
|
86
|
+
},
|
|
87
|
+
required: {
|
|
88
|
+
type: 'boolean'
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
required: ['standard_label'],
|
|
92
|
+
additionalProperties: false
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
inputs: {
|
|
96
|
+
type: 'array',
|
|
97
|
+
items: {
|
|
98
|
+
type: 'object',
|
|
99
|
+
properties: {
|
|
100
|
+
standard_label: {
|
|
101
|
+
type: 'string'
|
|
102
|
+
},
|
|
103
|
+
required: {
|
|
104
|
+
type: 'boolean'
|
|
105
|
+
},
|
|
106
|
+
value: {
|
|
107
|
+
type: 'object',
|
|
108
|
+
properties: {
|
|
109
|
+
propertyGroupKey: {
|
|
110
|
+
type: 'string'
|
|
111
|
+
},
|
|
112
|
+
propertyPath: {
|
|
113
|
+
type: 'string'
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
required: ['propertyGroupKey', 'propertyPath'],
|
|
117
|
+
additionalProperties: false
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
required: ['standard_label'],
|
|
121
|
+
additionalProperties: false
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
allowed_package_types: {
|
|
125
|
+
type: 'array',
|
|
126
|
+
items: {
|
|
127
|
+
type: 'string',
|
|
128
|
+
enum: _enums.packageTypes
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
additionalProperties: false
|
|
75
133
|
}
|
|
76
134
|
},
|
|
77
135
|
required: ['name', 'label', 'type'],
|
|
@@ -131,6 +189,19 @@ const fieldSchema = {
|
|
|
131
189
|
required: ['options']
|
|
132
190
|
}
|
|
133
191
|
}
|
|
192
|
+
}, {
|
|
193
|
+
if: {
|
|
194
|
+
properties: {
|
|
195
|
+
type: {
|
|
196
|
+
const: 'data-source-package'
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
else: {
|
|
201
|
+
not: {
|
|
202
|
+
required: ['data']
|
|
203
|
+
}
|
|
204
|
+
}
|
|
134
205
|
}]
|
|
135
206
|
};
|
|
136
207
|
const dynamicPropertySchema = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@movable/rollup-plugin-package-manifest-validator",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.18.0",
|
|
4
4
|
"description": "Validates package-manifest.yml",
|
|
5
5
|
"main": "dist",
|
|
6
6
|
"keywords": [],
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"volta": {
|
|
39
39
|
"extends": "../../package.json"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "20ad68811c39d5fff6d5c04db2fc4108424dc4a9"
|
|
42
42
|
}
|
package/src/schemas/enums.js
CHANGED
|
@@ -127,4 +127,12 @@ const studioIcons = [
|
|
|
127
127
|
'workspace-weather'
|
|
128
128
|
];
|
|
129
129
|
|
|
130
|
-
|
|
130
|
+
const packageTypes = [
|
|
131
|
+
'developer-package',
|
|
132
|
+
'csv-data-source',
|
|
133
|
+
'web-data-source',
|
|
134
|
+
'api-data-source',
|
|
135
|
+
'data-flow'
|
|
136
|
+
];
|
|
137
|
+
|
|
138
|
+
export { studioIcons, fieldTypes, propertyTypes, contextOptionTypes, packageTypes };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { studioIcons, fieldTypes, propertyTypes, contextOptionTypes } from './enums';
|
|
1
|
+
import { studioIcons, fieldTypes, propertyTypes, contextOptionTypes, packageTypes } from './enums';
|
|
2
2
|
|
|
3
3
|
const strNumBool = ['string', 'number', 'boolean'];
|
|
4
4
|
|
|
@@ -30,7 +30,53 @@ const fieldSchema = {
|
|
|
30
30
|
type: { type: 'string', enum: fieldTypes },
|
|
31
31
|
value: { type: strNumBool },
|
|
32
32
|
heading: { type: 'string' },
|
|
33
|
-
validations: { type: 'object' }
|
|
33
|
+
validations: { type: 'object' },
|
|
34
|
+
data: {
|
|
35
|
+
type: 'object',
|
|
36
|
+
properties: {
|
|
37
|
+
outputs: {
|
|
38
|
+
type: 'array',
|
|
39
|
+
items: {
|
|
40
|
+
type: 'object',
|
|
41
|
+
properties: {
|
|
42
|
+
standard_label: { type: 'string' },
|
|
43
|
+
required: { type: 'boolean' }
|
|
44
|
+
},
|
|
45
|
+
required: ['standard_label'],
|
|
46
|
+
additionalProperties: false
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
inputs: {
|
|
50
|
+
type: 'array',
|
|
51
|
+
items: {
|
|
52
|
+
type: 'object',
|
|
53
|
+
properties: {
|
|
54
|
+
standard_label: { type: 'string' },
|
|
55
|
+
required: { type: 'boolean' },
|
|
56
|
+
value: {
|
|
57
|
+
type: 'object',
|
|
58
|
+
properties: {
|
|
59
|
+
propertyGroupKey: { type: 'string' },
|
|
60
|
+
propertyPath: { type: 'string' }
|
|
61
|
+
},
|
|
62
|
+
required: ['propertyGroupKey', 'propertyPath'],
|
|
63
|
+
additionalProperties: false
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
required: ['standard_label'],
|
|
67
|
+
additionalProperties: false
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
allowed_package_types: {
|
|
71
|
+
type: 'array',
|
|
72
|
+
items: {
|
|
73
|
+
type: 'string',
|
|
74
|
+
enum: packageTypes
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
additionalProperties: false
|
|
79
|
+
}
|
|
34
80
|
},
|
|
35
81
|
required: ['name', 'label', 'type'],
|
|
36
82
|
additionalProperties: false,
|
|
@@ -69,6 +115,14 @@ const fieldSchema = {
|
|
|
69
115
|
else: {
|
|
70
116
|
not: { required: ['options'] }
|
|
71
117
|
}
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
if: {
|
|
121
|
+
properties: { type: { const: 'data-source-package' } }
|
|
122
|
+
},
|
|
123
|
+
else: {
|
|
124
|
+
not: { required: ['data'] }
|
|
125
|
+
}
|
|
72
126
|
}
|
|
73
127
|
]
|
|
74
128
|
};
|