pp-portfolio-classifier 0.0.6 → 0.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/dist/index.js CHANGED
@@ -35,16 +35,17 @@ var __importStar = (this && this.__importStar) || (function () {
35
35
  })();
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  const path = __importStar(require("path"));
38
+ // Load config
39
+ const package_path = path.join(path.dirname(require.resolve("../package.json")), "config");
40
+ const runtime_path = path.normalize(path.join(process.cwd(), "config"));
41
+ process.env["NODE_CONFIG_DIR"] =
42
+ package_path != runtime_path ? package_path + path.delimiter + runtime_path : runtime_path;
43
+ const _config = require("config");
44
+ // console.log("Config dir:", package_path, runtime_path, process.env["NODE_CONFIG_DIR"], _config.util.getConfigSources());
38
45
  const classifier_1 = require("./classifier");
39
46
  const morningstar_api_1 = require("./morningstar-api");
40
47
  const xml_helper_1 = require("./xml-helper");
41
48
  async function main() {
42
- const package_path = path.join(path.dirname(require.resolve("../package.json")), "config");
43
- const runtime_path = path.normalize(path.join(process.cwd(), "config"));
44
- process.env["NODE_CONFIG_DIR"] =
45
- package_path != runtime_path ? package_path + path.delimiter + runtime_path : runtime_path;
46
- const _config = require("config");
47
- console.log("Config dir:", package_path, runtime_path, process.env["NODE_CONFIG_DIR"]);
48
49
  const inputFile = process.argv[2];
49
50
  if (!inputFile) {
50
51
  console.error("Usage: npm start <input_file.xml> [output_file.xml]");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pp-portfolio-classifier",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "Automatic classification of Portfolio Performance securities using MorningStar Direct Web Services ",
5
5
  "keywords": [
6
6
  "portfolio-performance",
package/src/index.ts CHANGED
@@ -1,17 +1,19 @@
1
1
  #!/usr/bin/env node
2
2
  import * as path from "path";
3
+
4
+ // Load config
5
+ const package_path = path.join(path.dirname(require.resolve("../package.json")), "config");
6
+ const runtime_path = path.normalize(path.join(process.cwd(), "config"));
7
+ process.env["NODE_CONFIG_DIR"] =
8
+ package_path != runtime_path ? package_path + path.delimiter + runtime_path : runtime_path;
9
+ const _config = require("config");
10
+ // console.log("Config dir:", package_path, runtime_path, process.env["NODE_CONFIG_DIR"], _config.util.getConfigSources());
11
+
3
12
  import { Classifier } from "./classifier";
4
13
  import { MorningstarAPI } from "./morningstar-api";
5
14
  import { XMLHandler } from "./xml-helper";
6
15
 
7
16
  async function main() {
8
- const package_path = path.join(path.dirname(require.resolve("../package.json")), "config");
9
- const runtime_path = path.normalize(path.join(process.cwd(), "config"));
10
- process.env["NODE_CONFIG_DIR"] =
11
- package_path != runtime_path ? package_path + path.delimiter + runtime_path : runtime_path;
12
- const _config = require("config");
13
- console.log("Config dir:", package_path, runtime_path, process.env["NODE_CONFIG_DIR"]);
14
-
15
17
  const inputFile = process.argv[2];
16
18
 
17
19
  if (!inputFile) {