1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const appRoot = require("app-root-path");
|
4 | const path = require("path");
|
5 |
|
6 |
|
7 |
|
8 | function loadHostPackageJson() {
|
9 | try {
|
10 |
|
11 | return require(`${appRoot.path}/package.json`);
|
12 | }
|
13 | catch (err) {
|
14 |
|
15 | const appDir = __dirname.split(path.join("node_modules", "@atomist", "automation-client"))[0];
|
16 | try {
|
17 | return require(path.join(appDir, "package.json"));
|
18 | }
|
19 | catch (err) {
|
20 |
|
21 | }
|
22 | }
|
23 | return undefined;
|
24 | }
|
25 | exports.loadHostPackageJson = loadHostPackageJson;
|
26 |
|
\ | No newline at end of file |