@crossbind/extension-app-store 2.0.0-beta.81 → 2.0.0-beta.83
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/crossbind.extension.js +2 -2
- package/package.json +2 -2
- package/src/appStoreGuide.js +44 -18
package/crossbind.extension.js
CHANGED
|
@@ -112,7 +112,7 @@ async function releaseToReview(api) {
|
|
|
112
112
|
const platform = PLATFORMS[api.platform];
|
|
113
113
|
const root = api.project.root;
|
|
114
114
|
const listings = listingOf(readAppStoreListing(root), platform.api);
|
|
115
|
-
const settings = readAppStoreSettings(root);
|
|
115
|
+
const settings = readAppStoreSettings(root, api.platform);
|
|
116
116
|
const missing = appStoreListingProblems(root, listings);
|
|
117
117
|
const key = api.apple.key();
|
|
118
118
|
if (!key) missing.push(NO_KEY_TO_RELEASE);
|
|
@@ -213,7 +213,7 @@ async function sendPage(api) {
|
|
|
213
213
|
const platform = PLATFORMS[api.platform];
|
|
214
214
|
const root = api.project.root;
|
|
215
215
|
const listings = listingOf(readAppStoreListing(root), platform.api);
|
|
216
|
-
const settings = readAppStoreSettings(root);
|
|
216
|
+
const settings = readAppStoreSettings(root, api.platform);
|
|
217
217
|
if (listings.length === 0 && !hasSettings(settings)) {
|
|
218
218
|
api.log(`crossbind: ${APP_STORE_LISTING} holds no page of the app, so nothing went to App Store Connect for ${platform.name}.`);
|
|
219
219
|
return {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crossbind/extension-app-store",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.83",
|
|
4
4
|
"description": "crossbind app extension: uploads an iOS or a macOS app to App Store Connect, for TestFlight and App Review.",
|
|
5
5
|
"homepage": "https://github.com/crossbind/crossbind/tree/main/extensions/app-store#readme",
|
|
6
6
|
"repository": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"extension": "./crossbind.extension.js"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@crossbind/core-store-kit": "^2.0.0-beta.
|
|
23
|
+
"@crossbind/core-store-kit": "^2.0.0-beta.83"
|
|
24
24
|
},
|
|
25
25
|
"keywords": [
|
|
26
26
|
"crossbind-extension",
|
package/src/appStoreGuide.js
CHANGED
|
@@ -16,47 +16,73 @@ const TEXTS = {
|
|
|
16
16
|
marketingUrl: 'marketing URL',
|
|
17
17
|
};
|
|
18
18
|
const file = (name) => path.join(APP_STORE_LISTING, name);
|
|
19
|
+
// The platforms whose App Review notes and files can differ, as their folders in review_information name them.
|
|
20
|
+
const REVIEW_PLATFORMS = { ios: 'iOS', macos: 'macOS' };
|
|
19
21
|
|
|
20
22
|
// What crossbind app store --send sends of a locale, as a release does: its texts and its screenshots of
|
|
21
23
|
// each display type.
|
|
22
24
|
function localeLine({
|
|
23
|
-
locale, info, version, screenshots,
|
|
25
|
+
locale, info, version, screenshots, creativeAssets = {},
|
|
24
26
|
}) {
|
|
25
27
|
const parts = [
|
|
26
28
|
Object.keys({ ...info, ...version }).map((field) => TEXTS[field]).join(', '),
|
|
27
29
|
Object.entries(screenshots).map(([type, files]) => `${files.length} ${type} screenshots`).join(', '),
|
|
30
|
+
Object.keys(creativeAssets).map((role) => `${role} creative asset`).join(', '),
|
|
28
31
|
].filter(Boolean);
|
|
29
32
|
return `${path.join(APP_STORE_LISTING, locale)}: ${parts.join('; ')}`;
|
|
30
33
|
}
|
|
31
34
|
|
|
32
|
-
// The project's listing
|
|
33
|
-
|
|
35
|
+
// The project's listing, its settings for the platform and each platform's App Review details, with what stops reading
|
|
36
|
+
// them as a problem of its own.
|
|
37
|
+
function readAll(root, platform = 'ios') {
|
|
34
38
|
const problems = [];
|
|
35
39
|
let listings = [];
|
|
36
40
|
let settings = { categories: {}, review: {} };
|
|
41
|
+
const reviews = {};
|
|
37
42
|
try {
|
|
38
43
|
listings = readAppStoreListing(root);
|
|
39
44
|
problems.push(...appStoreListingProblems(root, listings));
|
|
40
45
|
} catch (error) {
|
|
41
46
|
problems.push(error.message);
|
|
42
47
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
48
|
+
for (const name of Object.keys(REVIEW_PLATFORMS)) {
|
|
49
|
+
try {
|
|
50
|
+
const read = readAppStoreSettings(root, name);
|
|
51
|
+
reviews[name] = read.review;
|
|
52
|
+
if (name === platform) settings = read;
|
|
53
|
+
} catch (error) {
|
|
54
|
+
if (!problems.includes(error.message)) problems.push(error.message);
|
|
55
|
+
}
|
|
47
56
|
}
|
|
48
|
-
return { listings, settings, problems };
|
|
57
|
+
return { listings, settings, reviews, problems };
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// App Review's notes and files, once where every platform's are the same, else each platform's own.
|
|
61
|
+
function reviewLines(reviews) {
|
|
62
|
+
const lines = (valueOf, line) => {
|
|
63
|
+
const values = Object.entries(reviews).map(([name, review]) => [name, valueOf(review)]);
|
|
64
|
+
if (values.every(([, value]) => value === undefined)) return [];
|
|
65
|
+
if (new Set(values.map(([, value]) => JSON.stringify(value ?? null))).size === 1) return [line(values[0][1], '')];
|
|
66
|
+
return values.filter(([, value]) => value !== undefined).map(([name, value]) => line(value, ` for ${REVIEW_PLATFORMS[name]}`));
|
|
67
|
+
};
|
|
68
|
+
const names = (files) => (files.length === 0 ? "none, so App Store Connect's go" : files.map((one) => path.basename(one)).join(', '));
|
|
69
|
+
return [
|
|
70
|
+
...lines((review) => review.notes, (notes, whose) => `App Review notes${whose}`),
|
|
71
|
+
...lines((review) => review.attachments?.map((one) => path.basename(one)), (files, whose) => `App Review attachments${whose}: ${names(files)}`),
|
|
72
|
+
];
|
|
49
73
|
}
|
|
50
74
|
|
|
51
75
|
// What crossbind app store --send sends of the app's settings, as a release does.
|
|
52
76
|
function settingsLines({
|
|
53
77
|
copyright, categories, ageRating, review,
|
|
54
|
-
}) {
|
|
78
|
+
}, reviews) {
|
|
55
79
|
return [
|
|
56
80
|
copyright === undefined ? null : `copyright: ${copyright}`,
|
|
57
81
|
Object.keys(categories).length === 0 ? null : `categories: ${Object.values(categories).join(', ')}`,
|
|
58
|
-
ageRating ? `the age rating's answers in ${file('
|
|
59
|
-
Object.
|
|
82
|
+
ageRating ? `the age rating's answers in ${file('store.json.ageRating')}` : null,
|
|
83
|
+
Object.hasOwn(review, 'demoAccountRequired') ? `App Review sign-in required: ${review.demoAccountRequired ? 'yes' : 'no'}` : null,
|
|
84
|
+
Object.keys(review).some((key) => key.startsWith('contact')) ? 'App Review contact details' : null,
|
|
85
|
+
...reviewLines(reviews),
|
|
60
86
|
].filter(Boolean);
|
|
61
87
|
}
|
|
62
88
|
|
|
@@ -65,11 +91,11 @@ function lackedSteps(listings, settings) {
|
|
|
65
91
|
const has = (pattern) => listings.some(({ screenshots }) => Object.keys(screenshots).some((type) => pattern.test(type)));
|
|
66
92
|
return [
|
|
67
93
|
listings.some(({ info }) => info.privacyPolicyUrl !== undefined) ? null
|
|
68
|
-
: `App Information › Privacy Policy URL, which
|
|
69
|
-
settings.categories.primaryCategory ? null : `App Information › Category, which ${file('
|
|
70
|
-
settings.ageRating ? null : `App Information › Age Rating: answer Apple's questions, which ${file('
|
|
71
|
-
settings.copyright === undefined ? `The version's Copyright, which ${file('copyright
|
|
72
|
-
|
|
94
|
+
: `App Information › Privacy Policy URL, which listing.json.privacyPolicyUrl in a locale's folder of ${APP_STORE_LISTING} would send.`,
|
|
95
|
+
settings.categories.primaryCategory ? null : `App Information › Category, which ${file('store.json.primaryCategory')} would send, as UTILITIES.`,
|
|
96
|
+
settings.ageRating ? null : `App Information › Age Rating: answer Apple's questions, which ${file('store.json.ageRating')} would send.`,
|
|
97
|
+
settings.copyright === undefined ? `The version's Copyright, which ${file('store.json.copyright')} would send.` : null,
|
|
98
|
+
['contactFirstName', 'contactLastName', 'contactPhone', 'contactEmail'].every((key) => settings.review[key]) ? null : `The version's App Review Information: a contact's name, phone and e-mail, which ${file('review_information/private.json')} would send.`,
|
|
73
99
|
has(/^APP_IPHONE_/) ? null : "The version's iPhone screenshots, 6.9-inch ones at least, which a locale's screenshots/APP_IPHONE_67 would send.",
|
|
74
100
|
has(/^APP_IPAD_PRO_3GEN_129$/) ? null : "The version's 13-inch iPad screenshots, which App Store Connect takes of an app that runs on iPads, as crossbind's iOS apps do; a locale's screenshots/APP_IPAD_PRO_3GEN_129 would send them.",
|
|
75
101
|
has(/^APP_DESKTOP$/) ? null : "The macOS version's screenshots, 16:10 ones of 1280 × 800 to 2880 × 1800, which a locale's screenshots/APP_DESKTOP would send.",
|
|
@@ -80,13 +106,13 @@ function lackedSteps(listings, settings) {
|
|
|
80
106
|
// a release puts out, what --send sends, which a release sends too, what App Store Connect would refuse of them, and the
|
|
81
107
|
// steps it alone takes.
|
|
82
108
|
export function appStoreGuide(api) {
|
|
83
|
-
const { listings, settings, problems: read } = readAll(api.project.root);
|
|
109
|
+
const { listings, settings, reviews, problems: read } = readAll(api.project.root, api.platform);
|
|
84
110
|
const problems = [...read, ...(api.app.category?.macos ? [] : ['crossbind: app.category is not set, and the Mac App Store takes no app without its category.'])];
|
|
85
111
|
const uploads = [
|
|
86
112
|
'the iOS app, archived and uploaded, which TestFlight hands to testers once Apple has processed it; -p ios sends it alone',
|
|
87
113
|
'then the macOS app, sandboxed, in an archive Xcode exports to App Store Connect, which signs it and its installer package in the cloud, and whose TestFlight hands it to Mac testers once Apple has processed it; -p macos sends it alone',
|
|
88
114
|
];
|
|
89
|
-
const sends = [...listings.map(localeLine), ...settingsLines(settings)];
|
|
115
|
+
const sends = [...listings.map(localeLine), ...settingsLines(settings, reviews)];
|
|
90
116
|
const releases = [
|
|
91
117
|
"the newest build of the version TestFlight's testers have, to App Review, which puts it out once approved, in phases over 7 days with --rollout",
|
|
92
118
|
'with it, the page --send sends',
|