lucid-package 0.0.77 → 0.0.79

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucid-package",
3
- "version": "0.0.77",
3
+ "version": "0.0.79",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -115,6 +115,7 @@ async function debugEditorExtension(extensionNames, quiet = false, pickAnyPort =
115
115
  'Label': setting.label,
116
116
  'Description': setting.description,
117
117
  'DataType': setting.type,
118
+ 'DefaultValue': setting.default,
118
119
  };
119
120
  })));
120
121
  });
@@ -1,3 +1,4 @@
1
+ import { JsonSerializable } from 'lucid-extension-sdk';
1
2
  import { SupportedProduct } from './supportedproduct';
2
3
  export declare enum SettingType {
3
4
  STRING = "string"
@@ -22,6 +23,7 @@ export type PackageManifest = {
22
23
  'name': string;
23
24
  'title': string;
24
25
  'tokenUrl': string;
26
+ 'refreshTokenUrl'?: string;
25
27
  'authorizationUrl': string;
26
28
  'scopes': string[];
27
29
  'domainWhitelist': string[];
@@ -44,6 +46,7 @@ export type PackageManifest = {
44
46
  'label': string;
45
47
  'description': string;
46
48
  'type': SettingType;
49
+ 'default'?: JsonSerializable;
47
50
  }[];
48
51
  'public'?: Record<string, string>;
49
52
  };
@@ -40,6 +40,16 @@ function validateManifestOrThrow(manifest) {
40
40
  if (!(0, lucid_extension_sdk_1.enumValidator)(SettingType)(setting['type'])) {
41
41
  throw new Error('manifest.json: setting "type" must be "string"');
42
42
  }
43
+ if ((0, lucid_extension_sdk_1.isDef)(setting['default'])) {
44
+ if (setting['type'] === SettingType.STRING) {
45
+ if (!(0, lucid_extension_sdk_1.isString)(setting['default'])) {
46
+ throw new Error('manifest.json: setting "default" must be of the type specified for the setting');
47
+ }
48
+ }
49
+ else {
50
+ throw new Error('manifest.json: unsupported setting type');
51
+ }
52
+ }
43
53
  }
44
54
  }
45
55
  if (manifest['extensions']) {
@@ -124,6 +134,9 @@ function validateManifestOrThrow(manifest) {
124
134
  if (!(0, lucid_extension_sdk_1.isString)(provider['tokenUrl'])) {
125
135
  throw new Error('manifest.json: OAuth provider "tokenUrl" must be a string');
126
136
  }
137
+ if (provider['refreshTokenUrl'] && !(0, lucid_extension_sdk_1.isString)(provider['refreshTokenUrl'])) {
138
+ throw new Error('manifest.json: OAuth provider "refreshTokenUrl" must be a string');
139
+ }
127
140
  if (!(0, lucid_extension_sdk_1.isTypedArray)(lucid_extension_sdk_1.isString)(provider['scopes'])) {
128
141
  throw new Error('manifest.json: OAuth provider "scopes" must be a string array');
129
142
  }