@travetto/manifest 5.0.2 → 5.0.3
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 +4 -4
package/package.json
CHANGED
package/src/context.ts
CHANGED
|
@@ -51,7 +51,7 @@ function findPackage(dir: string): Pkg {
|
|
|
51
51
|
/**
|
|
52
52
|
* Get workspace root
|
|
53
53
|
*/
|
|
54
|
-
function resolveWorkspace(base: string): Workspace {
|
|
54
|
+
function resolveWorkspace(base: string = process.cwd()): Workspace {
|
|
55
55
|
if (base in WS_ROOT) { return WS_ROOT[base]; }
|
|
56
56
|
let folder = base;
|
|
57
57
|
let prev;
|
|
@@ -97,7 +97,7 @@ function getCompilerUrl(ws: Workspace): string {
|
|
|
97
97
|
/**
|
|
98
98
|
* Resolve module folder
|
|
99
99
|
*/
|
|
100
|
-
function resolveModule(workspace: Workspace, folder
|
|
100
|
+
function resolveModule(workspace: Workspace, folder?: string): Pkg {
|
|
101
101
|
let mod;
|
|
102
102
|
if (!folder && process.env.TRV_MODULE) {
|
|
103
103
|
mod = process.env.TRV_MODULE;
|
|
@@ -129,8 +129,8 @@ function resolveModule(workspace: Workspace, folder: string): Pkg {
|
|
|
129
129
|
/**
|
|
130
130
|
* Gets build context
|
|
131
131
|
*/
|
|
132
|
-
export function getManifestContext(folder
|
|
133
|
-
const workspace = resolveWorkspace(
|
|
132
|
+
export function getManifestContext(folder?: string): ManifestContext {
|
|
133
|
+
const workspace = resolveWorkspace();
|
|
134
134
|
const mod = resolveModule(workspace, folder);
|
|
135
135
|
const build = workspace.travetto?.build ?? {};
|
|
136
136
|
const toolFolder = build.toolFolder ?? TOOL_FOLDER;
|