Skip to content

Commit fc126c2

Browse files
xerxovksiAbhishek Das
and
Abhishek Das
authored
Release 20240903 (#21)
* Remove BUILD.bazel * Release 20240903 * Change logs --------- Co-authored-by: Abhishek Das <[email protected]>
1 parent 8005e6b commit fc126c2

40 files changed

+380
-53
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@adobe/ccweb-add-on-analytics",
5+
"comment": "Support mobile add-ons",
6+
"type": "minor"
7+
}
8+
],
9+
"packageName": "@adobe/ccweb-add-on-analytics"
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@adobe/ccweb-add-on-core",
5+
"comment": "Support mobile add-ons",
6+
"type": "minor"
7+
}
8+
],
9+
"packageName": "@adobe/ccweb-add-on-core"
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@adobe/ccweb-add-on-manifest",
5+
"comment": "Support mobile add-ons",
6+
"type": "minor"
7+
}
8+
],
9+
"packageName": "@adobe/ccweb-add-on-manifest"
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@adobe/ccweb-add-on-scaffolder",
5+
"comment": "Support mobile add-ons",
6+
"type": "minor"
7+
}
8+
],
9+
"packageName": "@adobe/ccweb-add-on-scaffolder"
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@adobe/ccweb-add-on-scripts",
5+
"comment": "Support mobile add-ons",
6+
"type": "minor"
7+
}
8+
],
9+
"packageName": "@adobe/ccweb-add-on-scripts"
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@adobe/ccweb-add-on-sdk-types",
5+
"comment": "Support mobile add-ons",
6+
"type": "minor"
7+
}
8+
],
9+
"packageName": "@adobe/ccweb-add-on-sdk-types"
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@adobe/ccweb-add-on-ssl",
5+
"comment": "Support mobile add-ons",
6+
"type": "minor"
7+
}
8+
],
9+
"packageName": "@adobe/ccweb-add-on-ssl"
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@adobe/create-ccweb-add-on",
5+
"comment": "Support mobile add-ons",
6+
"type": "minor"
7+
}
8+
],
9+
"packageName": "@adobe/create-ccweb-add-on"
10+
}

common/config/rush/pnpm-lock.yaml

+30
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/add-on-manifest/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.DS_Store
22
dist/
33
src/generated
4+
5+
!BUILD.bazel

packages/add-on-manifest/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@adobe/ccweb-add-on-manifest",
3-
"version": "2.3.0",
3+
"version": "2.4.0",
44
"author": "Adobe",
55
"license": "MIT",
66
"description": "Manifest models and validation rules for Adobe Creative Cloud Web Add-on.",
@@ -42,7 +42,8 @@
4242
"test": "c8 mocha && c8 check-coverage --lines 100 --functions 100 --branches 100"
4343
},
4444
"dependencies": {
45-
"tslib": "2.6.2"
45+
"tslib": "2.6.2",
46+
"@swc/helpers": "0.5.12"
4647
},
4748
"devDependencies": {
4849
"@types/chai": "4.2.14",

packages/add-on-manifest/scripts/AddOnManifestSchemaTypes.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
* SOFTWARE.
2323
********************************************************************************/
2424

25-
const typePattern = "^(panel|share|content-hub|mobile.your-stuff.files|mobile.media.audio)$";
26-
const sandboxPattern = "^(allow-popups|allow-presentation|allow-downloads|allow-popups-to-escape-sandbox)$";
25+
const typePattern = "^(panel|share|content-hub|mobile.your-stuff.files|mobile.media.audio|mobile.more)$";
26+
const sandboxPattern = "^(allow-popups|allow-presentation|allow-downloads|allow-popups-to-escape-sandbox|allow-forms)$";
2727
const clipboardPattern = "^(clipboard-write|clipboard-read)$";
2828
const iconPattern = "^(lightest|light|medium|dark|darkest|all)$";
2929
const appPattern = "^(Express)$";
@@ -167,7 +167,8 @@ export const RequirementSchemaV2 = {
167167
expressPrint: { type: "boolean" },
168168
toastNotifications: { type: "boolean" },
169169
addOnLifecycle: { type: "boolean" },
170-
tiktokcml: { type: "boolean" }
170+
tiktokcml: { type: "boolean" },
171+
formSubmission: { type: "boolean" }
171172
},
172173
required: [],
173174
additionalProperties: false

packages/add-on-manifest/src/AddOnManifestTypes.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export type TrustedPartnerApis = {
4444
readonly addOnLifecycle?: boolean;
4545
readonly toastNotifications?: boolean;
4646
readonly tiktokcml?: boolean;
47+
readonly formSubmission?: boolean;
4748
};
4849

4950
export type RequirementsV2 = {
@@ -136,7 +137,8 @@ export enum EntrypointType {
136137
SHARE = "share",
137138
CONTENT_HUB = "content-hub",
138139
MOBILE_MEDIA_AUDIO = "mobile.media.audio",
139-
MOBILE_YOUR_STUFF_FILES = "mobile.your-stuff.files"
140+
MOBILE_YOUR_STUFF_FILES = "mobile.your-stuff.files",
141+
MOBILE_MORE = "mobile.more"
140142
}
141143

142144
export type AuthorInfo = {
@@ -212,6 +214,10 @@ export const OTHER_MANIFEST_ERRORS: ManifestErrorType = {
212214
RestrictedContentHubEntrypoint: {
213215
instancePath: "/entryPoints/type",
214216
message: "Entrypoint type 'content-hub' is allowed only for privileged add-ons"
217+
},
218+
RestrictedFormsSandboxProperty: {
219+
instancePath: "/entryPoints/permissions/sandbox",
220+
message: `Sandbox property "allow-forms" is not allowed for this AddOn`
215221
}
216222
};
217223

packages/add-on-manifest/src/AddOnManifestValidator.ts

+11
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,17 @@ export class AddOnManifestValidator {
9696
validationErrors.push(OTHER_MANIFEST_ERRORS.InvalidClipboardPermission);
9797
isValidSchema = false;
9898
}
99+
if (!manifest.requirements?.trustedPartnerApis?.formSubmission) {
100+
const allowsForms = entrypoint.permissions?.sandbox?.find(s => s === "allow-forms") !== undefined;
101+
if (allowsForms) {
102+
this._logError(
103+
"allow-forms permission is not allowed for the Add-on entrypoint: ",
104+
entrypoint.id
105+
);
106+
validationErrors.push(OTHER_MANIFEST_ERRORS.RestrictedFormsSandboxProperty);
107+
isValidSchema = false;
108+
}
109+
}
99110
});
100111
}
101112
if (this._manifestVersion > ManifestVersion.V1) {

packages/add-on-manifest/src/test/AddOnManifest.spec.ts

+4
Original file line numberDiff line numberDiff line change
@@ -203,5 +203,9 @@ function verifyCommonManifestFields(
203203
manifest.requirements.trustedPartnerApis.tiktokcml,
204204
testManifest.requirements.trustedPartnerApis.tiktokcml
205205
);
206+
assert.equal(
207+
manifest.requirements.trustedPartnerApis.formSubmission,
208+
testManifest.requirements.trustedPartnerApis.formSubmission
209+
);
206210
}
207211
}

0 commit comments

Comments
 (0)