ismx-nexo-node-app 0.4.101 → 0.4.102
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.
|
@@ -156,22 +156,24 @@ class BusinessServer extends Business_1.default {
|
|
|
156
156
|
}
|
|
157
157
|
load(parent, path) {
|
|
158
158
|
return __awaiter(this, void 0, void 0, function* () {
|
|
159
|
-
|
|
160
|
-
const
|
|
161
|
-
const
|
|
159
|
+
/*
|
|
160
|
+
const { readdir } = await import('fs/promises');
|
|
161
|
+
const pathModule = await import('path');
|
|
162
|
+
const { fileURLToPath } = await import('url');
|
|
163
|
+
|
|
162
164
|
// @ts-ignore
|
|
163
165
|
const __dirname = pathModule.dirname(fileURLToPath(parent));
|
|
164
166
|
const servicesPath = pathModule.join(__dirname, path);
|
|
165
|
-
|
|
167
|
+
|
|
168
|
+
const files = await readdir(servicesPath);
|
|
166
169
|
for (const file of files) {
|
|
167
|
-
if (!file.endsWith('.ts') && !file.endsWith('.js'))
|
|
168
|
-
continue;
|
|
170
|
+
if (!file.endsWith('.ts') && !file.endsWith('.js')) continue;
|
|
169
171
|
const modulePath = pathModule.join(servicesPath, file);
|
|
170
|
-
const mod =
|
|
172
|
+
const mod = await import(modulePath);
|
|
171
173
|
const ServiceClass = Object.values(mod)[0];
|
|
172
174
|
// @ts-ignore
|
|
173
175
|
const instance = new ServiceClass();
|
|
174
|
-
}
|
|
176
|
+
}*/
|
|
175
177
|
});
|
|
176
178
|
}
|
|
177
179
|
}
|
package/package.json
CHANGED
|
@@ -115,6 +115,7 @@ export default class BusinessServer extends Business
|
|
|
115
115
|
|
|
116
116
|
public async load(parent: string, path: string): Promise<void>
|
|
117
117
|
{
|
|
118
|
+
/*
|
|
118
119
|
const { readdir } = await import('fs/promises');
|
|
119
120
|
const pathModule = await import('path');
|
|
120
121
|
const { fileURLToPath } = await import('url');
|
|
@@ -131,6 +132,6 @@ export default class BusinessServer extends Business
|
|
|
131
132
|
const ServiceClass = Object.values(mod)[0];
|
|
132
133
|
// @ts-ignore
|
|
133
134
|
const instance = new ServiceClass();
|
|
134
|
-
}
|
|
135
|
+
}*/
|
|
135
136
|
}
|
|
136
137
|
}
|