Skip to content

Commit 5b8fb62

Browse files
committed
add support_email to release
1 parent 2080d75 commit 5b8fb62

File tree

10 files changed

+31
-2
lines changed

10 files changed

+31
-2
lines changed

example/config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ publisher:
22
name: Solana Mobile
33
website: https://solanamobile.com
44
5+
support_email: [email protected]
56
app:
67
name: Cute Kittens
78
address: ''

packages/cli/src/CliSetup.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ function latestReleaseMessage() {
5252
const messages = [
5353
`- Banner Graphic image of size 1200x600px is now manadatory for publishing updates.`,
5454
`- Feature Graphic image of size 1200x1200px is required to be featured in Editor's choice carousel. (optional)`,
55+
`- Release metadata must now include publisher.support_email (shown to end users) alongside publisher.email for Solana Mobile outreach.`,
5556
].join('\n\n')
5657
showMessage(
5758
`Publishing Tools Version ${ Constants.CLI_VERSION }`,
@@ -87,10 +88,20 @@ export const initCliCmd = mainCli
8788
})
8889
});
8990

91+
9092
export const createCliCmd = mainCli
9193
.command("create")
9294
.description("Create a `app`, or `release`")
9395

96+
createCliCmd.addHelpText(
97+
"after",
98+
[
99+
"",
100+
"Release metadata requirements:",
101+
" Ensure publisher.support_email is set in your config. Releases expose this to end users, while publisher.email remains for Solana Mobile outreach.",
102+
].join("\n")
103+
);
104+
94105
export const createAppCliCmd = createCliCmd
95106
.command("app")
96107
.description("Create a app")

packages/cli/src/commands/create/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export * from "./CreateCliRelease.js";
1515
// Publisher
1616
// Public key attached to a publisher must also verify applications and releases
1717
// Most information here can be be edited after the fact
18-
// Only required fields are name, address, publisher website, and contact
18+
// Only required fields are name, address, publisher website, contact email, and support_email
1919
// Optional fields are: description, image_url (need dimensions!)
2020

2121
// App

packages/cli/src/config/PublishDetails.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ export const loadPublishDetailsWithChecks = async (
7474
): Promise<PublishDetails> => {
7575
const config = await loadPublishDetails(Constants.getConfigFilePath());
7676

77+
if (!config.publisher?.support_email?.length) {
78+
throw new Error("Please specify `publisher.support_email` in your configuration file. This email is displayed to dApp Store users for end-user support.");
79+
}
80+
7781
// We validate that the config is going to have at least one installable asset
7882
const apkEntry = config.release.files.find(
7983
(asset: PublishDetails["release"]["files"][0]) => asset.purpose === "install"

packages/cli/src/prebuild_schema/publishing_source.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ publisher:
22
name: <<[REQUIRED] YOUR_PUBLISHER_NAME>>
33
website: <<[REQUIRED] URL_OF_PUBLISHER_WEBSITE>>
44
email: <<[REQUIRED] EMAIL_ADDRESS_TO_CONTACT_PUBLISHER>>
5+
support_email: <<[REQUIRED] SUPPORT_EMAIL_ADDRESS_FOR_END_USERS>>
56
app:
67
name: <<[REQUIRED] APP_NAME>>
78
address: ""

packages/cli/src/prebuild_schema/schemagen.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ try {
1616
["properties"]
1717
["en-US"].required = ["short_description"];
1818

19+
schema["properties"]
20+
["publisher"]
21+
.required = ["name", "website", "email", "support_email"];
22+
1923
// Generator adds some keys/values we don't need & mess up validation
2024
delete schema.$schema;
2125
delete schema.title;

packages/core/src/create/ReleaseCore.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ export const createReleaseJson = async (
130130
name: publisherDetails.name,
131131
website: publisherDetails.website,
132132
contact: publisherDetails.email,
133+
support_email: publisherDetails.support_email,
133134
},
134135
release_details: {
135136
updated_on: new Date().toISOString(),

packages/core/src/schemas/releaseJsonMetadata.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,13 @@
5353
"contact": {
5454
"type": "string",
5555
"pattern": "^[a-zA-Z0-9_!#$%&'*+/=?`{|}~^.-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"
56+
},
57+
"support_email": {
58+
"type": "string",
59+
"pattern": "^[a-zA-Z0-9_!#$%&'*+/=?`{|}~^.-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"
5660
}
5761
},
58-
"required": ["name", "website", "contact"]
62+
"required": ["name", "website", "contact", "support_email"]
5963
},
6064
"release_details": {
6165
"type": "object",

packages/core/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export type Publisher = {
4343
name: string;
4444
website: string;
4545
email: string;
46+
support_email: string;
4647
};
4748

4849
export type App = {

publishing-spec/SPEC.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ The following is a readable example instance with sample data filled in:
161161
}
162162
```
163163

164+
The `publisher_details` block includes both a `contact` address used by Solana Mobile to reach the publisher team directly and a `support_email` that is surfaced to end users in the dApp Store.
165+
164166
## App NFT JSON
165167

166168
All releases for a dApp store entry will be grouped under an "App" collection, which itself will be an NFT that contains JSON metadata representing “global” immutable data for a dApp’s catalog entry. This actually ends up being just _one_ extension property, the app package name.

0 commit comments

Comments
 (0)