@codexsploitx/schemaapi 1.1.10 → 1.1.11

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/dist/cli.js CHANGED
@@ -7112,10 +7112,17 @@ function loadContractsModule(contractsDir) {
7112
7112
  // But assuming the user has compiled code or we are running in a compatible env:
7113
7113
  if (file.endsWith('.ts')) {
7114
7114
  try {
7115
- require('ts-node/register');
7115
+ // Register ts-node with specific options to handle imports correctly
7116
+ require('ts-node').register({
7117
+ transpileOnly: true,
7118
+ compilerOptions: {
7119
+ module: 'commonjs',
7120
+ esModuleInterop: true
7121
+ }
7122
+ });
7116
7123
  }
7117
7124
  catch (e) {
7118
- // Ignore if ts-node is not available, might be handled by node loader
7125
+ // Ignore if ts-node is not available
7119
7126
  }
7120
7127
  }
7121
7128
  return require(fullPath);