@travetto/manifest 5.0.6 → 5.0.7
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/package.json +1 -1
- package/src/context.ts +3 -3
package/package.json
CHANGED
package/src/context.ts
CHANGED
|
@@ -39,13 +39,13 @@ function findPackage(base: string, pred: (_p?: Pkg) => boolean): Pkg {
|
|
|
39
39
|
/**
|
|
40
40
|
* Gets build context
|
|
41
41
|
*/
|
|
42
|
-
export function getManifestContext(root: string
|
|
42
|
+
export function getManifestContext(root: string = process.cwd()): ManifestContext {
|
|
43
43
|
const workspace = findPackage(root, pkg => !!pkg?.workspaces || !!pkg?.travetto?.build?.isolated);
|
|
44
44
|
const build = workspace.travetto?.build ?? {};
|
|
45
45
|
const resolve = createRequire(path.resolve(workspace.path, 'node_modules')).resolve.bind(null);
|
|
46
46
|
const wsPrefix = `${workspace.path}/`;
|
|
47
|
-
const modPkg =
|
|
48
|
-
readPackage(resolve(`${
|
|
47
|
+
const modPkg = (!!workspace.workspaces && process.env.TRV_MODULE) ?
|
|
48
|
+
readPackage(resolve(`${process.env.TRV_MODULE}/package.json`)) :
|
|
49
49
|
findPackage(root, pkg => !!pkg) ?? workspace;
|
|
50
50
|
|
|
51
51
|
return {
|