zumito-framework 1.23.0 → 1.23.1
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.
|
@@ -62,6 +62,8 @@ export class Module {
|
|
|
62
62
|
for (const file of files) {
|
|
63
63
|
if (file.endsWith('.d.ts'))
|
|
64
64
|
continue;
|
|
65
|
+
if (file.endsWith('.ts') && files.includes(file.replace(/\.ts$/, '.js')))
|
|
66
|
+
continue;
|
|
65
67
|
if (file.endsWith('.js') || file.endsWith('.ts')) {
|
|
66
68
|
let event = await import('file://' + path.join(folderPath, file)).catch((e) => {
|
|
67
69
|
console.error(`[🔄🔴 ] Error loading ${file.slice(0, -3)} event on module ${this.constructor.name}`);
|
|
@@ -120,6 +122,8 @@ export class Module {
|
|
|
120
122
|
for (const file of files) {
|
|
121
123
|
if (file.endsWith('.d.ts'))
|
|
122
124
|
continue;
|
|
125
|
+
if (file.endsWith('.ts') && files.includes(file.replace(/\.ts$/, '.js')))
|
|
126
|
+
continue;
|
|
123
127
|
if (file.endsWith('.js') || file.endsWith('.ts')) {
|
|
124
128
|
const mod = await import('file://' + path.join(modelsFolder, file)).catch((e) => {
|
|
125
129
|
this.errorHandler.handleError(e, {
|
|
@@ -152,6 +156,8 @@ export class Module {
|
|
|
152
156
|
for (const file of files) {
|
|
153
157
|
if (file.endsWith('.d.ts'))
|
|
154
158
|
continue;
|
|
159
|
+
if (file.endsWith('.ts') && files.includes(file.replace(/\.ts$/, '.js')))
|
|
160
|
+
continue;
|
|
155
161
|
if (file.endsWith('.js') || file.endsWith('.ts')) {
|
|
156
162
|
let route = await import('file://' + path.join(folderPath, file)).catch((e) => {
|
|
157
163
|
this.errorHandler.handleError(e, {
|
|
@@ -80,6 +80,8 @@ export class CommandManager {
|
|
|
80
80
|
for (const file of files) {
|
|
81
81
|
if (file.endsWith('.d.ts'))
|
|
82
82
|
continue;
|
|
83
|
+
if (file.endsWith('.ts') && files.includes(file.replace(/\.ts$/, '.js')))
|
|
84
|
+
continue;
|
|
83
85
|
if (file.endsWith('.js') || file.endsWith('.ts')) {
|
|
84
86
|
const command = await this.loadCommandFile(path.join(folderPath, file), true);
|
|
85
87
|
if (command) {
|