runcloud 0.2.144 → 0.2.145

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.
@@ -89,9 +89,9 @@ const SKIP_DIRS = new Set([
89
89
  'node_modules',
90
90
  'Pods',
91
91
  ]);
92
- export function evaluateCompliance(manifest, projectDir) {
92
+ export function evaluateCompliance(manifest, projectDir, options = {}) {
93
93
  const root = path.resolve(projectDir);
94
- const appJson = readJson(path.join(root, 'app.json'));
94
+ const appJson = asReleased(readJson(path.join(root, 'app.json')), options.iosBundleId);
95
95
  const targetPlatforms = targetPlatformsFromAppJson(appJson);
96
96
  const items = [];
97
97
  const unresolved = [];
@@ -146,8 +146,9 @@ function activeItems(manifest) {
146
146
  return manifest.items.filter((item) => !item.deferred && item.resolvedBy !== 'card');
147
147
  }
148
148
  function evaluateLocalItem(root, appJson, item) {
149
- if (CONFIG_RULES[item.id])
150
- return evaluateConfigItem(appJson, item, CONFIG_RULES[item.id]);
149
+ const rule = CONFIG_RULES[item.id];
150
+ if (rule)
151
+ return evaluateConfigItem(appJson, item, rule);
151
152
  switch (item.id) {
152
153
  case 'hardcoded_secrets':
153
154
  return patternItem(root, item, /sk-[A-Za-z0-9]{20,}|AIza[0-9A-Za-z_-]{30,}|-----BEGIN.*PRIVATE KEY|api[_-]?key\s*[:=]\s*['"][A-Za-z0-9]{16,}/i, 'fail', 'Hardcoded secret-like value found.', 'No secret-like values found.');
@@ -446,6 +447,14 @@ function routePath(root, file) {
446
447
  function evidence(matches) {
447
448
  return matches.slice(0, 5).map((match) => `${match.file}:${match.line}: ${match.text}`).join('\n');
448
449
  }
450
+ function asReleased(appJson, iosBundleId) {
451
+ const expo = getPath(appJson, ['expo']);
452
+ if (!iosBundleId || !expo || typeof expo !== 'object' || Array.isArray(expo))
453
+ return appJson;
454
+ const ios = getPath(expo, ['ios']);
455
+ const iosConfig = ios && typeof ios === 'object' && !Array.isArray(ios) ? ios : {};
456
+ return { ...appJson, expo: { ...expo, ios: { ...iosConfig, bundleIdentifier: iosBundleId } } };
457
+ }
449
458
  function readJson(file) {
450
459
  try {
451
460
  return JSON.parse(readFileSync(file, 'utf8'));
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const CLI_VERSION = '0.2.144';
1
+ export const CLI_VERSION = '0.2.145';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "runcloud",
3
- "version": "0.2.144",
3
+ "version": "0.2.145",
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