@teambit/doctor 0.0.306 → 0.0.308
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.
package/dist/doctor-cmd.js
CHANGED
|
@@ -27,7 +27,7 @@ class DoctorCmd {
|
|
|
27
27
|
this.doctor = doctor;
|
|
28
28
|
_defineProperty(this, "name", 'doctor [diagnosis-name]');
|
|
29
29
|
_defineProperty(this, "description", 'diagnose a bit workspace');
|
|
30
|
-
_defineProperty(this, "group", '
|
|
30
|
+
_defineProperty(this, "group", 'system');
|
|
31
31
|
_defineProperty(this, "alias", '');
|
|
32
32
|
_defineProperty(this, "loadAspects", false);
|
|
33
33
|
_defineProperty(this, "options", [['j', 'json', 'return diagnoses in json format'], ['', 'list', 'list all available diagnoses'], ['s', 'save [filePath]', 'save diagnoses to a file'], ['a', 'archive [filePath]', 'archive the workspace including diagnosis info (by default exclude node-modules and include .bit)'], ['n', 'include-node-modules', 'relevant for --archive. include node_modules in the archive file'], ['p', 'include-public', 'relevant for --archive. include public folder in the archive file'], ['e', 'exclude-local-scope', 'relevant for --archive. exclude .bit or .git/bit from the archive file']]);
|
package/dist/doctor-cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_diagnosisListTemplate","data","_interopRequireDefault","require","_doctorResultsTemplate","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","DoctorCmd","constructor","doctor","report","diagnosisName","flags","res","runDiag","list","formatDiagnosesList","examineResult","savedFilePath","metaData","formatDiagnosesResult","examineResults","json","fullJson","save","archive","includeNodeModules","includePublic","excludeLocalScope","listDiagnoses","Error","filePath","doctorOptions","archiveWorkspace","Boolean","runOne","runAll","exports"],"sources":["doctor-cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport formatDiagnosesList from './diagnosis-list-template';\nimport formatDiagnosesResult from './doctor-results-template';\nimport { DoctorMain, DoctorOptions } from './doctor.main.runtime';\n\ntype Flags = {\n list?: boolean;\n save?: string;\n archive?: string;\n includeNodeModules?: boolean;\n includePublic?: boolean;\n excludeLocalScope?: boolean;\n};\n\nexport class DoctorCmd implements Command {\n name = 'doctor [diagnosis-name]';\n description = 'diagnose a bit workspace';\n group = '
|
|
1
|
+
{"version":3,"names":["_diagnosisListTemplate","data","_interopRequireDefault","require","_doctorResultsTemplate","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","DoctorCmd","constructor","doctor","report","diagnosisName","flags","res","runDiag","list","formatDiagnosesList","examineResult","savedFilePath","metaData","formatDiagnosesResult","examineResults","json","fullJson","save","archive","includeNodeModules","includePublic","excludeLocalScope","listDiagnoses","Error","filePath","doctorOptions","archiveWorkspace","Boolean","runOne","runAll","exports"],"sources":["doctor-cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport formatDiagnosesList from './diagnosis-list-template';\nimport formatDiagnosesResult from './doctor-results-template';\nimport { DoctorMain, DoctorOptions } from './doctor.main.runtime';\n\ntype Flags = {\n list?: boolean;\n save?: string;\n archive?: string;\n includeNodeModules?: boolean;\n includePublic?: boolean;\n excludeLocalScope?: boolean;\n};\n\nexport class DoctorCmd implements Command {\n name = 'doctor [diagnosis-name]';\n description = 'diagnose a bit workspace';\n group = 'system';\n alias = '';\n loadAspects = false;\n options = [\n ['j', 'json', 'return diagnoses in json format'],\n ['', 'list', 'list all available diagnoses'],\n ['s', 'save [filePath]', 'save diagnoses to a file'],\n [\n 'a',\n 'archive [filePath]',\n 'archive the workspace including diagnosis info (by default exclude node-modules and include .bit)',\n ],\n ['n', 'include-node-modules', 'relevant for --archive. include node_modules in the archive file'],\n ['p', 'include-public', 'relevant for --archive. include public folder in the archive file'],\n ['e', 'exclude-local-scope', 'relevant for --archive. exclude .bit or .git/bit from the archive file'],\n ] as CommandOptions;\n\n constructor(private doctor: DoctorMain) {}\n\n async report([diagnosisName]: string[], flags: Flags) {\n const res = await this.runDiag(diagnosisName, flags);\n if (flags.list) {\n return formatDiagnosesList(res);\n }\n if (diagnosisName) {\n const { examineResult, savedFilePath, metaData } = res;\n return formatDiagnosesResult({ examineResults: [examineResult], savedFilePath, metaData });\n }\n const { examineResults, savedFilePath, metaData } = res;\n return formatDiagnosesResult({ examineResults, savedFilePath, metaData });\n }\n\n async json([diagnosisName]: string[], flags: Flags) {\n const res = await this.runDiag(diagnosisName, flags);\n if (flags.list) {\n return res;\n }\n const { examineResults, examineResult, savedFilePath } = res;\n const fullJson = {\n savedFilePath,\n examineResult,\n examineResults,\n };\n return fullJson;\n }\n\n private async runDiag(diagnosisName?: string, flags: Flags = {}): Promise<any> {\n const {\n list = false,\n save,\n archive,\n includeNodeModules = false,\n includePublic = false,\n excludeLocalScope = false,\n } = flags;\n\n if (list) {\n return this.doctor.listDiagnoses();\n }\n if ((includeNodeModules || excludeLocalScope) && !archive) {\n throw new Error('to use --include-node-modules or --exclude-local-scope please specify --archive');\n }\n let filePath = save;\n // Happen when used --save without specify the location\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n if (save === true || archive === true) {\n filePath = '.';\n }\n if (typeof archive === 'string') {\n filePath = archive;\n }\n const doctorOptions: DoctorOptions = {\n diagnosisName,\n filePath,\n archiveWorkspace: Boolean(archive),\n includeNodeModules,\n includePublic,\n excludeLocalScope,\n };\n return diagnosisName ? this.doctor.runOne(doctorOptions) : this.doctor.runAll(doctorOptions);\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,uBAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,sBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,uBAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;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;MACbI;IACF,CAAC;IACD,OAAOE,QAAQ;EACjB;EAEA,MAAcT,OAAOA,CAACH,aAAsB,EAAEC,KAAY,GAAG,CAAC,CAAC,EAAgB;IAC7E,MAAM;MACJG,IAAI,GAAG,KAAK;MACZS,IAAI;MACJC,OAAO;MACPC,kBAAkB,GAAG,KAAK;MAC1BC,aAAa,GAAG,KAAK;MACrBC,iBAAiB,GAAG;IACtB,CAAC,GAAGhB,KAAK;IAET,IAAIG,IAAI,EAAE;MACR,OAAO,IAAI,CAACN,MAAM,CAACoB,aAAa,CAAC,CAAC;IACpC;IACA,IAAI,CAACH,kBAAkB,IAAIE,iBAAiB,KAAK,CAACH,OAAO,EAAE;MACzD,MAAM,IAAIK,KAAK,CAAC,iFAAiF,CAAC;IACpG;IACA,IAAIC,QAAQ,GAAGP,IAAI;IACnB;IACA;IACA,IAAIA,IAAI,KAAK,IAAI,IAAIC,OAAO,KAAK,IAAI,EAAE;MACrCM,QAAQ,GAAG,GAAG;IAChB;IACA,IAAI,OAAON,OAAO,KAAK,QAAQ,EAAE;MAC/BM,QAAQ,GAAGN,OAAO;IACpB;IACA,MAAMO,aAA4B,GAAG;MACnCrB,aAAa;MACboB,QAAQ;MACRE,gBAAgB,EAAEC,OAAO,CAACT,OAAO,CAAC;MAClCC,kBAAkB;MAClBC,aAAa;MACbC;IACF,CAAC;IACD,OAAOjB,aAAa,GAAG,IAAI,CAACF,MAAM,CAAC0B,MAAM,CAACH,aAAa,CAAC,GAAG,IAAI,CAACvB,MAAM,CAAC2B,MAAM,CAACJ,aAAa,CAAC;EAC9F;AACF;AAACK,OAAA,CAAA9B,SAAA,GAAAA,SAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/doctor",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.308",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/harmony/doctor",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.harmony",
|
|
8
8
|
"name": "doctor",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.308"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "4.1.2",
|
|
@@ -22,20 +22,20 @@
|
|
|
22
22
|
"@teambit/component-id": "1.2.4",
|
|
23
23
|
"@teambit/bvm.list": "0.1.15",
|
|
24
24
|
"@teambit/bit-error": "0.0.404",
|
|
25
|
-
"@teambit/cli": "0.0.
|
|
25
|
+
"@teambit/cli": "0.0.1202",
|
|
26
26
|
"@teambit/bit.get-bit-version": "0.0.5",
|
|
27
|
-
"@teambit/config-store": "0.0.
|
|
27
|
+
"@teambit/config-store": "0.0.82",
|
|
28
28
|
"@teambit/legacy.bit-map": "0.0.107",
|
|
29
29
|
"@teambit/legacy.constants": "0.0.11",
|
|
30
30
|
"@teambit/legacy.consumer-config": "0.0.50",
|
|
31
31
|
"@teambit/legacy.utils": "0.0.21",
|
|
32
|
-
"@teambit/logger": "0.0.
|
|
32
|
+
"@teambit/logger": "0.0.1295",
|
|
33
33
|
"@teambit/scope.modules.find-scope-path": "0.0.12",
|
|
34
34
|
"@teambit/toolbox.fs.extension-getter": "0.0.5",
|
|
35
35
|
"@teambit/workspace.modules.workspace-locator": "0.0.12",
|
|
36
36
|
"@teambit/legacy.consumer": "0.0.50",
|
|
37
37
|
"@teambit/legacy.scope": "0.0.50",
|
|
38
|
-
"@teambit/objects": "0.0.
|
|
38
|
+
"@teambit/objects": "0.0.132",
|
|
39
39
|
"@teambit/git.modules.git-executable": "0.0.12",
|
|
40
40
|
"@teambit/legacy.logger": "0.0.19"
|
|
41
41
|
},
|
|
File without changes
|