Skip to content

Commit e889950

Browse files
committed
make support_email optional
1 parent 6266dcd commit e889950

File tree

8 files changed

+13
-17
lines changed

8 files changed

+13
-17
lines changed

packages/cli/src/CliSetup.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +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.`,
55+
`- Release metadata now publishes publisher.support_email when provided; otherwise we reuse publisher.email for end-user support.`,
5656
].join('\n\n')
5757
showMessage(
5858
`Publishing Tools Version ${ Constants.CLI_VERSION }`,
@@ -97,8 +97,8 @@ createCliCmd.addHelpText(
9797
"after",
9898
[
9999
"",
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.",
100+
"Release metadata notes:",
101+
" We include publisher.support_email when provided; if omitted we fall back to publisher.email.",
102102
].join("\n")
103103
);
104104

@@ -542,4 +542,4 @@ publishCommand
542542
}
543543
});
544544
}
545-
);
545+
);

packages/cli/src/__tests__/CliSetupTest.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ Commands:
148148
release [options] Create a release
149149
help [command] display help for command
150150
151-
Release metadata requirements:
152-
Ensure publisher.support_email is set in your config. Releases expose this to end users, while publisher.email remains for Solana Mobile outreach.
151+
Release metadata notes:
152+
We include publisher.support_email when provided; if omitted we fall back to publisher.email.
153153
`;
154154

155155
const createAppHelp = `Usage: dapp-store create app [options]
@@ -180,4 +180,4 @@ Options:
180180
-h, --help display help for command
181181
`;
182182

183-
});
183+
});

packages/cli/src/config/PublishDetails.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@ 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-
8177
// We validate that the config is going to have at least one installable asset
8278
const apkEntry = config.release.files.find(
8379
(asset: PublishDetails["release"]["files"][0]) => asset.purpose === "install"

packages/cli/src/prebuild_schema/publishing_source.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +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>>
5+
support_email: <<[Optional] SUPPORT_EMAIL_ADDRESS_FOR_END_USERS>>
66
app:
77
name: <<[REQUIRED] APP_NAME>>
88
address: ""
@@ -61,4 +61,4 @@ solana_mobile_dapp_publisher_portal:
6161
- address: <<Optional. genesis token wallet address>>
6262
comment: <<Optional. For internal use only>>
6363
- address: <<Optional. genesis token wallet address>>
64-
comment: <<Optional. For internal use only>>
64+
comment: <<Optional. For internal use only>>

packages/cli/src/prebuild_schema/schemagen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ try {
1818

1919
schema["properties"]
2020
["publisher"]
21-
.required = ["name", "website", "email", "support_email"];
21+
.required = ["name", "website", "email"];
2222

2323
// Generator adds some keys/values we don't need & mess up validation
2424
delete schema.$schema;

packages/core/src/create/ReleaseCore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export const createReleaseJson = async (
130130
name: publisherDetails.name,
131131
website: publisherDetails.website,
132132
contact: publisherDetails.email,
133-
support_email: publisherDetails.support_email,
133+
support_email: publisherDetails.support_email ?? publisherDetails.email,
134134
},
135135
release_details: {
136136
updated_on: new Date().toISOString(),

packages/core/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export type Publisher = {
4343
name: string;
4444
website: string;
4545
email: string;
46-
support_email: string;
46+
support_email?: string;
4747
};
4848

4949
export type App = {

publishing-spec/SPEC.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ 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.
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. If `support_email` is omitted when we fallback to `contact`.
165165

166166
## App NFT JSON
167167

0 commit comments

Comments
 (0)