runcloud 0.2.169 → 0.2.171

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.
@@ -22,6 +22,14 @@ const CONFIG_RULES = {
22
22
  orientation: { path: ['expo', 'orientation'], absent: 'info' },
23
23
  ios_supports_tablet: { path: ['expo', 'ios', 'supportsTablet'], absent: 'info' },
24
24
  };
25
+ const READS_APP_CONFIG = new Set([...Object.keys(CONFIG_RULES), 'ios_encryption', 'plugin_permission_missing', 'permission_descriptions', 'privacy_manifest']);
26
+ const DYNAMIC_CONFIGS = ['ts', 'mts', 'cts', 'mjs', 'cjs', 'js'].map((ext) => `app.config.${ext}`);
27
+ export function dynamicExpoConfig(root) {
28
+ return DYNAMIC_CONFIGS.find((name) => existsSync(path.join(root, name)));
29
+ }
30
+ export function uncheckedUnder(dynamicConfig, finding) {
31
+ return `Not checked: ${dynamicConfig} can set this, and it only runs when the app builds. From app.json alone: ${finding}`;
32
+ }
25
33
  const JUDGMENT_IDS = new Set([
26
34
  'apple_sign_in_order',
27
35
  'permission_string_quality',
@@ -108,7 +116,8 @@ const SKIP_DIRS = new Set([
108
116
  export function evaluateCompliance(manifest, projectDir, options = {}) {
109
117
  const root = path.resolve(projectDir);
110
118
  const appJson = asReleased(readJson(path.join(root, 'app.json')), options.iosBundleId);
111
- const targetPlatforms = targetPlatformsFromAppJson(appJson);
119
+ const dynamicConfig = dynamicExpoConfig(root);
120
+ const targetPlatforms = dynamicConfig ? ['ios', 'android'] : targetPlatformsFromAppJson(appJson);
112
121
  const items = [];
113
122
  const unresolved = [];
114
123
  for (const item of activeItems(manifest)) {
@@ -117,6 +126,10 @@ export function evaluateCompliance(manifest, projectDir, options = {}) {
117
126
  continue;
118
127
  }
119
128
  const evaluated = evaluateLocalItem(root, appJson, item);
129
+ if (evaluated && dynamicConfig && READS_APP_CONFIG.has(item.id) && (evaluated.status === 'fail' || evaluated.status === 'warning')) {
130
+ items.push(makeItem(item, 'info', uncheckedUnder(dynamicConfig, evaluated.message ?? `${item.label} is not set.`), evaluated.evidence));
131
+ continue;
132
+ }
120
133
  if (evaluated) {
121
134
  items.push(evaluated);
122
135
  continue;
@@ -280,6 +280,10 @@ export async function readFleetLogs(client, hostId, source = 'service', limit =
280
280
  lines: Array.isArray(result.data.lines) ? result.data.lines.map(safeFleetText) : [] };
281
281
  }
282
282
  function credentialsClient() { const credentials = requireCredentials(); return new ApiClient(credentials.apiUrl, credentials.token); }
283
+ function requireFleetReadAccess(reason) {
284
+ if (reason === 'HTTP 401' || reason === 'HTTP 403')
285
+ throw new Error(`Fleet access denied (${reason}); use an admin identity with read permission`);
286
+ }
283
287
  function action(fn) {
284
288
  return fn().catch(error => { console.error(safeFleetText(error instanceof Error ? error.message : 'Fleet read failed')); process.exitCode = 1; });
285
289
  }
@@ -323,9 +327,14 @@ export function registerRunCloudFleet(program) {
323
327
  .option('--event-pages <pages>', 'Maximum pages (1..10)', '1')
324
328
  .action(opts => action(async () => {
325
329
  const result = await readFleetEvents(credentialsClient(), { hostId: opts.host, range: opts.range, limit: Number(opts.limit), eventPages: Number(opts.eventPages) });
330
+ requireFleetReadAccess(result.coverage.reason);
326
331
  console.log(JSON.stringify({ coverage: result.coverage, items: result.items.map(eventEvidence) }, null, 2));
327
332
  }));
328
333
  fleet.command('logs <hostId>').description('Read bounded retained host logs; no SSH or host changes')
329
334
  .option('--source <source>', 'service, warm_pool, or event_log', 'service').option('--limit <rows>', 'Maximum lines (1..500)', '100')
330
- .action((hostId, opts) => action(async () => { console.log(JSON.stringify(await readFleetLogs(credentialsClient(), hostId, opts.source, Number(opts.limit)), null, 2)); }));
335
+ .action((hostId, opts) => action(async () => {
336
+ const result = await readFleetLogs(credentialsClient(), hostId, opts.source, Number(opts.limit));
337
+ requireFleetReadAccess(result.reason);
338
+ console.log(JSON.stringify(result, null, 2));
339
+ }));
331
340
  }
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const CLI_VERSION = '0.2.169';
1
+ export const CLI_VERSION = '0.2.171';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "runcloud",
3
- "version": "0.2.169",
3
+ "version": "0.2.171",
4
4
  "description": "Create and control run.cloud remote mobile simulators and cloud sandboxes",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
Binary file
Binary file