@adobe/ccweb-add-on-manifest 0.1.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.
Files changed (44) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +11 -0
  3. package/dist/AddOnManifest.d.ts +86 -0
  4. package/dist/AddOnManifest.d.ts.map +1 -0
  5. package/dist/AddOnManifest.js +140 -0
  6. package/dist/AddOnManifest.js.map +1 -0
  7. package/dist/AddOnManifestTypes.d.ts +165 -0
  8. package/dist/AddOnManifestTypes.d.ts.map +1 -0
  9. package/dist/AddOnManifestTypes.js +82 -0
  10. package/dist/AddOnManifestTypes.js.map +1 -0
  11. package/dist/AddOnManifestValidator.d.ts +38 -0
  12. package/dist/AddOnManifestValidator.d.ts.map +1 -0
  13. package/dist/AddOnManifestValidator.js +190 -0
  14. package/dist/AddOnManifestValidator.js.map +1 -0
  15. package/dist/ValidationUtils.d.ts +29 -0
  16. package/dist/ValidationUtils.d.ts.map +1 -0
  17. package/dist/ValidationUtils.js +59 -0
  18. package/dist/ValidationUtils.js.map +1 -0
  19. package/dist/generated/validateManifestSchema.d.mts +19 -0
  20. package/dist/generated/validateManifestSchema.d.mts.map +1 -0
  21. package/dist/generated/validateManifestSchema.mjs +2934 -0
  22. package/dist/generated/validateManifestSchema.mjs.map +1 -0
  23. package/dist/index.d.ts +29 -0
  24. package/dist/index.d.ts.map +1 -0
  25. package/dist/index.js +29 -0
  26. package/dist/index.js.map +1 -0
  27. package/dist/manifest-field/AddOnManifestApp.d.ts +36 -0
  28. package/dist/manifest-field/AddOnManifestApp.d.ts.map +1 -0
  29. package/dist/manifest-field/AddOnManifestApp.js +43 -0
  30. package/dist/manifest-field/AddOnManifestApp.js.map +1 -0
  31. package/dist/manifest-field/AddOnManifestEntrypoint.d.ts +48 -0
  32. package/dist/manifest-field/AddOnManifestEntrypoint.d.ts.map +1 -0
  33. package/dist/manifest-field/AddOnManifestEntrypoint.js +90 -0
  34. package/dist/manifest-field/AddOnManifestEntrypoint.js.map +1 -0
  35. package/dist/manifest-field/AddOnManifestRequirement.d.ts +48 -0
  36. package/dist/manifest-field/AddOnManifestRequirement.d.ts.map +1 -0
  37. package/dist/manifest-field/AddOnManifestRequirement.js +106 -0
  38. package/dist/manifest-field/AddOnManifestRequirement.js.map +1 -0
  39. package/dist/test/utils/TestManifests.d.ts +52 -0
  40. package/dist/test/utils/TestManifests.d.ts.map +1 -0
  41. package/dist/test/utils/TestManifests.js +185 -0
  42. package/dist/test/utils/TestManifests.js.map +1 -0
  43. package/dist/tsconfig.tsbuildinfo +1 -0
  44. package/package.json +53 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ © Copyright 2023 Adobe. All rights reserved.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # @adobe/ccweb-add-on-manifest
