mirror of
https://gitcode.com/github-mirrors/react-native-update-cli.git
synced 2025-11-24 17:23:37 +08:00
* add logic to support SENTRY_PROPERTIES parameter * remove update.json and meta.json files in ppk * udpapte * refactor modles * update * add package-module file * update * update readme file * modifu cli.json file * fix command issues * improve version workflow logic * udpate * update * update * update * udpate * udpate * add example * update readme file * udpate version * change logic to use pushy command uniformly
32 lines
716 B
TypeScript
32 lines
716 B
TypeScript
import { t } from './i18n';
|
|
import { plugins } from './plugin-config';
|
|
|
|
interface BundleParams {
|
|
sentry: boolean;
|
|
sourcemap: boolean;
|
|
[key: string]: any;
|
|
}
|
|
|
|
export async function checkPlugins(): Promise<BundleParams> {
|
|
const params: BundleParams = {
|
|
sentry: false,
|
|
sourcemap: false,
|
|
};
|
|
|
|
for (const plugin of plugins) {
|
|
try {
|
|
const isEnabled = await plugin.detect();
|
|
if (isEnabled && plugin.bundleParams) {
|
|
Object.assign(params, plugin.bundleParams);
|
|
console.log(t('pluginDetected', { name: plugin.name }));
|
|
}
|
|
} catch (err) {
|
|
console.warn(
|
|
t('pluginDetectionError', { name: plugin.name, error: err }),
|
|
);
|
|
}
|
|
}
|
|
|
|
return params;
|
|
}
|