fix(doctor): move index to support cjs wrapper
MODIFY
packages/doctor/appium-doctor.js
packages/doctor/appium-doctor.js
#!/usr/bin/env node
-require('./build/bin/appium-doctor');
+module.exports = require('./build/bin/appium-doctor');

DELETE
packages/doctor/index.js
-import newDoctor from './lib/factory';
-import { Doctor, DoctorCheck } from './lib/doctor';
-
-export { newDoctor, Doctor, DoctorCheck };

ADD
packages/doctor/lib/index.js
+import newDoctor from './factory';
+import { Doctor, DoctorCheck } from './doctor';
+
+export { newDoctor, Doctor, DoctorCheck };

MODIFY
packages/doctor/package.json
packages/doctor/package.json
},
"files": [
"appium-doctor.js",
- "index.js",
"lib",
"bin",
- "build/appium-doctor.js",
- "build/index.js",
- "build/lib"
+ "build"
],
"dependencies": {
- "@appium/support": "^2.55.1",
+ "@appium/support": "file:../support",
"@babel/runtime": "7.16.3",
"appium-adb": "8.16.2",
"authorize-ios": "1.2.1",
"teen_process": "1.16.0",
"yargs": "17.2.1"
},
- "devDependencies": {
- "@appium/gulp-plugins": "^5.5.5",
- "@appium/test-support": "^1.3.8"
- },
"engines": {
"node": ">=12",
"npm": ">=6"

MODIFY
packages/doctor/test/index-specs.js
packages/doctor/test/index-specs.js
// transpile:mocha
-import { newDoctor, Doctor, DoctorCheck } from '../index';
+import { newDoctor, Doctor, DoctorCheck } from '../lib';
describe('index', function () {

fix(doctor): move index to support cjs wrapper