@newly/cli 0.2.204 → 0.2.206
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/dist/commands/appStoreEvaluate.js +26 -0
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -120,6 +120,32 @@ const SKIP_DIRS = new Set([
|
|
|
120
120
|
'node_modules',
|
|
121
121
|
'Pods',
|
|
122
122
|
]);
|
|
123
|
+
export function withEvaluatorRows(manifest, rawItems, projectDir) {
|
|
124
|
+
const expoProject = existsSync(path.join(projectDir, 'app.json')) || dynamicExpoConfig(projectDir) !== undefined;
|
|
125
|
+
if (!Array.isArray(rawItems) || !expoProject)
|
|
126
|
+
return { items: rawItems, note: '' };
|
|
127
|
+
let settled;
|
|
128
|
+
try {
|
|
129
|
+
settled = new Map(evaluateCompliance(manifest, projectDir).items.map((row) => [row.id, row]));
|
|
130
|
+
}
|
|
131
|
+
catch {
|
|
132
|
+
return { items: rawItems, note: '' };
|
|
133
|
+
}
|
|
134
|
+
const corrected = [];
|
|
135
|
+
const items = rawItems.map((raw) => {
|
|
136
|
+
const sent = raw;
|
|
137
|
+
const row = typeof sent?.id === 'string' ? settled.get(sent.id) : undefined;
|
|
138
|
+
if (!row || row.status === 'info' || (row.status === 'pass' && row.id === 'version'))
|
|
139
|
+
return raw;
|
|
140
|
+
if (sent.status !== row.status)
|
|
141
|
+
corrected.push(`${row.id} is ${row.status}${row.message ? ` (${row.message})` : ''}`);
|
|
142
|
+
return { ...raw, ...row };
|
|
143
|
+
});
|
|
144
|
+
const note = corrected.length
|
|
145
|
+
? ` The code says otherwise on ${corrected.length} row(s), and the card shows the code's answer: ${corrected.join('; ')}. Describe these as the card shows them.`
|
|
146
|
+
: '';
|
|
147
|
+
return { items, note };
|
|
148
|
+
}
|
|
123
149
|
export function evaluateCompliance(manifest, projectDir, options = {}) {
|
|
124
150
|
const root = path.resolve(projectDir);
|
|
125
151
|
const appJson = asReleased(readJson(path.join(root, 'app.json')), options.iosBundleId);
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const CLI_VERSION = '0.2.
|
|
1
|
+
export const CLI_VERSION = '0.2.206';
|