@contrast/core
Advanced tools
Comparing version 1.29.0 to 1.29.1
@@ -43,4 +43,4 @@ /* | ||
cmd = getCommand(); | ||
pkgInfo = getPackageInfo(); | ||
entrypoint = getEntrypoint(); | ||
pkgInfo = getPackageInfo(entrypoint); | ||
} catch (_err) { | ||
@@ -119,9 +119,10 @@ err = _err; | ||
let entrypoint = process.argv[1]; | ||
const { packageData } = pkgInfo; | ||
try { | ||
if (entrypoint && fs.statSync(entrypoint).isDirectory()) { | ||
const indexJs = path.join(entrypoint, './index.js'); | ||
const main = path.join(entrypoint, packageData.main || 'index.js'); | ||
try { | ||
if (fs.statSync(indexJs)) { | ||
entrypoint = indexJs; | ||
if (fs.statSync(main)) { | ||
entrypoint = main; | ||
} | ||
@@ -162,3 +163,3 @@ } catch (err) { | ||
*/ | ||
function getPackageInfo(entrypoint) { | ||
function getPackageInfo() { | ||
const cwd = process.cwd(); | ||
@@ -176,3 +177,2 @@ const dirs = new Set(); | ||
// otherwise check up folder tree from entrypoint and then cwd | ||
dirs.add(path.dirname(entrypoint)); | ||
dirs.add(cwd); | ||
@@ -193,3 +193,2 @@ } | ||
app_root, | ||
entrypoint, | ||
paths: Array.from(dirs), | ||
@@ -196,0 +195,0 @@ }, message); |
{ | ||
"name": "@contrast/core", | ||
"version": "1.29.0", | ||
"version": "1.29.1", | ||
"description": "Preconfigured Contrast agent core services and models", | ||
@@ -5,0 +5,0 @@ "license": "SEE LICENSE IN LICENSE", |
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
35811
910