slicejs-cli 2.5.0 → 2.5.1
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/client.js +1 -1
- package/commands/doctor/doctor.js +9 -7
- package/package.json +1 -1
package/client.js
CHANGED
|
@@ -34,8 +34,9 @@ async function checkNodeVersion() {
|
|
|
34
34
|
* Verifica la estructura de directorios
|
|
35
35
|
*/
|
|
36
36
|
async function checkDirectoryStructure() {
|
|
37
|
-
const
|
|
38
|
-
const
|
|
37
|
+
const projectRoot = path.join(__dirname, '../../../../');
|
|
38
|
+
const srcPath = path.join(projectRoot, 'src');
|
|
39
|
+
const apiPath = path.join(projectRoot, 'api');
|
|
39
40
|
|
|
40
41
|
const srcExists = await fs.pathExists(srcPath);
|
|
41
42
|
const apiExists = await fs.pathExists(apiPath);
|
|
@@ -62,7 +63,7 @@ async function checkDirectoryStructure() {
|
|
|
62
63
|
* Verifica sliceConfig.json
|
|
63
64
|
*/
|
|
64
65
|
async function checkConfig() {
|
|
65
|
-
const configPath = path.join(
|
|
66
|
+
const configPath = path.join(__dirname, '../../../../src/sliceConfig.json');
|
|
66
67
|
|
|
67
68
|
if (!await fs.pathExists(configPath)) {
|
|
68
69
|
return {
|
|
@@ -100,7 +101,7 @@ async function checkConfig() {
|
|
|
100
101
|
* Verifica disponibilidad del puerto
|
|
101
102
|
*/
|
|
102
103
|
async function checkPort() {
|
|
103
|
-
const configPath = path.join(
|
|
104
|
+
const configPath = path.join(__dirname, '../../../../src/sliceConfig.json');
|
|
104
105
|
let port = 3000;
|
|
105
106
|
|
|
106
107
|
try {
|
|
@@ -144,7 +145,7 @@ async function checkPort() {
|
|
|
144
145
|
* Verifica dependencias en package.json
|
|
145
146
|
*/
|
|
146
147
|
async function checkDependencies() {
|
|
147
|
-
const packagePath = path.join(
|
|
148
|
+
const packagePath = path.join(__dirname, '../../../../package.json');
|
|
148
149
|
|
|
149
150
|
if (!await fs.pathExists(packagePath)) {
|
|
150
151
|
return {
|
|
@@ -188,7 +189,8 @@ async function checkDependencies() {
|
|
|
188
189
|
* Verifica integridad de componentes
|
|
189
190
|
*/
|
|
190
191
|
async function checkComponents() {
|
|
191
|
-
const configPath = path.join(
|
|
192
|
+
const configPath = path.join(__dirname, '../../../../src/sliceConfig.json');
|
|
193
|
+
const projectRoot = path.join(__dirname, '../../../../');
|
|
192
194
|
|
|
193
195
|
if (!await fs.pathExists(configPath)) {
|
|
194
196
|
return {
|
|
@@ -206,7 +208,7 @@ async function checkComponents() {
|
|
|
206
208
|
let componentIssues = 0;
|
|
207
209
|
|
|
208
210
|
for (const [category, { path: compPath }] of Object.entries(componentPaths)) {
|
|
209
|
-
const fullPath = path.join(
|
|
211
|
+
const fullPath = path.join(projectRoot, 'src', compPath);
|
|
210
212
|
|
|
211
213
|
if (await fs.pathExists(fullPath)) {
|
|
212
214
|
const items = await fs.readdir(fullPath);
|