@codexsploitx/schemaapi 1.1.10 → 1.1.12
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 +12 -2
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -7112,10 +7112,20 @@ 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
|
-
|
|
7115
|
+
// Register ts-node with specific options to handle imports correctly
|
|
7116
|
+
require('ts-node').register({
|
|
7117
|
+
transpileOnly: true,
|
|
7118
|
+
skipProject: true, // Ignore tsconfig.json in the project
|
|
7119
|
+
compilerOptions: {
|
|
7120
|
+
module: 'commonjs',
|
|
7121
|
+
moduleResolution: 'node',
|
|
7122
|
+
esModuleInterop: true,
|
|
7123
|
+
target: 'es2020'
|
|
7124
|
+
}
|
|
7125
|
+
});
|
|
7116
7126
|
}
|
|
7117
7127
|
catch (e) {
|
|
7118
|
-
// Ignore if ts-node is not available
|
|
7128
|
+
// Ignore if ts-node is not available
|
|
7119
7129
|
}
|
|
7120
7130
|
}
|
|
7121
7131
|
return require(fullPath);
|