@futdevpro/nts-dynamo 1.2.96 → 1.2.98

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/HOWTO.md ADDED
@@ -0,0 +1,6 @@
1
+
2
+ build n deploy:
3
+
4
+ npx tsc
5
+ npm login
6
+ npm publish
@@ -1,5 +1,5 @@
1
1
  import { DynamoBEAppParams } from '../_models/dynamobe-app-params';
2
- import * as Mongoose from 'mongoose';
2
+ import Mongoose = require("mongoose");
3
3
  import { DynamoBESingletonService } from './dynamobe-singleton.service';
4
4
  export declare abstract class DynamoBEApp extends DynamoBESingletonService {
5
5
  protected params: DynamoBEAppParams;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DynamoBEApp = void 0;
4
- const tslib_1 = require("tslib");
5
- const Mongoose = tslib_1.__importStar(require("mongoose"));
4
+ /* import * as Mongoose from 'mongoose'; */
5
+ const Mongoose = require("mongoose");
6
6
  const dynamobe_shared_service_1 = require("./dynamobe-shared.service");
7
7
  const dynamobe_singleton_service_1 = require("./dynamobe-singleton.service");
8
8
  class DynamoBEApp extends dynamobe_singleton_service_1.DynamoBESingletonService {
@@ -12,6 +12,7 @@ export declare class DynamoBEEmailService {
12
12
  email: string;
13
13
  pass: string;
14
14
  senderName: string;
15
+ rootPath: string;
15
16
  templatePaths: {
16
17
  [templateName: string]: string;
17
18
  };
@@ -27,7 +27,7 @@ class DynamoBEEmailService {
27
27
  /* this.constructionFinishedCallback = set.constructionFinishedCallback; */
28
28
  if (set.templatePaths) {
29
29
  for (let key in set.templatePaths) {
30
- this.loadTemplate(key, set.templatePaths[key]);
30
+ this.loadTemplate(key, set.rootPath, set.templatePaths[key]);
31
31
  }
32
32
  }
33
33
  else {
@@ -87,12 +87,12 @@ class DynamoBEEmailService {
87
87
  }
88
88
  });
89
89
  }
90
- loadTemplate(templateName, templatePath) {
90
+ loadTemplate(templateName, rootPath, templatePath) {
91
91
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
92
92
  try {
93
93
  this.templateLoadingInProgressCounter++;
94
94
  return new Promise((resolve, reject) => {
95
- templatePath = Path.join(__dirname, templatePath);
95
+ templatePath = Path.join(rootPath, templatePath);
96
96
  FileSystem.readFile(templatePath, 'utf8', (err, template) => {
97
97
  if (err) {
98
98
  console.log(`\nDynamoBEEmailService readFile ERROR (0), Couldn't load email template; ${templateName} from ${templatePath}\nerror:\n`, err, '\n');
@@ -3,9 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DynamoBEServer = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  /* import * as Express from 'express'; */
6
- /* import { e as Express } from 'express'; */
7
6
  const Express = require("express");
8
- /* import express from 'express'; */
9
7
  const Https = tslib_1.__importStar(require("https"));
10
8
  const FileSystem = tslib_1.__importStar(require("fs"));
11
9
  const BodyParser = tslib_1.__importStar(require("body-parser"));
@@ -622,8 +622,8 @@
622
622
  "affectsGlobalScope": false
623
623
  },
624
624
  "../src/_services/dynamobe-email.service.ts": {
625
- "version": "f06cd96bd15efded7b68f972465fce648821d43e7c32f64e33455170ad85635a",
626
- "signature": "8819c511a1c231f6cd59e95b92396526d033d7c38a0539500d9166b50b16fcda",
625
+ "version": "e6362a16a988f1447cb4f9703f8aae9a5d213e9eb654cf5ef9d86c47ed793b80",
626
+ "signature": "f36eaabc0c174cfe8f05ff13bd87b835ad3b682a8827abfbc271f4f297c5c81a",
627
627
  "affectsGlobalScope": false
628
628
  },
629
629
  "../src/_services/dynamobe-email-service-collection.service.ts": {
@@ -707,8 +707,8 @@
707
707
  "affectsGlobalScope": false
708
708
  },
709
709
  "../src/_services/dynamobe-app.ts": {
710
- "version": "8e045fbc7d8aac7d7b81148477073358a797b11bf18a7e5dbe55d775c45844ba",
711
- "signature": "595dfe34c0630c1258a67c658536b302c85f75f00d9487d48d82945af7b05d66",
710
+ "version": "c5fba2838aa3174a0874c6afff9257789935eb3f637d6b9ab92e1f859e4a0b24",
711
+ "signature": "6f4626a10f8f578d40e8ac3978e0dd6451d95a458a50450ebc779ad27135d260",
712
712
  "affectsGlobalScope": false
713
713
  },
714
714
  "../src/_services/dynamobe-routing-module.service.ts": {
@@ -717,7 +717,7 @@
717
717
  "affectsGlobalScope": false
718
718
  },
719
719
  "../src/_services/dynamobe-server.ts": {
720
- "version": "33b62ad79a3451d5f21fbb72791eb9cf833da448209703895181d196b2c122fa",
720
+ "version": "66f7da17f77f027c5c3cbb3cf04391c367763d35f3c455b9f33a1f416c28a9b3",
721
721
  "signature": "290228c0bdc04382a15abc038c5a8b52d0de791d40006271a51f0eb5559bd239",
722
722
  "affectsGlobalScope": false
723
723
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@futdevpro/nts-dynamo",
3
- "version": "01.02.96",
3
+ "version": "01.02.98",
4
4
  "description": "Dynamic NodeTS (NodeJS-Typescript), MongoDB Backend System Framework by Future Development Ltd.",
5
5
  "main": "./lib/index.js",
6
6
  "repository": {
@@ -1,6 +1,7 @@
1
1
 
2
2
  import { DynamoBEAppParams } from '../_models/dynamobe-app-params';
3
- import * as Mongoose from 'mongoose';
3
+ /* import * as Mongoose from 'mongoose'; */
4
+ import Mongoose = require("mongoose");
4
5
  import { DBE_Shared } from './dynamobe-shared.service';
5
6
  import { DynamoBESingletonService } from './dynamobe-singleton.service';
6
7
 
@@ -26,6 +26,7 @@ export class DynamoBEEmailService {
26
26
  pass: string,
27
27
  senderName: string,
28
28
  /* constructionFinishedCallback: () => void, */
29
+ rootPath: string,
29
30
  templatePaths: {
30
31
  [templateName: string]: string
31
32
  },
@@ -46,7 +47,7 @@ export class DynamoBEEmailService {
46
47
  /* this.constructionFinishedCallback = set.constructionFinishedCallback; */
47
48
  if (set.templatePaths) {
48
49
  for(let key in set.templatePaths) {
49
- this.loadTemplate(key, set.templatePaths[key]);
50
+ this.loadTemplate(key, set.rootPath, set.templatePaths[key]);
50
51
  }
51
52
  } else {
52
53
  this.constructionFinished();
@@ -116,11 +117,11 @@ export class DynamoBEEmailService {
116
117
  }
117
118
  }
118
119
 
119
- private async loadTemplate(templateName: string, templatePath: string): Promise<void> {
120
+ private async loadTemplate(templateName: string, rootPath: string, templatePath: string): Promise<void> {
120
121
  try {
121
122
  this.templateLoadingInProgressCounter++;
122
123
  return new Promise<void>((resolve, reject) => {
123
- templatePath = Path.join(__dirname, templatePath);
124
+ templatePath = Path.join(rootPath, templatePath);
124
125
  FileSystem.readFile(templatePath, 'utf8' , (err, template) => {
125
126
  if (err) {
126
127
  console.log(`\nDynamoBEEmailService readFile ERROR (0), Couldn't load email template; ${templateName} from ${templatePath}\nerror:\n`, err, '\n');
@@ -1,10 +1,7 @@
1
1
 
2
2
 
3
3
  /* import * as Express from 'express'; */
4
- /* import { e as Express } from 'express'; */
5
- import Express = require("express")
6
-
7
- /* import express from 'express'; */
4
+ import Express = require("express");
8
5
  import * as Https from 'https';
9
6
  import * as FileSystem from 'fs';
10
7
  import * as BodyParser from 'body-parser';