atmosx-nwws-parser 1.0.1911 → 1.0.1913

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/README.md CHANGED
@@ -21,7 +21,7 @@ import * as AtmosXWireParser from `atmosx-nwws-parser`; // ESM
21
21
  There are several settings you can configure when intializing the parser. Below is the test.js example that shows some of the settings you can use:
22
22
 
23
23
  ```js
24
- let Client = new AtmosXWireParser.Parser({
24
+ let Client = new AtmosXWireParser({
25
25
  alertSettings: {
26
26
  onlyCap: false, // Set to true to only receive CAP messages only
27
27
  betterEvents: true, // Set to true to receive better event handling
@@ -84,11 +84,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
84
84
  return (mod && mod.__esModule) ? mod : { "default": mod };
85
85
  };
86
86
  Object.defineProperty(exports, "__esModule", { value: true });
87
- exports.Parser = void 0;
87
+ exports.AtmosXWireParser = void 0;
88
88
  var loader = __importStar(require("../bootstrap"));
89
89
  var stanza_1 = __importDefault(require("./stanza"));
90
- var Parser = /** @class */ (function () {
91
- function Parser(metadata) {
90
+ var AtmosXWireParser = /** @class */ (function () {
91
+ function AtmosXWireParser(metadata) {
92
92
  var _this = this;
93
93
  /**
94
94
  * @function initalizeDatabase
@@ -464,6 +464,7 @@ var Parser = /** @class */ (function () {
464
464
  }
465
465
  }, 1 * 1000);
466
466
  }
467
- return Parser;
467
+ return AtmosXWireParser;
468
468
  }());
469
- exports.Parser = Parser;
469
+ exports.AtmosXWireParser = AtmosXWireParser;
470
+ module.exports = AtmosXWireParser;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atmosx-nwws-parser",
3
- "version": "1.0.1911",
3
+ "version": "1.0.1913",
4
4
  "description": "NOAA Weather Wire Parser - Built for standalone and Project AtmosphericX Integration.",
5
5
  "main": "dist/src/helper.js",
6
6
  "types": "src/helper.d.ts",
@@ -8,6 +8,11 @@
8
8
  "type": "git",
9
9
  "url": "git+https://github.com/K3YOMI/atmosx-nwws-parser.git"
10
10
  },
11
+ "scripts": {
12
+ "build": "npx tsc",
13
+ "build:run": "npx tsc && cd ./test && node ./index.js",
14
+ "publish": "npm run build && npm publish --access public"
15
+ },
11
16
  "keywords": [
12
17
  "NWWS",
13
18
  "NOAA Weather Wire Service",
package/src/helper.ts CHANGED
@@ -14,7 +14,7 @@
14
14
  import * as loader from '../bootstrap';
15
15
  import mStanza from './stanza';
16
16
 
17
- export class Parser {
17
+ export class AtmosXWireParser {
18
18
  packages: any;
19
19
  metadata: any;
20
20
  constructor(metadata: any) {
@@ -301,3 +301,7 @@ export class Parser {
301
301
  return () => { loader.statics.events.off(event, callback); }
302
302
  }
303
303
  }
304
+
305
+
306
+
307
+ module.exports = AtmosXWireParser
package/test.js CHANGED
@@ -1,7 +1,6 @@
1
+ const AtmosXWireParser = require(`./dist/src/helper.js`)
1
2
 
2
- AtmosXWireParser = require(`./dist/src/helper.js`)
3
-
4
- let Client = new AtmosXWireParser.Parser({
3
+ let Client = new AtmosXWireParser({
5
4
  database: `./database.db`,
6
5
  authentication: {
7
6
  username: `YOUR_USERNAME`,