miaoda-expo-devkit 0.1.1-beta.87 → 0.1.1-beta.89

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.
Files changed (2) hide show
  1. package/dist/cli/lint.js +27 -0
  2. package/package.json +1 -1
package/dist/cli/lint.js CHANGED
@@ -17227,6 +17227,31 @@ function generateTypedRoutes() {
17227
17227
  } catch {
17228
17228
  }
17229
17229
  }
17230
+ function validateExpoConfig() {
17231
+ const projectRoot = process.cwd();
17232
+ if (!(0, import_node_fs.existsSync)((0, import_node_path.join)(projectRoot, "app.json"))) return true;
17233
+ try {
17234
+ const expoDir = (0, import_node_path.dirname)(require.resolve("expo/package.json", { paths: [projectRoot] }));
17235
+ const req = (0, import_node_module.createRequire)((0, import_node_path.join)(expoDir, "index.js"));
17236
+ const { getConfig } = req("@expo/config");
17237
+ getConfig(projectRoot, { skipSDKVersionRequirement: true });
17238
+ return true;
17239
+ } catch (e) {
17240
+ const message = e instanceof Error ? e.message : String(e);
17241
+ console.error("\n[expo-config]");
17242
+ console.error(message);
17243
+ try {
17244
+ const appJson = JSON.parse((0, import_node_fs.readFileSync)((0, import_node_path.join)(projectRoot, "app.json"), "utf8"));
17245
+ const plugins = appJson?.expo?.plugins;
17246
+ if (plugins) {
17247
+ console.error("\napp.json plugins:");
17248
+ console.error(JSON.stringify(plugins, null, 2));
17249
+ }
17250
+ } catch {
17251
+ }
17252
+ return false;
17253
+ }
17254
+ }
17230
17255
  async function validateAppJsonSchema() {
17231
17256
  const projectRoot = process.cwd();
17232
17257
  const appJsonPath = (0, import_node_path.join)(projectRoot, "app.json");
@@ -17260,6 +17285,8 @@ async function main() {
17260
17285
  run("biome", "biome", ["lint", "--config-path", biomeConfig, ...lintTargets]);
17261
17286
  generateTypedRoutes();
17262
17287
  run("tsc", "tsc", ["--noEmit"]);
17288
+ const expoConfigOk = validateExpoConfig();
17289
+ results.push({ name: "expo-config", ok: expoConfigOk });
17263
17290
  const appJsonOk = await validateAppJsonSchema();
17264
17291
  results.push({ name: "app.json", ok: appJsonOk });
17265
17292
  const failed = results.filter((r) => !r.ok);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "miaoda-expo-devkit",
3
- "version": "0.1.1-beta.87",
3
+ "version": "0.1.1-beta.89",
4
4
  "description": "Expo 应用开发工具集:Sentry DSN 替换 stub、错误/网络捕获、Metro 符号化",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",