ismx-nexo-node-app 0.4.82 → 0.4.84

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.
@@ -154,13 +154,13 @@ class BusinessServer extends Business_1.default {
154
154
  }
155
155
  });
156
156
  }
157
- load(path) {
157
+ load(parent, path) {
158
158
  return __awaiter(this, void 0, void 0, function* () {
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
162
  // @ts-ignore
163
- const __dirname = pathModule.dirname(fileURLToPath(import.meta.url));
163
+ const __dirname = pathModule.dirname(fileURLToPath(parent));
164
164
  const servicesPath = pathModule.join(__dirname, path);
165
165
  const files = yield readdir(servicesPath);
166
166
  for (const file of files) {
@@ -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(parent: string, 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.82",
3
+ "version": "0.4.84",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build": "rm -rf ./dist && npx tsc",
@@ -116,14 +116,14 @@ export default class BusinessServer extends Business
116
116
  }
117
117
  }}
118
118
 
119
- private async load(path: string): Promise<void>
119
+ public async load(parent: string, 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
125
  // @ts-ignore
126
- const __dirname = pathModule.dirname(fileURLToPath(import.meta.url));
126
+ const __dirname = pathModule.dirname(fileURLToPath(parent));
127
127
  const servicesPath = pathModule.join(__dirname, path);
128
128
 
129
129
  const files = await readdir(servicesPath);