node-peruse
Advanced tools
Comparing version 1.3.1 to 1.3.2
{ | ||
"name": "node-peruse", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"description": "A powerful CLI tool designed to analyze your node.js application.", | ||
@@ -45,2 +45,3 @@ "main": "src/index.js", | ||
"glob": "^11.0.0", | ||
"js-yaml": "^4.1.0", | ||
"ora": "^8.1.1", | ||
@@ -47,0 +48,0 @@ "pino": "^9.5.0", |
import fs from 'node:fs'; | ||
import path from 'node:path'; | ||
import yaml from 'js-yaml'; | ||
import { logger } from './logger.js'; | ||
@@ -58,4 +59,4 @@ | ||
const composePath = path.join(process.cwd(), 'compose.yaml'); | ||
if (!fs.existsSync(composePath)) { | ||
const composeFilePath = path.join(process.cwd(), 'compose.yaml'); | ||
if (!fs.existsSync(composeFilePath)) { | ||
throw new Error('Dockerfile not found in the current directory'); | ||
@@ -68,6 +69,6 @@ } | ||
if (!parsed.version) { | ||
throw new Error('Invalid docker-compose.yml: Missing "version" key.'); | ||
throw new Error('Invalid compose.yml: Missing "version" key.'); | ||
} | ||
if (!parsed.services || typeof parsed.services !== 'object') { | ||
throw new Error('Invalid docker-compose.yml: Missing "services" key or incorrect format.'); | ||
throw new Error('Invalid compose.yml: Missing "services" key or incorrect format.'); | ||
} | ||
@@ -74,0 +75,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15000
281
8
+ Addedjs-yaml@^4.1.0
+ Addedargparse@2.0.1(transitive)
+ Addedjs-yaml@4.1.0(transitive)