ismx-nexo-node-app 0.4.81 → 0.4.83

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.
@@ -159,14 +159,11 @@ class BusinessServer extends Business_1.default {
159
159
  const { readdir } = yield Promise.resolve().then(() => __importStar(require('fs/promises')));
160
160
  const pathModule = yield Promise.resolve().then(() => __importStar(require('path')));
161
161
  const { fileURLToPath } = yield Promise.resolve().then(() => __importStar(require('url')));
162
- // @ts-ignore
163
- const __dirname = pathModule.dirname(fileURLToPath(import.meta.url));
164
- const servicesPath = pathModule.join(__dirname, path);
165
- const files = yield readdir(servicesPath);
162
+ const files = yield readdir(path);
166
163
  for (const file of files) {
167
164
  if (!file.endsWith('.ts') && !file.endsWith('.js'))
168
165
  continue;
169
- const modulePath = pathModule.join(servicesPath, file);
166
+ const modulePath = pathModule.join(path, file);
170
167
  const mod = yield Promise.resolve(`${modulePath}`).then(s => __importStar(require(s)));
171
168
  const ServiceClass = Object.values(mod)[0];
172
169
  // @ts-ignore
@@ -18,8 +18,6 @@ export default class ServiceRestFormalTemplate<Model = any> {
18
18
  }, {
19
19
  [key: string]: any;
20
20
  }>;
21
- readonly full: ServiceRestFormal<any, Model>;
22
- readonly fullList: ServiceRestFormal<any, Model[]>;
23
21
  readonly put: ServiceRestFormal<Model, Model>;
24
22
  readonly del: ServiceRestFormal<any, Model>;
25
23
  readonly select: ServiceRestFormal<any, string[]>;
@@ -20,5 +20,5 @@ export default class BusinessServer extends Business {
20
20
  setOnEnd(listener: (request: HttpRequest, response: HttpResponse) => any): void;
21
21
  private publish;
22
22
  private run;
23
- private load;
23
+ load(path: string): Promise<void>;
24
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ismx-nexo-node-app",
3
- "version": "0.4.81",
3
+ "version": "0.4.83",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build": "rm -rf ./dist && npx tsc",
@@ -15,8 +15,6 @@ export default class ServiceRestFormalTemplate<Model=any>
15
15
  readonly post!: ServiceRestFormal<Model, Model>;
16
16
  readonly postList!: ServiceRestFormal<Model[], Model[]>;
17
17
  readonly postKeymap!: ServiceRestFormal<{ [key:string]:any }, { [key:string]:any }>;
18
- readonly full!: ServiceRestFormal<any, Model>
19
- readonly fullList!: ServiceRestFormal<any, Model[]>
20
18
  readonly put!: ServiceRestFormal<Model, Model>;
21
19
  readonly del!: ServiceRestFormal<any, Model>;
22
20
  readonly select!: ServiceRestFormal<any, string[]>;
@@ -116,20 +116,16 @@ export default class BusinessServer extends Business
116
116
  }
117
117
  }}
118
118
 
119
- private async load(path: string): Promise<void>
119
+ public async load(path: string): Promise<void>
120
120
  {
121
121
  const { readdir } = await import('fs/promises');
122
122
  const pathModule = await import('path');
123
123
  const { fileURLToPath } = await import('url');
124
124
 
125
- // @ts-ignore
126
- const __dirname = pathModule.dirname(fileURLToPath(import.meta.url));
127
- const servicesPath = pathModule.join(__dirname, path);
128
-
129
- const files = await readdir(servicesPath);
125
+ const files = await readdir(path);
130
126
  for (const file of files) {
131
127
  if (!file.endsWith('.ts') && !file.endsWith('.js')) continue;
132
- const modulePath = pathModule.join(servicesPath, file);
128
+ const modulePath = pathModule.join(path, file);
133
129
  const mod = await import(modulePath);
134
130
  const ServiceClass = Object.values(mod)[0];
135
131
  // @ts-ignore