2
+
3
+ [![Version](https://img.shields.io/npm/v/@adobe/ccweb-add-on-manifest.svg)](https://npmjs.org/package/@adobe/ccweb-add-on-manifest)
4
+ [![Downloads/week](https://img.shields.io/npm/dw/@adobe/ccweb-add-on-manifest.svg)](https://npmjs.org/package/@adobe/ccweb-add-on-manifest)
5
+ [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/license/mit)
6
+
7
+ ## Description
8
+
9
+ This package contains the models and validation rules for the `manifest.json` file in an Adobe Express add-on.
10
+
11
+ For more information about developing Adobe Express add-ons, check out the [documentation](https://developer.adobe.com/express/add-ons/).
@@ -0,0 +1,86 @@
1
+ /********************************************************************************
2
+ * MIT License
3
+
4
+ * © Copyright 2023 Adobe. All rights reserved.
5
+
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ ********************************************************************************/
24
+ import { AddOnInfo, AddOnLogAction, AddOnLogLevel, AuthorInfo, EntrypointV1, EntrypointV2, IconType, LocalisedStrings, ManifestValidationResult, RequirementsV1, RequirementsV2 } from "./AddOnManifestTypes.js";
25
+ import { AddOnManifestEntrypoint } from "./manifest-field/AddOnManifestEntrypoint.js";
26
+ import { AddOnManifestRequirement } from "./manifest-field/AddOnManifestRequirement.js";
27
+ /**
28
+ * Specifies the metadata and configuration information for Add-Ons
29
+ * More details on the schema and fields are present here:
30
+ * https://wiki.corp.adobe.com/display/WXP/Add-in+Manifest+and+Structure
31
+ */
32
+ export declare type AddOnManifestV1 = {
33
+ readonly id: string;
34
+ readonly name: string | LocalisedStrings;
35
+ readonly version: string;
36
+ readonly manifestVersion: number;
37
+ readonly requirements: RequirementsV1;
38
+ readonly icon: IconType | readonly IconType[];
39
+ readonly entryPoints: readonly EntrypointV1[];
40
+ readonly authorInfo?: AuthorInfo;
41
+ };
42
+ export declare type AddOnManifestV2 = {
43
+ readonly testId?: string;
44
+ readonly name?: string;
45
+ readonly version: string;
46
+ readonly manifestVersion: number;
47
+ readonly requirements: RequirementsV2;
48
+ readonly entryPoints: readonly EntrypointV2[];
49
+ };
50
+ export declare enum ManifestVersion {
51
+ V1 = 1,
52
+ V2 = 2
53
+ }
54
+ interface AddOnManifestTypeMap {
55
+ [ManifestVersion.V1]: AddOnManifestV1;
56
+ [ManifestVersion.V2]: AddOnManifestV2;
57
+ }
58
+ export declare type AddOnManifestType<T extends ManifestVersion> = AddOnManifestTypeMap[T];
59
+ export declare type CreateManifestResult = {
60
+ manifestValidationResult: ManifestValidationResult;
61
+ manifest?: AddOnManifest;
62
+ };
63
+ /**
64
+ * Defines the getter methods for AddOn manifest fields
65
+ */
66
+ export declare class AddOnManifest {
67
+ private _requirement;
68
+ private _entrypoints;
69
+ private readonly _manifest;
70
+ static createManifest(addOnInfo: AddOnInfo, addOnLogger?: Map<AddOnLogLevel, AddOnLogAction>): CreateManifestResult;
71
+ /**
72
+ * TODO: [WXP-1583] Updated the response type in [AddOnInfoApi.manifest] and remove the getter
73
+ */
74
+ get manifestProperties(): Record<string, unknown>;
75
+ private constructor();
76
+ get id(): Readonly<string>;
77
+ get name(): Readonly<string | LocalisedStrings | undefined>;
78
+ get version(): Readonly<string>;
79
+ get manifestVersion(): Readonly<ManifestVersion>;
80
+ get requirements(): Readonly<AddOnManifestRequirement>;
81
+ get icon(): Readonly<IconType | IconType[] | undefined>;
82
+ get entryPoints(): Readonly<AddOnManifestEntrypoint[]>;
83
+ get authorInfo(): Readonly<AuthorInfo | undefined>;
84
+ }
85
+ export {};
86
+ //# sourceMappingURL=AddOnManifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddOnManifest.d.ts","sourceRoot":"","sources":["../src/AddOnManifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;kFAsBkF;AAElF,OAAO,EACH,SAAS,EACT,cAAc,EACd,aAAa,EACb,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,gBAAgB,EAChB,wBAAwB,EACxB,cAAc,EACd,cAAc,EACjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AAExF;;;;GAIG;AAGH,oBAAY,eAAe,GAAG;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,CAAC;IACzC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,YAAY,EAAE,cAAc,CAAC;IACtC,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,QAAQ,EAAE,CAAC;IAC9C,QAAQ,CAAC,WAAW,EAAE,SAAS,YAAY,EAAE,CAAC;IAC9C,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC;CACpC,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC1B,QAAQ,C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AI,eAAe,IAAI,QAAQ,CAAC,eAAe,CAAC,CAE/C;IAED,IAAI,YAAY,IAAI,QAAQ,CAAC,wBAAwB,CAAC,CAQrD;IAED,IAAI,IAAI,IAAI,QAAQ,CAAC,QAAQ,GAAG,QAAQ,EAAE,GAAG,SAAS,CAAC,CAUtD;IAED,IAAI,WAAW,IAAI,QAAQ,CAAC,uBAAuB,EAAE,CAAC,CAOrD;IAED,IAAI,UAAU,IAAI,QAAQ,CAAC,UAAU,GAAG,SAAS,CAAC,CAUjD;CACJ"}
@@ -0,0 +1,140 @@
1
+ /********************************************************************************
2
+ * MIT License
3
+
4
+ * © Copyright 2023 Adobe. All rights reserved.
5
+
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ ********************************************************************************/
24
+ import { AddOnManifestValidator } from "./AddOnManifestValidator.js";
25
+ import { AddOnManifestEntrypoint } from "./manifest-field/AddOnManifestEntrypoint.js";
26
+ import { AddOnManifestRequirement } from "./manifest-field/AddOnManifestRequirement.js";
27
+ export var ManifestVersion;
28
+ (function (ManifestVersion) {
29
+ ManifestVersion[ManifestVersion["V1"] = 1] = "V1";
30
+ ManifestVersion[ManifestVersion["V2"] = 2] = "V2";
31
+ })(ManifestVersion || (ManifestVersion = {}));
32
+ /**
33
+ * Defines the getter methods for AddOn manifest fields
34
+ */
35
+ export class AddOnManifest {
36
+ _requirement;
37
+ _entrypoints = [];
38
+ _manifest;
39
+ static createManifest(addOnInfo, addOnLogger) {
40
+ // validate the manifest here and if rejected return
41
+ const manifestValidator = new AddOnManifestValidator(addOnLogger);
42
+ const schemaValidation = manifestValidator.validateManifestSchema(addOnInfo.manifest, addOnInfo.additionalInfo);
43
+ let manifestValidationResult = { success: true };
44
+ if (!schemaValidation.success) {
45
+ manifestValidationResult = {
46
+ success: false,
47
+ errorDetails: schemaValidation.errorDetails,
48
+ warningDetails: schemaValidation.warningDetails
49
+ };
50
+ return { manifestValidationResult };
51
+ }
52
+ return {
53
+ manifestValidationResult,
54
+ manifest: new AddOnManifest({ ...addOnInfo.manifest })
55
+ };
56
+ }
57
+ /**
58
+ * TODO: [WXP-1583] Updated the response type in [AddOnInfoApi.manifest] and remove the getter
59
+ */
60
+ get manifestProperties() {
61
+ return this._manifest;
62
+ }
63
+ constructor(manifest) {
64
+ const manifestVersion = manifest.manifestVersion;
65
+ switch (manifestVersion) {
66
+ case ManifestVersion.V1: {
67
+ this._manifest = manifest;
68
+ break;
69
+ }
70
+ default: {
71
+ this._manifest = manifest;
72
+ }
73
+ }
74
+ }
75
+ get id() {
76
+ switch (this._manifest.manifestVersion) {
77
+ case ManifestVersion.V1: {
78
+ const { id } = this._manifest;
79
+ return id;
80
+ }
81
+ default: {
82
+ return "";
83
+ }
84
+ }
85
+ }
86
+ get name() {
87
+ switch (this._manifest.manifestVersion) {
88
+ case ManifestVersion.V1: {
89
+ const { name } = this._manifest;
90
+ return name;
91
+ }
92
+ default: {
93
+ return undefined;
94
+ }
95
+ }
96
+ }
97
+ get version() {
98
+ return this._manifest.version;
99
+ }
100
+ get manifestVersion() {
101
+ return this._manifest.manifestVersion || ManifestVersion.V1;
102
+ }
103
+ get requirements() {
104
+ if (!this._requirement) {
105
+ this._requirement = new AddOnManifestRequirement(this._manifest.manifestVersion, this._manifest.requirements);
106
+ }
107
+ return this._requirement;
108
+ }
109
+ get icon() {
110
+ switch (this._manifest.manifestVersion) {
111
+ case ManifestVersion.V1: {
112
+ const { icon } = this._manifest;
113
+ return icon;
114
+ }
115
+ default: {
116
+ return undefined;
117
+ }
118
+ }
119
+ }
120
+ get entryPoints() {
121
+ if (!this._entrypoints.length) {
122
+ this._manifest.entryPoints.forEach(entrypoint => {
123
+ this._entrypoints.push(new AddOnManifestEntrypoint(this._manifest.manifestVersion, entrypoint));
124
+ });
125
+ }
126
+ return this._entrypoints;
127
+ }
128
+ get authorInfo() {
129
+ switch (this._manifest.manifestVersion) {
130
+ case ManifestVersion.V1: {
131
+ const { authorInfo } = this._manifest;
132
+ return authorInfo;
133
+ }
134
+ default: {
135
+ return undefined;
136
+ }
137
+ }
138
+ }
139
+ }
140
+ //# sourceMappingURL=AddOnManifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddOnManifest.js","sourceRoot":"","sources":["../src/AddOnManifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;kFAsBkF;AAelF,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AA6BxF,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACvB,iDAAM,CAAA;IACN,iDAAM,CAAA;AACV,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B;AAeD;;GAEG;AACH,MAAM,OAAO,aAAa;IACd,YAAY,CAAuC;IACnD,YAAY,GAA8B,E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AAI,CAAC,IAAI,uBAAuB,CAAC,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC,CAAC;YACpG,CAAC,CAAC,CAAC;SACN;QACD,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAI,UAAU;QACV,QAAQ,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE;YACpC,KAAK,eAAe,CAAC,EAAE,CAAC,CAAC;gBACrB,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,SAAkD,CAAC;gBAC/E,OAAO,UAAU,CAAC;aACrB;YACD,OAAO,CAAC,CAAC;gBACL,OAAO,SAAS,CAAC;aACpB;SACJ;IACL,CAAC;CACJ"}
@@ -0,0 +1,165 @@
1
+ /********************************************************************************
2
+ * MIT License
3
+
4
+ * © Copyright 2023 Adobe. All rights reserved.
5
+
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ ********************************************************************************/
24
+ /**
25
+ * More details on the schema here and the fiels are present here:
26
+ * https://wiki.corp.adobe.com/display/WXP/Add-in+Manifest+and+Structure
27
+ */
28
+ export declare type RequirementsV1 = {
29
+ readonly apps: string[];
30
+ readonly experimentalApis?: boolean;
31
+ };
32
+ export declare type App = {
33
+ readonly name: string;
34
+ readonly apiVersion: number;
35
+ readonly supportedDeviceClass?: string[];
36
+ };
37
+ export declare type RequirementsV2 = {
38
+ readonly apps: readonly App[];
39
+ readonly experimentalApis?: boolean;
40
+ readonly supportsTouch?: boolean;
41
+ readonly renditionPreview?: boolean;
42
+ readonly privilegedApis?: boolean;
43
+ readonly _blessedPartnerAccess?: string;
44
+ };
45
+ export declare type IconType = {
46
+ /** * icon width */
47
+ readonly width?: number;
48
+ /** * icon height */
49
+ readonly height?: number;
50
+ /** * icon file href */
51
+ readonly href: string;
52
+ /** * icon theme ex. ["all","light"] */
53
+ readonly theme?: readonly string[];
54
+ };
55
+ export declare type Size = {
56
+ readonly width: number;
57
+ readonly height: number;
58
+ };
59
+ export declare type Resizing = {
60
+ readonly prefersConstrainedResize: boolean;
61
+ readonly maxHeight?: number;
62
+ readonly maxWidth?: number;
63
+ readonly minHeight?: number;
64
+ readonly minWidth?: number;
65
+ };
66
+ export declare type LocalisedStrings = {
67
+ readonly default: string;
68
+ readonly [k: string]: string;
69
+ };
70
+ export declare type Position = {
71
+ readonly x: number;
72
+ readonly y: number;
73
+ };
74
+ export declare type Permissions = {
75
+ readonly sandbox?: string[];
76
+ readonly oauth?: string[];
77
+ readonly camera?: string;
78
+ readonly microphone?: string;
79
+ readonly analytics?: boolean;
80
+ readonly clipboard?: string[];
81
+ };
82
+ export declare type EntrypointV1 = {
83
+ readonly type: string;
84
+ readonly id: string;
85
+ readonly label: string | LocalisedStrings;
86
+ readonly permissions?: Permissions;
87
+ readonly defaultSize?: Size;
88
+ readonly main: string;
89
+ };
90
+ export declare type EntrypointV2 = Omit<EntrypointV1, "defaultSize" | "label"> & {
91
+ readonly script?: string;
92
+ };
93
+ export declare type ManifestEntrypoint = EntrypointV1 | EntrypointV2;
94
+ export declare type ManifestRequirements = RequirementsV1 | RequirementsV2;
95
+ /**
96
+ * Note: This enum expects values wrt manifest permission properties to support iframe allow permissions.
97
+ */
98
+ export declare enum Allow {
99
+ camera = "camera",
100
+ microphone = "microphone",
101
+ clipboard = "clipboard"
102
+ }
103
+ export declare enum EntrypointType {
104
+ WIDGET = "widget",
105
+ COMMAND = "command",
106
+ PANEL = "panel"
107
+ }
108
+ export declare type AuthorInfo = {
109
+ /** Author name */
110
+ readonly name: string;
111
+ /** Author email address */
112
+ readonly email: string;
113
+ /** Author profile url */
114
+ readonly url?: string;
115
+ };
116
+ /**
117
+ * instancePath: JSON Pointer to the location in the data instance (e.g., `"/prop/1/subProp"`).
118
+ * keyword: Validation keyword.
119
+ * params: Params property is the object with the additional information about error
120
+ * message: Error message for the failure
121
+ */
122
+ export declare type ManifestError = {
123
+ instancePath?: string;
124
+ keyword?: string;
125
+ params?: unknown;
126
+ message?: string;
127
+ };
128
+ declare type ManifestErrorType = {
129
+ [key: string]: ManifestError;
130
+ };
131
+ /**
132
+ * Defines the Error Type other than avj libray validations for the Manifest
133
+ */
134
+ export declare const OTHER_MANIFEST_ERRORS: ManifestErrorType;
135
+ /**
136
+ * success: check if AddOn has been registered successfully or not.
137
+ * errorDetails: contains all error logs from validation
138
+ * warningDetails: contains all warning logs from validation
139
+ */
140
+ export declare type ManifestValidationResult = {
141
+ success: boolean;
142
+ errorDetails?: ManifestError[];
143
+ warningDetails?: ManifestError[];
144
+ };
145
+ export interface AdditionalAddOnInfo {
146
+ sourceId: string;
147
+ privileged: boolean;
148
+ isDeveloperAddOn: boolean;
149
+ id?: string;
150
+ name?: string;
151
+ icon?: IconType;
152
+ visibility?: string;
153
+ }
154
+ export interface AddOnInfo {
155
+ manifest: ReturnType<typeof JSON.parse>;
156
+ additionalInfo: AdditionalAddOnInfo;
157
+ }
158
+ export declare enum AddOnLogLevel {
159
+ information = "information",
160
+ warning = "warning",
161
+ error = "error"
162
+ }
163
+ export declare type AddOnLogAction = (...args: unknown[]) => unknown;
164
+ export {};
165
+ //# sourceMappingURL=AddOnManifestTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddOnManifestTypes.d.ts","sourceRoot":"","sources":["../src/AddOnManifestTypes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;kFAsBkF;AAElF;;;GAGG;AAEH,oBAAY,cAAc,GAAG;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;IACxB,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CACvC,CAAC;AAEF,oBAAY,GAAG,GAAG;IACd,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5C,CAAC;AAEF,oBAAY,cAAc,GAAG;IACzB,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,EAAE,CAAC;IAC9B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IACpC,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IACpC,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAC3C,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACnB,mBAAmB;IACnB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB;IACpB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,uBAAuB;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,uCAAuC;IACvC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAA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AE,aAAa,EAAE,CAAC;IAC/B,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;CACpC,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,SAAS;IACtB,QAAQ,EAAE,UAAU,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;IACxC,cAAc,EAAE,mBAAmB,CAAC;CACvC;AAED,oBAAY,aAAa;IACrB,WAAW,gBAAgB;IAC3B,OAAO,YAAY;IACnB,KAAK,UAAU;CAClB;AAED,oBAAY,cAAc,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC"}
@@ -0,0 +1,82 @@
1
+ /********************************************************************************
2
+ * MIT License
3
+
4
+ * © Copyright 2023 Adobe. All rights reserved.
5
+
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ ********************************************************************************/
24
+ /**
25
+ * Note: This enum expects values wrt manifest permission properties to support iframe allow permissions.
26
+ */
27
+ export var Allow;
28
+ (function (Allow) {
29
+ Allow["camera"] = "camera";
30
+ Allow["microphone"] = "microphone";
31
+ Allow["clipboard"] = "clipboard";
32
+ })(Allow || (Allow = {}));
33
+ export var EntrypointType;
34
+ (function (EntrypointType) {
35
+ EntrypointType["WIDGET"] = "widget";
36
+ EntrypointType["COMMAND"] = "command";
37
+ EntrypointType["PANEL"] = "panel";
38
+ })(EntrypointType || (EntrypointType = {}));
39
+ /**
40
+ * Defines the Error Type other than avj libray validations for the Manifest
41
+ */
42
+ export const OTHER_MANIFEST_ERRORS = {
43
+ ManifestVersionType: {
44
+ instancePath: "/manifestVersion",
45
+ message: "Manifest version should be a number"
46
+ },
47
+ InvalidManifestVersion: {
48
+ instancePath: "/manifestVersion",
49
+ message: "Invalid manifest version"
50
+ },
51
+ EmptyEntrypoint: {
52
+ instancePath: "/entryPoints",
53
+ message: "At least one entrypoint should be defined"
54
+ },
55
+ EmptyIcon: {
56
+ instancePath: "/icon",
57
+ message: "At least one icon should be defined"
58
+ },
59
+ TestIdRequired: {
60
+ instancePath: "/testId",
61
+ message: "testId should be defined in manifest for developer workflow"
62
+ },
63
+ InvalidClipboardPermission: {
64
+ instancePath: "/entryPoints/permissions/clipboard",
65
+ message: "Clipboard read permission is not allowed for this AddOn"
66
+ },
67
+ RestrictedPrivilegedApis: {
68
+ instancePath: "/requirements/privilegedApis",
69
+ message: "Privileged apis are not allowed for this add-on"
70
+ },
71
+ AdditionPropertyExperimentalApis: {
72
+ instancePath: "/requirements/experimentalApis",
73
+ message: "Experimental apis are not supported for production add-ons"
74
+ }
75
+ };
76
+ export var AddOnLogLevel;
77
+ (function (AddOnLogLevel) {
78
+ AddOnLogLevel["information"] = "information";
79
+ AddOnLogLevel["warning"] = "warning";
80
+ AddOnLogLevel["error"] = "error";
81
+ })(AddOnLogLevel || (AddOnLogLevel = {}));
82
+ //# sourceMappingURL=AddOnManifestTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddOnManifestTypes.js","sourceRoot":"","sources":["../src/AddOnManifestTypes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;kFAsBkF;AAsFlF;;GAEG;AACH,MAAM,CAAN,IAAY,KAIX;AAJD,WAAY,KAAK;IACb,0BAAiB,CAAA;IACjB,kCAAyB,CAAA;IACzB,gCAAuB,CAAA;AAC3B,CAAC,EAJW,KAAK,KAAL,KAAK,QAIhB;AAED,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACtB,mCAAiB,CAAA;IACjB,qCAAmB,CAAA;IACnB,iCAAe,CAAA;AACnB,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB;AA4BD;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAsB;IACpD,mBAAmB,EAAE;QACjB,YAAY,EAAE,kBAAkB;QAChC,OAAO,EAAE,qCAAqC;KACjD;IACD,sBAAsB,EAAE;QACpB,YAAY,EAAE,kBAAkB;QAChC,OAAO,EAAE,0BAA0B;KACtC;IACD,eAAe,EAAE;QACb,YAAY,EAAE,cAAc;QAC5B,OAAO,EAAE,2CAA2C;KACvD;IACD,SAAS,EAAE;QACP,YAAY,EAAE,OAAO;QACrB,OAAO,EAAE,qCAAqC;KACjD;IACD,cAAc,EAAE;QACZ,YAAY,EAAE,SAAS;QACvB,OAAO,EAAE,6DAA6D;KACzE;IACD,0BAA0B,EAAE;QACxB,YAAY,EAAE,oCAAoC;QAClD,OAAO,EAAE,yDAAyD;KACrE;IACD,wBAAwB,EAAE;QACtB,YAAY,EAAE,8BAA8B;QAC5C,OAAO,EAAE,iDAAiD;KAC7D;IACD,gCAAgC,EAAE;QAC9B,YAAY,EAAE,gCAAgC;QAC9C,OAAO,EAAE,4DAA4D;KACxE;CACJ,CAAC;AA4BF,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACrB,4CAA2B,CAAA;IAC3B,oCAAmB,CAAA;IACnB,gCAAe,CAAA;AACnB,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB"}
@@ -0,0 +1,38 @@
1
+ /********************************************************************************
2
+ * MIT License
3
+
4
+ * © Copyright 2023 Adobe. All rights reserved.
5
+
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ ********************************************************************************/
24
+ import { AddOnLogAction, AddOnLogLevel, AdditionalAddOnInfo, ManifestValidationResult } from "./AddOnManifestTypes.js";
25
+ export declare class AddOnManifestValidator {
26
+ private readonly _addOnLogger?;
27
+ private readonly _logError;
28
+ private readonly _logWarn;
29
+ private _manifestVersion;
30
+ constructor(_addOnLogger?: Map<AddOnLogLevel, AddOnLogAction> | undefined);
31
+ private _commonAdditionalValidations;
32
+ private _verifyAdditionalDeveloperValidations;
33
+ validateDeveloperSchema(manifest: ReturnType<typeof JSON.parse>, additionalInfo: AdditionalAddOnInfo): ManifestValidationResult;
34
+ private _verifyAdditionalValidations;
35
+ private _validateSchema;
36
+ validateManifestSchema(manifest: ReturnType<typeof JSON.parse>, additionalInfo: AdditionalAddOnInfo): ManifestValidationResult;
37
+ }
38
+ //# sourceMappingURL=AddOnManifestValidator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddOnManifestValidator.d.ts","sourceRoot":"","sources":["../src/AddOnManifestValidator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;kFAsBkF;AAIlF,OAAO,EACH,cAAc,EACd,aAAa,EACb,mBAAmB,EAEnB,wBAAwB,EAG3B,MAAM,yBAAyB,CAAC;AAOjC,qBAAa,sBAAsB;IAKnB,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC;IAJ1C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAiB;IAC3C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAiB;IAC1C,OAAO,CAAC,gBAAgB,CAAU;gBAEL,YAAY,CAAC,gDAAoC;IAa9E,OAAO,CAAC,4BAA4B;IAqCpC,OAAO,CAAC,qCAAqC;IAqC7C,uBAAuB,CACnB,QAAQ,EAAE,UAAU,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,EACvC,cAAc,EAAE,mBAAmB,GACpC,wBAAwB;IAmB3B,OAAO,CAAC,4BAA4B;IAiCpC,OAAO,CAAC,eAAe;IAqBvB,sBAAsB,CAClB,QAAQ,EAAE,UAAU,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,EACvC,cAAc,EAAE,mBAAmB,GACpC,wBAAwB;CAkB9B"}