scheduler-node-models 1.2.10 → 1.2.13

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.
@@ -4,3 +4,4 @@ export * from './emailer';
4
4
  export * from './report';
5
5
  export * from './logger';
6
6
  export * from './logs';
7
+ export * from './notices';
package/general/index.js CHANGED
@@ -20,3 +20,4 @@ __exportStar(require("./emailer"), exports);
20
20
  __exportStar(require("./report"), exports);
21
21
  __exportStar(require("./logger"), exports);
22
22
  __exportStar(require("./logs"), exports);
23
+ __exportStar(require("./notices"), exports);
package/general/logger.js CHANGED
@@ -92,6 +92,7 @@ class Logger {
92
92
  if (directoryPath.endsWith('.log')) {
93
93
  const index = directoryPath.lastIndexOf('/');
94
94
  directoryPath = directoryPath.substring(0, index);
95
+ console.log(directoryPath);
95
96
  }
96
97
  if (!fs.existsSync(directoryPath)) {
97
98
  fs.mkdirSync(directoryPath, { recursive: true });
@@ -0,0 +1,31 @@
1
+ /**
2
+ * This interface defines the notice data fields so they can be passed to the
3
+ * database and user interfaces.
4
+ */
5
+ export interface INotice {
6
+ id: string;
7
+ date: Date;
8
+ to: string;
9
+ from: string;
10
+ message: string;
11
+ }
12
+ /**
13
+ * This class defines a notice object which provides the user with recorded notice
14
+ * messages.
15
+ */
16
+ export declare class Notice implements INotice {
17
+ id: string;
18
+ date: Date;
19
+ to: string;
20
+ from: string;
21
+ message: string;
22
+ constructor(note?: INotice);
23
+ /**
24
+ * This method will be used to compare one Notice from another, especially
25
+ * during sorting
26
+ * @param other (optional) a notice object used for comparison
27
+ * @returns a numeric value to indicate whether this object is before (-1) or
28
+ * after the other (1).
29
+ */
30
+ compareTo(other?: Notice): number;
31
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Notice = void 0;
4
+ /**
5
+ * This class defines a notice object which provides the user with recorded notice
6
+ * messages.
7
+ */
8
+ class Notice {
9
+ id;
10
+ date;
11
+ to;
12
+ from;
13
+ message;
14
+ constructor(note) {
15
+ this.id = (note) ? note.id : '';
16
+ this.date = (note) ? new Date(note.date) : new Date();
17
+ this.to = (note) ? note.to : '';
18
+ this.from = (note) ? note.from : '';
19
+ this.message = (note) ? note.message : '';
20
+ }
21
+ /**
22
+ * This method will be used to compare one Notice from another, especially
23
+ * during sorting
24
+ * @param other (optional) a notice object used for comparison
25
+ * @returns a numeric value to indicate whether this object is before (-1) or
26
+ * after the other (1).
27
+ */
28
+ compareTo(other) {
29
+ if (other) {
30
+ return (this.date.getTime() < other.date.getTime()) ? -1 : 1;
31
+ }
32
+ return -1;
33
+ }
34
+ }
35
+ exports.Notice = Notice;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scheduler-node-models",
3
- "version": "1.2.10",
3
+ "version": "1.2.13",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "files": [