[ 'verify_peer' => false, 'verify_peer_name' => false, ], ]); } $assets = json_decode(file_get_contents(rtrim($location, '/').'/asset-manifest.json', false, $arrContextOptions ?? null), true); $loadLocation = ltrim($location, '.'); $assetEntryPoints = $assets['entrypoints'] ?? $assets; if ($assetEntryPoints === null && isDevelopment()) { throw new \RuntimeException("Action needed: in wpj container run command: 'update_automation_configurator.sh'"); } $assets = array_map(function ($val) use ($loadLocation) { return $loadLocation.$val; }, $assetEntryPoints); return ['js' => array_filter($assets, function ($x) { return StringUtil::endsWith($x, '.js'); }), 'css' => array_filter($assets, function ($x) { return StringUtil::endsWith($x, '.css'); }), ]; } }