lucid-package 0.0.46 → 0.0.48
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/package.json +1 -1
- package/src/packagemanifest.js +9 -1
package/package.json
CHANGED
package/src/packagemanifest.js
CHANGED
|
@@ -23,7 +23,7 @@ function validateManifestOrThrow(manifest) {
|
|
|
23
23
|
}
|
|
24
24
|
function validateUniqueNames(kindOfThings, things) {
|
|
25
25
|
if (new Set(things.map((one) => one['name'])).size !== things.length) {
|
|
26
|
-
throw new Error(kindOfThings + ' must have unique
|
|
26
|
+
throw new Error(kindOfThings + ' must have unique names');
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
if (manifest['settings']) {
|
|
@@ -138,6 +138,11 @@ function validateManifestOrThrow(manifest) {
|
|
|
138
138
|
provider['clientAuthentication'] !== 'clientParameters') {
|
|
139
139
|
throw new Error('manifest.json: OAuth provider "clientAuthentication" must be "basic" or "clientParameters"');
|
|
140
140
|
}
|
|
141
|
+
if (provider['faviconUrl']) {
|
|
142
|
+
if (!(0, lucid_extension_sdk_1.isString)(provider['faviconUrl'])) {
|
|
143
|
+
throw new Error('manifest.json: faviconUrl must be a string');
|
|
144
|
+
}
|
|
145
|
+
}
|
|
141
146
|
}
|
|
142
147
|
}
|
|
143
148
|
if (manifest['mergeProviders']) {
|
|
@@ -160,6 +165,9 @@ function validateManifestOrThrow(manifest) {
|
|
|
160
165
|
}
|
|
161
166
|
}
|
|
162
167
|
}
|
|
168
|
+
if ((0, lucid_extension_sdk_1.isTypedArray)(lucid_extension_sdk_1.isObject)(manifest['mergeProviders']) && (0, lucid_extension_sdk_1.isTypedArray)(lucid_extension_sdk_1.isObject)(manifest['oauthProviders'])) {
|
|
169
|
+
validateUniqueNames('mergeProviders & oauthProviders', manifest['mergeProviders'].concat(manifest['oauthProviders']));
|
|
170
|
+
}
|
|
163
171
|
if (manifest['dataConnectors']) {
|
|
164
172
|
if (!(0, lucid_extension_sdk_1.isTypedArray)(lucid_extension_sdk_1.isObject)(manifest['dataConnectors'])) {
|
|
165
173
|
throw new Error('manifest.json: "dataConnectors" must be an array of objects');
|